On 3/16/22 20:23, Simon Glass wrote:
On Wed, 16 Mar 2022 at 09:40, Pierre-Clément Tosi wrote:
Use the macro introduced by commit ef0f4e834c66 ("build_bug.h: add
wrapper for _Static_assert") by importing .
Signed-off-by: Pierre-Clément Tosi
Cc: Simon Glass
Cc: Steffen Jaeckel
Roman,
On 8/5/21 9:55 AM, Rasmus Villemoes wrote:
> On 03/08/2021 13.00, Roman Kopytin wrote:
>
> Hi Roman
>
> Thanks for picking this up. A few notes on the process:
>
> - Don't attach the patch, it must be inline in the email. But do not
> copy-paste it in to your mail client, that will most
one test that needs it.
>
> Add a command-line flag in case this is desired in normal use.
>
> Signed-off-by: Simon Glass
> Fixes: 25c8b9f298e ("test: add first autoboot unit tests")
Reviewed-by: Steffen Jaeckel
Cheers
Steffen
This adds tests for the crypt-based and plain SHA256-based password hashing
algorithms in the autoboot flow.
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
---
(no changes since v4)
Changes in v4:
Add another test with `bootstopusesha256` unset
common/Kconfig.boot | 2
In case crypt-based hashing is enabled this will be the default mechanism
that is used. If a user wants to have support for both, the environment
variable `bootstopusesha256` can be set to `true` to allow plain SHA256
based hashing of the password.
Signed-off-by: Steffen Jaeckel
Reviewed
-by: Steffen Jaeckel
Reviewed-by: Simon Glass
---
(no changes since v1)
common/Kconfig.boot | 9 +
common/autoboot.c | 11 +++
2 files changed, 20 insertions(+)
diff --git a/common/Kconfig.boot b/common/Kconfig.boot
index e70dcf17cb..d19bc32836 100644
--- a/common/Kconfig.boot
In case a user has to enter a complicated password it is sometimes
desireable to give the user more time than the default timeout.
Enabling this feature will disable the timeout entirely in case the user
presses the key before entering any other character.
Signed-off-by: Steffen Jaeckel
While doing code-review internally this got nitpicked by 2 reviewers, so
I decided to include this here.
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
Reviewed-by: Heiko Schocher
---
(no changes since v1)
common/autoboot.c | 16
1 file changed, 8 insertions(+), 8
Hook into the autoboot flow as an alternative to the existing
mechanisms.
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
Reviewed-by: Heiko Schocher
---
(no changes since v1)
common/Kconfig.boot | 38 ++---
common/autoboot.c | 81
In order to prevent using the global errno, replace it with a static
version and create a wrapper function which returns the error value.
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
Reviewed-by: Heiko Schocher
---
Changes in v5:
Take review comments into account
include/crypt.h
--always --all
tags/v4.4.17-0-g6b110bc
```
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
Reviewed-by: Heiko Schocher
---
(no changes since v4)
Changes in v4:
Fix depends for unit-tests
Changes in v3:
Add unit-tests for autoboot
Introduce `bootstopusesha256` to allow fallback to plain
unit-tests of crypt_compare()
Wrapped crypt functions to encapsulate errno
Steffen Jaeckel (8):
lib: add crypt subsystem
lib: wrap crypt API to hide errno usage
common: integrate crypt-based passwords
common: Rename macro appropriately
common: allow disabling of timeout for password entry
Hi Heiko,
thanks for the review!
On 7/8/21 5:56 AM, Heiko Schocher wrote:
> [...]
>
>> diff --git a/lib/crypt/Makefile b/lib/crypt/Makefile
>> new file mode 100644
>> index 00..290231064c
>> --- /dev/null
>> +++ b/lib/crypt/Makefile
>> @@ -0,0 +1,10 @@
>> +# SPDX-License-Identifier:
This adds tests for the crypt-based and plain SHA256-based password hashing
algorithms in the autoboot flow.
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
---
Changes in v4:
Add another test with `bootstopusesha256` unset
common/Kconfig.boot | 2 +-
common/console.c
In case crypt-based hashing is enabled this will be the default mechanism
that is used. If a user wants to have support for both, the environment
variable `bootstopusesha256` can be set to `true` to allow plain SHA256
based hashing of the password.
Signed-off-by: Steffen Jaeckel
Reviewed
-by: Steffen Jaeckel
Reviewed-by: Simon Glass
---
(no changes since v1)
common/Kconfig.boot | 9 +
common/autoboot.c | 11 +++
2 files changed, 20 insertions(+)
diff --git a/common/Kconfig.boot b/common/Kconfig.boot
index e70dcf17cb..d19bc32836 100644
--- a/common/Kconfig.boot
In case a user has to enter a complicated password it is sometimes
desireable to give the user more time than the default timeout.
Enabling this feature will disable the timeout entirely in case the user
presses the key before entering any other character.
Signed-off-by: Steffen Jaeckel
While doing code-review internally this got nitpicked by 2 reviewers, so
I decided to include this here.
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
---
(no changes since v1)
common/autoboot.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git
Hook into the autoboot flow as an alternative to the existing
mechanisms.
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
---
(no changes since v1)
common/Kconfig.boot | 38 ++---
common/autoboot.c | 81 -
2 files changed
In order to prevent using the global errno, replace it with a static
version and create a wrapper function which returns the error value.
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
---
(no changes since v1)
include/crypt.h | 3 ++-
lib/crypt/alg-sha256.h | 6
--always --all
tags/v4.4.17-0-g6b110bc
```
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
---
Changes in v4:
Fix depends for unit-tests
Changes in v3:
Add unit-tests for autoboot
Introduce `bootstopusesha256` to allow fallback to plain SHA256-based
hashing
Add AUTOBOOT_FLUSH_STDIN option
Drop
to encapsulate errno
Steffen Jaeckel (8):
lib: add crypt subsystem
lib: wrap crypt API to hide errno usage
common: integrate crypt-based passwords
common: Rename macro appropriately
common: allow disabling of timeout for password entry
common: add AUTOBOOT_FLUSH_STDIN option
common
Hi Simon,
thanks again for the review!
On 6/26/21 8:32 PM, Simon Glass wrote:
> On Mon, 21 Jun 2021 at 14:25, Steffen Jaeckel
> wrote:
>>
>> This adds tests for the crypt-based and plain SHA256-based password hashing
>> algorithms in the autoboot flow.
>>
>
This adds tests for the crypt-based and plain SHA256-based password hashing
algorithms in the autoboot flow.
Signed-off-by: Steffen Jaeckel
---
(no changes since v1)
common/Kconfig.boot | 2 +-
common/console.c| 5 +++
configs/sandbox_defconfig | 11 +
include
In case crypt-based hashing is enabled this will be the default mechanism
that is used. If a user wants to have support for both, the environment
variable `bootstopusesha256` can be set to `true` to allow plain SHA256
based hashing of the password.
Signed-off-by: Steffen Jaeckel
---
(no changes
-by: Steffen Jaeckel
---
(no changes since v1)
common/Kconfig.boot | 9 +
common/autoboot.c | 11 +++
2 files changed, 20 insertions(+)
diff --git a/common/Kconfig.boot b/common/Kconfig.boot
index e70dcf17cb..d19bc32836 100644
--- a/common/Kconfig.boot
+++ b/common/Kconfig.boot
In case a user has to enter a complicated password it is sometimes
desireable to give the user more time than the default timeout.
Enabling this feature will disable the timeout entirely in case the user
presses the key before entering any other character.
Signed-off-by: Steffen Jaeckel
While doing code-review internally this got nitpicked by 2 reviewers, so
I decided to include this here.
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
---
(no changes since v1)
common/autoboot.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git
Hook into the autoboot flow as an alternative to the existing
mechanisms.
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
---
(no changes since v1)
common/Kconfig.boot | 38 ++---
common/autoboot.c | 80 -
2 files changed
In order to prevent using the global errno, replace it with a static
version and create a wrapper function which returns the error value.
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
---
(no changes since v1)
include/crypt.h | 3 ++-
lib/crypt/alg-sha256.h | 6
--always --all
tags/v4.4.17-0-g6b110bc
```
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
---
Changes in v3:
Add unit-tests for autoboot
Introduce `bootstopusesha256` to allow fallback to plain SHA256-based
hashing
Add AUTOBOOT_FLUSH_STDIN option
Drop the changes to bcm963158_ram_defconfig
the changes to bcm963158_ram_defconfig
Changes in v2:
Update Kconfig way of enabling, setting hashes etc.
Changes in v1:
Added unit-tests of crypt_compare()
Wrapped crypt functions to encapsulate errno
Steffen Jaeckel (8):
lib: add crypt subsystem
lib: wrap crypt API to hide errno usage
common
Hi Simon,
On 5/11/21 5:27 PM, Simon Glass wrote:
>>
>> [snip]
>>
diff --git a/common/autoboot.c b/common/autoboot.c
index 50ab9281e7..6f55abe388 100644
--- a/common/autoboot.c
+++ b/common/autoboot.c
@@ -316,3 +316,4 @@ static int abortboot_key_sequence(int bootdelay)
Hi Simon,
On 5/10/21 10:45 PM, Simon Glass wrote:
> On Mon, 10 May 2021 at 13:37, Steffen Jaeckel
> wrote:
[snip]
>> diff --git a/common/autoboot.c b/common/autoboot.c
>> index 50ab9281e7..6f55abe388 100644
>> --- a/common/autoboot.c
>> +++ b/common/autoboot.c
>
Hi Simon
On 5/10/21 10:24 PM, Simon Glass wrote:
> On Mon, 10 May 2021 at 14:06, Steffen Jaeckel
> wrote:
>> On 5/10/21 9:19 PM, Simon Glass wrote:
>>> On Mon, 10 May 2021 at 11:05, Steffen Jaeckel
>>> wrote:
>>>> On 5/10/21 6:27 PM, Simon Glass
Hi Simon,
On 5/10/21 9:19 PM, Simon Glass wrote:
> On Mon, 10 May 2021 at 11:05, Steffen Jaeckel
> wrote:
>> On 5/10/21 6:27 PM, Simon Glass wrote:
>>> On Mon, 10 May 2021 at 00:19, Steffen Jaeckel
>>> wrote:
>>>>
>>>> Hook in
Hi Simon,
On 5/10/21 6:28 PM, Simon Glass wrote:
> Hi Steffen,
>
> On Mon, 10 May 2021 at 00:19, Steffen Jaeckel
> wrote:
>>
>> This is a copy of the regular sandbox with crypt-based password entry
>> enabled.
>>
>> Signed-off-by: Steffen
On 5/10/21 6:27 PM, Simon Glass wrote:
> On Mon, 10 May 2021 at 00:19, Steffen Jaeckel
> wrote:
>>
>> In order to prevent using the global errno, replace it with a static
>> version and create a wrapper function which returns the error value.
>>
>
On 5/10/21 6:27 PM, Simon Glass wrote:
> On Mon, 10 May 2021 at 00:19, Steffen Jaeckel
> wrote:
>>
>> Hook into the autoboot flow as an alternative to the existing
>> mechanisms.
>>
>> Signed-off-by: Steffen Jaeckel
>> ---
>>
>>
This is a copy of the regular sandbox with crypt-based password entry
enabled.
Signed-off-by: Steffen Jaeckel
---
(no changes since v1)
configs/sandbox_cryptpass_defconfig | 296
1 file changed, 296 insertions(+)
create mode 100644 configs
In case a user has to enter a complicated password it is sometimes
desireable to give the user more time than the default timeout.
Enabling this feature will disable the timeout entirely in case the user
presses the key before entering any other character.
Signed-off-by: Steffen Jaeckel
In order to have at least one defconfig that enables all those newly added
values.
Signed-off-by: Steffen Jaeckel
---
(no changes since v1)
configs/bcm963158_ram_defconfig | 8
1 file changed, 8 insertions(+)
diff --git a/configs/bcm963158_ram_defconfig b/configs
--always --all
tags/v4.4.17-0-g6b110bc
```
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
---
Changes in v2:
Update Kconfig way of enabling, setting hashes etc.
Changes in v1:
Added unit-tests of crypt_compare()
Wrapped crypt functions to encapsulate errno
include/crypt.h | 13
Hook into the autoboot flow as an alternative to the existing
mechanisms.
Signed-off-by: Steffen Jaeckel
---
(no changes since v1)
common/Kconfig.boot | 37 ++---
common/autoboot.c | 80 -
2 files changed, 103 insertions(+), 14
Steffen Jaeckel (7):
lib: add crypt subsystem
lib: wrap crypt API to hide errno usage
common: integrate crypt-based passwords
common: Rename macro appropriately
cmd: allow disabling of timeout for password entry
configs: add new values to bcm963158 defconfig
configs: add new sandbox
While doing code-review internally this got nitpicked by 2 reviewers, so
I decided to include this here.
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
---
(no changes since v1)
common/autoboot.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git
In order to prevent using the global errno, replace it with a static
version and create a wrapper function which returns the error value.
Signed-off-by: Steffen Jaeckel
---
(no changes since v1)
include/crypt.h | 3 ++-
lib/crypt/alg-sha256.h | 6 --
lib/crypt/alg-sha512.h
hose?
Should it depend or can it also select?
> ...
>> diff --git a/lib/crypt/crypt-sha256.c b/lib/crypt/crypt-sha256.c
>> new file mode 100644
>> index 00..37127d41e1
>> --- /dev/null
>> +++ b/lib/crypt/crypt-sha256.c
>> @@ -0,0 +1,313 @@
>> +/* One way encrypt
In case a user has to enter a complicated password it is sometimes
desireable to give the user more time than the default timeout.
Enabling this feature will disable the timeout entirely in case the user
presses the key before entering any other character.
Signed-off-by: Steffen Jaeckel
--always --all
tags/v4.4.17-0-g6b110bc
```
Signed-off-by: Steffen Jaeckel
---
Changes in v1:
Added unit-tests of crypt_compare()
Wrapped crypt functions to encapsulate errno
include/crypt.h | 13 ++
lib/Kconfig | 1 +
lib/Makefile | 1 +
lib/crypt/Kconfig
In order to have at least one defconfig that enables all those newly added
values.
Signed-off-by: Steffen Jaeckel
---
configs/bcm963158_ram_defconfig | 8
1 file changed, 8 insertions(+)
diff --git a/configs/bcm963158_ram_defconfig b/configs/bcm963158_ram_defconfig
index 0be1e0981a
While doing code-review internally this got nitpicked by 2 reviewers, so
I decided to include this here.
Signed-off-by: Steffen Jaeckel
Reviewed-by: Simon Glass
---
common/autoboot.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/common/autoboot.c b
Hook into the autoboot flow as an alternative to the existing
mechanisms.
Signed-off-by: Steffen Jaeckel
---
common/Kconfig.boot | 23 +---
common/autoboot.c | 85 -
2 files changed, 95 insertions(+), 13 deletions(-)
diff --git a/common
In order to prevent using the global errno, replace it with a static
version and create a wrapper function which returns the error value.
Signed-off-by: Steffen Jaeckel
---
include/crypt.h | 3 ++-
lib/crypt/alg-sha256.h | 6 --
lib/crypt/alg-sha512.h | 6 --
lib/crypt
Changes in v1:
Added unit-tests of crypt_compare()
Wrapped crypt functions to encapsulate errno
Steffen Jaeckel (6):
lib: add crypt subsystem
lib: wrap crypt API to hide errno usage
common: integrate crypt-based passwords
common: Rename macro appropriately
cmd: allow disabling of timeout
On 4/21/21 9:14 AM, Simon Glass wrote:
> On Tue, 13 Apr 2021 at 10:16, Steffen Jaeckel
> wrote:
>>
>> In case a user has to enter a complicated password it is sometimes
>> desireable to give the user more time than the default timeout.
>> Enabling this feature wil
On 4/21/21 9:14 AM, Simon Glass wrote:
> Hi Steffen,
>
> On Tue, 13 Apr 2021 at 10:16, Steffen Jaeckel
> wrote:
>>
>> Hook into the autoboot flow as an alternative to the existing
>> mechanisms.
>>
>> Signed-off-by: Steffen Jaeck
Hi Simon,
thanks for taking the time to review.
On 4/21/21 9:14 AM, Simon Glass wrote:
> On Tue, 13 Apr 2021 at 10:16, Steffen Jaeckel
> wrote:
>>
>> Add the basic functionality required to support the standard crypt
>> format.
>> The files crypt-sha256.c and
--always --all
tags/v4.4.17-0-g6b110bc
```
Signed-off-by: Steffen Jaeckel
---
include/crypt.h | 13 ++
lib/Kconfig | 1 +
lib/Makefile | 1 +
lib/crypt/Kconfig| 29
lib/crypt/Makefile | 10 ++
lib/crypt/alg-sha256.h | 17 ++
lib/crypt/alg
Steffen Jaeckel (5):
lib: add crypt subsystem
common: integrate crypt-based passwords
common: Rename macro appropriately
cmd: allow disabling of timeout for password entry
configs: add new values to bcm963158 defconfig
cmd/Kconfig | 8 +
common/Kconfig.boot
In order to have at least one defconfig that enables all those newly added
values.
Signed-off-by: Steffen Jaeckel
---
configs/bcm963158_ram_defconfig | 8
1 file changed, 8 insertions(+)
diff --git a/configs/bcm963158_ram_defconfig b/configs/bcm963158_ram_defconfig
index 0be1e0981a
In case a user has to enter a complicated password it is sometimes
desireable to give the user more time than the default timeout.
Enabling this feature will disable the timeout entirely in case the user
presses the key before entering any other character.
Signed-off-by: Steffen Jaeckel
While doing code-review internally this got nitpicked by 2 reviewers, so
I decided to include this here.
Signed-off-by: Steffen Jaeckel
---
common/autoboot.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/common/autoboot.c b/common/autoboot.c
index
Hook into the autoboot flow as an alternative to the existing
mechanisms.
Signed-off-by: Steffen Jaeckel
---
common/Kconfig.boot | 23 +---
common/autoboot.c | 67 +++--
2 files changed, 77 insertions(+), 13 deletions(-)
diff --git
64 matches
Mail list logo