Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2533609rwb; Fri, 9 Dec 2022 03:25:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf4u6eTqXo1AYB9VOWWxUCVJ1kR3PjuBvOHjxIkT1IhfRMzUVN+HPcrKms6JAXLYEqMqyhx3 X-Received: by 2002:a17:90a:e2c6:b0:219:5f5a:7197 with SMTP id fr6-20020a17090ae2c600b002195f5a7197mr5595065pjb.0.1670585149219; Fri, 09 Dec 2022 03:25:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670585149; cv=none; d=google.com; s=arc-20160816; b=q2mCl6TDzXCHevErY8YfcL4bBeLBId4NRCAmV9zCGMMAIkAqrpT3SNdkTIA00OKh5w H1eYApa7FD9ZZr27nUQUYXDHHJjmjNzI2NhzxnZt1RdrpIr6u0/1yn1nA8ubnk9x3XiK 9cbYQCyuhPbIiAwT4Uny7X9w2pnlcY5Wx7wh9/dExZ6beyqRJ8bTjkgLvqe00ufMX0c3 o7UEaQSIH07PnU9BVqnDNezW02BQDilRLAPR6HBySxUBo5ZKeNe/2ZrAWOICUUH5SIV6 ZdlM+Ljfukc3Hr3sOf75x2SbUT6ZzgPJzN0D1MHnHAVRPMo/7e+hL19swbT1CBg4NnYS nnaw== 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=6nUybkpdoxWR99ax7weqONa2WaNCKN5oKF2ZNQDQrPI=; b=bp8gEjd88uD2Aqdqm0WE/6U9CkjY/6qyTqiCmNzuhM3zJ59VtTQ9gacK0AJd+pCY4+ D8TpMD1Ki3j83tpxRvhp9EG3VCq93T3pcWKILmAQwCcKlUJUjH1QqGf0CMRxMgz8LTxf EXtJzm5RSIqVTNkcleL8/Lsd6hb9d+8ZtKdmzEKmaEbje0nMN/qkLsgaDtdRzx6GTJbK cvviv+rpXVr9h8ububsq2eMTEx9DF658OpRixcdsqOmdSNtBpaSRvpnwhTjmTuMhA98I yFJV+ymrEIu+YHyVF/So6pwzA87+0aCrCkf8diHO1LAzTg6adWr7/ze4fplcEG0of2gW h50A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l123-20020a632581000000b00477a18e51e2si1334830pgl.141.2022.12.09.03.25.38; Fri, 09 Dec 2022 03:25:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229756AbiLILRH (ORCPT + 75 others); Fri, 9 Dec 2022 06:17:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229796AbiLILQk (ORCPT ); Fri, 9 Dec 2022 06:16:40 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7B36B6FF0F for ; Fri, 9 Dec 2022 03:16:38 -0800 (PST) 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 0AFCA23A; Fri, 9 Dec 2022 03:16:45 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.39.232]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C089A3F73B; Fri, 9 Dec 2022 03:16:36 -0800 (PST) Date: Fri, 9 Dec 2022 11:16:34 +0000 From: Mark Rutland To: Masami Hiramatsu Cc: Catalin Marinas , Will Deacon , Mark Brown , Kalesh Singh , Marc Zyngier , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sandeepa Prabhu Subject: Re: [PATCH v2 1/3] arm64: Prohibit instrumentation on arch_stack_walk() Message-ID: References: <166994750386.439920.1754385804350980158.stgit@devnote3> <166994751368.439920.3236636557520824664.stgit@devnote3> <20221206094137.389e4c374f4be060af19f33a@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221206094137.389e4c374f4be060af19f33a@kernel.org> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 06, 2022 at 09:41:37AM +0900, Masami Hiramatsu wrote: > On Fri, 2 Dec 2022 13:17:30 +0000 > Mark Rutland wrote: > > I had a go at testing this patch, and it fixes the crash with the reproducer > > above, but there are plenty of other instances in stacktrace.c that lead to the > > same sort of crash, e.g. > > > > # echo p stackinfo_get_task >> ${TRACEFS}/kprobe_events > > # echo 1 > ${TRACEFS}/events/kprobes/enable > > Oops, thanks for pointing! Hmm, I thought stackinfo_get_task() is an > inlined function usually. Maybe we should make it nokprobe_inline. > But this is just one case. I need to scan all symbols to trace... FWIW, due to other instrumentation issues I've started doing a larger noinstr cleanup on arm64 which should address this, as fixing this properly involves also modifying a bunch of underlying helpers (e.g. preempt_count()). I can Cc you when sending that out, if you'd like? That'll probably be in the new year. Thanks, Mark.