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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 25 Sep 2007 00:06:24 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Bernhard Walle <bwalle@...e.de>
Cc:	Laurent Riffard <laurent.riffard@...e.fr>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Fix CONFIG_NOHIGHMEM for extended crashkernel command
 line

On Tue, 25 Sep 2007 08:55:29 +0200 Bernhard Walle <bwalle@...e.de> wrote:

> @@ -381,6 +381,20 @@ extern unsigned long __init setup_memory
>  extern void zone_sizes_init(void);
>  #endif /* !CONFIG_NEED_MULTIPLE_NODES */
>  
> +

Only one line is needed between functions, please.

> +#ifdef CONFIG_HIGHMEM
> +static inline unsigned long long get_total_mem(void)
> +{
> +	return (max_low_pfn + highend_pfn - highstart_pfn) << PAGE_SHIFT;
> +}
> +#else
> +static inline unsigned long long get_total_mem(void)
> +{
> +	return max_low_pfn << PAGE_SHIFT;
> +}
> +#endif
> +
> +

Full of bugs.  (unsigned long << foo) returns an unsigned long.  With >4G
there will be truncation.

Please review the full patchset for other occurrences of this.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ