[v2,0/2,next] clk: visconti: Fix undefined behavior bug and add bounds-checking coverage
Message ID | cover.1697492890.git.gustavoars@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3748995vqb; Mon, 16 Oct 2023 15:05:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFLUzrz16qqvztb+wfG32bfIk97AsLu9YZ+CU9yC2Z0OGa1BzIfsnjurKbnS4MsTArPGZWK X-Received: by 2002:a05:6a20:d80d:b0:15d:f804:6907 with SMTP id iv13-20020a056a20d80d00b0015df8046907mr396967pzb.0.1697493907104; Mon, 16 Oct 2023 15:05:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697493907; cv=none; d=google.com; s=arc-20160816; b=DN7IGRDNMq2TQqx0MD2txG7DowoxxR669J0CF3GMzYKczolRVtl0xt1oVxdNXRXxW7 pdQpVmRB5OCESDncqVPnzcsrsrh1Djg76PKNsSaplZF4bXc+mlorH0sytThz/OhSAOgc kN65rHyR4Rf0Mos+A4AsGjQ/3F5wXHxpQMMLt3EPF1Czg1E0MawGGxtWSHyllWsjE3Sn olkq7inAWmlFFPrcNTgQk3CcPrca8HRImf8do/7ytosd/7ZM8g7phcvZcSukNtKXDdFr AXhqb3qwb3PP3fcvH57lXf3g6nZ+wJyKzq8+N0trxSpq5Fn0EYZrdTXyEPbfHSk4E7gr otlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=2R4czqkT6U0+ReHrjm2md2A+IhvD5fKDW+HDe2r9cb0=; fh=gk24IOEycqD+6u11idkE8VXvRMctSQA5r+DBdFry3D0=; b=Lc7/b7oRKpt6y0wxNTXSZu6suWHthmlItiwxipA0uVnHqrYNlyan3PorsCUFWOEvPq FZJ/jSJmqR4I2sJmNJAdbXqHjEJuAiERfkwz8JPZNxL5VpTpqww2HFyU5tQ3r42uTLDd Kx9IA2kMQ/ALytBeZ2yNriRgByAzBZ/pQRlqH5u3Wp2igXPBAymx9vwgDE6myMHwq57W hIvgrAO5hzuY6s4nv6fjTdIor1L+b2A9YfwGtLclCjvCia5gK7R+fQ/o0ngJbcx7N8Ea xnkWBsDP+LEQLKpNHuQ5H/GcM7J0ZLdyQLfdl67TbO/2YeH0z9AXvtT8tKj9QX1IOIaQ kOqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SDJ3m32h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id c18-20020a170902d49200b001c1e1fe16cbsi261059plg.255.2023.10.16.15.05.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 15:05:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SDJ3m32h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 2BDE2805A7FA; Mon, 16 Oct 2023 15:05:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232457AbjJPWEv (ORCPT <rfc822;hjfbswb@gmail.com> + 18 others); Mon, 16 Oct 2023 18:04:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229666AbjJPWEu (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 16 Oct 2023 18:04:50 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36E8C9B; Mon, 16 Oct 2023 15:04:49 -0700 (PDT) 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" <gustavoars@kernel.org> To: Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp> Cc: Kees Cook <keescook@chromium.org>, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" <gustavoars@kernel.org>, linux-hardening@vger.kernel.org Subject: [PATCH v2 0/2][next] clk: visconti: Fix undefined behavior bug and add bounds-checking coverage Message-ID: <cover.1697492890.git.gustavoars@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 16 Oct 2023 15:05:05 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779951370976184679 X-GMAIL-MSGID: 1779951370976184679 |
Series |
clk: visconti: Fix undefined behavior bug and add bounds-checking coverage
|
|
Message
Gustavo A. R. Silva
Oct. 16, 2023, 10:04 p.m. UTC
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(-)