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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D9792C433F5 for ; Sat, 5 Mar 2022 20:22:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+fwSDxfvsh5DWHdVGkhTV/i/53+iNv7/5xblY+1wrWM=; b=SQ3IChE8tUcZv/ 1iDSNIgpo0c9DPNjeQi+RuCPyaifEEzSm/8lrBPWWTiqr4BjSCjU+WLewYrKzPe0TD84fYjPNEra2 DuqoJzf9seTm8v9YBaVsJEeKILwMmZPT489dZviw/7nzNywT/zWRTalCaPnPdJ8e/Gq7mYIYmex+M xZowP2OEYLpU/AtFniz2+8xq9ugykx7R3kRZi6uSPzMlI2vgO8g1VPE4eTLG/w8/OwMfpeJh/oYxx lD+/dtBzPzo46KqFJQvierUvgxbKrsVNNkdtBbhsBt+DQ8dz+nv9M/9D8gqkr/kIznneeu6YvPhzf IsyHyrghk1usNKFUw1hw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQatZ-00DlVC-4w; Sat, 05 Mar 2022 20:20:53 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQatU-00DlUf-Bv for linux-arm-kernel@lists.infradead.org; Sat, 05 Mar 2022 20:20:50 +0000 Received: by mail-wm1-x330.google.com with SMTP id r187-20020a1c2bc4000000b003810e6b192aso7033645wmr.1 for ; Sat, 05 Mar 2022 12:20:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=tuVfkbpCF9cw80PH4HXnVUatf/MwT7pNZsDNZkTgOak=; b=DO1NGODiK1GuQ30LEliThbvtBbVHc1mMg5L/jm4s5X1Pwel939Hc5cL0iL4my3ySqO BXPIXmsTDy7JCSQuMGQOaiYQ69kncy3OAbuRKfbnje1u1zOrDyrn6xWYL5YCR+kOTH4d vub5qSO5162YMzhd+moBgt/78wENS06g0/MBwkOPg9MsZClVi/eOu+5j3FEFbayHQW/W 3PDmo9ENqtSLV2QYYyie1ns/OibTVAjXotOaR0fdvsieZr8fcSZNoxNOTqeuSE9+BBoH 1cRQX8zzP9QCTGs/Le+5Cc9jfeFt9FgBrf8ECTVr916sQXVPAgnT4u0PT6ALs0VneUBB 0law== 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:content-transfer-encoding :in-reply-to; bh=tuVfkbpCF9cw80PH4HXnVUatf/MwT7pNZsDNZkTgOak=; b=TaGSDLLsQy1dc6dnlNqJdzgtKJGcK+tuHKAEJMUe2/FBD/nmx1pWY50VqvUa78P/oZ pyZOeKxNtrjAwYmO0jPVrmVGVT1cHvyrksbggZ7fyE1tDN9Q3vH0gF67CP7Xh4ZvhGXl DgBfF7m3Okp2VfNmR/HVhAbhqH1TAYvwEndOSole1Pcn9cSG1DAxvfT478Wzczmv65mA wU7Q0RwYjq8Uqpe+kQYRV67vkKnCiAEyN1wJNtd93mHdj0CdXiRyvNl1HneQQV9187hq 4w+xPBAQ6UjbNYtd3h0BcQ3GCByMeUnjJnpgHvYecsNQer+bys0KuZFwMw1W0QB8QASV DqGw== X-Gm-Message-State: AOAM531RQJzpuYtLVBVW0qoCs2MD4xFKwFKZXYMyLdmB8mp2VY6dmbP7 jqCat0XUXRIcKL3TfiS/Weo= X-Google-Smtp-Source: ABdhPJyu91P1Mw3E2nX1N/kPmSe3DUUmCRAUMUWPYdD5YeBRtYuUDuNiSvE+q/PyMueiQ7DM5BdYPA== X-Received: by 2002:a05:600c:21d1:b0:381:4fed:159a with SMTP id x17-20020a05600c21d100b003814fed159amr3320310wmj.143.1646511646114; Sat, 05 Mar 2022 12:20:46 -0800 (PST) Received: from Red ([2a01:cb1d:3d5:a100:264b:feff:fe03:2806]) by smtp.googlemail.com with ESMTPSA id f7-20020a5d4dc7000000b001f1d99e9441sm2838320wru.106.2022.03.05.12.20.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Mar 2022 12:20:45 -0800 (PST) Date: Sat, 5 Mar 2022 21:20:42 +0100 From: Corentin Labbe To: Ard Biesheuvel Cc: linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk Subject: Re: [PATCH] ARM: return_address: disable again for CONFIG_ARM_UNWIND=y Message-ID: References: <20220302113201.1864406-1-ardb@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220302113201.1864406-1-ardb@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220305_122048_454365_E21B0F8D X-CRM114-Status: GOOD ( 16.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Le Wed, Mar 02, 2022 at 12:32:01PM +0100, Ard Biesheuvel a =E9crit : > Commit 41918ec82eb6 ("ARM: ftrace: enable the graph tracer with the EABI > unwinder") removed the dummy version of return_address() that was > provided for the CONFIG_ARM_UNWIND=3Dy case, on the assumption that the > removal of the kernel_text_address() call from unwind_frame() in the > preceding patch made it safe to do so. > = > However, this turns out not to be the case: Corentin reports warnings > about suspicious RCU usage and other strange behavior that seems to > originate in the stack unwinding that occurs in return_address(). > = > Given that the function graph tracer (which is what these changes were > enabling for CONFIG_ARM_UNWIND=3Dy builds) does not appear to care about > this distinction, let's revert return_address() to the old state. > = > Cc: Corentin Labbe > Fixes: 41918ec82eb6 ("ARM: ftrace: enable the graph tracer with the EABI = unwinder") > Signed-off-by: Ard Biesheuvel Hello On next-20220304 even with both = ARM: unwind: avoid spurious warnings on bogus code addresses and ARM: return_address: disable again for CONFIG_ARM_UNWIND=3Dy I got: [ 0.134043] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D [ 0.138372] WARNING: suspicious RCU usage [ 0.142702] 5.17.0-rc6-next-20220304-dirty #3 Not tainted [ 0.148523] ----------------------------- [ 0.152850] include/linux/cgroup.h:481 suspicious rcu_dereference_check(= ) usage! [ 0.160838] = [ 0.160838] other info that might help us debug this: [ 0.160838] = [ 0.169466] = [ 0.169466] rcu_scheduler_active =3D 1, debug_locks =3D 1 [ 0.176510] 2 locks held by kthreadd/2: [ 0.180657] #0: c19216b4 (&p->pi_lock){....}-{2:2}, at: task_rq_lock+0x= 34/0x134 [ 0.188734] #1: eef68b50 (&rq->__lock){-...}-{2:2}, at: task_rq_lock+0x= 5c/0x134 [ 0.196770] = [ 0.196770] stack backtrace: [ 0.201472] CPU: 0 PID: 2 Comm: kthreadd Not tainted 5.17.0-rc6-next-202= 20304-dirty #3 [ 0.210018] Hardware name: Allwinner A83t board [ 0.214914] unwind_backtrace from show_stack+0x10/0x14 [ 0.220582] show_stack from 0xf0835e8c [ 0.224818] = [ 0.226447] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D [ 0.230774] WARNING: suspicious RCU usage [ 0.235108] 5.17.0-rc6-next-20220304-dirty #3 Not tainted [ 0.240926] ----------------------------- [ 0.245250] include/linux/cgroup.h:481 suspicious rcu_dereference_check(= ) usage! [ 0.253235] = [ 0.253235] other info that might help us debug this: [ 0.253235] = [ 0.261868] = [ 0.261868] rcu_scheduler_active =3D 1, debug_locks =3D 1 [ 0.268910] no locks held by kthreadd/2. [ 0.273132] = [ 0.273132] stack backtrace: [ 0.277822] CPU: 0 PID: 2 Comm: kthreadd Not tainted 5.17.0-rc6-next-202= 20304-dirty #3 [ 0.286375] Hardware name: Allwinner A83t board [ 0.291265] unwind_backtrace from show_stack+0x10/0x14 [ 0.296907] show_stack from 0xf0801efc [ 0.301220] /cpus/cpu@0 missing clock-frequency property [ 0.307034] /cpus/cpu@1 missing clock-frequency property [ 0.312879] /cpus/cpu@2 missing clock-frequency property [ 0.318683] /cpus/cpu@3 missing clock-frequency property [ 0.324531] /cpus/cpu@100 missing clock-frequency property [ 0.330533] /cpus/cpu@101 missing clock-frequency property [ 0.336584] /cpus/cpu@102 missing clock-frequency property [ 0.342600] /cpus/cpu@103 missing clock-frequency property [ 0.348581] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.357918] Setting up static identity map for 0x40100000 - 0x40100060 [ 0.365942] ARM CCI driver probed [ 0.370397] sunxi multi cluster SMP support installed [ 0.377164] rcu: Hierarchical SRCU implementation. [ 0.383475] = [ 0.385118] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D [ 0.389446] WARNING: suspicious RCU usage [ 0.393774] 5.17.0-rc6-next-20220304-dirty #3 Not tainted [ 0.399613] ----------------------------- [ 0.403948] include/linux/cgroup.h:481 suspicious rcu_dereference_check(= ) usage! [ 0.411935] = [ 0.411935] other info that might help us debug this: [ 0.411935] = [ 0.420562] = [ 0.420562] rcu_scheduler_active =3D 1, debug_locks =3D 1 [ 0.427606] 1 lock held by migration/0/12: [ 0.432030] #0: eef68b50 (&rq->__lock){-...}-{2:2}, at: __schedule+0xf4= /0xaa4 [ 0.439915] = [ 0.439915] stack backtrace: [ 0.444617] CPU: 0 PID: 12 Comm: migration/0 Not tainted 5.17.0-rc6-next= -20220304-dirty #3 [ 0.453546] Hardware name: Allwinner A83t board [ 0.458438] Stopper: 0x0 <- 0x0 [ 0.461838] unwind_backtrace from show_stack+0x10/0x14 [ 0.467488] show_stack from 0xf087debc [ 0.473261] smp: Bringing up secondary CPUs ... [ 0.481416] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.485248] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002 [ 0.488578] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003 [ 0.492182] CPU4: thread -1, cpu 0, socket 1, mpidr 80000100 [ 0.495727] CPU5: thread -1, cpu 1, socket 1, mpidr 80000101 [ 0.499134] CPU6: thread -1, cpu 2, socket 1, mpidr 80000102 [ 0.502435] CPU7: thread -1, cpu 3, socket 1, mpidr 80000103 [ 0.502967] smp: Brought up 1 node, 8 CPUs [ 0.550416] SMP: Total of 8 processors activated (384.00 BogoMIPS). [ 0.557181] CPU: All CPU(s) started in SVC mode. [ 0.565790] devtmpfs: initialized [ 0.606240] VFP support v0.3: implementor 41 architecture 2 part 30 vari= ant 7 rev 5 [ 0.643705] DMA-API: preallocated 65536 debug entries [ 0.649376] DMA-API: debugging enabled by kernel config [ 0.655034] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xfffffff= f, max_idle_ns: 19112604462750000 ns [ 0.665830] futex hash table entries: 2048 (order: 5, 131072 bytes, line= ar) [ 0.675593] pinctrl core: initialized pinctrl subsystem [ 0.686800] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.699502] DMA: preallocated 256 KiB pool for atomic coherent allocatio= ns [ 0.712694] thermal_sys: Registered thermal governor 'step_wise' [ 0.715954] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchp= oint registers. [ 0.731191] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 0.766642] platform 1c0c000.lcd-controller: Fixing up cyclic dependency= with 1200000.mixer [ 0.776145] platform 1c0c000.lcd-controller: Fixing up cyclic dependency= with 1100000.mixer [ 0.787258] platform 1c0d000.lcd-controller: Fixing up cyclic dependency= with 1200000.mixer [ 0.796657] platform 1c0d000.lcd-controller: Fixing up cyclic dependency= with 1100000.mixer [ 0.831104] platform 1ee0000.hdmi: Fixing up cyclic dependency with 1c0d= 000.lcd-controller [ 0.851849] platform connector: Fixing up cyclic dependency with 1ee0000= .hdmi [ 0.903687] SCSI subsystem initialized [ 0.909645] pps_core: LinuxPPS API ver. 1 registered [ 0.915166] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo = Giometti [ 0.925126] PTP clock support registered [ 0.934551] = [ 0.936221] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D [ 0.940560] WARNING: suspicious RCU usage [ 0.944898] 5.17.0-rc6-next-20220304-dirty #3 Not tainted [ 0.950826] ----------------------------- [ 0.955232] include/linux/cgroup.h:481 suspicious rcu_dereference_check(= ) usage! [ 0.963184] = [ 0.963184] other info that might help us debug this: [ 0.963184] = [ 0.971976] = [ 0.971976] rcu_scheduler_active =3D 2, debug_locks =3D 1 [ 0.979142] 1 lock held by watchdogd/58: [ 0.983377] #0: eefd8b50 (&rq->__lock){-.-.}-{2:2}, at: __schedule+0xf4= /0xaa4 [ 0.991367] = [ 0.991367] stack backtrace: [ 0.996051] CPU: 7 PID: 58 Comm: watchdogd Not tainted 5.17.0-rc6-next-2= 0220304-dirty #3 [ 1.004928] Hardware name: Allwinner A83t board [ 1.009789] unwind_backtrace from show_stack+0x10/0x14 [ 1.015443] show_stack from 0xf0991e6c On next-20220303 I got nothing. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel