Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5113401imw; Tue, 19 Jul 2022 21:52:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t4dVBhUg8ezZjV7szHGh7VKp5sje3Zy3G4i5lMpcspyA0hbZzNd3X3DH0/OhI0ZK5QAUYW X-Received: by 2002:a63:8741:0:b0:419:f886:4f9d with SMTP id i62-20020a638741000000b00419f8864f9dmr19105272pge.612.1658292722713; Tue, 19 Jul 2022 21:52:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658292722; cv=none; d=google.com; s=arc-20160816; b=RJul86xy7w+8ijR4zGcgl5oiiOuPz3trw1tjiKvnGk8EaLJNSpAMnYyVi7mudUnPbV U17o0LxhsAtwkpquHh/RjXtOoUYTW5CSr3VylLLwEux4HOnFGQ7V6uxD/T4MzyVwB0tR 78fDTi3Gv/LbzmqL9ScHf0RPHMaEG+wGscCJ2MKfcdUfxsX8mLysw/ER8hz0ei37WbJa N1uinC3QhYuUuIOt2d4yGfCsQba6aEPQjNcqmnuWFniJKqo5lyp5d2ILVlgESBUobuXN rSYbpgJl6DcvLUax2PVYAydnzYae7Vyw6lex2TSDVkLsghUghpKDnt2J+YxNt3ue1UQJ mdPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=VznV8NdwkqLryGhh9Q/KVPrJyajGhRQpj8qYol7iDY0=; b=QkDQ+1WrPKJkZegGYW2mSQCtIgKcljdfVMa1jpLNn+X1BqItZntGQGUZqjfiyMqWUX 2aliVWCs81nsJ4Mjoalt7f2pZlfpu6I4GKHu4DmwhAM8fgccmGJreQVKJS+/n96cK+VM usUBGhYJhcG/4G3t1iZCw7VHZ9s9iUrYr4fahFlgHtPTHAWXkWRZRrnGh14fmRQqVYn7 6fqzApqE8IaB1mg1ROvBURYWMw6ceMT/zsrVqZeOaz4YVuqyVurNi/GIy2LkNLzGFS9v p+NBdd+Wz6Q3LKj+8AVkZswFTK6DV+qEg8ytNVD5I/eZcmMQWwGlCN4/0Sl7xT9i4BBV gxVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p7-20020a634f47000000b00415ed04e2desi7491142pgl.13.2022.07.19.21.51.47; Tue, 19 Jul 2022 21:52:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235642AbiGTE1c (ORCPT + 99 others); Wed, 20 Jul 2022 00:27:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbiGTE1b (ORCPT ); Wed, 20 Jul 2022 00:27:31 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0AE76B75F for ; Tue, 19 Jul 2022 21:27:29 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 6108968BEB; Wed, 20 Jul 2022 06:27:26 +0200 (CEST) Date: Wed, 20 Jul 2022 06:27:26 +0200 From: Christoph Hellwig To: Nick Bowler Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH] nvme: Define compat_ioctl again to unbreak 32-bit userspace. Message-ID: <20220720042726.GA5574@lst.de> References: <20220720015538.15838-1-nbowler@draconx.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220720015538.15838-1-nbowler@draconx.ca> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 19, 2022 at 09:55:38PM -0400, Nick Bowler wrote: > Commit 89b3d6e60550 ("nvme: simplify the compat ioctl handling") removed > the initialization of compat_ioctl from the nvme block_device_operations > structures. > > Presumably the expectation was that 32-bit ioctls would be directed > through the regular handler but this is not the case: failing to assign > .compat_ioctl actually means that the compat case is disabled entirely, > and any attempt to submit nvme ioctls from 32-bit userspace fails > outright with -ENOTTY. I don't think wiring up the native version is the right thing to do, this needs to be blkdev_compat_ptr_ioctl, just like we use compat_ptr_ioctl for the character device nodes.