Re: [PATCH bpf 3/3] bpf: undo prog rejection on read-only lock failure

2018-07-02 Thread Daniel Borkmann
On 07/02/2018 08:48 PM, Kees Cook wrote: > On Fri, Jun 29, 2018 at 4:47 PM, Daniel Borkmann wrote: >> On 06/29/2018 08:42 PM, Kees Cook wrote: >>> On Thu, Jun 28, 2018 at 2:34 PM, Daniel Borkmann >>> wrote: Kees suggested that if set_memory_*() can fail, we should annotate it with

Re: [PATCH bpf 3/3] bpf: undo prog rejection on read-only lock failure

2018-07-02 Thread Kees Cook
On Fri, Jun 29, 2018 at 4:47 PM, Daniel Borkmann wrote: > On 06/29/2018 08:42 PM, Kees Cook wrote: >> On Thu, Jun 28, 2018 at 2:34 PM, Daniel Borkmann >> wrote: >>> Kees suggested that if set_memory_*() can fail, we should annotate it with >>> __must_check, and all callers need to deal with it

Re: [PATCH bpf 3/3] bpf: undo prog rejection on read-only lock failure

2018-06-29 Thread Daniel Borkmann
On 06/29/2018 08:42 PM, Kees Cook wrote: > On Thu, Jun 28, 2018 at 2:34 PM, Daniel Borkmann 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

Re: [PATCH bpf 3/3] bpf: undo prog rejection on read-only lock failure

2018-06-29 Thread Kees Cook
On Thu, Jun 28, 2018 at 2:34 PM, Daniel Borkmann 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

[PATCH bpf 3/3] bpf: undo prog rejection on read-only lock failure

2018-06-28 Thread Daniel Borkmann
Partially undo commit 9facc336876f ("bpf: reject any prog that failed read-only lock") since it caused a regression, that is, syzkaller was able to manage to cause a panic via fault injection deep in set_memory_ro() path by letting an allocation fail: In x86's __change_page_attr_set_clr() it was