lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250321043543.174426-1-yangfeng59949@163.com>
Date: Fri, 21 Mar 2025 12:35:43 +0800
From: Feng Yang <yangfeng59949@....com>
To: song@...nel.org
Cc: andrii@...nel.org,
	ast@...nel.org,
	bpf@...r.kernel.org,
	daniel@...earbox.net,
	eddyz87@...il.com,
	haoluo@...gle.com,
	john.fastabend@...il.com,
	jolsa@...nel.org,
	kpsingh@...nel.org,
	linux-kernel@...r.kernel.org,
	linux-trace-kernel@...r.kernel.org,
	martin.lau@...ux.dev,
	mathieu.desnoyers@...icios.com,
	mattbobrowski@...gle.com,
	mhiramat@...nel.org,
	rostedt@...dmis.org,
	sdf@...ichev.me,
	yangfeng59949@....com,
	yonghong.song@...ux.dev
Subject: Re: [PATCH] bpf: Remove duplicate judgments

On Thu, 20 Mar 2025 09:45:17 -0700 Song Liu <song@...nel.org> wrote:
>
> On Wed, Mar 19, 2025 at 8:23 PM Feng Yang <yangfeng59949@....com> wrote:
> >
> > From: Feng Yang <yangfeng@...inos.cn>
> >
> > Most of the judgments also exist in bpf_base_func_deto, remove them.
>
> "Most" of them also exist is not enough. Please make sure that this does
> not introduce any behavior change. For example, we should not remove
> return of bpf_perf_event_read_value_proto.

in trace/bpf_trace.c:
const struct bpf_func_proto *bpf_get_perf_event_read_value_proto(void)
{
	return &bpf_perf_event_read_value_proto;
}
in bpf/core.c:
const struct bpf_func_proto * __weak bpf_get_perf_event_read_value_proto(void)
{
	return NULL;
}

And weak symbols will be covered
nm vmlinux | grep bpf_get_perf_event_read_value_proto
ffffffff814b90e0 T bpf_get_perf_event_read_value_proto
ffffffff814b90d0 T __pfx_bpf_get_perf_event_read_value_proto

So the return of bpf_perf_event_read_value_proto can be done through the bpf_base_func_proto function.
bpf_base_func_proto
	......
	case BPF_FUNC_perf_event_read_value:
		return bpf_get_perf_event_read_value_proto();

I think this can be removed.

> For future patches, please read Documentation/bpf/bpf_devel_QA.rst
> and follow rules for email subject, etc. For example, this patch should
> have a subject like "[PATCH bpf-next] xxx".

Thank you very much for your suggestion. I will pay attention to it next time.

> Thanks,
> Song



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ