Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4975683rwb; Sat, 10 Dec 2022 20:04:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf4IP8Z5msp2JvAyAeIOsgRnilUvcCbVesZiwW01sz/sdJiVniHDeX5hubZcpG3EiSbJLZJx X-Received: by 2002:a62:cfc7:0:b0:575:fbab:a152 with SMTP id b190-20020a62cfc7000000b00575fbaba152mr10525334pfg.31.1670731444656; Sat, 10 Dec 2022 20:04:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670731444; cv=none; d=google.com; s=arc-20160816; b=ulYg7d3wTs3RhXTjPty10JOx96A+2XOoIHNvWc/jb/DOfyyAEuAzEkGrvRBnpWHa8F Afx91VjS48XGzFuKtSuF+yLvGW8SlmN3Sm5HZak3hAmSwMhLoLPonBS2pZ5u5Viq9PhP QkgI0uVvZuYp7QJdJyfHNTI7VahMMQfjy5vsyJSi6EpemWrdkFm1ktdmuVX6UyoOecwV SY/8xobZ5WBzprpeV6UCYbLtXTyPuXsmbJAW3F+4DNQVgvgN+vfk+LtV5jiN6SqI3rUP oezrhVAcYYvzPre9lSHNljrVOBmC+64GlBHaOhatTpHvjjReAst21l7Chw7ZkJkHW2yD AhMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=6l0hxIXD+jXSNBStunY+7QjTmcibfqRuDm/EKH9wHdc=; b=YWBkPf4/vUiKV0lsj0pauhGfK18i1KDftBShu01zMU4s++/V/QeWGArj8e6cdlvK2/ WVTkVLyQ5Uin2mUrmpvSjdpDH3LAmOlumzjB5o172PCvLTVQ8Zt5NMyUsh9RK75Bzv+7 sFcbgd1A8W9eFqyi8Al0pZoIEN7scsCQGRISW0WO9z12dxT1ndZT7tcbXkaqGZieJgcG KINsvfODnfLTTyq4vuFzZvV3Yl06weM9vpqcYmPPG2VA4VZa0Dc/GcOPAeJVRdnzxFGs +XVtstcnZcBHMlWG86l32ivEI0DJg68wQAaOJUsFRXqcG2iTtXsn2QlvmfODDtwURFqj pOXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=COwvuUMh; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c199-20020a624ed0000000b00577552eff0bsi5744585pfb.27.2022.12.10.20.03.52; Sat, 10 Dec 2022 20:04:04 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=COwvuUMh; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229879AbiLKDaj (ORCPT + 77 others); Sat, 10 Dec 2022 22:30:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbiLKDaf (ORCPT ); Sat, 10 Dec 2022 22:30:35 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28F6912749 for ; Sat, 10 Dec 2022 19:30:34 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B91F160D27 for ; Sun, 11 Dec 2022 03:30:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93F97C433EF; Sun, 11 Dec 2022 03:30:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670729433; bh=wRIobwquSy08Tv0LJs3ziIB87YrLx/8nhlifA+ng4tI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=COwvuUMhLT1w595/Z62ZeDhM3fgXSsL9WJGnzmuog5Rd3DY87jZre81QsY0v9uRVQ atmFGugj0dHYz8J2FtejpBu+P0NVXRMh1sSrdatvYr5Mw5pzunI4qPNt47zqTDdg2+ YWL6kVhzgzXF0eiNblr8S+vBNyvWTA7epWJNG0EraOv7eOCtb1APygannpY7q2HwkG OAytKPRissF7j0Yq0j4Gi4LVzVcAQrVm9LtmqCWX8yrjyQ3wO3N5ju6sK8BQ2cMn+2 QmifXw1Kz2OSgRedSoS+iYO24QIxKlzvibIPiDMnsqN2nkgChaxmB2r8OWjiaklRGn DLPo1NuYFUGaA== Date: Sun, 11 Dec 2022 12:30:28 +0900 From: Masami Hiramatsu (Google) To: Mark Rutland 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: <20221211123028.3b1aa794a1bcaf7f6dc92ac3@kernel.org> In-Reply-To: References: <166994750386.439920.1754385804350980158.stgit@devnote3> <166994751368.439920.3236636557520824664.stgit@devnote3> <20221206094137.389e4c374f4be060af19f33a@kernel.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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 Fri, 9 Dec 2022 11:16:34 +0000 Mark Rutland wrote: > 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, yes, I'm interested in that work. Until that, I'll finish making a script for testing kprobes widely on kernel symbols. Thank you, > > Thanks, > Mark. -- Masami Hiramatsu (Google)