Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp473568ybi; Wed, 19 Jun 2019 02:43:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRoVP0TiHtlQANY43ppCwnhOEHwI5fQBv0APVvZHmNOUA/awnfqN5zBMN0Y2iHyiqFxgTK X-Received: by 2002:a62:16:: with SMTP id 22mr28417569pfa.151.1560937425510; Wed, 19 Jun 2019 02:43:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560937425; cv=none; d=google.com; s=arc-20160816; b=viy/C+5Cb3heLAUN/RlwFx94pI7zAdtwwHedBuI0FPwu2rU4Tm6zkjIDuRHgItonGZ kDj3ZsBfwsMKqKE63xT4IqMLkRlfmTHG0UbGj7mfaMplqwFfJKoiypReIzNBZmBNL/ib kZkgCAbjxlLMHSYDyhZ3FXfAZK6KrAjaQQD/hn2xdhBtG6cjP1k9iEGOwEyOurv4T6tR Q3eBZDYAoVdxNuHfB58fkycvO+9YOeOxXXfgfrGoKO7lEJhQk03PScYP3daMQulesCEP Df/raff9wVZwcGY5GCUzcF8JU/g3VooBlC0vV83u+tPOrRVcEwu2fQysMTaorNOyBoUM DzUw== 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:from:references:cc:to:subject; bh=hn06aLdJAo2gythBL8mEvr+LPxdc/CU+b5tQHzbcHjE=; b=hQMufxLozodwIkfyOmdpnCsxoXHOpbPDEOQnA8I+wLc5tJ2F13uUxJvFlUTNloOMq7 WeskUnu7BhT+bvFUqperwKi8W/uxgYAUZb2/Ig6GcR9Uqndv8U4duTQXplxMsvy8ClCw vbZfBdv7CKeX9WMC2KkMtzkHwxeSrI3QVesbL19JPZrxDR2RRISIsTBLa+i4pgwTfKj2 kOtq/+1DDIq02qHgCusEQh6drLrmM325O7PPjlcxw6XkA4CagVU505BUr8CpR4/7+w9J htImyL6rMK9bcV5mxfUz0ThqLcx8ZfUhVFPM8alXY8ADIgMWTT6XqfVYVPvqBgOs1JcV csMQ== ARC-Authentication-Results: i=1; mx.google.com; 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 v19si2603088pgh.510.2019.06.19.02.43.29; Wed, 19 Jun 2019 02:43:45 -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; 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 S1731481AbfFSJmr (ORCPT + 99 others); Wed, 19 Jun 2019 05:42:47 -0400 Received: from ns.iliad.fr ([212.27.33.1]:57586 "EHLO ns.iliad.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726958AbfFSJmr (ORCPT ); Wed, 19 Jun 2019 05:42:47 -0400 Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id C17B62067B; Wed, 19 Jun 2019 11:42:44 +0200 (CEST) Received: from [192.168.108.49] (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id ABD7320198; Wed, 19 Jun 2019 11:42:44 +0200 (CEST) Subject: Re: [PATCH v1] scsi: Don't select SCSI_PROC_FS by default To: Douglas Gilbert Cc: Finn Thain , Bart Van Assche , James Bottomley , Martin Petersen , SCSI , LKML , Christoph Hellwig References: <2de15293-b9be-4d41-bc67-a69417f27f7a@free.fr> <621306ee-7ab6-9cd2-e934-94b3d6d731fc@acm.org> <017cf3cf-ecd8-19c2-3bbd-7e7c28042c3c@free.fr> From: Marc Gonzalez Message-ID: Date: Wed, 19 Jun 2019 11:42:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Wed Jun 19 11:42:44 2019 +0200 (CEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/06/2019 17:31, Douglas Gilbert wrote: > On 2019-06-18 3:29 a.m., Marc Gonzalez wrote: > >> Please note that I am _in no way_ suggesting that we remove any code. >> >> I just think it might be time to stop forcing CONFIG_SCSI_PROC_FS into >> every config, and instead require one to explicitly request the aging >> feature (which makes CONFIG_SCSI_PROC_FS show up in a defconfig). >> >> Maybe we could add CONFIG_SCSI_PROC_FS to arch/x86/configs/foo ? >> (For which foo? In a separate patch or squashed with this one?) > > Since current sg driver usage seems to depend more on SCSI_PROC_FS > being "y" than other parts of the SCSI subsystem then if > SCSI_PROC_FS is to default to "n" in the future then a new > CONFIG_SG_PROC_FS variable could be added. > > If CONFIG_CHR_DEV_SG is "*" or "m" then default CONFIG_SG_PROC_FS > to "y"; if CONFIG_SCSI_PROC_FS is "y" then default CONFIG_SG_PROC_FS > to "y"; else default CONFIG_SG_PROC_FS to "n". Obviously the > sg driver would need to be changed to use CONFIG_SG_PROC_FS instead > of CONFIG_SCSI_PROC_FS . I like your idea, and I think it might even be made slightly simpler. I assume sg3_utils requires CHR_DEV_SG. Is it the case? If so, we would just need to enable SCSI_PROC_FS when CHR_DEV_SG is enabled. diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 73bce9b6d037..642ca0e7d363 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -54,14 +54,12 @@ config SCSI_NETLINK config SCSI_PROC_FS bool "legacy /proc/scsi/ support" depends on SCSI && PROC_FS - default y + default CHR_DEV_SG ---help--- This option enables support for the various files in /proc/scsi. In Linux 2.6 this has been superseded by files in sysfs but many legacy applications rely on this. - If unsure say Y. - comment "SCSI support type (disk, tape, CD-ROM)" depends on SCSI Would that work for you? I checked that SCSI_PROC_FS=y whether CHR_DEV_SG=y or m I can spin a v2, with a blurb about how sg3_utils relies on SCSI_PROC_FS. > Does that defeat the whole purpose of your proposal or could it be > seen as a partial step in that direction? What is the motivation > for this proposal? The rationale was just to look for "special-purpose" options that are enabled by default, and change the default wherever possible, as a matter of uniformity. > BTW We still have the non-sg related 'cat /proc/scsi/scsi' usage > and 'cat /proc/scsi/device_info'. And I believe the latter one is > writable even though its permissions say otherwise. Any relation between SG and BSG? Regards.