From: Takashi Iwai Subject: Re: [PATCH v2 10/17] compat_ioctl: remove translation for sound ioctls Date: Thu, 13 Sep 2018 15:37:29 +0200 Message-ID: References: <20180912150142.157913-1-arnd@arndb.de> <20180912151422.571531-1-arnd@arndb.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <20180912151422.571531-1-arnd@arndb.de> Sender: linux-kernel-owner@vger.kernel.org To: Arnd Bergmann Cc: viro@zeniv.linux.org.uk, Jeff Dike , alsa-devel@alsa-project.org, Mauro Carvalho Chehab , linux-um@lists.infradead.org, Richard Weinberger , Jaroslav Kysela , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: alsa-devel@alsa-project.org On Wed, 12 Sep 2018 17:13:02 +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. > > The compat_ioctl list contains one comment about SNDCTL_DSP_MAPINBUF and > SNDCTL_DSP_MAPOUTBUF, which actually would need a translation handler > if implemented. However, the native implementation just returns -EINVAL, > so we don't care. > > Signed-off-by: Arnd Bergmann Looks good to me. Reviewed-by: Takashi Iwai thanks, Takashi