Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 1 Jan 2018 19:50:50 +0100
From: Hauke Mehrtens <hauke@...ke-m.de>
To: musl@...ts.openwall.com
Cc: felix.janda@...teo.de, dalias@...c.org
Subject: Re: kernel: suppress some more Linux uapi definitions

On 08/04/2017 05:09 PM, Hauke Mehrtens wrote:
> The following commit activated the suppression of some uapi definitions
> in musl 04983f227238 ("make netinet/in.h suppress clashing definitions
> from kernel headers"), but it still misses some of the definitions for
> other files.
> 
> This will deactivate the definitions in the user space header files
> exported by the Linux kernel.
> 
> This fully works when Felix's patch posted here is applied to the Linux
> kernel:
> https://patchwork.kernel.org/patch/9869953/
> 
> Signed-off-by: Hauke Mehrtens <hauke@...ke-m.de>
> ---

Are there any problems with this patch?
The latest patch doing these changes to the kernel can be found here:
https://patchwork.kernel.org/patch/10139199/

It is doing the same thing as this patch:
http://git.musl-libc.org/cgit/musl/commit/?id=04983f2272382af92eb8f8838964ff944fbb8258
just for the two other effected files.

Hauke

>  include/net/if.h    | 7 +++++++
>  include/sys/xattr.h | 2 ++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/include/net/if.h b/include/net/if.h
> index 2f2fcc10..21f10801 100644
> --- a/include/net/if.h
> +++ b/include/net/if.h
> @@ -125,6 +125,13 @@ struct ifconf {
>  #define ifc_req		ifc_ifcu.ifcu_req
>  #define _IOT_ifconf _IOT(_IOTS(struct ifconf),1,0,0,0,0)
>  
> +#define __UAPI_DEF_IF_IFCONF 0
> +#define __UAPI_DEF_IF_IFMAP 0
> +#define __UAPI_DEF_IF_IFNAMSIZ 0
> +#define __UAPI_DEF_IF_IFREQ 0
> +#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0
> +#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
> +
>  #endif
>  
>  #ifdef __cplusplus
> diff --git a/include/sys/xattr.h b/include/sys/xattr.h
> index 6479fcc6..7a0197ba 100644
> --- a/include/sys/xattr.h
> +++ b/include/sys/xattr.h
> @@ -24,6 +24,8 @@ int removexattr(const char *, const char *);
>  int lremovexattr(const char *, const char *);
>  int fremovexattr(int, const char *);
>  
> +#define __UAPI_DEF_XATTR 0
> +
>  #ifdef __cplusplus
>  }
>  #endif
> 

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ