lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAADnVQKWJJRs1RDmx-RCSwGVhPJTxCQvPU3U-M79wGm-q_BPFA@mail.gmail.com>
Date:   Wed, 22 Apr 2020 22:26:08 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Stanislav Fomichev <sdf@...gle.com>
Cc:     Network Development <netdev@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>
Subject: Re: [PATCH bpf-next] bpf: enable more helpers for BPF_PROG_TYPE_CGROUP_{DEVICE,SYSCTL,SOCKOPT}

On Mon, Apr 20, 2020 at 10:46 AM Stanislav Fomichev <sdf@...gle.com> wrote:
>
> Currently the following prog types don't fall back to bpf_base_func_proto()
> (instead they have cgroup_base_func_proto which has a limited set of
> helpers from bpf_base_func_proto):
> * BPF_PROG_TYPE_CGROUP_DEVICE
> * BPF_PROG_TYPE_CGROUP_SYSCTL
> * BPF_PROG_TYPE_CGROUP_SOCKOPT
>
> I don't see any specific reason why we shouldn't use bpf_base_func_proto(),
> every other type of program (except bpf-lirc and, understandably, tracing)
> use it, so let's fall back to bpf_base_func_proto for those prog types
> as well.
>
> This basically boils down to adding access to the following helpers:
> * BPF_FUNC_get_prandom_u32
> * BPF_FUNC_get_smp_processor_id
> * BPF_FUNC_get_numa_node_id
> * BPF_FUNC_tail_call
> * BPF_FUNC_ktime_get_ns
> * BPF_FUNC_spin_lock (CAP_SYS_ADMIN)
> * BPF_FUNC_spin_unlock (CAP_SYS_ADMIN)
> * BPF_FUNC_jiffies64 (CAP_SYS_ADMIN)
>
> I've also added bpf_perf_event_output() because it's really handy for
> logging and debugging.
>
> Signed-off-by: Stanislav Fomichev <sdf@...gle.com>

Thanks for the cleanup. Applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ