Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp915500pxb; Fri, 22 Jan 2021 02:26:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxO/cbMOQC9qZEsEawBL6m1LEW6crqAU3AgYD7/zR+IpT3ABHz8DVV+iwxMFzLMohf48u0+ X-Received: by 2002:a17:906:3daa:: with SMTP id y10mr2460169ejh.521.1611311214130; Fri, 22 Jan 2021 02:26:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611311214; cv=none; d=google.com; s=arc-20160816; b=uYXRtef1PZN2DhmlfuaHCIy2a5mcviIOWY4UNpdzxmOzhWgJEUSgdfHrvxTbCOr1VC fwfcrZs7QUpQVf40lJT57m0pYMvNU2bZv4LyjLb5RMiRWnRma4zTXgYujxDLE/M+Scvv Pn2Pssb2gKH4v6YtHxKkmMyM3BuLotem5ixpH8p4qWCgzthIq4IxBynLio13Fb+Sdeb0 vccoaL8jnmwnR4t1y8OAHpo1EhAlpXCpp7SNIK3OQIDVoHTCD6YFZId86+ynzmr2N6Ux CfK/4te1JT34A7tL6bR+I6ieRzALW/PYYZBnzS33P68ITlbi1a2vKq6boRNV1YwFX17D 3j5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=OY15IO6yHQcCk+vgxVkTdJWU2HfccxYxLQx8BO90USA=; b=QZWR2aK7Uo5mVgzi1FYA4B0RTdGvu25r+NXFIZQEbuVAjlBiBdXX+5ucVVNZ21C9tI +jZASECU9Uvjb6Yxml0MtnuFfC84C+orJ4HTbBoLgPtlUCVITh4NAwB6D1VgnLVThCp+ sabB0EWQNU3T89UFvbXdCSNDh4FuWTtPPDIJmKQ+fYcpXYDPJL0j4U9F+l1U1lpOPZQn RohCoFATEqYI3BrvkZ48Df4GyoVPJM/BuKQKibgoQZwD6ypJvh1vrMJe7k7WK7uDvz0x vhspz2Wi/D5pVIeztJ35XylpBovnAqIQAF/XfJIAHEnzszLV4u72J4bs/XQRmZtS97PX 5sgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v21si3305405edt.309.2021.01.22.02.26.30; Fri, 22 Jan 2021 02:26:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727931AbhAVKXj (ORCPT + 99 others); Fri, 22 Jan 2021 05:23:39 -0500 Received: from foss.arm.com ([217.140.110.172]:39226 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727123AbhAVKDi (ORCPT ); Fri, 22 Jan 2021 05:03:38 -0500 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 DF1AF139F; Fri, 22 Jan 2021 02:02:52 -0800 (PST) Received: from C02TD0UTHF1T.local (unknown [10.57.41.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1A3493F719; Fri, 22 Jan 2021 02:02:47 -0800 (PST) Date: Fri, 22 Jan 2021 10:02:30 +0000 From: Mark Rutland To: "Paul E. McKenney" , vincenzo.frascino@arm.com Cc: Will Deacon , Naresh Kamboju , rcu@vger.kernel.org, open list , Linux-Next Mailing List , lkft-triage@lists.linaro.org, Peter Zijlstra , Steven Rostedt , Ingo Molnar , catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org Subject: Re: rcu-torture: Internal error: Oops: 96000006 Message-ID: <20210122095925.GA29124@C02TD0UTHF1T.local> References: <20210121185521.GQ2743@paulmck-ThinkPad-P72> <20210121213110.GB23234@willie-the-truck> <20210121214314.GW2743@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210121214314.GW2743@paulmck-ThinkPad-P72> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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! 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? Thanks, Mark.