From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A44CFC43219 for ; Mon, 29 Apr 2019 07:05:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 71C322053B for ; Mon, 29 Apr 2019 07:05:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727412AbfD2HFq (ORCPT ); Mon, 29 Apr 2019 03:05:46 -0400 Received: from mx2.suse.de ([195.135.220.15]:56742 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726589AbfD2HFp (ORCPT ); Mon, 29 Apr 2019 03:05:45 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1BFA8AE60; Mon, 29 Apr 2019 07:05:44 +0000 (UTC) Date: Mon, 29 Apr 2019 09:05:43 +0200 Message-ID: From: Takashi Iwai To: "Arnd Bergmann" Cc: "Alexander Viro" , , "Vinod Koul" , , , "Jaroslav Kysela" , , Subject: Re: [PATCH v3 20/26] compat_ioctl: remove translation for sound ioctls In-Reply-To: References: <20190416202013.4034148-1-arnd@arndb.de> <20190416202839.248216-1-arnd@arndb.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 Apr 2019 10:05:33 +0200, Takashi Iwai wrote: > > On Tue, 16 Apr 2019 22:28:05 +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 > > This looks like a really nice cleanup. Thanks! > > Reviewed-by: Takashi Iwai Is this supposed to be taken via sound git tree, or would you apply over yours? I'm fine in either way. thanks, Takashi