Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1253203pxk; Thu, 10 Sep 2020 10:41:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxr72EEhvzVmQJR8pjSGHBtHWVrF10jaGQCN2Y4WRrS9B501H//3Galg73isaawsMvMcZfg X-Received: by 2002:a50:fe0f:: with SMTP id f15mr10425508edt.235.1599759677936; Thu, 10 Sep 2020 10:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599759677; cv=none; d=google.com; s=arc-20160816; b=q5JYO+gmWFVuYyoxLLwUdR5ittgcjf/usNKvfSegRpd/dv18kSihmkYRJ9PVfCpEyG eVQrlvEAb0cmM7iKU/7NSRx40CFIXYAJcayn73g5sYjqW9IjmQ+tTCX5Tf5RDKrZM+SD 5gAL3IkCeYy9U3nk2bzhuabHY+SY4m4haRI9narMrlpT4uLIfhBa4mN3/MDd84oyUapn TtsTJYIlM92XWFBegX630qQ+q8EZgVi64xAhLbF/FQi5PnjWkJyygC5pWBBHSRMf4GfR jBQ0JdYTmW4u7zAq6ReVIXGW+26sqHReD/yX9tzLs+r6pLLxFtKhRJU+DicmoKEpwXmz s5Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uJ/XlGh1rmTHihSFdXsHxJupobo42k9UirKpctiQsrY=; b=gIPcR5bRicT17ley9XwdpjPRS0Q74lQ9VLua/37xJJiTJgL2B9nP+i6xC3crV4Pgbp ZFuDX2ZZWU0PFmigoNHGFmyR1RsfPr3fbhnRqt83CfQSGWE4Db7fFN4Sgu5aQ56H3mcH 5Tp+/4CqAadc0vkLDwGkm6S30tiQU8dwtzbt+fPL4sYjRiQ+zY5kYn3EIxaxkbV4QjAJ uAw0FsxUCEugVDim9NJIXIow+/35rhUBJiuNFR75E/XZlcHQwobeTJ46RxMI0c8iZbg+ Hj2r++sE9SPi5pmTuHmiVHx1dLmEOY+oy1ZA1HZm2yB57nXtIWxf+1Gv+jwgk031A5Au 4GIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ysjUja//"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u17si3829101edx.501.2020.09.10.10.40.54; Thu, 10 Sep 2020 10:41:17 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b="ysjUja//"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727070AbgIJRkW (ORCPT + 99 others); Thu, 10 Sep 2020 13:40:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:47352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726996AbgIJRfC (ORCPT ); Thu, 10 Sep 2020 13:35:02 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 642B8206A1; Thu, 10 Sep 2020 17:35:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599759300; bh=eoZV/4n0ptuA8626OxlGlZVQ5Lm/f4NMMJfN4yyY/ZU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ysjUja//f6Wumt5D2oORZzXD8C7F+uQkRoyqYKW5382EG2mSf0ffkyHMAEXQnK9on I9zwfQgggE9Vf1Yq6qyTiRWrq+p53U6LzQmY4Q08fH5hAdG1wMTZKKfozs4yKqDmMc 24F4mn6pALcKKpr6Lu2BcI7FWRUxMOqqGQ46yKO8= Date: Thu, 10 Sep 2020 18:34:14 +0100 From: Mark Brown To: Mark Rutland Cc: Miroslav Benes , Catalin Marinas , Will Deacon , Vasily Gorbik , Heiko Carstens , Borislav Petkov , Thomas Gleixner , "H. Peter Anvin" , Christian Borntraeger , Ingo Molnar , Jiri Slaby , x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/3] arm64: stacktrace: Convert to ARCH_STACKWALK Message-ID: <20200910173414.GD4898@sirena.org.uk> References: <20200819124913.37261-1-broonie@kernel.org> <20200819124913.37261-4-broonie@kernel.org> <20200902184935.GA5875@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pQhZXvAqiZgbeUkD" Content-Disposition: inline In-Reply-To: <20200902184935.GA5875@C02TD0UTHF1T.local> X-Cookie: I disagree with unanimity. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pQhZXvAqiZgbeUkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Sep 02, 2020 at 07:50:27PM +0100, Mark Rutland wrote: > On Wed, Sep 02, 2020 at 11:32:13AM +0200, Miroslav Benes wrote: > > > - start_backtrace(&frame, > > > - (unsigned long)__builtin_frame_address(0), > > > - (unsigned long)__save_stack_trace); > Oh whoops; I'm annoyed I didn't spot that. > With that gone this cannot work for (task == current && regs == NULL), as > we'll erroneously use stale values from the task struct. I remember somehow convincing myself at the time I originally did this that doing the above was redundant with the new interface but that was quite some time ago and I can't reconstruct my reasoning any more, I'm pretty sure I was just mistaken. I've added it back in, thanks for spotting this. > It looks like the LKDTM tests only trigger cases with non-NULL regs, but > IIUC this should show up with show_stack(NULL, NULL, KERN_INFO), as > drivers/tty/sysrq.c does for other cpus. show_stack() doesn't go through this bit of the stacktrace code, it goes through dump_backtrace() in traps.c which used the underlying arch specific unwinder directly so is unaffected by arch_stack_walk(). Actually now I look at LKDTM it's ending up using show_stack() mostly if not entirely so my testing with it was not exercising this change as much as might be expected anyway (the modified code was getting hit by other things like /proc/N/stack). --pQhZXvAqiZgbeUkD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl9aY5YACgkQJNaLcl1U h9AoNgf/bxtql5YMDWhCmeDMNhMAagB2dVCtaee/UDna+zUsH1N44ptx9JFeXcW/ f9sDitnklB+I+tyAlXTeej76l/ohXZL6jkVGL1SYOQZZDgGw+bUkf9KsZLYjrtK/ TY4aybyOzZdHrwtImEb9GlLPZ65UWrzsUdDgnWOmWy0sBgsoa2g0YwkrM5EhbS/5 WHttMds5ootnjvB6znsKHoLOvi84gnIEAZf1F+gYDshZFdpeDVK7Zk4E7t+ZRpeE wE1kUJd2UKJhZsyaqE2ewXL+0N9wIJgQ1F17aOqcRfHcWBrsyzyZzJSib6ygUfax pWT5j9mXTEP/L6TiDwy/FIsH1+X2ZA== =Vsd/ -----END PGP SIGNATURE----- --pQhZXvAqiZgbeUkD--