Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1775634rwb; Thu, 10 Nov 2022 23:27:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf5w1WQn1H8h0ZYOZ0JVVM+80fZfqOYMCwnGnJEqo9pCb79iBPwBy8rV8arI+BkgajOopAH+ X-Received: by 2002:a17:906:a443:b0:7ad:9760:539d with SMTP id cb3-20020a170906a44300b007ad9760539dmr863951ejb.369.1668151665850; Thu, 10 Nov 2022 23:27:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668151665; cv=none; d=google.com; s=arc-20160816; b=xqwea0DQIgV8JawIXNSKAPJl17z9OFM8lPVznQ6fKE+3/CSumFGHOoveVksJeLvXuU QVkqTw9sjUFIxFiXjmpYnZ5wE78m+KEDjuWP8BZKaXmkIg5MK8Nw+nAs2KDJOpO4DB1D rzntAoQ8V58suxBIkC/baQ3wsaoj9eYeuy98QMqNTLde6+4YCoQQr3ZqfjDM2hvSgl3j De7VC3axxUCgoCrBSBp40I/+OvrEtKU3k5Paoqx0K5i/gOUc/+csfdMuQO2a+EWJv02d qZpnP4k71Oj3xaz5DVw6EXbI2YviP+9CLLV3u2RVmUIZGMja91epunjnT0rMU5aDZKet TH7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=YfGpV2JA6patueMGzEYztlKL5Nu/nd16bt9DITnJUsw=; b=iPodlzO5al4So0nmKZcUgCtidlBnQEOXnlLwr78b8Mha6E6l6BidPNQciWhBnZyvPF p1zRc7p0DrGQhJDEQF1jGIjPcbTajTlwkyoNICv0kXgfCIbEpPz5IJwwy5lCCqUtNSF7 TKtMDT5CV5rpuK4j0J1J1Cwf3vXpdd3hfBiRDB5FDmaWoukbNHvKuqa8MlYxO4IsjTTh +JDd/vYHdkWvDv2MML1GATvnu0fNjq0u5xhw/j1/aufA8VFTEYG/zr5rUMkqBcd9Rki8 Kh4Ajf5Rz6FN+AoodhjKJnzJHQPR9K2HaA5xB8JYOq9xNhK/qWCSoP8QkpE/9B0zGj3l ERWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EhhSM3ub; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dp17-20020a170906c15100b007a9d456583bsi1413257ejc.62.2022.11.10.23.27.22; Thu, 10 Nov 2022 23:27:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EhhSM3ub; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231564AbiKKGcd (ORCPT + 92 others); Fri, 11 Nov 2022 01:32:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232935AbiKKGbY (ORCPT ); Fri, 11 Nov 2022 01:31:24 -0500 Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A46EC1AF24 for ; Thu, 10 Nov 2022 22:29:01 -0800 (PST) Received: by mail-yb1-xb2a.google.com with SMTP id y192so1557973yby.1 for ; Thu, 10 Nov 2022 22:29:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YfGpV2JA6patueMGzEYztlKL5Nu/nd16bt9DITnJUsw=; b=EhhSM3ubjZZaNZW6RsLRC5+FRMYk1rWzaPCdefEyP6qJ3zQelmXzARbaV4VbwNhuUU Z5Es/matWC2laMecuVrAfpFH43B8jkn6BuywA3Rl38VFl4g0dkFqhMMv7pVWyLLTH4Vh IhmS6VaIQOHK9sMSN+nIaVZ67YvF7rbs4J5b0MXjABKQiXCL1DgICa4ZfLmB68aAw7M0 uggrcvUXW+11tHXofn0LcNQlrKdteVdAHkc7ruWcANvyDoSNB9mnrs6Z7228tVlIu77B 8zxW2oxbAvd1G87KDie6SBwvO6O/n9muMnP4eHQsL+/wwZ2fTx+xq79Y26xQyK4pijoz 7TpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=YfGpV2JA6patueMGzEYztlKL5Nu/nd16bt9DITnJUsw=; b=AOoEadkwiYy92TU34mnPrMZAiEzYQ+ToSayvgGOIeoyJ+g5B2Lip1Kz/vVarclYmcn cE9hFQAl0bbhVkoFH/muOVr0ix8OZFFGlQl0yjAio/GvGF6jJPSg70oNZ3lSqs7By2jS 4390r9Bd0jacBXizyp8UZ5eTFylzfhlEyXBXKXIA0Qrm/ZlQ9L6W9olLzCJ/xnIxli/x oSj8nBpN18E7QxvhPKuTzHESulmTIFRQ7pgc1OWV3qLB11zbMqXeV4avoRox5/n01XgQ 53zI1EJPKX3vxxOJ6eeIFZnKzrbFAt+vuIZrs3A89wVFFu5pslcacCqtO+YhNmmYUVEC amFg== X-Gm-Message-State: ANoB5pmuDQDHZakFSTqJoTjureR4+0Oaq46xjCRh78cMQYpR3FT4itkM mfz5qSYa4JFmXNwBxFj845LMqSCCkLfb9ohypyqDcw== X-Received: by 2002:a25:900c:0:b0:6c4:8a9:e4d2 with SMTP id s12-20020a25900c000000b006c408a9e4d2mr544847ybl.164.1668148140428; Thu, 10 Nov 2022 22:29:00 -0800 (PST) MIME-Version: 1.0 References: <29824864-f076-401f-bfb4-bc105bb2d38f@app.fastmail.com> <96a99291-7caa-429c-9bbd-29721a2b5637@app.fastmail.com> In-Reply-To: <96a99291-7caa-429c-9bbd-29721a2b5637@app.fastmail.com> From: Naresh Kamboju Date: Fri, 11 Nov 2022 11:58:48 +0530 Message-ID: Subject: Re: arm: TI BeagleBoard X15 : Unable to handle kernel NULL pointer dereference at virtual address 00000369 - Internal error: Oops: 5 [#1] SMP ARM To: Arnd Bergmann Cc: linux-stable , open list , Linux ARM , lkft-triage@lists.linaro.org, Greg Kroah-Hartman , Sasha Levin , Linus Walleij , Mark Brown , Liam Girdwood Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, On Thu, 10 Nov 2022 at 03:33, Arnd Bergmann wrote: > > On Wed, Nov 9, 2022, at 13:57, Arnd Bergmann wrote: > > > > One thing that sticks out is the print_constraints_debug() function > > in the regulator framework, which uses a larger-than-average stack > > to hold a string buffer, and then calls into the low-level > > driver to get the actual data (regulator_get_voltage_rdev, > > _regulator_is_enabled). Splitting the device access out into a > > different function from the string handling might reduce the > > stack usage enough to stay just under the 8KB limit, though it's > > probably not a complete fix. I added the regulator maintainers > > to Cc for thoughts on this. > > I checked the stack usage for each of the 147 functions in the > backtrace, and as I was guessing print_constraints_debug() is > the largest, but it's still only 168 bytes, and everything else > is smaller, so no point hacking this. > > 168 print_constraints_debug > 96 timekeeping_advance > 64 set_machine_constraints > 64 of_i2c_register_device > 56 of_platform_bus_create > 48 schedule_timeout > > One more idea I had is the unwinder: since this kernel is built > with the frame-pointer unwinder, I think the stack usage per > function is going to be slightly larger than with the arm unwinder. > > Naresh, how hard is it to reproduce this bug intentionally? > Can you try if it still happens if you change the .config to > use these:? > > # CONFIG_FUNCTION_GRAPH_TRACER is not set > # CONFIG_UNWINDER_FRAME_POINTER is not set > CONFIG_UNWINDER_ARM=y I have done this experiment and reported crash not reproduced after eight rounds of testing [1]. https://lkft.validation.linaro.org/scheduler/job/5835922#L1993 > > Arnd - Naresh