From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5320C32A3C2 for ; Thu, 30 Oct 2025 21:48:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761860890; cv=none; b=k8CK6NzQEwVNPQXDtWDtt9cny4HFuFyk3HKXmUiiSxngO1f4gOlePBJN+IA+8gZ5EhNwmP9z5gNT+GlRJowdDwzmj4bZ+DKWHYkhtomlT2yo+tCz+zUiVgx6ic2HXWsz1rt0LCqUEhW+gwwX9I8SQL4Z/kDmR5hrfb1RCvQsa5U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761860890; c=relaxed/simple; bh=qtDHxxoTJEWK6sajeFnub9aVCYf5UX0w2uwpoVn66QU=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NfrIRpcVvH1+GBYA9L130JNjr0+kaZrP7bhqh/R3nd22b+wJjOEBT6zXXb1EtreDoe1sWRrtPIVwm/ptczuuPCJRoCH4XNyAsLyUtIXAVQqa62htIchEeMGrWJQAEa0dX+RjztNtGyonNlbeth8xAzhjh05ocffyQaMQSfQaphQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YqnWu/SL; arc=none smtp.client-ip=209.85.221.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YqnWu/SL" Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-4270a3464bcso1196418f8f.2 for ; Thu, 30 Oct 2025 14:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761860886; x=1762465686; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=9zdtajZahxIouVQ7BZgQHFNhqJxmMsIC/KMsmOx1Lqs=; b=YqnWu/SLwqT7BZyLLepbq4v5fXnyzyPp0wQJEW9NfH2x7BYS6qc5o7/nX3FXl+uV8y efnb0LA0aQr3e4Z2KAYmWjsXK2xTHA8OJm1dlsHvCchUfZ1VJgwaT3LxucbT1oJw1Erj w2JjNr3hY/70zIVTR9uRYr66D2/ovNjzIYvBQKL62T6oykC84dkSkAa5YeReBsy9i22W CqJZIq29s+t+L6Gh2A4CeZ52gBkh8Pa1EIKMKEzk5HlaOB9shFOtHeMw6UVvTMO/DHH5 0rm4jLY/DHf9k3ZymG+IGV7Sljvgmy4GxGTHEYiZzt0QtkB0T9fEmq8PJJet/6d/E39J kPLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761860886; x=1762465686; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9zdtajZahxIouVQ7BZgQHFNhqJxmMsIC/KMsmOx1Lqs=; b=DImAXzf8fFIHWhaIbk0NtaW1AOeHbutxPHD9D3Sxe5DWkqWqh2y2yvDkTjhKy0ohGi rSMK/TVLB4qSazGyUhRw+O+SA3pq+siCAmXBUZRhtX6riIYwKjlXdLyGmllrpXd9A4eN mh6KbELQE2IIzQPsGkmoTJMA2lM/UqL0ithLg64JkgroYea+H4Q+U/EY5EO0HYDacXm0 cUZZ9VCYldYHqXs5a2gIUjHxTC2G4MdmIsUWWSbeElBu0eZQN+qX8E6Zf4vFyLqrL5AA 8fUqngigLiOSnQffCs82IHsIkczuHDam4CWV7lu8rsLLk5u2gzqGyyCb8k/OE/T131cP VgZA== X-Forwarded-Encrypted: i=1; AJvYcCVePGH3OFoFUW8SSQP15EqP59mp9jvaAp2gN4xHwgNUruFdjApUgmMFnMIy8zxuDAgHHIRIZOk/NEvqkga2Ku5r3iQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzfTcK79ERcj+/AnCMD+zbBnbiB9ihSsye8pLNJXKkkC7itBQZr IdZJnY4Mm1UvbKVgRi2U9FxV/DPck/4J9kCbzWEW3998QXyy58V7pxoJxrfDow== X-Gm-Gg: ASbGncuHmeisqT9zXUJVTwy9mvyRrY4twHsGLsa3xZnT7Q0WzOtMQZscSYZ18mEm61Q dDPShwAvJ67tLIBinAdi0lpNQFmNfQo+Njm1SERmsNq/WB2jrtMXh2cP5FqmYH3/BtO5F99uUtm ZzYJO4giSACsONAAYVE2aSt1EbmxflfBYZgEIBq4P4Oy6YfOfrn4vP0BEUtW5pTOyYHwMmNQ4f2 AP1kzcG6oMERgnnr1VuJ1094W9nZyog+Vl52RRSUvwZEzsZix1nO5VWfNXeZUE4FtamOj/kP8sg bleuLfu7ooDqbW3My/7zcM5yXf4arJZNEwGisQwSilPM4iKyPD042LBh6TE6zShs/zwmctVecup TE1YlkwfZTprOh40hr8OR5ltDK6hB5h/yhXhrGfVsLJnS5dGkdGqt8A/sPFIIQZmc X-Google-Smtp-Source: AGHT+IHpgIVwSKRX64ItacGOvKG5O7LOYeM0likkg9tQz3SPg+zELqpevWEhOftGbLR0IwXfs1b9eA== X-Received: by 2002:a05:6000:40df:b0:428:52d1:73ab with SMTP id ffacd0b85a97d-429bd6c1716mr960254f8f.58.1761860886262; Thu, 30 Oct 2025 14:48:06 -0700 (PDT) Received: from krava ([176.74.159.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429952de971sm33498892f8f.39.2025.10.30.14.48.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Oct 2025 14:48:05 -0700 (PDT) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Thu, 30 Oct 2025 22:48:03 +0100 To: Jiri Olsa , Josh Poimboeuf Cc: bot+bpf-ci@kernel.org, mhiramat@kernel.org, rostedt@goodmis.org, song@kernel.org, peterz@infradead.org, bpf@vger.kernel.org, linux-trace-kernel@vger.kernel.org, x86@kernel.org, yhs@fb.com, songliubraving@fb.com, andrii@kernel.org, ast@kernel.org, daniel@iogearbox.net, martin.lau@kernel.org, eddyz87@gmail.com, yonghong.song@linux.dev, clm@meta.com, ihor.solodrai@linux.dev Subject: Re: [PATCH 1/3] Revert "perf/x86: Always store regs->ip in perf_callchain_kernel()" Message-ID: References: <20251027131354.1984006-2-jolsa@kernel.org> <8227ad3af501bb982231ef00ac5e970a0a12c9d64e07ea3f3d37100ec7e3f1cc@mail.kernel.org> Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Oct 29, 2025 at 08:17:05AM +0100, Jiri Olsa wrote: > On Tue, Oct 28, 2025 at 08:39:33PM -0700, Josh Poimboeuf wrote: > > On Mon, Oct 27, 2025 at 11:38:50PM +0100, Jiri Olsa wrote: > > > On Mon, Oct 27, 2025 at 01:19:52PM -0700, Josh Poimboeuf wrote: > > > > On Mon, Oct 27, 2025 at 01:52:18PM +0000, bot+bpf-ci@kernel.org wrote: > > > > > Does this revert re-introduce the BPF selftest failure that was fixed in > > > > > 2019? The test tools/testing/selftests/bpf/prog_tests/stacktrace_map_raw_tp.c > > > > > still exists in the kernel tree. > > > > > > > > I have the same question. And note there may be subtle differences > > > > between the frame pointer and ORC unwinders. The testcase would need to > > > > pass for both. > > > > > > as I wrote in the other email that test does not check ips directly, > > > it just compare stacks taken from bpf_get_stackid and bpf_get_stack > > > helpers.. so it passes for both orc and frame pointer unwinder > > > > Ok. So the original fix wasn't actually a fix at all? It would be good > > to understand that and mention it in the commit log. Otherwise it's not > > clear why it's ok to revert a fix with no real explanation. > > I think it was a fix when it was pushed 6 years ago, but some > unwind change along that time made it redundant, I'll try to > find what the change was hum I can't tell what changed since v5.2 (kernel version when [1] landed) that reverted the behaviour which the [1] commit was fixing I did the test for both orc and framepointer unwind with and without the fix (revert of [1]) and except for the initial entry it does not seem to change the rest of the unwind ... though I'd expect orc unwind to have more entries please check results below any idea? thanks, jirka [1] 83f44ae0f8af perf/x86: Always store regs->ip in perf_callchain_kernel() [2] ae6a45a08689 x86/unwind/orc: Fall back to using frame pointers for generated code --- framepointer + fix: bpf_prog_2beb79c650d605dd_rawtracepoint_bpf_testmod_test_read_1+324 bpf_trace_run2+216 __bpf_trace_bpf_testmod_test_read+13 bpf_testmod_test_read+1322 sysfs_kf_bin_read+103 kernfs_fop_read_iter+243 vfs_read+549 ksys_read+115 __x64_sys_read+29 x64_sys_call+6112 do_syscall_64+133 entry_SYSCALL_64_after_hwframe+118 framepointer withtout fix: bpf_prog_2beb79c650d605dd_rawtracepoint_bpf_testmod_test_read_1+324 bpf_prog_2beb79c650d605dd_rawtracepoint_bpf_testmod_test_read_1+324 bpf_trace_run2+216 __bpf_trace_bpf_testmod_test_read+13 bpf_testmod_test_read+1322 sysfs_kf_bin_read+103 kernfs_fop_read_iter+243 vfs_read+549 ksys_read+115 __x64_sys_read+29 x64_sys_call+6112 do_syscall_64+133 entry_SYSCALL_64_after_hwframe+118 orc + fix: bpf_prog_2beb79c650d605dd_rawtracepoint_bpf_testmod_test_read_1+324 bpf_trace_run2+214 bpf_testmod_test_read+1322 kernfs_fop_read_iter+228 vfs_read+550 ksys_read+112 do_syscall_64+133 entry_SYSCALL_64_after_hwframe+118 orc without fix: bpf_prog_2beb79c650d605dd_rawtracepoint_bpf_testmod_test_read_1+324 bpf_prog_2beb79c650d605dd_rawtracepoint_bpf_testmod_test_read_1+324 bpf_trace_run2+214 bpf_testmod_test_read+1322 kernfs_fop_read_iter+228 vfs_read+550 ksys_read+112 do_syscall_64+133 entry_SYSCALL_64_after_hwframe+118