Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1332517imm; Wed, 23 May 2018 14:21:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZprDxCRhVIWnmoHTC4Wh5SBeZD6VqnDUSAxCz80dhJDXg/0lhKEKblmWwXaun+Xq8K7bScS X-Received: by 2002:a17:902:ab98:: with SMTP id f24-v6mr4420580plr.144.1527110480089; Wed, 23 May 2018 14:21:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527110480; cv=none; d=google.com; s=arc-20160816; b=sxcndkdUm0S5Lh8j/T/hkvlo91lsLc3GQDzrwYHpAtPuqXtjT3Hob1jwfx4ZiHNzRQ T0cgQco+qwfxtZibALzYNUuiiDTv65ulPMv+V3AMmC0IXXkVxQAD0s4qzyEMj1BAqrjL 3X2wcpFkwyQJJphm1uCcvO8YmSfovsL6WA8qXBj5P4fJvcgfngp99WgR0v/L8eVq1fZR FWU0skI9acS39pDhiwFOhoXww7KCVRgZC8xmXZjd7Qgi+O9Ea4QTXU6elWkiFx3DtAJH I0tRBO0BRZz6ZvmNhCjDRSZHEzkxciW4uzZcpqjT2Jgab0cVm0tdJGd00Rk6kvWdaSCX GJoQ== 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:dkim-signature :arc-authentication-results; bh=/BTvqMzc8IjvaeOP0BwJ/M5iiyBLQyBJwaIULvEo+5A=; b=jdZtzflPOHhTGWRke5vPf4DwkFKMAZr0cjDF1CU8gizLFPvH/X4XvEZDQBDki9fzkC sba6J2I9DKwwz3CJ1mPc8GVoATUyYJ3VKcFuylSPOJnOvgoI6uglC1cKpFV4c96rTYXg 8ENGQWmMLZbLfCqeISVuvg4L9a4B2Dda03zeAsH/GLwczVzKx8GFT9IrfmSV3Up3PiS3 rKWsHkNoLZNbJOCr2tV9WU9mFxni0z7GqsqcyU5pfHFUl3P27cjS08YY4pJZzn8dth7s sLYNnToSgXrx7++4dENAV2hPkm8in6lVoYYBAeJ46K92XKVwTKqc98cfD6Fp31f7HiOt hokw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=05icLEUb; 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 a36-v6si19708703pla.575.2018.05.23.14.21.04; Wed, 23 May 2018 14:21:20 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=05icLEUb; 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 S934491AbeEWVUx (ORCPT + 99 others); Wed, 23 May 2018 17:20:53 -0400 Received: from merlin.infradead.org ([205.233.59.134]:54248 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933886AbeEWVUs (ORCPT ); Wed, 23 May 2018 17:20:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=/BTvqMzc8IjvaeOP0BwJ/M5iiyBLQyBJwaIULvEo+5A=; b=05icLEUbx83mGPU/JAObgXjP+b Qlklk0Os/HyqnON/GaxNWNmvYvw8w5WKQii1TLNTxh7oIBivcUi4LZnWaf8vNIMUMftcaUXm5lBz+ TsMMB7mAnCLz1fz4worsP4e2EJeIRV+cQ3jecnIutYrudBnzM38YBaDOC0Gg+cNTliyGECrHxxLBB SDqScKcvaBv/Zuw/s7KqakDzgpV2Qoxj317GwYHqfLoMnbzhwSLrJJf44sZvcqkgmohNukCRuzhbg UbeEJHBN7zLgMaH9uhSiNdFB6AmIKoY8FXWFwyK/pGtdYy1sziqWDo/4PNaZOs14m2n2molR1t9WU QA57D8RA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=dragon.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLbBe-0000ip-V9; Wed, 23 May 2018 21:20:47 +0000 Subject: Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI To: Jens Axboe , Kees Cook Cc: Christoph Hellwig , "Martin K. Petersen" , James Bottomley , Tejun Heo , Borislav Petkov , "David S. Miller" , "Manoj N. Kumar" , "Matthew R. Ochs" , Uma Krishnan , linux-block , linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, LKML References: <20180522183613.GA3784@infradead.org> <732f4249-5681-4a54-ec21-4ecc3d3a74e5@kernel.dk> <20180522191309.GA23615@infradead.org> <8d4af5c4-96fa-54ee-d5c1-b887b1de5a3c@kernel.dk> <9A0BC289-4203-4C77-A012-AAB07F42061F@kernel.dk> <20180523142545.GA16248@infradead.org> <24d36869-e037-042d-cb16-20a81b34eb76@kernel.dk> From: Randy Dunlap Message-ID: Date: Wed, 23 May 2018 14:20:44 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/23/2018 02:14 PM, Jens Axboe wrote: > On 5/23/18 2:52 PM, Kees Cook wrote: >> On Wed, May 23, 2018 at 7:31 AM, Jens Axboe wrote: >>> On 5/23/18 8:25 AM, Christoph Hellwig wrote: >>>> On Wed, May 23, 2018 at 08:13:56AM -0600, Jens Axboe wrote: >>>>>> Should I move to code to a new drivers/scsi/scsi_sense.c and add it to >>>>>> drivers/scsi/Makefile as: >>>>>> >>>>>> obj-$(CONFIG_BLK_SCSI_REQUEST) += scsi_sense.o >>>>>> >>>>>> Every place I want to use the code is already covered by >>>>>> CONFIG_BLK_SCSI_REQUEST, so it seems like I just need to know where to >>>>>> put the .c file. :P >>>>> >>>>> I think this is so much saner than a SCSI select or dependency, so I'll >>>>> have to disagree with Martin and Christoph. Just put it in drivers/scsi, >>>>> if it's the location they care about. >>>> >>>> I actually plan to remove CONFIG_BLK_SCSI_REQUEST in a merge window >>>> or two. The only users are scsi and the ide layer, (virtio_blk >>>> support has already been accidentally disabled for a while), and getting >>>> rid of it allows to to shrink and simply the scsi data structures. >>>> >>>> But if you want this for now lets keep scsi_sense.c in drivers/scsi >>>> but depend on CONFIG_BLK_SCSI_REQUEST, that is easy enough to fix up. >>> >>> It could be a stand-alone dependency, doesn't have to be BLK_SCSI_REQUEST. >>> BLA_SCSI_SENSE or something would do. I don't care too much about that, >>> mostly getting rid of the entire stack dependency. >> >> Aaand, I can't do this and leave it in drivers/scsi because of drivers/Makefile: >> >> obj-$(CONFIG_SCSI) += scsi/ >> >> So: this needs to live in block/ just like CONFIG_BLK_SCSI_REQUEST's >> scsi_ioctl.c. I will split it into CONFIG_BLK_SCSI_SENSE, but I'll >> still need to move the code from drivers/scsi/ to block/. Is this >> okay? > > Ugh, so that would necessitate a change there too. As I said before, > I don't really care where it lives. I know the SCSI folks seem bothered > by moving it, but in reality, it's not like this stuff will likely ever > really change. Of the two choices (select entire SCSI stack, or just move > this little bit), I know what I would consider the saner option... > or option 3: obj-y += scsi/ so that make descends into drivers/scsi/ and then builds whatever is needed, depending on individual kconfig options. -- ~Randy