Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1456298ybh; Thu, 16 Jul 2020 12:35:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyZDnrCOl2gF4jxa6UyOArncy4ETeVaqQBMzuMyb7V0/C7Cq/pDGI5drUDimqVZTARvLMh X-Received: by 2002:a05:6402:1507:: with SMTP id f7mr6197847edw.37.1594928118392; Thu, 16 Jul 2020 12:35:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594928118; cv=none; d=google.com; s=arc-20160816; b=j0u4mprgoEBhD0OD4cjP2VzYLzC/oM6FBcauQkXJXPppBER5yIj7DkDXsx9kmEQLRc 9EAgqyi2h1ZXGUNWlQF1uIo7clNQReS6MK9WrsxktxeANdZQ1zaXpTqKHgzNKz553v0l L8XM8CZ34z4ovZdY+CFiIKSxBdFIZz0ln12ZHlVWhzMCsZZtTz516XfX+M3NNYmQ4BDV j6BXntXjhoC5kKOS4L1cDkBtxQalbiYOZ5hUUZUd0Q5U08N1PWpnI2NUt6EzE4IRQPHq 3zCdrjjZPP2daEZMnJtLtPHRXpUDlYhFOHr/YZcxA0g4XsPZ/UnXj8EBgGco/KHXrrxS KmjA== 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=vD0qvJ1NLX0GmF3LB9vvhF6ZhAMD+Ux9YpWm8FCGeto=; b=yySe8gmfLhEaIKdWFWpw+ZyXiBthuqG1CcHY9gu4k/ATqL00b/b4sDP9qy4ssSYOum AYInNuOHqvrniof9cqD20OK5IJxyayF7AIyki87EUyCJLho2WRlReOKn9uaXwuvkK/Wc 9atnVq8YR61s41MbDFHmfmgntroL6x0iOcgDLcibmEC0HMAovuVjwEVi8NnceaUiDCkq 6C0udLptOz7T4nlDDA6ugBNE25+WnmOuM1B9cUK0QnnGQD8WGDv8j+2i+CtmBCrCMhHd m9XYQpi/6aWY9LU/OEV/5oUDAKLEjQjcaVzOrbcHo36yRPQhO1MYGVEPZO8wsawkumWL Irig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si4069489edu.361.2020.07.16.12.34.56; Thu, 16 Jul 2020 12:35:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729584AbgGPTbx (ORCPT + 99 others); Thu, 16 Jul 2020 15:31:53 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:48958 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729376AbgGPTbx (ORCPT ); Thu, 16 Jul 2020 15:31:53 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id 750E12A5A2D From: Gabriel Krisman Bertazi To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, kernel@collabora.com, willy@infradead.org, luto@kernel.org, gofmanp@gmail.com, keescook@chromium.org, linux-kselftest@vger.kernel.org, shuah@kernel.org, Gabriel Krisman Bertazi Subject: [PATCH v4 0/2] Syscall User Redirection Date: Thu, 16 Jul 2020 15:31:39 -0400 Message-Id: <20200716193141.4068476-1-krisman@collabora.com> X-Mailer: git-send-email 2.27.0 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 Hi, This is v4 of Syscall User Redirection. The implementation itself is not modified from v3, it only applies the latest round of reviews to the selftests. __NR_syscalls is not really exported in header files other than asm-generic for every architecture, so it felt safer to optionally expose it with a fallback to a high value. Also, I didn't expose tests for PR_GET as that is not currently implemented. If possible, I'd have it supported by a future patchset, since it is not immediately necessary to support this feature. Finally, one question: Which tree would this go through? Gabriel Krisman Bertazi (2): kernel: Implement selective syscall userspace redirection selftests: Add kselftest for syscall user dispatch arch/Kconfig | 20 ++ arch/x86/Kconfig | 1 + arch/x86/entry/common.c | 5 + arch/x86/include/asm/thread_info.h | 4 +- arch/x86/kernel/signal_compat.c | 2 +- fs/exec.c | 2 + include/linux/sched.h | 3 + include/linux/syscall_user_dispatch.h | 50 ++++ include/uapi/asm-generic/siginfo.h | 3 +- include/uapi/linux/prctl.h | 5 + kernel/Makefile | 1 + kernel/fork.c | 1 + kernel/sys.c | 5 + kernel/syscall_user_dispatch.c | 92 +++++++ tools/testing/selftests/Makefile | 1 + .../syscall_user_dispatch/.gitignore | 2 + .../selftests/syscall_user_dispatch/Makefile | 9 + .../selftests/syscall_user_dispatch/config | 1 + .../syscall_user_dispatch.c | 256 ++++++++++++++++++ 19 files changed, 460 insertions(+), 3 deletions(-) create mode 100644 include/linux/syscall_user_dispatch.h create mode 100644 kernel/syscall_user_dispatch.c create mode 100644 tools/testing/selftests/syscall_user_dispatch/.gitignore create mode 100644 tools/testing/selftests/syscall_user_dispatch/Makefile create mode 100644 tools/testing/selftests/syscall_user_dispatch/config create mode 100644 tools/testing/selftests/syscall_user_dispatch/syscall_user_dispatch.c -- 2.27.0