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] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 28 Apr 2018 08:03:19 -0700
From:   Alexei Starovoitov <ast@...com>
To:     Teng Qin <qinteng@...com>, <netdev@...r.kernel.org>
CC:     <ast@...nel.org>, <daniel@...earbox.net>, <yhs@...com>,
        <kernel-team@...com>
Subject: Re: [PATCH bpf-next] bpf: Allow bpf_current_task_under_cgroup in
 interrupt

On 4/28/18 12:32 AM, Teng Qin wrote:
> Currently, the bpf_current_task_under_cgroup helper has a check where if
> the BPF program is running in_interrupt(), it will return -EINVAL. This
> prevents the helper to be used in many useful scenarios, particularly
> BPF programs attached to Perf Events.
>
> This commit removes the check. Tested a few NMI (Perf Event) and some
> softirq context, the helper returns the correct result.
> ---
>  kernel/trace/bpf_trace.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
> index 56ba0f2..f94890c 100644
> --- a/kernel/trace/bpf_trace.c
> +++ b/kernel/trace/bpf_trace.c
> @@ -474,8 +474,6 @@ BPF_CALL_2(bpf_current_task_under_cgroup, struct bpf_map *, map, u32, idx)
>  	struct bpf_array *array = container_of(map, struct bpf_array, map);
>  	struct cgroup *cgrp;
>
> -	if (unlikely(in_interrupt()))
> -		return -EINVAL;
>  	if (unlikely(idx >= array->map.max_entries))
>  		return -E2BIG;
>

looks good, but SOB is missing. Please respin.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ