Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp79427rdg; Tue, 10 Oct 2023 05:02:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGN44tlsAWsa4VtQYB7ESJZMghGgFEY0lvZM5AeikEiWHK9bE2lROAEN4oyWtW9t65fCiSs X-Received: by 2002:a05:6358:7246:b0:14f:9904:a17f with SMTP id i6-20020a056358724600b0014f9904a17fmr10810404rwa.15.1696939329450; Tue, 10 Oct 2023 05:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696939329; cv=none; d=google.com; s=arc-20160816; b=tKNqnzuU4zXa1oGWqu9rKpc2G8SDN7g6UvjFNiHEOzUbU8JOliEqk+JOpA7DUA1DwQ 1f96QhDuDHVjiSLRXv7tnjuBcPELg/So/UsrJdCgdQ7xEevdPshGYNFbtcyeS1d2d1a+ DYo4+PyY1UVbaj/I09nsPOxSc7/2xNQxnRUyOCMzWFKHOhb/TnqIP7SW0xo3yoac3k9z EU95ZAMKeS4KdSpAvvZJBgXpy6AhcXD0Igbev3K9vVQ/P3iXZoeqq0C3Mk8I9Lw3gPGn msVF0Y3Cv4/pFOd/mgyN+WWkG+fWWwqg7l97GcThOe6lv/YuMiQ7Nuk8EcjSnQlL2t8p C4LQ== 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:date:subject:cc:to:from :dkim-signature; bh=Y68z3aCPrkpSeEJ8jrHgJkjcMI0IR+4BI187tjb7ZrU=; fh=9o1vzmbQvXEiiOZAoGEKGHmVR4Ieb6r+octdNZgYFWA=; b=X7NcFLsRCQzaTj9I3Ep21Cd9O5+y8VAjzVQzwosC7HFiUr2k8T6bTdMbHty0IU3IKh 5eXAFGClWe3RsVuTWItfadnLnO3oV75xkPBO9f4azBqhsX6Fp9y8zReZU8cauXDWWgk7 BJNFaid6Rko8/H0zvFOjpHBgJMhaVm2uVUOJdfUhMZqNNpIThPtuNc48VcmRieWW1JjH iXLfIK4OQoRi0VgtqKVUIv/Y97fypvyGyx83zkX6smRHRhu2jlL7Ob4XD+y1z0qRsHmf lxL/+kZVJAqTHx17a6paf6UyIa8xonz6UxdjkIuWktxjl1n6CtLGgE0vBz48nk00ftfX jkaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h7L+9Olz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id cm4-20020a056a020a0400b005775e2f160fsi10993860pgb.667.2023.10.10.05.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 05:02:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h7L+9Olz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 002C2801CFD0; Tue, 10 Oct 2023 05:01:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231730AbjJJMBb (ORCPT + 99 others); Tue, 10 Oct 2023 08:01:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231856AbjJJMBC (ORCPT ); Tue, 10 Oct 2023 08:01:02 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7800125; Tue, 10 Oct 2023 05:00:27 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4FCBC433CA; Tue, 10 Oct 2023 12:00:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696939227; bh=ksjecpVsxhnG07ngqspAmw6yvV2qCy9sCs74cU/Rdec=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h7L+9Olzu0k0FZ7CM6Jy88fRCY/dMxW9AoTJ6lOe+YoyqewT6IR3tvLW+iV8XC9kB n8N7jztdBh+71s/fK4Y06fc3tl9dFtenwX5FgspmGr93MA8VSzR2p5aimRk3gbUfry jHynYBGBqfreKcu+i9nmnGp8vFPNz/hbKpOLoGS+50IS7XUuZQPNpKoo2dKAsG6Y0Q wnBmqbYPWv63AtaPRjmHctqZYkombm2vSW3kq5y16UorCL7XuIJDvpzNyrSfQPFZ16 dtRqnBb2fbL6fofjKPryP2437WkZIuUNFL0vO2vu8XT9MeIqIx3Jzt3TH81dvwW2xA Zf8t3LeL9LJ7g== From: Frederic Weisbecker To: LKML Cc: "Paul E. McKenney" , Boqun Feng , Joel Fernandes , Josh Triplett , Mathieu Desnoyers , Neeraj Upadhyay , Steven Rostedt , Uladzislau Rezki , rcu , Frederic Weisbecker Subject: [PATCH 19/23] torture: Add kvm.sh --debug-info argument Date: Tue, 10 Oct 2023 13:59:17 +0200 Message-Id: <20231010115921.988766-20-frederic@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231010115921.988766-1-frederic@kernel.org> References: <20231010115921.988766-1-frederic@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 10 Oct 2023 05:01:58 -0700 (PDT) X-Spam-Level: ** From: "Paul E. McKenney" This commit adds a --debug-info argument to kvm.sh in order to ease interpretation of addresses printed on the console and the like. This argument also disables KASLR. Signed-off-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker --- tools/testing/selftests/rcutorture/bin/kvm.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index b0f36a638a69..7af73ddc148d 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -49,6 +49,7 @@ TORTURE_SHUTDOWN_GRACE=180 TORTURE_SUITE=rcu TORTURE_MOD=rcutorture TORTURE_TRUST_MAKE="" +debuginfo="CONFIG_DEBUG_INFO_NONE=n CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y" resdir="" configs="" cpus=0 @@ -68,6 +69,7 @@ usage () { echo " --cpus N" echo " --datestamp string" echo " --defconfig string" + echo " --debug-info" echo " --dryrun batches|scenarios|sched|script" echo " --duration minutes | s | h | d" echo " --gdb" @@ -135,6 +137,15 @@ do ds=$2 shift ;; + --debug-info|--debuginfo) + if test -z "$TORTURE_KCONFIG_KCSAN_ARG" && test -z "$TORTURE_BOOT_GDB_ARG" + then + TORTURE_KCONFIG_KCSAN_ARG="$debuginfo"; export TORTURE_KCONFIG_KCSAN_ARG + TORTURE_BOOT_GDB_ARG="nokaslr"; export TORTURE_BOOT_GDB_ARG + else + echo "Ignored redundant --debug-info (implied by --kcsan &c)" + fi + ;; --defconfig) checkarg --defconfig "defconfigtype" "$#" "$2" '^[^/][^/]*$' '^--' TORTURE_DEFCONFIG=$2 @@ -163,7 +174,7 @@ do shift ;; --gdb) - TORTURE_KCONFIG_GDB_ARG="CONFIG_DEBUG_INFO_NONE=n CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y"; export TORTURE_KCONFIG_GDB_ARG + TORTURE_KCONFIG_GDB_ARG="$debuginfo"; export TORTURE_KCONFIG_GDB_ARG TORTURE_BOOT_GDB_ARG="nokaslr"; export TORTURE_BOOT_GDB_ARG TORTURE_QEMU_GDB_ARG="-s -S"; export TORTURE_QEMU_GDB_ARG ;; @@ -179,7 +190,7 @@ do shift ;; --kasan) - TORTURE_KCONFIG_KASAN_ARG="CONFIG_DEBUG_INFO_NONE=n CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_KASAN=y"; export TORTURE_KCONFIG_KASAN_ARG + TORTURE_KCONFIG_KASAN_ARG="$debuginfo CONFIG_KASAN=y"; export TORTURE_KCONFIG_KASAN_ARG if test -n "$torture_qemu_mem_default" then TORTURE_QEMU_MEM=2G @@ -191,7 +202,7 @@ do shift ;; --kcsan) - TORTURE_KCONFIG_KCSAN_ARG="CONFIG_DEBUG_INFO_NONE=n CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_KCSAN=y CONFIG_KCSAN_STRICT=y CONFIG_KCSAN_REPORT_ONCE_IN_MS=100000 CONFIG_KCSAN_VERBOSE=y CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_PROVE_LOCKING=y"; export TORTURE_KCONFIG_KCSAN_ARG + TORTURE_KCONFIG_KCSAN_ARG="$debuginfo CONFIG_KCSAN=y CONFIG_KCSAN_STRICT=y CONFIG_KCSAN_REPORT_ONCE_IN_MS=100000 CONFIG_KCSAN_VERBOSE=y CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_PROVE_LOCKING=y"; export TORTURE_KCONFIG_KCSAN_ARG ;; --kmake-arg|--kmake-args) checkarg --kmake-arg "(kernel make arguments)" $# "$2" '.*' '^error$' -- 2.34.1