[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXu5j+SAurTmBVgtABjOBmbHUczjWbV=DwmTc9xQseTthVwtw@mail.gmail.com>
Date: Fri, 29 Jun 2018 11:42:11 -0700
From: Kees Cook <keescook@...omium.org>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: Alexei Starovoitov <ast@...nel.org>,
Network Development <netdev@...r.kernel.org>,
Laura Abbott <labbott@...hat.com>
Subject: Re: [PATCH bpf 3/3] bpf: undo prog rejection on read-only lock failure
On Thu, Jun 28, 2018 at 2:34 PM, Daniel Borkmann <daniel@...earbox.net> wrote:
> Kees suggested that if set_memory_*() can fail, we should annotate it with
> __must_check, and all callers need to deal with it gracefully given those
> set_memory_*() markings aren't "advisory", but they're expected to actually
> do what they say. This might be an option worth to move forward in future
> but would at the same time require that set_memory_*() calls from supporting
> archs are guaranteed to be "atomic" in that they provide rollback if part
> of the range fails, once that happened, the transition from RW -> RO could
> be made more robust that way, while subsequent RO -> RW transition /must/
> continue guaranteeing to always succeed the undo part.
Does this mean we can have BPF filters that aren't read-only then?
What's the situation where set_memory_ro() fails? (Can it be induced
by the user?)
-Kees
--
Kees Cook
Pixel Security
Powered by blists - more mailing lists