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: <alpine.LFD.2.11.1406242251230.23403@eddie.linux-mips.org>
Date:	Tue, 24 Jun 2014 23:03:32 +0100 (BST)
From:	"Maciej W. Rozycki" <macro@...ux-mips.org>
To:	T Makphaibulchoke <tmac@...com>
cc:	Theodore Ts'o <tytso@....edu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-ext4@...r.kernel.org
Subject: Re: [GIT PULL] ext4 changes for 3.15

On Thu, 3 Apr 2014, Theodore Ts'o wrote:

>       fs/mbcache.c: doucple the locking of local from global data

 This change causes breakage:

fs/built-in.o: In function `__mb_cache_entry_release':
mbcache.c:(.text+0x56b3c): undefined reference to `log2'
mbcache.c:(.text+0x56b3c): relocation truncated to fit: R_MIPS_26 against `log2'
mbcache.c:(.text+0x56b74): undefined reference to `__fixunsdfsi'
mbcache.c:(.text+0x56b74): relocation truncated to fit: R_MIPS_26 against `__fixunsdfsi'
mbcache.c:(.text+0x56be4): undefined reference to `log2'
mbcache.c:(.text+0x56be4): relocation truncated to fit: R_MIPS_26 against `log2'
mbcache.c:(.text+0x56bf0): undefined reference to `__fixunsdfsi'
mbcache.c:(.text+0x56bf0): relocation truncated to fit: R_MIPS_26 against `__fixunsdfsi'

and so on, and so on.  It uses __builtin_log2() that is a floating-point 
function, its corresponding <math.h> prototype is:

 -- Function: double log2 (double X)

(GCC builtins are of course implicitly prototyped).  Please note that 
floating-point calculations are not allowed in the kernel and relying on 
the compiler to optimise them away is risky to say the least.

 Can you please rewrite the fragment using __builtin_log2() so as to avoid 
the floating-point calculation, using ffs() or suchlike perhaps?

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