Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption

2021-01-27 Thread Nick Desaulniers
On Tue, Jan 12, 2021 at 5:39 PM Nick Desaulniers wrote: > > On Tue, Jan 12, 2021 at 5:31 PM Nathan Chancellor > wrote: > > > > On Wed, Jan 13, 2021 at 08:39:52AM +0800, kernel test robot wrote: > > > Hi Nathan, > > > > > > I love your patch! Perhaps something to improve: > > > > > > [auto build

Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption

2021-01-12 Thread Nick Desaulniers
On Tue, Jan 12, 2021 at 5:31 PM Nathan Chancellor wrote: > > On Wed, Jan 13, 2021 at 08:39:52AM +0800, kernel test robot wrote: > > Hi Nathan, > > > > I love your patch! Perhaps something to improve: > > > > [auto build test WARNING on 7c53f6b671f4aba70ff15e1b05148b10d58c2837] > > > > url: >

Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption

2021-01-12 Thread Nathan Chancellor
On Wed, Jan 13, 2021 at 08:39:52AM +0800, kernel test robot wrote: > Hi Nathan, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on 7c53f6b671f4aba70ff15e1b05148b10d58c2837] > > url: >

Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption

2021-01-12 Thread Kees Cook
On Tue, Jan 12, 2021 at 03:06:34PM -0700, Nathan Chancellor wrote: > On Tue, Jan 12, 2021 at 01:53:30PM -0800, Nick Desaulniers wrote: > > On Tue, Jan 12, 2021 at 1:37 PM Nathan Chancellor > > wrote: > > > > > > > if real_ptr is an unsigned long, do we want to use `__ffs(real_ptr) + > > > > 1`

Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption

2021-01-12 Thread kernel test robot
Hi Nathan, I love your patch! Perhaps something to improve: [auto build test WARNING on 7c53f6b671f4aba70ff15e1b05148b10d58c2837] url: https://github.com/0day-ci/linux/commits/Nathan-Chancellor/ubsan-Implement-__ubsan_handle_alignment_assumption/20210113-055714 base:

Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption

2021-01-12 Thread kernel test robot
Hi Nathan, I love your patch! Perhaps something to improve: [auto build test WARNING on 7c53f6b671f4aba70ff15e1b05148b10d58c2837] url: https://github.com/0day-ci/linux/commits/Nathan-Chancellor/ubsan-Implement-__ubsan_handle_alignment_assumption/20210113-055714 base:

Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption

2021-01-12 Thread Nathan Chancellor
On Tue, Jan 12, 2021 at 01:53:30PM -0800, Nick Desaulniers wrote: > On Tue, Jan 12, 2021 at 1:37 PM Nathan Chancellor > wrote: > > > > > if real_ptr is an unsigned long, do we want to use `__ffs(real_ptr) + > > > 1` here rather than ffs which takes an int? It seems the kernel is > > > missing a

Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption

2021-01-12 Thread Nick Desaulniers
On Tue, Jan 12, 2021 at 1:37 PM Nathan Chancellor wrote: > > > if real_ptr is an unsigned long, do we want to use `__ffs(real_ptr) + > > 1` here rather than ffs which takes an int? It seems the kernel is > > missing a definition of ffsl. :( > > Why the + 1? I think if we use __ffs (which it

[PATCH] ubsan: Implement __ubsan_handle_alignment_assumption

2021-01-12 Thread Nathan Chancellor
When building ARCH=mips 32r2el_defconfig with CONFIG_UBSAN_ALIGNMENT: ld.lld: error: undefined symbol: __ubsan_handle_alignment_assumption >>> referenced by slab.h:557 (include/linux/slab.h:557) >>> main.o:(do_initcalls) in archive init/built-in.a >>> referenced by slab.h:448

Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption

2021-01-12 Thread Nick Desaulniers
On Tue, Jan 12, 2021 at 12:55 PM Nathan Chancellor wrote: > > When building ARCH=mips 32r2el_defconfig with CONFIG_UBSAN_ALIGNMENT: > > ld.lld: error: undefined symbol: __ubsan_handle_alignment_assumption > >>> referenced by slab.h:557 (include/linux/slab.h:557) > >>>

Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption

2021-01-12 Thread Nathan Chancellor
On Tue, Jan 12, 2021 at 01:15:42PM -0800, Nick Desaulniers wrote: > On Tue, Jan 12, 2021 at 12:55 PM Nathan Chancellor > wrote: > > > > When building ARCH=mips 32r2el_defconfig with CONFIG_UBSAN_ALIGNMENT: > > > > ld.lld: error: undefined symbol: __ubsan_handle_alignment_assumption > > >>>