Re: [PATCH v2 00/13] Unify asm/unaligned.h around struct helper

2021-12-17 Thread Segher Boessenkool
On Fri, Dec 17, 2021 at 12:34:53PM +, David Laight wrote: > From: Segher Boessenkool > > Sent: 16 December 2021 18:56 > ... > > > The only remaining problem here is reinterpreting a char* pointer to a > > > u32*, e.g., for accessing the IP address in an Ethernet frame when > > > NET_IP_ALIGN

RE: [PATCH v2 00/13] Unify asm/unaligned.h around struct helper

2021-12-17 Thread David Laight
From: Segher Boessenkool > Sent: 16 December 2021 18:56 ... > > The only remaining problem here is reinterpreting a char* pointer to a > > u32*, e.g., for accessing the IP address in an Ethernet frame when > > NET_IP_ALIGN == 2, which could suffer from the same UB problem again, > > as I

Re: [PATCH v2 00/13] Unify asm/unaligned.h around struct helper

2021-12-16 Thread Segher Boessenkool
On Thu, Dec 16, 2021 at 06:29:40PM +0100, Ard Biesheuvel wrote: > I think this series is a huge improvement, but it does not solve the > UB problem completely. As we found, there are open issues in the GCC > bugzilla regarding assumptions in the compiler that aligned quantities > either overlap

Re: [PATCH v2 00/13] Unify asm/unaligned.h around struct helper

2021-12-16 Thread Linus Torvalds
On Thu, Dec 16, 2021 at 9:29 AM Ard Biesheuvel wrote: > > CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is used in many places to > conditionally emit code that violates C alignment rules. E.g., there > is this example in Documentation/core-api/unaligned-memory-access.rst: > > bool

RE: [PATCH v2 00/13] Unify asm/unaligned.h around struct helper

2021-12-16 Thread David Laight
From: Ard Biesheuvel > Sent: 16 December 2021 17:30 > > Hi Arnd, > > (replying to an old thread as this came up in the discussion regarding > misaligned loads and stored in siphash() when compiled for ARM > [f7e5b9bfa6c8820407b64eabc1f29c9a87e8993d]) > > On Fri, 14 May 2021 at 12:02, Arnd

Re: [PATCH v2 00/13] Unify asm/unaligned.h around struct helper

2021-12-16 Thread Ard Biesheuvel
Hi Arnd, (replying to an old thread as this came up in the discussion regarding misaligned loads and stored in siphash() when compiled for ARM [f7e5b9bfa6c8820407b64eabc1f29c9a87e8993d]) On Fri, 14 May 2021 at 12:02, Arnd Bergmann wrote: > > From: Arnd Bergmann > > The

Re: [PATCH v2 00/13] Unify asm/unaligned.h around struct helper

2021-05-14 Thread Vineet Gupta
On 5/14/21 12:22 PM, Linus Torvalds wrote: > On Fri, May 14, 2021 at 11:52 AM Vineet Gupta > wrote: >> Wasn't the new zlib code slated for 5.14. I don't see it in your master yet > You're right, I never actually committed it, since it was specific to > ARC and -O3 Well, not really, the issue

Re: [PATCH v2 00/13] Unify asm/unaligned.h around struct helper

2021-05-14 Thread Vineet Gupta
On 5/14/21 10:32 AM, Linus Torvalds wrote: > On Fri, May 14, 2021 at 3:02 AM Arnd Bergmann wrote: >> I've included this version in the asm-generic tree for 5.14 already, >> addressing the few issues that were pointed out in the RFC. If there >> are any remaining problems, I hope those can be

Re: [PATCH v2 00/13] Unify asm/unaligned.h around struct helper

2021-05-14 Thread Linus Torvalds
On Fri, May 14, 2021 at 12:45 PM Vineet Gupta wrote: > > Well, not really, the issue manifested in ARC O3 testing, but I showed > the problem existed for arm64 gcc too. .. but not with a supported kernel configuration. > > So in fact it's not even queued up for 5.14 due to this all, I just

Re: [PATCH v2 00/13] Unify asm/unaligned.h around struct helper

2021-05-14 Thread Arnd Bergmann
On Fri, May 14, 2021 at 7:32 PM Linus Torvalds wrote: > > On Fri, May 14, 2021 at 3:02 AM Arnd Bergmann wrote: > > > > I've included this version in the asm-generic tree for 5.14 already, > > addressing the few issues that were pointed out in the RFC. If there > > are any remaining problems, I

Re: [PATCH v2 00/13] Unify asm/unaligned.h around struct helper

2021-05-14 Thread Linus Torvalds
On Fri, May 14, 2021 at 11:52 AM Vineet Gupta wrote: > > Wasn't the new zlib code slated for 5.14. I don't see it in your master yet You're right, I never actually committed it, since it was specific to ARC and -O3 and I wasn't entirely happy with the amount of testing it got (with Heiko

Re: [PATCH v2 00/13] Unify asm/unaligned.h around struct helper

2021-05-14 Thread Linus Torvalds
On Fri, May 14, 2021 at 3:02 AM Arnd Bergmann wrote: > > I've included this version in the asm-generic tree for 5.14 already, > addressing the few issues that were pointed out in the RFC. If there > are any remaining problems, I hope those can be addressed as follow-up > patches. This continues