From: Christian Brauner <christian.brauner@canonical.com>
To: Christian Brauner <christian.brauner@ubuntu.com>
Cc: linux-kernel@vger.kernel.org, ebiederm@xmission.com,
serge@hallyn.com, stgraber@ubuntu.com, tycho@tycho.ws
Subject: Re: [PATCH 1/2 v2] user namespace: use union in {g,u}idmap struct
Date: Mon, 16 Oct 2017 17:36:53 +0200 [thread overview]
Message-ID: <20171016153652.p266xv32wgskm4am@gmail.com> (raw)
In-Reply-To: <20171016153054.22401-1-christian.brauner@ubuntu.com>
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@ubuntu.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
>
prev parent reply other threads:[~2017-10-16 15:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 15:30 Christian Brauner
2017-10-16 15:30 ` [PATCH 2/2 v2] user namespaces: bump idmap limits to 340 Christian Brauner
2017-10-16 15:36 ` Christian Brauner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171016153652.p266xv32wgskm4am@gmail.com \
--to=christian.brauner@canonical.com \
--cc=christian.brauner@ubuntu.com \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=serge@hallyn.com \
--cc=stgraber@ubuntu.com \
--cc=tycho@tycho.ws \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®