On Fri, Mar 02, 2018 at 02:04:17PM -0800, Gianluca Borello wrote: > On Fri, Mar 2, 2018 at 12:42 PM, Alexei Starovoitov > <alexei.starovoi...@gmail.com> 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 ? > > > > Thanks for your reply Alexei. I think switching to > HAVE_CC_STACKPROTECTOR could indeed solve this particular BPF issue in > a cleaner way (I tested it), at the cost of having that struct member > always present for the supported architectures even if the stack > protector is actually disabled (e.g. CONFIG_CC_STACKPROTECTOR_NONE=y).
if defined(HAVE_CC_STACKPROTECTOR) && !defined(CONFIG_CC_STACKPROTECTOR_NONE) or def(have_cc) && (def(cc_stack_regular) || def(cc_stack_strong) || def(cc_stack_auto)) let's fix it properly instead of adding more hacks to Makefiles