From: Roberto Sassu <roberto.sassu@huawei.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: "ast@kernel.org" <ast@kernel.org>,
"daniel@iogearbox.net" <daniel@iogearbox.net>,
"andrii@kernel.org" <andrii@kernel.org>,
"kpsingh@kernel.org" <kpsingh@kernel.org>,
"john.fastabend@gmail.com" <john.fastabend@gmail.com>,
"songliubraving@fb.com" <songliubraving@fb.com>,
"kafai@fb.com" <kafai@fb.com>, "yhs@fb.com" <yhs@fb.com>,
"dhowells@redhat.com" <dhowells@redhat.com>,
"keyrings@vger.kernel.org" <keyrings@vger.kernel.org>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v5 5/5] selftests/bpf: Add test for bpf_verify_pkcs7_signature() helper
Date: Wed, 22 Jun 2022 07:06:12 +0000 [thread overview]
Message-ID: <76c319d5ad1e4ac69ae5d3f71e9d62f7@huawei.com> (raw)
In-Reply-To: <20220621223135.puwe3m55yznaevm5@macbook-pro-3.dhcp.thefacebook.com>
> From: Alexei Starovoitov [mailto:alexei.starovoitov@gmail.com]
> Sent: Wednesday, June 22, 2022 12:32 AM
> On Tue, Jun 21, 2022 at 06:37:57PM +0200, Roberto Sassu wrote:
> > + if (child_pid == 0) {
> > + snprintf(path, sizeof(path), "%s/signing_key.pem", tmp_dir);
> > +
> > + return execlp("./sign-file", "./sign-file", "-d", "sha256",
> > + path, path, data_template, NULL);
>
> Did you miss my earlier reply requesting not to do this module_signature append
> and use signature directly?
I didn't miss. sign-file is producing the raw PKCS#7 signature here (-d).
I'm doing something slightly different, to test the keyring ID part.
I'm retrieving an existing kernel module (actually this does not work
in the CI), parsing it to extract the raw signature, and passing it to the
eBPF program for verification.
Since the kernel module is signed with a key in the built-in keyring,
passing 1 or 0 as ID should work.
Roberto
(sorry, I have to keep the email signature by German law)
HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063
Managing Director: Li Peng, Yang Xi, Li He
next prev parent reply other threads:[~2022-06-22 7:06 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 16:37 [PATCH v5 0/5] bpf: Add bpf_verify_pkcs7_signature() helper Roberto Sassu
2022-06-21 16:37 ` [PATCH v5 1/5] bpf: Export bpf_dynptr_get_size() Roberto Sassu
2022-06-21 16:37 ` [PATCH v5 2/5] bpf: Add bpf_lookup_user_key() and bpf_key_put() helpers Roberto Sassu
2022-06-21 22:32 ` Alexei Starovoitov
2022-06-22 7:12 ` Roberto Sassu
2022-06-23 12:36 ` Roberto Sassu
2022-06-23 20:54 ` Alexei Starovoitov
2022-06-24 15:32 ` Roberto Sassu
2022-06-24 16:50 ` Alexei Starovoitov
2022-06-24 17:38 ` Roberto Sassu
2022-06-24 15:59 ` Roberto Sassu
2022-06-21 16:37 ` [PATCH v5 3/5] bpf: Add bpf_verify_pkcs7_signature() helper Roberto Sassu
2022-06-21 22:27 ` John Fastabend
2022-06-22 9:54 ` Roberto Sassu
2022-06-23 1:27 ` John Fastabend
2022-06-21 16:37 ` [PATCH v5 4/5] selftests/bpf: Add test for unreleased key references Roberto Sassu
2022-06-21 22:35 ` John Fastabend
2022-06-22 7:14 ` Roberto Sassu
2022-06-21 16:37 ` [PATCH v5 5/5] selftests/bpf: Add test for bpf_verify_pkcs7_signature() helper Roberto Sassu
2022-06-21 22:31 ` Alexei Starovoitov
2022-06-22 7:06 ` Roberto Sassu [this message]
2022-06-22 18:16 ` Alexei Starovoitov
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=76c319d5ad1e4ac69ae5d3f71e9d62f7@huawei.com \
--to=roberto.sassu@huawei.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=dhowells@redhat.com \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=keyrings@vger.kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.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