From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751029AbdBBHKf (ORCPT ); Thu, 2 Feb 2017 02:10:35 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34373 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750898AbdBBHKe (ORCPT ); Thu, 2 Feb 2017 02:10:34 -0500 Date: Thu, 2 Feb 2017 08:10:30 +0100 From: Ingo Molnar To: Dave Hansen Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH] x86, mpx: re-add MPX to selftests Makefile Message-ID: <20170202071029.GA2368@gmail.com> References: <20170201225629.C3070852@viggo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170201225629.C3070852@viggo.jf.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Dave Hansen wrote: > > From: Dave Hansen > > Ingo pointed out that the MPX tests were no longer in the selftests > Makefile. It appears that I shot myself in the foot on this one > and accidentally removed them when I added the pkeys tests, probably > from bungling a merge conflict. Note, we still have these ugly warnings when building the pkeys testcase with GCC 5.4.0: gcc -m32 -o protection_keys_32 -O2 -g -std=gnu99 -pthread -Wall protection_keys.c -lrt -ldl -lm protection_keys.c: In function ‘setup_hugetlbfs’: protection_keys.c:816:6: warning: unused variable ‘i’ [-Wunused-variable] int i; ^ protection_keys.c:815:6: warning: unused variable ‘validated_nr_pages’ [-Wunused-variable] int validated_nr_pages; ^ protection_keys.c: In function ‘test_pkey_syscalls_bad_args’: protection_keys.c:1136:6: warning: unused variable ‘bad_flag’ [-Wunused-variable] int bad_flag = (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE) + 1; ^ protection_keys.c: In function ‘test_pkey_alloc_exhaust’: protection_keys.c:1153:16: warning: unused variable ‘init_val’ [-Wunused-variable] unsigned long init_val; ^ protection_keys.c:1152:16: warning: unused variable ‘flags’ [-Wunused-variable] unsigned long flags; ^ In file included from protection_keys.c:45:0: pkey-helpers.h: In function ‘sigsafe_printf’: pkey-helpers.h:41:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] write(1, dprint_in_signal_buffer, len); ^ protection_keys.c: In function ‘dumpit’: protection_keys.c:407:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] write(1, buf, nr_read); ^ protection_keys.c: In function ‘pkey_disable_set’: protection_keys.c:68:5: warning: ‘orig_pkru’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (!(condition)) { \ ^ protection_keys.c:465:6: note: ‘orig_pkru’ was declared here u32 orig_pkru; ^ Thanks, Ingo