Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4520900imm; Tue, 11 Sep 2018 13:13:57 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ1Bu5t58fSNct7mfl2jk49mApAKZnPoSlh/OrFT1OJSTrtFt5LU+TwBQNjQcCAiq3qz9co X-Received: by 2002:a62:3a08:: with SMTP id h8-v6mr31184869pfa.61.1536696837841; Tue, 11 Sep 2018 13:13:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536696837; cv=none; d=google.com; s=arc-20160816; b=f8ZEWyekgSvSILO7BgH89mqmDYTpTlv5JSqG/IzmJfojiwYWWsAn8MYroilPPI/Udn KRE7iXkp/VmpCWgRcYDCz/OyE77H/HWD2L8/0VInQygWlX3EtCjAYh9nNp48WJ48jRB9 /MTYoRbup/5d3lWsIo8rGq10eliJacKp1z5MKf4zzPwwwUg3vepg0NtCIOetENjMN71X SuFOQnuwSKKIroJjlE9H1PYkIn3IW1mAwW9F5xcIJWGEw1i+8MzvR0qBO9sy4knefNlk 4hNxUUOWIwuK6jyOaIzsAl/GuB8Hrc2b7pnQszYcYuS9m6Srmo3vymt1sdwx3WoddIJy lEJw== 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 :in-reply-to:references:mime-version; bh=x1GBRmA4/IEKBFZdUX8kqXiwNtIxV8BkEEJ+V4/1vEc=; b=dwu/9+th3J4ZBfMqUGZnRYjG/kUHUs7LW3EL+7nwcKgokuzPBoiiSwO5AoOa9e2ptZ Om4W2JXW2T0CKaI4WlGUMdb6H7FDxVuZFpxMtL/d7EYxuLPd5v9+dsEJeKU6O3TnUIlr w0o8f8LHb0yFWUPTGe03P/iaANice2zslfOsy+/YNv16JUcJrANpq6phkAcuGPYU7xIp M/ew092mUoJrRRtvVwbcMbzDRQjNSMxLXMNvWT34D4TWHyZbsD/E7KY7K6B56vgMrfyx yZ1E9+1lcF6MoHKoiv9skv7XARcJA3rl9Ee81JnvVcfddty/YqBgeSuljE7RsWekS2Ff 4d8w== 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 j21-v6si21592958pgl.8.2018.09.11.13.13.42; Tue, 11 Sep 2018 13:13:57 -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; 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 S1726981AbeILBOa (ORCPT + 99 others); Tue, 11 Sep 2018 21:14:30 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:38172 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726720AbeILBO3 (ORCPT ); Tue, 11 Sep 2018 21:14:29 -0400 Received: by mail-qk1-f193.google.com with SMTP id g197-v6so17640096qke.5; Tue, 11 Sep 2018 13:13:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=x1GBRmA4/IEKBFZdUX8kqXiwNtIxV8BkEEJ+V4/1vEc=; b=rRjS/uj271mkRuucVLr+Em3G4uExBlshSxqjilK7g3QXUoJpx8UrMCqUVXAZFevFmA ucwlrrMh1yA/CbwlPeTdfIjVSsyNx1BFeuoWUTXAoXj1xviKEB37NIjKXZxJKU5wvVKp 3neBnYawiOphPL1VurvXFO1AksyP7zI0oDMaRN24Rz30BAZCJ7e7L7TIw1r40arNXEVP 9ldPq1g8hB2whbbpk5NIkUOGswIc7UtkyrUbKFiRXh+Yo4lK7Q97yGETxaUr1vANglgJ C0iUF2gGYLb9FGU7jQGFnk4YrqPB2glNvidN9A+eYSwT5c7I7XYn5ft8nchZDp5n5nJJ Pgxg== X-Gm-Message-State: APzg51CpNKmP1GyRR15K8YdjK2PNOLVcMPaBPUsfiemyaqhLV3dBqLLg FJUZVrEE1IbdO8UQkMc9RDBFfN9TwQz7YgeQTW0= X-Received: by 2002:a37:7347:: with SMTP id o68-v6mr85655qkc.291.1536696814333; Tue, 11 Sep 2018 13:13:34 -0700 (PDT) MIME-Version: 1.0 References: <20180908142837.2819693-1-arnd@arndb.de> <20180908142837.2819693-11-arnd@arndb.de> <20180909043746.GF19965@ZenIV.linux.org.uk> In-Reply-To: From: Arnd Bergmann Date: Tue, 11 Sep 2018 22:13:18 +0200 Message-ID: Subject: Re: [PATCH 11/11] compat_ioctl: move tape handling into drivers To: Al Viro Cc: David Miller , Martin Schwidefsky , Heiko Carstens , osst@riede.org, "James E.J. Bottomley" , "Martin K. Petersen" , Kai.Makisara@kolumbus.fi, Linux Kernel Mailing List , IDE-ML , linux-s390 , osst-users@lists.sourceforge.net, linux-scsi , Linux FS-devel Mailing List 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, Sep 11, 2018 at 5:36 PM Arnd Bergmann wrote: > > On Sun, Sep 9, 2018 at 6:38 AM Al Viro wrote: > > > > On Sat, Sep 08, 2018 at 04:28:17PM +0200, Arnd Bergmann wrote: > > > MTIOCPOS and MTIOCGET are incompatible between 32-bit and 64-bit user > > > space, and traditionally have been translated in fs/compat_ioctl.c. > > > > > > To get rid of that translation handler, move a corresponding > > > implementation into each of the four drivers implementing those commands. > > > > > > The interesting part of that is now in a new linux/mtio.h header that > > > wraps the existing uapi/linux/mtio.h header and provides an abstraction > > > to let drivers handle both cases easily. > > > > Ugh... Frankly, this bool compat passed all way down looks wrong. > > I can live with that; the question is whether block folks will be > > OK with that thing... > > I have tried to come up with an alternative, but couldn't really find anything > that is less ugly. Since nobody else complained, I'll resend this version > along with the other patches. Actually, there was one idea that Deepa mentioned for another subsystem with a similar issue: instead of passing down the fact that we come from a compat syscall through multiple function calls, the lowest ones (put_user_mtpos, put_user_mtget) could call in_compat_syscall(). Would you prefer that? Arnd