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]
Date:   Tue, 28 Mar 2023 21:16:00 +0200
From:   Johannes Thumshirn <jth@...nel.org>
To:     Rodríguez Barbarin, José Javier 
        <JoseJavier.Rodriguez@...gon.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc:     "jth@...nel.org" <jth@...nel.org>,
        Sanjuán García, Jorge 
        <Jorge.SanjuanGarcia@...gon.com>
Subject: Re: [PATCH v2 1/3] mcb: Return actual parsed size when reading
 chameleon table



Am 28.03.23 um 16:34 schrieb Rodríguez Barbarin, José Javier:
> Function chameleon_parse_cells() returns the number of cells parsed

^ The function?

> @@ -239,12 +240,15 @@ int chameleon_parse_cells(struct mcb_bus *bus, phys_addr_t mapbase,
>   		num_cells++;
>   	}
>   
> +

Stray newline.
>   	if (num_cells == 0)
>   		num_cells = -EINVAL;
>   
> +	table_size = p - base;
> +	pr_debug("%d cell(s) found. Chameleon table size: 0x%04x bytes\n", num_cells, table_size);
>   	kfree(cb);
>   	kfree(header);
> -	return num_cells;
> +	return table_size;

Ahm doesn't that need to be:
             return num_cells < 0 ? num_cells : table_size;


Otherwise we loose the -EINVAL return here.

I could've fixed up the 1st two, but the last one is a functional change 
and I won't fix it
up when applying.

Byte,
     Johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ