Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2722145ybv; Mon, 24 Feb 2020 10:18:33 -0800 (PST) X-Google-Smtp-Source: APXvYqzHbMOT55zqbEIJ6PPIJDd4DBGXQaz4YMwREQWZbECKU6exDyJplmFBVjQBYNPjHy8/vSid X-Received: by 2002:aca:c792:: with SMTP id x140mr283546oif.53.1582568313108; Mon, 24 Feb 2020 10:18:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582568313; cv=none; d=google.com; s=arc-20160816; b=TVrrGCsBKolR91/k88PFYNOPrTXfLoD20+xUSBkSKVaxQlXZwPSNdCEo8KPmm0i777 9Y5gj7mtKshqlBxGTuMEElekxDSSAizg3/09ZowcT7Zib9JwApccL5Ho3lctX3rCvLcl dkrsTXorTC/h43ujE5FnR9ACyOt8/s1I0QrU0l1O5D25jkDRPBefSDn8apmDX6cFXVaL Nr0tOfBObq5cZhUi6xZIu98MC+KlKTX1kk0fWJWyv+GmWGLCxd88K7Oi66GDleY82Q3w aOq6swU7nlxRpse/MUX87wF2CWkOdoReVwJiAqSybU3eQc7BaZe/5b6WcRgs/F9aZ3Y0 sSvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=o+SFPaw3C1NfsYD07E9fToSs6hUMFU4silGa9zhvCjA=; b=SUZVRzbcbM0ODKiIAmN10l5x3z0g5lRm02lrCEnUtnrwDc5S4aYrDQIFB8N131nuae 5EHiaDFk8b6Ri1XHR1Rz1NJOoYZPG6ewaNNiR6hi2SmQAn7x3f0i+h7ZprQazxaJgCho 4jNfNppDBkiIPNvo6jxKe4Kzv5yInPQijH66h5FMJSFw/liATy1/XJVoYelnlOCSx87O 4YcOkW3olQM2rN1XtM66OuLmAOrJ3E1WoB0NXomQi+iu0srNBPv7FQVfMjiVYIRVepvl jygEOUGBm0AwWqbWrFz1DpMyC+8/pvYIZLKJjYHUs0Y/iKFfm+QuFcTmmDglpoMlmSsi tHig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DrHu6pp8; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r12si6407084otq.156.2020.02.24.10.18.20; Mon, 24 Feb 2020 10:18:33 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DrHu6pp8; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727736AbgBXSSO (ORCPT + 99 others); Mon, 24 Feb 2020 13:18:14 -0500 Received: from mail-yb1-f194.google.com ([209.85.219.194]:44862 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726208AbgBXSSO (ORCPT ); Mon, 24 Feb 2020 13:18:14 -0500 Received: by mail-yb1-f194.google.com with SMTP id g206so4123901ybg.11 for ; Mon, 24 Feb 2020 10:18:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=o+SFPaw3C1NfsYD07E9fToSs6hUMFU4silGa9zhvCjA=; b=DrHu6pp8Rsg5dQgaE63XTn2Maj1ZH+Jqw/XbaPAZiPOOHF5uCwPhQQvEOeK0gX9BY/ mOjUvWXmvah2S5EPLqQGTYRqurXPIH66E8trucw0AyWmR4SnoYkDRIfRYCBl/Yn+NyAp hMFaVLgOY5lr0lw7hEloAb76dkXN/JAriWXoLYspGiCZbwgh47rEuzz3HiDfM9+HqTb1 YACZ/FSrpm8DT9LMKODBZIkYd7/QGj+lvSaRucbtR3yxFMuWN9UU1v6/UP9Vbu0A7DsR CbGA4eaYdjGiQpU4eqPk1rFdWFv4MubuO2l0vXKF+V6NfwepAEytcwzzjvUmgn5qRtSR 4hUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=o+SFPaw3C1NfsYD07E9fToSs6hUMFU4silGa9zhvCjA=; b=Tq9ZGM52tWvvYGyzN7eC6dC6IaAlmD9okr0LFyu4uj+jx4oB67ipDq+Hy8DwY6jC2M +wBi/sUsItvrRgH04GLGgmwsXtY2QF+PNCz3jqzxxjnpZHmZ5OCA4VpuXlP9WoPBcCnF pk8CJz0AiYdWRmKTtaYaP3ye7o1lC+Tw6pDSnsxK1SO3v38HUED3FBCqqc2QSFhs/0vU Rlcoka6BvxhEr+VIf7uRB6VHoBBFi3nnuQ6W+Q5IqK2dfHZnwltdbWPyTMPaQWiYz88O +EIbzYQYe80Dcd4I6lBypwG5jcBzJGpALkSpfL9BM19o4D+OlqG0E68ZDLvHXDVZxLxG +3kA== X-Gm-Message-State: APjAAAWi7nXLWe6pyKhgVtWB3rhp0Isc9Qt7nw0qSuflwo1tEY06KMGL HVK9W8Yxin/VK0ypPAX47uTwQvk= X-Received: by 2002:a5b:d05:: with SMTP id y5mr2863274ybp.255.1582568293236; Mon, 24 Feb 2020 10:18:13 -0800 (PST) Received: from localhost.localdomain (174-084-153-250.res.spectrum.com. [174.84.153.250]) by smtp.gmail.com with ESMTPSA id i66sm5632383ywa.74.2020.02.24.10.18.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 10:18:12 -0800 (PST) From: Brian Gerst To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Andy Lutomirski , Dominik Brodowski , Brian Gerst Subject: [PATCH v2 0/8] Enable pt_regs based syscalls for x86-32 native Date: Mon, 24 Feb 2020 13:17:49 -0500 Message-Id: <20200224181757.724961-1-brgerst@gmail.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series cleans up the x86 syscall wrapper code and converts the 32-bit native kernel over to pt_regs based syscalls. This makes the 32-bit syscall interface consistent with 64-bit, and a bit more effecient by not blindly pushing all 6 potential arguments onto the stack. Changes since v1: - Split patch 1 into multiple patches - Updated comments and patch notes to clarify changes Brian Gerst (8): x86, syscalls: Refactor SYSCALL_DEFINEx macros x86, syscalls: Refactor SYSCALL_DEFINE0 macros x86, syscalls: Refactor COND_SYSCALL macros x86, syscalls: Refactor SYS_NI macros x86: Move 32-bit compat syscalls to common location x86-32: Enable syscall wrappers x86-64: Use syscall wrappers for x32_rt_sigreturn x86: Drop asmlinkage from syscalls arch/x86/Kconfig | 2 +- arch/x86/entry/common.c | 20 +- arch/x86/entry/syscall_32.c | 13 +- arch/x86/entry/syscall_64.c | 9 +- arch/x86/entry/syscalls/syscall_32.tbl | 818 ++++++++++++------------- arch/x86/entry/syscalls/syscall_64.tbl | 2 +- arch/x86/entry/syscalls/syscalltbl.sh | 33 +- arch/x86/ia32/Makefile | 2 +- arch/x86/include/asm/sighandling.h | 5 - arch/x86/include/asm/syscall.h | 8 +- arch/x86/include/asm/syscall_wrapper.h | 317 +++++----- arch/x86/include/asm/syscalls.h | 29 - arch/x86/kernel/Makefile | 2 + arch/x86/kernel/signal.c | 2 +- arch/x86/{ia32 => kernel}/sys_ia32.c | 130 ++-- arch/x86/um/sys_call_table_32.c | 10 + 16 files changed, 690 insertions(+), 712 deletions(-) rename arch/x86/{ia32 => kernel}/sys_ia32.c (83%) -- 2.24.1