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
| ||
|
Date: Mon, 4 Apr 2022 10:01:49 +0200 From: Arnd Bergmann <arnd@...db.de> To: Christoph Hellwig <hch@...radead.org> Cc: Masahiro Yamada <masahiroy@...nel.org>, Arnd Bergmann <arnd@...db.de>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>, linux-arch <linux-arch@...r.kernel.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org> Subject: Re: [PATCH 2/8] kbuild: prevent exported headers from including <stdlib.h>, <stdbool.h> On Mon, Apr 4, 2022 at 9:41 AM Christoph Hellwig <hch@...radead.org> wrote: > > On Mon, Apr 04, 2022 at 03:19:42PM +0900, Masahiro Yamada wrote: > > If we can make kernel headers self-contained (that is, none of exported > > kernel headers includes system headers), we will be able to add the > > -nostdinc flag, but that is much far from where we stand now. > > What is still missing for that? One case that I don't know how to solve is include/uapi/sound/asound.h:typedef struct { unsigned char pad[sizeof(time_t) - sizeof(int)]; } __time_pad; Here we define a structure layout based on a libc-provided type. There are two possible variants (32-bit and 64-bit time_t), and the kernel interface can handle both versions because they get different ioctl command numbers, but user space must see the one that matches its normal time_t. There are a couple of similar cases like this, but I think the other ones don't need to define architecture specific padding like this. Arnd
Powered by blists - more mailing lists