Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3951534yba; Wed, 17 Apr 2019 01:07:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzROk0vGHJbtgOiC+czqumuJKhKIxtGA4Z8yxKGr44ZNCNByiEqvPJ3/IFTADvUUCZ+6BpT X-Received: by 2002:a17:902:4165:: with SMTP id e92mr25461948pld.10.1555488478115; Wed, 17 Apr 2019 01:07:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555488478; cv=none; d=google.com; s=arc-20160816; b=SjSrZiuf4X5f0vuZ6aX+PYOKQOtbaxPCU5RgntBNM/b2q/yerE72aXH1jvnONFXPTZ OeIh/Pm66BPrFDLDMM6+9lUNAipqx8jbZ3uUP+11H2IiZ4tuK+7Sd1v1JZG1YqAEnqmF FcrNPnFbaxmquwW3Fua/ODm1F7UUHrTEs0jo2RkMV83lNssCTyf1khIe4xsxmW8PHhrI xuu76d3zvMEgNmdD19oVeDN73B6+BWkh2fvtsudrtfT7jFSCzRUp/dpzly2EHIcX4NLI Ea3bGY8dV5GhQskWShNltvevE7ymMNviDeJryvlhtlPothb82+KmG4mI6SBCeucXTfmF cEEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date; bh=cZtB6xBKRF/0g2NGzS7x5+MgZ7fweaGjMBtgi95SMlQ=; b=vZ713IJrtX6r0QVo/x8lGcJ6W9t+jlayxXmgnrbGU7T5v2PcZZxKQcS0xigyEGEn4C M7Jr/DNryxtMBwGjzOdNVW/534euqN3JnRims4PhujAnA3il0sCiu2No31FhhQuY/awJ GM+sRUrUwvcJqxfdQznn6vPHLVLN+06C2eTW6w4WTm0bVMBpbI8ZEh79ma8mm6S4UbqJ 1OyI7OKDAHXnWbw88QgE+YrzbgjOYhKi/64Egdj11ZErp8iQM+tjnWGpf1sGaVNu1tOg w26+bg/WIkHFoVg/FnxU9a+9x3Z9qPWsnLksqyFoLyNTQENm6mLNf622JOomip+R5cRT QTUQ== 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 b22si43260400pls.285.2019.04.17.01.07.42; Wed, 17 Apr 2019 01:07:58 -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 S1731141AbfDQIFg (ORCPT + 99 others); Wed, 17 Apr 2019 04:05:36 -0400 Received: from mx2.suse.de ([195.135.220.15]:60888 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727087AbfDQIFg (ORCPT ); Wed, 17 Apr 2019 04:05:36 -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 C0FD4AC69; Wed, 17 Apr 2019 08:05:34 +0000 (UTC) Date: Wed, 17 Apr 2019 10:05:33 +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: <20190416202839.248216-1-arnd@arndb.de> 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 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 Takashi