# git rev-parse -q --verify 877ccce7cbe8409256616f5e6bdedb08ce2e82db^{commit} 877ccce7cbe8409256616f5e6bdedb08ce2e82db already have revision, skipping fetch # git checkout -q -f -B kisskb 877ccce7cbe8409256616f5e6bdedb08ce2e82db # git clean -qxdf # < git log -1 # commit 877ccce7cbe8409256616f5e6bdedb08ce2e82db # Author: Ondrej Mosnacek # Date: Fri Aug 3 13:37:50 2018 +0200 # # crypto: x86/aegis,morus - Fix and simplify CPUID checks # # It turns out I had misunderstood how the x86_match_cpu() function works. # It evaluates a logical OR of the matching conditions, not logical AND. # This caused the CPU feature checks for AEGIS to pass even if only SSE2 # (but not AES-NI) was supported (or vice versa), leading to potential # crashes if something tried to use the registered algs. # # This patch switches the checks to a simpler method that is used e.g. in # the Camellia x86 code. # # The patch also removes the MODULE_DEVICE_TABLE declarations which # actually seem to cause the modules to be auto-loaded at boot, which is # not desired. The crypto API on-demand module loading is sufficient. # # Fixes: 1d373d4e8e15 ("crypto: x86 - Add optimized AEGIS implementations") # Fixes: 6ecc9d9ff91f ("crypto: x86 - Add optimized MORUS implementations") # Signed-off-by: Ondrej Mosnacek # Tested-by: Milan Broz # Signed-off-by: Herbert Xu # < /opt/cross/kisskb/gcc-4.6.3-nolibc/x86_64-linux/bin/x86_64-linux-gcc --version # < git log --format=%s --max-count=1 877ccce7cbe8409256616f5e6bdedb08ce2e82db # < make -s -j 40 ARCH=x86_64 O=/kisskb/build/crypto_x86_64-allnoconfig_x86_64 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/x86_64-linux/bin/x86_64-linux- allnoconfig # make -s -j 40 ARCH=x86_64 O=/kisskb/build/crypto_x86_64-allnoconfig_x86_64 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/x86_64-linux/bin/x86_64-linux- /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:183:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/arch/x86/kernel/apic/io_apic.c: In function 'mp_map_pin_to_irq': /kisskb/src/arch/x86/kernel/apic/io_apic.c:1033:6: warning: 'irq' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/arch/x86/kernel/e820.c: In function 'e820__setup_pci_gap': /kisskb/src/arch/x86/kernel/e820.c:650:16: warning: 'gapstart' may be used uninitialized in this function [-Wuninitialized] Completed OK # rm -rf /kisskb/build/crypto_x86_64-allnoconfig_x86_64 # Build took: 0:00:11.051682