Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Sep 2013 22:50:01 GMT
From:      Jilles Tjoelker <jilles@stack.nl>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/182098: [patch] Change kldxref fts_open ordering so it produces a consistent linker.hints between machines of the same architecture.
Message-ID:  <201309152250.r8FMo1VD017602@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/182098; it has been noted by GNATS.

From: Jilles Tjoelker <jilles@stack.nl>
To: bug-followup@FreeBSD.org, dereks@lifeofadishwasher.com
Cc:  
Subject: Re: bin/182098: [patch] Change kldxref fts_open ordering so it
 produces a consistent linker.hints between machines of the same
 architecture.
Date: Mon, 16 Sep 2013 00:39:58 +0200

 In PR bin/182098, you wrote:
 > Currently there an issue with linker.hints being different between
 > machines that create binary update for freebsd-update.
 
 > 'kldxref /boot/kernel/' will produce different linker.hints due to the
 > way the fts_open() traverses the file system:
 
 In the interest of reproducible builds, your patch seems a good idea. It
 seems unattractive to run kldxref /boot/kernel on every machine.
 
 The implementation of compare() seems unnecessarily complex though. In
 find -s, the fts_names are simply passed to strcoll() (here, strcmp()
 would be better). The trickery with the length may cause inconsistent
 results if one filename is a prefix of another (rare).
 
 This change may also expose a latent bug with kldxref -R: it does not
 work properly if a directory contains both files that need a mention in
 a hints file and subdirectories, and at least one such file appears
 after a subdirectory. Because your change alters the traversal order, it
 might break a use of kldxref -R that previously happened to work. You
 can make it work reliably by sorting FTS_D entries after other entries.
 
 -- 
 Jilles Tjoelker



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309152250.r8FMo1VD017602>