Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1501276ybh; Thu, 16 Jul 2020 14:06:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcTS+cOWnCy4pCiEIzpFqzDXVx0kdaMUaUYD5tM3zVkS9H1uUt7D5Smdzhe89+ipG5FC+n X-Received: by 2002:a05:6402:ca3:: with SMTP id cn3mr6489418edb.64.1594933595375; Thu, 16 Jul 2020 14:06:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594933595; cv=none; d=google.com; s=arc-20160816; b=NEWUj4d7AbCs/noEOhtoeH/YKiYkQ6YZSVEWhAuSRdLGnj5wd8AvSHUkJPPoZCj+Ed DiDtUUCgxpdDc/6Xuaax1JjPaV+eudZaQPteTaCk5Iyjvs+RklsXOfkTScLmlDeDSWcF HRr4jt44UYMkB94U373rSrdYWggTo/HhpRZJc5oFyUTGu2QLHvruvO0in4kuOU0hn0BQ P4sAuvMmCkCRKeEVlJbfJL9p7jAThOSVQBpzBmt9AZXCd9O5lYBxP+A1ytQSeejjGLOU Cq6UtEYigU+EHk/qlOZACg1llnLMqPf60oT8GUhTybVOJKoL86cRSfyCp/hv1fiq2T/p djCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=97Vb3ATwIinLeyNU+ffoxlcz4EFi0R63Q1SkJc6H6p4=; b=1CTpTHkgT5nv9wvAHt5QRI+rzsDY0HLDFiFgQO//NX7TWb4ikfJ7Oh/uoEyXd+B2Tm EYHK61j7LY6qJIwOJ/TryX2XVNU1C1IE1+FAFAJylMnQ/EgpM6Xc2VACQjfp5gACL+sU lpzwwDlO/qcHJ/qhjQ7ZiwSJWIVXqI96D+iqWnUdAN6eFS8Gd0SE/aH98DUkRghg/OKV 6ptki97urwMl4bWOsAJGZZwVatignTXOQ17E2n3kJaQ3IeAo77YrmLFMaZjL1SzzUILt Vv5C0v571LXu3aPjksa4T0BQLFW5fDLWUZMPitFAfGEk077b9pizdqOh/RWjBQjZaJV8 vMRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=We2uPn5N; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c19si4057736ejr.522.2020.07.16.14.06.12; Thu, 16 Jul 2020 14:06:35 -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; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=We2uPn5N; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726798AbgGPVGG (ORCPT + 99 others); Thu, 16 Jul 2020 17:06:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725926AbgGPVGF (ORCPT ); Thu, 16 Jul 2020 17:06:05 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DC85C061755; Thu, 16 Jul 2020 14:06:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=97Vb3ATwIinLeyNU+ffoxlcz4EFi0R63Q1SkJc6H6p4=; b=We2uPn5NrJcfOM7pBBgSN3ww9e lCAo0oiIysNi0p6TlBi8cRG351VfGXXjX3rAOl7pOiKOSVWt+DOKn+ILQxK3iM1PJ6SD27rEejTz0 Nd4LgC6aRVtX7HnRHnpcRI8jiCSSRCk0nOM/9s8RLEA+qF6l33rbGJyfYsJEHkF9wXL1d1ADUxbTT /a4BroaC26YXa89MdHmUgQ/xXWk+m0K1gjIXv1wTwfXSkzGwf1r6lekyLqBKUMG1TGrNe2HnCq3t8 E3Bht6snrABBB2+1XSZweylW1kZLZdojpMa/Evhn9m9eLrtj7EbuPHx5gU/dHhMwDUpe2FHpEKjFA Wnlyrahg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwB4r-0007Wt-55; Thu, 16 Jul 2020 21:06:01 +0000 Date: Thu, 16 Jul 2020 22:06:01 +0100 From: Matthew Wilcox To: Gabriel Krisman Bertazi Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, kernel@collabora.com, luto@kernel.org, gofmanp@gmail.com, keescook@chromium.org, linux-kselftest@vger.kernel.org, shuah@kernel.org Subject: Re: [PATCH v4 1/2] kernel: Implement selective syscall userspace redirection Message-ID: <20200716210601.GN12769@casper.infradead.org> References: <20200716193141.4068476-1-krisman@collabora.com> <20200716193141.4068476-2-krisman@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200716193141.4068476-2-krisman@collabora.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 16, 2020 at 03:31:40PM -0400, Gabriel Krisman Bertazi wrote: > selector is an optional pointer to a char-sized userspace memory region > that has a key switch for the mechanism. This key switch is set to > either PR_SYS_DISPATCH_ON, PR_SYS_DISPATCH_OFF to enable and disable the > redirection without calling the kernel. > > The feature is meant to be set per-thread and it is disabled on > fork/clone/execv. Disabled on exec. Disabled in the child on clone/fork (and vfork, I think). That means we don't need to worry about it interacting badly with a setuid program, right?