From patchwork Mon May 14 08:59:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ingo Molnar X-Patchwork-Id: 10397557 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1B300600D0 for ; Mon, 14 May 2018 08:59:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C3AD28876 for ; Mon, 14 May 2018 08:59:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00E25290AB; Mon, 14 May 2018 08:59:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: * X-Spam-Status: No, score=1.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, FSL_HELO_FAKE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A039128876 for ; Mon, 14 May 2018 08:59:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4B7A86B0003; Mon, 14 May 2018 04:59:13 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 4400A6B0005; Mon, 14 May 2018 04:59:13 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 30A646B0007; Mon, 14 May 2018 04:59:13 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr0-f200.google.com (mail-wr0-f200.google.com [209.85.128.200]) by kanga.kvack.org (Postfix) with ESMTP id C56CD6B0003 for ; Mon, 14 May 2018 04:59:12 -0400 (EDT) Received: by mail-wr0-f200.google.com with SMTP id d4-v6so9120413wrn.15 for ; Mon, 14 May 2018 01:59:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:sender:date:from:to:cc:subject :message-id:references:mime-version:content-disposition:in-reply-to :user-agent; bh=vvA/s4Jb+nqiL9LYizvi1AqZw6IOBoWLh/gRwnQxyKI=; b=BNBwMxj0yOcugrZSIMiyR8kOnKPKolC3K7/N71mSBZMX6iDGg3edVyAtF4koe505J8 ANbeGi8b7pqui/yQnvJh9pH8W8KFN5ttLlGBvIGn2qu1OPD6n77fwjqeeoY9IY+zrXev IxKISq4q8GtxM/LopAHw8lDLbssPVB9jjTZDgQ8cZIF0mlWSRT9NYg232NNLZpHZjPOj ftFCb12z6yRwN/C4izTlILeKiO3rEgud49AMKJmGM7ATpLbFmOKSRd/LnIQV8iJNRHA1 R0g8FEarezerhabjxdYtLoFWUfbmSht60yCgzw+x0wbbYsrPI97mhb8XTxiEhp5qL9Aa bkeQ== X-Gm-Message-State: ALKqPwfS6JfPejnNOOYa+0EPK0R5wOIgKEGwVzo8vCFVOMxcANBiUwSp HYxpd+a09x6/hA1EGWDfLsJO2R66NoeekjckzI421js/CdSI2lzglMtLWL/itOlIwloD8/CyjxA URYIu1q0pM5pg9DUPsP/IAhYCd5UrqbqM6b8lHPp6mTSBYm9hQaF6HQ8LU2baW1EYURPQUHGKb8 1k+5pACZXRNTrchiL18801ZJAIb1dqa2dIIT95oTzih5tKG8K21S8ZZGswo6hGAjQ+EO0m54Bd2 v7RprhuPqlu1lgDPIbDBiUjV/+MyRbtsszAQgaI/Ta6v7xPgOGnQcsGnQxYu9b60CgtFXOt0aaK GKGtidbzUHDfLyIaQli2jUTf/sVZ40qBBMoI6+/3nATubNvHQ5OV9jLOVlp0HL68HtS1wsm10g= = X-Received: by 2002:adf:afe4:: with SMTP id y36-v6mr6280170wrd.107.1526288352377; Mon, 14 May 2018 01:59:12 -0700 (PDT) X-Received: by 2002:adf:afe4:: with SMTP id y36-v6mr6280140wrd.107.1526288351772; Mon, 14 May 2018 01:59:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526288351; cv=none; d=google.com; s=arc-20160816; b=NKPVOjFzbJaOdqEUOs0wXQTaB5RTjf+w0NlElj+Ly7VH+A3m4Sz+hkGf2q8TY7TCDm y3dqsIhqjfWrOaYrUMQAwiOqHBn5AeTr4ObeUoIwBvZy0hPROJgREk+6ivdbQREkVROU 3nNG0wUxjg1AXULSEEFUz9WC2Ip4e3Tjx82A1lLdgYu/7DwALOTgxdELxK/UKQvcmaDd 4aZ1+zzbrwMsuBDiOYmBGmz5dEPMULYGQSMste11ewR9ZK3Rp26P+wzFTxlxQ1XEUp/x pe91X+3euSk04I3UYiIdTVJqS5ac/fZJo8xbye8s7tky+/6DYmVR8NIeWWQ4rzuBMoqy 990Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:sender:dkim-signature :arc-authentication-results; bh=vvA/s4Jb+nqiL9LYizvi1AqZw6IOBoWLh/gRwnQxyKI=; b=TkyKPArRmfin/clbmSEErhlPjR4lq67yb2Ll63XAhN3C2hD1ajrQCFIlgutxACPkgw Uu/ovGPrUPya3dNfAqWoCu4VfJBFNF5oMgJSbCdBbY+eoIWdh75Xj0UjioH2U8ldwuRN Rv2fA8VNIr5zwU0IgRd1r1FZp6pYV2wKbv2bhI5E9uZMoZmT/7sJ/fJjnHw3IDTFEx+d TGWj3aIwH8PUKa848SGsNwvA2dA/E8vySa+rGdH8dQ/Zo8dqI3rrMyrOzYDuU5IrBXse EXcGwHuUxtpDFYy9Ax7qdDiA+4nXEGqLt19ckfz+jZjzyhcis+D6zFfAv1kW2oBW+tUe DoGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XrUw1Wen; spf=pass (google.com: domain of mingo.kernel.org@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=mingo.kernel.org@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id e193-v6sor1489662wmd.66.2018.05.14.01.59.11 for (Google Transport Security); Mon, 14 May 2018 01:59:11 -0700 (PDT) Received-SPF: pass (google.com: domain of mingo.kernel.org@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XrUw1Wen; spf=pass (google.com: domain of mingo.kernel.org@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=mingo.kernel.org@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vvA/s4Jb+nqiL9LYizvi1AqZw6IOBoWLh/gRwnQxyKI=; b=XrUw1WennriV3iDQqlBxWOoXt9sRXFw6wiZwyEWTKZhJDnSYyA2ejPUZZQP1ibTP8r OrcOmVUkMLAoL3wNRUDiozNHsXAuRjdqQuPDIQfpSktIijxFGZiS4UMvgZKXA6JBTETF ANjqBvXQBbCAJoJnBJ6u+jTO9rQo0MQ4qMnTPCZJ9Nnh1QcmMFcV+z3vQ5LHLbGKeSgC w2p9b1vtIzokwMk1avzkQRYoLthQzC1FwbaG+MCniBr/2Rsbq+vxxVJgZOqYgBK2i++g 7vzY6yplouG1JlNjSq+DkpeqMfJ4QXzXalgyBBLhnD3E7b1Nbs2jR9o/x3Y58R9pa/Sk wmLw== X-Google-Smtp-Source: AB8JxZoxWK5akGXIJzUIhUzbimgMysOTztKtua589jzXbSGSoIDKw1GB8byrg/Ke7sGIJG9cb/5LCA== X-Received: by 2002:a1c:820e:: with SMTP id e14-v6mr4422966wmd.34.1526288351485; Mon, 14 May 2018 01:59:11 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id u89-v6sm11338408wma.4.2018.05.14.01.59.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 May 2018 01:59:10 -0700 (PDT) Date: Mon, 14 May 2018 10:59:08 +0200 From: Ingo Molnar To: Dave Hansen Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxram@us.ibm.com, tglx@linutronix.de, dave.hansen@intel.com, mpe@ellerman.id.au, akpm@linux-foundation.org, shuah@kernel.org, shakeelb@google.com Subject: [PATCH] x86/mpx/selftests: Adjust the self-test to fresh distros that export the MPX ABI Message-ID: <20180514085908.GA12798@gmail.com> References: <20180509171336.76636D88@viggo.jf.intel.com> <20180514082918.GA21574@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180514082918.GA21574@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Fix this warning: mpx-mini-test.c:422:0: warning: "SEGV_BNDERR" redefined Signed-off-by: Ingo Molnar --- tools/testing/selftests/x86/mpx-mini-test.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/x86/mpx-mini-test.c b/tools/testing/selftests/x86/mpx-mini-test.c index 9c0325e1ea68..50f7e9272481 100644 --- a/tools/testing/selftests/x86/mpx-mini-test.c +++ b/tools/testing/selftests/x86/mpx-mini-test.c @@ -368,6 +368,11 @@ static int expected_bnd_index = -1; uint64_t shadow_plb[NR_MPX_BOUNDS_REGISTERS][2]; /* shadow MPX bound registers */ unsigned long shadow_map[NR_MPX_BOUNDS_REGISTERS]; +/* Failed address bound checks: */ +#ifndef SEGV_BNDERR +# define SEGV_BNDERR 3 +#endif + /* * The kernel is supposed to provide some information about the bounds * exception in the siginfo. It should match what we have in the bounds @@ -419,8 +424,6 @@ void handler(int signum, siginfo_t *si, void *vucontext) br_count++; dprintf1("#BR 0x%jx (total seen: %d)\n", status, br_count); -#define SEGV_BNDERR 3 /* failed address bound checks */ - dprintf2("Saw a #BR! status 0x%jx at %016lx br_reason: %jx\n", status, ip, br_reason); dprintf2("si_signo: %d\n", si->si_signo);