* [PATCH RESEND 0/1] keys: Allow access to key_type_lookup @ 2022-02-21 14:44 Douglas Miller 2022-02-21 14:44 ` [PATCH RESEND 1/1] keys: Allow access to key_type_lookup()/key_type_put() within kernel Douglas Miller 0 siblings, 1 reply; 4+ messages in thread From: Douglas Miller @ 2022-02-21 14:44 UTC (permalink / raw) To: keyrings; +Cc: dougmill, gjoyce, dhowells, jarkko Planned changes to block/sed-opal will need to access a Platform Key-Store (PKS) in a platform-independent manner. Linux keyrings were chosen for that. This code will need to use key_type_lookup() to check for existence of the PKS key-type and adapt accordingly. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH RESEND 1/1] keys: Allow access to key_type_lookup()/key_type_put() within kernel. 2022-02-21 14:44 [PATCH RESEND 0/1] keys: Allow access to key_type_lookup Douglas Miller @ 2022-02-21 14:44 ` Douglas Miller 2022-02-21 20:27 ` Jarkko Sakkinen 0 siblings, 1 reply; 4+ messages in thread From: Douglas Miller @ 2022-02-21 14:44 UTC (permalink / raw) To: keyrings; +Cc: dougmill, gjoyce, dhowells, jarkko Signed-off-by: Douglas Miller <dougmill@linux.vnet.ibm.com> --- include/linux/key-type.h | 2 ++ security/keys/key.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/linux/key-type.h b/include/linux/key-type.h index 7d985a1dfe4a..868a6fb368f3 100644 --- a/include/linux/key-type.h +++ b/include/linux/key-type.h @@ -165,6 +165,8 @@ extern struct key_type key_type_keyring; extern int register_key_type(struct key_type *ktype); extern void unregister_key_type(struct key_type *ktype); +extern struct key_type *key_type_lookup(const char *type); +extern void key_type_put(struct key_type *ktype); extern int key_payload_reserve(struct key *key, size_t datalen); extern int key_instantiate_and_link(struct key *key, diff --git a/security/keys/key.c b/security/keys/key.c index c45afdd1dfbb..3091fd6d65a7 100644 --- a/security/keys/key.c +++ b/security/keys/key.c @@ -719,6 +719,7 @@ struct key_type *key_type_lookup(const char *type) found_kernel_type: return ktype; } +EXPORT_SYMBOL(key_type_lookup); void key_set_timeout(struct key *key, unsigned timeout) { @@ -744,6 +745,7 @@ void key_type_put(struct key_type *ktype) { up_read(&key_types_sem); } +EXPORT_SYMBOL(key_type_put); /* * Attempt to update an existing key. -- 2.27.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND 1/1] keys: Allow access to key_type_lookup()/key_type_put() within kernel. 2022-02-21 14:44 ` [PATCH RESEND 1/1] keys: Allow access to key_type_lookup()/key_type_put() within kernel Douglas Miller @ 2022-02-21 20:27 ` Jarkko Sakkinen 2022-02-21 20:28 ` Jarkko Sakkinen 0 siblings, 1 reply; 4+ messages in thread From: Jarkko Sakkinen @ 2022-02-21 20:27 UTC (permalink / raw) To: Douglas Miller; +Cc: keyrings, gjoyce, dhowells On Mon, Feb 21, 2022 at 08:44:24AM -0600, Douglas Miller wrote: > Signed-off-by: Douglas Miller <dougmill@linux.vnet.ibm.com> > --- > include/linux/key-type.h | 2 ++ > security/keys/key.c | 2 ++ > 2 files changed, 4 insertions(+) > > diff --git a/include/linux/key-type.h b/include/linux/key-type.h > index 7d985a1dfe4a..868a6fb368f3 100644 > --- a/include/linux/key-type.h > +++ b/include/linux/key-type.h > @@ -165,6 +165,8 @@ extern struct key_type key_type_keyring; > > extern int register_key_type(struct key_type *ktype); > extern void unregister_key_type(struct key_type *ktype); > +extern struct key_type *key_type_lookup(const char *type); > +extern void key_type_put(struct key_type *ktype); > > extern int key_payload_reserve(struct key *key, size_t datalen); > extern int key_instantiate_and_link(struct key *key, > diff --git a/security/keys/key.c b/security/keys/key.c > index c45afdd1dfbb..3091fd6d65a7 100644 > --- a/security/keys/key.c > +++ b/security/keys/key.c > @@ -719,6 +719,7 @@ struct key_type *key_type_lookup(const char *type) > found_kernel_type: > return ktype; > } > +EXPORT_SYMBOL(key_type_lookup); > > void key_set_timeout(struct key *key, unsigned timeout) > { > @@ -744,6 +745,7 @@ void key_type_put(struct key_type *ktype) > { > up_read(&key_types_sem); > } > +EXPORT_SYMBOL(key_type_put); > > /* > * Attempt to update an existing key. > -- > 2.27.0 > This should be included with the changes that actually require this. BR, Jarkko ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND 1/1] keys: Allow access to key_type_lookup()/key_type_put() within kernel. 2022-02-21 20:27 ` Jarkko Sakkinen @ 2022-02-21 20:28 ` Jarkko Sakkinen 0 siblings, 0 replies; 4+ messages in thread From: Jarkko Sakkinen @ 2022-02-21 20:28 UTC (permalink / raw) To: Douglas Miller; +Cc: keyrings, gjoyce, dhowells On Mon, Feb 21, 2022 at 09:27:57PM +0100, Jarkko Sakkinen wrote: > On Mon, Feb 21, 2022 at 08:44:24AM -0600, Douglas Miller wrote: > > Signed-off-by: Douglas Miller <dougmill@linux.vnet.ibm.com> > > --- > > include/linux/key-type.h | 2 ++ > > security/keys/key.c | 2 ++ > > 2 files changed, 4 insertions(+) > > > > diff --git a/include/linux/key-type.h b/include/linux/key-type.h > > index 7d985a1dfe4a..868a6fb368f3 100644 > > --- a/include/linux/key-type.h > > +++ b/include/linux/key-type.h > > @@ -165,6 +165,8 @@ extern struct key_type key_type_keyring; > > > > extern int register_key_type(struct key_type *ktype); > > extern void unregister_key_type(struct key_type *ktype); > > +extern struct key_type *key_type_lookup(const char *type); > > +extern void key_type_put(struct key_type *ktype); > > > > extern int key_payload_reserve(struct key *key, size_t datalen); > > extern int key_instantiate_and_link(struct key *key, > > diff --git a/security/keys/key.c b/security/keys/key.c > > index c45afdd1dfbb..3091fd6d65a7 100644 > > --- a/security/keys/key.c > > +++ b/security/keys/key.c > > @@ -719,6 +719,7 @@ struct key_type *key_type_lookup(const char *type) > > found_kernel_type: > > return ktype; > > } > > +EXPORT_SYMBOL(key_type_lookup); > > > > void key_set_timeout(struct key *key, unsigned timeout) > > { > > @@ -744,6 +745,7 @@ void key_type_put(struct key_type *ktype) > > { > > up_read(&key_types_sem); > > } > > +EXPORT_SYMBOL(key_type_put); > > > > /* > > * Attempt to update an existing key. > > -- > > 2.27.0 > > > > This should be included with the changes that actually require this. I.e. planned changes do not count. BR, Jarkko ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-21 20:28 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-02-21 14:44 [PATCH RESEND 0/1] keys: Allow access to key_type_lookup Douglas Miller 2022-02-21 14:44 ` [PATCH RESEND 1/1] keys: Allow access to key_type_lookup()/key_type_put() within kernel Douglas Miller 2022-02-21 20:27 ` Jarkko Sakkinen 2022-02-21 20:28 ` Jarkko Sakkinen
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.