From: Xu Kuohai <xukuohai@huaweicloud.com>
To: Roberto Sassu <roberto.sassu@huaweicloud.com>,
Stanislav Fomichev <sdf@google.com>,
Xu Kuohai <xukuohai@huaweicloud.com>
Cc: bpf@vger.kernel.org, linux-security-module@vger.kernel.org,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>,
Florent Revest <revest@chromium.org>,
Brendan Jackman <jackmanb@chromium.org>,
Paul Moore <paul@paul-moore.com>,
James Morris <jmorris@namei.org>,
"Serge E . Hallyn" <serge@hallyn.com>,
Khadija Kamran <kamrankhadijadj@gmail.com>,
Casey Schaufler <casey@schaufler-ca.com>,
Ondrej Mosnacek <omosnace@redhat.com>,
Kees Cook <keescook@chromium.org>,
John Johansen <john.johansen@canonical.com>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>,
Roberto Sassu <roberto.sassu@huawei.com>,
Shung-Hsi Yu <shung-hsi.yu@suse.com>
Subject: Re: [PATCH bpf-next 0/5] Fix kernel panic caused by bpf lsm return value
Date: Tue, 19 Mar 2024 15:54:56 +0800 [thread overview]
Message-ID: <1b9f6fe2-0876-48de-95a5-f15e5b5e9e75@huaweicloud.com> (raw)
In-Reply-To: <2b49cd00bb85b7310db12014eea16c72d8a9351c.camel@huaweicloud.com>
On 3/19/2024 1:02 AM, Roberto Sassu wrote:
> On Mon, 2024-03-18 at 09:52 -0700, Stanislav Fomichev wrote:
>> On 03/16, Xu Kuohai wrote:
>>> From: Xu Kuohai <xukuohai@huawei.com>
>>>
>>> A bpf prog returning positive number attached to file_alloc_security hook
>>> will make kernel panic.
>>
>> I'll leave it up to KP. I remember there was a similar patch series in
>> the past, but I have no state on why it was not accepted..
>
> Yes, this one:
>
> v1: https://lore.kernel.org/bpf/20221115175652.3836811-1-roberto.sassu@huaweicloud.com/
> v2: https://lore.kernel.org/bpf/20221207172434.435893-1-roberto.sassu@huaweicloud.com/
>
Hmm, these two series do address the same problem. Now I'm pretty
sure I read your series last year, at least some of the patches,
but I didn't think of it when I ran into this panic issue last
week. Maybe it's because I does not fully understand it.
> The selftests were failing, and I wasn't able to come up with a
> solution on the verifier side. I see patch 5 goes in that direction,
> and I remember there was related work in this area.
>
> (just saw Paul's answer, maybe the new KP's patch set also solves this)
>
> Roberto
>
>
prev parent reply other threads:[~2024-03-19 7:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-16 12:23 [PATCH bpf-next 0/5] Fix kernel panic caused by bpf lsm return value Xu Kuohai
2024-03-16 12:23 ` [PATCH bpf-next 1/5] bpf, lsm: Annotate lsm hook return integer with new macro LSM_RET_INT Xu Kuohai
2024-03-16 12:23 ` [PATCH bpf-next 2/5] bpf, lsm: Add return value range description for lsm hook Xu Kuohai
2024-03-16 12:23 ` [PATCH bpf-next 3/5] bpf, lsm: Add function to read lsm hook return value range Xu Kuohai
2024-03-16 12:23 ` [PATCH bpf-next 4/5] bpf, lsm: Check bpf lsm hook return values in verifier Xu Kuohai
2024-03-16 12:23 ` [PATCH bpf-next 5/5] bpf: Fix compare error in function retval_range_within Xu Kuohai
2024-03-18 16:52 ` [PATCH bpf-next 0/5] Fix kernel panic caused by bpf lsm return value Stanislav Fomichev
2024-03-18 16:58 ` Paul Moore
2024-03-19 7:37 ` Xu Kuohai
2024-03-18 17:02 ` Roberto Sassu
2024-03-19 7:54 ` Xu Kuohai [this message]
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=1b9f6fe2-0876-48de-95a5-f15e5b5e9e75@huaweicloud.com \
--to=xukuohai@huaweicloud.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=casey@schaufler-ca.com \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=jackmanb@chromium.org \
--cc=jmorris@namei.org \
--cc=john.fastabend@gmail.com \
--cc=john.johansen@canonical.com \
--cc=jolsa@kernel.org \
--cc=kamrankhadijadj@gmail.com \
--cc=keescook@chromium.org \
--cc=kpsingh@kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=martin.lau@linux.dev \
--cc=omosnace@redhat.com \
--cc=paul@paul-moore.com \
--cc=revest@chromium.org \
--cc=roberto.sassu@huawei.com \
--cc=roberto.sassu@huaweicloud.com \
--cc=sdf@google.com \
--cc=serge@hallyn.com \
--cc=shung-hsi.yu@suse.com \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).