From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53847C432C1 for ; Tue, 24 Sep 2019 06:30:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2323220665 for ; Tue, 24 Sep 2019 06:30:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AnXJMcjM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2323220665 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ubuntu.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gGSDppoPcWfOYdoe9bagVRhC/vf3RTp43aiEa5xYbPY=; b=AnXJMcjMbC58ZS DFwFbHZPyfvTnX5kCoPwS3Yc2t1KPYEMZJypzNXu0wPgiKX8Qipd6jFH0VcsVNQl8uZIzpymulgJt FXDn5vOnD5Md/UsgHYM0dkyldfGWz8CIzQN7CIyHXwihxr2dPOHNVoV3bHryLDgvIjpWELQkXme0r a4VZOW3Zgz/90UdBlrEqbSqA1HlwGV14Axg8irqFfV14EVms9NgXZPnyqUR64CgtOzvMjME4T6Khh pmGc7ioc0eCHqma5pZ/znJoDkxHB5y74TBmTYcFjD2WxV24iT3l7+P7OcVZ0wVJ63/eWH8khZWHqf KI4nzD5JbyxGpXZ03A5A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCeLX-00077r-I6; Tue, 24 Sep 2019 06:30:47 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCeLU-00077B-Sg; Tue, 24 Sep 2019 06:30:46 +0000 Received: from [89.27.154.14] (helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iCeLN-0008Ni-0B; Tue, 24 Sep 2019 06:30:37 +0000 Date: Tue, 24 Sep 2019 08:30:36 +0200 From: Christian Brauner To: Andy Lutomirski Subject: Re: [PATCH] seccomp: remove unused arg from secure_computing() Message-ID: <20190924063035.n3dmryhn6cb52ida@wittgenstein> References: <20190920131907.6886-1-christian.brauner@ubuntu.com> <20190923094916.GB15355@zn.tnic> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190923_233045_066563_C0D79ED2 X-CRM114-Status: GOOD ( 13.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-s390 , Will Drewry , Kees Cook , Parisc List , X86 ML , linux-um@lists.infradead.org, LKML , Oleg Nesterov , Borislav Petkov , Thomas Gleixner , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Sep 23, 2019 at 11:41:59AM -0700, Andy Lutomirski wrote: > On Mon, Sep 23, 2019 at 2:49 AM Borislav Petkov wrote: > > > > On Fri, Sep 20, 2019 at 03:19:09PM +0200, Christian Brauner wrote: > > > While touching seccomp code I realized that the struct seccomp_data > > > argument to secure_computing() seems to be unused by all current > > > callers. So let's remove it unless there is some subtlety I missed. > > > Note, I only tested this on x86. > > > > What was amluto thinking in > > > > 2f275de5d1ed ("seccomp: Add a seccomp_data parameter secure_computing()") > > IIRC there was a period of time in which x86 used secure_computing() > for normal syscalls, and it was a good deal faster to have the arch > code supply seccomp_data. x86 no longer works like this, and syscalls > aren't fast anymore ayway :( I started looking at this and actually had a slightly bigger cleanup in mind. It seems odd that we have secure_computing() and __secure_computing(). Especially in the mips and x86 case. From what I can tell they could both rely on secure_computing() and don't need __secure_computing(). If I can make those changes, we can make __secure_computing() static and have only a single function secure_computing() that is used by all arches which would make this code simpler. Apparenly mips once switched from secure_computing() to __secure_computing() because of bpf and tracepoints. The last change to this was: commit 3d729deaf287c43e415c5d791c9ac8414dbeff70 Author: James Hogan Date: Fri Aug 11 21:56:50 2017 +0100 MIPS: seccomp: Fix indirect syscall args which references a broken samples/bpf/tracex5 test. But in the thread to this last change Kees and others were less than sure that this makes sense. So I'm not sure. Maybe I should just try and send it out... Christian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel