From patchwork Wed Dec 13 21:53:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerry Hoemann X-Patchwork-Id: 753897 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=hpe.com header.i=@hpe.com header.b="OouDOYdH" Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C337E3; Wed, 13 Dec 2023 13:54:08 -0800 (PST) Received: from pps.filterd (m0150245.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BDL31A1016672; Wed, 13 Dec 2023 21:53:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pps0720; bh=/mc35BB7pN+bTQ14JgWZrfQ8eiHQQLtvFVxq/fsszlc=; b=OouDOYdHgXHG5XVl+pyVtruSEruAJaAe9d1QiBESMEYxdBkAnqKNV1mfCV7HOm9e1URD E9lI8KbQprBhvhfz/9nn+oZ/X1igO2s46E5CGAf8Gm/OUZPQ7jS92uiO4XMgYTCIGhQR +QBPdv8x4GBPrisYqTKqbFYZOtqtcHbhgQUFO12Yrl9b5yDeh9nEOczJzE6SFwheeT4w vYFWibI8lfF8d/NMFBrS00R23ZUe7+ZdURC58YddzgwAOKpZBkz7VGNbggLL5gjZr8C/ Tw7zdzJSURrFy1cyZZf8Dihq6K7z1kOnkcQ9x5dgk9vke1dIzgkTUaZe7jy4z5KWUbze Gw== Received: from p1lg14878.it.hpe.com ([16.230.97.204]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3uydkrc49m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2023 21:53:52 +0000 Received: from p1lg14885.dc01.its.hpecorp.net (unknown [10.119.18.236]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by p1lg14878.it.hpe.com (Postfix) with ESMTPS id 02BD213152; Wed, 13 Dec 2023 21:53:52 +0000 (UTC) Received: from anatevka.americas.hpqcorp.net (unknown [16.231.227.39]) by p1lg14885.dc01.its.hpecorp.net (Postfix) with ESMTP id 91C64800472; Wed, 13 Dec 2023 21:53:51 +0000 (UTC) From: Jerry Hoemann To: linux@roeck-us.net Cc: wim@linux-watchdog.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Jerry Hoemann Subject: [PATCH v2 1/3] watchdog/hpwdt: Only claim UNKNOWN NMI if from iLO Date: Wed, 13 Dec 2023 14:53:38 -0700 Message-ID: <20231213215340.495734-2-jerry.hoemann@hpe.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231213215340.495734-1-jerry.hoemann@hpe.com> References: <20231213215340.495734-1-jerry.hoemann@hpe.com> Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: lQKZrEfkl6YnOP9D1O6kyoL07T5tlA7I X-Proofpoint-GUID: lQKZrEfkl6YnOP9D1O6kyoL07T5tlA7I X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-13_14,2023-12-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 clxscore=1015 mlxlogscore=999 priorityscore=1501 malwarescore=0 suspectscore=0 impostorscore=0 spamscore=0 adultscore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312130154 Avoid unnecessary crashes by claiming only NMIs that are due to ERROR signalling or generated by the hpwdt hardware device. The code does this, but only for iLO5. The intent was to preserve legacy, Gen9 and earlier, semantics of using hpwdt for error containtment as hardware/firmware would signal fatal IO errors as an NMI with the expectation of hpwdt crashing the system. Howerver, these IO errors should be received by hpwdt as an NMI_IO_CHECK. So the test is overly permissive and should not be limited to only ilo5. We need to enable this protection for future iLOs not matching the current PCI IDs. Fixes: 62290a5c194b ("watchdog: hpwdt: Claim NMIs generated by iLO5") Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck --- drivers/watchdog/hpwdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index f79f932bca14..79ed1626d8ea 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c @@ -178,7 +178,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs) "3. OA Forward Progress Log\n" "4. iLO Event Log"; - if (ilo5 && ulReason == NMI_UNKNOWN && !mynmi) + if (ulReason == NMI_UNKNOWN && !mynmi) return NMI_DONE; if (ilo5 && !pretimeout && !mynmi)