![]() |
|
Message-ID: <c332da87-a770-8cf9-c252-5fb64c06c17e@iogearbox.net> Date: Tue, 31 Mar 2020 00:41:04 +0200 From: Daniel Borkmann <daniel@...earbox.net> To: Kees Cook <keescook@...omium.org>, Jann Horn <jannh@...gle.com> Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>, bpf <bpf@...r.kernel.org>, Kernel Hardening <kernel-hardening@...ts.openwall.com> Subject: Re: CONFIG_DEBUG_INFO_BTF and CONFIG_GCC_PLUGIN_RANDSTRUCT On 3/30/20 7:20 PM, Kees Cook wrote: > On Mon, Mar 30, 2020 at 06:17:32PM +0200, Jann Horn wrote: >> On Mon, Mar 30, 2020 at 5:59 PM Alexei Starovoitov >> <alexei.starovoitov@...il.com> wrote: >>> On Mon, Mar 30, 2020 at 8:14 AM Jann Horn <jannh@...gle.com> wrote: >>>> >>>> I noticed that CONFIG_DEBUG_INFO_BTF seems to partly defeat the point >>>> of CONFIG_GCC_PLUGIN_RANDSTRUCT. >>> >>> Is it a theoretical stmt or you have data? >>> I think it's the other way around. >>> gcc-plugin breaks dwarf and breaks btf. >>> But I only looked at gcc patches without applying them. >> >> Ah, interesting - I haven't actually tested it, I just assumed >> (perhaps incorrectly) that the GCC plugin would deal with DWARF info >> properly. > > Yeah, GCC appears to create DWARF before the plugin does the > randomization[1], so it's not an exposure, but yes, struct randomization > is pretty completely incompatible with a bunch of things in the kernel > (by design). I'm happy to add negative "depends" in the Kconfig if it > helps clarify anything. Is this expected to get fixed at some point wrt DWARF? Perhaps would make sense then to add a negative "depends" for both DWARF and BTF if the option GCC_PLUGIN_RANDSTRUCT is set given both would be incompatible/broken. Thanks, Daniel > -Kees > > [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84052 >
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.