Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1326863imm; Wed, 23 May 2018 14:14:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr7/vB9ubVvMQQceS+/deslwY5rK2hf+39px3JVWQjKXHUaMmf2N6lGgxn0OKCpidP1ePAR X-Received: by 2002:a63:31d4:: with SMTP id x203-v6mr3398254pgx.389.1527110093426; Wed, 23 May 2018 14:14:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527110093; cv=none; d=google.com; s=arc-20160816; b=V1mD2HPoil2JNyYMDNZ4w1S6zvkU33BQ6qNVkP2tipEEKTbWPYignDR6Lf6pGKb4iq unL2WvWnVjptSljnhJm4i5rSzjK4qwmzn5abnktedfFMiVFduYstQ8yOxl3PKhO4yuWx kwhWYYICc5N/cbWNmQM82nuEwubNJhfx1lrGgc/VuyZisLAaTw0dKthoe94SKi/H8kwG dJaE8/VClEmBK6A4FXf61X0hgl/d+EfMXaRIo/ilZIpvtCmOegBSiUaGPrJ/IDoqwkcf +MFUZJHd/xD+vciZzEqoT+y7SUN+807RKeDFugpdMunWs6SzN9nGSx5Odvp4Dh7UYMrD 9c1g== 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=YaEMocFPBTY4TxSWMfF1LgmxbtbnvBOjnun5h3NdDz8=; b=szK3SwjYenv/FdACFaMpkIcdd21dt6XG+CkRx0RoMjkM4fDdQPBTfwlG6NuiNDo8dI oXzZ38b9BBCWDiXZ+PO5ksKJAtbPufxLsR2swa9NbxvDASYe5S8/ovNlUz1emAvi6YCD TfFPQpNcZJcvRQc9NNSzu4OGvzzoBBHy4swqjwDTXdP1dT3xm9fco20PVNiHOjg5mtSU 1pUVQLZ8ZOV3RYe14QsLCEUCKwhL1ZkmNY0J2DYku44/twpTtdQfaPZ8Iq1YBFsS5BPs BxH/pH1E3HqFNWB5Lohn5pzbaPYih7CWusal8PRMdT7WIZc8tRjTWjRU5oVCJA8rbDYk ua7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=ci7juEPv; 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 p67-v6si18780002pfp.72.2018.05.23.14.14.38; Wed, 23 May 2018 14:14:53 -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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=ci7juEPv; 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 S934889AbeEWVO2 (ORCPT + 99 others); Wed, 23 May 2018 17:14:28 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:54866 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934317AbeEWVOY (ORCPT ); Wed, 23 May 2018 17:14:24 -0400 Received: by mail-it0-f67.google.com with SMTP id z6-v6so6263154iti.4 for ; Wed, 23 May 2018 14:14:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=YaEMocFPBTY4TxSWMfF1LgmxbtbnvBOjnun5h3NdDz8=; b=ci7juEPvOqxR3+A0Tb6elcx629jsLwvDqHuTFzlZk/fRcsh53kA8dRwr2b7F4fqbyu wJd8+H4NzWhU06WliU85jpooQBpatI/L5/wE/xj6QV/YHGrB7SsrHQXNoguL9R3RJQ3l 2tCMR4psDtUxR6tgHDwFTcbwYZeGcvIUWSMOLRbIyktfLo+7hgt2W57ki7wcxfRJMqCV LbdVoBYsctImwyXGK3HBIB1Hvsog9JNQiMxeRfOToUm2B9iZfwFQnk2ZyOcKwKed6yFQ RckRxVnqsMiy+bO+fWtQVH3/j0f009rxn7/Sj60GnrDq/GkAt+c30XlHXY0PGnF6//17 O/yw== 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:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YaEMocFPBTY4TxSWMfF1LgmxbtbnvBOjnun5h3NdDz8=; b=Wv1/DdRWE4ypWu6ZHTFJ8Xx0576xPRFeelLmdDRN63nAwd+CjimQ8aA2sbSju2CwJ8 rXWaC9f9WTwdR1xUgvqk/6BElSQmrUCvw3nAVZIR9YAx15c4ol2QWPYXYoMycarx4+7B ZCkQa373U4TEQNujoumbUM8v3qP6DuVMCz7Ant7zyP5r99P5xe8BH90ei7AApGWYVILi Zj+Xe1aLH97+d502EWbmR7zydGnTOD9xzWb1RHNOcDQ8ZHddj1eKCkv94rd7ZKMYCe0v QVq1xZGKEoQ4bkJjXFUW/UslyGoS//4ypmKZ3sy8BP/rMVbE2/ZmCqvQXP7W4HfGDm9h 5Tdg== X-Gm-Message-State: ALKqPwebUIG217DwIRI3oMLLeAN2gGtJNzDxivqMlzz1P2K1XeKJlRdx cE/Z/d9aV5WzEtOV/cxvc5BN0Sl2g54= X-Received: by 2002:a24:1c0b:: with SMTP id c11-v6mr6920326itc.137.1527110063566; Wed, 23 May 2018 14:14:23 -0700 (PDT) Received: from [192.168.1.211] (107.191.0.158.static.utbb.net. [107.191.0.158]) by smtp.gmail.com with ESMTPSA id w124-v6sm10876620iod.39.2018.05.23.14.14.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 May 2018 14:14:22 -0700 (PDT) Subject: Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI To: 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: Jens Axboe Message-ID: Date: Wed, 23 May 2018 15:14:19 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.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 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... -- Jens Axboe