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: <33aab745-19fa-47f1-9d0b-863e88b6548c@web.de>
Date: Wed, 24 Apr 2024 11:35:46 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Kunwu Chan <chentao@...inos.cn>, bpf@...r.kernel.org,
 linux-kselftest@...r.kernel.org, kernel-janitors@...r.kernel.org,
 Alexei Starovoitov <ast@...nel.org>, Andrii Nakryiko <andrii@...nel.org>,
 Daniel Borkmann <daniel@...earbox.net>, Eduard Zingerman
 <eddyz87@...il.com>, Hao Luo <haoluo@...gle.com>,
 Jiri Olsa <jolsa@...nel.org>, John Fastabend <john.fastabend@...il.com>,
 KP Singh <kpsingh@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>,
 Mykola Lysenko <mykolal@...com>, Shuah Khan <shuah@...nel.org>,
 Song Liu <song@...nel.org>, Stanislav Fomichev <sdf@...gle.com>,
 Yonghong Song <yonghong.song@...ux.dev>
Cc: LKML <linux-kernel@...r.kernel.org>, Kunwu Chan <kunwu.chan@...mail.com>
Subject: Re: [PATCH bpf-next 1/4] selftests/bpf: Add some null pointer checks

…
> This patch will add the malloc failure checking
…

* Please use a corresponding imperative wording for the change description.

* Would you like to add the tag “Fixes” accordingly?


…
> +++ b/tools/testing/selftests/bpf/test_progs.c
> @@ -582,6 +582,11 @@ int compare_stack_ips(int smap_fd, int amap_fd, int stack_trace_len)
>
>  	val_buf1 = malloc(stack_trace_len);
>  	val_buf2 = malloc(stack_trace_len);
> +	if (!val_buf1 || !val_buf2) {
> +		err = -ENOMEM;
> +		goto out;
> +	}
…

How do you think about to reuse “errno” in such error cases?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ