Re: Issue accessing task_struct from BPF due to 4.16 stack-protector changes

2018-03-02 Thread Kees Cook
On Fri, Mar 2, 2018 at 2:26 PM, Alexei Starovoitov wrote: > On Fri, Mar 02, 2018 at 02:04:17PM -0800, Gianluca Borello wrote: >> On Fri, Mar 2, 2018 at 12:42 PM, Alexei Starovoitov >> wrote: >> > >> > good catch! >> > I wonder why

Re: Issue accessing task_struct from BPF due to 4.16 stack-protector changes

2018-03-02 Thread Alexei Starovoitov
On Fri, Mar 02, 2018 at 02:04:17PM -0800, Gianluca Borello wrote: > On Fri, Mar 2, 2018 at 12:42 PM, Alexei Starovoitov > wrote: > > > > good catch! > > I wonder why sched.h is using this flag insead of relying on #defines from > > autoconf.h > > It could have been

Re: Issue accessing task_struct from BPF due to 4.16 stack-protector changes

2018-03-02 Thread Kees Cook
On Fri, Mar 2, 2018 at 2:04 PM, Gianluca Borello wrote: > On Fri, Mar 2, 2018 at 12:42 PM, Alexei Starovoitov > wrote: >> >> good catch! >> I wonder why sched.h is using this flag insead of relying on #defines from >> autoconf.h >> It could

Re: Issue accessing task_struct from BPF due to 4.16 stack-protector changes

2018-03-02 Thread Gianluca Borello
On Fri, Mar 2, 2018 at 12:42 PM, Alexei Starovoitov wrote: > > good catch! > I wonder why sched.h is using this flag insead of relying on #defines from > autoconf.h > It could have been using CONFIG_HAVE_CC_STACKPROTECTOR > instead of CONFIG_CC_STACKPROTECTOR, no ?

Re: Issue accessing task_struct from BPF due to 4.16 stack-protector changes

2018-03-02 Thread Alexei Starovoitov
On Fri, Mar 02, 2018 at 12:09:57PM -0800, Gianluca Borello wrote: > Hello, > > While testing bpf-next, I noticed that I was reading garbage when > accessing some task_struct members, and the issue seems caused by the > recent commit 2bc2f688fdf8 ("Makefile: move stack-protector > availability out