Re: [PATCH] fat: Allow out-of-range FAT modification timestamps

2021-08-24 Thread Heinrich Schuchardt
On 8/16/21 4:59 PM, Tomasz Kramkowski via Grub-devel wrote: 20def1a3c introduced support for file modification times to allow comparison of file ages on EFI systems. This patch used grub_datetime2unixtime which uses a 32 bit unix timestamp and as a result did not allow the full range of times tha

Re: [RFC PATCH 0/7] Support writing grub modules in Rust

2021-08-24 Thread Heinrich Schuchardt
On 8/24/21 3:32 PM, Daniel Axtens wrote: grub is a trusted component of the secure boot process, including "traditional" GPG-based secure boot, UEFI-based secure boot, and the WIP secure boot process using appended signatures. Most of grub is written in C and has suffered from a number of memory-

[RFC PATCH 3/7] Rust: add a slightly more idiomatic wrapper around command handling

2021-08-24 Thread Daniel Axtens
Add a way to do registering and deregistering of commands that is just a tiny bit more "Rust-y". Signed-off-by: Daniel Axtens --- grub-core/Makefile.am | 2 +- grub-core/lib/rust/grub/src/command.rs | 50 ++ grub-core/lib/rust/grub/src/lib.rs | 1 +

[RFC PATCH 5/7] powerpc: Support Rust

2021-08-24 Thread Daniel Axtens
This is all required to get Rust working with powerpc. Again based mostly on the rustc target.json emitter with a few tweaks for grub. To get the rust toolchain: rustup target add powerpc-unknown-linux-gnu --toolchain nightly Signed-off-by: Daniel Axtens --- .../lib/rust/targets/powerpc-ieee1

[RFC PATCH 7/7] arm64-efi: Support Rust

2021-08-24 Thread Daniel Axtens
Only tested on qemu, not real hardware. To get the rust toolchain: rustup target add aarch64-unknown-linux-gnu --toolchain nightly Signed-off-by: Daniel Axtens --- grub-core/lib/rust/targets/arm64-efi.json | 27 +++ 1 file changed, 27 insertions(+) create mode 100644 grub-

[RFC PATCH 6/7] x86_64-efi: Support Rust

2021-08-24 Thread Daniel Axtens
Only tested in qemu, not on real hardware. Signed-off-by: Daniel Axtens --- grub-core/lib/rust/targets/x86_64-efi.json | 27 ++ 1 file changed, 27 insertions(+) create mode 100644 grub-core/lib/rust/targets/x86_64-efi.json diff --git a/grub-core/lib/rust/targets/x86_64-efi.

[RFC PATCH 2/7] Rust: module build infrastructure

2021-08-24 Thread Daniel Axtens
Make the grub build infrastructure able to detect a Rust toolchain on a supported platform and build modules partially written in Rust. In order to use this you will need: - to be building for x86_64-emu (more platforms added later) - to have a nightly rust toolchain: rustup toolchain ins

[RFC PATCH 4/7] Rust: add the rust_hello module

2021-08-24 Thread Daniel Axtens
Build an actual module with Rust! This module, built whenever COND_RUST is enabled, does the following: - Prints a message when the module is loaded. - Registers a command which prints hello when run. - Deregisters the command when the module is unloaded. You can build it with the usual mak

[RFC PATCH 1/7] emu: support grub_memalign

2021-08-24 Thread Daniel Axtens
This is trivial to do and simplifies Rust support enormously. Signed-off-by: Daniel Axtens --- grub-core/kern/emu/mm.c | 6 ++ include/grub/mm.h | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/grub-core/kern/emu/mm.c b/grub-core/kern/emu/mm.c index 4d1046a219eb..

[RFC PATCH 0/7] Support writing grub modules in Rust

2021-08-24 Thread Daniel Axtens
grub is a trusted component of the secure boot process, including "traditional" GPG-based secure boot, UEFI-based secure boot, and the WIP secure boot process using appended signatures. Most of grub is written in C and has suffered from a number of memory-unsafety issues in the past, something abou