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]
Message-ID: <20140102064900.GJ6589@tarshish>
Date:	Thu, 2 Jan 2014 08:49:00 +0200
From:	Baruch Siach <baruch@...s.co.il>
To:	Theodore Ts'o <tytso@....edu>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: [PATCH] e4defrag: fix build when posix_fadvise is missing

Hi Ted,

On Wed, Jan 01, 2014 at 03:46:50PM -0500, Theodore Ts'o wrote:
> On Wed, Jan 01, 2014 at 09:08:00PM +0200, Baruch Siach wrote:
> > Yes. uClibc does provide posix_fadvise64() when __NR_fadvise64_64 is 
> > available.
> > 
> > > Maybe the better fix would be to try to use posix_fadvise64 if it is exists, 
> > > with posix_fadvise() and the locally defined posix_fadvise() as fallbacks.
> > 
> > OK. So you suggest to add another autoconf test for posix_fadvise64 and use 
> > that as a fall back before trying direct syscall()?
> 
> Yes, I think that's the more general and hence the more correct
> answer.  In fact what we have right now is arguably wrong, since on a
> 32-bit platform where off_t is 32-bits, and which defines
> posix_fadvise, we wouldn't correctly handle files that are larger than
> 2GB.  So if posix_fadvise64 exists, we should be using in preference
> to posix_fadvise(), even if both are provided by the C library.
> 
> Would you mind sending such a revised patch?

Just sent. Thanks for reviewing.

Turns out that this is actually an uClibc bug. There used to be a 
posix_fadvise definition for xtensa as a wrapper around the __NR_fadvise64_64 
system call. This broke with uClibc commit ee84b8b400 (linux: posix_fadvise: 
use new SYSCALL_ALIGN_64BIT). The patch I have sent can be used as a 
workaround for now. I'll send a separate patch for uClibc later.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@...s.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ