[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+h-eQtPH=6dObjXO+k6WLc8vNo3MCjzmE4+4LLj2NYzw@mail.gmail.com>
Date: Thu, 27 Jan 2022 18:30:00 -0800
From: Eric Dumazet <edumazet@...gle.com>
To: Jann Horn <jannh@...gle.com>
Cc: Jakub Kicinski <kuba@...nel.org>,
"David S . Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Oliver Neukum <oneukum@...e.com>,
"the arch/x86 maintainers" <x86@...nel.org>
Subject: Re: [PATCH net] net: dev: Detect dev_hold() after netdev_wait_allrefs()
On Thu, Jan 27, 2022 at 6:27 PM Jann Horn <jannh@...gle.com> wrote:
>
> I like that idea... but this_cpu_dec()/this_cpu_inc() use GS-relative
> addressing, at least on X86-64, so NULL might make things worse, I
> think? /proc/kallsyms on my machine starts with:
>
> 0000000000000000 A fixed_percpu_data
> 0000000000000000 A __per_cpu_start
> 0000000000001000 A cpu_debug_store
> 0000000000002000 A irq_stack_backing_store
> 0000000000006000 A cpu_tss_rw
> 000000000000b000 A gdt_page
> 000000000000c000 A exception_stacks
> 0000000000010000 A entry_stack_storage
> 0000000000011000 A espfix_waddr
>
> So we'd probably need some different placeholder instead of NULL to
> actually crash...
Orthogonal problem, maybe we should make sure the first page of
per-cpu data is un-mapped.
Powered by blists - more mailing lists