All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/20] Split fsverity-utils into a shared library
@ 2020-04-24 20:54 Jes Sorensen
  2020-04-24 20:54 ` [PATCH 01/20] Build basic shared library framework Jes Sorensen
                   ` (20 more replies)
  0 siblings, 21 replies; 23+ messages in thread
From: Jes Sorensen @ 2020-04-24 20:54 UTC (permalink / raw)
  To: linux-fscrypt; +Cc: ebiggers, kernel-team, jsorensen

From: Jes Sorensen <jsorensen@fb.com>

Hi

This is an update to the libfsverity patches I posted about a month
ago, which I believe address all the issues in the feedback I received.

I have a version of rpm that requires this library which is able to
sign files and a plugin which will install fsverity signatures when
the rpm is installed. The code for rpm can be found on github - note
that I do rebase the repo as I fix bugs:
https://github.com/jessorensen/rpm/tree/rpm-fsverity

A git tree with these patches can also be found here:
https://git.kernel.org/pub/scm/linux/kernel/git/jes/fsverity-utils.git

This update changes a number of issues:
- Change the API for libfsverity_compute_digest() to take a callback
  read function, which is needed to deal with the internal cpio
  processing of rpm.
- Provides the option to build fsverity linked statically against
  libfsverity
- Makefile support to install libfsverity.so, libfsverity.h and sets
  the soname
- Make struct fsverity_descriptor and struct fsverity_hash_alg
  internal to the library
- Improved documentation of the API in libfsverity.h

I have a .spec file for it that packages this into an rpm for Fedora,
as well as a packaged version of rpm with fsverity support in it,
which I am happy to share.

Let me know what you think!

Thanks,
Jes


Jes Sorensen (20):
  Build basic shared library framework
  Change compute_file_measurement() to take a file descriptor as
    argument
  Move fsverity_descriptor definition to libfsverity.h
  Move hash algorithm code to shared library
  Create libfsverity_compute_digest() and adapt cmd_sign to use it
  Introduce libfsverity_sign_digest()
  Validate input arguments to libfsverity_compute_digest()
  Validate input parameters for libfsverity_sign_digest()
  Document API of libfsverity
  Change libfsverity_compute_digest() to take a read function
  Make full_{read,write}() return proper error codes instead of bool
  libfsverity: Remove dependencies on util.c
  Update Makefile to install libfsverity and fsverity.h
  Change libfsverity_find_hash_alg_by_name() to return the alg number
  Make libfsverity_find_hash_alg_by_name() private to the shared library
  libfsverity_sign_digest() use ARRAY_SIZE()
  fsverity_cmd_sign() use sizeof() input argument instead of struct
  fsverity_cmd_sign() don't exit on error without closing file
    descriptor
  Improve documentation of libfsverity.h API
  Fixup Makefile

 Makefile              |  49 +++-
 cmd_enable.c          |  19 +-
 cmd_measure.c         |  19 +-
 cmd_sign.c            | 565 +++++------------------------------------
 fsverity.c            |  17 +-
 hash_algs.c           |  95 ++++---
 hash_algs.h           |  36 +--
 helpers.h             |  43 ++++
 libfsverity.h         | 138 ++++++++++
 libfsverity_private.h |  52 ++++
 libverity.c           | 572 ++++++++++++++++++++++++++++++++++++++++++
 util.c                |  15 +-
 util.h                |  62 +----
 13 files changed, 1029 insertions(+), 653 deletions(-)
 create mode 100644 helpers.h
 create mode 100644 libfsverity.h
 create mode 100644 libfsverity_private.h
 create mode 100644 libverity.c

-- 
2.25.3


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2020-05-07 17:35 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-24 20:54 [PATCH v4 00/20] Split fsverity-utils into a shared library Jes Sorensen
2020-04-24 20:54 ` [PATCH 01/20] Build basic shared library framework Jes Sorensen
2020-04-24 20:54 ` [PATCH 02/20] Change compute_file_measurement() to take a file descriptor as argument Jes Sorensen
2020-04-24 20:54 ` [PATCH 03/20] Move fsverity_descriptor definition to libfsverity.h Jes Sorensen
2020-04-24 20:54 ` [PATCH 04/20] Move hash algorithm code to shared library Jes Sorensen
2020-04-24 20:54 ` [PATCH 05/20] Create libfsverity_compute_digest() and adapt cmd_sign to use it Jes Sorensen
2020-04-24 20:54 ` [PATCH 06/20] Introduce libfsverity_sign_digest() Jes Sorensen
2020-04-24 20:54 ` [PATCH 07/20] Validate input arguments to libfsverity_compute_digest() Jes Sorensen
2020-04-24 20:54 ` [PATCH 08/20] Validate input parameters for libfsverity_sign_digest() Jes Sorensen
2020-04-24 20:54 ` [PATCH 09/20] Document API of libfsverity Jes Sorensen
2020-04-24 20:54 ` [PATCH 10/20] Change libfsverity_compute_digest() to take a read function Jes Sorensen
2020-04-24 20:54 ` [PATCH 11/20] Make full_{read,write}() return proper error codes instead of bool Jes Sorensen
2020-04-24 20:54 ` [PATCH 12/20] libfsverity: Remove dependencies on util.c Jes Sorensen
2020-04-24 20:54 ` [PATCH 13/20] Update Makefile to install libfsverity and fsverity.h Jes Sorensen
2020-04-24 20:54 ` [PATCH 14/20] Change libfsverity_find_hash_alg_by_name() to return the alg number Jes Sorensen
2020-04-24 20:54 ` [PATCH 15/20] Make libfsverity_find_hash_alg_by_name() private to the shared library Jes Sorensen
2020-04-24 20:55 ` [PATCH 16/20] libfsverity_sign_digest() use ARRAY_SIZE() Jes Sorensen
2020-04-24 20:55 ` [PATCH 17/20] fsverity_cmd_sign() use sizeof() input argument instead of struct Jes Sorensen
2020-04-24 20:55 ` [PATCH 18/20] fsverity_cmd_sign() don't exit on error without closing file descriptor Jes Sorensen
2020-04-24 20:55 ` [PATCH 19/20] Improve documentation of libfsverity.h API Jes Sorensen
2020-04-24 20:55 ` [PATCH 20/20] Fixup Makefile Jes Sorensen
2020-05-07 14:03 ` [PATCH v4 00/20] Split fsverity-utils into a shared library Jes Sorensen
2020-05-07 17:35   ` Eric Biggers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.