mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: State patches
Date: Fri, 31 Mar 2017 09:03:04 +0200	[thread overview]
Message-ID: <20170331070346.26878-1-s.hauer@pengutronix.de> (raw)

Hi All,

Here is a ton of patches working on the state framework:

- make code easier to follow
  - Drop cached backend, replace with open coded more direct code
  - drop backend as extra struct type
  - drop lazy init code
- update documentation
- Add keystore command
  Using authenticated state requires hardware support which currently
  is only available for i.MX6. At least for testing purposes a keystore
  command to set keys is useful. This way authenticated state can be
  tested without hardware support
- more robust conversion of the backend path to a device node
- make work better with NOR flash: The current code ended up reading
  from NOR Flash byte by byte which was painfully slow

----------------------------------------------------------------
Sascha Hauer (42):
      state: Make pointing to the backend using a phandle the only supported method
      state: Use positive logic
      state: backend: remove .get_packed_len
      state: backend: remove len_hint argument from state_storage_read
      state: Drop backend as extra struct type
      state: merge backend.c into state.c
      state: open code state_backend_init in caller
      state: remove unnecessary argument from state_format_init
      state: pass struct state * to storage functions
      state: storage: initialize variable once outside loop
      state: backend_circular: Read whole PEB
      state: drop lazy_init
      state: simplify direct backend
      state: replace len_hint logic
      state: Convert all bufs to void *
      state: Drop cache bucket
      state: backend-direct: Fix max_size
      state: bucket: Make output more informative
      state: backend_bucket_direct: max_size is always given
      state: backend: Add more fields to struct state_backend_storage
      state: backend_circular: remove unnecessary warning
      state: storage: direct: do not close file that is not opened
      state: backend: Add some documentation
      state: backend_circular: default to circular storage
      state: backend_circular: rewrite function doc
      state: backend_storage: Rename variable nr_copies to n_buckets
      state: backend_storage: Rename variable desired_copies to desired_buckets
      state: backend_storage: rewrite function doc
      state: backend_storage: make locally used variable static
      state: backend_storage: rename more variables
      keystore: implement forgetting secrets
      commands: implement keystore command
      commands: state: allow loading state with -l
      crypto: digest: initialize earlier
      state: backend_raw: alloc digest only when needed
      state: backend_circular: Set minumum writesize to 8
      state: backend bucket circular: Explain metadata
      state: Allow to load without authentification
      state: Update documentation
      state: Do not load state during state_new_from_node
      state: Remove -EUCLEAN check from userspace tool
      state: find device node from device path, not from device node path

 .../devicetree/bindings/barebox/barebox,state.rst  |  33 +-
 Documentation/user/state.rst                       |  33 +-
 commands/Kconfig                                   |   6 +
 commands/Makefile                                  |   1 +
 commands/keystore.c                                | 100 +++++
 commands/state.c                                   |  21 +-
 common/state/Makefile                              |   2 -
 common/state/backend.c                             | 189 ---------
 common/state/backend_bucket_cached.c               | 155 -------
 common/state/backend_bucket_circular.c             |  96 ++---
 common/state/backend_bucket_direct.c               |  20 +-
 common/state/backend_format_dtb.c                  |  13 +-
 common/state/backend_format_raw.c                  | 127 +++---
 common/state/backend_storage.c                     | 456 ++++++++-------------
 common/state/state.c                               | 188 +++++++--
 common/state/state.h                               |  71 ++--
 crypto/hmac.c                                      |   2 +-
 crypto/keystore.c                                  |  53 ++-
 crypto/sha1.c                                      |   2 +-
 crypto/sha2.c                                      |   2 +-
 crypto/sha4.c                                      |   2 +-
 drivers/misc/state.c                               |   6 +
 include/crypto/keystore.h                          |   4 +
 include/state.h                                    |   1 +
 24 files changed, 713 insertions(+), 870 deletions(-)
 create mode 100644 commands/keystore.c
 delete mode 100644 common/state/backend.c
 delete mode 100644 common/state/backend_bucket_cached.c

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2017-03-31  7:04 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31  7:03 Sascha Hauer [this message]
2017-03-31  7:03 ` [PATCH 01/42] state: Make pointing to the backend using a phandle the only supported method Sascha Hauer
2017-05-15  9:18   ` Jan Remmet
2017-05-15 10:14     ` Jan Remmet
2017-05-16  5:33       ` Sascha Hauer
2017-05-17  9:13         ` Jan Remmet
2017-03-31  7:03 ` [PATCH 02/42] state: Use positive logic Sascha Hauer
2017-03-31  7:03 ` [PATCH 03/42] state: backend: remove .get_packed_len Sascha Hauer
2017-03-31  7:03 ` [PATCH 04/42] state: backend: remove len_hint argument from state_storage_read Sascha Hauer
2017-03-31  7:03 ` [PATCH 05/42] state: Drop backend as extra struct type Sascha Hauer
2017-03-31  7:03 ` [PATCH 06/42] state: merge backend.c into state.c Sascha Hauer
2017-03-31  7:03 ` [PATCH 07/42] state: open code state_backend_init in caller Sascha Hauer
2017-03-31  7:03 ` [PATCH 08/42] state: remove unnecessary argument from state_format_init Sascha Hauer
2017-03-31  7:03 ` [PATCH 09/42] state: pass struct state * to storage functions Sascha Hauer
2017-03-31  7:03 ` [PATCH 10/42] state: storage: initialize variable once outside loop Sascha Hauer
2017-03-31  7:03 ` [PATCH 11/42] state: backend_circular: Read whole PEB Sascha Hauer
2017-04-15  8:40   ` Sam Ravnborg
2017-03-31  7:03 ` [PATCH 12/42] state: drop lazy_init Sascha Hauer
2017-03-31  7:03 ` [PATCH 13/42] state: simplify direct backend Sascha Hauer
2017-03-31  7:03 ` [PATCH 14/42] state: replace len_hint logic Sascha Hauer
2017-03-31  7:03 ` [PATCH 15/42] state: Convert all bufs to void * Sascha Hauer
2017-03-31  7:03 ` [PATCH 16/42] state: Drop cache bucket Sascha Hauer
2017-04-15  8:53   ` Sam Ravnborg
2017-04-19  8:22     ` Sascha Hauer
2017-03-31  7:03 ` [PATCH 17/42] state: backend-direct: Fix max_size Sascha Hauer
2017-03-31  7:03 ` [PATCH 18/42] state: bucket: Make output more informative Sascha Hauer
2017-03-31  7:03 ` [PATCH 19/42] state: backend_bucket_direct: max_size is always given Sascha Hauer
2017-03-31  7:03 ` [PATCH 20/42] state: backend: Add more fields to struct state_backend_storage Sascha Hauer
2017-03-31  7:03 ` [PATCH 21/42] state: backend_circular: remove unnecessary warning Sascha Hauer
2017-03-31  7:03 ` [PATCH 22/42] state: storage: direct: do not close file that is not opened Sascha Hauer
2017-03-31  7:03 ` [PATCH 23/42] state: backend: Add some documentation Sascha Hauer
2017-03-31  7:03 ` [PATCH 24/42] state: backend_circular: default to circular storage Sascha Hauer
2017-03-31  7:03 ` [PATCH 25/42] state: backend_circular: rewrite function doc Sascha Hauer
2017-03-31  7:03 ` [PATCH 26/42] state: backend_storage: Rename variable nr_copies to n_buckets Sascha Hauer
2017-03-31  7:03 ` [PATCH 27/42] state: backend_storage: Rename variable desired_copies to desired_buckets Sascha Hauer
2017-03-31  7:03 ` [PATCH 28/42] state: backend_storage: rewrite function doc Sascha Hauer
2017-03-31  7:03 ` [PATCH 29/42] state: backend_storage: make locally used variable static Sascha Hauer
2017-03-31  7:03 ` [PATCH 30/42] state: backend_storage: rename more variables Sascha Hauer
2017-03-31  7:03 ` [PATCH 31/42] keystore: implement forgetting secrets Sascha Hauer
2017-03-31  7:03 ` [PATCH 32/42] commands: implement keystore command Sascha Hauer
2017-03-31  7:03 ` [PATCH 33/42] commands: state: allow loading state with -l Sascha Hauer
2017-03-31  7:03 ` [PATCH 34/42] crypto: digest: initialize earlier Sascha Hauer
2017-03-31  7:03 ` [PATCH 35/42] state: backend_raw: alloc digest only when needed Sascha Hauer
2017-03-31  7:03 ` [PATCH 36/42] state: backend_circular: Set minumum writesize to 8 Sascha Hauer
2017-03-31  7:03 ` [PATCH 37/42] state: backend bucket circular: Explain metadata Sascha Hauer
2017-03-31  7:03 ` [PATCH 38/42] state: Allow to load without authentification Sascha Hauer
2017-03-31  7:03 ` [PATCH 39/42] state: Update documentation Sascha Hauer
2017-03-31  7:03 ` [PATCH 40/42] state: Do not load state during state_new_from_node Sascha Hauer
2017-03-31  7:03 ` [PATCH 41/42] state: Remove -EUCLEAN check from userspace tool Sascha Hauer
2017-03-31  7:03 ` [PATCH 42/42] state: find device node from device path, not from device node path Sascha Hauer
2017-04-03 20:15 ` State patches Sam Ravnborg
2017-04-04  6:19   ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170331070346.26878-1-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox