Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3203860ybd; Mon, 24 Jun 2019 21:41:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxE+fatQeGy3s+eXfk3awc1RyDIi098v4dpsYMEMU9Z3PYvMwufdj6QCbfY2Qejfmd26YTZ X-Received: by 2002:a63:6c4a:: with SMTP id h71mr36145155pgc.331.1561437667498; Mon, 24 Jun 2019 21:41:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561437667; cv=none; d=google.com; s=arc-20160816; b=AW9n+nShhoiSRmb8K0+xYCHesTjTEbNK/lM8ccTnyeJ0dO2bEAOyXMTd83BD8yfn9Q 9uXgFUZmXnK4SNZ9Zbo3wMhkHpnrlNmo3gwD6jC3HOT1UDqaiXme11QV3tMNMemw0VaC GM76jGDIpj6PRgxp3VZAwYeCWCE5vhN9r4XvxPCyiNd+o2JCnieMYt1nZUbyQQtAcwhq /jHCD+0GbSaVz7lWnN0jCUeP04llYF/OAdFX3MmBd+h+Sa9kMdgLkkq5tnXf8+8KCfZ8 KDW6pMhNSyw/KUXkRU63Uo3x3cW2EX3pEonPg9Gv4iBRdwXe5M03T8Dz70qgC3AqjJz8 GhMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature; bh=le7WO334hT4VkCM2URnTWxwFBKTdVFEc+iEv1d1vk2A=; b=bHd016LiGL6XHWDlHaw570qRSd1NT/4t7bEC3tI1cmFqMm/n6hIAy6UBlZXwuGpqx/ KeSOP7QxOIwixl8YtxWKXxMYES2ilWa56pp9GAOQxFhIv7YIVJHmVvIK6zo77sDHwQE+ o78WdWUzQbN8X6wIVfI03OuVh8X66dd4v+xoqDW4zslSXNkYF6k3tNf/EnTgjMDFphTh XU/aPrUYBlBHjjxuiXOA/dC8Edd4iYyDE6yOCykd0djvqqHkIklmgsmB6mxOCpCSIxvH V9Kv2HOXWsKu0B9PAxMb8p6oGTRB0xVwhGeJI32L7g4uewZGEDTWdLmxuNBLHJNUe3d0 Ry9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@etsukata-com.20150623.gappssmtp.com header.s=20150623 header.b=JAQkq1NG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b20si11517032pls.24.2019.06.24.21.40.51; Mon, 24 Jun 2019 21:41:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@etsukata-com.20150623.gappssmtp.com header.s=20150623 header.b=JAQkq1NG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726778AbfFYEkL (ORCPT + 99 others); Tue, 25 Jun 2019 00:40:11 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:41496 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726421AbfFYEkK (ORCPT ); Tue, 25 Jun 2019 00:40:10 -0400 Received: by mail-pf1-f196.google.com with SMTP id m30so8760539pff.8 for ; Mon, 24 Jun 2019 21:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=etsukata-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=le7WO334hT4VkCM2URnTWxwFBKTdVFEc+iEv1d1vk2A=; b=JAQkq1NGXNgoU/m+tted0n1/w0R7yPxZaTLHi0+Scb0s1JshebDxVQUwK1ZQhA7RPI hgLkIXYHvMCKPZuGHg8kNz7dN5sm9shboEJ1FlyVd8nfKKYqKugS5eNYlJcX5U6ZZWPG pFIEtMYgbeZRq5OnXSnwGT5rWV9ZvlOlsA2gv8p82peGT05PKGemuy9DVuD+8Md7Tgt4 P4nOBeEgslqB8w7+bIhLlGrX7o1lGF/1iYBrkPlPo1lR+5YgTKBIUZBgE4zQSRBbU5Js Bm0JXmxu9RB7YgbEWcTebbw13HkU2xjOupxlaPdr8CIK58pFYzlH0ntY3tuKLaDYFMN3 OTGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=le7WO334hT4VkCM2URnTWxwFBKTdVFEc+iEv1d1vk2A=; b=PasEE++3fRy4wTh4kIyaHVBtWjTUoNMx2B4wkIuBmVc2437mJsKSu5w7yl53YGKt4N QLj4RgYnuGQi+BCZz/BJu03Nk/OuNXcwDQaReFW8C3PJPuofO0b+EY8urTTNfUCGyhA2 wG2QwbJ/MHXj8VxPOLKtLlPnczaHpcBt7wxJm2ht3rEyx2ZbJn4//YNWvBeer/eRkj+Y 6uGIOqqtSOgHWb04MShZbiD/2t/hpy1611DMSqF2eWJkPZnsDOd0rq0CNJfY5GKiOKPv Br/kSqBcC37KayFHCL68xjxAsTkD2RYFTtMK93DLbPp4pgbOrh5RVeZYbvQAJadiakGO /BCw== X-Gm-Message-State: APjAAAUsRFqienoIvIedxAeAr3q5yzR1pbdFBshJqU3y+1wCry0ea0DR qmVuA0ncq2swO0TubD+Ko/UHE3M/Tdg= X-Received: by 2002:a17:90a:17c4:: with SMTP id q62mr29827494pja.104.1561437610254; Mon, 24 Jun 2019 21:40:10 -0700 (PDT) Received: from etsukata.local (fs76eecbcd.tkyc008.ap.nuro.jp. [118.238.203.205]) by smtp.gmail.com with ESMTPSA id t96sm1124663pjb.1.2019.06.24.21.40.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jun 2019 21:40:09 -0700 (PDT) Subject: Re: [PATCH 1/2] tty: ldisc: Fix misuse of proc_dointvec "ldisc_autoload" To: Greg KH Cc: jslaby@suse.com, davem@davemloft.net, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org References: <20190625030801.24538-1-devel@etsukata.com> <20190625033216.GA11902@kroah.com> From: Eiichi Tsukata Openpgp: preference=signencrypt Autocrypt: addr=devel@etsukata.com; keydata= mQINBFydxe0BEAC2IUPqvxwzh0TS8DvqmjU+pycCq4xToLnCTy9gfmHd/mJWGykQJ7SXXFg2 bTAp8XcITVEDvhMUc0G4l+RBYkArwkaMHO5iM4a7+Gnn6beV1CL/dk9Wu5gkThgL11bhyKmQ Ub1duuVkX3fN2cRW2DrHsTp+Bxd/pq5rrKAbA/LIFmF4Oipapgr69I5wUeYywpzPFuaVkoZc oLdAscwEvPImSOAAJN0sesBW9sBAH34P+xaW2/Mug5aNUm/K6whApeFV/qz2UuOGjzY4fbYw AjK1ALIK8rdeAPxvp2e1dXrj29YrIZ2DkzdR0Y9O8Lfz1Pp5aQ+pwUQzn2vWA3R45IItVtV5 8v04N/F7rc/1OHFpgFtzgAO2M51XiIPdbSmF/WuWPsdEHWgpVW3H/I8amstfH519Xb/AOKYQ 7a14/3EESVuqXyyfCdTVnBNRRY0qXJ7mA0oParMD8XKMOVLj6Nlvs2Zh2LjNJhUDsssKNBg+ sMKiaeSV8dtcbH2XCc2GDKsYbrIKG3cu5nZl8xjlM3WdtdvqWpuHj6KTYBQgsXngBA7TDZWT /ccYyEQpUdtCqPwV0BPho6pr8Ug6J99b1KyZKd/z3iQNHYYh3Iy08wIfUHEXoFiYhMtbfKtW 21B/27EABXMHY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VCsi1XJdSSQtTMxU0qesAjRXTPE76lMdUQkYZ/Ux1rbzYAgWFatvx4aUntR+1N 2aCDuAIID8CNIhx40fGfdxVa4Rf7vfZ1e7/mK5lDZVnWwTOJFNouvlILKLcDPNO51R5XKsc1 zxZwI+P1sTpSBI/KtFfphfaN93H3dLiy26D1P8ShFz6IEfTgK4OVWhqCaOe9oTXTwwNzBQ4= X-Enigmail-Draft-Status: N11100 Message-ID: Date: Tue, 25 Jun 2019 13:40:05 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190625033216.GA11902@kroah.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/06/25 12:32, Greg KH wrote: > On Tue, Jun 25, 2019 at 12:08:00PM +0900, Eiichi Tsukata wrote: >> /proc/sys/dev/tty/ldisc_autoload assumes given value to be 0 or 1. Use >> proc_dointvec_minmax instead of proc_dointvec. >> >> Fixes: 7c0cca7c847e "(tty: ldisc: add sysctl to prevent autoloading of ldiscs)" >> Signed-off-by: Eiichi Tsukata >> --- >> drivers/tty/tty_ldisc.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c >> index e38f104db174..a8ea7a35c94e 100644 >> --- a/drivers/tty/tty_ldisc.c >> +++ b/drivers/tty/tty_ldisc.c >> @@ -863,7 +863,7 @@ static struct ctl_table tty_table[] = { >> .data = &tty_ldisc_autoload, >> .maxlen = sizeof(tty_ldisc_autoload), >> .mode = 0644, >> - .proc_handler = proc_dointvec, >> + .proc_handler = proc_dointvec_minmax, >> .extra1 = &zero, >> .extra2 = &one, > > Ah, nice catch. But this really isn't an issue as if you use a bigger > value, things will not "break", right? > Someone may misuse -1 to disable ldisc autoload, but basically it does not "break". Thanks, Eiichi