Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1306029imm; Wed, 23 May 2018 13:52:55 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoNwTMfuUqmQ0gTLp9LKirj77m7EwQli/u+EPvdaMTlmuIsTcI6PDWk5lETrvIUPe9WobQa X-Received: by 2002:a65:5883:: with SMTP id d3-v6mr3487686pgu.131.1527108774973; Wed, 23 May 2018 13:52:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527108774; cv=none; d=google.com; s=arc-20160816; b=qyn26DIeHo5Ke4Ade6p1II7H/nw971ClYnK0JuOXkCvE2TvkNBhtRxI5GB4QQ0HXwK g2GyoFrKCqWShd5DNioGX+H3DA5/G0hvu9+mJOrHx7vkO+2XkbALIcGncAFe22VVYTbd F+zVEEPUr6py2SsDbqMZQiEot+mHzustFoTBeIAJTfVpPqEfO6K70SzZOFzbTcSv76jg bFKruZFVuGxkhQaNftvB/w/yVLwn3Bt9HLnLbsVwpdxGyO0Ge+6gp0/U5Ab3WY1DjP8j 1KAzZMVEJoUVDL5y9oqXO0hS5WdRWkPuAyaZggVLDYEpF4Wx+CIYHzwLLDasYzwL8W3C KOYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=GS0uwzNz/1NzLtTZ0s5t5sw0QszOnl9R6tmknU1T+7U=; b=tuHtVAJBlcMFwog/5qC33i4ginw0XtS+/T2OEglH79EUbzV+2rvb/dTUlcoqh0Lw/T FGTXId4JgOm9TvFVxwcq1NT36efGvvVqUc7fMVb+G8UQxHEXVqcmC9sK4J6Lw2zh+sE1 jlDMxLAfH4l/BkmC4jT/k18noZp/FpEA0EcyniawU1is7suh0f4By0RlMGjaBPYUXVWE 4oxXHGg8Qcz2ggy7ni7uFtk+nMsv7oftF7H1Cz1F0jQs6N0R3RN4hh4SYSdgGaKEUC+9 i5G1y/HAa3hAZB2HpxzQqkit2prkbNDke3zC59ChJ/slYhinlCneJVndsHrUtR6mVfNe zEAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=Hbjn2jrB; dkim=fail header.i=@chromium.org header.s=google header.b=NhBWWDOT; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h19-v6si4795388pgv.501.2018.05.23.13.52.39; Wed, 23 May 2018 13:52:54 -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=@google.com header.s=20161025 header.b=Hbjn2jrB; dkim=fail header.i=@chromium.org header.s=google header.b=NhBWWDOT; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934626AbeEWUw3 (ORCPT + 99 others); Wed, 23 May 2018 16:52:29 -0400 Received: from mail-ua0-f195.google.com ([209.85.217.195]:43192 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934676AbeEWUwE (ORCPT ); Wed, 23 May 2018 16:52:04 -0400 Received: by mail-ua0-f195.google.com with SMTP id d4-v6so15678606ual.10 for ; Wed, 23 May 2018 13:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=GS0uwzNz/1NzLtTZ0s5t5sw0QszOnl9R6tmknU1T+7U=; b=Hbjn2jrBShxUYP4IzBvftkzoRAfldDsa9EjocADCP/nYT+0xBPP2lRl/VLzYQ+VwZr T+rYoQ83MkfZo4BsTjhx/SXVMQhDigy5eY7s+/5ChAx1Llekqqe2Mfw/87vV0m3KHyNU 6GISk9CcUQNAPhSCYnn6Mq0laPNunsa/3/WUQD/bKBT+si0c42G6iBKi0JBJJK/TlXJb gD7WCv7s/Nk8AL1W4GFjB/nfMU6QHWEv14TPnHFEGn0d/mNI5ST5GOf25pBwVWk83KeT 6mHtnaBznSfcoVk1VV4ydSOqCYEgkIYbS+E2g+BbMVgjGYFrue2BA0J3h7pxFy6vU6S/ 5QEQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=GS0uwzNz/1NzLtTZ0s5t5sw0QszOnl9R6tmknU1T+7U=; b=NhBWWDOT52EDtfFK/Kbxzq1dG8iOCBQZthHqmrcsDymanvkZxRg52/0p95ChqRE4ZJ JbGEUkLdpO7mykef0Pouh27ir5SfrghO2T5KhwooyZP8iE+u1cMsDaDCNzBKcl1X583f TGTFGv/AnZ9u1JkDO+TAwtZ/EzVOaB07lKaMo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=GS0uwzNz/1NzLtTZ0s5t5sw0QszOnl9R6tmknU1T+7U=; b=F6N9LkL9z+4Kxz69Caxe275DFkhTdjMU21FL/BSmXzu1F2WY81VuQQjmKzSB+qiZ+H tILZiGzzeroByUdDG4rZdr6BDer3dV5WhEtxzOc4uI1zkjO38RAvCMqFXp3ZconU5MLy JzAefC5OIBqv8hd2+YJmJo58v5HYdOidoPygQIErY9KrJV/l6Bf3p8PksyuZw3pXhNx0 VhoxNu0k5P+5VPscBvHD4TUGuVuOXYx3lqBt5PIJpPzjEKbE7TY7HTG1KKep1YE3W5b/ vSkjJhkmnYGxD/8y2giVGN8ZfRcz8xWGvltCG0N/tPKRQUZNmq6f9vLyHm5tcX1dvCNj IrPQ== X-Gm-Message-State: ALKqPwfLJyqK3tkt2IHJ/fcb16R/fCTJ7YhaqwcoATVoSyboISgz4yxy vNbsjKDZn4E2SKF3ywpNRcEve4HHR18h8EiwKUumqQ== X-Received: by 2002:ab0:4ce2:: with SMTP id e34-v6mr3062962uag.0.1527108723584; Wed, 23 May 2018 13:52:03 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1f:bd1:0:0:0:0:0 with HTTP; Wed, 23 May 2018 13:52:02 -0700 (PDT) In-Reply-To: <24d36869-e037-042d-cb16-20a81b34eb76@kernel.dk> 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: Kees Cook Date: Wed, 23 May 2018 13:52:02 -0700 X-Google-Sender-Auth: k6Hqdm_oG2MkwiBabSDJ9usvl-U Message-ID: Subject: Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI To: Jens Axboe 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -Kees -- Kees Cook Pixel Security