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: Thu, 2 May 2024 15:39:59 -0700
From: Kees Cook <keescook@...omium.org>
To: Muhammad Usama Anjum <usama.anjum@...labora.com>
Cc: kernel test robot <oliver.sang@...el.com>,
	Edward Liaw <edliaw@...gle.com>, oe-lkp@...ts.linux.dev,
	lkp@...el.com, linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andy Lutomirski <luto@...capital.net>,
	Axel Rasmussen <axelrasmussen@...gle.com>,
	Bill Wendling <morbo@...gle.com>,
	David Hildenbrand <david@...hat.com>,
	Justin Stitt <justinstitt@...gle.com>,
	"Mike Rapoport (IBM)" <rppt@...nel.org>,
	Nathan Chancellor <nathan@...nel.org>,
	Nick Desaulniers <ndesaulniers@...gle.com>,
	Peter Xu <peterx@...hat.com>, Shuah Khan <shuah@...nel.org>,
	Will Drewry <wad@...omium.org>, linux-kselftest@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [linus:master] [selftests/harness] 8092162335:
 kernel-selftests.sgx.make.fail

On Thu, May 02, 2024 at 11:33:17AM +0500, Muhammad Usama Anjum wrote:
> On 5/2/24 1:32 AM, Kees Cook wrote:
> > On Tue, Apr 30, 2024 at 11:02:36AM +0800, kernel test robot wrote:
> >> version: kernel-selftests-x86_64-c7864053-1_20240419
> >> [...]
> >> compiler: gcc-13
> >> 2024-04-29 15:02:59 make -j16 -C sgx
> >> [...]
> >> gcc -Wall -Werror -static-pie -nostdlib -ffreestanding -fPIE -fno-stack-protector -mrdrnd -I/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/../../../tools/include test_encl.c test_encl_bootstrap.S -o /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/sgx/test_encl.elf -Wl,-T,test_encl.lds,--build-id=none
> >> /usr/bin/ld: warning: /tmp/lkp/cct4g3SV.o: missing .note.GNU-stack section implies executable stack
> >> /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
> >> In file included from main.c:21:
> >> ../kselftest_harness.h: In function ‘__run_test’:
> >> ../kselftest_harness.h:1166:13: error: implicit declaration of function ‘asprintf’; did you mean ‘vsprintf’? [-Werror=implicit-function-declaration]
> >>  1166 |         if (asprintf(&test_name, "%s%s%s.%s", f->name,
> >>       |             ^~~~~~~~
> >>       |             vsprintf
> >> cc1: all warnings being treated as errors
> > 
> > What environment is this being built in? "asprintf" should be available
> > via stdio.h, and "kselftest_harness.h" includes that (and _GNU_SOURCE).
> Sometimes the order of include is as following:
> 
> #inlucde <stdio.h>
> #define _GNU_SOURCE
> #inlucde <stdio.h>

Oh, ew. Yeah, I see what you mean.

> The _GNU_SOURCE wasn't defined the first time stdio.h was included hence
> the definition of asprintf isn't present. The second inclusion of stdio.h
> when _GNU_SOURCE is defined is ignored as it was already included.
> 
> This is being fixed in following series:
> https://lore.kernel.org/all/20240430235057.1351993-1-edliaw@google.com

I'll comment there. Thanks!

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ