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

Issue 618340 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature

Blocked on:
issue 669520

Blocking:
issue 645464
issue 669520



Sign in to add a comment

Update set_binary_flag_vpd to represent a zero value with an actual key=0.

Project Member Reported by tnagel@chromium.org, Jun 8 2016

Issue description

Update set_binary_flag_vpd to represent a zero value with an actual key=0 VPD entry instead of absence of that key.  This would allow us to disable FRE in some situations (eg. consumer-owned devices) by explicitly setting enrollment_check=0.

Note that R50 and R51 contain the old block_devmode_vpd script that could get confused by a block_devmode=0 setting.  (The remaining code should work well with block_devmode=0.)  Thus we should wait until R54 so that downgrades to R51 or earlier are unlikely.
 
Status: Started (was: Assigned)

Comment 3 by tnagel@chromium.org, Sep 12 2016

Blocking: 645464
Status: Fixed (was: Started)

Comment 5 by dchan@chromium.org, Oct 7 2016

Labels: VerifyIn-55

Comment 6 by dchan@google.com, Nov 19 2016

Labels: VerifyIn-56
Blockedon: 669520
Project Member

Comment 8 by bugdroid1@chromium.org, Dec 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vpd/+/6647e91e514469d1493d70897f8e757057c9b8b0

commit 6647e91e514469d1493d70897f8e757057c9b8b0
Author: I U <igorcov@google.com>
Date: Thu Sep 08 09:11:32 2016

vpd: Update of set_binary_flag_vpd to store zero values.

Old script was storing value 1 for flags that were set
and removed the variables that were unset. This CL changes
the behavior to store the zero values. The variable is
never removed from VPD. This allows us to disable FRE
in some situations (eg. consumer-owned devices) by
explicitly setting enrollment_check=0.

BUG= chromium:618340 
TEST=Tested manually in console

Change-Id: I53fc5db2b4e56953285bb5d34108a2b4ad05ce0c
Reviewed-on: https://chromium-review.googlesource.com/383051
Commit-Ready: Igor <igorcov@chromium.org>
Tested-by: Igor <igorcov@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Thiemo Nagel <tnagel@chromium.org>

[modify] https://crrev.com/6647e91e514469d1493d70897f8e757057c9b8b0/util/set_binary_flag_vpd

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/60952d75dbe8ad5bf5d8dd08ed16a5a92fce93f2

commit 60952d75dbe8ad5bf5d8dd08ed16a5a92fce93f2
Author: Igor <igorcov@chromium.org>
Date: Wed Dec 21 18:16:43 2016

init: Check for block_devmode=1 included when sysfs present

When checking the value of block_devmode for devices that allow
reading of VPD through sysfs, the old version was looking only at
the presence of the flag. This CL checks also the value of
block_devmode and only if it's 1, the devmode is blocked.

BUG= chromium:618340 
TEST=Tested manually in console

Change-Id: I6c0eb33e0734b3d613959b6de9772d8cf2e40d55
Reviewed-on: https://chromium-review.googlesource.com/423048
Commit-Ready: Igor <igorcov@chromium.org>
Tested-by: Igor <igorcov@chromium.org>
Reviewed-by: Thiemo Nagel <tnagel@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/60952d75dbe8ad5bf5d8dd08ed16a5a92fce93f2/init/chromeos_startup

Project Member

Comment 10 by bugdroid1@chromium.org, Dec 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vpd/+/9c4ac848314b2ebbd9a15704f3c31a08bf599df3

commit 9c4ac848314b2ebbd9a15704f3c31a08bf599df3
Author: Igor <igorcov@chromium.org>
Date: Fri Dec 23 15:48:57 2016

vpd: Update of set_binary_flag_vpd to store zero values.

This is the reland of
https://chromium-review.googlesource.com/#/c/383051/.
The reason for revert of original CL has been fixed in
https://chromium-review.googlesource.com/#/c/423048/.

Old script was storing value 1 for flags that were set
and removed the variables that were unset. This CL changes
the behavior to store the zero values. The variable is
never removed from VPD. This allows us to disable FRE
in some situations (eg. consumer-owned devices) by
explicitly setting enrollment_check=0.

BUG= chromium:618340 
TEST=Tested manually in console
BRANCH=none

Change-Id: I296c662ceadf6ad0c3d62c7e78ff28767ac35839
Reviewed-on: https://chromium-review.googlesource.com/423069
Commit-Ready: Igor <igorcov@chromium.org>
Tested-by: Igor <igorcov@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Thiemo Nagel <tnagel@chromium.org>

[modify] https://crrev.com/9c4ac848314b2ebbd9a15704f3c31a08bf599df3/util/set_binary_flag_vpd

Comment 11 by dchan@google.com, Jan 21 2017

Labels: VerifyIn-57
Labels: M-59
Status: Assigned (was: Fixed)
This CL was rolled back, and planned to be included back in version 59 because it was causing removal of devmode when device was recovered to version 56.
Components: -Enterprise
Blocking: 669520
Project Member

Comment 15 by bugdroid1@chromium.org, Apr 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vpd/+/4f8753e070c9c0c7bc503e25aa3b4f190a1dec97

commit 4f8753e070c9c0c7bc503e25aa3b4f190a1dec97
Author: Igor <igorcov@chromium.org>
Date: Sat Apr 22 04:57:39 2017

vpd: Update of set_binary_flag_vpd to store zero values.

This is the reland of
https://chromium-review.googlesource.com/#/c/383051/.
The reason for revert of original CL has been fixed in
https://chromium-review.googlesource.com/#/c/423048/.

Old script was storing value 1 for flags that were set
and removed the variables that were unset. This CL changes
the behavior to store the zero values. The variable is
never removed from VPD. This allows us to disable FRE
in some situations (eg. consumer-owned devices) by
explicitly setting enrollment_check=0.

BUG= chromium:618340 
TEST=Tested manually in console
BRANCH=none

Change-Id: I26a9eaa2bbf9915130d1c1fbec2c0c04bea5f416
Reviewed-on: https://chromium-review.googlesource.com/472628
Commit-Ready: Igor <igorcov@chromium.org>
Tested-by: Igor <igorcov@chromium.org>
Reviewed-by: Thiemo Nagel <tnagel@chromium.org>

[modify] https://crrev.com/4f8753e070c9c0c7bc503e25aa3b4f190a1dec97/util/set_binary_flag_vpd

Labels: -M-59 -VerifyIn-55 -VerifyIn-56 -VerifyIn-57 M-60
Status: Fixed (was: Assigned)
Cc: krishna...@chromium.org
Paine
M	ChromeOS	Chrome	ARC	Type	Channel
60	9592.22.0	60.0.3112.34	(multiple)	release	beta


Enrolled device
Added vpd -i RW_VPD -s enrollment_check=0.
Force Enrollment enabled
Wiped again to recover

Actual Result:Normal mode enforced.Do not see enrollment screen, i.e looks like FRE skipped.

After this pressed ctrl+alt+e to enroll to different domain and could not enroll to that domain.But could enroll in same domain in which FRE is enforced.

@Igorcov Is this expected behavior for this fix?Please confirm.
Thank you for testing this. Yes, that is the expected behavior.
Status: Verified (was: Fixed)
Based on confirmation in comment #18 ,marking this verified.
Project Member

Comment 20 by bugdroid1@chromium.org, Aug 31 2017

Labels: merge-merged-factory-gru-9017.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/d9a5b781f60866ef6a52594c12aab59dcae7f083

commit d9a5b781f60866ef6a52594c12aab59dcae7f083
Author: Igor <igorcov@chromium.org>
Date: Thu Aug 31 01:01:36 2017

init: Check for block_devmode=1 included when sysfs present

When checking the value of block_devmode for devices that allow
reading of VPD through sysfs, the old version was looking only at
the presence of the flag. This CL checks also the value of
block_devmode and only if it's 1, the devmode is blocked.

BUG= chromium:618340 
TEST=Tested manually in console

Change-Id: I6c0eb33e0734b3d613959b6de9772d8cf2e40d55
Reviewed-on: https://chromium-review.googlesource.com/423048
Commit-Ready: Igor <igorcov@chromium.org>
Tested-by: Igor <igorcov@chromium.org>
Reviewed-by: Thiemo Nagel <tnagel@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit 60952d75dbe8ad5bf5d8dd08ed16a5a92fce93f2)
Reviewed-on: https://chromium-review.googlesource.com/640194
Reviewed-by: Philip Chen <philipchen@chromium.org>
Tested-by: 海鹏 何 <robert_he@asus.com>
Commit-Queue: 海鹏 何 <robert_he@asus.com>

[modify] https://crrev.com/d9a5b781f60866ef6a52594c12aab59dcae7f083/init/chromeos_startup

Project Member

Comment 21 by bugdroid1@chromium.org, Sep 4 2017

Labels: merge-merged-factory-reef-8811.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/4feb0737640bec15744774c626803a4a8bb29db1

commit 4feb0737640bec15744774c626803a4a8bb29db1
Author: Igor <igorcov@chromium.org>
Date: Mon Sep 04 07:03:41 2017

init: Check for block_devmode=1 included when sysfs present

When checking the value of block_devmode for devices that allow
reading of VPD through sysfs, the old version was looking only at
the presence of the flag. This CL checks also the value of
block_devmode and only if it's 1, the devmode is blocked.

BUG= chromium:618340 
TEST=Tested manually in console

Change-Id: I6c0eb33e0734b3d613959b6de9772d8cf2e40d55
Reviewed-on: https://chromium-review.googlesource.com/423048
Commit-Ready: Igor <igorcov@chromium.org>
Tested-by: Igor <igorcov@chromium.org>
Reviewed-by: Thiemo Nagel <tnagel@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit 60952d75dbe8ad5bf5d8dd08ed16a5a92fce93f2)
Reviewed-on: https://chromium-review.googlesource.com/648541
Reviewed-by: Marco Chen <marcochen@chromium.org>
Commit-Queue: Marco Chen <marcochen@chromium.org>
Tested-by: Marco Chen <marcochen@chromium.org>

[modify] https://crrev.com/4feb0737640bec15744774c626803a4a8bb29db1/init/chromeos_startup

Sign in to add a comment