diff options
| author | Mark Brown <broonie@kernel.org> | 2017-12-04 17:59:52 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2017-12-04 17:59:52 +0000 |
| commit | d218439feccafaa3e852bbaecc0d9f6110096b65 (patch) | |
| tree | c4ebfeaebd965735cea5d90332d0f8013b79e628 /include/linux/user_namespace.h | |
| parent | a76d7f5454c688b52dc849e832cc4c6dd0975723 (diff) | |
| parent | fdaa451107ce543d345a339b4d5e20e8e4bac396 (diff) | |
| download | talos-op-linux-d218439feccafaa3e852bbaecc0d9f6110096b65.tar.gz talos-op-linux-d218439feccafaa3e852bbaecc0d9f6110096b65.zip | |
Merge branch 'fix/amd' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-amd
Diffstat (limited to 'include/linux/user_namespace.h')
| -rw-r--r-- | include/linux/user_namespace.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index c18e01252346..d6b74b91096b 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _LINUX_USER_NAMESPACE_H #define _LINUX_USER_NAMESPACE_H @@ -10,15 +11,24 @@ #include <linux/sysctl.h> #include <linux/err.h> -#define UID_GID_MAP_MAX_EXTENTS 5 +#define UID_GID_MAP_MAX_BASE_EXTENTS 5 +#define UID_GID_MAP_MAX_EXTENTS 340 -struct uid_gid_map { /* 64 bytes -- 1 cache line */ +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_BASE_EXTENTS]; + struct { + struct uid_gid_extent *forward; + struct uid_gid_extent *reverse; + }; + }; }; #define USERNS_SETGROUPS_ALLOWED 1UL |

