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: <20200529042620.747i342nizywycyv@ast-mbp.dhcp.thefacebook.com>
Date:   Thu, 28 May 2020 21:26:20 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     KP Singh <kpsingh@...omium.org>
Cc:     davem@...emloft.net, daniel@...earbox.net, netdev@...r.kernel.org,
        bpf@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH bpf-next 1/3] bpf: Introduce sleepable BPF programs

On Fri, May 29, 2020 at 12:12:27AM +0200, KP Singh wrote:
> > +			if (ret)
> > +				verbose(env, "%s() is not modifiable\n",
> > +					prog->aux->attach_func_name);
> > +		} else if (prog->aux->sleepable && prog->type == BPF_PROG_TYPE_TRACING) {
> > +			/* fentry/fexit progs can be sleepable only if they are
> > +			 * attached to ALLOW_ERROR_INJECTION or security_*() funcs.
> > +			 * LSM progs check that they are attached to bpf_lsm_*() funcs
> > +			 * which are sleepable too.
> 
> I know of one LSM hook which is not sleepable and is executed in an
> RCU callback i.e. task_free. I don't think t's a problem to run under
> SRCU for that (I tried it and it does not cause any issues).
> 
> We can add a blacklisting mechanism later for the sleepable flags or
> just the sleeping helpers (based on some of the work going on to
> whitelist functions for helper usage).

Good catch. *_task_free() are not sleepable. I'll introduce a simple
blacklist for now. Since I'm not adding actual sleeping helpers in this
patch set nothing is broken, but it will give us the base to build stuff on top.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ