Message ID | 20190221062851.21958-15-andrew@aj.id.au |
---|---|
State | Accepted |
Headers | show
Return-Path: <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444l6s1gmXz9s8m for <incoming@patchwork.ozlabs.org>; Thu, 21 Feb 2019 17:33:57 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="sL0fNdtL"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="nPWOCPsU"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 444l6s0GnZzDqNQ for <incoming@patchwork.ozlabs.org>; Thu, 21 Feb 2019 17:33:57 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=aj.id.au (client-ip=66.111.4.26; helo=out2-smtp.messagingengine.com; envelope-from=andrew@aj.id.au; receiver=<UNKNOWN>) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="sL0fNdtL"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="nPWOCPsU"; dkim-atps=neutral Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 444l220KH5zDqNV for <skiboot@lists.ozlabs.org>; Thu, 21 Feb 2019 17:29:46 +1100 (AEDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id A1E992217B; Thu, 21 Feb 2019 01:29:43 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 21 Feb 2019 01:29:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=wjzvtFV+TTlIP ENkoC4LHwqb2AeWyGzILWgJ+5FjBL0=; b=sL0fNdtLkOOp2DP1RRdoBR1/QdxQM ZoffdihTqfllYzgg7YuXeAXLGvhXYXl1YRq3I1nLLp3bTaWME6AZVunD8gvrs/LJ zwB3AAjh/uGLN9X8rPrOVIxPieyx1bL9EeDlM4DinTNoM/RR6vBqerHUCpsaL3be Lw4xsOUr36e3zaleQ48vabs4VsfsEOl+8sUeUHAtjE9bndYU/y17F5ZksLXUiF7Q wWTtpMFwR9rKFhj4eD21YUqfPYdEoF2SGfMbuSI+YhmZDgfwSntDXq0pxQFAspqD QCtX8aWtwp4a6TG/57vaEW1/qIoIZ+JiaIveXmFLJTJMJzGb40hJMB6cw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=wjzvtFV+TTlIPENkoC4LHwqb2AeWyGzILWgJ+5FjBL0=; b=nPWOCPsU Pqpyjhu2+0Amni+n9U7Wr/wJeNIaxXHokgWxGYFRoCa8lBKu4yvFaBtq/u9KM9ic 9sj2rSJoyJR2kz4APUEN7qcKqEh+iUg7ALlJN3WTjIrqu5JtLK2oQSa+h/vLoxu0 f9KAi1cIV1aczvv7Gv9saU7FG/pkrm+HSvAnMiuECs8GX0wnVnmdH1fYXu+gM2cc VNRW46P15ohvRzz0WL4yK9aUHTUlY+aI0Tv2NBD8Z23XA/5UjEGRXfKxrvJnxhZn w1ajLJ2QRlkiSWqg0kosLBxFsqFRYY52KFaZ7d/YXOmJ7pI05g94s6VGxQ6qa1s4 Di8p2ZMdkBqhIA== X-ME-Sender: <xms:V0VuXIHu4O9-kqmU1DWBufvvGy8l-eyRJ1A-JYRbvrQEDEunjGhJHw> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrtdejgdeljeculddtuddrgedtledrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehnughrvgifucflvghffhgvrhihuceorghnughrvgifsegr jhdrihgurdgruheqnecukfhppedvtddvrdekuddrudekrddvkeenucfrrghrrghmpehmrg hilhhfrhhomheprghnughrvgifsegrjhdrihgurdgruhenucevlhhushhtvghrufhiiigv peel X-ME-Proxy: <xmx:V0VuXNqseT0gt5jv_XjSv1N8yILRIJBb1KhJv70U_rBcy2-rlfK51A> <xmx:V0VuXG267aVx_-ZfIt2-vBAkiq1Y7z3dgtzVLOOb5MAPkTmTMIHAgA> <xmx:V0VuXOlEkUbDadB6-4eUR6_QZTkFf1wQPOip46jBSf4sbTGSgyKjPw> <xmx:V0VuXHP4fwNqll7kRUqoDFocEw9mcjaCdE2vw69ZZVi7qlyCdZolng> Received: from mistburn.bha-au.ibmmobiledemo.com (unknown [202.81.18.28]) by mail.messagingengine.com (Postfix) with ESMTPA id AFA2BE419A; Thu, 21 Feb 2019 01:29:41 -0500 (EST) From: Andrew Jeffery <andrew@aj.id.au> To: skiboot@lists.ozlabs.org Date: Thu, 21 Feb 2019 16:58:13 +1030 Message-Id: <20190221062851.21958-15-andrew@aj.id.au> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190221062851.21958-1-andrew@aj.id.au> References: <20190221062851.21958-1-andrew@aj.id.au> MIME-Version: 1.0 Subject: [Skiboot] [PATCH v2 14/52] libflash/ipmi-hiomap: Enforce message size for empty response X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development <skiboot.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/skiboot/> List-Post: <mailto:skiboot@lists.ozlabs.org> List-Help: <mailto:skiboot-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=subscribe> Cc: Andrew Jeffery <andrew@aj.id.au> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> |
Series |
ipmi-hiomap: Tests and fixes for event handling
|
expand
|
diff --git a/libflash/ipmi-hiomap.c b/libflash/ipmi-hiomap.c index 7a36449a5d0b..56492fa87067 100644 --- a/libflash/ipmi-hiomap.c +++ b/libflash/ipmi-hiomap.c @@ -208,6 +208,12 @@ static void ipmi_hiomap_cmd_cb(struct ipmi_msg *msg) case HIOMAP_C_FLUSH: case HIOMAP_C_ACK: case HIOMAP_C_ERASE: + if (msg->resp_size != 2) { + prerror("%u: Unexpected response size: %u\n", msg->data[0], + msg->resp_size); + res->cc = IPMI_ERR_UNSPECIFIED; + break; + } break; default: prlog(PR_WARNING, "Unimplemented command handler: %u\n",
The protocol defines the response to the associated messages as empty except for the command ID and sequence fields. If the BMC is returning extra data consider the message malformed. Cc: stable Signed-off-by: Andrew Jeffery <andrew@aj.id.au> --- libflash/ipmi-hiomap.c | 6 ++++++ 1 file changed, 6 insertions(+)