From: Jarkko Sakkinen <jarkko@kernel.org>
To: Heiko Carstens <hca@linux.ibm.com>
Cc: Anastasia Eskova <anastasia.eskova@ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Peter Oberparleiter <oberpar@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
keyrings@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [PATCH 1/2] s390/cert_store: Allocate keyring with link restriction
Date: Mon, 23 Nov 2026 16:20:41 +0200 [thread overview]
Message-ID: <awRLuXqtUwPGAe_q@kernel.org> (raw)
In-Reply-To: <awRLI3Gg2auBPkhr@kernel.org>
On Mon, Nov 23, 2026 at 04:18:15PM +0200, Jarkko Sakkinen wrote:
> On Mon, Nov 23, 2026 at 03:11:00PM +0100, Heiko Carstens wrote:
> > On Mon, Nov 23, 2026 at 03:42:13PM +0200, Jarkko Sakkinen wrote:
> > > On Mon, Nov 23, 2026 at 11:23:23AM +0100, Heiko Carstens wrote:
> > > > From: Anastasia Eskova <anastasia.eskova@ibm.com>
> > > >
> > > > The keyring is linked into the user session keyring on allocation, but
> > > > keyring_restrict() is only called after all certificates were added.
> > > > Until then a possessor of the keyring can link arbitrary keys into it.
> > > > If keyring_restrict() fails, the error is only logged and the keyring
> > > > stays writable.
> > > >
> > > > Allocate the keyring with a restriction which rejects all links, create
> > > > the certificate keys with KEY_ALLOC_BYPASS_RESTRICTION and drop the late
> > > > keyring_restrict() call.
> > > >
> > > > Fixes: 8cf57d7217c3 ("s390: add support for user-defined certificates")
> > > > Signed-off-by: Anastasia Eskova <anastasia.eskova@ibm.com>
> > > > Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
> > >
> > > I think it is best for overall good that earliest possible release
> > > for my intersecting changes is v4.7. I think that it is good to
> >
> > I guess you meant to write 7.4?
>
> Yes, 7.4 :-)
I'll open code this fully.
My plan for keyrings is:
1. v7.5: assoc_array to rhashtable migration.
2. v7.6: make keys to bind key type's LKM.
This went all wrong but anyway. Both are architectural overturns so I
think it is better to stage them like this.
Br, Jarkko
next prev parent reply other threads:[~2026-11-23 14:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 10:23 [PATCH 0/2] s390/cert_store: Restrict link creation and key type creation Heiko Carstens
2026-11-23 10:23 ` [PATCH 1/2] s390/cert_store: Allocate keyring with link restriction Heiko Carstens
2026-11-23 13:42 ` Jarkko Sakkinen
2026-11-23 14:11 ` Heiko Carstens
2026-11-23 14:18 ` Jarkko Sakkinen
2026-11-23 14:20 ` Jarkko Sakkinen [this message]
2026-11-23 10:23 ` [PATCH 2/2] s390/cert_store: Only allow the kernel to create cert_store_key keys Heiko Carstens
2026-11-23 13:43 ` Jarkko Sakkinen
2026-11-23 10:31 ` [PATCH 0/2] s390/cert_store: Restrict link creation and key type creation sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=awRLuXqtUwPGAe_q@kernel.org \
--to=jarkko@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=anastasia.eskova@ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=keyrings@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=oberpar@linux.ibm.com \
--cc=svens@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox