[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wgSHAS-HLmGH_p+NwGEHsOPgtDq8=f_iRpZDdFs4XquCw@mail.gmail.com>
Date: Sat, 23 Sep 2023 11:02:22 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: Kees Cook <keescook@...omium.org>, linux-kernel@...r.kernel.org
Subject: Re: [GIT PULL] hardening fixes for v6.6-rc3
On Sat, 23 Sept 2023 at 09:53, Alexey Dobriyan <adobriyan@...il.com> wrote:
>
> This doesn't work with g++ :-(
Whee. So the compiler seems to literally test "is it at offset 0", and
refuses to do flex arrays there.
Oh well. So flex arrays are just not usable on C++, because the
language tries to "protect" us from outselves. What else is new. I
suspect it's the same broken reason that empty structs aren't
zero-sized - stop the user from being clever.
I had hoped that the C++ people had learnt from their mistakes, but no.
Happily we don't have to deal with that crud for kernel code. I don't
like the #ifdef, but if it's needed...
Linus
Powered by blists - more mailing lists