Re: [PATCH v3] selftests/vDSO: Explicit unsigned char conversion for elf_hash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 5, 2024 at 6:21 AM David Laight <David.Laight@xxxxxxxxxx> wrote:
>
> From: Justin Stitt
> > Sent: 01 May 2024 20:55
> ...
> > > static unsigned long elf_hash(const unsigned char *name)
> ...
> > Is it possible to just change the types of the parameters of vdso_sym()
> > or does that trigger even more warnings on the callsites of vdso_sym()?
>
> Isn't the problem the definition of elf_hash()?
> A '\0' terminated string really ought to be 'char *' not 'unsigned char *'.

Right, although note this comment just about its definition:

/* Straight from the ELF specification. */
static unsigned long elf_hash(const unsigned char *name)
{

which indeed matches [1]

[1]: https://man.freebsd.org/cgi/man.cgi?query=elf_hash&sektion=3&apropos=0&manpath=FreeBSD+7.1-RELEASE

>
>         David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
>





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux