Home
last modified time | relevance | path

Searched hist:"7743 c48e" (Results 1 – 5 of 5) sorted by relevance

/openbmc/linux/Documentation/security/keys/
H A Drequest-key.rst7743c48e Wed Jun 19 10:10:15 CDT 2019 David Howells <dhowells@redhat.com> keys: Cache result of request_key*() temporarily in task_struct

If a filesystem uses keys to hold authentication tokens, then it needs a
token for each VFS operation that might perform an authentication check -
either by passing it to the server, or using to perform a check based on
authentication data cached locally.

For open files this isn't a problem, since the key should be cached in the
file struct since it represents the subject performing operations on that
file descriptor.

During pathwalk, however, there isn't anywhere to cache the key, except
perhaps in the nameidata struct - but that isn't exposed to the
filesystems. Further, a pathwalk can incur a lot of operations, calling
one or more of the following, for instance:

->lookup()
->permission()
->d_revalidate()
->d_automount()
->get_acl()
->getxattr()

on each dentry/inode it encounters - and each one may need to call
request_key(). And then, at the end of pathwalk, it will call the actual
operation:

->mkdir()
->mknod()
->getattr()
->open()
...

which may need to go and get the token again.

However, it is very likely that all of the operations on a single
dentry/inode - and quite possibly a sequence of them - will all want to use
the same authentication token, which suggests that caching it would be a
good idea.

To this end:

(1) Make it so that a positive result of request_key() and co. that didn't
require upcalling to userspace is cached temporarily in task_struct.

(2) The cache is 1 deep, so a new result displaces the old one.

(3) The key is released by exit and by notify-resume.

(4) The cache is cleared in a newly forked process.

Signed-off-by: David Howells <dhowells@redhat.com>
7743c48e Wed Jun 19 10:10:15 CDT 2019 David Howells <dhowells@redhat.com> keys: Cache result of request_key*() temporarily in task_struct

If a filesystem uses keys to hold authentication tokens, then it needs a
token for each VFS operation that might perform an authentication check -
either by passing it to the server, or using to perform a check based on
authentication data cached locally.

For open files this isn't a problem, since the key should be cached in the
file struct since it represents the subject performing operations on that
file descriptor.

During pathwalk, however, there isn't anywhere to cache the key, except
perhaps in the nameidata struct - but that isn't exposed to the
filesystems. Further, a pathwalk can incur a lot of operations, calling
one or more of the following, for instance:

->lookup()
->permission()
->d_revalidate()
->d_automount()
->get_acl()
->getxattr()

on each dentry/inode it encounters - and each one may need to call
request_key(). And then, at the end of pathwalk, it will call the actual
operation:

->mkdir()
->mknod()
->getattr()
->open()
...

which may need to go and get the token again.

However, it is very likely that all of the operations on a single
dentry/inode - and quite possibly a sequence of them - will all want to use
the same authentication token, which suggests that caching it would be a
good idea.

To this end:

(1) Make it so that a positive result of request_key() and co. that didn't
require upcalling to userspace is cached temporarily in task_struct.

(2) The cache is 1 deep, so a new result displaces the old one.

(3) The key is released by exit and by notify-resume.

(4) The cache is cleared in a newly forked process.

Signed-off-by: David Howells <dhowells@redhat.com>
/openbmc/linux/security/keys/
H A DKconfig7743c48e Wed Jun 19 10:10:15 CDT 2019 David Howells <dhowells@redhat.com> keys: Cache result of request_key*() temporarily in task_struct

If a filesystem uses keys to hold authentication tokens, then it needs a
token for each VFS operation that might perform an authentication check -
either by passing it to the server, or using to perform a check based on
authentication data cached locally.

For open files this isn't a problem, since the key should be cached in the
file struct since it represents the subject performing operations on that
file descriptor.

During pathwalk, however, there isn't anywhere to cache the key, except
perhaps in the nameidata struct - but that isn't exposed to the
filesystems. Further, a pathwalk can incur a lot of operations, calling
one or more of the following, for instance:

->lookup()
->permission()
->d_revalidate()
->d_automount()
->get_acl()
->getxattr()

on each dentry/inode it encounters - and each one may need to call
request_key(). And then, at the end of pathwalk, it will call the actual
operation:

->mkdir()
->mknod()
->getattr()
->open()
...

which may need to go and get the token again.

However, it is very likely that all of the operations on a single
dentry/inode - and quite possibly a sequence of them - will all want to use
the same authentication token, which suggests that caching it would be a
good idea.

To this end:

(1) Make it so that a positive result of request_key() and co. that didn't
require upcalling to userspace is cached temporarily in task_struct.

(2) The cache is 1 deep, so a new result displaces the old one.

(3) The key is released by exit and by notify-resume.

(4) The cache is cleared in a newly forked process.

Signed-off-by: David Howells <dhowells@redhat.com>
7743c48e Wed Jun 19 10:10:15 CDT 2019 David Howells <dhowells@redhat.com> keys: Cache result of request_key*() temporarily in task_struct

If a filesystem uses keys to hold authentication tokens, then it needs a
token for each VFS operation that might perform an authentication check -
either by passing it to the server, or using to perform a check based on
authentication data cached locally.

For open files this isn't a problem, since the key should be cached in the
file struct since it represents the subject performing operations on that
file descriptor.

During pathwalk, however, there isn't anywhere to cache the key, except
perhaps in the nameidata struct - but that isn't exposed to the
filesystems. Further, a pathwalk can incur a lot of operations, calling
one or more of the following, for instance:

->lookup()
->permission()
->d_revalidate()
->d_automount()
->get_acl()
->getxattr()

on each dentry/inode it encounters - and each one may need to call
request_key(). And then, at the end of pathwalk, it will call the actual
operation:

->mkdir()
->mknod()
->getattr()
->open()
...

which may need to go and get the token again.

However, it is very likely that all of the operations on a single
dentry/inode - and quite possibly a sequence of them - will all want to use
the same authentication token, which suggests that caching it would be a
good idea.

To this end:

(1) Make it so that a positive result of request_key() and co. that didn't
require upcalling to userspace is cached temporarily in task_struct.

(2) The cache is 1 deep, so a new result displaces the old one.

(3) The key is released by exit and by notify-resume.

(4) The cache is cleared in a newly forked process.

Signed-off-by: David Howells <dhowells@redhat.com>
H A Drequest_key.c7743c48e Wed Jun 19 10:10:15 CDT 2019 David Howells <dhowells@redhat.com> keys: Cache result of request_key*() temporarily in task_struct

If a filesystem uses keys to hold authentication tokens, then it needs a
token for each VFS operation that might perform an authentication check -
either by passing it to the server, or using to perform a check based on
authentication data cached locally.

For open files this isn't a problem, since the key should be cached in the
file struct since it represents the subject performing operations on that
file descriptor.

During pathwalk, however, there isn't anywhere to cache the key, except
perhaps in the nameidata struct - but that isn't exposed to the
filesystems. Further, a pathwalk can incur a lot of operations, calling
one or more of the following, for instance:

->lookup()
->permission()
->d_revalidate()
->d_automount()
->get_acl()
->getxattr()

on each dentry/inode it encounters - and each one may need to call
request_key(). And then, at the end of pathwalk, it will call the actual
operation:

->mkdir()
->mknod()
->getattr()
->open()
...

which may need to go and get the token again.

However, it is very likely that all of the operations on a single
dentry/inode - and quite possibly a sequence of them - will all want to use
the same authentication token, which suggests that caching it would be a
good idea.

To this end:

(1) Make it so that a positive result of request_key() and co. that didn't
require upcalling to userspace is cached temporarily in task_struct.

(2) The cache is 1 deep, so a new result displaces the old one.

(3) The key is released by exit and by notify-resume.

(4) The cache is cleared in a newly forked process.

Signed-off-by: David Howells <dhowells@redhat.com>
7743c48e Wed Jun 19 10:10:15 CDT 2019 David Howells <dhowells@redhat.com> keys: Cache result of request_key*() temporarily in task_struct

If a filesystem uses keys to hold authentication tokens, then it needs a
token for each VFS operation that might perform an authentication check -
either by passing it to the server, or using to perform a check based on
authentication data cached locally.

For open files this isn't a problem, since the key should be cached in the
file struct since it represents the subject performing operations on that
file descriptor.

During pathwalk, however, there isn't anywhere to cache the key, except
perhaps in the nameidata struct - but that isn't exposed to the
filesystems. Further, a pathwalk can incur a lot of operations, calling
one or more of the following, for instance:

->lookup()
->permission()
->d_revalidate()
->d_automount()
->get_acl()
->getxattr()

on each dentry/inode it encounters - and each one may need to call
request_key(). And then, at the end of pathwalk, it will call the actual
operation:

->mkdir()
->mknod()
->getattr()
->open()
...

which may need to go and get the token again.

However, it is very likely that all of the operations on a single
dentry/inode - and quite possibly a sequence of them - will all want to use
the same authentication token, which suggests that caching it would be a
good idea.

To this end:

(1) Make it so that a positive result of request_key() and co. that didn't
require upcalling to userspace is cached temporarily in task_struct.

(2) The cache is 1 deep, so a new result displaces the old one.

(3) The key is released by exit and by notify-resume.

(4) The cache is cleared in a newly forked process.

Signed-off-by: David Howells <dhowells@redhat.com>
/openbmc/linux/kernel/
H A Dcred.c7743c48e Wed Jun 19 10:10:15 CDT 2019 David Howells <dhowells@redhat.com> keys: Cache result of request_key*() temporarily in task_struct

If a filesystem uses keys to hold authentication tokens, then it needs a
token for each VFS operation that might perform an authentication check -
either by passing it to the server, or using to perform a check based on
authentication data cached locally.

For open files this isn't a problem, since the key should be cached in the
file struct since it represents the subject performing operations on that
file descriptor.

During pathwalk, however, there isn't anywhere to cache the key, except
perhaps in the nameidata struct - but that isn't exposed to the
filesystems. Further, a pathwalk can incur a lot of operations, calling
one or more of the following, for instance:

->lookup()
->permission()
->d_revalidate()
->d_automount()
->get_acl()
->getxattr()

on each dentry/inode it encounters - and each one may need to call
request_key(). And then, at the end of pathwalk, it will call the actual
operation:

->mkdir()
->mknod()
->getattr()
->open()
...

which may need to go and get the token again.

However, it is very likely that all of the operations on a single
dentry/inode - and quite possibly a sequence of them - will all want to use
the same authentication token, which suggests that caching it would be a
good idea.

To this end:

(1) Make it so that a positive result of request_key() and co. that didn't
require upcalling to userspace is cached temporarily in task_struct.

(2) The cache is 1 deep, so a new result displaces the old one.

(3) The key is released by exit and by notify-resume.

(4) The cache is cleared in a newly forked process.

Signed-off-by: David Howells <dhowells@redhat.com>
7743c48e Wed Jun 19 10:10:15 CDT 2019 David Howells <dhowells@redhat.com> keys: Cache result of request_key*() temporarily in task_struct

If a filesystem uses keys to hold authentication tokens, then it needs a
token for each VFS operation that might perform an authentication check -
either by passing it to the server, or using to perform a check based on
authentication data cached locally.

For open files this isn't a problem, since the key should be cached in the
file struct since it represents the subject performing operations on that
file descriptor.

During pathwalk, however, there isn't anywhere to cache the key, except
perhaps in the nameidata struct - but that isn't exposed to the
filesystems. Further, a pathwalk can incur a lot of operations, calling
one or more of the following, for instance:

->lookup()
->permission()
->d_revalidate()
->d_automount()
->get_acl()
->getxattr()

on each dentry/inode it encounters - and each one may need to call
request_key(). And then, at the end of pathwalk, it will call the actual
operation:

->mkdir()
->mknod()
->getattr()
->open()
...

which may need to go and get the token again.

However, it is very likely that all of the operations on a single
dentry/inode - and quite possibly a sequence of them - will all want to use
the same authentication token, which suggests that caching it would be a
good idea.

To this end:

(1) Make it so that a positive result of request_key() and co. that didn't
require upcalling to userspace is cached temporarily in task_struct.

(2) The cache is 1 deep, so a new result displaces the old one.

(3) The key is released by exit and by notify-resume.

(4) The cache is cleared in a newly forked process.

Signed-off-by: David Howells <dhowells@redhat.com>
/openbmc/linux/include/linux/
H A Dsched.h7743c48e Wed Jun 19 10:10:15 CDT 2019 David Howells <dhowells@redhat.com> keys: Cache result of request_key*() temporarily in task_struct

If a filesystem uses keys to hold authentication tokens, then it needs a
token for each VFS operation that might perform an authentication check -
either by passing it to the server, or using to perform a check based on
authentication data cached locally.

For open files this isn't a problem, since the key should be cached in the
file struct since it represents the subject performing operations on that
file descriptor.

During pathwalk, however, there isn't anywhere to cache the key, except
perhaps in the nameidata struct - but that isn't exposed to the
filesystems. Further, a pathwalk can incur a lot of operations, calling
one or more of the following, for instance:

->lookup()
->permission()
->d_revalidate()
->d_automount()
->get_acl()
->getxattr()

on each dentry/inode it encounters - and each one may need to call
request_key(). And then, at the end of pathwalk, it will call the actual
operation:

->mkdir()
->mknod()
->getattr()
->open()
...

which may need to go and get the token again.

However, it is very likely that all of the operations on a single
dentry/inode - and quite possibly a sequence of them - will all want to use
the same authentication token, which suggests that caching it would be a
good idea.

To this end:

(1) Make it so that a positive result of request_key() and co. that didn't
require upcalling to userspace is cached temporarily in task_struct.

(2) The cache is 1 deep, so a new result displaces the old one.

(3) The key is released by exit and by notify-resume.

(4) The cache is cleared in a newly forked process.

Signed-off-by: David Howells <dhowells@redhat.com>
7743c48e Wed Jun 19 10:10:15 CDT 2019 David Howells <dhowells@redhat.com> keys: Cache result of request_key*() temporarily in task_struct

If a filesystem uses keys to hold authentication tokens, then it needs a
token for each VFS operation that might perform an authentication check -
either by passing it to the server, or using to perform a check based on
authentication data cached locally.

For open files this isn't a problem, since the key should be cached in the
file struct since it represents the subject performing operations on that
file descriptor.

During pathwalk, however, there isn't anywhere to cache the key, except
perhaps in the nameidata struct - but that isn't exposed to the
filesystems. Further, a pathwalk can incur a lot of operations, calling
one or more of the following, for instance:

->lookup()
->permission()
->d_revalidate()
->d_automount()
->get_acl()
->getxattr()

on each dentry/inode it encounters - and each one may need to call
request_key(). And then, at the end of pathwalk, it will call the actual
operation:

->mkdir()
->mknod()
->getattr()
->open()
...

which may need to go and get the token again.

However, it is very likely that all of the operations on a single
dentry/inode - and quite possibly a sequence of them - will all want to use
the same authentication token, which suggests that caching it would be a
good idea.

To this end:

(1) Make it so that a positive result of request_key() and co. that didn't
require upcalling to userspace is cached temporarily in task_struct.

(2) The cache is 1 deep, so a new result displaces the old one.

(3) The key is released by exit and by notify-resume.

(4) The cache is cleared in a newly forked process.

Signed-off-by: David Howells <dhowells@redhat.com>