From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964909AbdKGKNa (ORCPT ); Tue, 7 Nov 2017 05:13:30 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:55726 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964791AbdKGKN0 (ORCPT ); Tue, 7 Nov 2017 05:13:26 -0500 X-Google-Smtp-Source: ABhQp+TRvNoMajKazsfg1+NsSBHVHceZfHOTWRONdkvwUbhHg3hlO+ZtM0SNUNWU9m2K+WJmu2Fabg== Date: Tue, 7 Nov 2017 11:13:22 +0100 From: Ingo Molnar To: Andy Lutomirski , Dave Hansen Cc: X86 ML , Borislav Petkov , "linux-kernel@vger.kernel.org" , Thomas Gleixner , "H. Peter Anvin" , Peter Zijlstra Subject: Re: [PATCH 0/5] Minor selftests improvements Message-ID: <20171107101322.jkywyydiummjlvsk@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andy Lutomirski wrote: > This improves and robustifies the ldt_gdt test and fixes compiler warnings > in the protection_keys test. > > Andy Lutomirski (5): > selftests/x86/protection_keys: Fix syscall NR redefinition warnings > selftests/x86/ldt_gdt: Robustify against set_thread_area() and LAR > oddities > selftests/x86/ldt_gdt: Add infrastructure to test set_thread_area() > selftests/x86/ldt_gdt: Run most existing LDT test cases against the > GDT as well > selftests/x86/ldt_get: Add a few additional tests for limits > > tools/testing/selftests/x86/ldt_gdt.c | 88 +++++++++++++++++++++------ > tools/testing/selftests/x86/protection_keys.c | 24 ++++++-- > 2 files changed, 88 insertions(+), 24 deletions(-) I'm still getting this build failure when typing 'make' in tools/testing/selftests/x86: gcc -m32 -o /home/mingo/tip/tools/testing/selftests/x86/protection_keys_32 -O2 -g -std=gnu99 -pthread -Wall -no-pie protection_keys.c -lrt -ldl -lm In file included from /usr/include/signal.h:57:0, from protection_keys.c:33: protection_keys.c: In function ‘signal_handler’: protection_keys.c:253:6: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘.’ token u64 si_pkey; ^ protection_keys.c:253:6: error: expected expression before ‘.’ token ... Makefile:47: recipe for target '/home/mingo/tip/tools/testing/selftests/x86/protection_keys_32' failed Plus I'm also getting these warnings even with all your fixes applied: gcc -m32 -o /home/mingo/tip/tools/testing/selftests/x86/mpx-mini-test_32 -O2 -g -std=gnu99 -pthread -Wall -no-pie mpx-mini-test.c -lrt -ldl -lm mpx-mini-test.c: In function ‘insn_test_failed’: mpx-mini-test.c:1406:3: warning: array subscript is above array bounds [-Warray-bounds] printf("bte[1]: %lx\n", bte->contents[1]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mpx-mini-test.c:1407:3: warning: array subscript is above array bounds [-Warray-bounds] printf("bte[2]: %lx\n", bte->contents[2]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mpx-mini-test.c:1408:3: warning: array subscript is above array bounds [-Warray-bounds] printf("bte[3]: %lx\n", bte->contents[3]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thanks, Ingo