linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 0/2] Add support for using reserved memory for ima buffer pass
@ 2020-05-04 20:38 Prakhar Srivastava
  2020-05-04 20:38 ` [RFC][PATCH 1/2] Add a layer of abstraction to use the memory reserved by device tree " Prakhar Srivastava
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Prakhar Srivastava @ 2020-05-04 20:38 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel, linuxppc-dev, devicetree,
	linux-integrity, linux-security-module
  Cc: catalin.marinas, will, mpe, benh, paulus, robh+dt, frowand.list,
	zohar, dmitry.kasatkin, jmorris, serge, pasha.tatashin, allison,
	kstewart, takahiro.akashi, tglx, vincenzo.frascino, mark.rutland,
	masahiroy, james.morse, bhsharma, mbrugger, hsinyi, tao.li,
	christophe.leroy, gregkh, nramas, prsriva, tusharsu, balajib

IMA during kexec(kexec file load) verifies the kernel signature and measures
the signature of the kernel. The signature in the logs can be used to verfiy the 
authenticity of the kernel. The logs don not get carried over kexec and thus
remote attesation cannot verify the signature of the running kernel.

Introduce an ABI to carry forward the ima logs over kexec.
Memory reserved via device tree reservation can be used to store and read
via the of_* functions.

Reserved memory stores the size(sizeof(size_t)) of the buffer in the starting
address, followed by the IMA log contents.

Tested on:
  arm64 with Uboot

Prakhar Srivastava (2):
  Add a layer of abstraction to use the memory reserved by device tree
    for ima buffer pass.
  Add support for ima buffer pass using reserved memory for arm64 kexec.
    Update the arch sepcific code path in kexec file load to store the
    ima buffer in the reserved memory. The same reserved memory is read
    on kexec or cold boot.

 arch/arm64/Kconfig                     |   1 +
 arch/arm64/include/asm/ima.h           |  22 ++++
 arch/arm64/include/asm/kexec.h         |   5 +
 arch/arm64/kernel/Makefile             |   1 +
 arch/arm64/kernel/ima_kexec.c          |  64 ++++++++++
 arch/arm64/kernel/machine_kexec_file.c |   1 +
 arch/powerpc/include/asm/ima.h         |   3 +-
 arch/powerpc/kexec/ima.c               |  14 ++-
 drivers/of/Kconfig                     |   6 +
 drivers/of/Makefile                    |   1 +
 drivers/of/of_ima.c                    | 165 +++++++++++++++++++++++++
 include/linux/of.h                     |  34 +++++
 security/integrity/ima/ima_kexec.c     |  15 ++-
 13 files changed, 325 insertions(+), 7 deletions(-)
 create mode 100644 arch/arm64/include/asm/ima.h
 create mode 100644 arch/arm64/kernel/ima_kexec.c
 create mode 100644 drivers/of/of_ima.c

-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [RFC][PATCH 0/2] Add support for using reserved memory for ima buffer pass
@ 2020-05-01 18:15 Prakhar Srivastava
  2020-05-01 18:15 ` [RFC]{PATCH 1/2] Add a layer of abstraction to use the memory reserved by device tree " Prakhar Srivastava
  0 siblings, 1 reply; 12+ messages in thread
From: Prakhar Srivastava @ 2020-05-01 18:15 UTC (permalink / raw)
  To: linux-integrity, linux-kernel, devicetree
  Cc: nramas, prsriva, tusharsu, balajib

IMA during kexec(kexec file load) verifies the kernel signature and measures
the signature of the kernel. The signature in the logs can be used to verfiy the 
authenticity of the kernel. The logs don not get carried over kexec and thus
remote attesation cannot verify the signature of the running kernel.

Introduce an ABI to carry forward the ima logs over kexec.
Memory reserved via device tree reservation can be used to store and read
via the of_* functions.

Reserved memory stores the size(sizeof(size_t)) of the buffer in the starting
address, followed by the IMA log contents.

Tested on:
  arm64 with Uboot

Prakhar Srivastava (2):
  Add a layer of abstraction to use the memory reserved by device tree
    for ima buffer pass.
  Add support for ima buffer pass using reserved memory for arm64 kexec.
    Update the arch sepcific code path in kexec file load to store the
    ima buffer in the reserved memory. The same reserved memory is read
    on kexec or cold boot.

 arch/arm64/Kconfig                     |   1 +
 arch/arm64/include/asm/ima.h           |  22 ++++
 arch/arm64/include/asm/kexec.h         |   5 +
 arch/arm64/kernel/Makefile             |   1 +
 arch/arm64/kernel/ima_kexec.c          |  64 ++++++++++
 arch/arm64/kernel/machine_kexec_file.c |   1 +
 arch/powerpc/include/asm/ima.h         |   3 +-
 arch/powerpc/kexec/ima.c               |  14 ++-
 drivers/of/Kconfig                     |   6 +
 drivers/of/Makefile                    |   1 +
 drivers/of/of_ima.c                    | 165 +++++++++++++++++++++++++
 include/linux/of.h                     |  34 +++++
 security/integrity/ima/ima_kexec.c     |  15 ++-
 13 files changed, 325 insertions(+), 7 deletions(-)
 create mode 100644 arch/arm64/include/asm/ima.h
 create mode 100644 arch/arm64/kernel/ima_kexec.c
 create mode 100644 drivers/of/of_ima.c

-- 
2.25.1


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

end of thread, other threads:[~2020-06-01  4:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-04 20:38 [RFC][PATCH 0/2] Add support for using reserved memory for ima buffer pass Prakhar Srivastava
2020-05-04 20:38 ` [RFC][PATCH 1/2] Add a layer of abstraction to use the memory reserved by device tree " Prakhar Srivastava
2020-05-12 23:09   ` Rob Herring
2020-05-18 20:34     ` Prakhar Srivastava
2020-05-04 20:38 ` [RFC][PATCH 2/2] Add support for ima buffer pass using reserved memory arm64 Prakhar Srivastava
2020-05-05  9:59 ` [RFC][PATCH 0/2] Add support for using reserved memory for ima buffer pass Mark Rutland
2020-05-07  5:50   ` Prakhar Srivastava
2020-05-12 23:05     ` Rob Herring
2020-05-18 20:16       ` Prakhar Srivastava
2020-05-23  4:08         ` Thiago Jung Bauermann
2020-06-01  4:05           ` Prakhar Srivastava
  -- strict thread matches above, loose matches on Subject: below --
2020-05-01 18:15 Prakhar Srivastava
2020-05-01 18:15 ` [RFC]{PATCH 1/2] Add a layer of abstraction to use the memory reserved by device tree " Prakhar Srivastava

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).