Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6492488ybv; Wed, 12 Feb 2020 13:21:47 -0800 (PST) X-Google-Smtp-Source: APXvYqyUd3vusCKYiWAOHSAmCAsjqx8ErgIzlnRO6dlXvZVf++So5GKt15mSbgFbBtorGX/nGJEp X-Received: by 2002:a05:6808:4c7:: with SMTP id a7mr757061oie.83.1581542507626; Wed, 12 Feb 2020 13:21:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581542507; cv=none; d=google.com; s=arc-20160816; b=rndfpMu694J6hcuGsa6VRwQyTAF0IyWHfYxhpaywTZKJ0aaONm/b93KXcJCbc/9vAi qCcGsXsPKhPedT9HLOLlXIFxcCV82KA8OTlVeQreQfc/dhxRm+HlxK6p1tvHSNDaCZ1s dZsAbavmfiuzQNEzrEvIiH2DWyQF46K96lUuw8WZ6QWdeheSU01PXvcPtQJpjeepJMuz jmZlQCXwlli561Wv3yXxwOP2PUF5O64UPDE418e+f91E9uyXHV3VeZ+J1ZdANrwMmjH+ Zgoxe2mtBQBawfRPdKf3un04UzXkmsDAkFvMzAotlam8MkmuLp8ni5MRiy0ov1ZOM0L0 fHNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=bi/ajAcSYF+LYZcsBqqfzeLw9AKINWKYkZbfFFx957Q=; b=Wnk7j0nbsJhqsFTOQyLg0GAk4jxrh6VAs2OEU027+Y0/hXmuVkHB9Ux3+HhZdl40L+ g48SXuYY3uK4a77idkAUtHTY6wuGwrTa0iNgRtJ9Jlb+5ifo0VYIAgCBP88izLXHwFQ6 4gcoMvGEPq2UGJVM8r/nw7zIiQ+CxGgLcdaqWekw2LK7vnW4k7nni5MDCJVjPc6P4M3s 82VS17DRAuz/U6QQBpFDDvdKFNEjuAkZ8Sx/b59s2Hq0mjNBNlx1pwzcfB3+r8dcDNq2 29pd5VB00IdcRrCDAuaebYVzJLhoox1Wt9dnIeOFhxzTMWeiIUW0VGhTsUKXgD65hARq 1h7A== ARC-Authentication-Results: i=1; mx.google.com; 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 s77si143793oih.51.2020.02.12.13.21.34; Wed, 12 Feb 2020 13:21:47 -0800 (PST) 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; 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 S1729054AbgBLVVa (ORCPT + 99 others); Wed, 12 Feb 2020 16:21:30 -0500 Received: from freki.datenkhaos.de ([81.7.17.101]:38118 "EHLO freki.datenkhaos.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727548AbgBLVV3 (ORCPT ); Wed, 12 Feb 2020 16:21:29 -0500 X-Greylist: delayed 385 seconds by postgrey-1.27 at vger.kernel.org; Wed, 12 Feb 2020 16:21:27 EST Received: from localhost (localhost [127.0.0.1]) by freki.datenkhaos.de (Postfix) with ESMTP id 7666A22882CB; Wed, 12 Feb 2020 22:15:01 +0100 (CET) Received: from freki.datenkhaos.de ([127.0.0.1]) by localhost (freki.datenkhaos.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bCFkDBKXADtd; Wed, 12 Feb 2020 22:14:57 +0100 (CET) Received: from latitude (x4e367a0e.dyn.telefonica.de [78.54.122.14]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by freki.datenkhaos.de (Postfix) with ESMTPSA; Wed, 12 Feb 2020 22:14:57 +0100 (CET) Date: Wed, 12 Feb 2020 22:14:52 +0100 From: Johannes Hirte To: Arnd Bergmann Cc: "James E.J. Bottomley" , "Martin K. Petersen" , "Michael S. Tsirkin" , Jason Wang , Paolo Bonzini , Stefan Hajnoczi , Jens Axboe , Doug Gilbert , Kai =?utf-8?B?TcOka2lzYXJh?= , Alexander Viro , Dongli Zhang , Thomas Gleixner , Bart Van Assche , Hannes Reinecke , Damien Le Moal , John Garry , Martin Wilck , Heiko Carstens , "Gustavo A. R. Silva" , Ira Weiny , Iustin Pop , "Darrick J. Wong" , virtualization@lists.linux-foundation.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v3 13/22] compat_ioctl: scsi: move ioctl handling into drivers Message-ID: <20200212211452.GA5726@latitude> References: <20200102145552.1853992-1-arnd@arndb.de> <20200102145552.1853992-14-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200102145552.1853992-14-arnd@arndb.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020 Jan 02, Arnd Bergmann wrote: > Each driver calling scsi_ioctl() gets an equivalent compat_ioctl() > handler that implements the same commands by calling scsi_compat_ioctl(). > > The scsi_cmd_ioctl() and scsi_cmd_blk_ioctl() functions are compatible > at this point, so any driver that calls those can do so for both native > and compat mode, with the argument passed through compat_ptr(). > > With this, we can remove the entries from fs/compat_ioctl.c. The new > code is larger, but should be easier to maintain and keep updated with > newly added commands. > > Signed-off-by: Arnd Bergmann > --- > drivers/block/virtio_blk.c | 3 + > drivers/scsi/ch.c | 9 ++- > drivers/scsi/sd.c | 50 ++++++-------- > drivers/scsi/sg.c | 44 ++++++++----- > drivers/scsi/sr.c | 57 ++++++++++++++-- > drivers/scsi/st.c | 51 ++++++++------ > fs/compat_ioctl.c | 132 +------------------------------------ > 7 files changed, 142 insertions(+), 204 deletions(-) > This breaks libcdio. cd-info now results in: cd-info version 2.1.0 x86_64-pc-linux-gnu Copyright (c) 2003-2005, 2007-2008, 2011-2015, 2017 R. Bernstein This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. CD location : /dev/cdrom CD driver name: GNU/Linux access mode: IOCTL Error in getting drive hardware properties Error in getting drive reading properties Error in getting drive writing properties __________________________________ Disc mode is listed as: CD-DA ++ WARN: error in ioctl CDROMREADTOCHDR: Bad address cd-info: Can't get first track number. I give up. -- Regards, Johannes Hirte