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: <20190209232928.GA7135@sigill.intra.peff.net>
Date:   Sat, 9 Feb 2019 18:29:28 -0500
From:   Jeff King <peff@...f.net>
To:     Johannes Sixt <j6t@...g.org>
Cc:     "Randall S. Becker" <rsbecker@...bridge.com>,
        "'brian m. carlson'" <sandals@...stytoothpaste.net>,
        'Junio C Hamano' <gitster@...ox.com>, git@...r.kernel.org,
        'Linux Kernel' <linux-kernel@...r.kernel.org>,
        git-packagers@...glegroups.com
Subject: Re: [Breakage] Git v2.21.0-rc0 - t5318 (NonStop)

On Sat, Feb 09, 2019 at 09:39:43AM +0100, Johannes Sixt wrote:

> > Great. Since it sounds like you're preparing some patches to deal with
> > /dev/zero elsewhere, do you want to wrap it up in a patch as part of
> > that?
> 
> Please do not use yes to generate an infinite amount of bytes. Our
> implementation of yes() in test-lib.sh generates only 99 lines.

Ah, thanks. That doesn't matter here, but it would for the other patches
under discussion.

> Perhaps do this.
> [...]
>  	dd of="$objdir/info/commit-graph" bs=1 seek="$zero_pos" count=0 &&
> -	dd if=/dev/zero of="$objdir/info/commit-graph" bs=1 seek="$zero_pos" count=$(($orig_size - $zero_pos)) &&
> +	printf "%0*d" $(($orig_size - $zero_pos)) 0 | tr 0 '\0' |
> +		dd of="$objdir/info/commit-graph" bs=1 seek="$zero_pos" &&

Using stdin instead of the tmpfile is nice, and shouldn't have any
problems. I do think your printf suggestion looks nice, but I wondered
if it might run into portability issues (not because of anything in
particular, but I often find that the more clever a shell solution, the
more likely we run into obscure problems).

But if it works everywhere, that's fine by me.

-Peff

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ