Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3597547rwd; Mon, 29 May 2023 13:22:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6SS8G24SM+QgrUBD+sB6YZLmvyv/T1RTEhE9JBwu0pb1Pk5rL4gAmWcqRHmQRzLcO8gCi4 X-Received: by 2002:a17:903:234c:b0:1b0:45e:fb02 with SMTP id c12-20020a170903234c00b001b0045efb02mr285730plh.35.1685391757899; Mon, 29 May 2023 13:22:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685391757; cv=none; d=google.com; s=arc-20160816; b=VJXnLrPQKcBUlO8G8tU5INTLrFH6+sUPB7bTpVnAIhwiUyFikMMw7lyzIB5OGIc/2m GFZd7dPHxftNy01GNQ3VJbRcFOT+C3vfiD9ii/KGaBmsuT5WGLn3WXH6FwRVYLNfP5Hc DLP7d2XZKhlKVZJbbHxSgyxq4FODfO1mvh0IxY85R5OwJYW21XohUtNe8wmNuebEaorb ysMYetxHYC5UiJPWnaCaRiUnNGtMMe22l5768wSrfEHDNIl4cgWE5vTS+coWmhzxT/Oc ddMr/A5nTdSWRGmFDe4hHdOUJ1S4nkMzRYQVTIRlMpvL2aoi3iqECJOy9GLYTLrMyfc+ xwnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:in-reply-to :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=pIKJ/0pTFVod4oct0Ya5kXe8iwtRftZQzHN3BQjmhKA=; b=pCdaFHeyYsq5OI2IQ2MURZSOY0Lb0322gMdjbew1F7CuxKeUnmmBdYPhSds+U3mvvX YIpqPahQMaJS6+E2TDiBJu6SBrwOniV5MhsV9ctAaehGmliPFqDl5sxEB+el4dKX4f/Z 2W10Xjkipi9sOzk+V7KtqT7PMpnv/WCE/ok5PTdrOkCYo2uZlJAmQ6w7f7xpvSZ42lsj 8G4UnuUCOPWP7BcPuUqntCq25Yh0NA19g/NoFr/H+nyfigJtnRx2Ug2fK+kWPWuymus5 3d+v6583dIIg7k8wqBS2kUBoPYehcTDaMP1NTNb8xZK0i7Hwuo68s07/2hOUgkjGKTeT lEZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="hY2bCm/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=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o11-20020a170902d4cb00b001ae4d1c1288si3761200plg.279.2023.05.29.13.22.26; Mon, 29 May 2023 13:22:37 -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=@samsung.com header.s=mail20170921 header.b="hY2bCm/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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229862AbjE2UGe (ORCPT + 99 others); Mon, 29 May 2023 16:06:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbjE2UGc (ORCPT ); Mon, 29 May 2023 16:06:32 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A9C713D; Mon, 29 May 2023 13:05:58 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230529200542euoutp021214b3bb62b79dd32d5ad368126a4268~jtfNsD1Mz1164011640euoutp02b; Mon, 29 May 2023 20:05:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230529200542euoutp021214b3bb62b79dd32d5ad368126a4268~jtfNsD1Mz1164011640euoutp02b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1685390742; bh=pIKJ/0pTFVod4oct0Ya5kXe8iwtRftZQzHN3BQjmhKA=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=hY2bCm/lXgY5xARnEJv9icirNk2CWpi+nhiIBDpm1CpL835Yr+OtYl0jIWRXauuOX AAuVeSG17ywfgOe3kknJ2ySoO5c36TLQx33ukAZNaBYo6A6Py4PXallIo1wJD2NCd7 nzV+k7f/S2owc2iw42QDYZym4aX/9R5GhpRCJUNE= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20230529200542eucas1p1a7eab0e6643f3c129c498d541cc84e62~jtfNhJJz30669106691eucas1p1k; Mon, 29 May 2023 20:05:42 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id C2.11.37758.69505746; Mon, 29 May 2023 21:05:42 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20230529200542eucas1p17aaabea06538cf7591abea0d37085426~jtfNGZmFJ0800408004eucas1p18; Mon, 29 May 2023 20:05:42 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230529200541eusmtrp2889d1ec7946385a3bdaadecb8f538e87~jtfNEjDYS2796827968eusmtrp2c; Mon, 29 May 2023 20:05:41 +0000 (GMT) X-AuditID: cbfec7f5-7ffff7000002937e-4d-647505969f3f Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id E5.E4.14344.59505746; Mon, 29 May 2023 21:05:41 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230529200541eusmtip2f15a406eeefc8d43e2569de5e8f7b5a5~jtfMy5-g10618906189eusmtip2R; Mon, 29 May 2023 20:05:41 +0000 (GMT) Received: from localhost (106.210.248.78) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 29 May 2023 21:05:41 +0100 Date: Mon, 29 May 2023 22:05:39 +0200 From: Joel Granados To: Luis Chamberlain CC: , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v2 2/2] signal: move show_unhandled_signals sysctl to its own file Message-ID: <20230529200539.limexmxhrpfyya7p@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="xtz7dcv4hf5tve4g" Content-Disposition: inline In-Reply-To: <20230526222207.982107-3-mcgrof@kernel.org> X-Originating-IP: [106.210.248.78] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA2WSfUxTZxTGeW9vey81ZdfWhDeVuYzNRYEBk2W+YcO5xGUXt4m47CPq0CI3 4ISL64c4FwIKWOxEsArOClqB0EpZKcjHysAxdEALA3GAlE+HX5MhCh0qI+Aot5tL9t/vPc9z Ts5z8pI8cbtASu5mlYyclcX7CoR4TfNM56t5fFVM8OVuCcovLxOgOW0zgZyWeQH6pQmi6p8K +Gjq3g2ARqYGAHpak06gvApvVJFNohP2Agy1f5OAHHfzcVTfYMPRr3X5AjRqv4qhzrrv+Kgv 5zZA1xr1GGrJasTQxcpcHpp9smB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mOh9gLGiUlDjYdZGp2sN9UuUhFa+LalEM6Pa+X5X2O9M8ymrsw aoXAdcOJZx8Ks32ufMey/ctzCb0EvzmvI1Qu3DC/vI7tSta8+CZ9PfVle6R+PEv1FfrA9fWi 8atw8dc7Nsy/bX/G9/HqPzN38t4x/iom+t7b/8NUJZbijERDLeai4kQAUP1uy/8DAAA= X-CMS-MailID: 20230529200542eucas1p17aaabea06538cf7591abea0d37085426 X-Msg-Generator: CA X-RootMTR: 20230526222248eucas1p2c21183361439f3a9e36c84545265395e X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230526222248eucas1p2c21183361439f3a9e36c84545265395e References: <20230526222207.982107-1-mcgrof@kernel.org> <20230526222207.982107-3-mcgrof@kernel.org> X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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 --xtz7dcv4hf5tve4g Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 26, 2023 at 03:22:06PM -0700, Luis Chamberlain wrote: > The show_unhandled_signals sysctl is the only sysctl for debug > left on kernel/sysctl.c. We've been moving the syctls out from > kernel/sysctl.c so to help avoid merge conflicts as the shared > array gets out of hand. >=20 > This change incurs simplifies sysctl registration by localizing > it where it should go for a penalty in size of increasing the > kernel by 23 bytes, we accept this given recent cleanups have > actually already saved us 1465 bytes in the prior commits. >=20 > ./scripts/bloat-o-meter vmlinux.3-remove-dev-table vmlinux.4-remove-debug= -table > add/remove: 3/1 grow/shrink: 0/1 up/down: 177/-154 (23) > Function old new delta > signal_debug_table - 128 +128 > init_signal_sysctls - 33 +33 > __pfx_init_signal_sysctls - 16 +16 > sysctl_init_bases 85 59 -26 > debug_table 128 - -128 > Total: Before=3D21256967, After=3D21256990, chg +0.00% >=20 > Signed-off-by: Luis Chamberlain > --- > kernel/signal.c | 23 +++++++++++++++++++++++ > kernel/sysctl.c | 14 -------------- > 2 files changed, 23 insertions(+), 14 deletions(-) >=20 > diff --git a/kernel/signal.c b/kernel/signal.c > index 8f6330f0e9ca..5ba4150c01a7 100644 > --- a/kernel/signal.c > +++ b/kernel/signal.c > @@ -45,6 +45,7 @@ > #include > #include > #include > +#include > =20 > #define CREATE_TRACE_POINTS > #include > @@ -4771,6 +4772,28 @@ static inline void siginfo_buildtime_checks(void) > #endif > } > =20 > +#if defined(CONFIG_SYSCTL) > +static struct ctl_table signal_debug_table[] =3D { > +#ifdef CONFIG_SYSCTL_EXCEPTION_TRACE > + { > + .procname =3D "exception-trace", > + .data =3D &show_unhandled_signals, > + .maxlen =3D sizeof(int), > + .mode =3D 0644, > + .proc_handler =3D proc_dointvec > + }, > +#endif > + { } > +}; > + > +static int __init init_signal_sysctls(void) > +{ > + register_sysctl_init("debug", signal_debug_table); > + return 0; > +} > +early_initcall(init_signal_sysctls); > +#endif /* CONFIG_SYSCTL */ > + > void __init signals_init(void) > { > siginfo_buildtime_checks(); > diff --git a/kernel/sysctl.c b/kernel/sysctl.c > index a7fdb828afb6..43240955dcad 100644 > --- a/kernel/sysctl.c > +++ b/kernel/sysctl.c > @@ -2331,24 +2331,10 @@ static struct ctl_table vm_table[] =3D { > { } > }; > =20 > -static struct ctl_table debug_table[] =3D { > -#ifdef CONFIG_SYSCTL_EXCEPTION_TRACE > - { > - .procname =3D "exception-trace", > - .data =3D &show_unhandled_signals, > - .maxlen =3D sizeof(int), > - .mode =3D 0644, > - .proc_handler =3D proc_dointvec > - }, > -#endif > - { } > -}; > - > int __init sysctl_init_bases(void) > { > register_sysctl_init("kernel", kern_table); > register_sysctl_init("vm", vm_table); > - register_sysctl_init("debug", debug_table); > =20 > return 0; > } > --=20 > 2.39.2 >=20 LGTM --=20 Joel Granados --xtz7dcv4hf5tve4g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmR1BZMACgkQupfNUreW QU+RNgwAk/Z2mYaycPxMeef8lQvY2yVWUf5q2MCjPy06wUObCXySaXq7LCvkxJPF 7JUVXIQ81yZNNNdQ8dWnP0M1gF7Gy1/FuVZwE4FagWhT9nelpF3kmBll4JfkbnG0 1fJVvS4HDK3RB1h7MwIyy1loRFrZvOC7oPf25qwK7PHfjrbAfZvHIda88CH8uQoY Ro2letTYBeYIcSp/YXSd7QjvnlWMWZbJuLHodgm1GK5MmZFARCxCKydYczFta8kC /hT/VaYTnxs1uG8eI55Bb69LJF9kZNKsZYwzNus9wJxKWJgkhkpgJvJyFoJP2pXf 2Wdrufh/b73bRTGolMe4zZmqtMeFLctMSXSMglftViTkJzQSRKi+goiwnH//dt3+ JpvVex4Z1k9hz6MBRpCPys3kSmXjOW5EwI1hTNtH9Hp3xeotJEN6n3ncwHpOuL2E D5i7AXkoFQa4D731FlAsfCxxuelF98CHS3CNaqDK9cRqOa9Gzco1TafXtc9DD8T3 RWpFL98a =5oKi -----END PGP SIGNATURE----- --xtz7dcv4hf5tve4g--