Re: implement-file-posix-capabilities.patch

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Serge E. Hallyn
Date: Monday, July 2, 2007 - 7:38 am

All,

Regarding future/backward compatibility of file capabilities:

Quoting Andrew Morgan (morgan@kernel.org):

...


...


There are a few obvious approaches we can take:

1. Exactly Andrew describes.  Once userspace switches to a new cap
format, an older kernel simply won't support them

2. As Andrew describes, but also encode the version number into the
capability name, i.e. security.capability.v3.  Now userspace can
optionally tack on more than one capability version to be backward
compatible.

3. Somewhat different than Andrew describes.  We mandate that any
capability version N+1 consist of

struct vfs_cap_data {
	__u32 magic;
	capability_version_1;
	capability_version_2;
	...
	capability_version_N;
	capability_version_N+1;
};

Or, for brevity,

struct vfs_cap_data {
	__u32 first_magic;
	__u32 last_magic;
	capability_version_first;
	...
	capability_version_last;
};

4. Stick to the current plan, where switching to 64-bit caps will be
done as

struct vfs_cap_data_disk {
	__le32 version;
	__le32 data[]; /* eff[0], perm[0], inh[0], eff[1], ... */
};

What would people prefer?

thanks,
-serge
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: implement-file-posix-capabilities.patch, Serge E. Hallyn, (Thu Jun 21, 9:00 am)
Re: implement-file-posix-capabilities.patch, Andrew Morgan, (Sat Jun 23, 1:13 am)
Re: implement-file-posix-capabilities.patch, Serge E. Hallyn, (Sun Jun 24, 8:51 am)
Re: implement-file-posix-capabilities.patch, James Morris, (Sun Jun 24, 9:18 am)
Re: [PATCH try #2] security: Convert LSM into a static int ..., Andreas Gruenbacher, (Mon Jun 25, 1:37 pm)
Re: implement-file-posix-capabilities.patch, Andrew Morgan, (Tue Jun 26, 10:00 pm)
Re: implement-file-posix-capabilities.patch, Serge E. Hallyn, (Wed Jun 27, 6:16 am)
Re: implement-file-posix-capabilities.patch, Andrew Morgan, (Wed Jun 27, 11:19 pm)
Re: implement-file-posix-capabilities.patch, Serge E. Hallyn, (Thu Jun 28, 6:36 am)
Re: implement-file-posix-capabilities.patch, Casey Schaufler, (Thu Jun 28, 8:14 am)
Re: implement-file-posix-capabilities.patch, Serge E. Hallyn, (Thu Jun 28, 8:38 am)
Re: implement-file-posix-capabilities.patch, Andrew Morgan, (Thu Jun 28, 8:50 am)
Re: implement-file-posix-capabilities.patch, Casey Schaufler, (Thu Jun 28, 8:56 am)
Re: implement-file-posix-capabilities.patch, Andrew Morgan, (Thu Jun 28, 10:30 pm)
Re: implement-file-posix-capabilities.patch, Serge E. Hallyn, (Fri Jun 29, 6:24 am)
Re: implement-file-posix-capabilities.patch, Casey Schaufler, (Fri Jun 29, 7:46 am)
Re: implement-file-posix-capabilities.patch, Serge E. Hallyn, (Mon Jul 2, 7:38 am)
Re: implement-file-posix-capabilities.patch, Andrew Morgan, (Wed Jul 4, 2:29 pm)
Re: implement-file-posix-capabilities.patch, Casey Schaufler, (Wed Jul 4, 4:00 pm)