Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp222924lqq; Thu, 13 Jun 2024 00:40:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX+IgLWsuYQ08jUO8F6GC6nItsh4Um+rcCssjU00IXLn+WfaTrf30268IXj41qLb5mnWARk+IVvUaZ97smzo189n8Ib0UOWmlYMMHO5sw== X-Google-Smtp-Source: AGHT+IG86v81KxXgyR+R+lHvXYU3DgONJpbZ1JzvF6Ks1+/EUH0L4k+9D8zl68cgowX71TSWiHYX X-Received: by 2002:a17:906:eb43:b0:a6f:58e8:310e with SMTP id a640c23a62f3a-a6f58e83c53mr47864566b.3.1718264443813; Thu, 13 Jun 2024 00:40:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718264443; cv=pass; d=google.com; s=arc-20160816; b=smGVyFFrc2M/BVg+KthArw5Z44/b2H2uewOMqzlViPR6NSD2WZEtLjuw5YAtbC0Pbt D73eZ/CD41ikEdEibmpOELaRfj4R3oPYmL10Gx2LCNt9Hm7x1xGFTgTert9Q0QeG/kDc TYfxbvM+cCVUebsM2D7SercdjRWGMZrWgnDqjgqbzmLtgCcvQnfRhZOw5AY4jZwdvN/C 09ZCiqeDj0j2FLp5f5Ur/+m9oi8mREDb2aKl8+SLqkfmbYG6lx8Ha5WSUCQ+SySjSTCQ /+lc+Wzf3yC1G+HfKFXS0vPaZ+uPjd0D2aT44nAL7RhI7IrYF7YB+mCj+N2Pa8tLbfmC IW6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=b2tVk5gtyfcK3Xrbxsq8MRKsU3rezhDvNclVJ6CRAH0=; fh=KLp5pZjHSA3c8VmlVDlFKlJ/rXyyv1AWDH+YLNrg5aM=; b=xXu4jPj5YHqvKFcT7Ed1eS0+EAIfDNfWb6gZ91YZvwj7jZ2IxbL3Iixj9Lzf3HN4s4 5Y0GL+24GQel92eK+cG4TdUVJ7bdK/jcYRnap1aPSuyS12P10ihlVUDiIkFwVRR8UboA DPJ9kk92o1e3Lbr8UKbpnJdfkgtb/aFjF8HD/ppcfyOUWRSmndsJ4Jy3dxLgClFfHm9a 0YFR5vtouv0Bo2NxJKtdaMdRrmJmEQ/RhNlWIEJqmfFSelMteMUbQjWxvS5od28xusuF BKK7ol/awhawfetr/E7+uZRaJHgmjHW2AW7KB1KVqhN0Y5PbZAhFQ0/NntjNClaUPnZS Ucfw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=lVO3WmtC; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-kernel+bounces-212728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56d218c0si42449866b.132.2024.06.13.00.40.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 00:40:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=lVO3WmtC; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-kernel+bounces-212728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 856C81F236AA for ; Thu, 13 Jun 2024 07:40:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB74D13C691; Thu, 13 Jun 2024 07:40:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="lVO3WmtC" Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D414113C3CD; Thu, 13 Jun 2024 07:40:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718264433; cv=none; b=ZDM6ofT640siLz3qBO2qkATpURdk5RPcGiTfKphkTHjP11uGsldgMdOdg/DO+6pQf5sk6FRhKPwU37Wtp1yhE0ka9fq17zhL1o/Qhexobn/4dv4GhlECEgUtyba7ocMwYmt40w8jP9BtvHkzp8zyN1LcGSkaog5LwOVL6KUf2rM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718264433; c=relaxed/simple; bh=vA7CkQV/uZWCqUet3+TkgnI8gkyk1M2E09VVDHS+x+Q=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=n1OA9ap5lXFaR7k8cgADyBdtHgGBRFtbr9v1YW3aLND+qE7hyrdvXxSoVVKvPenMPhPYSvC8j5Hwfnug5CfKq5Z4cQ74WENon9/Vj2kkLPDHr0f0n9arW6n8Q1cwkj0pT5KuBaU0BQWJoKrvKoyHeT7nET1DFReF5gzFGDrm+Sw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=lVO3WmtC; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=b2tVk5gtyfcK3Xrbxsq8MRKsU3rezhDvNclVJ6CRAH0=; t=1718264431; x=1719474031; b=lVO3WmtCuoWMgaIbZZju02Lz9SW+Ku9X7vNqcfpH8y8yQOu qPDrV4vVayV/1Vpe5PzICnFJZ+gIvd2un9QZVtjMC6dI8q3D+aOC4pIEi/EB85HFFrhi7nlYL3fNn G4htzzvkDP4b221qRHKc4X8AR7YOXzYKjWPVShjWmEn4XHZuEyW59XnIsor4klw9DtJWlpD/jmWSX +2BpCiiOAZM4sBNvFDaK9u1+ru8puUEXKBhmsInl2jZ8bcIupz5pCrUF/ChTy8S9sd4iPQnXLhbcg Ui6goj1KIORl5y4dZb0/TqXOAnBVsrB9vMzQ1DBiQuDTG/DAfkL3aB4fQB4wvr5A==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sHf4N-0000000BVam-2UwH; Thu, 13 Jun 2024 09:40:27 +0200 Message-ID: <50101085cba7fc089339c96f531f797e27c632ff.camel@sipsolutions.net> Subject: Re: iwlwifi: Regression after migrating to 6.6.32 From: Johannes Berg To: Baochen Qiang , Fabio Estevam Cc: miriam.rachel.korenblit@intel.com, kvalo@kernel.org, Jakub Kicinski , linux-wireless , linux-kernel Date: Thu, 13 Jun 2024 09:40:26 +0200 In-Reply-To: References: <3fbb5317d9ff33ef1b60ca8297537335ce86a79d.camel@sipsolutions.net> <95163ee547da95964c16f87a38d3326ae4da3253.camel@sipsolutions.net> <7a8e220d77d7e30a0cfaf984404ef2f57eaa785f.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.2 (3.52.2-1.fc40) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Thu, 2024-06-13 at 15:10 +0800, Baochen Qiang wrote: >=20 > On 6/13/2024 3:15 AM, Fabio Estevam wrote: > > Hi Johannes, > >=20 > > On Wed, Jun 12, 2024 at 4:10=E2=80=AFPM Johannes Berg wrote: > >=20 > > > Strange. Is there an IOMMU involved on this platform? > >=20 > > IOMMU isn't available on i.MX8M as far as I know. > If IOMMU not present, likely the buffer is mapped by SWIOTLB. Why? The device can do 64-bit DMA, so should be able to just access any page in the system. Even older devices can do 36-bit DMA, but this is a newer one. And if IOMMU isn't present, you have no protection anyway. > The iova 4215433216, aka 0xFB426800, is 2K aligned, which also supports = such guessing. See definition of IO_TLB_SIZE. Not sure that means anything though, I really would have expected a 4k buffer to be 4k aligned - why would you even want to map it across two pages? If it is SWIOTLB, shouldn't we get into this condition? /* * Historically, swiotlb allocations >=3D PAGE_SIZE were guaranteed= to be * page-aligned in the absence of any other alignment requirements. * 'alloc_align_mask' was later introduced to specify the alignment * explicitly, however this is passed as zero for streaming mapping= s * and so we preserve the old behaviour there in case any drivers a= re * relying on it. */ if (!alloc_align_mask && !iotlb_align_mask && alloc_size >=3D PAGE_= SIZE) alloc_align_mask =3D PAGE_SIZE - 1; Otherwise, not sure though how we could possibly fix this in the driver, we really shouldn't do dma_set_min_align_mask() since on the TX side we really have no alignment requirements, and swiotlb_map() uses 0 as alignment. johannes