Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3038672rwi; Fri, 21 Oct 2022 10:42:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4N5awAojvAiGWglWV0GduK6UW8QR+SwfUL7eF+0+8voRxMSG3TnTKeCIZKXndOZv9jQL// X-Received: by 2002:a05:6a00:181c:b0:563:2c6c:2a7a with SMTP id y28-20020a056a00181c00b005632c6c2a7amr20293689pfa.28.1666374150115; Fri, 21 Oct 2022 10:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666374150; cv=none; d=google.com; s=arc-20160816; b=0vaRLOQVfLYwUB86YR9RoDXTC0hixExJZWYmlkISKM+HoAfyya4w90SdzZwgM6mk6b ofNmEUmTEaU2POliCyXs11ryRtfJsIHstEcQ2peci1naBwf6Hmt0vZJeHElGwkkIcEuu Wh40tbNeQechWYE4uDHxk4sUKfe6+GWEMBzZAIHHCMNidLju8VMryrSJNRp/q041sASy I2aS4evyIgNXh4oQumoxPS1FiOBfAzb+c6Uja8PuUSHPDvbSrCGfJ4HFcE76J+1Bx4/l GHdklF64fHuTzMX7/bm15s0ONYTRuxEOuHb7VaJxCmn7kLoXLnpWdrT0WUbkxBPOD+E1 WwKA== 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 :message-id:references:in-reply-to:user-agent:subject:cc:to:from :date:dkim-signature; bh=OdWOQBaqPtwH7WTxoM2zqstOKsGwBaRxBfceti0LzbU=; b=VX/VzkKfrpCOs8BQLknx0GPmPqX89VQFpnA59++I/nC9WnStjwT+R0L1o1S6piScpK N9lcK+m7r9V54cSD8o9ZyWZ63hQTu3sPqBL7EdoFA0ToSptXUwxCs5pVpTl70OPDPzJv vvkHQLWoZGbk1H0NgCpCwUc6bi5NJVPgti1IVq6XGmQz4uH9f/b6/luVprZZvPyMUbVQ v1CymdrOQTi581SNHwnIn/D0Mw40E1qeE4eHz+1iD8g7MKxWBXEJl///BDGr2HLlIqEd +YmfnYaH9Q1fH5lV2mCQzDkq+/8QovJO2kcGJMI+gl77EHrha5l938KCjzf8+EbHUbED 3R6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sbc+CEwF; 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 mw6-20020a17090b4d0600b00212d63cd243si265858pjb.109.2022.10.21.10.42.18; Fri, 21 Oct 2022 10:42:30 -0700 (PDT) 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=sbc+CEwF; 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 S229604AbiJURVa (ORCPT + 99 others); Fri, 21 Oct 2022 13:21:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229926AbiJURVR (ORCPT ); Fri, 21 Oct 2022 13:21:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B721E43ADB; Fri, 21 Oct 2022 10:21:15 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 530A5B82C97; Fri, 21 Oct 2022 17:21:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 031EDC433D6; Fri, 21 Oct 2022 17:21:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666372873; bh=OPwlLlEXlUzE6SL4e+b2hevX5SKArYC0yWnxgjj7sus=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=sbc+CEwFVrdgV+3XX2gN5R7aeuG3yA9k2SFXrB8q1bEjcXoN9v9gOFU3SgcOCK8QX j+TzFP0Lfvmc6iQU2s81SsujeSt/Ib8TdzIvi0tG2zMXq21Q5LSCWUxTFc7iO5PQ/u gTcvkEJNDIEtjpzWUB+FmgqdSPdW0Ti1pWm1t3F0aE73wfIz43jN+2NoRzm6eJb3rB TEVl5NRncUIBHYHuxYWKe97bT9DHp4whnjKVnGkiwBwXqGqmu54/rLkfeP5TCZV9xP GQywwtek77jbiJ+ruHzyNcZYPIdozGCvOgdVjk4NilRO78fRqBPD91FSq3nl77p7zf s0Oe1XIahIygQ== Date: Fri, 21 Oct 2022 10:21:12 -0700 From: Kees Cook To: Alexander Potapenko , youling 257 CC: Marco Elver , Alexander Viro , Alexei Starovoitov , Andrew Morton , Andrey Konovalov , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Christoph Hellwig , Christoph Lameter , David Rientjes , Dmitry Vyukov , Eric Biggers , Eric Dumazet , Greg Kroah-Hartman , Herbert Xu , Ilya Leoshkevich , Ingo Molnar , Jens Axboe , Joonsoo Kim , Kees Cook , Mark Rutland , Matthew Wilcox , "Michael S. Tsirkin" , Pekka Enberg , Peter Zijlstra , Petr Mladek , Stephen Rothwell , Steven Rostedt , Thomas Gleixner , Vasily Gorbik , Vegard Nossum , Vlastimil Babka , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 18/43] instrumented.h: add KMSAN support User-Agent: K-9 Mail for Android In-Reply-To: References: <20220915150417.722975-19-glider@google.com> <20221019173620.10167-1-youling257@gmail.com> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 October 21, 2022 10:02:05 AM PDT, Alexander Potapenko wrote: >On Fri, Oct 21, 2022 at 8:19 AM youling 257 wrot= e: > >> CONFIG_DEBUG_INFO=3Dy >> CONFIG_AS_HAS_NON_CONST_LEB128=3Dy >> # CONFIG_DEBUG_INFO_NONE is not set >> CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy >> # CONFIG_DEBUG_INFO_DWARF4 is not set >> # CONFIG_DEBUG_INFO_DWARF5 is not set >> # CONFIG_DEBUG_INFO_REDUCED is not set >> # CONFIG_DEBUG_INFO_COMPRESSED is not set >> # CONFIG_DEBUG_INFO_SPLIT is not set >> # CONFIG_DEBUG_INFO_BTF is not set >> # CONFIG_GDB_SCRIPTS is not set >> >> perf top still no function name=2E >> >Will it help if you disable CONFIG_RANDOMIZE_BASE? >(if it doesn't show the symbols, at least we'll be able to figure out the >offending function by running nm) Is KALLSYMS needed? > > >> >> 12=2E90% [kernel] [k] 0xffffffff833dfa64 >> 3=2E78% [kernel] [k] 0xffffffff8285b439 >> 3=2E61% [kernel] [k] 0xffffffff83370254 >> 2=2E32% [kernel] [k] 0xffffffff8337025b >> 1=2E88% bluetooth=2Edefault=2Eso [=2E] 0x000000000000d09d >> >> 2022-10-21 15:37 GMT+08:00, Marco Elver : >> > On Thu, 20 Oct 2022 at 23:39, youling 257 wr= ote: >> >> >> >> PerfTop: 8253 irqs/sec kernel:75=2E3% exact: 100=2E0% lost: 0/0= drop: >> >> 0/17899 [4000Hz cycles], (all, 8 CPUs) >> >> >> -----------------------------------------------------------------------= ---------------------------------------------------------------------------= ------------------------------------------------------------- >> >> >> >> 14=2E87% [kernel] [k] 0xffffffff941d1f37 >> >> 6=2E71% [kernel] [k] 0xffffffff942016cf >> >> >> >> what is 0xffffffff941d1f37? >> > >> > You need to build with debug symbols: >> > CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy >> > >> > Then it'll show function names=2E >> > >> >> 2022-10-21 14:16 GMT+08:00, Marco Elver : >> >> > On Thu, 20 Oct 2022 at 22:55, youling 257 >> wrote: >> >> >> >> >> >> How to use perf tool? >> >> > >> >> > The simplest would be to try just "perf top" - and see which kerne= l >> >> > functions consume most CPU cycles=2E I would suggest you compare b= oth >> >> > kernels, and see if you can spot a function which uses more cycles= % in >> >> > the problematic kernel=2E >> >> > >> > >> > > --=20 Kees Cook