From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751865AbdIUO7q (ORCPT ); Thu, 21 Sep 2017 10:59:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58384 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751804AbdIUO7p (ORCPT ); Thu, 21 Sep 2017 10:59:45 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CC04D4A6EE Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=pbonzini@redhat.com Subject: Re: [PATCH] block: drop "sending ioctl to a partition" message To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-block@vger.kernel.org References: <1506005362-13429-1-git-send-email-pbonzini@redhat.com> <20170921145300.GA1617@infradead.org> From: Paolo Bonzini Message-ID: <7717bb8d-4223-9401-f9fa-0deb6d33f784@redhat.com> Date: Thu, 21 Sep 2017 16:59:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170921145300.GA1617@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 21 Sep 2017 14:59:44 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/09/2017 16:53, Christoph Hellwig wrote: > This looks ok to me, but do we even need to keep the special > cases above? Is there anything relying on the safe but not very > useful ioctls? No idea, I stuck to the usual "don't break userspace" rule. Honestly I doubt anything is using most of those ioctls _in general_, not just on a partition. Paolo > Condensing the thing down to: > > int scsi_verify_blk_ioctl(struct block_device *bd, unsigned int cmd) > { > if (bd && bd == bd->bd_contains) > return 0; > if (capable(CAP_SYS_RAWIO)) > return 0; > return -ENOIOCTLCMD; > } > > would certainly be nice.