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  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]
Date:	Sat, 29 Dec 2012 00:07:43 -0800
From:	Jonathan Nieder <>
To:	Ben Hutchings <>
	Kees Cook <>,
	Fengguang Wu <>,
	David Howells <>,
	Linus Torvalds <>
Subject: Re: [ 016/173] use clamp_t in UNAME26 fix

Ben Hutchings wrote:

> The min/max call needed to have explicit types on some architectures
> (e.g. mn10300). Use clamp_t instead to avoid the warning:
>   kernel/sys.c: In function 'override_release':
>   kernel/sys.c:1287:10: warning: comparison of distinct pointer types lacks a cast [enabled by default]
> Reported-by: Fengguang Wu <>
> -		copy = min(sizeof(buf), max_t(size_t, 1, len));

I don't understand how this happens given that v2.6.36-rc1~68
(MN10300: Fix size_t and ssize_t, 2010-08-12) was supposed to fix this
kind of thing.  Doesn't sizeof(buf) have type size_t already (C99
§ "the sizeof operator" ¶4)?

What version of gcc produces this warning?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists