Received: by 10.223.185.116 with SMTP id b49csp1025277wrg; Wed, 21 Feb 2018 10:46:34 -0800 (PST) X-Google-Smtp-Source: AH8x2260L6eFgwMOjQhaCpfUI+8hfwF80wgNtkfrYvGM2zhOn9gGyQH5pQYA+p1ZJfjEItCRRcyF X-Received: by 2002:a17:902:5382:: with SMTP id c2-v6mr3954863pli.102.1519238794609; Wed, 21 Feb 2018 10:46:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519238794; cv=none; d=google.com; s=arc-20160816; b=sdBSg7RdwLyR33JnYST9zLGDRtwruZPwi3Ffzybt5hVWwUlrzSn6TVnpi8JrWzo3z7 X8oiA3d1oUFSiDqGMuDdJ+zV6afUmLUeyGkR17QZUomMpBxV51IHc9nHkzslz8Xij2gE 8eaOvaVLLkZvTVH8iuWzuvDOajZRjrXS56sg0LnmGmFISDN7hleYk6mGi0IB1+MKRq8s KrWxGrOvsFfrsNdG+OOPwWlxiANibJd3M4aVSiCgXyu4dxssNfSZDaDqxJWLvdI07jU4 AMnJHUaZ/wQZ6fmzHRyjTPmbh0zuouAwNlGhPtNUcKjXhsd5aAggKf2cu70gvysCK/NK XvtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=51uDIkuAcO4LROAke0bL18Hh9Tvi+7HzWsz6jbvFLMk=; b=ctUSxChamDzf08MYpvykmpWPGMEDC3zjNJrRW5z1MHrKAVXFZPPWp5/kvfPhqwkfPd wXqcjQf1EBrAGhnU+blFbXlAGJeU3gzvJXBlsoO7jVWBZKrBQn71iL8FpnivQMRLTFaK NzwPp7sOm+tVMWzklpaTc0rPRLp6J6gUoj1a6piaB8c3QZKe9x+JsLn85huDvnEb1gq7 f1q1iFG8i08za2Gd6QylUxw0m3Mq+nwSCRijvtG3QXonlYCEUvSKfhINQZK+Jp5AaWIz ECW3tt5UumwM0sj2b54KScdM8CZfLICv1MZy6MkUdcLDyyntTkz1BvsghDCFBqaKsDvq DtKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17si7986101pgp.809.2018.02.21.10.46.20; Wed, 21 Feb 2018 10:46:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937015AbeBUNiC (ORCPT + 99 others); Wed, 21 Feb 2018 08:38:02 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:42580 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936157AbeBUNIr (ORCPT ); Wed, 21 Feb 2018 08:08:47 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A14F411CC; Wed, 21 Feb 2018 13:08:46 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dominik Brodowski , Andy Lutomirski , Dmitry Safonov , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , linux-kselftest@vger.kernel.org, shuah@kernel.org, Ingo Molnar Subject: [PATCH 4.15 072/163] selftests/x86: Do not rely on "int $0x80" in test_mremap_vdso.c Date: Wed, 21 Feb 2018 13:48:21 +0100 Message-Id: <20180221124534.459673249@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124529.931834518@linuxfoundation.org> References: <20180221124529.931834518@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dominik Brodowski commit 2cbc0d66de0480449c75636f55697c7ff3af61fc upstream. On 64-bit builds, we should not rely on "int $0x80" working (it only does if CONFIG_IA32_EMULATION=y is enabled). Without this patch, the move test may succeed, but the "int $0x80" causes a segfault, resulting in a false negative output of this self-test. Signed-off-by: Dominik Brodowski Cc: Andy Lutomirski Cc: Dmitry Safonov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kselftest@vger.kernel.org Cc: shuah@kernel.org Link: http://lkml.kernel.org/r/20180211111013.16888-4-linux@dominikbrodowski.net Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/x86/test_mremap_vdso.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/tools/testing/selftests/x86/test_mremap_vdso.c +++ b/tools/testing/selftests/x86/test_mremap_vdso.c @@ -90,8 +90,12 @@ int main(int argc, char **argv, char **e vdso_size += PAGE_SIZE; } +#ifdef __i386__ /* Glibc is likely to explode now - exit with raw syscall */ asm volatile ("int $0x80" : : "a" (__NR_exit), "b" (!!ret)); +#else /* __x86_64__ */ + syscall(SYS_exit, ret); +#endif } else { int status;