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 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 52116C07E9D for ; Mon, 26 Sep 2022 18:02:31 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6620F826; Mon, 26 Sep 2022 20:01:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6620F826 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1664215349; bh=B0qaMjOPQrhLLER5qFWBgX1zQyZxzIBqUercrK+VcD8=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=C/NWsTprvGyPRoacmqMgwBTpeerxFXkvT7jcxsJhiY3mLWIhIzbr2STg2Fnwjmr7b gm8sd+sECOWEIw0xNodIGNe00TX5aCBvAkABfvIqqFMvfVz4Dysl02X5PodMJspJzu EYhLIwoG4LLGStkluFoXo1Ve0z00MRmOrOKKb7Oc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A8FA5F80533; Mon, 26 Sep 2022 20:01:30 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DBBF9F80535; Mon, 26 Sep 2022 20:01:29 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9BD9DF80510 for ; Mon, 26 Sep 2022 20:01:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9BD9DF80510 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="jk6T+bEw"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="l4NeicHh" Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 6CDA221FE3; Mon, 26 Sep 2022 18:01:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1664215286; 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=yw5StaodFQZEHTV1q1ehx9OSHinWzo8zB4H1UQnl29c=; b=jk6T+bEwtInj9L0T4f8Apdicm3roYSDKpHbJaINWSjX7R0Y8IMkEVIySAmkns1QmfKmqgF nGgDXWTYXxcxfywYDKLFjWh7pBDVEcsp3s+xiEbccsL+6+yySwMXsny8kRJGv+d0Vv+DnH tLuMprP3hup2r7gGIX20hlxZxTitJqs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1664215286; 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=yw5StaodFQZEHTV1q1ehx9OSHinWzo8zB4H1UQnl29c=; b=l4NeicHhqv8N+WJ34cNPX/YGK/WA43PUVQN71cTxL5ZN8fZMvNozhJUSEcZgmsvi71e0rK kzJXGwPEaM/vYjAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3FCEF139BD; Mon, 26 Sep 2022 18:01:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id TeyzDvboMWMrYwAAMHmgww (envelope-from ); Mon, 26 Sep 2022 18:01:26 +0000 Date: Mon, 26 Sep 2022 20:01:25 +0200 Message-ID: <87leq6gglm.wl-tiwai@suse.de> From: Takashi Iwai To: butt3rflyh4ck Subject: Re: A divide error bug in snd_pcm_write In-Reply-To: References: <87v8pa306x.wl-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Cc: alsa-devel@alsa-project.org, LKML , pierre-louis.bossart@linux.intel.com, tiwai@suse.com, broonie@kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Mon, 26 Sep 2022 19:16:48 +0200, butt3rflyh4ck wrote: > > The latest kernel upstream. > Yes, but using mmap, you can map the runtime->status page, and then > copy the data through memcpy to overwrite the status->state data, or > even more, which is incredible. Ah, then that's exactly the case my latest patch set covers. Either the first patch or the second patch alone should work. https://lore.kernel.org/r/20220926135558.26580-2-tiwai@suse.de https://lore.kernel.org/r/20220926135558.26580-3-tiwai@suse.de Could you verify either of them fixes the problem? thanks, Takashi 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDA69C32771 for ; Mon, 26 Sep 2022 18:13:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231402AbiIZSNf (ORCPT ); Mon, 26 Sep 2022 14:13:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231365AbiIZSMq (ORCPT ); Mon, 26 Sep 2022 14:12:46 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72BAD82D1E for ; Mon, 26 Sep 2022 11:01:28 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 6CDA221FE3; Mon, 26 Sep 2022 18:01:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1664215286; 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=yw5StaodFQZEHTV1q1ehx9OSHinWzo8zB4H1UQnl29c=; b=jk6T+bEwtInj9L0T4f8Apdicm3roYSDKpHbJaINWSjX7R0Y8IMkEVIySAmkns1QmfKmqgF nGgDXWTYXxcxfywYDKLFjWh7pBDVEcsp3s+xiEbccsL+6+yySwMXsny8kRJGv+d0Vv+DnH tLuMprP3hup2r7gGIX20hlxZxTitJqs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1664215286; 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=yw5StaodFQZEHTV1q1ehx9OSHinWzo8zB4H1UQnl29c=; b=l4NeicHhqv8N+WJ34cNPX/YGK/WA43PUVQN71cTxL5ZN8fZMvNozhJUSEcZgmsvi71e0rK kzJXGwPEaM/vYjAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3FCEF139BD; Mon, 26 Sep 2022 18:01:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id TeyzDvboMWMrYwAAMHmgww (envelope-from ); Mon, 26 Sep 2022 18:01:26 +0000 Date: Mon, 26 Sep 2022 20:01:25 +0200 Message-ID: <87leq6gglm.wl-tiwai@suse.de> From: Takashi Iwai To: butt3rflyh4ck Cc: perex@perex.cz, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, broonie@kernel.org, alsa-devel@alsa-project.org, LKML Subject: Re: A divide error bug in snd_pcm_write In-Reply-To: References: <87v8pa306x.wl-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 26 Sep 2022 19:16:48 +0200, butt3rflyh4ck wrote: > > The latest kernel upstream. > Yes, but using mmap, you can map the runtime->status page, and then > copy the data through memcpy to overwrite the status->state data, or > even more, which is incredible. Ah, then that's exactly the case my latest patch set covers. Either the first patch or the second patch alone should work. https://lore.kernel.org/r/20220926135558.26580-2-tiwai@suse.de https://lore.kernel.org/r/20220926135558.26580-3-tiwai@suse.de Could you verify either of them fixes the problem? thanks, Takashi