All of lore.kernel.org
 help / color / mirror / Atom feed
* [linus:master] [selftests/harness]  8092162335: kernel-selftests.sgx.make.fail
@ 2024-04-30  3:02 kernel test robot
  2024-05-01 20:32 ` Kees Cook
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2024-04-30  3:02 UTC (permalink / raw)
  To: Edward Liaw
  Cc: oe-lkp, lkp, linux-kernel, Andrew Morton, Muhammad Usama Anjum,
	Andy Lutomirski, Axel Rasmussen, Bill Wendling,
	David Hildenbrand, Justin Stitt, Kees Cook, Mike Rapoport (IBM),
	Nathan Chancellor, Nick Desaulniers, Peter Xu, Shuah Khan,
	Will Drewry, linux-kselftest, linux-mm, oliver.sang



Hello,

kernel test robot noticed "kernel-selftests.sgx.make.fail" on:

commit: 8092162335554c8ef5e7f50eff68aa9cfbdbf865 ("selftests/harness: remove use of LINE_MAX")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master

[test failed on linus/master 98369dccd2f8e16bf4c6621053af7aa4821dcf8e]
[test failed on linux-next/master b0a2c79c6f3590b74742cbbc76687014d47972d8]

in testcase: kernel-selftests
version: kernel-selftests-x86_64-c7864053-1_20240419
with following parameters:

	group: sgx



compiler: gcc-13
test machine: 16 threads 1 sockets Intel(R) Xeon(R) E-2278G CPU @ 3.40GHz (Coffee Lake) with 32G memory

(please refer to attached dmesg/kmsg for entire log/backtrace)




If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202404301040.3bea5782-oliver.sang@intel.com

KERNEL SELFTESTS: linux_headers_dir is /usr/src/linux-headers-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865
2024-04-29 15:02:59 ln -sf /usr/sbin/iptables-nft /usr/bin/iptables
2024-04-29 15:02:59 ln -sf /usr/sbin/ip6tables-nft /usr/bin/ip6tables
2024-04-29 15:02:59 sed -i s/default_timeout=45/default_timeout=300/ kselftest/runner.sh
2024-04-29 15:02:59 make -j16 -C sgx
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/sgx'
gcc -Wall -Werror -g -I/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/../../../tools/include -fPIC -c main.c -o /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/sgx/main.o
gcc -Wall -Werror -g -I/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/../../../tools/include -fPIC -c load.c -o /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/sgx/load.o
gcc -Wall -Werror -g -I/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/../../../tools/include -fPIC -c sigstruct.c -o /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/sgx/sigstruct.o
gcc -Wall -Werror -g -I/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/../../../tools/include -fPIC -c call.S -o /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/sgx/call.o
gcc -Wall -Werror -g -I/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/../../../tools/include -fPIC -c sign_key.S -o /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/sgx/sign_key.o
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
make: *** [Makefile:36: /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/sgx/main.o] Error 1
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/sgx'
2024-04-29 15:03:00 make quicktest=1 run_tests -C sgx
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/sgx'
gcc -Wall -Werror -g -I/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/../../../tools/include -fPIC -c main.c -o /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/sgx/main.o
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
make: *** [Makefile:36: /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/sgx/main.o] Error 1
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-8092162335554c8ef5e7f50eff68aa9cfbdbf865/tools/testing/selftests/sgx'



The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20240430/202404301040.3bea5782-oliver.sang@intel.com



-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linus:master] [selftests/harness]  8092162335: kernel-selftests.sgx.make.fail
  2024-04-30  3:02 [linus:master] [selftests/harness] 8092162335: kernel-selftests.sgx.make.fail kernel test robot
@ 2024-05-01 20:32 ` Kees Cook
  2024-05-02  6:33   ` Muhammad Usama Anjum
  0 siblings, 1 reply; 4+ messages in thread
From: Kees Cook @ 2024-05-01 20:32 UTC (permalink / raw)
  To: kernel test robot
  Cc: Edward Liaw, oe-lkp, lkp, linux-kernel, Andrew Morton,
	Muhammad Usama Anjum, Andy Lutomirski, Axel Rasmussen,
	Bill Wendling, David Hildenbrand, Justin Stitt,
	Mike Rapoport (IBM),
	Nathan Chancellor, Nick Desaulniers, Peter Xu, Shuah Khan,
	Will Drewry, linux-kselftest, linux-mm

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).

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linus:master] [selftests/harness] 8092162335: kernel-selftests.sgx.make.fail
  2024-05-01 20:32 ` Kees Cook
@ 2024-05-02  6:33   ` Muhammad Usama Anjum
  2024-05-02 22:39     ` Kees Cook
  0 siblings, 1 reply; 4+ messages in thread
From: Muhammad Usama Anjum @ 2024-05-02  6:33 UTC (permalink / raw)
  To: Kees Cook, kernel test robot
  Cc: Muhammad Usama Anjum, Edward Liaw, oe-lkp, lkp, linux-kernel,
	Andrew Morton, Andy Lutomirski, Axel Rasmussen, Bill Wendling,
	David Hildenbrand, Justin Stitt, Mike Rapoport (IBM),
	Nathan Chancellor, Nick Desaulniers, Peter Xu, Shuah Khan,
	Will Drewry, linux-kselftest, linux-mm

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>

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

-- 
BR,
Muhammad Usama Anjum

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linus:master] [selftests/harness] 8092162335: kernel-selftests.sgx.make.fail
  2024-05-02  6:33   ` Muhammad Usama Anjum
@ 2024-05-02 22:39     ` Kees Cook
  0 siblings, 0 replies; 4+ messages in thread
From: Kees Cook @ 2024-05-02 22:39 UTC (permalink / raw)
  To: Muhammad Usama Anjum
  Cc: kernel test robot, Edward Liaw, oe-lkp, lkp, linux-kernel,
	Andrew Morton, Andy Lutomirski, Axel Rasmussen, Bill Wendling,
	David Hildenbrand, Justin Stitt, Mike Rapoport (IBM),
	Nathan Chancellor, Nick Desaulniers, Peter Xu, Shuah Khan,
	Will Drewry, linux-kselftest, linux-mm

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-05-02 22:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-30  3:02 [linus:master] [selftests/harness] 8092162335: kernel-selftests.sgx.make.fail kernel test robot
2024-05-01 20:32 ` Kees Cook
2024-05-02  6:33   ` Muhammad Usama Anjum
2024-05-02 22:39     ` Kees Cook

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.