From: Ingo Molnar <mingo@kernel.org>
To: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, Jiri Slaby <jslaby@suse.cz>,
David Woodhouse <David.Woodhouse@intel.com>
Subject: Re: [PATCH] x86, build: move build output statistics away from stderr
Date: Mon, 9 Sep 2013 10:49:33 +0200 [thread overview]
Message-ID: <20130909084933.GA20140@gmail.com> (raw)
In-Reply-To: <20130906181532.GA31260@www.outflux.net>
* Kees Cook <keescook@chromium.org> wrote:
> When building on x86, the final image building step always emits stats
> to stderr, even though this information is neither a warning nor an error:
>
> BUILD arch/x86/boot/bzImage
> Setup is 16188 bytes (padded to 16384 bytes).
> System is 6368 kB
> CRC cbe50c61
>
> Validating automated builds would be cleaner if stderr did not have to
> filter out these lines. Instead, change how tools/build is called, and
> make the zoffset header unconditional, and write to a specified file
> instead of to stdout, which can then be used for statistics, leaving
> stderr open for legitimate warnings and errors, like the output from
> die().
Nice, that output to stderr was always somewhat annoying.
> + /* Catch any delayed write failures */
> + if (fclose(dest))
> + die("Writing image failed");
> +
> close(fd);
Looks like the new code is not just reporting errors better, but it's more
robust by catching and reporting fclose()-time failures as well, avoiding
a corrupt kernel image in certain corner cases - the most common being a
file system full error I suspect.
Thanks,
Ingo
next prev parent reply other threads:[~2013-09-09 8:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 18:15 [PATCH] x86, build: move build output statistics away from stderr Kees Cook
2013-09-09 8:49 ` Ingo Molnar [this message]
2013-09-26 20:36 ` Kees Cook
2013-09-26 23:12 ` [tip:x86/build] " tip-bot for Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130909084933.GA20140@gmail.com \
--to=mingo@kernel.org \
--cc=David.Woodhouse@intel.com \
--cc=hpa@zytor.com \
--cc=jslaby@suse.cz \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox