Re: [PATCH 2/5] KEYS: user_defined: sanitize key payloads

2017-04-24 Thread David Howells
Eric Biggers wrote: > > Add kzfree_rcu()? > > > > David > > We could, but it's not trivial because the way kfree_rcu() works is to store > the offset of the rcu_head as the callback function, then have a special > case in RCU reclaim that recognizes "function pointers"

Re: [PATCH 2/5] KEYS: user_defined: sanitize key payloads

2017-04-24 Thread David Howells
Eric Biggers wrote: > > Add kzfree_rcu()? > > > > David > > We could, but it's not trivial because the way kfree_rcu() works is to store > the offset of the rcu_head as the callback function, then have a special > case in RCU reclaim that recognizes "function pointers" with value < 4096 > and

Re: [PATCH 2/5] KEYS: user_defined: sanitize key payloads

2017-04-21 Thread Eric Biggers
On Fri, Apr 21, 2017 at 02:57:17PM +0100, David Howells wrote: > Eric Biggers wrote: > > > - kfree_rcu(zap, rcu); > > + call_rcu(>rcu, user_free_payload_rcu); > > Add kzfree_rcu()? > > David We could, but it's not trivial because the way kfree_rcu()

Re: [PATCH 2/5] KEYS: user_defined: sanitize key payloads

2017-04-21 Thread Eric Biggers
On Fri, Apr 21, 2017 at 02:57:17PM +0100, David Howells wrote: > Eric Biggers wrote: > > > - kfree_rcu(zap, rcu); > > + call_rcu(>rcu, user_free_payload_rcu); > > Add kzfree_rcu()? > > David We could, but it's not trivial because the way kfree_rcu() works is to store the

Re: [PATCH 2/5] KEYS: user_defined: sanitize key payloads

2017-04-21 Thread David Howells
Eric Biggers wrote: > - kfree_rcu(zap, rcu); > + call_rcu(>rcu, user_free_payload_rcu); Add kzfree_rcu()? David

Re: [PATCH 2/5] KEYS: user_defined: sanitize key payloads

2017-04-21 Thread David Howells
Eric Biggers wrote: > - kfree_rcu(zap, rcu); > + call_rcu(>rcu, user_free_payload_rcu); Add kzfree_rcu()? David

[PATCH 2/5] KEYS: user_defined: sanitize key payloads

2017-04-21 Thread Eric Biggers
From: Eric Biggers Zero the payloads of user and logon keys before freeing them. This prevents sensitive key material from being kept around in the slab caches after a key is released. Signed-off-by: Eric Biggers --- security/keys/user_defined.c | 16

[PATCH 2/5] KEYS: user_defined: sanitize key payloads

2017-04-21 Thread Eric Biggers
From: Eric Biggers Zero the payloads of user and logon keys before freeing them. This prevents sensitive key material from being kept around in the slab caches after a key is released. Signed-off-by: Eric Biggers --- security/keys/user_defined.c | 16 1 file changed, 12