From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30413 invoked from network); 8 Oct 2021 11:53:29 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 8 Oct 2021 11:53:29 -0000 Received: (qmail 1767 invoked by uid 550); 8 Oct 2021 11:53:27 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 1745 invoked from network); 8 Oct 2021 11:53:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1633693995; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ARppKVzpuPeNHqxCswVOFgUbFO18bm3TDyH1EtjhH2Y=; b=GR2QdsjVtFCZKUc4xc5yeZr/nQA6mhlBW6T2w+UYP869BaDTM01lmkex8mtLcrSHW4RHLm YPZNWANlazii+mWHxB+we9i9UEU2l9tzxtQxjdHa/PYC1c+t9Ye2DuKojsJ65miiB0G+bO ooqWG5CIWeOE6fDT9FHvV/EeGYZp+38= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1633693995; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ARppKVzpuPeNHqxCswVOFgUbFO18bm3TDyH1EtjhH2Y=; b=2l7vV6JwoBk/GFly1VxlIrpKeXOTF2ZbH0Ptu22haSDVRyXnYeOQ2c2xgSbo1LEXMjsL3t OIXppmKoAkyZIIAg== Date: Fri, 08 Oct 2021 13:53:15 +0200 Message-ID: From: Takashi Iwai To: Arnd Bergmann Cc: musl@lists.openwall.com, Rich Felker , Michael Forney , ALSA Development Mailing List , Takashi Iwai , Baolin Wang , y2038 Mailman List , Linux Kernel Mailing List , Mark Brown , Baolin Wang In-Reply-To: References: <20191211212025.1981822-1-arnd@arndb.de> <20191211212025.1981822-9-arnd@arndb.de> <29QBMJU8DE71E.2YZSH8IHT5HMH@mforney.org> <20211007160634.GB7074@brightrain.aerifal.cx> <20211007165158.GC7074@brightrain.aerifal.cx> 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 Subject: Re: [musl] Re: [alsa-devel] [PATCH v7 8/9] ALSA: add new 32-bit layout for snd_pcm_mmap_status/control On Fri, 08 Oct 2021 13:45:45 +0200, Arnd Bergmann wrote: > > On Fri, Oct 8, 2021 at 1:11 PM Takashi Iwai wrote: > > On Fri, 08 Oct 2021 11:24:39 +0200, Arnd Bergmann wrote: > > > > > > > I've tried to understand this part of musl's convert_ioctl_struct(), but I just > > > can't figure out whether it does the conversion based the on the layout that > > > is currently used in the kernel, or based on the layout we should have been > > > using, and would use with the above fix. Rich, can you help me here? > > > > So, at this moment, I'm not sure whether we should correct the struct > > at all. This will lead to yet more breakage, and basically the struct > > itself *works* -- the only bug is in 32bit compat handling in the > > kernel (again). > > I'm still unsure if the musl fallback code is correct or not. We need to verify the current behavior in anyway... > > The below is a revised kernel patch (again untested), just correcting > > the behavior of 32bit compat mode. 32bit apps on 32bit kernel work > > fine as is, as well as 64bit apps on 64bit kernel. > > Right, this should cover all cases of the ioctl itself misbehaving. > In addition, we still need to disallow the mmap() interface on compat > kernels then. Strictly speaking, we could allow the snd_pcm_mmap_status > but not snd_pcm_mmap_control to be mapped, but I'm not sure if > that's better than disallowing both. IIRC, the compat mmap is already disallowed even for the SNDRV_PCM_MMAP_OFFSET_CONTROL_NEW (in pcm_control_mmap_allowed()), so no need to change around that. thanks, Takashi