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] [thread-next>] [day] [month] [year] [list]
Message-Id: <200709070818.03995.ak@suse.de>
Date:	Fri, 7 Sep 2007 08:18:03 +0100
From:	Andi Kleen <ak@...e.de>
To:	Serge Belyshev <belyshev@...ni.sinp.msu.ru>
Cc:	patches@...-64.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH]: x86_64: Remove unnecessary cast in prefetch()

On Thursday 06 September 2007 22:27, Serge Belyshev wrote:
> It is ok to call prefetch() function with NULL argument, as specifically
> commented in include/linux/prefetch.h.  But in standard C, it is invalid to
> dereference NULL pointer (see C99 standard 6.5.3.2 paragraph 4 and note
> #84). Newer gcc versions (4.3 and above) will use that to conclude that "x"
> argument is non-null and thus wreaking havok everywhere prefetch() was
> inlined. Fixed by removing cast and changing asm constraint.
>
> This can be fixed better by using gcc's __builtin_prefetch().

I changed it to just use that. Thanks.

It seems like gcc 3.1/3.2 already supported it and that's the earliest gcc
still supported so it can be used unconditionally.

-Andi
-
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