lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <df92faa5-ca2b-a623-e074-e14b7345f8e5@fb.com>
Date:   Tue, 7 Nov 2017 17:08:41 +0900
From:   Alexei Starovoitov <ast@...com>
To:     "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
        <netdev@...r.kernel.org>,
        Sandipan Das <sandipan@...ux.vnet.ibm.com>
CC:     Brendan Gregg <brendan.d.gregg@...il.com>, <daniel@...earbox.net>,
        Martin KaFai Lau <kafai@...com>,
        Kees Cook <keescook@...omium.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] bpf: Add helpers to read useful task_struct members

On 11/7/17 12:55 AM, Naveen N. Rao wrote:
>> I thought such struct shouldn't change layout.
>> If it is we need to fix include/linux/compiler-clang.h to do that
>> anon struct as well.
>
> We considered that, but it looked to be very dependent on the version of
> gcc used to build the kernel. But, this may be a simpler approach for
> the shorter term.
>

why it would depend on version of gcc?
We just need this, no?

diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h
index de179993e039..4e29ab6187cb 100644
--- a/include/linux/compiler-clang.h
+++ b/include/linux/compiler-clang.h
@@ -15,3 +15,6 @@
   * with any version that can compile the kernel
   */
  #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), 
__COUNTER__)
+
+#define randomized_struct_fields_start struct {
+#define randomized_struct_fields_end   };

since offsets are mandated by C standard.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ