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] [day] [month] [year] [list]
Message-ID: <3c5e38e3-79fe-4989-89ca-f128b0d713cd@web.de>
Date: Sat, 6 Jul 2024 18:11:10 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Aleksandr Mishin <amishin@...rgos.ru>, linux-remoteproc@...r.kernel.org,
 lvc-project@...uxtesting.org, Siddharth Gupta <sidgup@...eaurora.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
 Bjorn Andersson <andersson@...nel.org>,
 Mathieu Poirier <mathieu.poirier@...aro.org>,
 Rishabh Bhatnagar <rishabhb@...eaurora.org>
Subject: Re: [PATCH] remoteproc: Remove unneeded check in elf_strtbl_add()

…
> useless.

         because …?


> Fix this issue by removing unneeded check.

Another wording suggestion:
  Thus remove a redundant check.


…
> +++ b/drivers/remoteproc/remoteproc_elf_helpers.h
> @@ -107,7 +107,7 @@ static inline unsigned int elf_strtbl_add(const char *name, void *ehdr, u8 class
>  	shdr = ehdr + elf_size_of_hdr(class) + shstrndx * elf_size_of_shdr(class);
>  	strtab = ehdr + elf_shdr_get_sh_offset(class, shdr);
>  	idx = index ? *index : 0;
> -	if (!strtab || !name)
> +	if (!name)
>  		return 0;
…

How do you think about to perform the remaining null pointer check
as the first statement (because of input parameter validation in
this function implementation)?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ