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 4A5FBC433EF for ; Wed, 23 Mar 2022 17:34:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343639AbiCWRfw (ORCPT ); Wed, 23 Mar 2022 13:35:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343629AbiCWRfs (ORCPT ); Wed, 23 Mar 2022 13:35:48 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 665C55D5D2 for ; Wed, 23 Mar 2022 10:34:18 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id k21so3909597lfe.4 for ; Wed, 23 Mar 2022 10:34:18 -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=Qw+/tGAcqsZzOdIU9mPy0h6XsR9YUgqE/aO4tJnDV/U=; b=AsueKvmLHM2nGOpImBUVo8JvIUXQZTPBXUuZ+V1+E3nRTCnp7dAn5Ysn/GIxghzLln GZBXO3w4k/UDMjMFwtn/nP7LeVAoXHaabLGMz82QEQoUcyQ2iSJywkoB38HO0fhpi+qm ebKixIbEogjW5TDgyVUN+w+sNSt7oNBz0RQ04= 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=Qw+/tGAcqsZzOdIU9mPy0h6XsR9YUgqE/aO4tJnDV/U=; b=tUor8pTU5OnVUeWC2wvm+XCjBjPxHsalEPl+LF8U0691Dl9infRxGJIFVoGaio1bQt qdiw58VSnggcs0BC6BosbfGygbampiuuMh5VaF9TvCiJXSnKQVuELlhM/wfUUzUjv70A YlNEDI33rQMOy17EnENX2Krv6f98c3L6JVs6oxTCeN24MB+7y/Sc6HLIK+7gBd/eVaWO rjP0Lu4VpgCvATNvg8s7/s1xtgH0HJy85lrtnUkqDeMleJCoGqHsMxfL4C0sBY+zzfoV 4yBecaVHczLa0JObALCSBHLuxsyipE3O0xBtZ5okBS+prb6gk1LLhMrdq+NObnlFpesG +9QA== X-Gm-Message-State: AOAM532zWiUwNxNzZPMrDlSbYwEGWPF4wwV5ay3Nb1xMZiKuCJPrS55V uBVrBtSWagCezEJlaL0VH7/jberkYD3Mnok48UA= X-Google-Smtp-Source: ABdhPJyP6CsOk4R35vwj8vkInBJBRaIhF7xCXKFFZntKAasle/cD96PfgNYKNWE7Vns8hAMqj0BM5g== X-Received: by 2002:a05:6512:690:b0:44a:351f:9ff5 with SMTP id t16-20020a056512069000b0044a351f9ff5mr694162lfe.385.1648056856287; Wed, 23 Mar 2022 10:34:16 -0700 (PDT) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com. [209.85.208.181]) by smtp.gmail.com with ESMTPSA id z9-20020a2e8e89000000b00237fb5d60desm59066ljk.122.2022.03.23.10.34.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Mar 2022 10:34:15 -0700 (PDT) Received: by mail-lj1-f181.google.com with SMTP id 25so2848510ljv.10 for ; Wed, 23 Mar 2022 10:34:15 -0700 (PDT) X-Received: by 2002:a05:6512:2294:b0:448:6c86:3c78 with SMTP id f20-20020a056512229400b004486c863c78mr661692lfu.531.1648056457283; Wed, 23 Mar 2022 10:27:37 -0700 (PDT) MIME-Version: 1.0 References: <1812355.tdWV9SEqCh@natalenko.name> In-Reply-To: <1812355.tdWV9SEqCh@natalenko.name> From: Linus Torvalds Date: Wed, 23 Mar 2022 10:27:21 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [REGRESSION] Recent swiotlb DMA_FROM_DEVICE fixes break ath9k-based AP To: Oleksandr Natalenko Cc: Halil Pasic , Christoph Hellwig , Marek Szyprowski , Robin Murphy , =?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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 23, 2022 at 12:19 AM Oleksandr Natalenko wrote: > > The following upstream commits: > > aa6f8dcbab47 swiotlb: rework "fix info leak with DMA_FROM_DEVICE" > ddbd89deb7d3 swiotlb: fix info leak with DMA_FROM_DEVICE > > break ath9k-based Wi-Fi access point for me. The AP emits beacons, but > no client can connect to it, either from the very beginning, or > shortly after start. These are the only symptoms I've noticed (i.e., > no BUG/WARNING messages in `dmesg` etc). Funky, but clearly true: > These commits appeared in v5.17 and v5.16.15, and both kernels are > broken for me. I'm pretty confident these commits make the difference > since I've built both v5.17 and v5.16.15 without them, and it fixed > the issue. Can you double-check (or just explicitly confirm if you already did that test) that you need to revert *both* of those commits, and it's the later "rework" fix that triggers it? > So, I do understand this might be an issue with regard to SG I/O > handling in ath9k, hence relevant people in Cc. Yeah, almost certainly an ath9k bug, but a regression is a regression, so if people can't find the issue in ath9k, we'll have to revert those commits. Honestly, I personally think they were a bit draconian to begin with, and didn't limit their effects sufficiently. 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. So my expectation is that this is something we'll just revert, but it would be really good to have the ath9k people double-check. Linus