From patchwork Tue Sep 10 10:11:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13798274 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22CD1ECE58D for ; Tue, 10 Sep 2024 10:12:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0ACCF8D002B; Tue, 10 Sep 2024 06:12:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F023D8D0058; Tue, 10 Sep 2024 06:12:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C403B8D0056; Tue, 10 Sep 2024 06:12:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 9968B8D002B for ; Tue, 10 Sep 2024 06:12:14 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 49E204159B for ; Tue, 10 Sep 2024 10:12:14 +0000 (UTC) X-FDA: 82548413388.27.7BAE2F9 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf05.hostedemail.com (Postfix) with ESMTP id 5A2AA100011 for ; Tue, 10 Sep 2024 10:12:12 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=DUMJCp6G; dkim=pass header.d=linutronix.de header.s=2020e header.b=sTC9Mk9a; dmarc=pass (policy=none) header.from=linutronix.de; spf=pass (imf05.hostedemail.com: domain of t-8ch@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=t-8ch@linutronix.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725963129; a=rsa-sha256; cv=none; b=gp9ifoK32rlnNCnImy2T9xtM1AJTyzjvVAlUpwG2y/8yD6jxMF8yfw9hgonVdu5LRn5LoL EiyNDT+XsZAeRHXtTx/SS5Qm4IALfdyyeg8VkWToMJlHcGcL9K5/w/RIxATwihe66jQ4jX S4k++Ouu/itqbQWNyIcIpirhxUNIiV4= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=DUMJCp6G; dkim=pass header.d=linutronix.de header.s=2020e header.b=sTC9Mk9a; dmarc=pass (policy=none) header.from=linutronix.de; spf=pass (imf05.hostedemail.com: domain of t-8ch@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=t-8ch@linutronix.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725963129; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=b8g6RfBCA+wrHgvUyJpXjlSeY1WblZvtq0QubmmLmGE=; b=1V3dCzSGEmBZnnlXeXSpYRMrkH9stFF++mKpCxMbAuT8w/+LaBIHxQUrG9Ur6rT+w+sVx3 eWe/N/Z2p3ORHwelfDc0UYraWJUB0qXUSI6EoEqsOQV/SE6AZWNRU2Mr/ERtwZrdFacvWf UJcHpnUDvUATHMONiQekG/2AogGgAKM= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1725963130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b8g6RfBCA+wrHgvUyJpXjlSeY1WblZvtq0QubmmLmGE=; b=DUMJCp6GuJqMeuEgOoMS/uXiZ8i9y+Vwy0Vf8y6OQUZg3Z03wUgdbvkzaan3S/NcLciCiZ GFaac2r6ey5LKPqSj5NAkQI7nqGQypQd81aX2RqsUFW/X27hWolKAeGgZ8bpt+ReqYJGR2 9PBzKtdDiHcuSXWOKq9RFQKD6PkpK0LkxPp8a9da5CEQC+1HmfaYt+RxjQcOEuf9WMNE0+ AeyCC2vbPojWOhXtFJVNJlUOrYAO2r0UKDNLsjbr3I3RzbKesiFTlP5CV29JQyvD/tuEzO H7qiXJgetoatGPKz4qglIlPsw/EduznrZpzxbfjHmAZqwp/orFPOaiFDGxXKog== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1725963130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b8g6RfBCA+wrHgvUyJpXjlSeY1WblZvtq0QubmmLmGE=; b=sTC9Mk9aV3zglGwb7YyFbRPPOeOq0+O4vFdendmV63xsimF0jFa93Z0fx9yQQW7CsK0IYa tPCJQihsSf5tWVDQ== Date: Tue, 10 Sep 2024 12:11:36 +0200 Subject: [PATCH 2/2] x86: vdso: Remove redundant ifdeffery around in_ia32_syscall() MIME-Version: 1.0 Message-Id: <20240910-x86-vdso-ifdef-v1-2-877c9df9b081@linutronix.de> References: <20240910-x86-vdso-ifdef-v1-0-877c9df9b081@linutronix.de> In-Reply-To: <20240910-x86-vdso-ifdef-v1-0-877c9df9b081@linutronix.de> To: Andy Lutomirski , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Eric Biederman , Kees Cook , Thomas Gleixner Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, =?utf-8?q?Thomas_Wei?= =?utf-8?q?=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1725963129; l=1673; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=CPeEQPomon0NN9hvYJGJq0EYPts0p9GT5vjukg23S/E=; b=6fIxdpbyKGs151uLINYPcvYcZRrBnUjDTlUtPTWMZXB3yrTogS7CNFivTzA+rsqsxIYTDUal+ kxO0LL0o9ZpDPswGKcoyBX8tJ0Mg6n1aao+VymNwEg3uQRNNKUq77t4 X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= X-Rspam-User: X-Stat-Signature: 7ugzk8s75ur8xx8azbpn9cb1w9dtwmgb X-Rspamd-Queue-Id: 5A2AA100011 X-Rspamd-Server: rspam02 X-HE-Tag: 1725963132-938717 X-HE-Meta: U2FsdGVkX19pA+1M4rXAFgQj9kz+wavMuLC3Dlh2CnnE9wmcg4d54O9JmLvqA2KD1sbtuPRqdb1WaBjqF0F7Ji5kkLQO04/jC/divVbJTDMfx9ZYCro55o/9vXxsmpd0eg6c7mGUIAjWpsc94POO8/ILLz8osRrlrBQI1iB/6FfdAYxiPkTjeRhA99X66xhWvw3edXKZ4NzpQcB3xX8VFwuu9MrjhX54/LhBxfCWEvyCf+Syjnx7FPANRpemdXGtA0YBxufRwFtwkat6/nBWv0DKmRAald7PwFJIAUMUXpbXHSxXVJ7CJL1E8sScvol0RE4CvrgOmF1mSNrrPNY92LZhyLtiOdmxPqpCqBpRb6hzZJCSoANymBV5RHSmzSv5WdvCijJA4fXEo0+LPSZRR0wFcoAmrWf/87EjJM8r53QWSBRSs9bdp6QNjMOg7voQmMMQWwkqw6ljKYLb9IjcZQ+/0QlSJLQFQKPVDgp5EvQQ33cRuOEbDwPBHnJAp9eLyfZ8jXuMisF5OncRCNFDW8z1ubP0M6YwIHKu3Dx9d6df6pMq5kmkc4q27rExjR7XwymJ3UTnH/mvf4HE9KvTcQyL7QWbRwa3aXnJtggs2+UrMmU04FUIfnWA4ycxfaGRafmIvOQjo599/u/3xD19lJ36n8NMdzg1LWO6Kece+gpiVtZbbnn7TvrlAyjd3UXEqnxMwvCZzlUkdEYzuhhEm0dgc0iq+zfrn4HjhGRiBBMWu2e6zYrHCYQSOikxU+AC2IBYnH+ZvlGjZcKlW9Q4cBFNlYpMyUBFZbUgkGs6uKGGP2baBWfQPop008vLO5zOCMY2Q+eUvpIIBVwIOa4G5m1oqs+flKRS1yGCHmyJVDPN3XJwfZ3hyBdIHTXLQoI4q5n4ynOHFi29pexNU2PhgipY4nisvkE5kcvhAoBdftMe51Y9jjhoZ0JM4k6r8vUVMMUpPMH0QCML7+84H4s Z2uJKxbT n3yYAWl5V3qoV9fqgnWeTJjRjxfdyGbEyVNO8O1u3f/NUVTy2lcEwr6DVraqwLOE8zLad9w9j4Y8g+RUkv8+0ZDLk+t/S/03K0xXC7/bgdRfO8v64D43a8iR7pfZDwNe8p+Ef7j3rsHUECICPn2VVaGqFhjcDY5BwTUOpHk28giKmFuImY40DaREXGsjxUjTq7zrKPUX1qDI00zYMnKXV3KH0YUr9ODoKTyIB2AbIm58VVb2gDKBwTrfSBJubPV8swLerR7nCbQk+AhbO96QLnI8zkXegxymyQmwrV6dmdiVl+iNHaj3Uq6uDLczm+i8JtoHM5iOPXYrdyQ8EZM2pJ5V/++W1ckQLN+MIzbl3ttIpubU4gbqZg2PFrCeoB+XbxWtpmh2VneLl9MlOdq0k6MYyd0RC9v6FwkBqN612C3NvxO83PSvc4QoF98laE60pWWCS 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: List-Subscribe: List-Unsubscribe: The ifdefs only guard code that is also guarded by in_ia32_syscall(), which already contains the same ifdefs itself. Signed-off-by: Thomas Weißschuh --- arch/x86/entry/vdso/vma.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c index 9059b9d96393..ab2b011471e0 100644 --- a/arch/x86/entry/vdso/vma.c +++ b/arch/x86/entry/vdso/vma.c @@ -75,7 +75,6 @@ static vm_fault_t vdso_fault(const struct vm_special_mapping *sm, static void vdso_fix_landing(const struct vdso_image *image, struct vm_area_struct *new_vma) { -#if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION if (in_ia32_syscall() && image == &vdso_image_32) { struct pt_regs *regs = current_pt_regs(); unsigned long vdso_land = image->sym_int80_landing_pad; @@ -86,7 +85,6 @@ static void vdso_fix_landing(const struct vdso_image *image, if (regs->ip == old_land_addr) regs->ip = new_vma->vm_start + vdso_land; } -#endif } static int vdso_mremap(const struct vm_special_mapping *sm, @@ -339,7 +337,6 @@ int compat_arch_setup_additional_pages(struct linux_binprm *bprm, bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs) { -#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION) const struct vdso_image *image = current->mm->context.vdso_image; unsigned long vdso = (unsigned long) current->mm->context.vdso; @@ -348,7 +345,6 @@ bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs) regs->ip == vdso + image->sym_vdso32_rt_sigreturn_landing_pad) return true; } -#endif return false; }