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] [day] [month] [year] [list]
Date:   Mon, 21 Aug 2023 15:24:16 +0200
From:   Jo Van Bulck <jo.vanbulck@...kuleuven.be>
To:     "Huang, Kai" <kai.huang@...el.com>,
        "linux-sgx@...r.kernel.org" <linux-sgx@...r.kernel.org>,
        "jarkko@...nel.org" <jarkko@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc:     "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH 2/5] selftests/sgx: Fix function pointer relocation in
 test enclave.

On 21.08.23 13:04, Huang, Kai wrote:
> Thanks.  You mentioned this was generated by "-static -fPIC -Os" but I think
> using "-static-pie -fPIE -Os" would probably generate the same.

Thanks, yes, I can confirm that the same code is generated with 
-static-pie -FPIE.

> Right.  Even for "-static-pie" it's still possible to generate "rela.dyn" for
> those have to use absolute addressing.

Indeed.

>> Thus, my earlier comment says that we can safely ignore these
>> apparent/false TCS "relocations".
> 
> Yeah.  I guess that's why the test_encl.elf must be built starting from address
> 0.

True (for the ELF in the linker script, but we still need the runtime 
relocations for the function-pointer table when loading the enclave at a 
non-zero base address).

> Yeah I guess we should just use "-fPIE".

Agreed.

Best,
Jo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ