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] [day] [month] [year] [list]
Date:   Mon, 16 Oct 2017 17:36:53 +0200
From:   Christian Brauner <christian.brauner@...onical.com>
To:     Christian Brauner <christian.brauner@...ntu.com>
Cc:     linux-kernel@...r.kernel.org, ebiederm@...ssion.com,
        serge@...lyn.com, stgraber@...ntu.com, tycho@...ho.ws
Subject: Re: [PATCH 1/2 v2] user namespace: use union in {g,u}idmap struct

Please disregard v2 - It messed up the email addresses for Serge and Eric. v3
with the correct email addresses is already sent out.

On Mon, Oct 16, 2017 at 05:30:53PM +0200, Christian Brauner wrote:
> This is preparation for bumping the {g,u}idmap limits for usernamespaces.
> 
> Signed-off-by: Christian Brauner <christian.brauner@...ntu.com>
> ---
>  include/linux/user_namespace.h | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
> index c18e01252346..7c83d7f6289b 100644
> --- a/include/linux/user_namespace.h
> +++ b/include/linux/user_namespace.h
> @@ -12,13 +12,21 @@
>  
>  #define UID_GID_MAP_MAX_EXTENTS 5
>  
> +struct uid_gid_extent {
> +	u32 first;
> +	u32 lower_first;
> +	u32 count;
> +};
> +
>  struct uid_gid_map {	/* 64 bytes -- 1 cache line */
>  	u32 nr_extents;
> -	struct uid_gid_extent {
> -		u32 first;
> -		u32 lower_first;
> -		u32 count;
> -	} extent[UID_GID_MAP_MAX_EXTENTS];
> +	union {
> +		struct uid_gid_extent extent[UID_GID_MAP_MAX_EXTENTS];
> +		struct {
> +			struct uid_gid_extent *forward;
> +			struct uid_gid_extent *reverse;
> +		};
> +	};
>  };
>  
>  #define USERNS_SETGROUPS_ALLOWED 1UL
> -- 
> 2.14.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ