From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796193288; b=DXFwtHLjLbHfjHMYSKLkpiovUXH98HgHMoVSoOBJziMVdhP1C1e32ADhld9Nqd60VVbO phMlJLTFuja7H1kL1FyyBU4dyo0mJSoZ9k4lztVwF1zhlHNjaGpbKCOkh9iTBcUi3bOvm jD1E69qqUcj+fXsQdkTWqvydajplSiaQINzIhs78tFVK7S8ClKdtyY/XpY+tHCLPLtMZZ 2lRckdWqCtxmVIVqwxh9oHh4bG1O+MORhYP+FEJhYut27TPmw2TM5CAHf0EDUNQ1dHecV 8Q6VqsejshBk3ehKYE3xZ3K3biYvQCGD23iv426gMVR+P23qhOrUA9CKCY/9RngmU9Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796193288; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=Ieimj14R7VhNJb0qPztn2mqBtLLNIPTNhlQtJnSMAM4=; b=inquNqU5Hfm5Ec7vVyuiT8QwSUIN14HwvAYySAY8G0mJRwb+ySVCapNtyP7K3H0NyQFO xBnij7Da8GrQWWxU3Fd+kTHDHy9W9piGno+AlJ03rwJaRMjHZC0BSNzkVhcqCXTpE83ZW uNLpFeCPmf8B0m0WmamCksThScDiSBOB/O4rC5xC5JrpvOdzK7wGO/izV2kjEZ+3wfi05 R9ypXYQ0JGmJxaEbEcOWJ59+l93kvOC68FTzWjs8A0nzP+DjlBE79CWmysbW1wxI/FGoN YNSOkSvfySxuVFaIeqQ8DxDd6e48gf67UhWnoxPHFaZqLzmgbs5k8GCTwCbycyCt5mg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IJUn14kA; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 548FB606A31A for ; Wed, 2 Dec 2026 06:34:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IJUn14kA Received: by smtp.kernel.org (Postfix) with ESMTPSA id D66B31F00896; Wed, 2 Dec 2026 06:34:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796193287; bh=Ieimj14R7VhNJb0qPztn2mqBtLLNIPTNhlQtJnSMAM4=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=IJUn14kA/YFIVzdl1hyPHx1X7T6fAdBcXMIB4QjRXDbNhuZ6VU3oWxH1gEWUGEZtF QI/whMz29X2HTUw4RvSXZRrCoXCLeixVF946+RSA0EApW28dLYW5cdDKMDNiqbF5P+ Gd006+iw7p1n+PgDiHQuU03l0lw671GbMoVsae+psytF/2gHhnG3cbpoMkVPk5M9Uc NjUulfTJ9N1YZ5dpPKtouPTWEUeVfHrwK6oGDn8CInKM573A9O8EPFNsadnm3Mpu3h 4VfX2+6GFlswCMiJS4/w/5dl3/nik7UTeKQgbbTX15ulFxFg4wg+d/9x38IPVcgl2A pSw3GWlhHhjtw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2] PCI/PM: Reject invalid PMCSR when checking PME status Reply-To: sashiko-reviews@lists.linux.dev To: xianhutan@asrmicro.com, linux-pci@vger.kernel.org In-Reply-To: <20261202062959.3519241-1-xianhutan@asrmicro.com> References: <20261202062959.3519241-1-xianhutan@asrmicro.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 06:34:47 +0000 X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] PCI/PM: missing Fixes: trailer on pci_check_pme_status() bug fix -- commit dcca1782a229a418387489996a407e0fb1b337cf Author: Xianhu Tan > PCI/PM: Reject invalid PMCSR when checking PME status > > pci_check_pme_status() reads the PMCSR and checks the PME_STATUS > bit without validating the value read from the device. > > If the device or its upstream bridge is inaccessible, a > configuration read may return all ones. Since bit 15 of 0xffff > is set, the PCI core incorrectly interprets the value as an > asserted PME_STATUS bit and reports a spurious PME event. > > This can cause an unnecessary runtime resume of a suspended > device. > > The issue occurs in pci_pme_list_scan(), which scans devices > on the PME list and calls pci_check_pme_status() to check > their PME status. > > On the affected platform, reading the PMCSR after the device > enters D3hot with the PCIe link in L1 returns 0xffff, causing > the PME scan to trigger a false PME event. > > Use PCI_POSSIBLE_ERROR() to reject an invalid PMCSR value > before checking PME_STATUS. > > This also prevents writing the invalid PMCSR value back to > the device when clearing the PME status. > > Tested on: > - ARM32 platform with PCIe endpoint. > > Test cases: > - PMCSR read returns 0xffff: no false PME event is reported. > - Normal PME status handling remains unchanged. > > Signed-off-by: Xianhu Tan [Severity: Low] This fixes a bug in pci_check_pme_status() present since the function was introduced. Should this include: Fixes: 58ff463396ad ("PCI PM: Add function for checking PME status of dev= ices") --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202062959.3519= 241-1-xianhutan@asrmicro.com?part=3D1