diff options
author | Randall Spangler <rspangler@chromium.org> | 2015-04-21 10:49:57 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-04-21 21:18:33 +0000 |
commit | 2e0cc436b1f4cd60cdae8c4041b479d38ef8d774 (patch) | |
tree | 8f1f61dcf5f5b20495e985c4ad9afd7da176d03c | |
parent | 94baa433bcaeff9dcc0c25d3c19f01ecef485b1a (diff) | |
download | chrome-ec-2e0cc436b1f4cd60cdae8c4041b479d38ef8d774.tar.gz |
Allow console-reading host commands on locked systems
We allow reading the EC console via case-closed debugging on locked
systems, so we should also allow reading it via host command. The
original reason for denying this (EC printing keystrokes) no longer
exists; we don't print keyboard matrix changes by default anymore.
BUG=chromium:479223
BRANCH=none (well, could apply this anywhere...)
TEST=on a system with both hard and soft WP enabled in the EC,
'ectool console' works instead of failing with access denied.
Change-Id: Ie111bc130dd3f17cd4b658718d00d299786e3434
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/266701
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
-rw-r--r-- | common/uart_buffering.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/common/uart_buffering.c b/common/uart_buffering.c index 8037320340..42a925ae67 100644 --- a/common/uart_buffering.c +++ b/common/uart_buffering.c @@ -342,13 +342,6 @@ DECLARE_HOOK(HOOK_INIT, uart_rx_dma_init, HOOK_PRIO_DEFAULT); static int host_command_console_snapshot(struct host_cmd_handler_args *args) { - /* - * Only allowed on unlocked system, since console output contains - * keystroke data. - */ - if (system_is_locked()) - return EC_ERROR_ACCESS_DENIED; - /* Assume the whole circular buffer is full */ tx_snapshot_head = tx_buf_head; tx_snapshot_tail = TX_BUF_NEXT(tx_snapshot_head); @@ -379,13 +372,6 @@ static int host_command_console_read(struct host_cmd_handler_args *args) { char *dest = (char *)args->response; - /* - * Only allowed on unlocked system, since console output contains - * keystroke data. - */ - if (system_is_locked()) - return EC_ERROR_ACCESS_DENIED; - /* If no snapshot data, return empty response */ if (tx_snapshot_head == tx_snapshot_tail) return EC_RES_SUCCESS; |