Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp759571lqo; Wed, 8 May 2024 14:08:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXtlEs1pfYE/7PcXyZAsSxJamUbnUcqxwnv3Xh7cylLF+h7XmHZ89BjdNrKrCWg9ILC0681AVtCu8u7M2LaGVwrlELCNr48Qs6O6fEGbw== X-Google-Smtp-Source: AGHT+IGQIbfDmFvrqD45x7ZmXKFEzZBZZXd2S0GkHyXVEbl2BmkgdGBeAgtUWbMK4csqhVnhHh+F X-Received: by 2002:a17:90a:e38f:b0:2ab:99d5:ae11 with SMTP id 98e67ed59e1d1-2b6166c15dfmr4615740a91.20.1715202498883; Wed, 08 May 2024 14:08:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715202498; cv=pass; d=google.com; s=arc-20160816; b=CAZRwjU8QVmGHwoQAki40vOljhj1YA7SwEJs1rEgWyx+YypBRJ5ZzibFacHHpd5/58 ae6t+dcP0erkS1zd2QF1JIh9jOVlIsc64IvbTeFkYwCl7h4J8pop39ztcisB8zO8w2po mc9MapSoFEpAmOSMVice2g+yjC7u8gXUbpIIvY2Y5f9/CoXf/n5cR+reK2PzYHDJRCfM Nv1Ysl9fsM1xfgGQPVwSxV54T60OQFK9EpcKD//8tRMUw5mXvY8Aw9rS+3KZLKXnLq3j 3ExAuCI9jCiBSNkK2jMuO0i3r76CQ2RuMhW75o/Heiu11d//jQulg7mc2gkHl570LkrD rM0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=uysWUhd+mFP/8DQDYwRCph49GuPMOosAxVLVtOn+vxk=; fh=u6i6mcHUkbAJ07LhxHvBgeQlrBIFoX7vDbFoNraik+Y=; b=IFTDQWaxJhmZzSRCBvspp+1sHSklySEpxQAdTWDwttPTmTEob1T/gf+sgvq6yntOt+ +4oxJoYgHhPfBBE+NIjER1jwa004vtg4GqQeN1kMIbZSY5jgMmmNHwORVljGbJuyi4Xa F4SUOhz8Je1jl384g8MYnWI+Re3jHgXQ3/lZu+zcSg/sMPJ1mQPONZXRobXPDpqxXIOo OIwv7WEy4KvEUOe633tbMNM580cue3odiOJryN10+jRQPf1iwWPn71wyvEHdrgy6vuXP /hFJ2/D6VdI5ujrpAcrB5tqAwnRMlRzzbXvJgpszZEz67EeFnJ4mm1G2Mw2rfBuK+ywO S7ZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KiKw0h67; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-173827-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173827-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b671589dc0si30341a91.146.2024.05.08.14.08.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 14:08:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173827-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KiKw0h67; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-173827-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173827-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3C7862844C2 for ; Wed, 8 May 2024 21:08:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F03A0131BAF; Wed, 8 May 2024 21:08:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="KiKw0h67" Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A9DB13175C for ; Wed, 8 May 2024 21:08:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715202492; cv=none; b=lX3AQUdTDKEDaSfca7y1R6uXcQ/GyB2FSps4v8aKThxe0jOTe7dKljphXHMpwNvB3yLtW5Pa2dKmbtrO7Hky7Xg5Vabjp+LeP7Ycdg3oTW5Zku45i0TXbkiOqKPOwJpWRxJRr6s4haRjzwv6uTuwzRCzP49F+KDrCqgqKZB7Vwk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715202492; c=relaxed/simple; bh=LKGV7xc5nr9ry+yJYOSLrex6y//3fq+gaLwkrTGdTHw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=e1kzY8i5bDtsVpnTfSjz9I3IlAOoGRZEhfNlyaXDZiUwR2Bc49i7wX0gdXd38jYWqQDrzY8OHIzRDf/p8UovwOWE9KhtGmFDiF5qiz1Q6pcBdXaJejJzDrqpbilN4UvE7B7bWpvObvOvoLVPV53eW2g0gCBZf0HYdosfTsoBNE4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=KiKw0h67; arc=none smtp.client-ip=209.85.219.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f182.google.com with SMTP id 3f1490d57ef6-de60a51fe21so237252276.0 for ; Wed, 08 May 2024 14:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715202488; x=1715807288; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=uysWUhd+mFP/8DQDYwRCph49GuPMOosAxVLVtOn+vxk=; b=KiKw0h67mgg/iES4fpkMXS4Kqd5ZsF9spsrAzS+GRxhjCiWzx1u21mMk4RHGCkOPhL tdgPHZ4burejA7Le+BIPYZ8QB62B+eJzWigjo6NueGUOh9BAFBhqp5qIG1hKgchKjPaW eLOTbzmoG+SvbPeVjyOLq/EbBH54OF+oRlnAMXhL/BKdTNYFomSWTV87HRIy6rFIIVQB JskLBSfUX7chADfyf9DUo9cxG9yg3Bh1sICn7CMG8OHvZDWt4D0A6FpjWPBdmbNv/FLR rAv9z/2W5BprkG8+8pr6ih7Z3c1HhrA4OjAmPGywvO8Wy5UpgHOLmsVw09uFs+gG9dEn u8Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715202488; x=1715807288; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uysWUhd+mFP/8DQDYwRCph49GuPMOosAxVLVtOn+vxk=; b=fnNB3p6zAwUr1OCBgYeQawywsp12b3ywIM5iu+t/4JWiR7+3ADFEgRnxyHilfSnsgn pRaBuS0zKK0JGH2VLt0IMRVMW19bKAB/UY85tMGbZ8+FLydZUaqOEBlKDoJykfaeOWya FvTHj6IH325Zbk5X84yDLy6nMCzmN0SoiPEGpnWRKVqRLtbhttE2ecOOPCIZOAjDpx8C uzNv3FZ9QfQeeaUjowTQYhEIrX2VEDXoT8GP3ATFUnhlAIo4CNLzBsfQIvCZ/gJaN6Vi Tw4jQFKswVF6CDAs6td3k8RJ8MsOo1WHTNVkRD4thcwbEq5NdcGpI+uFl8yqpYp7JiXq Jz2w== X-Forwarded-Encrypted: i=1; AJvYcCXzFWY+4Y2K3VfETQKGNzzXOo74zaN0EqGilC9aud1SJINbB/aqTsfZtOQbHUSQqSqXDZ/MfMBaCxXszBGykKhCs4/3iE+x/MXb738f X-Gm-Message-State: AOJu0Yx891dVx2GSIDUYh+BuF/IRkDYKhD+WTxjWErciCo/D1FDy1vA4 HLfmvGDm1CB25mKLg8qtul1xmcBMx85N+48A0LCxabO4Utt+LyAxBViqVGx54BWrdtmqq2V726I P+syVLkyUQ2F6I2cHvrdQLrblKnF5Cqfsm5V5ng== X-Received: by 2002:a5b:811:0:b0:de5:4bb4:25b9 with SMTP id 3f1490d57ef6-debb9ce095dmr4532379276.12.1715202488456; Wed, 08 May 2024 14:08:08 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <11be44d3-0f32-49c6-b4ae-ba97a9f97763@app.fastmail.com> <820ddc2ec70780ae1ecd3af864dc8bd6.sboyd@kernel.org> In-Reply-To: <820ddc2ec70780ae1ecd3af864dc8bd6.sboyd@kernel.org> From: Sam Protsenko Date: Wed, 8 May 2024 16:07:57 -0500 Message-ID: Subject: Re: clkdev: report over-sized strings when creating clkdev entries To: Stephen Boyd Cc: Arnd Bergmann , Linux ARM , Naresh Kamboju , linux-clk , lkft-triage@lists.linaro.org, open list , Russell King , Anders Roxell , Dan Carpenter , Michael Turquette , Marek Szyprowski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, May 7, 2024 at 3:26=E2=80=AFPM Stephen Boyd wrot= e: > > Quoting Arnd Bergmann (2024-05-07 00:44:15) > > On Tue, May 7, 2024, at 09:20, Naresh Kamboju wrote: > > > The WinLink E850-96 board boot failed with Linux next-20240506 but th= ere > > > is no kernel crash log on the serial [1]. > > > > > > Anders bisection results pointing to this commit, > > > # first bad commit: > > > [4d11c62ca8d77cb1f79054844b598e0f4e92dabe] > > > clkdev: report over-sized strings when creating clkdev entrie > > > > > > After reverting the above patch the boot test passed [2]. > > > > > > Reported-by: Linux Kernel Functional Testing > > > > > There are two fixes on the list: [1] and [2]. Perhaps one of those > resolves this? > > [1] https://lore.kernel.org/r/20240507065317.3214186-1-m.szyprowski@samsu= ng.com > [2] https://lore.kernel.org/r/20240507064434.3213933-1-m.szyprowski@samsu= ng.com > Late to the party, but FWIW here is my two cents. E850-96 board crashes on boot when running next-20240508. Enabling earlycon reveals the details. Here is the relevant excerpt from the backtrace: 8<-------------------------------------------------------------------->8 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 Call trace: vsnprintf+0x64/0x724 ... _printk+0x60/0x84 vclkdev_alloc+0x118/0x13c clkdev_hw_create+0x64/0x9c do_clk_register_clkdev+0x58/0x7c clk_hw_register_clkdev+0x30/0x54 samsung_clk_register_fixed_rate+0xac/0x104 samsung_cmu_register_clocks+0x78/0xb0 samsung_cmu_register_one+0x48/0xa4 exynos_arm64_register_cmu+0x3c/0x70 exynos850_cmu_probe+0x2c/0x40 ... 8<-------------------------------------------------------------------->8 'addr2line' points at the end of vclkdev_alloc(): pr_err("%pV:%s: %s ID is greater than %zu\n", &fmt, con_id, failure, max_size); Applying the forementioned patch [2] ("clkdev: fix potential NULL pointer dereference") fixes the boot for me. I can also observe a couple of warnings like these in the kernel log: samsung_clk_register_fixed_rate: failed to register clock lookup for clk_rco_i3c_pmic samsung_clk_register_fixed_rate: failed to register clock lookup for clk_rco_apm__alv ... The patch [1] ("clk: samsung: Don't register clkdev lookup for the fixed rate clocks") fixes those. I think both have to be applied ASAP. In case of E850-96, I guess [1] is more critical. Thanks!