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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9CA2C433EF for ; Fri, 22 Oct 2021 16:18:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD3876108B for ; Fri, 22 Oct 2021 16:18:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233305AbhJVQVH (ORCPT ); Fri, 22 Oct 2021 12:21:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233202AbhJVQVF (ORCPT ); Fri, 22 Oct 2021 12:21:05 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1F0CC061764 for ; Fri, 22 Oct 2021 09:18:47 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id kk10so3338000pjb.1 for ; Fri, 22 Oct 2021 09:18:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5lhA+ZEQSNRiZSSK2ZDYsgihSLI5adnMAniviex3FN0=; b=c4edO6NNLXV4ZKNcSOemrzitem7XRU72wAQJXGm3y3+yU9Or9+QRQeagZcJNjUSIS2 NcogirJT/gnW79ZCA+3FELTDBkCjlJN+5hsS8vQFRiZpipqB4jh6aYKuUirHgMhro0+a dRW2WV+P7KbVrU5HoZbIlahTsuzCMphzwez9w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=5lhA+ZEQSNRiZSSK2ZDYsgihSLI5adnMAniviex3FN0=; b=B5h5b+UzD3BDrjCcdTdymDoPiZ53h8xhyiICpmiuzQ2tksGBMGTji+L2HOfoGheSBm FmqCpB1cesfmwnevrQieol3km+ISFobiN36iD0H05gXVEU8b9kTzeodP96natjntKCo+ g5x1vS0gpCnr5fozvNKFypyfPPwI6KBR1Q2kstbsvwLzsZWfOjLP69KhIRbwBZTzYTKk JTiEtFtOOobDTX7PQA/pP8NACFXU9UiHNtPYbRj+6sWwi2JxWhxoEZn+Ju7GhGUl5YS9 +vrxGM4t8YFYkpEUcHUv5arMXH+nLNk5duY7zllevPR6fuUlFBhzF8vNQD+3I/InMhYI uWSA== X-Gm-Message-State: AOAM532rb7X5hyVnGLQd38qekbSCFU0VZ4wfjQywdC8CJH2a7iGMeh5Y SWeIhl0qQg+8vxCl5tkJVGgeGg== X-Google-Smtp-Source: ABdhPJxXplxOVuLKy/nyMQfNB4RZ7adSCFGRQiz84fSzDlynTPzbyEUFIj20Xe1JMUfdk0THzlR6vg== X-Received: by 2002:a17:902:e544:b0:13e:e863:6cd2 with SMTP id n4-20020a170902e54400b0013ee8636cd2mr685420plf.41.1634919527588; Fri, 22 Oct 2021 09:18:47 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id v12sm10184384pjs.0.2021.10.22.09.18.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Oct 2021 09:18:47 -0700 (PDT) Date: Fri, 22 Oct 2021 09:18:46 -0700 From: Kees Cook To: Peter Zijlstra Cc: x86@kernel.org, linux-kernel@vger.kernel.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, akpm@linux-foundation.org, mark.rutland@arm.com, zhengqi.arch@bytedance.com, linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org, mpe@ellerman.id.au, paul.walmsley@sifive.com, palmer@dabbelt.com, hca@linux.ibm.com, gor@linux.ibm.com, borntraeger@de.ibm.com, linux-arch@vger.kernel.org, ardb@kernel.org Subject: Re: [PATCH 3/7] ARM: implement ARCH_STACKWALK Message-ID: <202110220918.B6056D68C@keescook> References: <20211022150933.883959987@infradead.org> <20211022152104.285488044@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211022152104.285488044@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 22, 2021 at 05:09:36PM +0200, Peter Zijlstra wrote: > From: Ard Biesheuvel > > Implement the flavor of CONFIG_STACKTRACE that relies mostly on generic > code, and only need a small arch_stack_walk() helper that performs the > actual frame unwinding. > > Note that this removes the SMP check that used to live in > __save_stack_trace(), but this is no longer needed now that the generic > version of save_stack_trace_tsk() takes care not to walk the call stack > of tasks that are live on other CPUs. > > Signed-off-by: Ard Biesheuvel Reviewed-by: Kees Cook -- Kees Cook