Re: [PATCH] Decouple build from userspace headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 14, 2021 at 4:47 AM Alexey Dobriyan <adobriyan@xxxxxxxxx> wrote:
>
> In theory, userspace headers can be under incompatible license.
>
> Linux by virtue of being OS kernel is fully independent piece of code
> and should not require anything from userspace.

As far as I know,
<stdarg.h> was the only exception,
which was borrowed from the compiler.


I like this as long as:
  - license is clear (please add SPDX tag to the new header)
  - it works for both gcc and clang (I guess the answer is yes)


I think removing <stdbool.h> and <stddef.h> are non-controversial.
Mayby, you can split it into 1/2.




>
> For this:
>
> * ship minimal <stdarg.h>
>         2 types, 4 macros
>
> * delete "-isystem"
>         This is what enables leakage.
>
> * fixup compilation where necessary.
>
> Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
> ---
>
>  Makefile                                                               |    2 +-
>  arch/um/include/shared/irq_user.h                                      |    1 -
>  arch/um/os-Linux/signal.c                                              |    2 +-
>  crypto/aegis128-neon-inner.c                                           |    2 --
>  drivers/net/wwan/iosm/iosm_ipc_imem.h                                  |    1 -
>  drivers/pinctrl/aspeed/pinmux-aspeed.h                                 |    1 -
>  drivers/staging/media/atomisp/pci/hive_isp_css_common/host/isp_local.h |    2 --
>  include/stdarg.h                                                       |    9 +++++++++
>  sound/aoa/codecs/onyx.h                                                |    1 -
>  sound/aoa/codecs/tas.c                                                 |    1 -
>  10 files changed, 11 insertions(+), 11 deletions(-)
>

> new file mode 100644
> --- /dev/null
> +++ b/include/stdarg.h
> @@ -0,0 +1,9 @@


This is a new file, so please add the SPDX tag.
What project did you copy the code from?

  If gcc, is it GPL v3 (but not compatible for GPL v2) ?
  If clang, is it
   SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

Or, can we license this small portion of code
as GPL v2?



> +#ifndef _LINUX_STDARG_H
> +#define _LINUX_STDARG_H
> +typedef __builtin_va_list __gnuc_va_list;

Where is __gnuc_va_list needed?




BTW, once this is accepted, I'd like to
change all <stdarg.h>  to <linux/stdarg.h>.





-- 
Best Regards
Masahiro Yamada



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux