Skip to content

Kernel 6.18#381

Open
mgsharm wants to merge 7 commits intobottlerocket-os:developfrom
mgsharm:kernel-6-18
Open

Kernel 6.18#381
mgsharm wants to merge 7 commits intobottlerocket-os:developfrom
mgsharm:kernel-6-18

Conversation

@mgsharm
Copy link
Contributor

@mgsharm mgsharm commented Mar 3, 2026

Issue number:

Closes #382

Description of changes:

Commit 1: Add kernel-6.18 package

  • Add packages/kernel-6.18/ with spec, kernel configs, bootconfig, and GPG key
  • Add config-microcode-6-18 for x86_64 microcode support
  • Add kernel-6.18 to workspace and kit build dependencies
  • Update latest-kernel-full-config.sh to handle kernel 6.18

Commit 2: Add Bottlerocket patches for kernel 6.18

Patches carried forward and regenerated from kernel-6.12:

  • 1001: Makefile prepare target for external modules (adjusted context for 6.18)
  • 1002: Revert kbuild hide tools from external builds
  • 1003: INITRAMFS_FORCE unlink from CMDLINE options
  • 1004: af_unix increase default max_dgram_qlen to 512
  • 1005: Select DRM prerequisites for GPU drivers (Kconfig moved from drm/tiny to drm/sysfb in 6.18)
  • 1006: Disable EFI measurement of kernel command line

Patches dropped (not applicable to 6.18):

  • 0001: Wireguard threaded NAPI revert (6.12-specific regression fix)
  • 1005: Lustre cast fix (already fixed in the AL2023 6.18 SRPM Lustre sources)
  • 1007: strscpy fix (already upstreamed in 6.18)

Commit 3: Add kmod-6.18-nvidia-r580 package

  • Add NVIDIA r580 kernel module package for kernel 6.18
  • Includes Tesla, Grid, and Open GPU module configurations

Commit 4: Add neuron driver support for kernel 6.18

  • Add AWS Neuron driver support for both inf1 (v2.21.37.0) and inf2/trn1 (v2.26.5.0)
  • Fix struct mempool rename conflict with kernel 6.18's include/linux/mempool.h
  • Fix MODULE_IMPORT_NS macro to use string argument for kernel 6.13+ (inf1 driver only)
  • Add driverdog configs, systemd services, and tmpfiles for both driver versions

Commit 5: Add kmod-6.18-efa package

  • Add EFA kernel module package for kernel 6.18, modeled after kmod-6.12-efa

Commit 6: Add VMware bootconfig support for kernel 6.18

  • Add bootconfig-vmware.conf and bootconfig-vmware subpackage to kernel-6.18 spec
  • Add conditional Requires for VMware platform

Commit 7: Add FIPS support for kernel 6.18

  • Add FIPS module lists for x86_64 and aarch64, updated for kernel 6.18 crypto subsystem changes
  • Add check-fips-modules drop-in template
  • FIPS certification is not yet available; the fips image feature is blocked via Conflicts in the spec

FIPS module list changes from kernel 6.12

Several arch-specific crypto implementations were refactored into built-in library code in kernel 6.18 and no longer register as loadable modules.

x86_64 (42 → 38 modules)

Removed module 6.12 config 6.18 replacement
crct10dif CRYPTO_CRCT10DIF=y CRC_T10DIF=y + CRC_T10DIF_ARCH=y
sha1-ssse3 CRYPTO_SHA1_SSSE3=y CRYPTO_LIB_SHA1_ARCH=y
sha256-ssse3 CRYPTO_SHA256_SSSE3=y CRYPTO_LIB_SHA256_ARCH=y
sha512-ssse3 CRYPTO_SHA512_SSSE3=y CRYPTO_LIB_SHA512_ARCH=y

aarch64 (50 → 44 modules)

Removed module 6.12 config 6.18 replacement
crct10dif CRYPTO_CRCT10DIF=y CRC_T10DIF=y + CRC_T10DIF_ARCH=y
sha1-ce CRYPTO_SHA1_ARM64_CE=m CRYPTO_LIB_SHA1_ARCH=y
sha2-ce CRYPTO_SHA2_ARM64_CE=y CRYPTO_LIB_SHA256_ARCH=y
sha256-arm64 CRYPTO_SHA256_ARM64=y CRYPTO_LIB_SHA256_ARCH=y
sha512-arm64 CRYPTO_SHA512_ARM64=y CRYPTO_LIB_SHA512_ARCH=y
sha512-ce CRYPTO_SHA512_ARM64_CE=y CRYPTO_LIB_SHA512_ARCH=y

The config mappings and module counts all check out.

Testing done:

  • Instances boot with kernel 6.18 on Bottlerocket variant
  • Built kernel-6.18 and kmod-6.18-nvidia-r580 packages successfully
  • NVIDIA driver loads and GPU is detected (nvidia-smi confirms)
  • Ran NVIDIA workload and MIG tests
  • SELinux enforcing with no AVC denials
  • Neuron driver loads on inf1 and inf2 instances (neuron-ls confirms devices)
  • Ran aws-k8s-tester neuron tests on both inf1 and inf2
Details
          Welcome to Bottlerocket's control container!
    ╱╲
   ╱┄┄╲   This container gives you access to the Bottlerocket API,
   │▗▖│   which in turn lets you inspect and configure the system.
  ╱│  │╲  You'll probably want to use the `apiclient` tool for that;
  │╰╮╭╯│  for example, to inspect the system:
    ╹╹
             apiclient -u /settings

You can run `apiclient --help` for usage details, and check the main
Bottlerocket documentation for descriptions of all settings and examples of
changing them.

If you need to debug the system further, you can use the admin container.  The
admin container has more debugging tools installed and allows you to get root
access to the host.  The easiest way to get started is like this, which enables
and enters the admin container using apiclient:

   enter-admin-container

You can also access the admin container through SSH if you have network access.
Just enable the container like this, then SSH to the host:

   enable-admin-container

You can disable the admin container like this:

   disable-admin-container

- Kernel version on booted Bottlerocket instance
[ssm-user@control]$ uname -r
6.18.8
[ssm-user@control]$
  • Nvidia SMI
bash-5.2# nvidia-smi
Mon Mar  2 23:57:58 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.126.09             Driver Version: 580.126.09     CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  Tesla T4                       On  |   00000000:00:1E.0 Off |                    0 |
| N/A   28C    P8              9W /   70W |       0MiB /  15360MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+
  • Inf1
bash-5.2# lspci -vvv | grep -i neuron -A 20 -B 5
        Capabilities: [b0] MSI-X: Enable+ Count=3 Masked-
                Vector table: BAR=0 offset=00002000
                PBA: BAR=0 offset=00003000
        Kernel driver in use: nvme

00:1f.0 System peripheral: Amazon.com, Inc. NeuronDevice (Inferentia) (rev 01)
        Physical Slot: 31
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 11
        Region 0: Memory at c0000000 (32-bit, non-prefetchable) [size=8M]
        Region 1: Memory at c1000000 (32-bit, non-prefetchable) [size=64K]
        Region 2: Memory at 100200000000 (64-bit, prefetchable) [size=512M]
        Region 4: Memory at 100000000000 (64-bit, prefetchable) [size=8G]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [70] Express (v2) Endpoint, IntMsgNum 0
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 0W TEE-IO-
                DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq-
                        RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ FLReset-
                        MaxPayload 256 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 16GT/s, Width x4, ASPM not supported
--
                         EqualizationPhase2+ EqualizationPhase3+ LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: Upstream Port, FltMode-
        Capabilities: [b0] MSI-X: Enable- Count=8 Masked-
                Vector table: BAR=1 offset=00000000
                PBA: BAR=1 offset=00008000
        Kernel driver in use: neuron-driver
  • Inf2
bash-5.2# lspci -vvv | grep -i neuron -A 20 -B 5
        Capabilities: [b0] MSI-X: Enable+ Count=3 Masked-
                Vector table: BAR=0 offset=00002000
                PBA: BAR=0 offset=00003000
        Kernel driver in use: nvme

00:1f.0 System peripheral: Amazon.com, Inc. NeuronDevice (Inferentia2)
        Physical Slot: 31
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 11
        Region 0: Memory at 100800000000 (64-bit, prefetchable) [size=1G]
        Region 2: Memory at c0488000 (32-bit, non-prefetchable) [size=8K]
        Region 4: Memory at 100000000000 (64-bit, prefetchable) [size=32G]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [70] Express (v2) Endpoint, IntMsgNum 0
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 75W TEE-IO-
                DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq-
                        RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ FLReset-
                        MaxPayload 256 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 32GT/s, Width x8, ASPM not supported
                        ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
--
                         EqualizationPhase2+ EqualizationPhase3+ LinkEqualizationRequest-
                         Retimer+ 2Retimers- CrosslinkRes: Upstream Port, FltMode-
        Capabilities: [b0] MSI-X: Enable- Count=8 Masked-
                Vector table: BAR=2 offset=00000000
                PBA: BAR=2 offset=00001000
        Kernel driver in use: neuron-driver
  • EFA
bash-5.2# systemctl status load-efa-modules.service
● load-efa-modules.service - Load EFA modules
     Loaded: loaded (/x86_64-bottlerocket-linux-gnu/sys-root/usr/lib/systemd/system/load-efa-modules.service; enabled; preset: enabled)
    Drop-In: /x86_64-bottlerocket-linux-gnu/sys-root/usr/lib/systemd/system/service.d
             └─00-aws-config.conf
     Active: active (exited) since Thu 2026-03-05 22:22:06 UTC; 5min ago
 Invocation: f7adc04a938349ad87ee9a6433fe9f6e
   Main PID: 13693 (code=exited, status=0/SUCCESS)
   Mem peak: 2.4M
        CPU: 21ms

Mar 05 22:22:06 localhost systemd[1]: Starting Load EFA modules...
Mar 05 22:22:06 localhost systemd[1]: Finished Load EFA modules.

bash-5.2# lspci | grep EFA
10:1b.0 Ethernet controller: Amazon.com, Inc. Elastic Fabric Adapter (EFA)

bash-5.2# modinfo efa
filename:       /lib/modules/6.18.8/updates/drivers/amazon/net/efa/efa.ko
description:    Elastic Fabric Adapter (EFA)
license:        Dual BSD/GPL
author:         Amazon.com, Inc. or its affiliates
softdep:        pre: ib_uverbs
version:        3.0.0g
srcversion:     07789AC73F98EF744EDAD6F
alias:          pci:v00001D0Fd0000EFA3sv*sd*bc*sc*i*
alias:          pci:v00001D0Fd0000EFA2sv*sd*bc*sc*i*
alias:          pci:v00001D0Fd0000EFA1sv*sd*bc*sc*i*
alias:          pci:v00001D0Fd0000EFA0sv*sd*bc*sc*i*
depends:        ib_uverbs,ib_core
name:           efa
retpoline:      Y
vermagic:       6.18.8 SMP preempt mod_unload modversions

bash-5.2# systemctl list-units | grep load-efa-modules.service
  load-efa-modules.service                                                          loaded active     exited       Load EFA modules

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@mgsharm mgsharm requested review from arnaldo2792 and yeazelm March 3, 2026 00:03
@mgsharm mgsharm force-pushed the kernel-6-18 branch 5 times, most recently from abeb8e1 to 8ab2924 Compare March 7, 2026 00:25
Comment on lines +1 to +22
From ad5267161a6294f3dc5b64319a85ca435a3058d5 Mon Sep 17 00:00:00 2001
From: Ben Cressey <bcressey@amazon.com>
Date: Tue, 18 Oct 2022 22:24:52 +0000
Subject: [PATCH] initramfs: unlink INITRAMFS_FORCE from CMDLINE_{EXTEND,FORCE}

The motivation given in cff75e0b6fe83 for tying INITRAMFS_FORCE to
either of CMDLINE_{EXTEND,FORCE} was that these options imply an
inflexible bootloader, and that overriding the initramfs image would
also only be necessary for inflexible bootloaders.

However, with the advent of Boot Config support, distributions that do
not normally use an initramfs may still want to allow an "initrd" to be
passed by the bootloader in order to accept boot configuration data. In
such cases, the CMDLINE_{EXTEND,FORCE} options are not desired because
the bootloader is actually expected to control the kernel command line.

Unlinking the INITRAMFS_FORCE config option allows Boot Config data to
be passed by the bootloader while still preventing an unexpected
initramfs from overriding the built-in initramfs (if any).

Signed-off-by: Ben Cressey <bcressey@amazon.com>
Signed-off-by: Gaurav Sharma <mgsharm@amazon.com>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch doesn't seem to have had any changes.

You don't need to add your sign-off if the patch applied cleanly and you didn't have to modify anything. If you do change something, it lets people know to blame you instead of me if the change was bad.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update other patches as well.

Comment on lines +3 to +4
# compress arm64 kernels
CONFIG_EFI_ZBOOT=y
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've removed these lines - why?

# ARM64-specific crypto acceleration
CONFIG_CRYPTO_SHA2_ARM64_CE=y
CONFIG_CRYPTO_SHA512_ARM64_CE=y

What can we replace them with to assert that hardware-accelerated SHA-2 is still available for both aarch64 and x86_64? This is significant for dm-verity performance.

Copy link
Contributor Author

@mgsharm mgsharm Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These config symbols no longer exist in kernel 6.18. They were removed as part of Architecture-optimized SHA-256 library API refactoring (merged for 6.18), which converts arch-optimized SHA implementations from crypto_shash to the library API. The hardware-accelerated SHA is now provided through CONFIG_CRYPTO_LIB_SHA256_ARCH and CONFIG_CRYPTO_LIB_SHA512_ARCH, defined in lib/crypto/Kconfig with default y for ARM64. These are already present in config-full-bottlerocket-aarch64 — no explicit setting is needed in the arch-specific config file.

Comment on lines +1 to +4
# Architecture-specific configurations for x86_64

# x86_64-specific EFI support
CONFIG_EFI_MIXED=y
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've removed these lines - why?

# x86_64-specific crypto acceleration
CONFIG_CRYPTO_SHA256_SSSE3=y
CONFIG_CRYPTO_SHA512_SSSE3=y

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the aarch64 case — these config symbols no longer exist in kernel 6.18. They were removed as part of the same refactoring. The replacements CONFIG_CRYPTO_LIB_SHA256_ARCH and CONFIG_CRYPTO_LIB_SHA512_ARCH are defined in lib/crypto/Kconfig with default y for X86_64, and are already present in config-full-bottlerocket-x86_64.

sha1
sha224
sha256
sha384
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you generate these files? The commit message would be a reasonable place to document that.

@mgsharm mgsharm force-pushed the kernel-6-18 branch 6 times, most recently from 30757de to f8988d1 Compare March 10, 2026 15:16
mgsharm added 7 commits March 10, 2026 15:27
Add kernel-6.18 package based on AL2023 SRPM kernel6.18-6.18.8-9.213.
Includes spec, kernel configs, microcode config, bootconfig, GPG key,
and workspace/kit Cargo.toml entries.

Signed-off-by: Gaurav Sharma <mgsharm@amazon.com>
Add Bottlerocket-specific patches for kernel 6.18, carried forward
from 6.12:

- 1001: Makefile prepare target for external modules (adjusted for 6.18)
- 1002: Revert hiding tools/ build targets from external module builds
- 1003: Unlink INITRAMFS_FORCE from CMDLINE_{EXTEND,FORCE}
- 1004: Increase default max_dgram_qlen to 512
- 1005: Select DRM prerequisites for GPU drivers (adjusted for 6.18)
- 1006: Don't measure kernel command line into PCR8

Signed-off-by: Gaurav Sharma <mgsharm@amazon.com>
Add NVIDIA R580 (580.126.09) kernel module package for 6.18, based on
kmod-6.12-nvidia-r580. Includes Tesla, Grid, and open GPU module
variants with associated services and configuration files.

Signed-off-by: Gaurav Sharma <mgsharm@amazon.com>
Add Neuron driver support for kernel 6.18, based on kernel-6.12.
Includes SRPM discovery scripts, module loading services for inf1 and
latest hardware, and configuration files.

Signed-off-by: Gaurav Sharma <mgsharm@amazon.com>
Add EFA (Elastic Fabric Adapter) kernel module package for 6.18,
based on kmod-6.12-efa. Includes spec, CMake overlay, module loading
service, and workspace/kit Cargo.toml entries.

Signed-off-by: Gaurav Sharma <mgsharm@amazon.com>
Add VMware bootconfig and corresponding spec entries for kernel 6.18,
based on kernel-6.12.

Signed-off-by: Gaurav Sharma <mgsharm@amazon.com>
Add FIPS module lists and check-fips-modules drop-in template for
kernel 6.18. Lists were derived from kernel-6.12 fipsmodules, removing
modules that no longer exist due to the crypto library restructuring
(e.g. sha2-ce, sha256-ssse3 replaced by CRYPTO_LIB_SHA*_ARCH).

FIPS certification is not yet available for this kernel; the fips
image feature is blocked via Conflicts in the spec.

Signed-off-by: Gaurav Sharma <mgsharm@amazon.com>
@mgsharm mgsharm changed the title [WIP] Kernel 6.18 Kernel 6.18 Mar 10, 2026
@mgsharm mgsharm marked this pull request as ready for review March 10, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add kernel 6.18 support

2 participants