162 comments:
File src/security/vboot/vboot_logic_ex.c:
Patch Set #1, Line 49: void vb2ex_printf (const char *func, const char *fmt, ...)
space prohibited between function name and open parenthesis '('
void function return statements are not generally useful
Patch Set #1, Line 116: BUG(); /* Should never get called if init() returned an error. */
Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
Patch Set #1, Line 123: BUG(); /* Should never get called if init() returned an error. */
Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
Patch Set #1, Line 163: vboot_init_work_context(ctx);
code indent should use tabs where possible
Patch Set #1, Line 163: vboot_init_work_context(ctx);
please, no spaces at the start of a line
Patch Set #1, Line 165: /* Initialize and read nvdata from non-volatile storage. */
code indent should use tabs where possible
Patch Set #1, Line 166: vbnv_init(ctx->nvdata);
code indent should use tabs where possible
Patch Set #1, Line 166: vbnv_init(ctx->nvdata);
please, no spaces at the start of a line
Patch Set #1, Line 171: antirollback_read_space_firmware(ctx);
code indent should use tabs where possible
Patch Set #1, Line 171: antirollback_read_space_firmware(ctx);
please, no spaces at the start of a line
Patch Set #1, Line 173: /* Do early init (set up secdata and NVRAM, load GBB) */
code indent should use tabs where possible
Patch Set #1, Line 174: printk(BIOS_INFO, "Phase 1\n");
code indent should use tabs where possible
Patch Set #1, Line 174: printk(BIOS_INFO, "Phase 1\n");
please, no spaces at the start of a line
Patch Set #1, Line 175: rv = vb2api_fw_phase1(ctx);
code indent should use tabs where possible
Patch Set #1, Line 175: rv = vb2api_fw_phase1(ctx);
please, no spaces at the start of a line
Patch Set #1, Line 176: if (rv) {
code indent should use tabs where possible
Patch Set #1, Line 176: if (rv) {
please, no spaces at the start of a line
Patch Set #1, Line 177: printk(BIOS_INFO, "Reboot requested (%x)\n", rv);
code indent should use tabs where possible
Patch Set #1, Line 177: printk(BIOS_INFO, "Reboot requested (%x)\n", rv);
please, no spaces at the start of a line
Patch Set #1, Line 178: save_if_needed(ctx);
code indent should use tabs where possible
Patch Set #1, Line 178: save_if_needed(ctx);
please, no spaces at the start of a line
Patch Set #1, Line 179: vboot_reboot();
code indent should use tabs where possible
Patch Set #1, Line 179: vboot_reboot();
please, no spaces at the start of a line
code indent should use tabs where possible
please, no spaces at the start of a line
Patch Set #1, Line 182: /* Determine which firmware slot to boot (based on NVRAM) */
code indent should use tabs where possible
Patch Set #1, Line 183: printk(BIOS_INFO, "Phase 2\n");
code indent should use tabs where possible
Patch Set #1, Line 183: printk(BIOS_INFO, "Phase 2\n");
please, no spaces at the start of a line
Patch Set #1, Line 184: rv = vb2api_fw_phase2(ctx);
code indent should use tabs where possible
Patch Set #1, Line 184: rv = vb2api_fw_phase2(ctx);
please, no spaces at the start of a line
Patch Set #1, Line 185: reset_fw_slot(ctx);
code indent should use tabs where possible
Patch Set #1, Line 185: reset_fw_slot(ctx);
please, no spaces at the start of a line
Patch Set #1, Line 186: if (rv) {
code indent should use tabs where possible
Patch Set #1, Line 186: if (rv) {
please, no spaces at the start of a line
Patch Set #1, Line 187: printk(BIOS_INFO, "Reboot requested (%x)\n", rv);
code indent should use tabs where possible
Patch Set #1, Line 187: printk(BIOS_INFO, "Reboot requested (%x)\n", rv);
please, no spaces at the start of a line
Patch Set #1, Line 188: save_if_needed(ctx);
code indent should use tabs where possible
Patch Set #1, Line 188: save_if_needed(ctx);
please, no spaces at the start of a line
Patch Set #1, Line 189: vboot_reboot();
code indent should use tabs where possible
Patch Set #1, Line 189: vboot_reboot();
please, no spaces at the start of a line
code indent should use tabs where possible
please, no spaces at the start of a line
Patch Set #1, Line 203: rv = vb21api_init_hash(ctx, id, &size);
code indent should use tabs where possible
Patch Set #1, Line 203: rv = vb21api_init_hash(ctx, id, &size);
please, no spaces at the start of a line
Patch Set #1, Line 204: if (rv)
code indent should use tabs where possible
Patch Set #1, Line 204: if (rv)
please, no spaces at the start of a line
Patch Set #1, Line 208: rv = vb2api_extend_hash(ctx,(uint8_t *)map, size);
code indent should use tabs where possible
Patch Set #1, Line 208: rv = vb2api_extend_hash(ctx,(uint8_t *)map, size);
please, no spaces at the start of a line
Patch Set #1, Line 208: rv = vb2api_extend_hash(ctx,(uint8_t *)map, size);
space required after that ',' (ctx:VxV)
Patch Set #1, Line 209: if (rv)
code indent should use tabs where possible
Patch Set #1, Line 209: if (rv)
please, no spaces at the start of a line
Patch Set #1, Line 213: rv = vb21api_check_hash(ctx);
code indent should use tabs where possible
Patch Set #1, Line 213: rv = vb21api_check_hash(ctx);
please, no spaces at the start of a line
Patch Set #1, Line 214: if (rv)
code indent should use tabs where possible
Patch Set #1, Line 214: if (rv)
please, no spaces at the start of a line
Patch Set #1, Line 226: struct region_device fw_main;
code indent should use tabs where possible
Patch Set #1, Line 226: struct region_device fw_main;
please, no spaces at the start of a line
Patch Set #1, Line 227: int rv;
code indent should use tabs where possible
Patch Set #1, Line 227: int rv;
please, no spaces at the start of a line
Patch Set #1, Line 232: if (rv)
code indent should use tabs where possible
Patch Set #1, Line 232: if (rv)
please, no spaces at the start of a line
Patch Set #1, Line 233: die("Failed to read FMAP to locate firmware");
code indent should use tabs where possible
Patch Set #1, Line 233: die("Failed to read FMAP to locate firmware");
please, no spaces at the start of a line
Patch Set #1, Line 237: vboot_set_selected_region(region_device_region(&fw_main));
code indent should use tabs where possible
Patch Set #1, Line 237: vboot_set_selected_region(region_device_region(&fw_main));
please, no spaces at the start of a line
Patch Set #1, Line 244: struct region_device fw_main;
code indent should use tabs where possible
Patch Set #1, Line 244: struct region_device fw_main;
please, no spaces at the start of a line
Patch Set #1, Line 245: int rv;
code indent should use tabs where possible
Patch Set #1, Line 245: int rv;
please, no spaces at the start of a line
Patch Set #1, Line 246: const struct region_device *fh = NULL;
code indent should use tabs where possible
Patch Set #1, Line 246: const struct region_device *fh = NULL;
please, no spaces at the start of a line
Patch Set #1, Line 247: size_t fsize = 0;
code indent should use tabs where possible
Patch Set #1, Line 247: size_t fsize = 0;
please, no spaces at the start of a line
Patch Set #1, Line 248: void *map = NULL;
code indent should use tabs where possible
Patch Set #1, Line 248: void *map = NULL;
please, no spaces at the start of a line
Patch Set #1, Line 249: struct cbfsf file;
code indent should use tabs where possible
Patch Set #1, Line 249: struct cbfsf file;
please, no spaces at the start of a line
Patch Set #1, Line 250: const struct vb2_id* id;
"foo* bar" should be "foo *bar"
Patch Set #1, Line 261: if (cbfs_boot_locate(&file, prog_name(&stage), NULL))
code indent should use tabs where possible
Patch Set #1, Line 261: if (cbfs_boot_locate(&file, prog_name(&stage), NULL))
please, no space before tabs
Patch Set #1, Line 261: if (cbfs_boot_locate(&file, prog_name(&stage), NULL))
please, no spaces at the start of a line
Patch Set #1, Line 262: die("failed to load stage");
code indent should use tabs where possible
Patch Set #1, Line 262: die("failed to load stage");
please, no space before tabs
Patch Set #1, Line 262: die("failed to load stage");
please, no spaces at the start of a line
Patch Set #1, Line 264: cbfs_file_data(prog_rdev(&stage), &file);
code indent should use tabs where possible
Patch Set #1, Line 264: cbfs_file_data(prog_rdev(&stage), &file);
please, no space before tabs
Patch Set #1, Line 264: cbfs_file_data(prog_rdev(&stage), &file);
please, no spaces at the start of a line
Patch Set #1, Line 265: fh = &stage.rdev;
code indent should use tabs where possible
Patch Set #1, Line 265: fh = &stage.rdev;
please, no space before tabs
Patch Set #1, Line 265: fh = &stage.rdev;
please, no spaces at the start of a line
Patch Set #1, Line 267: fsize = region_device_sz(fh);
code indent should use tabs where possible
Patch Set #1, Line 267: fsize = region_device_sz(fh);
please, no space before tabs
Patch Set #1, Line 267: fsize = region_device_sz(fh);
please, no spaces at the start of a line
Patch Set #1, Line 268: map = rdev_mmap(fh, 0, fsize);
code indent should use tabs where possible
Patch Set #1, Line 268: map = rdev_mmap(fh, 0, fsize);
please, no space before tabs
Patch Set #1, Line 268: map = rdev_mmap(fh, 0, fsize);
please, no spaces at the start of a line
Patch Set #1, Line 269: if (!map) printk(BIOS_INFO, "ERROR: Mapping failed\n");
code indent should use tabs where possible
Patch Set #1, Line 269: if (!map) printk(BIOS_INFO, "ERROR: Mapping failed\n");
please, no space before tabs
Patch Set #1, Line 269: if (!map) printk(BIOS_INFO, "ERROR: Mapping failed\n");
please, no spaces at the start of a line
Patch Set #1, Line 269: if (!map) printk(BIOS_INFO, "ERROR: Mapping failed\n");
trailing statements should be on next line
Patch Set #1, Line 272: id = vb2_hash_id(VB2_HASH_SHA512);
code indent should use tabs where possible
Patch Set #1, Line 272: id = vb2_hash_id(VB2_HASH_SHA512);
please, no spaces at the start of a line
Patch Set #1, Line 277: if (cbfs_boot_locate(&file, prog_name(&stage), NULL))
code indent should use tabs where possible
Patch Set #1, Line 277: if (cbfs_boot_locate(&file, prog_name(&stage), NULL))
please, no space before tabs
Patch Set #1, Line 277: if (cbfs_boot_locate(&file, prog_name(&stage), NULL))
please, no spaces at the start of a line
Patch Set #1, Line 278: die("failed to load stage");
code indent should use tabs where possible
Patch Set #1, Line 278: die("failed to load stage");
please, no space before tabs
Patch Set #1, Line 278: die("failed to load stage");
please, no spaces at the start of a line
Patch Set #1, Line 280: cbfs_file_data(prog_rdev(&stage), &file);
code indent should use tabs where possible
Patch Set #1, Line 280: cbfs_file_data(prog_rdev(&stage), &file);
please, no space before tabs
Patch Set #1, Line 280: cbfs_file_data(prog_rdev(&stage), &file);
please, no spaces at the start of a line
Patch Set #1, Line 281: fh = &stage.rdev;
code indent should use tabs where possible
Patch Set #1, Line 281: fh = &stage.rdev;
please, no space before tabs
Patch Set #1, Line 281: fh = &stage.rdev;
please, no spaces at the start of a line
Patch Set #1, Line 283: fsize = region_device_sz(fh);
code indent should use tabs where possible
Patch Set #1, Line 283: fsize = region_device_sz(fh);
please, no space before tabs
Patch Set #1, Line 283: fsize = region_device_sz(fh);
please, no spaces at the start of a line
Patch Set #1, Line 284: map = rdev_mmap(fh, 0, fsize);
code indent should use tabs where possible
Patch Set #1, Line 284: map = rdev_mmap(fh, 0, fsize);
please, no space before tabs
Patch Set #1, Line 284: map = rdev_mmap(fh, 0, fsize);
please, no spaces at the start of a line
Patch Set #1, Line 285: if (!map) printk(BIOS_INFO, "ERROR: Mapping failed\n");
code indent should use tabs where possible
Patch Set #1, Line 285: if (!map) printk(BIOS_INFO, "ERROR: Mapping failed\n");
please, no space before tabs
Patch Set #1, Line 285: if (!map) printk(BIOS_INFO, "ERROR: Mapping failed\n");
please, no spaces at the start of a line
Patch Set #1, Line 285: if (!map) printk(BIOS_INFO, "ERROR: Mapping failed\n");
trailing statements should be on next line
Patch Set #1, Line 291: init_ctx(&ctx);
code indent should use tabs where possible
Patch Set #1, Line 291: init_ctx(&ctx);
please, no spaces at the start of a line
Patch Set #1, Line 293: rv = locate_firmware(&ctx, &fw_main);
code indent should use tabs where possible
Patch Set #1, Line 293: rv = locate_firmware(&ctx, &fw_main);
please, no spaces at the start of a line
Patch Set #1, Line 294: if (rv)
code indent should use tabs where possible
Patch Set #1, Line 294: if (rv)
please, no spaces at the start of a line
Patch Set #1, Line 295: die("Failed to read FMAP to locate firmware");
code indent should use tabs where possible
Patch Set #1, Line 295: die("Failed to read FMAP to locate firmware");
please, no spaces at the start of a line
Patch Set #1, Line 297: /* Try the slot (verify its keyblock and preamble) */
code indent should use tabs where possible
Patch Set #1, Line 298: printk(BIOS_INFO, "Phase 3\n");
code indent should use tabs where possible
Patch Set #1, Line 298: printk(BIOS_INFO, "Phase 3\n");
please, no spaces at the start of a line
Patch Set #1, Line 299: rv = vb21api_fw_phase3(&ctx);
code indent should use tabs where possible
Patch Set #1, Line 299: rv = vb21api_fw_phase3(&ctx);
please, no spaces at the start of a line
Patch Set #1, Line 300: if (rv) {
code indent should use tabs where possible
Patch Set #1, Line 300: if (rv) {
please, no spaces at the start of a line
Patch Set #1, Line 301: printk(BIOS_INFO, "Reboot requested (%x)\n", rv);
code indent should use tabs where possible
Patch Set #1, Line 301: printk(BIOS_INFO, "Reboot requested (%x)\n", rv);
please, no spaces at the start of a line
Patch Set #1, Line 302: save_if_needed(&ctx);
code indent should use tabs where possible
Patch Set #1, Line 302: save_if_needed(&ctx);
please, no spaces at the start of a line
Patch Set #1, Line 303: vboot_reboot();
code indent should use tabs where possible
Patch Set #1, Line 303: vboot_reboot();
please, no spaces at the start of a line
code indent should use tabs where possible
please, no spaces at the start of a line
Patch Set #1, Line 307: rv = verify_hash(&ctx, map, id);
code indent should use tabs where possible
Patch Set #1, Line 307: rv = verify_hash(&ctx, map, id);
please, no spaces at the start of a line
Patch Set #1, Line 308: if (rv) {
code indent should use tabs where possible
Patch Set #1, Line 308: if (rv) {
please, no spaces at the start of a line
Patch Set #1, Line 309: printk(BIOS_ERR, "ERROR:0x%x ", rv);
code indent should use tabs where possible
Patch Set #1, Line 309: printk(BIOS_ERR, "ERROR:0x%x ", rv);
please, no spaces at the start of a line
Patch Set #1, Line 310: die("Stage Verification Failed");
code indent should use tabs where possible
Patch Set #1, Line 310: die("Stage Verification Failed");
please, no spaces at the start of a line
code indent should use tabs where possible
please, no spaces at the start of a line
Patch Set #1, Line 313: rdev_munmap(fh, map);
code indent should use tabs where possible
Patch Set #1, Line 313: rdev_munmap(fh, map);
please, no spaces at the start of a line
Patch Set #1, Line 315: printk(BIOS_INFO, "stage verified successfully, proceed...\n");
code indent should use tabs where possible
Patch Set #1, Line 315: printk(BIOS_INFO, "stage verified successfully, proceed...\n");
please, no spaces at the start of a line
To view, visit change 32148. To unsubscribe, or for help writing mail filters, visit settings.