Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1160413imu; Wed, 16 Jan 2019 13:54:14 -0800 (PST) X-Google-Smtp-Source: ALg8bN7RVleqXnTffxZfBgnMFJcChpM4rRLrOheuZLHdWwvGBepdGfiEx5owQl08My5TOz0CcTzB X-Received: by 2002:a17:902:ab84:: with SMTP id f4mr11859600plr.207.1547675654843; Wed, 16 Jan 2019 13:54:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547675654; cv=none; d=google.com; s=arc-20160816; b=qPBzri2PbKzWEqJXUo9Yqr/QW9p+DPYj0RVrwHRuEalTceX6dVWupm3GPRk3gLZCas B0mZirxcyS1hazwVb7XSeJ5vAm7sX4qNewEGalx64plm6RZMCuw6Iqd0A0iNZ6OHeGqt sa34jf/VZY8nR7/RFpeQ2+2dQoXiKtxQOEpHAy5EwWR9L99i48HiDmSFnECQLAUX4vbB llEZatGGKXwtYc8L2mImP+nKRsnUSLyxJEmUFAdWDvjzoRyzo5wBXdgg0yJlomr0zSjb YCmzeHQ9wt8Rg4Vkm+T+Cj6A9zYrtLWNYrCqvcY4Ovj1NyvQ4nNohHdyq4COFStSLdLz 6u4A== 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; bh=o6bk2sGiUiLjuU+DJjsu5MWsk7VwgzkkwJc5wLvRqu8=; b=J2okX2DsVcwwil2j6wWKD/Mu9Oteh///R5l5oiOnurTXPY7UQErUAvGK35WOJqcBpX 3yHjtCvHXpMkAzdwYQLOkJMACIAxWYq6Q/S4AJYb9qeVXRg3my0Vjhiv5UWReKWdxa1h nMmRetoBcRcY81AxBlGfuScQhGmwr/MX5ezhNln60ihuDuZkZT/IK03kglflxnokzXHX pt1k49OLOOZa6/9I421ueQrP/IwJGufiA3A2PUihQLj3ZvfoYfnYMnfn39sSB7nx1lMk zak6IfpZY61T1ajqp0VkuCeCg+EPGvHsUI15X7z1lGK6+RpCnync9M0r7MWS23KpNx+S remA== 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 v9si4707452pfl.45.2019.01.16.13.53.59; Wed, 16 Jan 2019 13:54:14 -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 S2393004AbfAPNPl (ORCPT + 99 others); Wed, 16 Jan 2019 08:15:41 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:60305 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732810AbfAPNPk (ORCPT ); Wed, 16 Jan 2019 08:15:40 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1McpW6-1hIXcy2bvm-00ZyBr; Wed, 16 Jan 2019 14:15:34 +0100 From: Arnd Bergmann To: linux-s390@vger.kernel.org, Martin Schwidefsky , Heiko Carstens Cc: linux-kernel@vger.kernel.org, y2038@lists.linaro.org, Dominik Brodowski , Mark Rutland , Arnd Bergmann Subject: [PATCH 0/5] s390: rework compat wrapper generation Date: Wed, 16 Jan 2019 14:15:18 +0100 Message-Id: <20190116131527.2071570-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:faJLbYrjfVsWCOx4uF8nvUPoeFUux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: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Heiko and Martin, As promised, I gave this a go and changed the SYSCALL_DEFINEx() infrastructure to always include the wrappers for doing the 31-bit argument conversion on s390 compat mode. This does three main things: - The UID16 rework saved a lot of duplicated code, and would probably make sense by itself, but is also required as we can no longer call sys_*() functions directly after the last step. - Removing the compat_wrapper.c file is of course the main goal here, in order to remove the need to maintain the compat_wrapper.c file when new system calls get added. Unfortunately, this requires adding some complexity in syscall_wrapper.h, and trades a small reduction in source code lines for a small increase in binary size for unused wrappers. - As an added benefit, the use of syscall_wrapper.h now makes it easy to change the syscall wrappers so they no longer see all user space register contents, similar to changes done in commits fa697140f9a2 ("syscalls/x86: Use 'struct pt_regs' based syscall calling convention for 64-bit syscalls") and 4378a7d4be30 ("arm64: implement syscall wrappers"). I leave the actual implementation of this for you, if you want to do it later. I did not test the changes at runtime, but I looked at the generated object code, which seems fine here and includes the same conversions as before. Arnd Arnd Bergmann (5): s390: open-code s390_personality syscall ipc: introduce ksys_ipc()/compat_ksys_ipc() for s390 s390: use generic UID16 implementation s390: autogenerate compat syscall wrappers s390: remove compat_wrapper.c arch/s390/Kconfig | 2 + arch/s390/include/asm/syscall_wrapper.h | 136 +++++++++++ arch/s390/include/uapi/asm/posix_types.h | 6 + arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/compat_linux.c | 235 +------------------ arch/s390/kernel/compat_wrapper.c | 186 --------------- arch/s390/kernel/entry.S | 4 +- arch/s390/kernel/sys_s390.c | 14 +- arch/s390/kernel/syscalls/syscall.tbl | 286 +++++++++++------------ include/linux/syscalls.h | 4 + ipc/syscall.c | 20 +- 11 files changed, 322 insertions(+), 573 deletions(-) create mode 100644 arch/s390/include/asm/syscall_wrapper.h delete mode 100644 arch/s390/kernel/compat_wrapper.c -- 2.20.0