Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configs: add CONFIG_CRYPTO_NHPOLY1305_NEON=m #6594

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

plumbeo
Copy link
Contributor

@plumbeo plumbeo commented Jan 9, 2025

Enable nhpoly1305_neon module to speed up Adiantum disk encryption.

@plumbeo
Copy link
Contributor Author

plumbeo commented Jan 9, 2025

When Adiantum was enabled (issue #3648) the CONFIG_CRYPTO_NHPOLY1305_NEON option, which significantly speeds up the encryption/decryption speed, was overlooked.

On a Raspberry Pi 3B tests with cryptsetup benchmark -c xchacha12,aes-adiantum -s 256 with the current 6.6.62 64bit kernel (rebuilt from the original linux_6.6.62-1+rpt1 source package) show a 20% improvement:

encryption/decryption speed (average of 5 runs)

governor        w/o nhpoly1305_neon     w/ nhpoly1305_neon      improvement
powersave       61.7/61.7               74.8/74.7               1.21x
performance     118.3/118.4             142.2/142.1             1.20x

The option doesn't select anything else (the only diff between the config files is CONFIG_CRYPTO_NHPOLY1305_NEON=m) and the new nhpoly1305-neon.ko.xz module's size is only 2.2kb so the impact on users who don't set up Adiantum encryption is minimal.

Can the option be enabled on all kernels?

@plumbeo plumbeo force-pushed the enable-nhpoly1305-neon branch from 0bd193f to c9c2307 Compare January 9, 2025 10:40
@pelwell
Copy link
Contributor

pelwell commented Jan 9, 2025

BCM2835 has no NEON support, and if you use your bcmrpi_defconfig you'll find that CONFIG_CRYPTO_NHPOLY1305_NEON=m does not stick.

Enable nhpoly1305_neon module to speed up Adiantum disk encryption.
@plumbeo plumbeo force-pushed the enable-nhpoly1305-neon branch from c9c2307 to 86098da Compare January 9, 2025 10:58
@plumbeo
Copy link
Contributor Author

plumbeo commented Jan 9, 2025

BCM2835 has no NEON support, and if you use your bcmrpi_defconfig you'll find that CONFIG_CRYPTO_NHPOLY1305_NEON=m does not stick.

I didn't notice that, sorry. I force pushed a new version of the patch that only touches arch/arm/configs/{bcm2709_defconfig,bcm2711_defconfig} and arch/arm64/configs/{bcm2711_defconfig,bcm2712_defconfig,bcmrpi3_defconfig}, is that ok?

@pelwell
Copy link
Contributor

pelwell commented Jan 9, 2025

That looks better. I'll just let the auto-builds complete before merging. Don't worry about the checkpatch Signed-off-by error - all the config patches get squashed together.

@pelwell pelwell merged commit 14c5fee into raspberrypi:rpi-6.6.y Jan 9, 2025
11 of 12 checks passed
@plumbeo
Copy link
Contributor Author

plumbeo commented Jan 9, 2025

Thank you! Do you need a separate PR for 6.12.y/6.13.y or will the commit be picked up from this branch later?

@pelwell
Copy link
Contributor

pelwell commented Jan 9, 2025

It will be automatically forward-ported.

popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Jan 9, 2025
See: raspberrypi/linux#6579

kernel: BCM2711, BCM2712 and RP1 UARTs are r1p5
See: raspberrypi/linux#6587

kernel: IMX415 support - rpi-6.6.y
See: raspberrypi/linux#6582

kernel: PCI: brcmstb: don't use ASPM state defines for register bits
See: raspberrypi/linux#6588

kernel: allo-piano-dac-plus: Trial patches for the second part of issue 6527
See: raspberrypi/linux#6590

kernel: configs: add CONFIG_CRYPTO_NHPOLY1305_NEON=m
See: raspberrypi/linux#6594
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Jan 10, 2025
See: raspberrypi/linux#6579

kernel: BCM2711, BCM2712 and RP1 UARTs are r1p5
See: raspberrypi/linux#6587

kernel: IMX415 support - rpi-6.6.y
See: raspberrypi/linux#6582

kernel: PCI: brcmstb: don't use ASPM state defines for register bits
See: raspberrypi/linux#6588

kernel: allo-piano-dac-plus: Trial patches for the second part of issue 6527
See: raspberrypi/linux#6590

kernel: configs: add CONFIG_CRYPTO_NHPOLY1305_NEON=m
See: raspberrypi/linux#6594
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.

2 participants