diff options
author | Randall Spangler <rspangler@chromium.org> | 2015-04-21 10:49:57 -0700 |
---|---|---|
committer | ChromeOS bot <3su6n15k.default@developer.gserviceaccount.com> | 2015-11-14 00:10:26 +0000 |
commit | 0c4d43c45d1e66c7f09420ccfc5cce2b9f0cab42 (patch) | |
tree | 8fc52ee841461b34d5e05db352639065cbe7bd06 | |
parent | 9cecbd36503bbf6d0e6d888c9fb4762e381cbaf7 (diff) | |
download | chrome-ec-0c4d43c45d1e66c7f09420ccfc5cce2b9f0cab42.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>
(cherry picked from commit 2e0cc436b1f4cd60cdae8c4041b479d38ef8d774)
Reviewed-on: https://chromium-review.googlesource.com/312716
Commit-Queue: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@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 6e93804e61..b7130cd3b9 100644 --- a/common/uart_buffering.c +++ b/common/uart_buffering.c @@ -332,13 +332,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); @@ -369,13 +362,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; |