Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2289523ioo; Mon, 23 May 2022 15:02:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfZcdS7DVoXmApiMNwyY0olau7/+ACbR2fUJ1VY3qoFaEe7xhjCKLosJAYyzvevh54vavD X-Received: by 2002:a17:902:d585:b0:161:f5ba:c4e3 with SMTP id k5-20020a170902d58500b00161f5bac4e3mr17361986plh.49.1653343322018; Mon, 23 May 2022 15:02:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653343322; cv=none; d=google.com; s=arc-20160816; b=wkH5BSEBOY8aTun+iUfNtvVyKyMb5esN3/gvANXKpFZfMBxFi1O+55XI1B16ukuxgs W5IqnGFr0ScMpy8w9kNeWDtNdc9/nNKyhoOm7JjM+f69efBqugN6njcwEYNB2ZE5mqos AoMIDX2qelXeikfCunzpS79tNTGl9UdHA5DszHBF0knEDjQxqybyou1r9nhD+tykFRKe BA5Q0Ds4JQcD3NmOmx7VNgLyOn4oQtzpA9ApVPrYKQb5n1n/rYFtjU06TY+p5jMDXr3J b0X+wkxPcEX4EKKll+fG4lAV6vQzX4g5DH0Hm0Blcoe2hDqL/1KE3Z/xd06FSPAg4PM4 50/A== 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=N2rdI1I+QIUtRZp/TJFYWC+M+9hFHdCTsdcwwNaN+is=; b=gvh4Kmk8r1r3d7lUkYet/6RZch7RFM+dW/+4k8SxL73e1Vb5obVLXU7jBlnq2jZR/R XAmxcZCdycJpbkANbGxqU1xTurwKpIPPAP4c5iFPnlXbNEIleiCD/xrKybGPSc8ASY1Z wZcfruhRsJ/AGfIVgL0IIvl/Rad7Fs2EpFZog83Htf7cFBIoUnvx3RlBlXcaEHC0hekD qDDt6zyAARoQ3LkCablomyvr/1M1N9ePE3IFh9vM3p9RNLOu30SQDU7CzN3VOekwG2eN ckWT0Gsp/kgd5MlbV8uKeJ3a4s9KLSRhJYEY9WFTCF9DCdKQx3FhO0B9Cm0SwOIskC5m kjtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=vIXeVVwG; 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 p19-20020a17090adf9300b001dc672ec8e8si566157pjv.29.2022.05.23.15.01.49; Mon, 23 May 2022 15:02:02 -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=@infradead.org header.s=bombadil.20210309 header.b=vIXeVVwG; 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 S232791AbiEWUTk (ORCPT + 99 others); Mon, 23 May 2022 16:19:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232696AbiEWUTg (ORCPT ); Mon, 23 May 2022 16:19:36 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FE7CBC6C1; Mon, 23 May 2022 13:19:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=N2rdI1I+QIUtRZp/TJFYWC+M+9hFHdCTsdcwwNaN+is=; b=vIXeVVwGbphsWuV8rScnUaZbYt kyf2gU0WU1/mPAbgSVUYKsexBErSSvoZdKlgokGxbpiuvFd0DNOdgQC+A+Tessq0wgilc07kAYltB sqVqxpKCFYtbxLhbZow8UVOwRTsZ8DjjF5CvM9meRlsIsaT6TM9SbBsTbD7FZ7rCwV7o/hVAQatM8 62JXw35Nnxo1JIlfnYbpH5jzoiDRlFRVxbY7qbluMqelxnWO92SZfrwFBTyoUv1z59RgyiVHYm4oH gNLYFXsvtJyv+NDNkdeIwnXaz9uDiogM5FHKG52QpACs5sjEVHWOHlBVCTSbR7nazOqzZ1o22C0O3 3FC86RUQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ntBqC-005NuX-Ju; Mon, 23 May 2022 17:27:36 +0000 Date: Mon, 23 May 2022 10:27:36 -0700 From: Luis Chamberlain To: Muchun Song Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, willy@infradead.org, Kees Cook , Iurii Zaikin Subject: Re: [PATCH v2] sysctl: handle table->maxlen properly for proc_dobool Message-ID: References: <20220522052624.21493-1-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220522052624.21493-1-songmuchun@bytedance.com> Sender: Luis Chamberlain X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Sun, May 22, 2022 at 01:26:24PM +0800, Muchun Song wrote: > Setting ->proc_handler to proc_dobool at the same time setting ->maxlen > to sizeof(int) is counter-intuitive, it is easy to make mistakes. For > robustness, fix it by reimplementing proc_dobool() properly. > > Signed-off-by: Muchun Song > Cc: Luis Chamberlain > Cc: Kees Cook > Cc: Iurii Zaikin > --- Thanks for your patch Muchun! Does this fix an actualy issue? Because the comit log suggest so. If so is there a bug which is known or a reproducer which can be implemented to showcase that bug? The reason I ask is that we have automatic scrapers for bug fixes, and I tend to prefer to avoid giving those automatic scrapers the idea that a patch is a fix for a kernel bug when it it is not. If what you are change is an optimization then your commit log should clarify that. If you are fixing something then you must be clear about about the details I mentioned. And then, if it does fix an issue, how long has the issue been know, what are the consequences of it? And up to what kernel is this issue present for? Luis