Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2513289pxb; Fri, 17 Sep 2021 11:26:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+xfN1avlFXMyq9yp2bnk12vBN7a7Dq8w6Tb5LxEGrqk/YHOKHHCtXeAHF/bp4uhJuINdH X-Received: by 2002:a6b:cd01:: with SMTP id d1mr6540932iog.88.1631903172656; Fri, 17 Sep 2021 11:26:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631903172; cv=none; d=google.com; s=arc-20160816; b=fBjTWAkXeezG9VDxJa83u86JPmENfeEHJC/4Jpm5c863XmjX/mKwR6OrS3gOmna+v2 0Gttk9nb5sd4joccneUmUZwMfJvvdZRidkgzTLLRcfO9KBUcj079oZOUvwNRlXV8Gd+E NlC1h2i9X7hvgwBLUD8nVkTLzyezv3+Q4fU1T0smpoQ06FjyXRdHfjlfD2I7fbG7ggCc vlYQ3DSdw3ypEybfs0wPpjBuK7NaYIk/SDlEzddAhLTpT9Jla9tP7E8sq3O1HeJrwT2K uMTuZ2J+79HU9wddKrrJEepx5dKbT6/qYCnnOXX40i239lCDzkiZJgf5rGqe71AUTyQU Tyjw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tXuvGtUhPelbuiVZG2SNVQ8ZT1r2eKoLQS+KhKnonao=; b=pOEzo6psc0QjEL1hyslJ8Mr63sh8DW/PmKV0ELxXNbNK/hkjkd6WGHTSFkryzbviaE QSKAQztT7pMkzmaFeaP9R+l/RbxFOIBjilE+8zyQ97Zx9Q9RhqJVayrXSxFf0smdOijX oR8XzuvgIjg+JPtxmNwFOeMamhlEqx3dLekf/1qkVYaBT3+9OK4kQAjRtf8i99kdyGhA OQljLTWZdY7nIKZqRiUSwM2OV8qOgQJeY5CqDXvF45LiKgaTHbMy2s5hlFs4d6qrVwYQ A8V4EaQhVQ9ILcaZz/rlmvs7cc8ovuoA+JxDWLvqWUAtd/ze0m+ug6kj2ZnMq3pwSuW0 iBAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="PaRI/wYS"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k17si6481642iow.29.2021.09.17.11.25.59; Fri, 17 Sep 2021 11:26:12 -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=@infradead.org header.s=desiato.20200630 header.b="PaRI/wYS"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242445AbhIQKXM (ORCPT + 99 others); Fri, 17 Sep 2021 06:23:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234869AbhIQKXL (ORCPT ); Fri, 17 Sep 2021 06:23:11 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCDCEC061574; Fri, 17 Sep 2021 03:21:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=tXuvGtUhPelbuiVZG2SNVQ8ZT1r2eKoLQS+KhKnonao=; b=PaRI/wYSpd33GMaNUg4dwwwk35 9S41jv+5rzPsKoTxYZxGlyQAdrm6dO4hDxUUs3Vad29idB67/Eaa2y03aKl3S2n7QNINtwcBBriZl Y7eNE5PfDO6bvhKaGheKZDqmNM9fxxFeDHhK/iCv9MOEApKCWxQyFP8zpSBhmXkHJ4CExmJZMsQXA RRuyb537witKbV95bH/YRy3CmCGT7md1TknQPBBmZhVC+e9MHT4t2WzLUc8XE2W30BMG4DjknF1aC GR+YkplWVrACOzDKH1j7nnHCpYSA1m0rC4bZJQqrD6dhBD5G3n4J2FgqKOE8iBso0MTNh9jRCy7+5 lLiuUbNw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mRAzo-003qSp-Fs; Fri, 17 Sep 2021 10:21:29 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id CD570300260; Fri, 17 Sep 2021 12:21:24 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id B3FE92133B3D3; Fri, 17 Sep 2021 12:21:24 +0200 (CEST) Date: Fri, 17 Sep 2021 12:21:24 +0200 From: Peter Zijlstra To: =?utf-8?B?546L6LSH?= Cc: Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , "open list:PERFORMANCE EVENTS SUBSYSTEM" , "open list:PERFORMANCE EVENTS SUBSYSTEM" , "open list:BPF (Safe dynamic programs and tools)" , "open list:BPF (Safe dynamic programs and tools)" , jroedel@suse.de, x86@kernel.org, Josh Poimboeuf Subject: Re: [PATCH] x86/dumpstack/64: Add guard pages to stack_info Message-ID: References: <3fb7c51f-696b-da70-1965-1dda9910cb14@linux.alibaba.com> <3f26f7a2-0a09-056a-3a7a-4795b6723b60@linux.alibaba.com> <76de02b7-4d87-4a3a-e4d4-048829749887@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 17, 2021 at 11:02:07AM +0800, ηŽ‹θ΄‡ wrote: > > > On 2021/9/16 δΈ‹εˆ6:02, Peter Zijlstra wrote: > [snip] > > > > +static __always_inline bool in_stack_guard(void *addr, void *begin, void *end) > > +{ > > +#ifdef CONFIG_VMAP_STACK > > + if (addr > (begin - PAGE_SIZE)) > > + return true; > > After fix this logical as: > > addr >= (begin - PAGE_SIZE) && addr < begin > > it's working. Shees, I seem to have a knack for getting it wrong, don't I. Thanks! Anyway, I'll ammend the commit locally, but I'd really like some feedback from Andy, who wrote all that VIRT_STACK stuff in the first place.