Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp53790rwd; Tue, 30 May 2023 16:06:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5s7HkhoOTwlSTWmCOPVXjgIE06zng77FM2vC7c+YBj9msHOEeUDHQwWuoa35epN0Hd3qSU X-Received: by 2002:a05:6a21:6d8e:b0:105:fd78:cb41 with SMTP id wl14-20020a056a216d8e00b00105fd78cb41mr4275648pzb.54.1685488011411; Tue, 30 May 2023 16:06:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685488011; cv=none; d=google.com; s=arc-20160816; b=hpHmKq+UpQDEypY9geDz8dQj02wdXvFJl8YLqJPUf7FxiQKXPLbT8W+Cmn6ydm8EBo 7NmSpPtlv+uRALM+jhcBacMQs37dbZpnZtq6aImqwnDG+9AgV4cN3KIh3w9dRCjv2ZxR 0/j04fX+H7BfiMz11/kN3U2uzI8vpjYCjX2CQZy3vvms7rM2Ul++zf9GWjAjarf3sFEZ wUPfZ+5Hzgj+BHk4buPYOUKUG6HpomXDh95NAOFT4vEBNN70RRZPwTuYrabevKLssDbn MFpShPsKVcwmatUfaTFdFPzsCfuT1e4Rnk2JvnfyZIivTDtayqtwDLI537QSWlWN7yfY RZyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=nmCxxkdcGAW8i+jZq5LyWD2wJfMQHxP2xZqU+KCy38k=; b=eR3Dn12XAxhNbmDKppZGY1S5WAbwIPeiH3Pq7q4lvRF3swBWG5zxZI7DXLYiDi+gWe soLIFoZs2UWP0HB1PfE321inGsbustRh83DpC0joxwvZZzbYr17U5yNi8r9yp0Sml0Wx RaMvvBr2C0WY3QHXhbZI8xbOjEAf2VxDC9A4WnU534d8mE5AHz16b+swQiQ+1/p7kqhd s3dsJxIHmFafGQg9+ivqySjb0e00gyCs6lZw4QRUegfNYoVjgCrUAmyHgY8GQlqhINzo NEogGpQdGhBYzh5pO3MRWig3qBgve5/x6eP2elpFDi2ZYD/RnujIDJ6vcZznxu00/MN3 whUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aZMNEE+L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d27-20020a63735b000000b0053f25518355si12015640pgn.736.2023.05.30.16.06.36; Tue, 30 May 2023 16:06:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aZMNEE+L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233513AbjE3XEs (ORCPT + 99 others); Tue, 30 May 2023 19:04:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233468AbjE3XEk (ORCPT ); Tue, 30 May 2023 19:04:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E50C4EC; Tue, 30 May 2023 16:04:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 79C076181B; Tue, 30 May 2023 23:04:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E8EFC433D2; Tue, 30 May 2023 23:04:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685487878; bh=nmCxxkdcGAW8i+jZq5LyWD2wJfMQHxP2xZqU+KCy38k=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=aZMNEE+LqE57xeVo9wB3CivHR/y/CXj93mgpisrKTuoUs/JouoCFFFAl0+wWHPufv LhZqLhYmQFbYbN5M8AQ134Vqox+12eGT4d8uH/PIw54StrE2/bam4g2aTPDq8sjlaq yPm8zBzcibR5jpdvZ9ZMv25GOUcJgmzRMzeULmDgLSj9JXKRBoxP+G1f99QUzcnicb b0UGYas11v/AaEjGZ+8hLmLvLv2YZsV5lqgKCDcx+pp+Qyttn0ruZtyyeqHn3q1+XY gZWUxc4mvFThSHR8P4Ga4c9RDKZZ7IqA8neKVxyhIeZ1r57z+zF6ezAJXVSgyqpqp0 MDmj5ia17/7cQ== Message-ID: Subject: Re: [PATCH] security: keys: perform capable check only on privileged operations From: Jarkko Sakkinen To: Paul Moore , Christian =?ISO-8859-1?Q?G=F6ttsche?= Cc: selinux@vger.kernel.org, David Howells , James Morris , "Serge E. Hallyn" , keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 31 May 2023 02:04:35 +0300 In-Reply-To: References: <20230511123252.723185-1-cgzones@googlemail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.1-0ubuntu1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2023-05-25 at 17:25 -0400, Paul Moore wrote: > > A minor inconvenience is the number of needed arguments (and the > > actual code after inlining should be the same to the inner scope in > > the end). >=20 > Well, lucky for you, Jarkko and David maintain the keys code, not me, > and Jarkko seems to like your patch just fine :) >=20 > Jarkko, I assume you'll be taking this via the keys tree? I just picked it and mirrored to linux-next. I think it is super important change because it tones down the human error (a little bit at least). You could say improves user experience kind of I guess :-) BR, Jarkko