From patchwork Mon Oct 16 22:04:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 13424223 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75E42CDB474 for ; Mon, 16 Oct 2023 22:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=2N6HaoxuTGfrT9mXYCdOP4Vv3V54RUGEOpE8Pq4mwK0=; b=rVPhieAACUKQ2B bM5DebbscgEMc/a5/vNlqEx7eJ//XdfGNSCYfPS6TgehTHot+9XSW8uRqijbGQ+TsoEvX5+JkVjVo xr0UyRT/0lZ5Gnlz5a2wqLES43IkItCEJTliqEdqGRJJ3YAChPWDDb8/BgrRxnRtwh1404we2Tk1U /AvJEm1saj7ymwMyLODwonwCc32mhPJbSPHaMFh5BLew4FLh2NW6c+qt6Fg94Fj5VizmlLmCgiaT4 2RXzOjtePjpHGJTvB+cCk4onu2q8OUOoP0uflrYNWpplVhfJjjJHlH+WHRoU+Clnr025SfJVT4P/Z Dx3SWzJS8ErLKBZH8O8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qsVhm-00AfND-1Z; Mon, 16 Oct 2023 22:04:54 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qsVhi-00AfMW-2n for linux-arm-kernel@lists.infradead.org; Mon, 16 Oct 2023 22:04:52 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 17FF76108D; Mon, 16 Oct 2023 22:04:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82E17C433C7; Mon, 16 Oct 2023 22:04:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697493888; bh=Zu8r+UFNm3vd5emenr5/jPt+Q2RIuOTafj17uJohU+Y=; h=Date:From:To:Cc:Subject:From; b=SDJ3m32h5Fq72f4xV1Mgs/ZVsIsG4MjIHRKKj/QV8CAZ77CUIzbBiFEqi2QnZz0yR NspIuMLPXzPeHhLFILOZ/UehXr7pIloHyDcr42gnrgPlmqSJDZkDIjy2Q7yeU23lDM vqH8+YmU4V0GTZPZKHMl5Ti64omHBT0tydfkyFNp5vjbevwRvEhPT1agkRuiY55d7l y0UoOCnk0XhVXZJy82x+htxUg081xzhEJPlEAGCzgYRlnXfyQm9BoOrCR45U9lcOAI 75huKhqZ9nLcNvR4a1FUSkcT7U1IPqlSbU5087htRSiXfsgTVEPPljFoEJQYuUWq7d 6RI2mMc7nuG9w== Date: Mon, 16 Oct 2023 16:04:44 -0600 From: "Gustavo A. R. Silva" To: Michael Turquette , Stephen Boyd , Nobuhiro Iwamatsu Cc: Kees Cook , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org Subject: [PATCH v2 0/2][next] clk: visconti: Fix undefined behavior bug and add bounds-checking coverage Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231016_150450_971727_10856AAF X-CRM114-Status: UNSURE ( 8.56 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This small series aims to fix an undefined behavior bug in `struct visconti_pll_provider` and add bounds-checking coverage at run-time for flexible-array member `hws` in `struct clk_hw_onecell_data` when accessed throught `struct visconti_pll_provider`. Changes in v2: - Mention -Wflex-array-member-not-at-end in the changelog text. v1: - Link: https://lore.kernel.org/linux-hardening/cover.1697076650.git.gustavoars@kernel.org/ Gustavo A. R. Silva (2): clk: visconti: Fix undefined behavior bug in struct visconti_pll_provider clk: visconti: Add bounds-checking coverage for struct visconti_pll_provider drivers/clk/visconti/pll.c | 6 +++--- drivers/clk/visconti/pll.h | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-)