Received: by 10.223.185.116 with SMTP id b49csp1083336wrg; Wed, 21 Feb 2018 11:49:15 -0800 (PST) X-Google-Smtp-Source: AH8x227jzc7ANPQPAY3RYeIw0Grph+eWjSHmsmoAv7zUf86nyIKDq4yBoI/eWCfUE0nTndW8+iP2 X-Received: by 10.98.36.217 with SMTP id k86mr4341125pfk.137.1519242555731; Wed, 21 Feb 2018 11:49:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519242555; cv=none; d=google.com; s=arc-20160816; b=iBYDrbNhb3q5O4tTHieGevZBouuFmw8b2e4pHwFGY+M28SKH+RNQLOjKqPCyeIIaB3 vP//1Ow08RP00ncGdWpl2Hm3jZfIWggkst2DZdasH6s2p+nEXqOKnTuD5HyYR2CMabr7 c1RvxajijJBZgFV2l/Cv5zsXn8gkj44KgjHGcW2KvGBXvYoG+LRycKleZCRl4dhjlVBB KFEZh6vHx/N+bzv2Z7SL8F41vgjqGbK5uBzw2mMIms6y0VNYQdrQWGtoptf6GIpwXN0l JYaQWuqfEFJfz8Spx+Umq2UQFnSNMifN5AZShVMMw8VEvvB1VlGTBZrn07YCO1yZ/Gho wdFg== 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=jW0c0fpBLDpDsmq8oT5HrKiMSCo/ECGuEc+xRommPXU=; b=pbslmNxIrmPoKHlc1WdH9KcVu4y1RXZaMR5OWI8Zj6QchuaS67w6Hua68qILMj43es sA5B+i2PvP9fB7hpcVskC9omUbyzUy4LyebK28oFRq1Etr4oZgte1IcCBN6ApBm7majO g7PDODqMEOIswyJeUJPl3YT/zZF7DJTKb1JhvWFV8uztt65BxHl+GCx1/FgttzQF9dJd kqh+A5ejRYcG2he+ef6NhDuoMFxCzq6rVel3nRunaaXt0X1BwMLUTMQxXUyQPN/8suGF eS7a72IKZyf6OrHF1rIlcIk3KqWb1EP5x+3zsd3QidbZdV5bFzRuDmev33STfLJ+kpuR X57A== 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 f9si1693700pgt.303.2018.02.21.11.49.01; Wed, 21 Feb 2018 11:49:15 -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 S937639AbeBUOaH (ORCPT + 99 others); Wed, 21 Feb 2018 09:30:07 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:35382 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934481AbeBUM4j (ORCPT ); Wed, 21 Feb 2018 07:56:39 -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 B4A8BDA8; Wed, 21 Feb 2018 12:56:32 +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.9 58/77] selftests/x86: Do not rely on "int $0x80" in test_mremap_vdso.c Date: Wed, 21 Feb 2018 13:49:07 +0100 Message-Id: <20180221124434.659368600@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124432.172390020@linuxfoundation.org> References: <20180221124432.172390020@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.9-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;