No description
  • C 98.2%
  • Assembly 1%
  • Makefile 0.3%
  • Shell 0.2%
  • Python 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
David Howells b206f281d0 keys: Namespace keyring names
Keyring names are held in a single global list that any process can pick
from by means of keyctl_join_session_keyring (provided the keyring grants
Search permission).  This isn't very container friendly, however.

Make the following changes:

 (1) Make default session, process and thread keyring names begin with a
     '.' instead of '_'.

 (2) Keyrings whose names begin with a '.' aren't added to the list.  Such
     keyrings are system specials.

 (3) Replace the global list with per-user_namespace lists.  A keyring adds
     its name to the list for the user_namespace that it is currently in.

 (4) When a user_namespace is deleted, it just removes itself from the
     keyring name list.

The global keyring_name_lock is retained for accessing the name lists.
This allows (4) to work.

This can be tested by:

	# keyctl newring foo @s
	995906392
	# unshare -U
	$ keyctl show
	...
	 995906392 --alswrv  65534 65534   \_ keyring: foo
	...
	$ keyctl session foo
	Joined session keyring: 935622349

As can be seen, a new session keyring was created.

The capability bit KEYCTL_CAPS1_NS_KEYRING_NAME is set if the kernel is
employing this feature.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Eric W. Biederman <ebiederm@xmission.com>
2019-06-26 21:02:32 +01:00
arch Merge branch 'akpm' (patches from Andrew) 2019-05-19 12:15:32 -07:00
block
certs keys: Add a 'recurse' flag for keyring searches 2019-06-26 21:02:32 +01:00
crypto keys: Add a 'recurse' flag for keyring searches 2019-06-26 21:02:32 +01:00
Documentation keys: Add a 'recurse' flag for keyring searches 2019-06-26 21:02:32 +01:00
drivers Kbuild updates for v5.2 (2nd) 2019-05-19 11:53:58 -07:00
fs This pull request contains the following fixes for UBIFS: 2019-05-19 15:22:03 -07:00
include keys: Namespace keyring names 2019-06-26 21:02:32 +01:00
init initramfs: don't free a non-existent initrd 2019-05-18 15:52:26 -07:00
ipc
kernel keys: Namespace keyring names 2019-06-26 21:02:32 +01:00
lib keys: Add a 'recurse' flag for keyring searches 2019-06-26 21:02:32 +01:00
LICENSES
mm Merge branch 'akpm' (patches from Andrew) 2019-05-19 12:15:32 -07:00
net keys: Add a 'recurse' flag for keyring searches 2019-06-26 21:02:32 +01:00
samples
scripts kconfig: use 'else ifneq' for Makefile to improve readability 2019-05-19 09:34:35 +09:00
security keys: Namespace keyring names 2019-06-26 21:02:32 +01:00
sound
tools Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-19 11:20:22 -07:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Kbuild updates for v5.2 (2nd) 2019-05-19 11:53:58 -07:00
Makefile Linux 5.2-rc1 2019-05-19 15:47:09 -07:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.