lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240205163529.8558-A-hca@linux.ibm.com>
Date: Mon, 5 Feb 2024 17:35:29 +0100
From: Heiko Carstens <hca@...ux.ibm.com>
To: Kees Cook <keescook@...omium.org>
Cc: Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>
Subject: Re: [PATCH 2/2] s390/fpu: make use of __uninitialized macro

On Mon, Feb 05, 2024 at 08:26:32AM -0800, Kees Cook wrote:
> > +#define DECLARE_KERNEL_FPU_ONSTACK(name)	\
> > +	struct kernel_fpu name __uninitialized
> 
> Are there cases when struct kernel_fpu should be initialized? e.g.
> should the attribute just be added to the struct definition instead of
> marking each use?

I tried that, but failed:

/arch/s390/include/asm/fpu/types.h:36:3: warning: '__uninitialized__' attribute only applies to local variables [-Wignored-attributes]
   36 | } __uninitialized;
      |   ^
/include/linux/compiler_attributes.h:343:42: note: expanded from macro '__uninitialized'
  343 | # define __uninitialized                __attribute__((__uninitialized__))
      |                                                        ^

That's why I came up with this macro. I'd prefer to have this added only to
the struct definition, but looks like this is not possible (or I just can't
figure out who to do that).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ