Re: [PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-08 Thread Andrey Ryabinin
On 12/08/2017 02:14 PM, David Laight wrote: > From: Andrey Ryabinin >> Sent: 08 December 2017 10:49 > ... >> CONFIG_UBSAN_ALIGNMENT is already disabled by default for >> HAVE_EFFICIENT_UNALIGNED_ACCESS=y because it's noisy, >> but we still allow users to enable it if they want to. >> >> I don't

Re: [PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-08 Thread Andrey Ryabinin
On 12/08/2017 02:14 PM, David Laight wrote: > From: Andrey Ryabinin >> Sent: 08 December 2017 10:49 > ... >> CONFIG_UBSAN_ALIGNMENT is already disabled by default for >> HAVE_EFFICIENT_UNALIGNED_ACCESS=y because it's noisy, >> but we still allow users to enable it if they want to. >> >> I don't

RE: [PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-08 Thread David Laight
From: Andrey Ryabinin > Sent: 08 December 2017 10:49 ... > CONFIG_UBSAN_ALIGNMENT is already disabled by default for > HAVE_EFFICIENT_UNALIGNED_ACCESS=y because it's noisy, > but we still allow users to enable it if they want to. > > I don't think we should completely forbid enabling it for >

RE: [PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-08 Thread David Laight
From: Andrey Ryabinin > Sent: 08 December 2017 10:49 ... > CONFIG_UBSAN_ALIGNMENT is already disabled by default for > HAVE_EFFICIENT_UNALIGNED_ACCESS=y because it's noisy, > but we still allow users to enable it if they want to. > > I don't think we should completely forbid enabling it for >

Re: [PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-08 Thread Andrey Ryabinin
On 12/08/2017 02:24 AM, Andrew Morton wrote: > On Thu, 7 Dec 2017 16:31:23 +0300 Andrey Ryabinin > wrote: > >> On 12/07/2017 03:49 AM, Andrew Morton wrote: >>> (correcting Andrey's email address) >>> >>> >>> From: Ding Tianhong >>> Subject:

Re: [PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-08 Thread Andrey Ryabinin
On 12/08/2017 02:24 AM, Andrew Morton wrote: > On Thu, 7 Dec 2017 16:31:23 +0300 Andrey Ryabinin > wrote: > >> On 12/07/2017 03:49 AM, Andrew Morton wrote: >>> (correcting Andrey's email address) >>> >>> >>> From: Ding Tianhong >>> Subject: lib/ubsan.c: don't handle misaligned address when

RE: [PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-08 Thread David Laight
From: Andrew Morton > Sent: 07 December 2017 23:25 > On Thu, 7 Dec 2017 16:31:23 +0300 Andrey Ryabinin > wrote: > > > On 12/07/2017 03:49 AM, Andrew Morton wrote: > > > (correcting Andrey's email address) > > > > > > > > > From: Ding Tianhong >

RE: [PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-08 Thread David Laight
From: Andrew Morton > Sent: 07 December 2017 23:25 > On Thu, 7 Dec 2017 16:31:23 +0300 Andrey Ryabinin > wrote: > > > On 12/07/2017 03:49 AM, Andrew Morton wrote: > > > (correcting Andrey's email address) > > > > > > > > > From: Ding Tianhong > > > Subject: lib/ubsan.c: don't handle misaligned

Re: [PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-07 Thread Andrew Morton
On Thu, 7 Dec 2017 16:31:23 +0300 Andrey Ryabinin wrote: > On 12/07/2017 03:49 AM, Andrew Morton wrote: > > (correcting Andrey's email address) > > > > > > From: Ding Tianhong > > Subject: lib/ubsan.c: don't handle misaligned address when

Re: [PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-07 Thread Andrew Morton
On Thu, 7 Dec 2017 16:31:23 +0300 Andrey Ryabinin wrote: > On 12/07/2017 03:49 AM, Andrew Morton wrote: > > (correcting Andrey's email address) > > > > > > From: Ding Tianhong > > Subject: lib/ubsan.c: don't handle misaligned address when kernel supports > > unaligned access > > > > ubsan

Re: [PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-07 Thread Andrey Ryabinin
On 12/07/2017 03:49 AM, Andrew Morton wrote: > (correcting Andrey's email address) > > > From: Ding Tianhong > Subject: lib/ubsan.c: don't handle misaligned address when kernel supports > unaligned access > > ubsan reports a warning like: > > UBSAN: Undefined

Re: [PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-07 Thread Andrey Ryabinin
On 12/07/2017 03:49 AM, Andrew Morton wrote: > (correcting Andrey's email address) > > > From: Ding Tianhong > Subject: lib/ubsan.c: don't handle misaligned address when kernel supports > unaligned access > > ubsan reports a warning like: > > UBSAN: Undefined behaviour in

Re: [PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-06 Thread Ding Tianhong
Hi Andrew: Sorry for the mistaken of the Andrey's email. After the test I found this version still exist the problem that will transfer the align problem to size mismatch, I will send a new version to fix it. The correct way is like this: diff --git a/lib/ubsan.c b/lib/ubsan.c index

Re: [PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-06 Thread Ding Tianhong
Hi Andrew: Sorry for the mistaken of the Andrey's email. After the test I found this version still exist the problem that will transfer the align problem to size mismatch, I will send a new version to fix it. The correct way is like this: diff --git a/lib/ubsan.c b/lib/ubsan.c index

Re: [PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-06 Thread Andrew Morton
(correcting Andrey's email address) From: Ding Tianhong Subject: lib/ubsan.c: don't handle misaligned address when kernel supports unaligned access ubsan reports a warning like: UBSAN: Undefined behaviour in ../include/linux/etherdevice.h:386:9 load of misaligned

Re: [PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-06 Thread Andrew Morton
(correcting Andrey's email address) From: Ding Tianhong Subject: lib/ubsan.c: don't handle misaligned address when kernel supports unaligned access ubsan reports a warning like: UBSAN: Undefined behaviour in ../include/linux/etherdevice.h:386:9 load of misaligned address ffc069ba0482 for

[PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-01 Thread Ding Tianhong
The ubsan always report Warning just like: UBSAN: Undefined behaviour in ../include/linux/etherdevice.h:386:9 load of misaligned address ffc069ba0482 for type 'long unsigned int' which requires 8 byte alignment CPU: 0 PID: 901 Comm: sshd Not tainted 4.xx+ #1 Hardware name: linux,dummy-virt

[PATCH v2] ubsan: don't handle misaligned address when support unaligned access

2017-12-01 Thread Ding Tianhong
The ubsan always report Warning just like: UBSAN: Undefined behaviour in ../include/linux/etherdevice.h:386:9 load of misaligned address ffc069ba0482 for type 'long unsigned int' which requires 8 byte alignment CPU: 0 PID: 901 Comm: sshd Not tainted 4.xx+ #1 Hardware name: linux,dummy-virt