netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Daniel Borkmann <daniel@iogearbox.net>,
	davem@davemloft.net, Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next 2/3] net: sysctl: No need to check CAP_SYS_ADMIN for bpf_jit_*
Date: Tue, 10 May 2022 10:42:21 +0800	[thread overview]
Message-ID: <586ea9a2-0c81-97f8-72f4-260e0fcabaff@loongson.cn> (raw)
In-Reply-To: <9b5fadfb-7d43-7341-deeb-756885042a25@iogearbox.net>



On 05/09/2022 11:02 PM, Daniel Borkmann wrote:
> On 5/9/22 8:57 AM, Tiezhu Yang wrote:
>> The mode of the following procnames are defined as 0644, 0600, 0600
>> and 0600 respectively in net_core_table[], normal user can not write
>> them, so no need to check CAP_SYS_ADMIN in the related proc_handler
>> function, just remove the checks.
>>
>> /proc/sys/net/core/bpf_jit_enable
>> /proc/sys/net/core/bpf_jit_harden
>> /proc/sys/net/core/bpf_jit_kallsyms
>> /proc/sys/net/core/bpf_jit_limit
>>
>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
>
> I don't think we can make this assumption - there are various other
> (non-BPF)
> sysctl handlers in the tree doing similar check to prevent from userns'
> based
> CAP_SYS_ADMIN.
>

OK, thank you for your reply, let me drop this patch now,
I will send v2 (patch #1 and #3) later.

Thanks,
Tiezhu


  reply	other threads:[~2022-05-10  2:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09  6:57 [PATCH bpf-next 0/3] Modify some code in sysctl_net_core.c Tiezhu Yang
2022-05-09  6:57 ` [PATCH bpf-next 1/3] net: sysctl: Use SYSCTL_TWO instead of &two Tiezhu Yang
2022-05-09  6:57 ` [PATCH bpf-next 2/3] net: sysctl: No need to check CAP_SYS_ADMIN for bpf_jit_* Tiezhu Yang
2022-05-09 15:02   ` Daniel Borkmann
2022-05-10  2:42     ` Tiezhu Yang [this message]
2022-05-09  6:57 ` [PATCH bpf-next 3/3] bpf: Print some info if disable bpf_jit_enable failed Tiezhu Yang

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=586ea9a2-0c81-97f8-72f4-260e0fcabaff@loongson.cn \
    --to=yangtiezhu@loongson.cn \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).