New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 683391 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

VB2_DEBUG() always includes function name

Project Member Reported by rspangler@chromium.org, Jan 20 2017

Issue description

This makes output like this:

	VB2_DEBUG("%s hash: ", desc);
	for (i = 0; i < hash_size; i++)
		VB2_DEBUG("%02x", hash[i]);
	VB2_DEBUG("\n");

look like this:

print_hash: RW hash: print_hash: cdprint_hash: 64print_hash: a0print_hash: 5dprint_hash: 09print_hash: e4print_hash: 5aprint_hash: edprint_hash: 2dprin
t_hash: 29print_hash: 33print_hash: 0eprint_hash: 69print_hash: 40print_hash: e8print_hash: 52print_hash: 56print_hash: 54print_hash: a9print_hash: c2p
rint_hash: 5bprint_hash: bfprint_hash: 86print_hash: 35print_hash: cdprint_hash: 68print_hash: 58print_hash: f2print_hash: 1cprint_hash: 5fprint_hash:
04print_hash: 33print_hash:

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 21 2017

Labels: merge-merged-chromeos-2016.05
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/853ff7176e97e5e1ab664d094e1914c9c94510aa

commit 853ff7176e97e5e1ab664d094e1914c9c94510aa
Author: Randall Spangler <rspangler@chromium.org>
Date: Fri Jan 20 22:48:53 2017

vboot: vb2ex_printf() ignores null function name

Currently, it will print the function name as a prefix to the debug
output.  Make it so that a null function name won't get printed, so
that it's possible to print little bits of debug output.

BUG= chromium:683391 
BRANCH=none
TEST=build_packages --board=reef chromeos-firmware

Change-Id: I1dff38e4d8ab03118e5f8832a16d82c2d2116ec9
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/431111
Reviewed-by: Julius Werner <jwerner@chromium.org>

[modify] https://crrev.com/853ff7176e97e5e1ab664d094e1914c9c94510aa/src/vboot/vboot_logic.c

Project Member

Comment 2 by bugdroid1@chromium.org, Jan 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/depthcharge/+/168d7e3fe820165e1bb36bcb53ddd14bae4709f7

commit 168d7e3fe820165e1bb36bcb53ddd14bae4709f7
Author: Randall Spangler <rspangler@chromium.org>
Date: Fri Jan 20 22:43:21 2017

vboot: vb2ex_printf() ignores null function name

Currently, it will print the function name as a prefix to the debug
output.  Make it so that a null function name won't get printed, so
that it's possible to print little bits of debug output.

BUG= chromium:683391 
BRANCH=none
TEST=build_packages --board=reef chromeos-firmware

Change-Id: Ie604dae11fd7092336d9d8fa75420334e1fb51cb
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/430978
Reviewed-by: Julius Werner <jwerner@chromium.org>

[modify] https://crrev.com/168d7e3fe820165e1bb36bcb53ddd14bae4709f7/src/vboot/callbacks/debug.c

Project Member

Comment 3 by bugdroid1@chromium.org, Jan 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/a609478d1a1e9bc11a2122797ed4eb336d5dbdee

commit a609478d1a1e9bc11a2122797ed4eb336d5dbdee
Author: Randall Spangler <rspangler@chromium.org>
Date: Fri Jan 20 22:54:47 2017

2lib: add VB2_DEBUG_RAW() to print without function name

Currently, VB2_DEBUG() will print the function name as a prefix to the
debug output.  Add VB2_DEBUG_RAW() to print without that, so that it's
possible to print little bits of debug output.  Use this in ec_sync to
hex dump the hashes.

And then clean up all of the debug calls which explicitly did things like:
    VB2_DEBUG("%s: foo", __func__);
to just:
    VB2_DEBUG("foo");
so they don't double-print the function name

BUG= chromium:683391 
BRANCH=none
TEST=build_packages --board=reef chromeos-firmware &&
     DEBUG=1 make -j runtests
CQ-DEPEND=CL:430978,CL:431111

Change-Id: I0c35519d2e670d55d65d01eaa60d61f3e3edf419
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/431171
Reviewed-by: Julius Werner <jwerner@chromium.org>

[modify] https://crrev.com/a609478d1a1e9bc11a2122797ed4eb336d5dbdee/firmware/2lib/include/2api.h
[modify] https://crrev.com/a609478d1a1e9bc11a2122797ed4eb336d5dbdee/firmware/lib/vboot_ui.c
[modify] https://crrev.com/a609478d1a1e9bc11a2122797ed4eb336d5dbdee/firmware/lib/rollback_index.c
[modify] https://crrev.com/a609478d1a1e9bc11a2122797ed4eb336d5dbdee/firmware/lib/tpm2_lite/tlcl.c
[modify] https://crrev.com/a609478d1a1e9bc11a2122797ed4eb336d5dbdee/host/lib/host_key.c
[modify] https://crrev.com/a609478d1a1e9bc11a2122797ed4eb336d5dbdee/firmware/lib/ec_sync_all.c
[modify] https://crrev.com/a609478d1a1e9bc11a2122797ed4eb336d5dbdee/firmware/2lib/include/2common.h
[modify] https://crrev.com/a609478d1a1e9bc11a2122797ed4eb336d5dbdee/firmware/lib/ec_sync.c
[modify] https://crrev.com/a609478d1a1e9bc11a2122797ed4eb336d5dbdee/firmware/lib/vboot_api_kernel.c
[modify] https://crrev.com/a609478d1a1e9bc11a2122797ed4eb336d5dbdee/firmware/lib/tpm2_lite/marshaling.c
[modify] https://crrev.com/a609478d1a1e9bc11a2122797ed4eb336d5dbdee/firmware/2lib/2stub.c
[modify] https://crrev.com/a609478d1a1e9bc11a2122797ed4eb336d5dbdee/host/lib/host_signature2.c

Status: Fixed (was: Started)

Comment 5 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 6 by dchan@google.com, May 30 2017

Labels: VerifyIn-60

Comment 7 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 8 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment