From: Scott Weaver on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822
This enables Rust code in the ELN kernel, which requires enabling CONFIG_EXTENDED_MODVERSIONS and CONFIG_GENDWARFKSYMS. The DRM panic with QR code functionality is the first Rust based code to be enabled. A QR code URL is not defined but we will likely want to update that before enabling this in RHEL.
For now, the ipaclones-internal package is disabled because bindgen (libclang) does not support gcc's `-fdump-ipa-clones`.
Signed-off-by: Scott Weaver scweaver@redhat.com
--- redhat/configs/fedora/generic/CONFIG_DRM_PANIC => redhat/configs/common/generic/CONFIG_DRM_PANIC | 0 redhat/configs/fedora/generic/CONFIG_DRM_PANIC_BACKGROUND_COLOR => redhat/configs/common/generic/CONFIG_DRM_PANIC_BACKGROUND_COLOR | 0 redhat/configs/fedora/generic/CONFIG_DRM_PANIC_DEBUG => redhat/configs/common/generic/CONFIG_DRM_PANIC_DEBUG | 0 redhat/configs/fedora/generic/CONFIG_DRM_PANIC_FOREGROUND_COLOR => redhat/configs/common/generic/CONFIG_DRM_PANIC_FOREGROUND_COLOR | 0 redhat/configs/fedora/generic/CONFIG_DRM_PANIC_SCREEN_QR_CODE => redhat/configs/common/generic/CONFIG_DRM_PANIC_SCREEN_QR_CODE | 0 redhat/configs/fedora/generic/CONFIG_DRM_PANIC_SCREEN_QR_VERSION => redhat/configs/common/generic/CONFIG_DRM_PANIC_SCREEN_QR_VERSION | 0 redhat/configs/common/generic/CONFIG_RUST | 2 +- redhat/configs/common/generic/CONFIG_RUST_OVERFLOW_CHECKS | 2 +- redhat/configs/fedora/generic/CONFIG_RUST | 1 - redhat/configs/fedora/generic/CONFIG_RUST_OVERFLOW_CHECKS | 1 - redhat/configs/rhel/generic/x86/CONFIG_SAMPLES_RUST | 1 + redhat/configs/rhel/generic/CONFIG_DRM_PANIC | 1 - redhat/configs/rhel/generic/CONFIG_DRM_PANIC_SCREEN | 1 + redhat/configs/rhel/generic/CONFIG_DRM_PANIC_SCREEN_QR_CODE_URL | 1 + redhat/configs/rhel/generic/CONFIG_EXTENDED_MODVERSIONS | 2 +- redhat/configs/rhel/generic/CONFIG_GENDWARFKSYMS | 2 +- redhat/configs/rhel/generic/CONFIG_MODVERSIONS | 2 +- redhat/kernel.spec.template | 4 +--- 18 files changed, 9 insertions(+), 11 deletions(-)
From: Scott Weaver scweaver@redhat.com
redhat: enable Rust code in ELN
Rust is already supported in Fedora. This moves the essential Rust support configs to common, enabling it in ELN.
Signed-off-by: Scott Weaver scweaver@redhat.com
diff --git a/redhat/configs/common/generic/CONFIG_RUST b/redhat/configs/common/generic/CONFIG_RUST index blahblah..blahblah 100644 --- a/redhat/configs/common/generic/CONFIG_RUST +++ b/redhat/configs/common/generic/CONFIG_RUST @@ -1 +1 @@ -# CONFIG_RUST is not set +CONFIG_RUST=y diff --git a/redhat/configs/common/generic/CONFIG_RUST_OVERFLOW_CHECKS b/redhat/configs/common/generic/CONFIG_RUST_OVERFLOW_CHECKS index blahblah..blahblah 100644 --- a/redhat/configs/common/generic/CONFIG_RUST_OVERFLOW_CHECKS +++ b/redhat/configs/common/generic/CONFIG_RUST_OVERFLOW_CHECKS @@ -1 +1 @@ -# CONFIG_RUST_OVERFLOW_CHECKS is not set +CONFIG_RUST_OVERFLOW_CHECKS=y diff --git a/redhat/configs/fedora/generic/CONFIG_RUST b/redhat/configs/fedora/generic/CONFIG_RUST deleted file mode 100644 index blahblah..blahblah 0 --- a/redhat/configs/fedora/generic/CONFIG_RUST +++ /dev/null @@ -1 +0,0 @@ -CONFIG_RUST=y diff --git a/redhat/configs/fedora/generic/CONFIG_RUST_OVERFLOW_CHECKS b/redhat/configs/fedora/generic/CONFIG_RUST_OVERFLOW_CHECKS deleted file mode 100644 index blahblah..blahblah 0 --- a/redhat/configs/fedora/generic/CONFIG_RUST_OVERFLOW_CHECKS +++ /dev/null @@ -1 +0,0 @@ -CONFIG_RUST_OVERFLOW_CHECKS=y diff --git a/redhat/configs/rhel/generic/CONFIG_EXTENDED_MODVERSIONS b/redhat/configs/rhel/generic/CONFIG_EXTENDED_MODVERSIONS index blahblah..blahblah 100644 --- a/redhat/configs/rhel/generic/CONFIG_EXTENDED_MODVERSIONS +++ b/redhat/configs/rhel/generic/CONFIG_EXTENDED_MODVERSIONS @@ -1 +1 @@ -# CONFIG_EXTENDED_MODVERSIONS is not set +CONFIG_EXTENDED_MODVERSIONS=y diff --git a/redhat/configs/rhel/generic/CONFIG_GENDWARFKSYMS b/redhat/configs/rhel/generic/CONFIG_GENDWARFKSYMS index blahblah..blahblah 100644 --- a/redhat/configs/rhel/generic/CONFIG_GENDWARFKSYMS +++ b/redhat/configs/rhel/generic/CONFIG_GENDWARFKSYMS @@ -1 +1 @@ -# CONFIG_GENDWARFKSYMS is not set +CONFIG_GENDWARFKSYMS=y diff --git a/redhat/configs/rhel/generic/CONFIG_MODVERSIONS b/redhat/configs/rhel/generic/CONFIG_MODVERSIONS index blahblah..blahblah 100644 --- a/redhat/configs/rhel/generic/CONFIG_MODVERSIONS +++ b/redhat/configs/rhel/generic/CONFIG_MODVERSIONS @@ -1 +1 @@ -CONFIG_MODVERSIONS=y +# CONFIG_MODVERSIONS is not set diff --git a/redhat/configs/rhel/generic/x86/CONFIG_SAMPLES_RUST b/redhat/configs/rhel/generic/x86/CONFIG_SAMPLES_RUST new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/rhel/generic/x86/CONFIG_SAMPLES_RUST @@ -0,0 +1 @@ +# CONFIG_SAMPLES_RUST is not set diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100644 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -690,9 +690,7 @@ Provides: installonlypkg(kernel) BuildRequires: kmod, bash, coreutils, tar, git-core, which BuildRequires: bzip2, xz, findutils, m4, perl-interpreter, perl-Carp, perl-devel, perl-generators, make, diffutils, gawk, %compression BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc, bison, flex, gcc-c++ -%if 0%{?fedora} -BuildRequires: rust, rust-src, bindgen, rustfmt -%endif +BuildRequires: rust, rust-src, bindgen, rustfmt, clippy BuildRequires: net-tools, hostname, bc, elfutils-devel BuildRequires: dwarves BuildRequires: python3
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822
From: Scott Weaver scweaver@redhat.com
redhat: enable drm panic screen with a QR code
Now that support for Rust code has been enabled, let's enable the drm panic screen and use the Rust based QR code generator.
Signed-off-by: Scott Weaver scweaver@redhat.com
diff --git a/redhat/configs/fedora/generic/CONFIG_DRM_PANIC b/redhat/configs/common/generic/CONFIG_DRM_PANIC rename from redhat/configs/fedora/generic/CONFIG_DRM_PANIC rename to redhat/configs/common/generic/CONFIG_DRM_PANIC index blahblah..blahblah 100644 --- a/redhat/configs/fedora/generic/CONFIG_DRM_PANIC +++ b/redhat/configs/common/generic/CONFIG_DRM_PANIC diff --git a/redhat/configs/fedora/generic/CONFIG_DRM_PANIC_BACKGROUND_COLOR b/redhat/configs/common/generic/CONFIG_DRM_PANIC_BACKGROUND_COLOR rename from redhat/configs/fedora/generic/CONFIG_DRM_PANIC_BACKGROUND_COLOR rename to redhat/configs/common/generic/CONFIG_DRM_PANIC_BACKGROUND_COLOR index blahblah..blahblah 100644 --- a/redhat/configs/fedora/generic/CONFIG_DRM_PANIC_BACKGROUND_COLOR +++ b/redhat/configs/common/generic/CONFIG_DRM_PANIC_BACKGROUND_COLOR diff --git a/redhat/configs/fedora/generic/CONFIG_DRM_PANIC_DEBUG b/redhat/configs/common/generic/CONFIG_DRM_PANIC_DEBUG rename from redhat/configs/fedora/generic/CONFIG_DRM_PANIC_DEBUG rename to redhat/configs/common/generic/CONFIG_DRM_PANIC_DEBUG index blahblah..blahblah 100644 --- a/redhat/configs/fedora/generic/CONFIG_DRM_PANIC_DEBUG +++ b/redhat/configs/common/generic/CONFIG_DRM_PANIC_DEBUG diff --git a/redhat/configs/fedora/generic/CONFIG_DRM_PANIC_FOREGROUND_COLOR b/redhat/configs/common/generic/CONFIG_DRM_PANIC_FOREGROUND_COLOR rename from redhat/configs/fedora/generic/CONFIG_DRM_PANIC_FOREGROUND_COLOR rename to redhat/configs/common/generic/CONFIG_DRM_PANIC_FOREGROUND_COLOR index blahblah..blahblah 100644 --- a/redhat/configs/fedora/generic/CONFIG_DRM_PANIC_FOREGROUND_COLOR +++ b/redhat/configs/common/generic/CONFIG_DRM_PANIC_FOREGROUND_COLOR diff --git a/redhat/configs/fedora/generic/CONFIG_DRM_PANIC_SCREEN_QR_CODE b/redhat/configs/common/generic/CONFIG_DRM_PANIC_SCREEN_QR_CODE rename from redhat/configs/fedora/generic/CONFIG_DRM_PANIC_SCREEN_QR_CODE rename to redhat/configs/common/generic/CONFIG_DRM_PANIC_SCREEN_QR_CODE index blahblah..blahblah 100644 --- a/redhat/configs/fedora/generic/CONFIG_DRM_PANIC_SCREEN_QR_CODE +++ b/redhat/configs/common/generic/CONFIG_DRM_PANIC_SCREEN_QR_CODE diff --git a/redhat/configs/fedora/generic/CONFIG_DRM_PANIC_SCREEN_QR_VERSION b/redhat/configs/common/generic/CONFIG_DRM_PANIC_SCREEN_QR_VERSION rename from redhat/configs/fedora/generic/CONFIG_DRM_PANIC_SCREEN_QR_VERSION rename to redhat/configs/common/generic/CONFIG_DRM_PANIC_SCREEN_QR_VERSION index blahblah..blahblah 100644 --- a/redhat/configs/fedora/generic/CONFIG_DRM_PANIC_SCREEN_QR_VERSION +++ b/redhat/configs/common/generic/CONFIG_DRM_PANIC_SCREEN_QR_VERSION diff --git a/redhat/configs/rhel/generic/CONFIG_DRM_PANIC b/redhat/configs/rhel/generic/CONFIG_DRM_PANIC deleted file mode 100644 index blahblah..blahblah 0 --- a/redhat/configs/rhel/generic/CONFIG_DRM_PANIC +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_DRM_PANIC is not set diff --git a/redhat/configs/rhel/generic/CONFIG_DRM_PANIC_SCREEN b/redhat/configs/rhel/generic/CONFIG_DRM_PANIC_SCREEN new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/rhel/generic/CONFIG_DRM_PANIC_SCREEN @@ -0,0 +1 @@ +CONFIG_DRM_PANIC_SCREEN="qr_code" diff --git a/redhat/configs/rhel/generic/CONFIG_DRM_PANIC_SCREEN_QR_CODE_URL b/redhat/configs/rhel/generic/CONFIG_DRM_PANIC_SCREEN_QR_CODE_URL new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/rhel/generic/CONFIG_DRM_PANIC_SCREEN_QR_CODE_URL @@ -0,0 +1 @@ +CONFIG_DRM_PANIC_SCREEN_QR_CODE_URL=""
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822
From: Waiman Long on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822#note_2447423...
This will change the way kABI works. @ckalina, are you OK with this change?
From: Čestmír Kalina on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822#note_2450464...
We agreed on making kABI changes w/ Scott, e.g., enabling gendwarfksyms, changing RH_KABI_* macros, etc., in ark, so I am fine with this landing assuming we can control when it hits centos-stream.
From: Rafael Aquini on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822#note_2450506...
@scweaver This might be a dumb question, but I'll shoot it anyway: does enabling rust code in the kernel require any crash (more analysis tool) changes for proper support?
From: Rafael Aquini on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822#note_2450506...
@scweaver This might be a dumb question, but I'll ask it anyway: Does enabling Rust code in the kernel require any crash (more analysis tool) changes for proper support?
From: Rafael Aquini on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822#note_2450506...
@scweaver This might be a dumb question, but I'll ask it anyway: Does enabling Rust code in the kernel require any crash (vmcore analysis tool) changes for proper support?
From: Waiman Long on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822#note_2450545...
As Cestmir has no issue from the kABI perspective, I am fine with this change.
From: Nico Pache on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822#note_2450565...
I guess its that time to start syncing Fedora and the next ELN, and time to buy a Rust book :face_exhaling:
From: Scott Weaver on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822#note_2450567...
Hi @raquini, Not a dumb question at all. I believe that it does require an update. I was told that kdump works fine with modules written in Rust but that the Rust code in the dump couldn't be analyzed.
From: Rafael Aquini on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822#note_2450596...
OK, thanks for the quick response! Let us be sure we have the Debug folks weighing into this MR before merging it, then! Also, let's get @hertonrk-rh feedback, as he's maintaining the loadable modules subsystem for RHEL.
From: Rafael Aquini on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822#note_2450596...
OK, thanks for the quick response! Let us be sure we have the Debug/Kexec folks (@baoquan_he @lijiang1 @liutgnu @lzampier @piliu @prudo1) weighing into this MR before merging it, then! Also, let's get @hertonrk-rh feedback, as he's maintaining the loadable modules subsystem for RHEL.
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822#note_2450853...
This does not look right, MODVERSIONS needs to be enabled (=y) and EXTENDED_MODVERSIONS depends on it.
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822#note_2450856...
The changes looks ok except for the MODVERSIONS=n change that I commented. This only looks to have impact in module versioning and KABI, and if @ckalina is ok with the changes then I think it's fine. rh_kabi support will need to be updated to be used with the new gendwarfksyms which is required with rust modules, so if Cestmir/others are going to take a look at it should be fine.
From: Tao Liu on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822#note_2450878...
Thanks for the notification! Frankly I'm unsure of the rust impact to crash utility, because we haven't recieved any rust related cases against crash both upstream and redhat internal. I suspect the reason is that rust hasn't been widely used among kernel. There are a few places in crash which deals with C style symbols, such as providing gdb with a function or an address, asking gdb to disassemble it, and analyzing its outputs. Since the symbol style differs for C and rust, I guess there will be failings. In addition, I see there is rust-gdb, which has a wrapper above gdb for pretty-printing of rust variables, and I guess the wrapper will be somehow needed in crash. So there are plenty of jobs to do before we claim rust is fully supported in crash.
However, I'm not object to rust enablement in kernel. In fact, our team had already set goals relating to this topic, it is expected that more rust bugs/features will coming in, and I'm happy to work on the improvement in crash. Let's see if other people have insights. @lijiang1 @prudo1
From: Čestmír Kalina on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822#note_2450900...
@hertonrk-rh We need changes in rh_kabi.h and gendwarfksyms first which don't depend on MODVERSIONS, so I don't object to disabling it for the time being, if it helps. As I said above, rust enablement shouldn't be ported to cs before the kABI bits incl. the proper configs are in place.
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3822#note_2450903...
Yes if disabling it for now is necessary for some reason I'm also ok, but would like to hear if that's the case/the reason for it.
kernel@lists.fedoraproject.org