Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1464141rwd; Wed, 31 May 2023 14:29:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7cSNvOpELNCgwCEOIvijviLKAtSbCnYCFjwE1XnmmRXPPucZbpgWku6gMZFciAoceUeAv0 X-Received: by 2002:a05:6a20:549a:b0:10f:fea:1997 with SMTP id i26-20020a056a20549a00b0010f0fea1997mr8693387pzk.5.1685568586217; Wed, 31 May 2023 14:29:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685568586; cv=none; d=google.com; s=arc-20160816; b=FQoRk30heZQ1K+qHuddYSb8+GqqT3OKeAjoVXNz4/Tz11vpZfDfuxx6oymr6sN/81B +o6fdsbQYdVrIjCuH519YwqYYR4Eipq6FEHt5zlligbvEU5gG5RNF+9kXurUqLTxYuUI rU7XO5uozOX8yXIu9DtcJGthODk5TxVdPvRe9PGSzwLb2hTF/M3SaRFIMytBj1zrn2f9 tBXFLM5fSUEhUCBLvhEbxlpguEneQikyzKpUqB1PPa/h9YYnQVOegR+wYktgX43otxpj RiXnd8vOHypvDPP/mI9l8AkV9w3oJmbYtBbZqgxmEjPHr1RBv3MttiOOSM7bfTdlTGQ/ S31w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=LoZ0QonL7GpvkzVGqoB0gV8pXc0xldAiiia3lsdp4Jw=; b=t/ZEY2pUyEyAbyNsDWyNLGVBHqd3ir/Zj4R50hfqeTU2xSb7P67KqD4dD8L9VAVz1n I8JciE12IRh2I+Ispc5nqsSkbXS8iZW5fLPO51BjdCrZVx/rIYTWxND2UL3qyJBIhDQ0 iqWdKN3O99hRfUeFjAex00UHIXGh46jBafhfEj61jvQh9BZgskTpc0eKStF+1mFVK8UK yTN2gtrkloVm2ui3HHOtuQo/lTHR52yJCScAKsWMFWNJYgOHz41pcJQUa7oCxEB48ZdR fWrkZM9+xmCEpOVqGQcUbzb7Q08bBGXgC5Tasmctfx6NnPSt/wIem9k8ly0QsOMC+zIJ aw5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=bV4CEIau; 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=paul-moore.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a30-20020a63705e000000b005323e3de781si184369pgn.647.2023.05.31.14.29.07; Wed, 31 May 2023 14:29:46 -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=@paul-moore.com header.s=google header.b=bV4CEIau; 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=paul-moore.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230181AbjEaVVD (ORCPT + 99 others); Wed, 31 May 2023 17:21:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230192AbjEaVVA (ORCPT ); Wed, 31 May 2023 17:21:00 -0400 Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6128A12C for ; Wed, 31 May 2023 14:20:58 -0700 (PDT) Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-568f9caff33so701097b3.2 for ; Wed, 31 May 2023 14:20:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1685568057; x=1688160057; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=LoZ0QonL7GpvkzVGqoB0gV8pXc0xldAiiia3lsdp4Jw=; b=bV4CEIauWya7OBEvEJZ8O8BySgJRaCgtsOwV6TTfZUxO5baLK/jxr8/dThczBffNj1 g1gilTPiZQifPjEoO+IN/kk9i9ttCodVZ8VAZQtdacEO/I73YOsQw1P3KDX0Q7NmzVl5 fWejNhHweIU62YqvrPCRW4133WGgKrli3JmhqeqvcL8piPMRhv5kXzRVBqPq9qLq/qnk DYPmRx+V/9Ra/NmqVGiyPe/eqdSrEtP3EsfkjQln612yGRhW29oLVVtt+CMN+/kCRLon kft2gp88qfJMj0vw5N1jDI9nRjKoMbdmze8lCQUhFECmOfrFLAjt2nlsqiJvMXmcx5wf sMDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685568057; x=1688160057; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LoZ0QonL7GpvkzVGqoB0gV8pXc0xldAiiia3lsdp4Jw=; b=PojiBybTSj8rxTYi1I48RKFj7jEgqHslV2sH29yFimEooH22jiQN4YsNTog2dxPPI4 DNe82s1Ro2NC4yXgwMkbV6oBLwARkwQjA3yl1BUy5zCep2DbZLzLpC/kZmosvBVi+Jfv thXK8/C8EkPD9Au8U63xKEuCYhlqooDGVAoy6KMcZyNZ9+fweOmRmPTEiBcTI0yGM1Jb haX3BdFHqraBQvRfji7CfE8A1CZF98Xodcd8a0OMj+2kLK+O41P0YaZSFHdjC3ZmpjWd WvKV3rmL7n0JpwCJfTwqf2VT/8q/nCH0V5ECujWYO0kMt4FzPVp/OPGyqnAXC4ZP/38A NE5Q== X-Gm-Message-State: AC+VfDxnqK+V9VhdU+mHYDXTMb1SCYeKZCGSi6RX107Q68O8zhJtuLhD 442diYQtNpTkiCX/t6UgshjtnBh/i5yVHFe43Au/ X-Received: by 2002:a81:d246:0:b0:561:9051:d2d3 with SMTP id m6-20020a81d246000000b005619051d2d3mr6586195ywl.11.1685568057462; Wed, 31 May 2023 14:20:57 -0700 (PDT) MIME-Version: 1.0 References: <20230530232914.3689712-1-mcgrof@kernel.org> <20230530232914.3689712-3-mcgrof@kernel.org> In-Reply-To: <20230530232914.3689712-3-mcgrof@kernel.org> From: Paul Moore Date: Wed, 31 May 2023 17:20:46 -0400 Message-ID: Subject: Re: [PATCH 2/2] sysctl: move security keys sysctl registration to its own file To: Luis Chamberlain Cc: keescook@chromium.org, yzaikin@google.com, dhowells@redhat.com, jarkko@kernel.org, jmorris@namei.org, serge@hallyn.com, j.granados@samsung.com, brauner@kernel.org, ebiederm@xmission.com, patches@lists.linux.dev, linux-fsdevel@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 Tue, May 30, 2023 at 7:29=E2=80=AFPM Luis Chamberlain wrote: > > The security keys sysctls are already declared on its own file, > just move the sysctl registration to its own file to help avoid > merge conflicts on sysctls.c, and help with clearing up sysctl.c > further. > > This creates a small penalty of 23 bytes: > > ./scripts/bloat-o-meter vmlinux.1 vmlinux.2 > add/remove: 2/0 grow/shrink: 0/1 up/down: 49/-26 (23) > Function old new delta > init_security_keys_sysctls - 33 +33 > __pfx_init_security_keys_sysctls - 16 +16 > sysctl_init_bases 85 59 -26 > Total: Before=3D21256937, After=3D21256960, chg +0.00% > > But soon we'll be saving tons of bytes anyway, as we modify the > sysctl registrations to use ARRAY_SIZE and so we get rid of all the > empty array elements so let's just clean this up now. > > Signed-off-by: Luis Chamberlain > --- > include/linux/key.h | 3 --- > kernel/sysctl.c | 4 ---- > security/keys/sysctl.c | 7 +++++++ > 3 files changed, 7 insertions(+), 7 deletions(-) Ultimately I'll leave the ACK to David or Jarkko, but this looks reasonable to me. Reviewed-by: Paul Moore --=20 paul-moore.com