Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2671347rwb; Fri, 16 Dec 2022 05:14:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Ebtc/YBCN7z413yvmJluK8aU9wdH8F8eW5V32AUMV8yrmBm5MQuj/UFL939p08T3NKs4D X-Received: by 2002:a17:90a:1b0b:b0:219:396c:9e32 with SMTP id q11-20020a17090a1b0b00b00219396c9e32mr33973594pjq.16.1671196453200; Fri, 16 Dec 2022 05:14:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671196453; cv=none; d=google.com; s=arc-20160816; b=SQhBnqU+IvNH9TKrXSYJ+WZwGYOcrqZZ9q9ZpLtBjXt99ygZ8Aw6ATaFIfMBDDc9Q0 LO55nEd1oYalD6BXdzv9NRItRcXEUMZdF4ulDRJjjNclW0uitkHg84hslNA3M6PiX3iZ m1aa6chzcufK0zTIR5zSaj/WOAMs63U0Nvdvv+P3IuwlomYEtsMK5/mtd9dJZrFLQvdP x4/Mq28zVPvH5Zt5ZRueCfIHyfNO100UQqcU/q8acu0IA+Pde/57aUCjg5QOO9x8nwc8 6M2BGNuhR0He1dO7NrD8TmQELONJJfWnIJt9aJvZJpKbg9aKbaV0klAhJP0doj9bip+a oZEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=M7yaLtENE4e131cLjlRBfZYx2MEU3nRFj2Ais1SGUyQ=; b=XxV0rt1PRxpQ3PCaqmfarDCK1GVNPjobqIXAciJbhPxqzUhMO9/M7JyXzksgiL2eKl 7ERb938acrNLkU3x9ERoYFq/5Oq0o2gfxmldcZ2s5okV9Nb2C8Z5XvCBtRGkW+MKxX2y /KP9HT2wMqsC/WblDfz+JvRlvXkm7LNcuHFIINoPBZtJ6MMRzuQ4dVgYTZowetqttRiA joSFUNKrlqhcfoeLuTQWx6hyQ5X5bCpc1jAEBaY5vYWEjDNj+nYNWdfm6+FKLQNcQCpN Y6xhmECBWPjrHfj+kKmiw1AaHF6hoocFsT37Hm4qESCQ/MrIc3g+sQuzMPsJIGX4WWzN TM+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mq16-20020a17090b381000b0021425cf457fsi2710366pjb.32.2022.12.16.05.14.03; Fri, 16 Dec 2022 05:14:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230237AbiLPMxH (ORCPT + 68 others); Fri, 16 Dec 2022 07:53:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229613AbiLPMxD (ORCPT ); Fri, 16 Dec 2022 07:53:03 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D463724979 for ; Fri, 16 Dec 2022 04:53:02 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 112861042; Fri, 16 Dec 2022 04:53:43 -0800 (PST) Received: from [10.57.88.234] (unknown [10.57.88.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 44FBC3F5A1; Fri, 16 Dec 2022 04:53:01 -0800 (PST) Message-ID: Date: Fri, 16 Dec 2022 12:52:56 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [6.2][regression] after commit ffcb754584603adf7039d7972564fbf6febdc542 all sound devices disappeared (due BUG at mm/page_alloc.c:3592!) Content-Language: en-GB To: Christoph Hellwig Cc: Mikhail Gavrilov , Takashi Iwai , alsa-devel@alsa-project.org, m.szyprowski@samsung.com, Linux List Kernel Mailing , iommu@lists.linux.dev References: <20221216064645.GA24446@lst.de> <20221216121519.GA5710@lst.de> From: Robin Murphy In-Reply-To: <20221216121519.GA5710@lst.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-12-16 12:15, Christoph Hellwig wrote: > On Fri, Dec 16, 2022 at 11:40:57AM +0000, Robin Murphy wrote: >> On 2022-12-16 06:46, Christoph Hellwig wrote: >>> Ok, it seems like the sound noncontig alloc code that I already >>> commented on as potentially bogus GFP_GOMP mapping trips this. I think >>> for now the right thing would be to revert the hunk in dma-iommu.c >>> (see patch below). The other thing to try would be to remove both >>> uses GFP_COMP in sound/core/memalloc.c, which should have the same >>> effect. >> >> Or we explicitly strip the flag in dma_alloc_noncontiguous() (and maybe >> dma_alloc_pages() as well) for consistency with dma_alloc_attrs(). That >> seems like it might be the most robust option. > > In the long run warning there and returning an error seems like the > right thing to do, yes. I'm just a little worried doing this right now > after the merge window. Fair point, I guess nobody else actually implements dma_alloc_noncontiguous(), and dma_alloc_pages() seems a bit of a grey area since it is more of an explicit page allocator. So yeah, just restoring iommu-dma (perhaps with a mild VM_WARN_ON?) seems like a sufficiently safe and sensible fix for the short term. You can have my pre-emptive ack for that. Cheers, Robin.