Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp181617pxb; Wed, 23 Mar 2022 15:54:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzERVLMAAiQ26Q+/2ce6SRVc09inO3gJDOt6bsm1wyerBnbgZzXWp6k/SXZ36T6IB2pGg6k X-Received: by 2002:a17:907:2cc6:b0:6e0:3113:6e9a with SMTP id hg6-20020a1709072cc600b006e031136e9amr2667188ejc.519.1648076084418; Wed, 23 Mar 2022 15:54:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648076084; cv=none; d=google.com; s=arc-20160816; b=jhsMtiq5ngXBV3Fmcd9OldPLd9A67kurnc/0WcGGLa6qjqxyWmZl7pm9+2XSpxjrI6 +A18+mft9FapAnLROvlrw/FSDkMZWxUTWtpN1Run9F1qEhFSurehyt9PH3LWaG8yNIAk dYjjpNlxMa9VyhP/DAQ7jNHmwwnWz5mbezqaZkFrjXHXWYApZ1U2N8Ns7clrym4yeL4R 84X7xPZOPHvJJ5iZo/G+u3XWJPe/0zscuRu1D4Nwi65wHp+cwbKy2+ZqKfj5rRu8imSS OSO53vENRjAinHs080ytt9nNMvwTpzV8x9MBkhtXZiS1i6rFo06O7aV2nqgGcu83X84E kyHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FaXnwbXaSXbCX4JA5a0+pq4aaz2a8Xc9Ap8EekKfrJg=; b=GPugBCXQTHctSjmtCABOZxeWGtvM0kb9nF+Drhqv5nHvxAzKcxQ6orfQ6pB+O/jUr1 tOpAFnmiDEZ+Kbol9UPtDdtEgILXwGW574Zjk+yyfbovrwc1799D7/erbv4kFCAKXAud KVZhNscNXud8UndnA0lOr/guP3/dyptBWkB8/hSnoPd/yboWVRXEE4sbaoKVTntUKUx2 eqGOdBrEQuMzUWZJ1u2xcUnHdpPC9mVTkvYSr974w44yEJeg2freNxFC86VFeA/8NC4a 0s8zm6TTKzOcKsksF0VsUCjxlK7J7M7AACYLeZzbbI4/BLAYd6zKPahfP5JPtquQwzjR nKyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=P9ZcEpik; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j5-20020a1709066dc500b006df76385f33si12383594ejt.979.2022.03.23.15.54.16; Wed, 23 Mar 2022 15:54:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=P9ZcEpik; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344131AbiCWTS1 (ORCPT + 70 others); Wed, 23 Mar 2022 15:18:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344123AbiCWTSZ (ORCPT ); Wed, 23 Mar 2022 15:18:25 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 054AB8567C for ; Wed, 23 Mar 2022 12:16:55 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id l20so4313238lfg.12 for ; Wed, 23 Mar 2022 12:16:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FaXnwbXaSXbCX4JA5a0+pq4aaz2a8Xc9Ap8EekKfrJg=; b=P9ZcEpik6R5EPT4CggIUIW5sJuzMdcf8B0GMQ57M9+1WIls6aC+OjCSeLSGFKdwBgq gDZxv7j9z3xw9CvLBywUXZn41za0VVQ/9nq70BC0iyCUf/T9GlF7P+qvj0GM1CjFfk0Y 40eaqcCqV0NJJlet/B4OqeaNkITYKUoe+Gn8o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FaXnwbXaSXbCX4JA5a0+pq4aaz2a8Xc9Ap8EekKfrJg=; b=iadlLY56xx2umDQurgiUSbUGtxBqYH5BI4XrFkbjmq5bUVLA7Zw6BGmCeFg9IeulNX XOwPfVrAusG6uI3avbJhzXEC55Qruss+JpMhPez8jsE1gHSHfNeXaE3lcyPIgCOuk055 hsRGThab8u7aousQF236XG0gIr69U9QdebatMXm8K0aBnT1bJ4QkO0lfpBPVfKTG1wu9 mgT6M55c2LPdMpEcvuGjHF1lQ9YEkpxIFHddQEcnAw1jSkgZItIU75L0grWLncgQaRjw 0zr51XPiXUCd9G6oKqUnD7wk6dxul8pnhqNUH0tFegsDPc8uXyq4oFtmaCpJ/PinjyT0 vCvw== X-Gm-Message-State: AOAM533B4d9ctGhdvRnT1JyvXIpVdKTCwZT4xFglMIh35DupVjwIiKxP UEdm1F7JfW4MpjyCrA5inKk+jdFSAzt/3dzVGiI= X-Received: by 2002:a19:9201:0:b0:443:c317:98ff with SMTP id u1-20020a199201000000b00443c31798ffmr1008093lfd.331.1648063013012; Wed, 23 Mar 2022 12:16:53 -0700 (PDT) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com. [209.85.167.46]) by smtp.gmail.com with ESMTPSA id 8-20020a2e1548000000b002463639d0f2sm80199ljv.68.2022.03.23.12.16.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Mar 2022 12:16:50 -0700 (PDT) Received: by mail-lf1-f46.google.com with SMTP id a26so4318386lfg.10 for ; Wed, 23 Mar 2022 12:16:50 -0700 (PDT) X-Received: by 2002:a05:6512:2294:b0:448:6c86:3c78 with SMTP id f20-20020a056512229400b004486c863c78mr987003lfu.531.1648063009559; Wed, 23 Mar 2022 12:16:49 -0700 (PDT) MIME-Version: 1.0 References: <1812355.tdWV9SEqCh@natalenko.name> <27b5a287-7a33-9a8b-ad6d-04746735fb0c@arm.com> In-Reply-To: <27b5a287-7a33-9a8b-ad6d-04746735fb0c@arm.com> From: Linus Torvalds Date: Wed, 23 Mar 2022 12:16:33 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [REGRESSION] Recent swiotlb DMA_FROM_DEVICE fixes break ath9k-based AP To: Robin Murphy Cc: Oleksandr Natalenko , Halil Pasic , Christoph Hellwig , Marek Szyprowski , =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= , Kalle Valo , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Olha Cherevyk , iommu , linux-wireless , Netdev , Linux Kernel Mailing List , Greg Kroah-Hartman , stable Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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-wireless@vger.kernel.org On Wed, Mar 23, 2022 at 12:06 PM Robin Murphy wrote: > > On 2022-03-23 17:27, Linus Torvalds wrote: > > > > I'm assuming that the ath9k issue is that it gives DMA mapping a big > > enough area to handle any possible packet size, and just expects - > > quite reasonably - smaller packets to only fill the part they need. > > > > Which that "info leak" patch obviously breaks entirely. > > Except that's the exact case which the new patch is addressing Not "addressing". Breaking. Which is why it will almost certainly get reverted. Not doing DMA to the whole area seems to be quite the sane thing to do for things like network packets, and overwriting the part that didn't get DMA'd with zeroes seems to be exactly the wrong thing here. So the SG_IO - and other random untrusted block command sources - data leak will almost certainly have to be addressed differently. Possibly by simply allocating the area with GFP_ZERO to begin with. Linus