Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp186188imm; Tue, 22 May 2018 16:40:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqXptBv1XfFT5iy5XDhYeXMZorn+eAzdbWrlrOw2g/JS2dx/CNvv46YmWpjx+qyKoB5K7m2 X-Received: by 2002:a17:902:341:: with SMTP id 59-v6mr517392pld.324.1527032419848; Tue, 22 May 2018 16:40:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527032419; cv=none; d=google.com; s=arc-20160816; b=cR6AorzD1wVSa3OBx74b6gAk3MnyBUfGII+cYN8Ls4RuE6OFDVYFSAi3h72wNrhQ4m Y0dp3rpaI1NqgkrWokTbHG6jLPOnSqEZ6aNS5Il2zCguE+i2m+DeL2iDX15bm0d+EvDS ypgCYPUnl7l5coDXVGZaz8sUBtIkBwQNAxIcovMX6RzCwLWAgfWICIFbTivQIYySslIZ YSCtXOLYSXnhChFUHQ2kiGCwsIil8k9/D3kwpnUOuhM+Vm2SZDYhCEpr7IDu2jJiIxoV 5YDC+A+U1Bir2tCX7Fd1d4ydO0g54sk15Gy+pAFWsKFumaq0ZMWzp/Jzp6ahJ1b1psKD gdQQ== 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=boLUBnBT+z3ym+GtkNb9+yC4pOuzjRqUXfilwouph7w=; b=K1ZJSrdNYFJZRHnGW+mogmY+vgUzd3VrWMXjhFQQPyCkrUNVod8IuFI/wBupoUluuS rNPO5r8R1uyIJeEIYgKLcTyhLsPPIDa1sxgY4ZHQkBynWEzBiTNJrZ8qlCsX9UWUTEa3 76AgQ4g3Ka25ThkWDunTbo6cTfLArDHCLYYKVI7bl+KGZaTao1hugWgVFTibdKx+VMVC pmZgWZpTs4dm/c6pXebxIY4a+UU9f+39dEB1iDQFezv3t7pQK+Xk+QqYBPoDkwDlfBX5 RjJn5iltID9VeIJv0AEuS8snA9qQKFgDW/fZrnVv0p6ttxT1YogoS/ZjbIuBKiA3Hqeu KOog== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=mtaXm1B/; dkim=fail header.i=@chromium.org header.s=google header.b=i1WYxeXg; 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 k14-v6si14003632pgs.418.2018.05.22.16.40.03; Tue, 22 May 2018 16:40:19 -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=mtaXm1B/; dkim=fail header.i=@chromium.org header.s=google header.b=i1WYxeXg; 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 S1753402AbeEVXjz (ORCPT + 99 others); Tue, 22 May 2018 19:39:55 -0400 Received: from mail-ua0-f193.google.com ([209.85.217.193]:44322 "EHLO mail-ua0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753100AbeEVXjx (ORCPT ); Tue, 22 May 2018 19:39:53 -0400 Received: by mail-ua0-f193.google.com with SMTP id h15-v6so13515886uan.11 for ; Tue, 22 May 2018 16:39:53 -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=boLUBnBT+z3ym+GtkNb9+yC4pOuzjRqUXfilwouph7w=; b=mtaXm1B/nQYqtMI3NPlamwqnEgv9T0hDlcfWJuDXFEcEvkOiLXZr8M/Vy1NFG852QH a/zoYn6nP1rvC2xiH7aIrKNCkuKl3B1cLZcE9/wKKAOoQmx5BxcFR0Gn0YEBgAR6XjDX 5VPMCS7FMXImsXVIEAMqEhfl9CACuvsCcXMwYZ5tCbPaxisvYzxRQG5ONubnj220PllV wu1yWBDwIIeSjpaw3SxOhOkihFaQj1wpXT2la76fWlFYQQ5O6rZmhFBzx/JfbTvJ9BLL W6WOFDJoG6If6yNI+ZwWnvb641PU8gllXx/gIQoa5R0IbbWhQc7gvDSbBBVbYN2JYTk9 9LgA== 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=boLUBnBT+z3ym+GtkNb9+yC4pOuzjRqUXfilwouph7w=; b=i1WYxeXgHehc7x236C0ZuTc8Xxk5nHH6FnAoKJQDqmAV0Eyj0HDCcemj/OKeaglDI/ QdmZtx4QKHzXwswH7XHYSl4ml5UpLCWqJBxiJ0O9SF9YyZQvPCQTRvNge08e/WqZhZda K1NUfVEXATjRh8TIHgaQF0DW5YFQV9/1FQpmg= 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=boLUBnBT+z3ym+GtkNb9+yC4pOuzjRqUXfilwouph7w=; b=gO11ZLteQnWrKApdaamNGuZBgPSi2MURDjk1rvaKIOM8NMDN4h76e3moTtjas8UhuF n/WrzeYFkVzvDbuSFxndyf80NCSHYqch5HF6OmOnSoXejCs+i7cvT+J1FNj3XVH6MYZF BnMh2I72MsGY4ogIdIf4VocK5PNVEfHiX7o7q8RAgEMlZVGX2TWYLE+G6Xfi3XmL1f+c lBMzb9VbIT/IEqF6tts5qcJ08Zw+9NQeCgj190s6V5OlxfisZ2CLxelwDBhmU7Zyzfc3 pTVnN6C4qYC2DY/XXuWa1rUAeosI2r/pjygtU83hp0xnjR1toeQYJfqsKP3Oj4XTFYpk Hn/w== X-Gm-Message-State: ALKqPwfjp3zc/b9YHrdMAb3w04nKpSaL2B1rGXYlFb84UyYB4ScnwKkR h3hYpo40WCaIAqLWPtbh4k0KEUBDeBn+G599HhonFg== X-Received: by 2002:ab0:2508:: with SMTP id j8-v6mr379112uan.83.1527032392387; Tue, 22 May 2018 16:39:52 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1f:bd1:0:0:0:0:0 with HTTP; Tue, 22 May 2018 16:39:51 -0700 (PDT) In-Reply-To: <66701f74-4f2b-988e-dd48-a2140694f551@infradead.org> References: <20180522181512.39316-1-keescook@chromium.org> <20180522181512.39316-4-keescook@chromium.org> <20180522183613.GA3784@infradead.org> <732f4249-5681-4a54-ec21-4ecc3d3a74e5@kernel.dk> <20180522191309.GA23615@infradead.org> <8d4af5c4-96fa-54ee-d5c1-b887b1de5a3c@kernel.dk> <66701f74-4f2b-988e-dd48-a2140694f551@infradead.org> From: Kees Cook Date: Tue, 22 May 2018 16:39:51 -0700 X-Google-Sender-Auth: XBQ5OcceWCjlEohc0rq7ZM2a_Cw Message-ID: Subject: Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI To: Randy Dunlap Cc: Jens Axboe , 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 Tue, May 22, 2018 at 4:34 PM, Randy Dunlap wrote: > On 05/22/2018 04:31 PM, Kees Cook wrote: >> On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: >>> On 5/22/18 1:13 PM, Christoph Hellwig wrote: >>>> On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: >>>>> I think Martin and Christoph are objecting to moving the code to >>>>> block/scsi_ioctl.h. I don't care too much about where the code is, but >>>>> think it would be nice to have the definitions in a separate header. But >>>>> if they prefer just pulling in all of SCSI for it, well then I guess >>>>> it's pointless to move the header bits. Seems very heavy handed to me, >>>>> though. >>>> >>>> It might be heavy handed for the 3 remaining users of drivers/ide, >>> >>> Brutal :-) >> >> Heh. I noticed a similar sense buffer use in drivers/cdrom/cdrom.c >> too. Is this okay under the same considerations? > > No. Do not select an entire subsystem. Use depends on it instead. I looked at that first, but it seems it's designed for that. For example, "config ATA" already has a "select SCSI". It does look fishy, though, since "config SCSI" has a "depends" which would be ignored by "select". Luckily, all these uses already do a "depends on BLOCK" (directly or indirectly). -Kees -- Kees Cook Pixel Security