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: <a4e752f6-05c8-1fa1-54a4-f68191a617d1@cs.kuleuven.be>
Date:   Mon, 7 Aug 2023 12:03:58 +0200
From:   Jo Van Bulck <jo.vanbulck@...kuleuven.be>
To:     Jarkko Sakkinen <jarkko@...nel.org>, linux-sgx@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     dave.hansen@...ux.intel.com
Subject: Re: [PATCH 5/5] selftests/sgx: Enclave freestanding compilation +
 separate linker options.

On 28.07.23 21:22, Jarkko Sakkinen wrote:
> Should be split into two patches. 

Thanks, will do in the next patch revision.

> Please describe the motivation for the
> second paragraph in the patch, which adds '-ffreestanding'.

Even when passing -nostdlib, the compiler still assumes memset and 
memcpy are present [1].

I found that, when not passing '-ffreestanding', clang seems to optimize 
away the existing memcpy/memset implementations and errors with:

/bin/ld: test_encl.o: in function `do_encl_init_tcs_page':
test_encl.c:(.text+0x17e): undefined reference to `memset'

I will add this information in the next patch revision.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90701

Best,
Jo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ