Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1267984imm; Sat, 8 Sep 2018 21:19:50 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbs0Tdu9Zoo4nTJCTEqrg2xCSzNvAGiKV19cnwM1c1KaLrA98KY00P1JiigQu5VdovkXD41 X-Received: by 2002:a63:4506:: with SMTP id s6-v6mr16250849pga.422.1536466790551; Sat, 08 Sep 2018 21:19:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536466790; cv=none; d=google.com; s=arc-20160816; b=POBKIA2A3GfTv4Cf9u/WU+FXcZd0AJsM+C2200qmZAMTvMprT2C2QjstwIntAc4qyP ClS/fXwy7MlY5b9oXygt06zgRLEj/ugx8lUUIUII5ANln/P3W80kz4skxX8QlyfOqkS2 4Rg/VoEP58Ha+hbr7KAzBl6KPczumVmX2eiyydEqHpz/UGbXZ03bW9moxVmQvbhLTUfp WPPB+RC3izHyIgZHpbvO8zs+os5GyHGq/HitoXXszRCV5dCNyHfB7RW7b6h4UVcIHmlZ vaOX4wg/Ns7iIV52tXcoHrgUjdI6l5wUv4IsM0f3KTH9CQXUKt1uMfwdoNCSjlqQz4Yk F8sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=2iVnrIShwT59596mw7gq5qTfEJA0PS9v0HEMtpbXQ5o=; b=Me4gXsokCWnw5lHfYEU+OOFpNxgnsoKQqiyJh7tgl3780lE4L047N75+suZHP3QyIg kcMVNlScTiMzY6jzy/QEzI1x+Lc7MWrZrmyDRt2qdXZ/VNNXeQsOzG/sqGmFJ7vFc/TH dr8kFLKR3hhMVOA0OCjFhAeOZOIyjsaCuzPWNj0a8gu/ZjrDSGl7EkRU1N0EVPSlSit8 +YbTTQ8HulQaSvevELY3Jq4gDEQYKtc+kMSimgKkyxRYt+tOyFEU2e3M9ZRueMhybNNQ M0kWXXTx4FHus6890TLFq9hGkQ7ACvehZEM577CgUDNMizAEwf91bubAk5ziGSNDHHoR q+iQ== 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 f4-v6si12502578plr.213.2018.09.08.21.19.34; Sat, 08 Sep 2018 21:19:50 -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 S1726598AbeIIJGl (ORCPT + 99 others); Sun, 9 Sep 2018 05:06:41 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:43028 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726084AbeIIJGk (ORCPT ); Sun, 9 Sep 2018 05:06:40 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fyr9W-0004TI-66; Sun, 09 Sep 2018 04:16:58 +0000 Date: Sun, 9 Sep 2018 05:16:50 +0100 From: Al Viro To: Arnd Bergmann Cc: Jeff Dike , Richard Weinberger , Jaroslav Kysela , Takashi Iwai , linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH 03/11] compat_ioctl: remove translation for sound ioctls Message-ID: <20180909041632.GE19965@ZenIV.linux.org.uk> References: <20180908142837.2819693-1-arnd@arndb.de> <20180908142837.2819693-3-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180908142837.2819693-3-arnd@arndb.de> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 08, 2018 at 04:28:09PM +0200, Arnd Bergmann wrote: > The SNDCTL_* and SOUND_* commands are the old OSS user interface. > > I checked all the sound ioctl commands listed in fs/compat_ioctl.c > to see if we still need the translation handlers. Here is what I > found: > > - sound/oss/ is (almost) gone from the kernel, this is what actually > needed all the translations > - The ALSA emulation for OSS correctly handles all compat_ioctl > commands already. > - sound/oss/dmasound/ is the last holdout of the original OSS code, > this is only used on arch/m68k, which has no 64-bit mode and > hence needs no compat handlers > - arch/um/drivers/hostaudio_kern.c may run in 64-bit mode with > 32-bit x86 user space underneath it. This rare corner case is > the only one that still needs the compat handlers. > > By adding a simple redirect of .compat_ioctl to .unlocked_ioctl in the > UML driver, we can remove all the COMPATIBLE_IOCTL() annotations without > a change in functionality. For completeness, I'm adding the same thing > to the dmasound file, knowing that it makes no difference. > diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c > index 7f9dbdbc4eb7..0278a642a622 100644 > --- a/arch/um/drivers/hostaudio_kern.c > +++ b/arch/um/drivers/hostaudio_kern.c > @@ -298,6 +298,7 @@ static const struct file_operations hostaudio_fops = { > .write = hostaudio_write, > .poll = hostaudio_poll, > .unlocked_ioctl = hostaudio_ioctl, > + .compat_ioctl = hostaudio_ioctl, Umm... OK, seeing that it's not going to be used on s390... It's still not quite right, though, and I'm afraid that places where we have the same ->unlocked_ioctl and ->compat_ioctl need an audit - there probably had been other folks who'd stepped into the same.