RE: [Devel] Re: [PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof

2020-06-16 Thread Kaneda, Erik
x-kernel@vger.kernel.org; > lorenzo.pieral...@arm.com; mark.rutl...@arm.com; p...@google.com; > r...@rjwysocki.net; w...@kernel.org; sta...@vger.kernel.org; linux- > a...@vger.kernel.org; de...@acpica.org > Subject: Re: [Devel] Re: [PATCH] ACPICA: fix UBSAN warning using > __builtin_offset

Re: [Devel] Re: [PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof

2020-06-11 Thread Nick Desaulniers
On Thu, Jun 11, 2020 at 9:45 AM Kaneda, Erik wrote: > > > From: Jung-uk Kim > > > > Actually, I think we should let platform-specific acfoo.h decide what to > > do here, i.e., > > That's a better solution. For Linux, it would look something like this: > > --- a/include/acpi/actypes.h > +++

RE: [Devel] Re: [PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof

2020-06-11 Thread Kaneda, Erik
x-kernel@vger.kernel.org; > lorenzo.pieral...@arm.com; mark.rutl...@arm.com; p...@google.com; > r...@rjwysocki.net; w...@kernel.org; sta...@vger.kernel.org; linux- > a...@vger.kernel.org; de...@acpica.org > Subject: [Devel] Re: [PATCH] ACPICA: fix UBSAN warning using > __builtin_offsetof >

Re: [PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof

2020-06-10 Thread Jung-uk Kim
renzo.pieral...@arm.com; mark.rutl...@arm.com; >>> ndesaulni...@google.com; p...@google.com; r...@rjwysocki.net; >>> w...@kernel.org; sta...@vger.kernel.org; linux-a...@vger.kernel.org; >>> de...@acpica.org >>> Subject: [PATCH] ACPICA: fix UBSAN warning using __builti

Re: [PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof

2020-06-10 Thread Jung-uk Kim
gt; w...@kernel.org; sta...@vger.kernel.org; linux-a...@vger.kernel.org; >> de...@acpica.org >> Subject: [PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof >> >> Will reported UBSAN warnings: >> UBSAN: null-ptr-deref in drivers/acpi/acpica/tbfadt.c:459:37 >

Re: [PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof

2020-06-10 Thread Nick Desaulniers
google.com; r...@rjwysocki.net; > > w...@kernel.org; sta...@vger.kernel.org; linux-a...@vger.kernel.org; > > de...@acpica.org > > Subject: [PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof > > > > Will reported UBSAN warnings: > > UBSAN: null-ptr-d

RE: [PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof

2020-06-10 Thread Kaneda, Erik
..@huawei.com; linux-arm- > ker...@lists.infradead.org; linux-kernel@vger.kernel.org; > lorenzo.pieral...@arm.com; mark.rutl...@arm.com; > ndesaulni...@google.com; p...@google.com; r...@rjwysocki.net; > w...@kernel.org; sta...@vger.kernel.org; linux-a...@vger.kernel.org; > de...@acpica.o

RE: [PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof

2020-06-08 Thread Kaneda, Erik
sts.infradead.org; linux- > ker...@vger.kernel.org; lorenzo.pieral...@arm.com; > mark.rutl...@arm.com; p...@google.com; r...@rjwysocki.net; > w...@kernel.org; sta...@vger.kernel.org; linux-a...@vger.kernel.org; > de...@acpica.org > Subject: Re: [PATCH] ACPICA: fix UBSAN warning usin

Re: [PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof

2020-06-08 Thread Nick Desaulniers
On Mon, Jun 8, 2020 at 7:51 AM Will Deacon wrote: > > Hey Nick, > > On Tue, Jun 02, 2020 at 11:46:31AM -0700, Nick Desaulniers wrote: > > On Mon, Jun 1, 2020 at 5:03 PM Kaneda, Erik wrote: > > > > Will reported UBSAN warnings: > > > > UBSAN: null-ptr-deref in drivers/acpi/acpica/tbfadt.c:459:37

Re: [PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof

2020-06-08 Thread Will Deacon
Hey Nick, On Tue, Jun 02, 2020 at 11:46:31AM -0700, Nick Desaulniers wrote: > On Mon, Jun 1, 2020 at 5:03 PM Kaneda, Erik wrote: > > > Will reported UBSAN warnings: > > > UBSAN: null-ptr-deref in drivers/acpi/acpica/tbfadt.c:459:37 > > > UBSAN: null-ptr-deref in arch/arm64/kernel/smp.c:596:6 > >

Re: [PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof

2020-06-02 Thread Nick Desaulniers
On Mon, Jun 1, 2020 at 5:03 PM Kaneda, Erik wrote: > > > Hi, > > > Will reported UBSAN warnings: > > UBSAN: null-ptr-deref in drivers/acpi/acpica/tbfadt.c:459:37 > > UBSAN: null-ptr-deref in arch/arm64/kernel/smp.c:596:6 > > > > Looks like the emulated offsetof macro ACPI_OFFSET is causing these.

RE: [PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof

2020-06-01 Thread Kaneda, Erik
@lists.infradead.org; linux-kernel@vger.kernel.org; > lorenzo.pieral...@arm.com; mark.rutl...@arm.com; > ndesaulni...@google.com; p...@google.com; r...@rjwysocki.net; > w...@kernel.org; sta...@vger.kernel.org; linux-a...@vger.kernel.org; > de...@acpica.org > Subject: [PATCH] ACPICA:

Re: [PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof

2020-06-01 Thread Nick Desaulniers
On Mon, Jun 1, 2020 at 4:37 PM Peter Collingbourne wrote: > > On Mon, Jun 1, 2020 at 4:18 PM Nick Desaulniers > wrote: > > > > Will reported UBSAN warnings: > > UBSAN: null-ptr-deref in drivers/acpi/acpica/tbfadt.c:459:37 > > UBSAN: null-ptr-deref in arch/arm64/kernel/smp.c:596:6 > > > > Looks

Re: [PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof

2020-06-01 Thread Peter Collingbourne
On Mon, Jun 1, 2020 at 4:18 PM Nick Desaulniers wrote: > > Will reported UBSAN warnings: > UBSAN: null-ptr-deref in drivers/acpi/acpica/tbfadt.c:459:37 > UBSAN: null-ptr-deref in arch/arm64/kernel/smp.c:596:6 > > Looks like the emulated offsetof macro ACPI_OFFSET is causing these. We > can avoid

[PATCH] ACPICA: fix UBSAN warning using __builtin_offsetof

2020-06-01 Thread Nick Desaulniers
Will reported UBSAN warnings: UBSAN: null-ptr-deref in drivers/acpi/acpica/tbfadt.c:459:37 UBSAN: null-ptr-deref in arch/arm64/kernel/smp.c:596:6 Looks like the emulated offsetof macro ACPI_OFFSET is causing these. We can avoid this by using the compiler builtin, __builtin_offsetof. The