From patchwork Thu Oct 12 02:14: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: 13418149 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 B481FCDB465 for ; Thu, 12 Oct 2023 02:15:27 +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=gguOQYdUsuXb/R1ZEpToF2Ni5n53Z5ly0Hn6GR1v7jA=; b=tr2wKeRf2puMKq LVs8J2iHPbTWZh8ZRJfZBMDxNdeiB1JB3d5pY/BPRkfzYWgYs7EWQq/0a5BVOIc8x+PBaqbCXgveT 3IEYKjnHYt0+zlX1ae8pgmGO/74TIhJCb1i5M3Dk/HGrWP3fwUPqgMzjbrQnXhuBl5IHhlvKqQrHk M/0UT8UgOYqDC9accMBTkZzminJVZz0TdMN4Eu1cedY60FZ4XFgizIjPhmql9CpG23z7z/bNNp41L LoPkFQb7qw3QisiVODafDUDToxQ8YGV98/OqJTaNVB3JCEK6XpvLH8biXCmBjw/eXnMeXWkHLC7lY 5yOBb3dlzQ7UZLL0eaCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqlE1-00HAZi-1H; Thu, 12 Oct 2023 02:14:57 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqlDy-00HAYy-1e for linux-arm-kernel@lists.infradead.org; Thu, 12 Oct 2023 02:14:55 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 9D388B822AA; Thu, 12 Oct 2023 02:14:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75749C433C8; Thu, 12 Oct 2023 02:14:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697076888; bh=c3G3HVGvGIs8FEY0jb1ba95NJxbK+CEvkZgGlWn3Ck8=; h=Date:From:To:Cc:Subject:From; b=WjwYMpdrkWZm3vLulM3RsDQKQum6qGR9K0uqFhKd8F01NZVWAXktIY/Ko1CBeT8x8 WRGwXIXVZTewXpB417CEpj+b0DiWl/L3YO9qkTKxPqNc+7WSO2RbwneUFB0xADWeVS Sd2Lb2J6A+YeGMh7EWLkGT8gQL3wYsLIn7K56oUXa5CVDow7lWGriOTyJ7hZmicXec gkEiDUJ3QwyH1VXFLYl5jHxtGwgwml6rTE+zvqyZ7HoR3GyuPYdUuycvPrvbWnjuCj iXgydgtZP/O7gLo0q6vFbFZIQFHpQfziccSsoFGUsrXAlCKvMnVH++uCGSbnbyItyd N8lANoTEHuT2A== Date: Wed, 11 Oct 2023 20:14: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 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-20231011_191454_718123_1D1718E4 X-CRM114-Status: UNSURE ( 7.67 ) 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`. 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(-)