From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F91EC433DB for ; Fri, 22 Jan 2021 11:43:30 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4C08A23122 for ; Fri, 22 Jan 2021 11:43:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C08A23122 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=e/IGI61BJI4ZtcFEAsVS++Xe4SsPtARzjH+Rev3Tfbs=; b=gL3pUz2Q8nVyoxL4aEiz6m4KJ qalSj1GUGZfoqXH7zdFvhfd1TZVs3TMTWu3lcr9r0YU/lQXrPkAWvIoIk1pyZ0/sC2DEbpZ9YSHiQ KRtbcVgScr7btRqXpe3RPiKOKlPgcH/tH5Y1J/ZycDVaoBxs3DNDL64cWvWivA2TMk2E0LK0TKwNC XS+KEi1wN5XvQ3vloEV+opr/fKxw42mK/LnZcD+p2i9LIVKYTbhWScjbmvaL85LlmBnXvhUJJmTCA 9aovFJWIy7oEYY919JBi/75q8uUZPdtTKpP+9AtSKxLhChe+rUJjA0zeeKrcsBvugcxqA61XFag2h BTeBMUtug==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2upI-0001Yu-Vd; Fri, 22 Jan 2021 11:42:05 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2upF-0001YS-Hy for linux-arm-kernel@lists.infradead.org; Fri, 22 Jan 2021 11:42:03 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 78A3711D4; Fri, 22 Jan 2021 03:41:57 -0800 (PST) Received: from [10.37.8.28] (unknown [10.37.8.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5D9553F719; Fri, 22 Jan 2021 03:41:55 -0800 (PST) Subject: Re: rcu-torture: Internal error: Oops: 96000006 To: Mark Rutland , "Paul E. McKenney" References: <20210121185521.GQ2743@paulmck-ThinkPad-P72> <20210121213110.GB23234@willie-the-truck> <20210121214314.GW2743@paulmck-ThinkPad-P72> <20210122095925.GA29124@C02TD0UTHF1T.local> From: Vincenzo Frascino Message-ID: <07a8f455-8414-979e-3e1a-cbc63357acb6@arm.com> Date: Fri, 22 Jan 2021 11:45:46 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210122095925.GA29124@C02TD0UTHF1T.local> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210122_064201_904714_92D40C4A X-CRM114-Status: GOOD ( 23.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Zijlstra , catalin.marinas@arm.com, Naresh Kamboju , open list , lkft-triage@lists.linaro.org, rcu@vger.kernel.org, Linux-Next Mailing List , Steven Rostedt , Will Deacon , Ingo Molnar , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 1/22/21 10:02 AM, Mark Rutland wrote: > On Thu, Jan 21, 2021 at 01:43:14PM -0800, Paul E. McKenney wrote: >> On Thu, Jan 21, 2021 at 09:31:10PM +0000, Will Deacon wrote: >>> On Thu, Jan 21, 2021 at 10:55:21AM -0800, Paul E. McKenney wrote: >>>> On Thu, Jan 21, 2021 at 10:37:21PM +0530, Naresh Kamboju wrote: >>>>> While running rcu-torture test on qemu_arm64 and arm64 Juno-r2 device >>>>> the following kernel crash noticed. This started happening from Linux next >>>>> next-20210111 tag to next-20210121. >>>>> >>>>> metadata: >>>>> git branch: master >>>>> git repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next >>>>> git describe: next-20210111 >>>>> kernel-config: https://builds.tuxbuild.com/1muTTn7AfqcWvH5x2Alxifn7EUH/config >>>>> >>>>> output log: >>>>> >>>>> [ 621.538050] mem_dump_obj() slab test: rcu_torture_stats = >>>>> ffff0000c0a3ac40, &rhp = ffff800012debe40, rhp = ffff0000c8cba000, &z >>>>> = ffff8000091ab8e0 >>>>> [ 621.546662] mem_dump_obj(ZERO_SIZE_PTR): >>>>> [ 621.546696] Unable to handle kernel NULL pointer dereference at >>>>> virtual address 0000000000000008 >>> >>> [...] >>> >>>> Huh. I am relying on virt_addr_valid() rejecting NULL pointers and >>>> things like ZERO_SIZE_PTR, which is defined as ((void *)16). It looks >>>> like your configuration rejects NULL as an invalid virtual address, >>>> but does not reject ZERO_SIZE_PTR. Is this the intent, given that you >>>> are not allowed to dereference a ZERO_SIZE_PTR? >>>> >>>> Adding the ARM64 guys on CC for their thoughts. >>> >>> Spooky timing, there was a thread _today_ about that: >>> >>> https://lore.kernel.org/r/ecbc7651-82c4-6518-d4a9-dbdbdf833b5b@arm.com >> >> Very good, then my workaround (shown below for Naresh's ease of testing) >> is only a short-term workaround. Yay! ;-) > > Hopefully, though we might need to check other architectures beyond > arm64, ppc, and x86, to be certain! > Which other architectures do you propose to verify? > Is there any other latent use of virt_addr_valid() that needs this > semantic? If so we'll probably want to backport the changes to arm64's > implementation, at least for v5.10. > > Vincenzo, would you mind taking a look? > I am happy to have a look at it, but due to previous commitments I will be able to get at it after -rc1. A quick grep shows that there are ~32 cases that might be affected by the same semantic in the common code (left out arch/ and drivers/). I will post the improvement for arm64 in the meantime though. > Thanks, > Mark. > -- Regards, Vincenzo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel