From 1bbbe3ebbce253f179a8c387f54a65bf8b832f74 Mon Sep 17 00:00:00 2001 From: David McKinney Date: Wed, 8 Jul 2020 10:42:25 -0400 Subject: [PATCH] Mega update of poky, kernel, Gnome 3.36 --- .gitmodules | 3 + meta-citadel/conf/bblayers.conf.sample | 1 + meta-citadel/conf/layer.conf | 3 +- .../citadel-config/citadel-config.bb | 10 +- .../gsettings/90_citadel.gschema.override | 2 +- ....service => sway-session-switcher.service} | 2 +- .../systemd/x11-session-switcher.service | 17 + .../recipes-citadel/images/citadel-image.inc | 2 +- .../packagegroup-citadel-base.bb | 3 +- .../packagegroups/packagegroup-desktop.bb | 1 - .../packagegroups/packagegroup-gnome.bb | 6 +- .../networkmanager/networkmanager_%.bbappend | 2 +- .../base-files/base-files_%.bbappend | 7 +- .../recipes-core/base-files/files/profile | 32 + .../systemd/systemd-conf_%.bbappend | 2 + .../systemd/systemd/50-udev-default.rules | 91 + .../recipes-core/systemd/systemd_%.bbappend | 8 + ...ash-to-panel_19.bb => dash-to-panel_37.bb} | 4 +- ...ss_8.%.bbappend => gcc-cross_9.%.bbappend} | 0 ...-initrd_241.bb => systemd-initrd_243.2.bb} | 0 ...ernel_5.2.9.bb => citadel-kernel_5.6.2.bb} | 9 +- .../citadel-kernel/files/0117-WireGuard.patch | 51396 ---------------- .../citadel-kernel/files/defconfig | 635 +- .../efibootmgr/efibootmgr_17.bb | 2 +- .../0001-efivar-fix-for-cross-compile.patch | 32 - ...04-fix-unknow-option-for-gold-linker.patch | 35 - .../allow-multi-definitions-for-native.patch | 36 - ...ix-compile-failure-with-host-gcc-4.6.patch | 43 - .../efivar/efivar/no-werror.patch | 18 + .../recipes-support/efivar/efivar_37.bb | 45 +- .../{udisks2_2.7.8.bb => udisks2_git.bb} | 18 +- .../wireguard-tools_0.0.20191219.bb | 27 + .../wireguard-tools_1.0.20200319.bb | 27 + .../wireguard-tools/wireguard.inc | 16 + .../xdg-dbus-proxy/xdg-dbus-proxy_0.1.1.bb | 4 +- meta-clang | 1 + meta-gnome/conf/layer.conf | 2 +- ...001-Remove-config-dir-from-unit-file.patch | 21 + .../recipes-connectivity/iwd/iwd_1.7.bb | 56 + .../networkmanager/files/NetworkManager.conf | 8 + ...ttings-settings-property-documentati.patch | 23 +- .../networkmanager/networkmanager.initd | 110 + .../networkmanager/networkmanager_1.16.0.bb | 143 - .../networkmanager/networkmanager_1.22.10.bb | 170 + .../cbindgen/cbindgen_0.8.7.bb | 82 + .../recipes-devtools/meson/meson_%.bbappend | 6 +- meta-gnome/recipes-devtools/yasm/yasm_git.bb | 22 + .../accountsservice/accountsservice_0.6.55.bb | 22 + .../colord/colord-native.bb | 64 + ...n-cd_icc_create_from_edid-to-avoid-u.patch | 166 + .../colord/colord-native/Makefile | 48 + .../recipes-freedesktop/colord/colord.bb | 44 + .../recipes-freedesktop/colord/colord.inc | 13 + ...Run-native-cd_idt8-cd_create_profile.patch | 59 + .../colord/colord_1.4.4.bb | 36 - .../polkit/polkit-gnome_0.105.bb | 4 +- .../0003-make-netgroup-support-optional.patch | 232 + .../{polkit_0.115.bb => polkit_0.116.bb} | 19 +- .../recipes-gnome/atk/at-spi2-atk_2.34.2.bb | 19 + .../recipes-gnome/atk/at-spi2-core_2.36.0.bb | 36 + meta-gnome/recipes-gnome/atk/atk_2.36.0.bb | 21 + .../recipes-gnome/dconf/dconf_0.36.0.bb | 24 + ...ectly-set-internal-vapi-dependencies.patch | 45 + meta-gnome/recipes-gnome/gcr/gcr_3.28.1.bb | 32 - meta-gnome/recipes-gnome/gcr/gcr_3.36.0.bb | 32 + .../0001-Ensure-pam-file-installation.patch | 48 + meta-gnome/recipes-gnome/gdm/gdm_3.31.91.bb | 43 - meta-gnome/recipes-gnome/gdm/gdm_3.34.1.bb | 75 + .../gjs/0001-Fix-tests-that-cannot-run.patch | 63 + meta-gnome/recipes-gnome/gjs/gjs_1.64.2.bb | 24 + ...-Do-not-ignore-return-value-of-write.patch | 39 + ...t-write-bindir-into-pkg-config-files.patch | 61 + ...0001-Fix-DATADIRNAME-on-uclibc-Linux.patch | 34 + ...-gio-querymodules-as-libexec_PROGRAM.patch | 27 + ...ng-about-deprecated-paths-in-schemas.patch | 43 + ...-correctly-when-building-with-mingw3.patch | 95 + ...ces.c-comment-out-a-build-host-only-.patch | 27 + ...on-Run-atomics-test-on-clang-as-well.patch | 31 + ...dcode-python-path-into-various-tools.patch | 46 + ...-GSource-iterator-if-iteration-can-m.patch | 43 + ...-memory-leaks-and-memory-corruption-.patch | 109 + ...e-mutex-unlocking-in-destructor-righ.patch | 36 + ...ble-more-tests-while-cross-compiling.patch | 121 + .../glib-2.0/glib-2.0/meson.cross.d/common | 3 + .../glib-2.0/meson.cross.d/common-glibc | 5 + .../glib-2.0/meson.cross.d/common-linux | 5 + .../glib-2.0/meson.cross.d/common-mingw | 6 + .../glib-2.0/meson.cross.d/common-musl | 6 + .../glib-2.0/glib-2.0/relocate-modules.patch | 50 + .../recipes-gnome/glib-2.0/glib-2.0/run-ptest | 9 + .../recipes-gnome/glib-2.0/glib-2.0_2.62.4.bb | 53 + meta-gnome/recipes-gnome/glib-2.0/glib.inc | 199 + ...001-Add-meson-option-to-pass-sysroot.patch | 45 + ...s-for-Citadel-and-disabling-GOA-CUPS.patch | 460 + ...e-GOA-CUPS-and-User-Accounts-optional.old} | 0 ...nneeded-panels-make-GOA-CUPS-optional.orig | 502 + ....patch => 0001-Remove-unneeded-panels.old} | 0 .../gnome-control-center_3.32.0.1.bb | 51 - .../gnome-control-center_3.36.3.bb | 77 + ...ktop_3.32.0.bb => gnome-desktop_3.36.2.bb} | 7 +- .../gnome-keyring/gnome-keyring_3.31.91.bb | 23 - .../gnome-keyring/gnome-keyring_3.36.0.bb | 45 + ...USB-protection-add-systemd-to-.deskt.patch | 62 + .../gnome-session/gnome-session_3.31.4.bb | 25 - .../gnome-session/gnome-session_3.36.0.bb | 38 + .../0001-Disable-gsd-sharing-plugin.patch | 10 +- ...sable-power-tests-and-USB-protection.patch | 77 + ...2.0.bb => gnome-settings-daemon_3.36.0.bb} | 19 +- ...001-Remove-calendar-server-fix-build.patch | 100 + .../gnome-shell/gnome-shell_3.32.1.bb | 46 - .../gnome-shell/gnome-shell_3.36.2.bb | 64 + ...nal_3.32.0.bb => gnome-terminal_3.36.2.bb} | 19 +- .../0001-Fix-build-reproducibility.patch | 50 + ...t-cross-compilation-support-to-meson.patch | 163 + ...pository-directory-for-native-builds.patch | 76 + ...scanner-add-a-lib-dirs-envvar-option.patch | 70 + ...-error-return-codes-from-ldd-wrapper.patch | 28 + ...d-disable-tests-when-cross-compiling.patch | 26 + ...canner-add-use-binary-wrapper-option.patch | 49 + ...scanner-add-a-use-ldd-wrapper-option.patch | 45 + ...g-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch | 39 + .../gobject-introspection_1.62.0.bb | 209 + .../gsettings-desktop-schemas_3.36.1.bb | 20 + meta-gnome/recipes-gnome/gtk+/gtk+3.inc | 159 + .../gtk+/gtk+3/0001-Hardcoded-libtool.patch | 47 + ...t-try-to-initialize-GL-without-libGL.patch | 57 + ...-Add-disable-opengl-configure-option.patch | 872 + .../gtk+/gtk+3/link_fribidi.patch | 19 + .../gtk+/gtk+3/sort-resources.patch | 19 + .../recipes-gnome/gtk+/gtk+3_3.24.14.bad | 20 + .../recipes-gnome/gtk+/gtk+3_3.24.20.bb | 20 + .../gvfs/{gvfs_1.40.1.bb => gvfs_1.44.1.bb} | 8 +- .../recipes-gnome/mutter/mutter_3.32.1.bb | 27 - .../recipes-gnome/mutter/mutter_3.36.2.bb | 102 + .../recipes-gnome/nautilus/nautilus_3.36.2.bb | 29 + ...18.bb => network-manager-applet_1.8.24.bb} | 4 +- meta-gnome/recipes-gnome/rest/rest_0.8.1.bb | 2 +- meta-gnome/recipes-gnome/vte/vte_0.56.0.bb | 29 - meta-gnome/recipes-gnome/vte/vte_0.60.3.bb | 57 + .../wayland/libinput/determinism.patch | 21 + .../recipes-gnome/wayland/libinput_1.15.2.bb | 40 + .../recipes-gnome/wayland/mtdev_1.1.6.bb | 18 + .../wayland/wayland-protocols_1.20.bb | 22 + ...build-Fix-strndup-detection-on-MinGW.patch | 39 + ...missing-dependencies-on-protocol-hea.patch | 115 + ...hardcode-the-path-to-wayland-scanner.patch | 26 + ...-the-native-wayland-scanner-directly.patch | 27 + .../recipes-gnome/wayland/wayland/run-ptest | 17 + .../recipes-gnome/wayland/wayland_1.18.0.bad | 62 + .../recipes-gnome/wayland/weston-init.bb | 59 + .../wayland/weston-init/71-weston-drm.rules | 2 + .../recipes-gnome/wayland/weston-init/init | 53 + .../wayland/weston-init/qemuall/weston.ini | 2 + .../wayland/weston-init/qemux86-64/weston.ini | 0 .../wayland/weston-init/qemux86/weston.ini | 0 .../wayland/weston-init/weston-start | 82 + .../wayland/weston-init/weston.env | 0 .../wayland/weston-init/weston.ini | 75 + .../wayland/weston-init/weston@.service | 15 + ...ovide-a-default-version-that-doesn-t.patch | 198 + .../wayland/weston/weston.desktop | 9 + .../recipes-gnome/wayland/weston/weston.png | Bin 0 -> 2383 bytes .../wayland/weston/xwayland.weston-start | 7 + .../recipes-gnome/wayland/weston_8.0.0.bb | 112 + .../recipes-gnome/zenity/zenity_3.30.0.bb | 2 +- .../recipes-support/clutter/clutter-1.0.inc | 48 + ...ypes-as-it-is-build-configuration-sp.patch | 143 + .../clutter-1.0/install-examples.patch | 19 + .../run-installed-tests-with-tap-output.patch | 30 + .../clutter/clutter-1.0/run-ptest | 3 + .../clutter/clutter-1.0_1.26.4.bb | 11 + .../clutter/clutter-gst-3.0.inc | 17 + ...binary-needed-for-core-image-clutter.patch | 33 + .../clutter/clutter-gst-3.0_3.0.27.bb | 7 + .../clutter/clutter-gtk-1.0.inc | 18 + ...iable-for-enabling-disabling-introsp.patch | 37 + .../clutter/clutter-gtk-1.0_1.8.4.bb | 7 + meta-gnome/recipes-support/cogl/cogl-1.0.inc | 80 + .../recipes-support/cogl/cogl-1.0_1.22.6.bb | 6 + meta-gnome/recipes-support/ell/ell_0.31.bb | 22 + .../graphene/graphene_1.10.0.bb | 39 + .../ibus/0001-strip-out-dbus-build-dep.patch | 11 +- ...0002-decorate-automake-for-valaflags.patch | 19 +- .../0003-use-wayland-display-on-wayland.patch | 62 + .../ibus/{ibus_1.5.19.bb => ibus_1.5.22.bb} | 17 +- .../libinput/libinput/determinism.patch | 21 + .../libinput/libinput/run-ptest | 153 + .../libinput/libinput_1.15.5.bb | 50 + ...do-not-create-python-environment-new.patch | 2 +- .../mozjs/avoid-running-autoconf2.13.patch | 30 + .../mozjs/pre-generated-old-configure.patch | 9047 +++ .../recipes-support/mozjs/mozjs_60.2.3.bb | 2 +- .../mozjs68/0001-Yocto-build-fixes.patch | 156 + ...do-not-create-python-environment-new.patch | 74 + .../0002-do-not-include-requireddefines.patch | 19 + .../0003-fix-coredump-caused-by-getenv.patch | 21 + .../0004-new-fix-cannot-find-link.patch | 22 + ...utoconf-213-to-refresh-old-configure.patch | 45 + .../mozjs68/avoid-running-autoconf2.13.patch | 30 + .../mozjs68/pre-generated-old-configure.patch | 9047 +++ .../recipes-support/mozjs68/mozjs68_68.4.2.bb | 114 + .../unicode-ucd/unicode-ucd_12.1.0.bb | 25 + .../xserver-xorg-cvt-native_1.20.5.bb | 41 + realmfs-builder/realmfs-modules/apt-cacher-ng | 2 +- 204 files changed, 27537 insertions(+), 52312 deletions(-) rename meta-citadel/recipes-citadel/citadel-config/files/systemd/{session-switcher.service => sway-session-switcher.service} (92%) create mode 100644 meta-citadel/recipes-citadel/citadel-config/files/systemd/x11-session-switcher.service rename {meta-gnome => meta-citadel}/recipes-connectivity/networkmanager/networkmanager_%.bbappend (90%) create mode 100644 meta-citadel/recipes-core/base-files/files/profile create mode 100644 meta-citadel/recipes-core/systemd/systemd/50-udev-default.rules rename meta-citadel/recipes-desktop/dash-to-panel/{dash-to-panel_19.bb => dash-to-panel_37.bb} (71%) rename meta-citadel/recipes-devtools/gcc/{gcc-cross_8.%.bbappend => gcc-cross_9.%.bbappend} (100%) rename meta-citadel/recipes-initrd/systemd-initrd/{systemd-initrd_241.bb => systemd-initrd_243.2.bb} (100%) rename meta-citadel/recipes-kernel/citadel-kernel/{citadel-kernel_5.2.9.bb => citadel-kernel_5.6.2.bb} (82%) delete mode 100644 meta-citadel/recipes-kernel/citadel-kernel/files/0117-WireGuard.patch delete mode 100644 meta-citadel/recipes-support/efivar/efivar/0001-efivar-fix-for-cross-compile.patch delete mode 100644 meta-citadel/recipes-support/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch delete mode 100644 meta-citadel/recipes-support/efivar/efivar/allow-multi-definitions-for-native.patch delete mode 100644 meta-citadel/recipes-support/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch create mode 100644 meta-citadel/recipes-support/efivar/efivar/no-werror.patch rename meta-citadel/recipes-support/udisks/{udisks2_2.7.8.bb => udisks2_git.bb} (68%) create mode 100644 meta-citadel/recipes-support/wireguard-tools/wireguard-tools_0.0.20191219.bb create mode 100644 meta-citadel/recipes-support/wireguard-tools/wireguard-tools_1.0.20200319.bb create mode 100644 meta-citadel/recipes-support/wireguard-tools/wireguard.inc create mode 160000 meta-clang create mode 100644 meta-gnome/recipes-connectivity/iwd/iwd/0001-Remove-config-dir-from-unit-file.patch create mode 100644 meta-gnome/recipes-connectivity/iwd/iwd_1.7.bb create mode 100644 meta-gnome/recipes-connectivity/networkmanager/files/NetworkManager.conf create mode 100644 meta-gnome/recipes-connectivity/networkmanager/networkmanager/networkmanager.initd delete mode 100644 meta-gnome/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb create mode 100644 meta-gnome/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb create mode 100644 meta-gnome/recipes-devtools/cbindgen/cbindgen_0.8.7.bb create mode 100644 meta-gnome/recipes-devtools/yasm/yasm_git.bb create mode 100644 meta-gnome/recipes-freedesktop/accountsservice/accountsservice_0.6.55.bb create mode 100644 meta-gnome/recipes-freedesktop/colord/colord-native.bb create mode 100644 meta-gnome/recipes-freedesktop/colord/colord-native/0001-Move-the-function-cd_icc_create_from_edid-to-avoid-u.patch create mode 100644 meta-gnome/recipes-freedesktop/colord/colord-native/Makefile create mode 100644 meta-gnome/recipes-freedesktop/colord/colord.bb create mode 100644 meta-gnome/recipes-freedesktop/colord/colord.inc create mode 100644 meta-gnome/recipes-freedesktop/colord/colord/0001-Run-native-cd_idt8-cd_create_profile.patch delete mode 100644 meta-gnome/recipes-freedesktop/colord/colord_1.4.4.bb create mode 100644 meta-gnome/recipes-freedesktop/polkit/polkit/0003-make-netgroup-support-optional.patch rename meta-gnome/recipes-freedesktop/polkit/{polkit_0.115.bb => polkit_0.116.bb} (80%) create mode 100644 meta-gnome/recipes-gnome/atk/at-spi2-atk_2.34.2.bb create mode 100644 meta-gnome/recipes-gnome/atk/at-spi2-core_2.36.0.bb create mode 100644 meta-gnome/recipes-gnome/atk/atk_2.36.0.bb create mode 100644 meta-gnome/recipes-gnome/dconf/dconf_0.36.0.bb create mode 100644 meta-gnome/recipes-gnome/gcr/gcr/0001-meson.build-correctly-set-internal-vapi-dependencies.patch delete mode 100644 meta-gnome/recipes-gnome/gcr/gcr_3.28.1.bb create mode 100644 meta-gnome/recipes-gnome/gcr/gcr_3.36.0.bb create mode 100644 meta-gnome/recipes-gnome/gdm/files/0001-Ensure-pam-file-installation.patch delete mode 100644 meta-gnome/recipes-gnome/gdm/gdm_3.31.91.bb create mode 100644 meta-gnome/recipes-gnome/gdm/gdm_3.34.1.bb create mode 100644 meta-gnome/recipes-gnome/gjs/gjs/0001-Fix-tests-that-cannot-run.patch create mode 100644 meta-gnome/recipes-gnome/gjs/gjs_1.64.2.bb create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0011-GMainContext-Fix-GSource-iterator-if-iteration-can-m.patch create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0012-GMainContext-Fix-memory-leaks-and-memory-corruption-.patch create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common-glibc create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common-linux create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common-mingw create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common-musl create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/relocate-modules.patch create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0/run-ptest create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib-2.0_2.62.4.bb create mode 100644 meta-gnome/recipes-gnome/glib-2.0/glib.inc create mode 100644 meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Add-meson-option-to-pass-sysroot.patch create mode 100644 meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Add-options-for-Citadel-and-disabling-GOA-CUPS.patch rename meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/{0001-Make-GOA-CUPS-and-User-Accounts-optional.patch => 0001-Make-GOA-CUPS-and-User-Accounts-optional.old} (100%) create mode 100644 meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Remove-unneeded-panels-make-GOA-CUPS-optional.orig rename meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/{0001-Remove-unneeded-panels.patch => 0001-Remove-unneeded-panels.old} (100%) delete mode 100644 meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_3.32.0.1.bb create mode 100644 meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_3.36.3.bb rename meta-gnome/recipes-gnome/gnome-desktop/{gnome-desktop_3.32.0.bb => gnome-desktop_3.36.2.bb} (75%) delete mode 100644 meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_3.31.91.bb create mode 100644 meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_3.36.0.bb create mode 100644 meta-gnome/recipes-gnome/gnome-session/gnome-session/0001-Disable-sharing-USB-protection-add-systemd-to-.deskt.patch delete mode 100644 meta-gnome/recipes-gnome/gnome-session/gnome-session_3.31.4.bb create mode 100644 meta-gnome/recipes-gnome/gnome-session/gnome-session_3.36.0.bb create mode 100644 meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon/0001-Disable-power-tests-and-USB-protection.patch rename meta-gnome/recipes-gnome/gnome-settings-daemon/{gnome-settings-daemon_3.32.0.bb => gnome-settings-daemon_3.36.0.bb} (59%) create mode 100644 meta-gnome/recipes-gnome/gnome-shell/gnome-shell/0001-Remove-calendar-server-fix-build.patch delete mode 100644 meta-gnome/recipes-gnome/gnome-shell/gnome-shell_3.32.1.bb create mode 100644 meta-gnome/recipes-gnome/gnome-shell/gnome-shell_3.36.2.bb rename meta-gnome/recipes-gnome/gnome-terminal/{gnome-terminal_3.32.0.bb => gnome-terminal_3.36.2.bb} (50%) create mode 100644 meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-Fix-build-reproducibility.patch create mode 100644 meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-Port-cross-compilation-support-to-meson.patch create mode 100644 meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch create mode 100644 meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch create mode 100644 meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch create mode 100644 meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-disable-tests-when-cross-compiling.patch create mode 100644 meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch create mode 100644 meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch create mode 100644 meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch create mode 100644 meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb create mode 100644 meta-gnome/recipes-gnome/gsettings-desktop-schema/gsettings-desktop-schemas_3.36.1.bb create mode 100644 meta-gnome/recipes-gnome/gtk+/gtk+3.inc create mode 100644 meta-gnome/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch create mode 100644 meta-gnome/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch create mode 100644 meta-gnome/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch create mode 100644 meta-gnome/recipes-gnome/gtk+/gtk+3/link_fribidi.patch create mode 100644 meta-gnome/recipes-gnome/gtk+/gtk+3/sort-resources.patch create mode 100644 meta-gnome/recipes-gnome/gtk+/gtk+3_3.24.14.bad create mode 100644 meta-gnome/recipes-gnome/gtk+/gtk+3_3.24.20.bb rename meta-gnome/recipes-gnome/gvfs/{gvfs_1.40.1.bb => gvfs_1.44.1.bb} (87%) delete mode 100644 meta-gnome/recipes-gnome/mutter/mutter_3.32.1.bb create mode 100644 meta-gnome/recipes-gnome/mutter/mutter_3.36.2.bb create mode 100644 meta-gnome/recipes-gnome/nautilus/nautilus_3.36.2.bb rename meta-gnome/recipes-gnome/network-manager-applet/{network-manager-applet_1.8.18.bb => network-manager-applet_1.8.24.bb} (79%) delete mode 100644 meta-gnome/recipes-gnome/vte/vte_0.56.0.bb create mode 100644 meta-gnome/recipes-gnome/vte/vte_0.60.3.bb create mode 100644 meta-gnome/recipes-gnome/wayland/libinput/determinism.patch create mode 100644 meta-gnome/recipes-gnome/wayland/libinput_1.15.2.bb create mode 100644 meta-gnome/recipes-gnome/wayland/mtdev_1.1.6.bb create mode 100644 meta-gnome/recipes-gnome/wayland/wayland-protocols_1.20.bb create mode 100644 meta-gnome/recipes-gnome/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch create mode 100644 meta-gnome/recipes-gnome/wayland/wayland/0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch create mode 100644 meta-gnome/recipes-gnome/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch create mode 100644 meta-gnome/recipes-gnome/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch create mode 100644 meta-gnome/recipes-gnome/wayland/wayland/run-ptest create mode 100644 meta-gnome/recipes-gnome/wayland/wayland_1.18.0.bad create mode 100644 meta-gnome/recipes-gnome/wayland/weston-init.bb create mode 100644 meta-gnome/recipes-gnome/wayland/weston-init/71-weston-drm.rules create mode 100644 meta-gnome/recipes-gnome/wayland/weston-init/init create mode 100644 meta-gnome/recipes-gnome/wayland/weston-init/qemuall/weston.ini create mode 100644 meta-gnome/recipes-gnome/wayland/weston-init/qemux86-64/weston.ini create mode 100644 meta-gnome/recipes-gnome/wayland/weston-init/qemux86/weston.ini create mode 100755 meta-gnome/recipes-gnome/wayland/weston-init/weston-start create mode 100644 meta-gnome/recipes-gnome/wayland/weston-init/weston.env create mode 100644 meta-gnome/recipes-gnome/wayland/weston-init/weston.ini create mode 100644 meta-gnome/recipes-gnome/wayland/weston-init/weston@.service create mode 100644 meta-gnome/recipes-gnome/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch create mode 100644 meta-gnome/recipes-gnome/wayland/weston/weston.desktop create mode 100644 meta-gnome/recipes-gnome/wayland/weston/weston.png create mode 100644 meta-gnome/recipes-gnome/wayland/weston/xwayland.weston-start create mode 100644 meta-gnome/recipes-gnome/wayland/weston_8.0.0.bb create mode 100644 meta-gnome/recipes-support/clutter/clutter-1.0.inc create mode 100644 meta-gnome/recipes-support/clutter/clutter-1.0/0001-Remove-clutter.types-as-it-is-build-configuration-sp.patch create mode 100644 meta-gnome/recipes-support/clutter/clutter-1.0/install-examples.patch create mode 100644 meta-gnome/recipes-support/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch create mode 100644 meta-gnome/recipes-support/clutter/clutter-1.0/run-ptest create mode 100644 meta-gnome/recipes-support/clutter/clutter-1.0_1.26.4.bb create mode 100644 meta-gnome/recipes-support/clutter/clutter-gst-3.0.inc create mode 100644 meta-gnome/recipes-support/clutter/clutter-gst-3.0/0001-Install-example-binary-needed-for-core-image-clutter.patch create mode 100644 meta-gnome/recipes-support/clutter/clutter-gst-3.0_3.0.27.bb create mode 100644 meta-gnome/recipes-support/clutter/clutter-gtk-1.0.inc create mode 100644 meta-gnome/recipes-support/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch create mode 100644 meta-gnome/recipes-support/clutter/clutter-gtk-1.0_1.8.4.bb create mode 100644 meta-gnome/recipes-support/cogl/cogl-1.0.inc create mode 100644 meta-gnome/recipes-support/cogl/cogl-1.0_1.22.6.bb create mode 100644 meta-gnome/recipes-support/ell/ell_0.31.bb create mode 100644 meta-gnome/recipes-support/graphene/graphene_1.10.0.bb create mode 100644 meta-gnome/recipes-support/ibus/ibus/0003-use-wayland-display-on-wayland.patch rename meta-gnome/recipes-support/ibus/{ibus_1.5.19.bb => ibus_1.5.22.bb} (81%) create mode 100644 meta-gnome/recipes-support/libinput/libinput/determinism.patch create mode 100644 meta-gnome/recipes-support/libinput/libinput/run-ptest create mode 100644 meta-gnome/recipes-support/libinput/libinput_1.15.5.bb create mode 100644 meta-gnome/recipes-support/mozjs/mozjs/avoid-running-autoconf2.13.patch create mode 100644 meta-gnome/recipes-support/mozjs/mozjs/pre-generated-old-configure.patch create mode 100644 meta-gnome/recipes-support/mozjs68/mozjs68/0001-Yocto-build-fixes.patch create mode 100644 meta-gnome/recipes-support/mozjs68/mozjs68/0001-do-not-create-python-environment-new.patch create mode 100644 meta-gnome/recipes-support/mozjs68/mozjs68/0002-do-not-include-requireddefines.patch create mode 100644 meta-gnome/recipes-support/mozjs68/mozjs68/0003-fix-coredump-caused-by-getenv.patch create mode 100644 meta-gnome/recipes-support/mozjs68/mozjs68/0004-new-fix-cannot-find-link.patch create mode 100644 meta-gnome/recipes-support/mozjs68/mozjs68/0005-do-not-use-autoconf-213-to-refresh-old-configure.patch create mode 100644 meta-gnome/recipes-support/mozjs68/mozjs68/avoid-running-autoconf2.13.patch create mode 100644 meta-gnome/recipes-support/mozjs68/mozjs68/pre-generated-old-configure.patch create mode 100644 meta-gnome/recipes-support/mozjs68/mozjs68_68.4.2.bb create mode 100644 meta-gnome/recipes-support/unicode-ucd/unicode-ucd_12.1.0.bb create mode 100644 meta-gnome/recipes-support/xserver-xorg-cvt/xserver-xorg-cvt-native_1.20.5.bb diff --git a/.gitmodules b/.gitmodules index 128ae86..cfb7da2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "meta-intel"] path = meta-intel url = https://git.yoctoproject.org/git/meta-intel +[submodule "meta-clang"] + path = meta-clang + url = https://github.com/kraj/meta-clang diff --git a/meta-citadel/conf/bblayers.conf.sample b/meta-citadel/conf/bblayers.conf.sample index 0960ccc..840a9bc 100644 --- a/meta-citadel/conf/bblayers.conf.sample +++ b/meta-citadel/conf/bblayers.conf.sample @@ -11,4 +11,5 @@ BBLAYERS ?= " \ ##OEROOT##/../meta-rust \ ##OEROOT##/../meta-citadel \ ##OEROOT##/../meta-gnome \ + ##OEROOT##/../meta-clang \ " diff --git a/meta-citadel/conf/layer.conf b/meta-citadel/conf/layer.conf index beff7f8..c85372d 100644 --- a/meta-citadel/conf/layer.conf +++ b/meta-citadel/conf/layer.conf @@ -5,13 +5,14 @@ BBPATH =. "${LAYERDIR}:" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ ${LAYERDIR}/recipes-*/*/*.bbappend" +BBMASK += "meta-intel/dynamic-layers/clang-layer/recipes-devtools/clang/llvm-project-source.bbappend" LICENSE_PATH += "${LAYERDIR}/licenses" BBFILE_COLLECTIONS += "citadel" BBFILE_PATTERN_citadel = "^${LAYERDIR}/" BBFILE_PRIORITY_citadel = "5" -LAYERSERIES_COMPAT_citadel = "thud warrior" +LAYERSERIES_COMPAT_citadel = "thud warrior zeus" # This should only be incremented on significant changes that will # cause compatibility issues with other layers diff --git a/meta-citadel/recipes-citadel/citadel-config/citadel-config.bb b/meta-citadel/recipes-citadel/citadel-config/citadel-config.bb index bf620dc..65bb572 100644 --- a/meta-citadel/recipes-citadel/citadel-config/citadel-config.bb +++ b/meta-citadel/recipes-citadel/citadel-config/citadel-config.bb @@ -49,7 +49,8 @@ SRC_URI = "\ file://iptables-flush.sh \ file://systemd/zram-swap.service \ file://systemd/iptables.service \ - file://systemd/session-switcher.service \ + file://systemd/sway-session-switcher.service \ + file://systemd/x11-session-switcher.service \ file://systemd/citadel-setpassword.service \ file://skel/profile \ file://skel/bashrc \ @@ -68,11 +69,11 @@ USERADD_PARAM_${PN} = "-m -u 1000 -s /bin/bash citadel" INHIBIT_PACKAGE_DEBUG_SPLIT = "1" # for citadel-ifconfig.sh citadel-setpassword.sh -RDEPENDS_${PN} = "bash" +RDEPENDS_${PN} = "bash wireless-regdb-static" inherit allarch systemd useradd -SYSTEMD_SERVICE_${PN} = "zram-swap.service watch-run-user.path iptables.service session-switcher.service citadel-setpassword.service" +SYSTEMD_SERVICE_${PN} = "zram-swap.service watch-run-user.path iptables.service sway-session-switcher.service x11-session-switcher.service citadel-setpassword.service" do_install() { install -m 0755 -d ${D}/storage @@ -104,7 +105,8 @@ do_install() { install -m 644 ${WORKDIR}/systemd/zram-swap.service ${D}${systemd_system_unitdir} install -m 644 ${WORKDIR}/systemd/iptables.service ${D}${systemd_system_unitdir} - install -m 644 ${WORKDIR}/systemd/session-switcher.service ${D}${systemd_system_unitdir} + install -m 644 ${WORKDIR}/systemd/sway-session-switcher.service ${D}${systemd_system_unitdir} + install -m 644 ${WORKDIR}/systemd/x11-session-switcher.service ${D}${systemd_system_unitdir} install -m 644 ${WORKDIR}/systemd/citadel-setpassword.service ${D}${systemd_system_unitdir} install -m 644 ${WORKDIR}/systemd/watch-run-user.path ${D}${systemd_system_unitdir} diff --git a/meta-citadel/recipes-citadel/citadel-config/files/gsettings/90_citadel.gschema.override b/meta-citadel/recipes-citadel/citadel-config/files/gsettings/90_citadel.gschema.override index 72cd04a..8e8809c 100644 --- a/meta-citadel/recipes-citadel/citadel-config/files/gsettings/90_citadel.gschema.override +++ b/meta-citadel/recipes-citadel/citadel-config/files/gsettings/90_citadel.gschema.override @@ -33,7 +33,7 @@ gtk-enable-primary-paste=false clock-format='12h' [org.gnome.shell] -enabled-extensions=['dash-to-panel@jderose9.github.com', 'drive-menu@subgraph.com'] +enabled-extensions=['dash-to-panel@jderose9.github.com'] [org.gnome.shell.extensions] user-theme-name='Adapta-Eta' diff --git a/meta-citadel/recipes-citadel/citadel-config/files/systemd/session-switcher.service b/meta-citadel/recipes-citadel/citadel-config/files/systemd/sway-session-switcher.service similarity index 92% rename from meta-citadel/recipes-citadel/citadel-config/files/systemd/session-switcher.service rename to meta-citadel/recipes-citadel/citadel-config/files/systemd/sway-session-switcher.service index 2f8e00f..ff22d83 100644 --- a/meta-citadel/recipes-citadel/citadel-config/files/systemd/session-switcher.service +++ b/meta-citadel/recipes-citadel/citadel-config/files/systemd/sway-session-switcher.service @@ -1,5 +1,5 @@ [Unit] -Description=Session Switcher +Description=Sway Session Switcher After=accounts-daemon.service Wants=accounts-daemon.service diff --git a/meta-citadel/recipes-citadel/citadel-config/files/systemd/x11-session-switcher.service b/meta-citadel/recipes-citadel/citadel-config/files/systemd/x11-session-switcher.service new file mode 100644 index 0000000..4e5b135 --- /dev/null +++ b/meta-citadel/recipes-citadel/citadel-config/files/systemd/x11-session-switcher.service @@ -0,0 +1,17 @@ +[Unit] +Description=X11 Session Switcher +After=accounts-daemon.service +Wants=accounts-daemon.service + +ConditionKernelCommandLine=|citadel.x11 + +[Service] +Type=oneshot +RemainAfterExit=no + +ExecStartPre=-/usr/bin/plymouth message --text="Setting session to Gnome X11" +ExecStart=/usr/bin/busctl call org.freedesktop.Accounts /org/freedesktop/Accounts/User1000 org.freedesktop.Accounts.User SetXSession s "gnome-xorg" + +[Install] +WantedBy=graphical.target + diff --git a/meta-citadel/recipes-citadel/images/citadel-image.inc b/meta-citadel/recipes-citadel/images/citadel-image.inc index 004d2dc..e69e3c9 100644 --- a/meta-citadel/recipes-citadel/images/citadel-image.inc +++ b/meta-citadel/recipes-citadel/images/citadel-image.inc @@ -5,4 +5,4 @@ CITADEL_IMAGE_VERSION_rootfs = "1" CITADEL_IMAGE_VERSION_extra = "1" CITADEL_IMAGE_VERSION_kernel = "1" -CITADEL_KERNEL_VERSION = "5.2.9" +CITADEL_KERNEL_VERSION = "5.6.2" diff --git a/meta-citadel/recipes-citadel/packagegroups/packagegroup-citadel-base.bb b/meta-citadel/recipes-citadel/packagegroups/packagegroup-citadel-base.bb index 1238729..3971fa6 100644 --- a/meta-citadel/recipes-citadel/packagegroups/packagegroup-citadel-base.bb +++ b/meta-citadel/recipes-citadel/packagegroups/packagegroup-citadel-base.bb @@ -19,6 +19,8 @@ RDEPENDS_${PN} = "\ base-files \ base-passwd \ systemd \ + systemd-conf \ + systemd-container \ syslinux \ syslinux-extlinux \ keymaps \ @@ -42,7 +44,6 @@ RDEPENDS_${PN} = "\ tar \ pciutils \ sysfsutils \ - wpa-supplicant \ vim-tiny \ nano \ tzdata \ diff --git a/meta-citadel/recipes-citadel/packagegroups/packagegroup-desktop.bb b/meta-citadel/recipes-citadel/packagegroups/packagegroup-desktop.bb index eaedef4..712d75d 100644 --- a/meta-citadel/recipes-citadel/packagegroups/packagegroup-desktop.bb +++ b/meta-citadel/recipes-citadel/packagegroups/packagegroup-desktop.bb @@ -13,7 +13,6 @@ RDEPENDS_${PN} = "\ accountsservice \ upower \ colord \ - colord-plugins \ gdm \ plymouth \ shared-mime-info \ diff --git a/meta-citadel/recipes-citadel/packagegroups/packagegroup-gnome.bb b/meta-citadel/recipes-citadel/packagegroups/packagegroup-gnome.bb index c7d5730..50cc9ff 100644 --- a/meta-citadel/recipes-citadel/packagegroups/packagegroup-gnome.bb +++ b/meta-citadel/recipes-citadel/packagegroups/packagegroup-gnome.bb @@ -23,8 +23,12 @@ RDEPENDS_${PN} = "\ gnome-session \ gnome-shell \ hicolor-icon-theme \ + xf86-video-vesa \ + xf86-video-intel \ + xf86-video-modesetting \ + xserver-xorg-extension-glx \ + libdrm-amdgpu \ dash-to-panel \ - gnome-shell-extension-drive-menu \ citadel-config-gnome \ " diff --git a/meta-gnome/recipes-connectivity/networkmanager/networkmanager_%.bbappend b/meta-citadel/recipes-connectivity/networkmanager/networkmanager_%.bbappend similarity index 90% rename from meta-gnome/recipes-connectivity/networkmanager/networkmanager_%.bbappend rename to meta-citadel/recipes-connectivity/networkmanager/networkmanager_%.bbappend index 9c019e8..8e914b4 100644 --- a/meta-gnome/recipes-connectivity/networkmanager/networkmanager_%.bbappend +++ b/meta-citadel/recipes-connectivity/networkmanager/networkmanager_%.bbappend @@ -1,5 +1,5 @@ # Append recipe from meta-openembedded/meta-networking -PACKAGECONFIG = "gnutls dhclient systemd wifi glib" +PACKAGECONFIG = "gnutls dhclient systemd wifi" EXTRA_OECONF_remove = "--with-nmtui=yes" EXTRA_OECONF += "--disable-ovs --with-nmtui=no" diff --git a/meta-citadel/recipes-core/base-files/base-files_%.bbappend b/meta-citadel/recipes-core/base-files/base-files_%.bbappend index 0291f57..420866f 100644 --- a/meta-citadel/recipes-core/base-files/base-files_%.bbappend +++ b/meta-citadel/recipes-core/base-files/base-files_%.bbappend @@ -6,9 +6,14 @@ dirs755="/boot /dev /usr/bin /usr/sbin /usr/lib /etc /etc/default /etc/skel /usr volatiles = "" +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +SRC_URI += "file://profile" + do_install_append () { rm ${D}${sysconfdir}/fstab rm ${D}${sysconfdir}/skel/.bashrc rm ${D}${sysconfdir}/skel/.profile - + install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile + sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile + sed -i 's#@BINDIR@#${bindir}#g' ${D}${sysconfdir}/profile } diff --git a/meta-citadel/recipes-core/base-files/files/profile b/meta-citadel/recipes-core/base-files/files/profile new file mode 100644 index 0000000..1927a63 --- /dev/null +++ b/meta-citadel/recipes-core/base-files/files/profile @@ -0,0 +1,32 @@ +# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) +# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). + +PATH="/usr/local/bin:/usr/bin:/bin:/sbin" +EDITOR="vi" # needed for packages like cron, git-commit +[ "$TERM" ] || TERM="vt100" # Basic terminal capab. For screen etc. + +# Add /sbin & co to $PATH for the root user +[ "$HOME" != "ROOTHOME" ] || PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin + +# Set the prompt for bash and ash (no other shells known to be in use here) +[ -z "$PS1" ] || PS1='\u@\h:\w\$ ' + +if [ -d /etc/profile.d ]; then + for i in /etc/profile.d/*.sh; do + if [ -f $i -a -r $i ]; then + . $i + fi + done + unset i +fi + +# Make sure we are on a serial console (i.e. the device used starts with +# /dev/tty[A-z]), otherwise we confuse e.g. the eclipse launcher which tries do +# use ssh +case $(tty 2>/dev/null) in + /dev/tty[A-z]*) [ -x @BINDIR@/resize ] && @BINDIR@/resize >/dev/null;; +esac + +export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM + +umask 022 diff --git a/meta-citadel/recipes-core/systemd/systemd-conf_%.bbappend b/meta-citadel/recipes-core/systemd/systemd-conf_%.bbappend index e61f991..a4b2fca 100644 --- a/meta-citadel/recipes-core/systemd/systemd-conf_%.bbappend +++ b/meta-citadel/recipes-core/systemd/systemd-conf_%.bbappend @@ -1,4 +1,6 @@ +CONFFILES_${PN} += "${sysconfdir}/machine-id" do_install_append() { + install -d ${D}${sysconfdir} echo "a4e415feff81466c925aab34b0c35a3c" > ${D}${sysconfdir}/machine-id } diff --git a/meta-citadel/recipes-core/systemd/systemd/50-udev-default.rules b/meta-citadel/recipes-core/systemd/systemd/50-udev-default.rules new file mode 100644 index 0000000..cc439a8 --- /dev/null +++ b/meta-citadel/recipes-core/systemd/systemd/50-udev-default.rules @@ -0,0 +1,91 @@ +# do not edit this file, it will be overwritten on update + +# run a command on remove events +ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}" +ACTION=="remove", GOTO="default_end" + +SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" + +# select "system RTC" or just use the first one +SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc" +SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100" + +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb" +ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}" + +ACTION!="add", GOTO="default_end" + +SUBSYSTEM=="tty", KERNEL=="ptmx", GROUP="tty", MODE="0666" +SUBSYSTEM=="tty", KERNEL=="tty", GROUP="tty", MODE="0666" +SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620" +SUBSYSTEM=="tty", KERNEL=="sclp_line[0-9]*", GROUP="tty", MODE="0620" +SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620" +SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620" +SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty" +KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout" + +SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640" + +SUBSYSTEM=="input", GROUP="input" +SUBSYSTEM=="input", KERNEL=="js[0-9]*", MODE="0664" + +SUBSYSTEM=="video4linux", GROUP="video" +SUBSYSTEM=="graphics", GROUP="video" +SUBSYSTEM=="drm", KERNEL!="renderD*", GROUP="video" +SUBSYSTEM=="dvb", GROUP="video" +SUBSYSTEM=="media", GROUP="video" +SUBSYSTEM=="cec", GROUP="video" + +SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="video", MODE="0666" +SUBSYSTEM=="kfd", GROUP="video", MODE="0666" + +# When using static_node= with non-default permissions, also update +# tmpfiles.d/static-nodes-permissions.conf.in to keep permissions synchronized. + +SUBSYSTEM=="sound", GROUP="audio", \ + OPTIONS+="static_node=snd/seq", OPTIONS+="static_node=snd/timer" + +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664" + +SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", GROUP="video" +SUBSYSTEM=="firewire", ATTR{units}=="*0x00b09d:0x00010*", GROUP="video" +SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", GROUP="video" +SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x014001*", GROUP="video" + +KERNEL=="parport[0-9]*", GROUP="lp" +SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp" +SUBSYSTEM=="ppdev", GROUP="lp" +KERNEL=="lp[0-9]*", GROUP="lp" +KERNEL=="irlpt[0-9]*", GROUP="lp" +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp" + +SUBSYSTEM=="block", GROUP="disk" +SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="cdrom" +SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom" +KERNEL=="sch[0-9]*", GROUP="cdrom" +KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" +KERNEL=="pktcdvd", GROUP="cdrom" + +SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape" +SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk" +KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk" +KERNEL=="loop-control", GROUP="disk", OPTIONS+="static_node=loop-control" +KERNEL=="btrfs-control", GROUP="disk" +KERNEL=="rawctl", GROUP="disk" +SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", GROUP="disk" +SUBSYSTEM=="aoe", GROUP="disk", MODE="0220" +SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440" + +KERNEL=="rfkill", MODE="0664" +KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tun" + +KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse" + +# The static_node is required on s390x and ppc (they are using MODULE_ALIAS) +KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm" + +KERNEL=="udmabuf", GROUP="kvm" + +SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK += "ptp_kvm" + +LABEL="default_end" diff --git a/meta-citadel/recipes-core/systemd/systemd_%.bbappend b/meta-citadel/recipes-core/systemd/systemd_%.bbappend index 35c3204..42408f9 100644 --- a/meta-citadel/recipes-core/systemd/systemd_%.bbappend +++ b/meta-citadel/recipes-core/systemd/systemd_%.bbappend @@ -12,7 +12,15 @@ PACKAGECONFIG = "\ nss polkit randomseed seccomp timedated utmp timesyncd kmod sysusers gshadow \ " +SRC_URI += "\ + file://50-udev-default.rules \ + " + + do_install_append() { rm -f ${D}${sysconfdir}/tmpfiles.d/00-create-volatile.conf ln -s rescue.target ${D}${systemd_unitdir}/system/kbrequest.target + rm -f ${D}${libdir}/udev/rules.d/50-udev-default.rules + install -d ${D}{$libdir}/udev/rules.d + install -m 644 ${WORKDIR}/50-udev-default.rules ${D}{$libdir}/udev/rules.d/ } diff --git a/meta-citadel/recipes-desktop/dash-to-panel/dash-to-panel_19.bb b/meta-citadel/recipes-desktop/dash-to-panel/dash-to-panel_37.bb similarity index 71% rename from meta-citadel/recipes-desktop/dash-to-panel/dash-to-panel_19.bb rename to meta-citadel/recipes-desktop/dash-to-panel/dash-to-panel_37.bb index 1ab0172..adb4a47 100644 --- a/meta-citadel/recipes-desktop/dash-to-panel/dash-to-panel_19.bb +++ b/meta-citadel/recipes-desktop/dash-to-panel/dash-to-panel_37.bb @@ -1,8 +1,8 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=d791728a073bc009b4ffaf00b7599855" -SRC_URI = "git://github.com/jderose9/dash-to-panel.git;protocol=https" -SRCREV="5558eeae574e9ae7b6bf2e1b9f4aacd97f944054" +SRC_URI = "git://github.com/home-sweet-gnome/dash-to-panel.git;protocol=https" +SRCREV="50edcc7e86493017a9f34142ce7ce62f89a4547a" S = "${WORKDIR}/git" DEPENDS = "gettext-native glib-2.0-native" diff --git a/meta-citadel/recipes-devtools/gcc/gcc-cross_8.%.bbappend b/meta-citadel/recipes-devtools/gcc/gcc-cross_9.%.bbappend similarity index 100% rename from meta-citadel/recipes-devtools/gcc/gcc-cross_8.%.bbappend rename to meta-citadel/recipes-devtools/gcc/gcc-cross_9.%.bbappend diff --git a/meta-citadel/recipes-initrd/systemd-initrd/systemd-initrd_241.bb b/meta-citadel/recipes-initrd/systemd-initrd/systemd-initrd_243.2.bb similarity index 100% rename from meta-citadel/recipes-initrd/systemd-initrd/systemd-initrd_241.bb rename to meta-citadel/recipes-initrd/systemd-initrd/systemd-initrd_243.2.bb diff --git a/meta-citadel/recipes-kernel/citadel-kernel/citadel-kernel_5.2.9.bb b/meta-citadel/recipes-kernel/citadel-kernel/citadel-kernel_5.6.2.bb similarity index 82% rename from meta-citadel/recipes-kernel/citadel-kernel/citadel-kernel_5.2.9.bb rename to meta-citadel/recipes-kernel/citadel-kernel/citadel-kernel_5.6.2.bb index 4fbaf08..0c845ad 100644 --- a/meta-citadel/recipes-kernel/citadel-kernel/citadel-kernel_5.2.9.bb +++ b/meta-citadel/recipes-kernel/citadel-kernel/citadel-kernel_5.6.2.bb @@ -1,16 +1,15 @@ DESCRIPTION = "Citadel linux kernel" LICENSE = "GPLv2" SECTION = "kernel" -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" inherit kernel -SRC_URI = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.2.9.tar.xz\ - file://0117-WireGuard.patch \ +SRC_URI = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.2.tar.xz\ file://defconfig \ " -SRC_URI[md5sum] = "d7162b4421327c756b1d548204fd8fb1" -SRC_URI[sha256sum] = "b6f02a4b306ca5cd314d72615bfc2650166969613135da202630e6c4e1b5d4e6" +SRC_URI[md5sum] = "8b96e9e8eff865ff84a23b4f858dafa1" +SRC_URI[sha256sum] = "2d4d91d8329c1ed3826c61463650dd4bfbb6ad39dcee6dba4f98a7e94a67b5b9" LINUX_VERSION ?= "${PV}" S = "${WORKDIR}/linux-${LINUX_VERSION}" diff --git a/meta-citadel/recipes-kernel/citadel-kernel/files/0117-WireGuard.patch b/meta-citadel/recipes-kernel/citadel-kernel/files/0117-WireGuard.patch deleted file mode 100644 index 59b5add..0000000 --- a/meta-citadel/recipes-kernel/citadel-kernel/files/0117-WireGuard.patch +++ /dev/null @@ -1,51396 +0,0 @@ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/allowedips.c 2019-08-20 20:26:42.392341425 +0000 -@@ -0,0 +1,377 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include "allowedips.h" -+#include "peer.h" -+ -+static void swap_endian(u8 *dst, const u8 *src, u8 bits) -+{ -+ if (bits == 32) { -+ *(u32 *)dst = be32_to_cpu(*(const __be32 *)src); -+ } else if (bits == 128) { -+ ((u64 *)dst)[0] = be64_to_cpu(((const __be64 *)src)[0]); -+ ((u64 *)dst)[1] = be64_to_cpu(((const __be64 *)src)[1]); -+ } -+} -+ -+static void copy_and_assign_cidr(struct allowedips_node *node, const u8 *src, -+ u8 cidr, u8 bits) -+{ -+ node->cidr = cidr; -+ node->bit_at_a = cidr / 8U; -+#ifdef __LITTLE_ENDIAN -+ node->bit_at_a ^= (bits / 8U - 1U) % 8U; -+#endif -+ node->bit_at_b = 7U - (cidr % 8U); -+ node->bitlen = bits; -+ memcpy(node->bits, src, bits / 8U); -+} -+#define CHOOSE_NODE(parent, key) \ -+ parent->bit[(key[parent->bit_at_a] >> parent->bit_at_b) & 1] -+ -+static void node_free_rcu(struct rcu_head *rcu) -+{ -+ kfree(container_of(rcu, struct allowedips_node, rcu)); -+} -+ -+static void push_rcu(struct allowedips_node **stack, -+ struct allowedips_node __rcu *p, unsigned int *len) -+{ -+ if (rcu_access_pointer(p)) { -+ WARN_ON(IS_ENABLED(DEBUG) && *len >= 128); -+ stack[(*len)++] = rcu_dereference_raw(p); -+ } -+} -+ -+static void root_free_rcu(struct rcu_head *rcu) -+{ -+ struct allowedips_node *node, *stack[128] = { -+ container_of(rcu, struct allowedips_node, rcu) }; -+ unsigned int len = 1; -+ -+ while (len > 0 && (node = stack[--len])) { -+ push_rcu(stack, node->bit[0], &len); -+ push_rcu(stack, node->bit[1], &len); -+ kfree(node); -+ } -+} -+ -+static void root_remove_peer_lists(struct allowedips_node *root) -+{ -+ struct allowedips_node *node, *stack[128] = { root }; -+ unsigned int len = 1; -+ -+ while (len > 0 && (node = stack[--len])) { -+ push_rcu(stack, node->bit[0], &len); -+ push_rcu(stack, node->bit[1], &len); -+ if (rcu_access_pointer(node->peer)) -+ list_del(&node->peer_list); -+ } -+} -+ -+static void walk_remove_by_peer(struct allowedips_node __rcu **top, -+ struct wg_peer *peer, struct mutex *lock) -+{ -+#define REF(p) rcu_access_pointer(p) -+#define DEREF(p) rcu_dereference_protected(*(p), lockdep_is_held(lock)) -+#define PUSH(p) ({ \ -+ WARN_ON(IS_ENABLED(DEBUG) && len >= 128); \ -+ stack[len++] = p; \ -+ }) -+ -+ struct allowedips_node __rcu **stack[128], **nptr; -+ struct allowedips_node *node, *prev; -+ unsigned int len; -+ -+ if (unlikely(!peer || !REF(*top))) -+ return; -+ -+ for (prev = NULL, len = 0, PUSH(top); len > 0; prev = node) { -+ nptr = stack[len - 1]; -+ node = DEREF(nptr); -+ if (!node) { -+ --len; -+ continue; -+ } -+ if (!prev || REF(prev->bit[0]) == node || -+ REF(prev->bit[1]) == node) { -+ if (REF(node->bit[0])) -+ PUSH(&node->bit[0]); -+ else if (REF(node->bit[1])) -+ PUSH(&node->bit[1]); -+ } else if (REF(node->bit[0]) == prev) { -+ if (REF(node->bit[1])) -+ PUSH(&node->bit[1]); -+ } else { -+ if (rcu_dereference_protected(node->peer, -+ lockdep_is_held(lock)) == peer) { -+ RCU_INIT_POINTER(node->peer, NULL); -+ list_del_init(&node->peer_list); -+ if (!node->bit[0] || !node->bit[1]) { -+ rcu_assign_pointer(*nptr, DEREF( -+ &node->bit[!REF(node->bit[0])])); -+ call_rcu(&node->rcu, node_free_rcu); -+ node = DEREF(nptr); -+ } -+ } -+ --len; -+ } -+ } -+ -+#undef REF -+#undef DEREF -+#undef PUSH -+} -+ -+static unsigned int fls128(u64 a, u64 b) -+{ -+ return a ? fls64(a) + 64U : fls64(b); -+} -+ -+static u8 common_bits(const struct allowedips_node *node, const u8 *key, -+ u8 bits) -+{ -+ if (bits == 32) -+ return 32U - fls(*(const u32 *)node->bits ^ *(const u32 *)key); -+ else if (bits == 128) -+ return 128U - fls128( -+ *(const u64 *)&node->bits[0] ^ *(const u64 *)&key[0], -+ *(const u64 *)&node->bits[8] ^ *(const u64 *)&key[8]); -+ return 0; -+} -+ -+static bool prefix_matches(const struct allowedips_node *node, const u8 *key, -+ u8 bits) -+{ -+ /* This could be much faster if it actually just compared the common -+ * bits properly, by precomputing a mask bswap(~0 << (32 - cidr)), and -+ * the rest, but it turns out that common_bits is already super fast on -+ * modern processors, even taking into account the unfortunate bswap. -+ * So, we just inline it like this instead. -+ */ -+ return common_bits(node, key, bits) >= node->cidr; -+} -+ -+static struct allowedips_node *find_node(struct allowedips_node *trie, u8 bits, -+ const u8 *key) -+{ -+ struct allowedips_node *node = trie, *found = NULL; -+ -+ while (node && prefix_matches(node, key, bits)) { -+ if (rcu_access_pointer(node->peer)) -+ found = node; -+ if (node->cidr == bits) -+ break; -+ node = rcu_dereference_bh(CHOOSE_NODE(node, key)); -+ } -+ return found; -+} -+ -+/* Returns a strong reference to a peer */ -+static struct wg_peer *lookup(struct allowedips_node __rcu *root, u8 bits, -+ const void *be_ip) -+{ -+ /* Aligned so it can be passed to fls/fls64 */ -+ u8 ip[16] __aligned(__alignof(u64)); -+ struct allowedips_node *node; -+ struct wg_peer *peer = NULL; -+ -+ swap_endian(ip, be_ip, bits); -+ -+ rcu_read_lock_bh(); -+retry: -+ node = find_node(rcu_dereference_bh(root), bits, ip); -+ if (node) { -+ peer = wg_peer_get_maybe_zero(rcu_dereference_bh(node->peer)); -+ if (!peer) -+ goto retry; -+ } -+ rcu_read_unlock_bh(); -+ return peer; -+} -+ -+static bool node_placement(struct allowedips_node __rcu *trie, const u8 *key, -+ u8 cidr, u8 bits, struct allowedips_node **rnode, -+ struct mutex *lock) -+{ -+ struct allowedips_node *node = rcu_dereference_protected(trie, -+ lockdep_is_held(lock)); -+ struct allowedips_node *parent = NULL; -+ bool exact = false; -+ -+ while (node && node->cidr <= cidr && prefix_matches(node, key, bits)) { -+ parent = node; -+ if (parent->cidr == cidr) { -+ exact = true; -+ break; -+ } -+ node = rcu_dereference_protected(CHOOSE_NODE(parent, key), -+ lockdep_is_held(lock)); -+ } -+ *rnode = parent; -+ return exact; -+} -+ -+static int add(struct allowedips_node __rcu **trie, u8 bits, const u8 *key, -+ u8 cidr, struct wg_peer *peer, struct mutex *lock) -+{ -+ struct allowedips_node *node, *parent, *down, *newnode; -+ -+ if (unlikely(cidr > bits || !peer)) -+ return -EINVAL; -+ -+ if (!rcu_access_pointer(*trie)) { -+ node = kzalloc(sizeof(*node), GFP_KERNEL); -+ if (unlikely(!node)) -+ return -ENOMEM; -+ RCU_INIT_POINTER(node->peer, peer); -+ list_add_tail(&node->peer_list, &peer->allowedips_list); -+ copy_and_assign_cidr(node, key, cidr, bits); -+ rcu_assign_pointer(*trie, node); -+ return 0; -+ } -+ if (node_placement(*trie, key, cidr, bits, &node, lock)) { -+ rcu_assign_pointer(node->peer, peer); -+ list_move_tail(&node->peer_list, &peer->allowedips_list); -+ return 0; -+ } -+ -+ newnode = kzalloc(sizeof(*newnode), GFP_KERNEL); -+ if (unlikely(!newnode)) -+ return -ENOMEM; -+ RCU_INIT_POINTER(newnode->peer, peer); -+ list_add_tail(&newnode->peer_list, &peer->allowedips_list); -+ copy_and_assign_cidr(newnode, key, cidr, bits); -+ -+ if (!node) { -+ down = rcu_dereference_protected(*trie, lockdep_is_held(lock)); -+ } else { -+ down = rcu_dereference_protected(CHOOSE_NODE(node, key), -+ lockdep_is_held(lock)); -+ if (!down) { -+ rcu_assign_pointer(CHOOSE_NODE(node, key), newnode); -+ return 0; -+ } -+ } -+ cidr = min(cidr, common_bits(down, key, bits)); -+ parent = node; -+ -+ if (newnode->cidr == cidr) { -+ rcu_assign_pointer(CHOOSE_NODE(newnode, down->bits), down); -+ if (!parent) -+ rcu_assign_pointer(*trie, newnode); -+ else -+ rcu_assign_pointer(CHOOSE_NODE(parent, newnode->bits), -+ newnode); -+ } else { -+ node = kzalloc(sizeof(*node), GFP_KERNEL); -+ if (unlikely(!node)) { -+ kfree(newnode); -+ return -ENOMEM; -+ } -+ INIT_LIST_HEAD(&node->peer_list); -+ copy_and_assign_cidr(node, newnode->bits, cidr, bits); -+ -+ rcu_assign_pointer(CHOOSE_NODE(node, down->bits), down); -+ rcu_assign_pointer(CHOOSE_NODE(node, newnode->bits), newnode); -+ if (!parent) -+ rcu_assign_pointer(*trie, node); -+ else -+ rcu_assign_pointer(CHOOSE_NODE(parent, node->bits), -+ node); -+ } -+ return 0; -+} -+ -+void wg_allowedips_init(struct allowedips *table) -+{ -+ table->root4 = table->root6 = NULL; -+ table->seq = 1; -+} -+ -+void wg_allowedips_free(struct allowedips *table, struct mutex *lock) -+{ -+ struct allowedips_node __rcu *old4 = table->root4, *old6 = table->root6; -+ -+ ++table->seq; -+ RCU_INIT_POINTER(table->root4, NULL); -+ RCU_INIT_POINTER(table->root6, NULL); -+ if (rcu_access_pointer(old4)) { -+ root_remove_peer_lists(old4); -+ call_rcu(&rcu_dereference_protected(old4, -+ lockdep_is_held(lock))->rcu, root_free_rcu); -+ } -+ if (rcu_access_pointer(old6)) { -+ root_remove_peer_lists(old6); -+ call_rcu(&rcu_dereference_protected(old6, -+ lockdep_is_held(lock))->rcu, root_free_rcu); -+ } -+} -+ -+int wg_allowedips_insert_v4(struct allowedips *table, const struct in_addr *ip, -+ u8 cidr, struct wg_peer *peer, struct mutex *lock) -+{ -+ /* Aligned so it can be passed to fls */ -+ u8 key[4] __aligned(__alignof(u32)); -+ -+ ++table->seq; -+ swap_endian(key, (const u8 *)ip, 32); -+ return add(&table->root4, 32, key, cidr, peer, lock); -+} -+ -+int wg_allowedips_insert_v6(struct allowedips *table, const struct in6_addr *ip, -+ u8 cidr, struct wg_peer *peer, struct mutex *lock) -+{ -+ /* Aligned so it can be passed to fls64 */ -+ u8 key[16] __aligned(__alignof(u64)); -+ -+ ++table->seq; -+ swap_endian(key, (const u8 *)ip, 128); -+ return add(&table->root6, 128, key, cidr, peer, lock); -+} -+ -+void wg_allowedips_remove_by_peer(struct allowedips *table, -+ struct wg_peer *peer, struct mutex *lock) -+{ -+ ++table->seq; -+ walk_remove_by_peer(&table->root4, peer, lock); -+ walk_remove_by_peer(&table->root6, peer, lock); -+} -+ -+int wg_allowedips_read_node(struct allowedips_node *node, u8 ip[16], u8 *cidr) -+{ -+ const unsigned int cidr_bytes = DIV_ROUND_UP(node->cidr, 8U); -+ swap_endian(ip, node->bits, node->bitlen); -+ memset(ip + cidr_bytes, 0, node->bitlen / 8U - cidr_bytes); -+ if (node->cidr) -+ ip[cidr_bytes - 1U] &= ~0U << (-node->cidr % 8U); -+ -+ *cidr = node->cidr; -+ return node->bitlen == 32 ? AF_INET : AF_INET6; -+} -+ -+/* Returns a strong reference to a peer */ -+struct wg_peer *wg_allowedips_lookup_dst(struct allowedips *table, -+ struct sk_buff *skb) -+{ -+ if (skb->protocol == htons(ETH_P_IP)) -+ return lookup(table->root4, 32, &ip_hdr(skb)->daddr); -+ else if (skb->protocol == htons(ETH_P_IPV6)) -+ return lookup(table->root6, 128, &ipv6_hdr(skb)->daddr); -+ return NULL; -+} -+ -+/* Returns a strong reference to a peer */ -+struct wg_peer *wg_allowedips_lookup_src(struct allowedips *table, -+ struct sk_buff *skb) -+{ -+ if (skb->protocol == htons(ETH_P_IP)) -+ return lookup(table->root4, 32, &ip_hdr(skb)->saddr); -+ else if (skb->protocol == htons(ETH_P_IPV6)) -+ return lookup(table->root6, 128, &ipv6_hdr(skb)->saddr); -+ return NULL; -+} -+ -+#include "selftest/allowedips.c" ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/dst_cache/dst_cache.c 2018-06-02 16:21:38.100389985 +0000 -@@ -0,0 +1,175 @@ -+/* -+ * net/core/dst_cache.c - dst entry cache -+ * -+ * Copyright (c) 2016 Paolo Abeni -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ */ -+ -+#include -+#include -+#include -+#include -+#if IS_ENABLED(CONFIG_IPV6) -+#include -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)) || LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 50) -+static inline u32 rt6_get_cookie(const struct rt6_info *rt) -+{ -+ if ((unlikely(rt->dst.flags & DST_NOCACHE) && rt->dst.from)) -+ rt = (struct rt6_info *)(rt->dst.from); -+ -+ return rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0; -+} -+#endif -+#endif -+#include -+ -+struct dst_cache_pcpu { -+ unsigned long refresh_ts; -+ struct dst_entry *dst; -+ u32 cookie; -+ union { -+ struct in_addr in_saddr; -+ struct in6_addr in6_saddr; -+ }; -+}; -+ -+static void dst_cache_per_cpu_dst_set(struct dst_cache_pcpu *dst_cache, -+ struct dst_entry *dst, u32 cookie) -+{ -+ dst_release(dst_cache->dst); -+ if (dst) -+ dst_hold(dst); -+ -+ dst_cache->cookie = cookie; -+ dst_cache->dst = dst; -+} -+ -+static struct dst_entry *dst_cache_per_cpu_get(struct dst_cache *dst_cache, -+ struct dst_cache_pcpu *idst) -+{ -+ struct dst_entry *dst; -+ -+ dst = idst->dst; -+ if (!dst) -+ goto fail; -+ -+ /* the cache already hold a dst reference; it can't go away */ -+ dst_hold(dst); -+ -+ if (unlikely(!time_after(idst->refresh_ts, dst_cache->reset_ts) || -+ (dst->obsolete && !dst->ops->check(dst, idst->cookie)))) { -+ dst_cache_per_cpu_dst_set(idst, NULL, 0); -+ dst_release(dst); -+ goto fail; -+ } -+ return dst; -+ -+fail: -+ idst->refresh_ts = jiffies; -+ return NULL; -+} -+ -+struct dst_entry *dst_cache_get(struct dst_cache *dst_cache) -+{ -+ if (!dst_cache->cache) -+ return NULL; -+ -+ return dst_cache_per_cpu_get(dst_cache, this_cpu_ptr(dst_cache->cache)); -+} -+ -+struct rtable *dst_cache_get_ip4(struct dst_cache *dst_cache, __be32 *saddr) -+{ -+ struct dst_cache_pcpu *idst; -+ struct dst_entry *dst; -+ -+ if (!dst_cache->cache) -+ return NULL; -+ -+ idst = this_cpu_ptr(dst_cache->cache); -+ dst = dst_cache_per_cpu_get(dst_cache, idst); -+ if (!dst) -+ return NULL; -+ -+ *saddr = idst->in_saddr.s_addr; -+ return container_of(dst, struct rtable, dst); -+} -+ -+void dst_cache_set_ip4(struct dst_cache *dst_cache, struct dst_entry *dst, -+ __be32 saddr) -+{ -+ struct dst_cache_pcpu *idst; -+ -+ if (!dst_cache->cache) -+ return; -+ -+ idst = this_cpu_ptr(dst_cache->cache); -+ dst_cache_per_cpu_dst_set(idst, dst, 0); -+ idst->in_saddr.s_addr = saddr; -+} -+ -+#if IS_ENABLED(CONFIG_IPV6) -+void dst_cache_set_ip6(struct dst_cache *dst_cache, struct dst_entry *dst, -+ const struct in6_addr *addr) -+{ -+ struct dst_cache_pcpu *idst; -+ -+ if (!dst_cache->cache) -+ return; -+ -+ idst = this_cpu_ptr(dst_cache->cache); -+ dst_cache_per_cpu_dst_set(this_cpu_ptr(dst_cache->cache), dst, -+ rt6_get_cookie((struct rt6_info *)dst)); -+ idst->in6_saddr = *addr; -+} -+ -+struct dst_entry *dst_cache_get_ip6(struct dst_cache *dst_cache, -+ struct in6_addr *saddr) -+{ -+ struct dst_cache_pcpu *idst; -+ struct dst_entry *dst; -+ -+ if (!dst_cache->cache) -+ return NULL; -+ -+ idst = this_cpu_ptr(dst_cache->cache); -+ dst = dst_cache_per_cpu_get(dst_cache, idst); -+ if (!dst) -+ return NULL; -+ -+ *saddr = idst->in6_saddr; -+ return dst; -+} -+#endif -+ -+int dst_cache_init(struct dst_cache *dst_cache, gfp_t gfp) -+{ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) -+ BUG_ON(gfp & GFP_ATOMIC); -+ dst_cache->cache = alloc_percpu(struct dst_cache_pcpu); -+#else -+ dst_cache->cache = alloc_percpu_gfp(struct dst_cache_pcpu, -+ gfp | __GFP_ZERO); -+#endif -+ if (!dst_cache->cache) -+ return -ENOMEM; -+ -+ dst_cache_reset(dst_cache); -+ return 0; -+} -+ -+void dst_cache_destroy(struct dst_cache *dst_cache) -+{ -+ int i; -+ -+ if (!dst_cache->cache) -+ return; -+ -+ for_each_possible_cpu(i) -+ dst_release(per_cpu_ptr(dst_cache->cache, i)->dst); -+ -+ free_percpu(dst_cache->cache); -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/memneq/memneq.c 2018-06-02 16:21:38.100389985 +0000 -@@ -0,0 +1,170 @@ -+/* -+ * Constant-time equality testing of memory regions. -+ * -+ * Authors: -+ * -+ * James Yonan -+ * Daniel Borkmann -+ * -+ * This file is provided under a dual BSD/GPLv2 license. When using or -+ * redistributing this file, you may do so under either license. -+ * -+ * GPL LICENSE SUMMARY -+ * -+ * Copyright(c) 2013 OpenVPN Technologies, Inc. All rights reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -+ * The full GNU General Public License is included in this distribution -+ * in the file called LICENSE.GPL. -+ * -+ * BSD LICENSE -+ * -+ * Copyright(c) 2013 OpenVPN Technologies, Inc. All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * * Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * * Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in -+ * the documentation and/or other materials provided with the -+ * distribution. -+ * * Neither the name of OpenVPN Technologies nor the names of its -+ * contributors may be used to endorse or promote products derived -+ * from this software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ */ -+ -+#include -+ -+/* Make the optimizer believe the variable can be manipulated arbitrarily. */ -+#define COMPILER_OPTIMIZER_HIDE_VAR(var) asm("" : "=r" (var) : "0" (var)) -+ -+#ifndef __HAVE_ARCH_CRYPTO_MEMNEQ -+ -+/* Generic path for arbitrary size */ -+static inline unsigned long -+__crypto_memneq_generic(const void *a, const void *b, size_t size) -+{ -+ unsigned long neq = 0; -+ -+#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) -+ while (size >= sizeof(unsigned long)) { -+ neq |= *(unsigned long *)a ^ *(unsigned long *)b; -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ a += sizeof(unsigned long); -+ b += sizeof(unsigned long); -+ size -= sizeof(unsigned long); -+ } -+#endif /* CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS */ -+ while (size > 0) { -+ neq |= *(unsigned char *)a ^ *(unsigned char *)b; -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ a += 1; -+ b += 1; -+ size -= 1; -+ } -+ return neq; -+} -+ -+/* Loop-free fast-path for frequently used 16-byte size */ -+static inline unsigned long __crypto_memneq_16(const void *a, const void *b) -+{ -+ unsigned long neq = 0; -+ -+#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS -+ if (sizeof(unsigned long) == 8) { -+ neq |= *(unsigned long *)(a) ^ *(unsigned long *)(b); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned long *)(a+8) ^ *(unsigned long *)(b+8); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ } else if (sizeof(unsigned int) == 4) { -+ neq |= *(unsigned int *)(a) ^ *(unsigned int *)(b); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned int *)(a+4) ^ *(unsigned int *)(b+4); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned int *)(a+8) ^ *(unsigned int *)(b+8); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned int *)(a+12) ^ *(unsigned int *)(b+12); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ } else -+#endif /* CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS */ -+ { -+ neq |= *(unsigned char *)(a) ^ *(unsigned char *)(b); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned char *)(a+1) ^ *(unsigned char *)(b+1); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned char *)(a+2) ^ *(unsigned char *)(b+2); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned char *)(a+3) ^ *(unsigned char *)(b+3); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned char *)(a+4) ^ *(unsigned char *)(b+4); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned char *)(a+5) ^ *(unsigned char *)(b+5); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned char *)(a+6) ^ *(unsigned char *)(b+6); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned char *)(a+7) ^ *(unsigned char *)(b+7); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned char *)(a+8) ^ *(unsigned char *)(b+8); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned char *)(a+9) ^ *(unsigned char *)(b+9); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned char *)(a+10) ^ *(unsigned char *)(b+10); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned char *)(a+11) ^ *(unsigned char *)(b+11); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned char *)(a+12) ^ *(unsigned char *)(b+12); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned char *)(a+13) ^ *(unsigned char *)(b+13); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned char *)(a+14) ^ *(unsigned char *)(b+14); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ neq |= *(unsigned char *)(a+15) ^ *(unsigned char *)(b+15); -+ COMPILER_OPTIMIZER_HIDE_VAR(neq); -+ } -+ -+ return neq; -+} -+ -+/* Compare two areas of memory without leaking timing information, -+ * and with special optimizations for common sizes. Users should -+ * not call this function directly, but should instead use -+ * crypto_memneq defined in crypto/algapi.h. -+ */ -+noinline unsigned long __crypto_memneq(const void *a, const void *b, -+ size_t size) -+{ -+ switch (size) { -+ case 16: -+ return __crypto_memneq_16(a, b); -+ default: -+ return __crypto_memneq_generic(a, b, size); -+ } -+} -+ -+#endif /* __HAVE_ARCH_CRYPTO_MEMNEQ */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/siphash/siphash.c 2019-08-20 20:26:42.394341425 +0000 -@@ -0,0 +1,539 @@ -+/* Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ * -+ * This file is provided under a dual BSD/GPLv2 license. -+ * -+ * SipHash: a fast short-input PRF -+ * https://131002.net/siphash/ -+ * -+ * This implementation is specifically for SipHash2-4 for a secure PRF -+ * and HalfSipHash1-3/SipHash1-3 for an insecure PRF only suitable for -+ * hashtables. -+ */ -+ -+#include -+#include -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) -+#ifdef __LITTLE_ENDIAN -+#define bytemask_from_count(cnt) (~(~0ul << (cnt)*8)) -+#else -+#define bytemask_from_count(cnt) (~(~0ul >> (cnt)*8)) -+#endif -+#endif -+ -+#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 -+#include -+#include -+#endif -+ -+#define SIPROUND \ -+ do { \ -+ v0 += v1; v1 = rol64(v1, 13); v1 ^= v0; v0 = rol64(v0, 32); \ -+ v2 += v3; v3 = rol64(v3, 16); v3 ^= v2; \ -+ v0 += v3; v3 = rol64(v3, 21); v3 ^= v0; \ -+ v2 += v1; v1 = rol64(v1, 17); v1 ^= v2; v2 = rol64(v2, 32); \ -+ } while (0) -+ -+#define PREAMBLE(len) \ -+ u64 v0 = 0x736f6d6570736575ULL; \ -+ u64 v1 = 0x646f72616e646f6dULL; \ -+ u64 v2 = 0x6c7967656e657261ULL; \ -+ u64 v3 = 0x7465646279746573ULL; \ -+ u64 b = ((u64)(len)) << 56; \ -+ v3 ^= key->key[1]; \ -+ v2 ^= key->key[0]; \ -+ v1 ^= key->key[1]; \ -+ v0 ^= key->key[0]; -+ -+#define POSTAMBLE \ -+ v3 ^= b; \ -+ SIPROUND; \ -+ SIPROUND; \ -+ v0 ^= b; \ -+ v2 ^= 0xff; \ -+ SIPROUND; \ -+ SIPROUND; \ -+ SIPROUND; \ -+ SIPROUND; \ -+ return (v0 ^ v1) ^ (v2 ^ v3); -+ -+u64 __siphash_aligned(const void *data, size_t len, const siphash_key_t *key) -+{ -+ const u8 *end = data + len - (len % sizeof(u64)); -+ const u8 left = len & (sizeof(u64) - 1); -+ u64 m; -+ PREAMBLE(len) -+ for (; data != end; data += sizeof(u64)) { -+ m = le64_to_cpup(data); -+ v3 ^= m; -+ SIPROUND; -+ SIPROUND; -+ v0 ^= m; -+ } -+#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 -+ if (left) -+ b |= le64_to_cpu((__force __le64)(load_unaligned_zeropad(data) & -+ bytemask_from_count(left))); -+#else -+ switch (left) { -+ case 7: b |= ((u64)end[6]) << 48; -+ case 6: b |= ((u64)end[5]) << 40; -+ case 5: b |= ((u64)end[4]) << 32; -+ case 4: b |= le32_to_cpup(data); break; -+ case 3: b |= ((u64)end[2]) << 16; -+ case 2: b |= le16_to_cpup(data); break; -+ case 1: b |= end[0]; -+ } -+#endif -+ POSTAMBLE -+} -+ -+#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS -+u64 __siphash_unaligned(const void *data, size_t len, const siphash_key_t *key) -+{ -+ const u8 *end = data + len - (len % sizeof(u64)); -+ const u8 left = len & (sizeof(u64) - 1); -+ u64 m; -+ PREAMBLE(len) -+ for (; data != end; data += sizeof(u64)) { -+ m = get_unaligned_le64(data); -+ v3 ^= m; -+ SIPROUND; -+ SIPROUND; -+ v0 ^= m; -+ } -+#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 -+ if (left) -+ b |= le64_to_cpu((__force __le64)(load_unaligned_zeropad(data) & -+ bytemask_from_count(left))); -+#else -+ switch (left) { -+ case 7: b |= ((u64)end[6]) << 48; -+ case 6: b |= ((u64)end[5]) << 40; -+ case 5: b |= ((u64)end[4]) << 32; -+ case 4: b |= get_unaligned_le32(end); break; -+ case 3: b |= ((u64)end[2]) << 16; -+ case 2: b |= get_unaligned_le16(end); break; -+ case 1: b |= end[0]; -+ } -+#endif -+ POSTAMBLE -+} -+#endif -+ -+/** -+ * siphash_1u64 - compute 64-bit siphash PRF value of a u64 -+ * @first: first u64 -+ * @key: the siphash key -+ */ -+u64 siphash_1u64(const u64 first, const siphash_key_t *key) -+{ -+ PREAMBLE(8) -+ v3 ^= first; -+ SIPROUND; -+ SIPROUND; -+ v0 ^= first; -+ POSTAMBLE -+} -+ -+/** -+ * siphash_2u64 - compute 64-bit siphash PRF value of 2 u64 -+ * @first: first u64 -+ * @second: second u64 -+ * @key: the siphash key -+ */ -+u64 siphash_2u64(const u64 first, const u64 second, const siphash_key_t *key) -+{ -+ PREAMBLE(16) -+ v3 ^= first; -+ SIPROUND; -+ SIPROUND; -+ v0 ^= first; -+ v3 ^= second; -+ SIPROUND; -+ SIPROUND; -+ v0 ^= second; -+ POSTAMBLE -+} -+ -+/** -+ * siphash_3u64 - compute 64-bit siphash PRF value of 3 u64 -+ * @first: first u64 -+ * @second: second u64 -+ * @third: third u64 -+ * @key: the siphash key -+ */ -+u64 siphash_3u64(const u64 first, const u64 second, const u64 third, -+ const siphash_key_t *key) -+{ -+ PREAMBLE(24) -+ v3 ^= first; -+ SIPROUND; -+ SIPROUND; -+ v0 ^= first; -+ v3 ^= second; -+ SIPROUND; -+ SIPROUND; -+ v0 ^= second; -+ v3 ^= third; -+ SIPROUND; -+ SIPROUND; -+ v0 ^= third; -+ POSTAMBLE -+} -+ -+/** -+ * siphash_4u64 - compute 64-bit siphash PRF value of 4 u64 -+ * @first: first u64 -+ * @second: second u64 -+ * @third: third u64 -+ * @forth: forth u64 -+ * @key: the siphash key -+ */ -+u64 siphash_4u64(const u64 first, const u64 second, const u64 third, -+ const u64 forth, const siphash_key_t *key) -+{ -+ PREAMBLE(32) -+ v3 ^= first; -+ SIPROUND; -+ SIPROUND; -+ v0 ^= first; -+ v3 ^= second; -+ SIPROUND; -+ SIPROUND; -+ v0 ^= second; -+ v3 ^= third; -+ SIPROUND; -+ SIPROUND; -+ v0 ^= third; -+ v3 ^= forth; -+ SIPROUND; -+ SIPROUND; -+ v0 ^= forth; -+ POSTAMBLE -+} -+ -+u64 siphash_1u32(const u32 first, const siphash_key_t *key) -+{ -+ PREAMBLE(4) -+ b |= first; -+ POSTAMBLE -+} -+ -+u64 siphash_3u32(const u32 first, const u32 second, const u32 third, -+ const siphash_key_t *key) -+{ -+ u64 combined = (u64)second << 32 | first; -+ PREAMBLE(12) -+ v3 ^= combined; -+ SIPROUND; -+ SIPROUND; -+ v0 ^= combined; -+ b |= third; -+ POSTAMBLE -+} -+ -+#if BITS_PER_LONG == 64 -+/* Note that on 64-bit, we make HalfSipHash1-3 actually be SipHash1-3, for -+ * performance reasons. On 32-bit, below, we actually implement HalfSipHash1-3. -+ */ -+ -+#define HSIPROUND SIPROUND -+#define HPREAMBLE(len) PREAMBLE(len) -+#define HPOSTAMBLE \ -+ v3 ^= b; \ -+ HSIPROUND; \ -+ v0 ^= b; \ -+ v2 ^= 0xff; \ -+ HSIPROUND; \ -+ HSIPROUND; \ -+ HSIPROUND; \ -+ return (v0 ^ v1) ^ (v2 ^ v3); -+ -+u32 __hsiphash_aligned(const void *data, size_t len, const hsiphash_key_t *key) -+{ -+ const u8 *end = data + len - (len % sizeof(u64)); -+ const u8 left = len & (sizeof(u64) - 1); -+ u64 m; -+ HPREAMBLE(len) -+ for (; data != end; data += sizeof(u64)) { -+ m = le64_to_cpup(data); -+ v3 ^= m; -+ HSIPROUND; -+ v0 ^= m; -+ } -+#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 -+ if (left) -+ b |= le64_to_cpu((__force __le64)(load_unaligned_zeropad(data) & -+ bytemask_from_count(left))); -+#else -+ switch (left) { -+ case 7: b |= ((u64)end[6]) << 48; -+ case 6: b |= ((u64)end[5]) << 40; -+ case 5: b |= ((u64)end[4]) << 32; -+ case 4: b |= le32_to_cpup(data); break; -+ case 3: b |= ((u64)end[2]) << 16; -+ case 2: b |= le16_to_cpup(data); break; -+ case 1: b |= end[0]; -+ } -+#endif -+ HPOSTAMBLE -+} -+ -+#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS -+u32 __hsiphash_unaligned(const void *data, size_t len, -+ const hsiphash_key_t *key) -+{ -+ const u8 *end = data + len - (len % sizeof(u64)); -+ const u8 left = len & (sizeof(u64) - 1); -+ u64 m; -+ HPREAMBLE(len) -+ for (; data != end; data += sizeof(u64)) { -+ m = get_unaligned_le64(data); -+ v3 ^= m; -+ HSIPROUND; -+ v0 ^= m; -+ } -+#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 -+ if (left) -+ b |= le64_to_cpu((__force __le64)(load_unaligned_zeropad(data) & -+ bytemask_from_count(left))); -+#else -+ switch (left) { -+ case 7: b |= ((u64)end[6]) << 48; -+ case 6: b |= ((u64)end[5]) << 40; -+ case 5: b |= ((u64)end[4]) << 32; -+ case 4: b |= get_unaligned_le32(end); break; -+ case 3: b |= ((u64)end[2]) << 16; -+ case 2: b |= get_unaligned_le16(end); break; -+ case 1: b |= end[0]; -+ } -+#endif -+ HPOSTAMBLE -+} -+#endif -+ -+/** -+ * hsiphash_1u32 - compute 64-bit hsiphash PRF value of a u32 -+ * @first: first u32 -+ * @key: the hsiphash key -+ */ -+u32 hsiphash_1u32(const u32 first, const hsiphash_key_t *key) -+{ -+ HPREAMBLE(4) -+ b |= first; -+ HPOSTAMBLE -+} -+ -+/** -+ * hsiphash_2u32 - compute 32-bit hsiphash PRF value of 2 u32 -+ * @first: first u32 -+ * @second: second u32 -+ * @key: the hsiphash key -+ */ -+u32 hsiphash_2u32(const u32 first, const u32 second, const hsiphash_key_t *key) -+{ -+ u64 combined = (u64)second << 32 | first; -+ HPREAMBLE(8) -+ v3 ^= combined; -+ HSIPROUND; -+ v0 ^= combined; -+ HPOSTAMBLE -+} -+ -+/** -+ * hsiphash_3u32 - compute 32-bit hsiphash PRF value of 3 u32 -+ * @first: first u32 -+ * @second: second u32 -+ * @third: third u32 -+ * @key: the hsiphash key -+ */ -+u32 hsiphash_3u32(const u32 first, const u32 second, const u32 third, -+ const hsiphash_key_t *key) -+{ -+ u64 combined = (u64)second << 32 | first; -+ HPREAMBLE(12) -+ v3 ^= combined; -+ HSIPROUND; -+ v0 ^= combined; -+ b |= third; -+ HPOSTAMBLE -+} -+ -+/** -+ * hsiphash_4u32 - compute 32-bit hsiphash PRF value of 4 u32 -+ * @first: first u32 -+ * @second: second u32 -+ * @third: third u32 -+ * @forth: forth u32 -+ * @key: the hsiphash key -+ */ -+u32 hsiphash_4u32(const u32 first, const u32 second, const u32 third, -+ const u32 forth, const hsiphash_key_t *key) -+{ -+ u64 combined = (u64)second << 32 | first; -+ HPREAMBLE(16) -+ v3 ^= combined; -+ HSIPROUND; -+ v0 ^= combined; -+ combined = (u64)forth << 32 | third; -+ v3 ^= combined; -+ HSIPROUND; -+ v0 ^= combined; -+ HPOSTAMBLE -+} -+#else -+#define HSIPROUND \ -+ do { \ -+ v0 += v1; v1 = rol32(v1, 5); v1 ^= v0; v0 = rol32(v0, 16); \ -+ v2 += v3; v3 = rol32(v3, 8); v3 ^= v2; \ -+ v0 += v3; v3 = rol32(v3, 7); v3 ^= v0; \ -+ v2 += v1; v1 = rol32(v1, 13); v1 ^= v2; v2 = rol32(v2, 16); \ -+ } while (0) -+ -+#define HPREAMBLE(len) \ -+ u32 v0 = 0; \ -+ u32 v1 = 0; \ -+ u32 v2 = 0x6c796765U; \ -+ u32 v3 = 0x74656462U; \ -+ u32 b = ((u32)(len)) << 24; \ -+ v3 ^= key->key[1]; \ -+ v2 ^= key->key[0]; \ -+ v1 ^= key->key[1]; \ -+ v0 ^= key->key[0]; -+ -+#define HPOSTAMBLE \ -+ v3 ^= b; \ -+ HSIPROUND; \ -+ v0 ^= b; \ -+ v2 ^= 0xff; \ -+ HSIPROUND; \ -+ HSIPROUND; \ -+ HSIPROUND; \ -+ return v1 ^ v3; -+ -+u32 __hsiphash_aligned(const void *data, size_t len, const hsiphash_key_t *key) -+{ -+ const u8 *end = data + len - (len % sizeof(u32)); -+ const u8 left = len & (sizeof(u32) - 1); -+ u32 m; -+ HPREAMBLE(len) -+ for (; data != end; data += sizeof(u32)) { -+ m = le32_to_cpup(data); -+ v3 ^= m; -+ HSIPROUND; -+ v0 ^= m; -+ } -+ switch (left) { -+ case 3: b |= ((u32)end[2]) << 16; -+ case 2: b |= le16_to_cpup(data); break; -+ case 1: b |= end[0]; -+ } -+ HPOSTAMBLE -+} -+ -+#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS -+u32 __hsiphash_unaligned(const void *data, size_t len, -+ const hsiphash_key_t *key) -+{ -+ const u8 *end = data + len - (len % sizeof(u32)); -+ const u8 left = len & (sizeof(u32) - 1); -+ u32 m; -+ HPREAMBLE(len) -+ for (; data != end; data += sizeof(u32)) { -+ m = get_unaligned_le32(data); -+ v3 ^= m; -+ HSIPROUND; -+ v0 ^= m; -+ } -+ switch (left) { -+ case 3: b |= ((u32)end[2]) << 16; -+ case 2: b |= get_unaligned_le16(end); break; -+ case 1: b |= end[0]; -+ } -+ HPOSTAMBLE -+} -+#endif -+ -+/** -+ * hsiphash_1u32 - compute 32-bit hsiphash PRF value of a u32 -+ * @first: first u32 -+ * @key: the hsiphash key -+ */ -+u32 hsiphash_1u32(const u32 first, const hsiphash_key_t *key) -+{ -+ HPREAMBLE(4) -+ v3 ^= first; -+ HSIPROUND; -+ v0 ^= first; -+ HPOSTAMBLE -+} -+ -+/** -+ * hsiphash_2u32 - compute 32-bit hsiphash PRF value of 2 u32 -+ * @first: first u32 -+ * @second: second u32 -+ * @key: the hsiphash key -+ */ -+u32 hsiphash_2u32(const u32 first, const u32 second, const hsiphash_key_t *key) -+{ -+ HPREAMBLE(8) -+ v3 ^= first; -+ HSIPROUND; -+ v0 ^= first; -+ v3 ^= second; -+ HSIPROUND; -+ v0 ^= second; -+ HPOSTAMBLE -+} -+ -+/** -+ * hsiphash_3u32 - compute 32-bit hsiphash PRF value of 3 u32 -+ * @first: first u32 -+ * @second: second u32 -+ * @third: third u32 -+ * @key: the hsiphash key -+ */ -+u32 hsiphash_3u32(const u32 first, const u32 second, const u32 third, -+ const hsiphash_key_t *key) -+{ -+ HPREAMBLE(12) -+ v3 ^= first; -+ HSIPROUND; -+ v0 ^= first; -+ v3 ^= second; -+ HSIPROUND; -+ v0 ^= second; -+ v3 ^= third; -+ HSIPROUND; -+ v0 ^= third; -+ HPOSTAMBLE -+} -+ -+/** -+ * hsiphash_4u32 - compute 32-bit hsiphash PRF value of 4 u32 -+ * @first: first u32 -+ * @second: second u32 -+ * @third: third u32 -+ * @forth: forth u32 -+ * @key: the hsiphash key -+ */ -+u32 hsiphash_4u32(const u32 first, const u32 second, const u32 third, -+ const u32 forth, const hsiphash_key_t *key) -+{ -+ HPREAMBLE(16) -+ v3 ^= first; -+ HSIPROUND; -+ v0 ^= first; -+ v3 ^= second; -+ HSIPROUND; -+ v0 ^= second; -+ v3 ^= third; -+ HSIPROUND; -+ v0 ^= third; -+ v3 ^= forth; -+ HSIPROUND; -+ v0 ^= forth; -+ HPOSTAMBLE -+} -+#endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/udp_tunnel/udp_tunnel.c 2019-08-20 20:26:42.394341425 +0000 -@@ -0,0 +1,387 @@ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) -+#define __sk_user_data(sk) ((*((void __rcu **)&(sk)->sk_user_data))) -+#define rcu_dereference_sk_user_data(sk) rcu_dereference(__sk_user_data((sk))) -+#define rcu_assign_sk_user_data(sk, ptr) rcu_assign_pointer(__sk_user_data((sk)), ptr) -+#endif -+ -+/* This is global so, uh, only one real call site... This is the kind of horrific hack you'd expect to see in compat code. */ -+static udp_tunnel_encap_rcv_t encap_rcv = NULL; -+static void __compat_sk_data_ready(struct sock *sk -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0) -+ ,int unused_vulnerable_length_param -+#endif -+ ) -+{ -+ struct sk_buff *skb; -+ while ((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) { -+ skb_orphan(skb); -+ sk_mem_reclaim(sk); -+ encap_rcv(sk, skb); -+ } -+} -+ -+int udp_sock_create4(struct net *net, struct udp_port_cfg *cfg, -+ struct socket **sockp) -+{ -+ int err; -+ struct socket *sock = NULL; -+ struct sockaddr_in udp_addr; -+ -+ err = __sock_create(net, AF_INET, SOCK_DGRAM, 0, &sock, 1); -+ if (err < 0) -+ goto error; -+ -+ udp_addr.sin_family = AF_INET; -+ udp_addr.sin_addr = cfg->local_ip; -+ udp_addr.sin_port = cfg->local_udp_port; -+ err = kernel_bind(sock, (struct sockaddr *)&udp_addr, -+ sizeof(udp_addr)); -+ if (err < 0) -+ goto error; -+ -+ if (cfg->peer_udp_port) { -+ udp_addr.sin_family = AF_INET; -+ udp_addr.sin_addr = cfg->peer_ip; -+ udp_addr.sin_port = cfg->peer_udp_port; -+ err = kernel_connect(sock, (struct sockaddr *)&udp_addr, -+ sizeof(udp_addr), 0); -+ if (err < 0) -+ goto error; -+ } -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) -+ sock->sk->sk_no_check = !cfg->use_udp_checksums; -+#else -+ sock->sk->sk_no_check_tx = !cfg->use_udp_checksums; -+#endif -+ -+ *sockp = sock; -+ return 0; -+ -+error: -+ if (sock) { -+ kernel_sock_shutdown(sock, SHUT_RDWR); -+ sock_release(sock); -+ } -+ *sockp = NULL; -+ return err; -+} -+ -+void setup_udp_tunnel_sock(struct net *net, struct socket *sock, -+ struct udp_tunnel_sock_cfg *cfg) -+{ -+ inet_sk(sock->sk)->mc_loop = 0; -+ encap_rcv = cfg->encap_rcv; -+ rcu_assign_sk_user_data(sock->sk, cfg->sk_user_data); -+ /* We force the cast in this awful way, due to various Android kernels -+ * backporting things stupidly. */ -+ *(void **)&sock->sk->sk_data_ready = (void *)__compat_sk_data_ready; -+} -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) -+static inline __sum16 udp_v4_check(int len, __be32 saddr, -+ __be32 daddr, __wsum base) -+{ -+ return csum_tcpudp_magic(saddr, daddr, len, IPPROTO_UDP, base); -+} -+ -+static void udp_set_csum(bool nocheck, struct sk_buff *skb, -+ __be32 saddr, __be32 daddr, int len) -+{ -+ struct udphdr *uh = udp_hdr(skb); -+ -+ if (nocheck) -+ uh->check = 0; -+ else if (skb_is_gso(skb)) -+ uh->check = ~udp_v4_check(len, saddr, daddr, 0); -+ else if (skb_dst(skb) && skb_dst(skb)->dev && -+ (skb_dst(skb)->dev->features & NETIF_F_V4_CSUM)) { -+ -+ BUG_ON(skb->ip_summed == CHECKSUM_PARTIAL); -+ -+ skb->ip_summed = CHECKSUM_PARTIAL; -+ skb->csum_start = skb_transport_header(skb) - skb->head; -+ skb->csum_offset = offsetof(struct udphdr, check); -+ uh->check = ~udp_v4_check(len, saddr, daddr, 0); -+ } else { -+ __wsum csum; -+ -+ BUG_ON(skb->ip_summed == CHECKSUM_PARTIAL); -+ -+ uh->check = 0; -+ csum = skb_checksum(skb, 0, len, 0); -+ uh->check = udp_v4_check(len, saddr, daddr, csum); -+ if (uh->check == 0) -+ uh->check = CSUM_MANGLED_0; -+ -+ skb->ip_summed = CHECKSUM_UNNECESSARY; -+ } -+} -+ -+#endif -+ -+static void __compat_fake_destructor(struct sk_buff *skb) -+{ -+} -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) -+static void __compat_iptunnel_xmit(struct rtable *rt, struct sk_buff *skb, -+ __be32 src, __be32 dst, __u8 proto, -+ __u8 tos, __u8 ttl, __be16 df, bool xnet) -+{ -+ struct iphdr *iph; -+ struct pcpu_tstats *tstats = this_cpu_ptr(skb->dev->tstats); -+ -+ skb_scrub_packet(skb, xnet); -+ -+ skb->rxhash = 0; -+ skb_dst_set(skb, &rt->dst); -+ memset(IPCB(skb), 0, sizeof(*IPCB(skb))); -+ -+ /* Push down and install the IP header. */ -+ skb_push(skb, sizeof(struct iphdr)); -+ skb_reset_network_header(skb); -+ -+ iph = ip_hdr(skb); -+ -+ iph->version = 4; -+ iph->ihl = sizeof(struct iphdr) >> 2; -+ iph->frag_off = df; -+ iph->protocol = proto; -+ iph->tos = tos; -+ iph->daddr = dst; -+ iph->saddr = src; -+ iph->ttl = ttl; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 53) -+ __ip_select_ident(iph, &rt->dst, (skb_shinfo(skb)->gso_segs ?: 1) - 1); -+#else -+ __ip_select_ident(iph, skb_shinfo(skb)->gso_segs ?: 1); -+#endif -+ -+ iptunnel_xmit(skb, skb->dev); -+ u64_stats_update_begin(&tstats->syncp); -+ tstats->tx_bytes -= 8; -+ u64_stats_update_end(&tstats->syncp); -+} -+#define iptunnel_xmit __compat_iptunnel_xmit -+#endif -+ -+void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb, -+ __be32 src, __be32 dst, __u8 tos, __u8 ttl, -+ __be16 df, __be16 src_port, __be16 dst_port, -+ bool xnet, bool nocheck) -+{ -+ struct udphdr *uh; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) -+ struct net_device *dev = skb->dev; -+ int ret; -+#endif -+ -+ __skb_push(skb, sizeof(*uh)); -+ skb_reset_transport_header(skb); -+ uh = udp_hdr(skb); -+ -+ uh->dest = dst_port; -+ uh->source = src_port; -+ uh->len = htons(skb->len); -+ -+ memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); -+ -+ udp_set_csum(nocheck, skb, src, dst, skb->len); -+ -+ if (!skb->sk) -+ skb->sk = sk; -+ if (!skb->destructor) -+ skb->destructor = __compat_fake_destructor; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) -+ ret = -+#endif -+ iptunnel_xmit( -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) -+ sk, -+#endif -+ rt, skb, src, dst, IPPROTO_UDP, tos, ttl, df, xnet); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) -+ if (ret) -+ iptunnel_xmit_stats(ret - 8, &dev->stats, dev->tstats); -+#endif -+} -+ -+void udp_tunnel_sock_release(struct socket *sock) -+{ -+ rcu_assign_sk_user_data(sock->sk, NULL); -+ kernel_sock_shutdown(sock, SHUT_RDWR); -+ sock_release(sock); -+} -+ -+#if IS_ENABLED(CONFIG_IPV6) -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+int udp_sock_create6(struct net *net, struct udp_port_cfg *cfg, -+ struct socket **sockp) -+{ -+ struct sockaddr_in6 udp6_addr; -+ int err; -+ struct socket *sock = NULL; -+ -+ err = __sock_create(net, AF_INET6, SOCK_DGRAM, 0, &sock, 1); -+ if (err < 0) -+ goto error; -+ -+ if (cfg->ipv6_v6only) { -+ int val = 1; -+ -+ err = kernel_setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, -+ (char *) &val, sizeof(val)); -+ if (err < 0) -+ goto error; -+ } -+ -+ udp6_addr.sin6_family = AF_INET6; -+ memcpy(&udp6_addr.sin6_addr, &cfg->local_ip6, -+ sizeof(udp6_addr.sin6_addr)); -+ udp6_addr.sin6_port = cfg->local_udp_port; -+ err = kernel_bind(sock, (struct sockaddr *)&udp6_addr, -+ sizeof(udp6_addr)); -+ if (err < 0) -+ goto error; -+ -+ if (cfg->peer_udp_port) { -+ udp6_addr.sin6_family = AF_INET6; -+ memcpy(&udp6_addr.sin6_addr, &cfg->peer_ip6, -+ sizeof(udp6_addr.sin6_addr)); -+ udp6_addr.sin6_port = cfg->peer_udp_port; -+ err = kernel_connect(sock, -+ (struct sockaddr *)&udp6_addr, -+ sizeof(udp6_addr), 0); -+ } -+ if (err < 0) -+ goto error; -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) -+ sock->sk->sk_no_check = !cfg->use_udp_checksums; -+#else -+ udp_set_no_check6_tx(sock->sk, !cfg->use_udp6_tx_checksums); -+ udp_set_no_check6_rx(sock->sk, !cfg->use_udp6_rx_checksums); -+#endif -+ -+ *sockp = sock; -+ return 0; -+ -+error: -+ if (sock) { -+ kernel_sock_shutdown(sock, SHUT_RDWR); -+ sock_release(sock); -+ } -+ *sockp = NULL; -+ return err; -+} -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) -+static inline __sum16 udp_v6_check(int len, -+ const struct in6_addr *saddr, -+ const struct in6_addr *daddr, -+ __wsum base) -+{ -+ return csum_ipv6_magic(saddr, daddr, len, IPPROTO_UDP, base); -+} -+static void udp6_set_csum(bool nocheck, struct sk_buff *skb, -+ const struct in6_addr *saddr, -+ const struct in6_addr *daddr, int len) -+{ -+ struct udphdr *uh = udp_hdr(skb); -+ -+ if (nocheck) -+ uh->check = 0; -+ else if (skb_is_gso(skb)) -+ uh->check = ~udp_v6_check(len, saddr, daddr, 0); -+ else if (skb_dst(skb) && skb_dst(skb)->dev && -+ (skb_dst(skb)->dev->features & NETIF_F_IPV6_CSUM)) { -+ -+ BUG_ON(skb->ip_summed == CHECKSUM_PARTIAL); -+ -+ skb->ip_summed = CHECKSUM_PARTIAL; -+ skb->csum_start = skb_transport_header(skb) - skb->head; -+ skb->csum_offset = offsetof(struct udphdr, check); -+ uh->check = ~udp_v6_check(len, saddr, daddr, 0); -+ } else { -+ __wsum csum; -+ -+ BUG_ON(skb->ip_summed == CHECKSUM_PARTIAL); -+ -+ uh->check = 0; -+ csum = skb_checksum(skb, 0, len, 0); -+ uh->check = udp_v6_check(len, saddr, daddr, csum); -+ if (uh->check == 0) -+ uh->check = CSUM_MANGLED_0; -+ -+ skb->ip_summed = CHECKSUM_UNNECESSARY; -+ } -+} -+#endif -+ -+int udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk, -+ struct sk_buff *skb, -+ struct net_device *dev, struct in6_addr *saddr, -+ struct in6_addr *daddr, -+ __u8 prio, __u8 ttl, __be32 label, -+ __be16 src_port, __be16 dst_port, bool nocheck) -+{ -+ struct udphdr *uh; -+ struct ipv6hdr *ip6h; -+ -+ __skb_push(skb, sizeof(*uh)); -+ skb_reset_transport_header(skb); -+ uh = udp_hdr(skb); -+ -+ uh->dest = dst_port; -+ uh->source = src_port; -+ -+ uh->len = htons(skb->len); -+ -+ skb_dst_set(skb, dst); -+ -+ udp6_set_csum(nocheck, skb, saddr, daddr, skb->len); -+ -+ __skb_push(skb, sizeof(*ip6h)); -+ skb_reset_network_header(skb); -+ ip6h = ipv6_hdr(skb); -+ ip6_flow_hdr(ip6h, prio, label); -+ ip6h->payload_len = htons(skb->len); -+ ip6h->nexthdr = IPPROTO_UDP; -+ ip6h->hop_limit = ttl; -+ ip6h->daddr = *daddr; -+ ip6h->saddr = *saddr; -+ -+ if (!skb->sk) -+ skb->sk = sk; -+ if (!skb->destructor) -+ skb->destructor = __compat_fake_destructor; -+ -+ ip6tunnel_xmit(skb, dev); -+ return 0; -+} -+#endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/cookie.c 2019-08-20 20:26:42.394341425 +0000 -@@ -0,0 +1,236 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include "cookie.h" -+#include "peer.h" -+#include "device.h" -+#include "messages.h" -+#include "ratelimiter.h" -+#include "timers.h" -+ -+#include -+#include -+ -+#include -+#include -+ -+void wg_cookie_checker_init(struct cookie_checker *checker, -+ struct wg_device *wg) -+{ -+ init_rwsem(&checker->secret_lock); -+ checker->secret_birthdate = ktime_get_coarse_boottime_ns(); -+ get_random_bytes(checker->secret, NOISE_HASH_LEN); -+ checker->device = wg; -+} -+ -+enum { COOKIE_KEY_LABEL_LEN = 8 }; -+static const u8 mac1_key_label[COOKIE_KEY_LABEL_LEN] = "mac1----"; -+static const u8 cookie_key_label[COOKIE_KEY_LABEL_LEN] = "cookie--"; -+ -+static void precompute_key(u8 key[NOISE_SYMMETRIC_KEY_LEN], -+ const u8 pubkey[NOISE_PUBLIC_KEY_LEN], -+ const u8 label[COOKIE_KEY_LABEL_LEN]) -+{ -+ struct blake2s_state blake; -+ -+ blake2s_init(&blake, NOISE_SYMMETRIC_KEY_LEN); -+ blake2s_update(&blake, label, COOKIE_KEY_LABEL_LEN); -+ blake2s_update(&blake, pubkey, NOISE_PUBLIC_KEY_LEN); -+ blake2s_final(&blake, key); -+} -+ -+/* Must hold peer->handshake.static_identity->lock */ -+void wg_cookie_checker_precompute_device_keys(struct cookie_checker *checker) -+{ -+ if (likely(checker->device->static_identity.has_identity)) { -+ precompute_key(checker->cookie_encryption_key, -+ checker->device->static_identity.static_public, -+ cookie_key_label); -+ precompute_key(checker->message_mac1_key, -+ checker->device->static_identity.static_public, -+ mac1_key_label); -+ } else { -+ memset(checker->cookie_encryption_key, 0, -+ NOISE_SYMMETRIC_KEY_LEN); -+ memset(checker->message_mac1_key, 0, NOISE_SYMMETRIC_KEY_LEN); -+ } -+} -+ -+void wg_cookie_checker_precompute_peer_keys(struct wg_peer *peer) -+{ -+ precompute_key(peer->latest_cookie.cookie_decryption_key, -+ peer->handshake.remote_static, cookie_key_label); -+ precompute_key(peer->latest_cookie.message_mac1_key, -+ peer->handshake.remote_static, mac1_key_label); -+} -+ -+void wg_cookie_init(struct cookie *cookie) -+{ -+ memset(cookie, 0, sizeof(*cookie)); -+ init_rwsem(&cookie->lock); -+} -+ -+static void compute_mac1(u8 mac1[COOKIE_LEN], const void *message, size_t len, -+ const u8 key[NOISE_SYMMETRIC_KEY_LEN]) -+{ -+ len = len - sizeof(struct message_macs) + -+ offsetof(struct message_macs, mac1); -+ blake2s(mac1, message, key, COOKIE_LEN, len, NOISE_SYMMETRIC_KEY_LEN); -+} -+ -+static void compute_mac2(u8 mac2[COOKIE_LEN], const void *message, size_t len, -+ const u8 cookie[COOKIE_LEN]) -+{ -+ len = len - sizeof(struct message_macs) + -+ offsetof(struct message_macs, mac2); -+ blake2s(mac2, message, cookie, COOKIE_LEN, len, COOKIE_LEN); -+} -+ -+static void make_cookie(u8 cookie[COOKIE_LEN], struct sk_buff *skb, -+ struct cookie_checker *checker) -+{ -+ struct blake2s_state state; -+ -+ if (wg_birthdate_has_expired(checker->secret_birthdate, -+ COOKIE_SECRET_MAX_AGE)) { -+ down_write(&checker->secret_lock); -+ checker->secret_birthdate = ktime_get_coarse_boottime_ns(); -+ get_random_bytes(checker->secret, NOISE_HASH_LEN); -+ up_write(&checker->secret_lock); -+ } -+ -+ down_read(&checker->secret_lock); -+ -+ blake2s_init_key(&state, COOKIE_LEN, checker->secret, NOISE_HASH_LEN); -+ if (skb->protocol == htons(ETH_P_IP)) -+ blake2s_update(&state, (u8 *)&ip_hdr(skb)->saddr, -+ sizeof(struct in_addr)); -+ else if (skb->protocol == htons(ETH_P_IPV6)) -+ blake2s_update(&state, (u8 *)&ipv6_hdr(skb)->saddr, -+ sizeof(struct in6_addr)); -+ blake2s_update(&state, (u8 *)&udp_hdr(skb)->source, sizeof(__be16)); -+ blake2s_final(&state, cookie); -+ -+ up_read(&checker->secret_lock); -+} -+ -+enum cookie_mac_state wg_cookie_validate_packet(struct cookie_checker *checker, -+ struct sk_buff *skb, -+ bool check_cookie) -+{ -+ struct message_macs *macs = (struct message_macs *) -+ (skb->data + skb->len - sizeof(*macs)); -+ enum cookie_mac_state ret; -+ u8 computed_mac[COOKIE_LEN]; -+ u8 cookie[COOKIE_LEN]; -+ -+ ret = INVALID_MAC; -+ compute_mac1(computed_mac, skb->data, skb->len, -+ checker->message_mac1_key); -+ if (crypto_memneq(computed_mac, macs->mac1, COOKIE_LEN)) -+ goto out; -+ -+ ret = VALID_MAC_BUT_NO_COOKIE; -+ -+ if (!check_cookie) -+ goto out; -+ -+ make_cookie(cookie, skb, checker); -+ -+ compute_mac2(computed_mac, skb->data, skb->len, cookie); -+ if (crypto_memneq(computed_mac, macs->mac2, COOKIE_LEN)) -+ goto out; -+ -+ ret = VALID_MAC_WITH_COOKIE_BUT_RATELIMITED; -+ if (!wg_ratelimiter_allow(skb, dev_net(checker->device->dev))) -+ goto out; -+ -+ ret = VALID_MAC_WITH_COOKIE; -+ -+out: -+ return ret; -+} -+ -+void wg_cookie_add_mac_to_packet(void *message, size_t len, -+ struct wg_peer *peer) -+{ -+ struct message_macs *macs = (struct message_macs *) -+ ((u8 *)message + len - sizeof(*macs)); -+ -+ down_write(&peer->latest_cookie.lock); -+ compute_mac1(macs->mac1, message, len, -+ peer->latest_cookie.message_mac1_key); -+ memcpy(peer->latest_cookie.last_mac1_sent, macs->mac1, COOKIE_LEN); -+ peer->latest_cookie.have_sent_mac1 = true; -+ up_write(&peer->latest_cookie.lock); -+ -+ down_read(&peer->latest_cookie.lock); -+ if (peer->latest_cookie.is_valid && -+ !wg_birthdate_has_expired(peer->latest_cookie.birthdate, -+ COOKIE_SECRET_MAX_AGE - COOKIE_SECRET_LATENCY)) -+ compute_mac2(macs->mac2, message, len, -+ peer->latest_cookie.cookie); -+ else -+ memset(macs->mac2, 0, COOKIE_LEN); -+ up_read(&peer->latest_cookie.lock); -+} -+ -+void wg_cookie_message_create(struct message_handshake_cookie *dst, -+ struct sk_buff *skb, __le32 index, -+ struct cookie_checker *checker) -+{ -+ struct message_macs *macs = (struct message_macs *) -+ ((u8 *)skb->data + skb->len - sizeof(*macs)); -+ u8 cookie[COOKIE_LEN]; -+ -+ dst->header.type = cpu_to_le32(MESSAGE_HANDSHAKE_COOKIE); -+ dst->receiver_index = index; -+ get_random_bytes_wait(dst->nonce, COOKIE_NONCE_LEN); -+ -+ make_cookie(cookie, skb, checker); -+ xchacha20poly1305_encrypt(dst->encrypted_cookie, cookie, COOKIE_LEN, -+ macs->mac1, COOKIE_LEN, dst->nonce, -+ checker->cookie_encryption_key); -+} -+ -+void wg_cookie_message_consume(struct message_handshake_cookie *src, -+ struct wg_device *wg) -+{ -+ struct wg_peer *peer = NULL; -+ u8 cookie[COOKIE_LEN]; -+ bool ret; -+ -+ if (unlikely(!wg_index_hashtable_lookup(wg->index_hashtable, -+ INDEX_HASHTABLE_HANDSHAKE | -+ INDEX_HASHTABLE_KEYPAIR, -+ src->receiver_index, &peer))) -+ return; -+ -+ down_read(&peer->latest_cookie.lock); -+ if (unlikely(!peer->latest_cookie.have_sent_mac1)) { -+ up_read(&peer->latest_cookie.lock); -+ goto out; -+ } -+ ret = xchacha20poly1305_decrypt( -+ cookie, src->encrypted_cookie, sizeof(src->encrypted_cookie), -+ peer->latest_cookie.last_mac1_sent, COOKIE_LEN, src->nonce, -+ peer->latest_cookie.cookie_decryption_key); -+ up_read(&peer->latest_cookie.lock); -+ -+ if (ret) { -+ down_write(&peer->latest_cookie.lock); -+ memcpy(peer->latest_cookie.cookie, cookie, COOKIE_LEN); -+ peer->latest_cookie.birthdate = ktime_get_coarse_boottime_ns(); -+ peer->latest_cookie.is_valid = true; -+ peer->latest_cookie.have_sent_mac1 = false; -+ up_write(&peer->latest_cookie.lock); -+ } else { -+ net_dbg_ratelimited("%s: Could not decrypt invalid cookie response\n", -+ wg->dev->name); -+ } -+ -+out: -+ wg_peer_put(peer); -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/blake2s/blake2s-x86_64-glue.c 2019-08-20 20:26:42.395341425 +0000 -@@ -0,0 +1,72 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include -+#include -+#include -+#include -+ -+asmlinkage void blake2s_compress_ssse3(struct blake2s_state *state, -+ const u8 *block, const size_t nblocks, -+ const u32 inc); -+asmlinkage void blake2s_compress_avx512(struct blake2s_state *state, -+ const u8 *block, const size_t nblocks, -+ const u32 inc); -+ -+static bool blake2s_use_ssse3 __ro_after_init; -+static bool blake2s_use_avx512 __ro_after_init; -+static bool *const blake2s_nobs[] __initconst = { &blake2s_use_ssse3, -+ &blake2s_use_avx512 }; -+ -+static void __init blake2s_fpu_init(void) -+{ -+ blake2s_use_ssse3 = boot_cpu_has(X86_FEATURE_SSSE3); -+#ifndef COMPAT_CANNOT_USE_AVX512 -+ blake2s_use_avx512 = -+ boot_cpu_has(X86_FEATURE_AVX) && -+ boot_cpu_has(X86_FEATURE_AVX2) && -+ boot_cpu_has(X86_FEATURE_AVX512F) && -+ boot_cpu_has(X86_FEATURE_AVX512VL) && -+ cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM | -+ XFEATURE_MASK_AVX512, NULL); -+#endif -+} -+ -+static inline bool blake2s_compress_arch(struct blake2s_state *state, -+ const u8 *block, size_t nblocks, -+ const u32 inc) -+{ -+ simd_context_t simd_context; -+ bool used_arch = false; -+ -+ /* SIMD disables preemption, so relax after processing each page. */ -+ BUILD_BUG_ON(PAGE_SIZE / BLAKE2S_BLOCK_SIZE < 8); -+ -+ simd_get(&simd_context); -+ -+ if (!IS_ENABLED(CONFIG_AS_SSSE3) || !blake2s_use_ssse3 || -+ !simd_use(&simd_context)) -+ goto out; -+ used_arch = true; -+ -+ for (;;) { -+ const size_t blocks = min_t(size_t, nblocks, -+ PAGE_SIZE / BLAKE2S_BLOCK_SIZE); -+ -+ if (IS_ENABLED(CONFIG_AS_AVX512) && blake2s_use_avx512) -+ blake2s_compress_avx512(state, block, blocks, inc); -+ else -+ blake2s_compress_ssse3(state, block, blocks, inc); -+ -+ nblocks -= blocks; -+ if (!nblocks) -+ break; -+ block += blocks * BLAKE2S_BLOCK_SIZE; -+ simd_relax(&simd_context); -+ } -+out: -+ simd_put(&simd_context); -+ return used_arch; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/blake2s/blake2s.c 2019-08-20 20:26:42.395341425 +0000 -@@ -0,0 +1,276 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ * -+ * This is an implementation of the BLAKE2s hash and PRF functions. -+ * -+ * Information: https://blake2.net/ -+ * -+ */ -+ -+#include -+#include "../selftest/run.h" -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+static const u32 blake2s_iv[8] = { -+ 0x6A09E667UL, 0xBB67AE85UL, 0x3C6EF372UL, 0xA54FF53AUL, -+ 0x510E527FUL, 0x9B05688CUL, 0x1F83D9ABUL, 0x5BE0CD19UL -+}; -+ -+static const u8 blake2s_sigma[10][16] = { -+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, -+ { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 }, -+ { 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 }, -+ { 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 }, -+ { 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 }, -+ { 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 }, -+ { 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11 }, -+ { 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10 }, -+ { 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5 }, -+ { 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0 }, -+}; -+ -+static inline void blake2s_set_lastblock(struct blake2s_state *state) -+{ -+ state->f[0] = -1; -+} -+ -+static inline void blake2s_increment_counter(struct blake2s_state *state, -+ const u32 inc) -+{ -+ state->t[0] += inc; -+ state->t[1] += (state->t[0] < inc); -+} -+ -+static inline void blake2s_init_param(struct blake2s_state *state, -+ const u32 param) -+{ -+ int i; -+ -+ memset(state, 0, sizeof(*state)); -+ for (i = 0; i < 8; ++i) -+ state->h[i] = blake2s_iv[i]; -+ state->h[0] ^= param; -+} -+ -+void blake2s_init(struct blake2s_state *state, const size_t outlen) -+{ -+ WARN_ON(IS_ENABLED(DEBUG) && (!outlen || outlen > BLAKE2S_HASH_SIZE)); -+ blake2s_init_param(state, 0x01010000 | outlen); -+ state->outlen = outlen; -+} -+EXPORT_SYMBOL(blake2s_init); -+ -+void blake2s_init_key(struct blake2s_state *state, const size_t outlen, -+ const void *key, const size_t keylen) -+{ -+ u8 block[BLAKE2S_BLOCK_SIZE] = { 0 }; -+ -+ WARN_ON(IS_ENABLED(DEBUG) && (!outlen || outlen > BLAKE2S_HASH_SIZE || -+ !key || !keylen || keylen > BLAKE2S_KEY_SIZE)); -+ blake2s_init_param(state, 0x01010000 | keylen << 8 | outlen); -+ state->outlen = outlen; -+ memcpy(block, key, keylen); -+ blake2s_update(state, block, BLAKE2S_BLOCK_SIZE); -+ memzero_explicit(block, BLAKE2S_BLOCK_SIZE); -+} -+EXPORT_SYMBOL(blake2s_init_key); -+ -+#if defined(CONFIG_ZINC_ARCH_X86_64) -+#include "blake2s-x86_64-glue.c" -+#else -+static bool *const blake2s_nobs[] __initconst = { }; -+static void __init blake2s_fpu_init(void) -+{ -+} -+static inline bool blake2s_compress_arch(struct blake2s_state *state, -+ const u8 *block, size_t nblocks, -+ const u32 inc) -+{ -+ return false; -+} -+#endif -+ -+static inline void blake2s_compress(struct blake2s_state *state, -+ const u8 *block, size_t nblocks, -+ const u32 inc) -+{ -+ u32 m[16]; -+ u32 v[16]; -+ int i; -+ -+ WARN_ON(IS_ENABLED(DEBUG) && -+ (nblocks > 1 && inc != BLAKE2S_BLOCK_SIZE)); -+ -+ if (blake2s_compress_arch(state, block, nblocks, inc)) -+ return; -+ -+ while (nblocks > 0) { -+ blake2s_increment_counter(state, inc); -+ memcpy(m, block, BLAKE2S_BLOCK_SIZE); -+ le32_to_cpu_array(m, ARRAY_SIZE(m)); -+ memcpy(v, state->h, 32); -+ v[ 8] = blake2s_iv[0]; -+ v[ 9] = blake2s_iv[1]; -+ v[10] = blake2s_iv[2]; -+ v[11] = blake2s_iv[3]; -+ v[12] = blake2s_iv[4] ^ state->t[0]; -+ v[13] = blake2s_iv[5] ^ state->t[1]; -+ v[14] = blake2s_iv[6] ^ state->f[0]; -+ v[15] = blake2s_iv[7] ^ state->f[1]; -+ -+#define G(r, i, a, b, c, d) do { \ -+ a += b + m[blake2s_sigma[r][2 * i + 0]]; \ -+ d = ror32(d ^ a, 16); \ -+ c += d; \ -+ b = ror32(b ^ c, 12); \ -+ a += b + m[blake2s_sigma[r][2 * i + 1]]; \ -+ d = ror32(d ^ a, 8); \ -+ c += d; \ -+ b = ror32(b ^ c, 7); \ -+} while (0) -+ -+#define ROUND(r) do { \ -+ G(r, 0, v[0], v[ 4], v[ 8], v[12]); \ -+ G(r, 1, v[1], v[ 5], v[ 9], v[13]); \ -+ G(r, 2, v[2], v[ 6], v[10], v[14]); \ -+ G(r, 3, v[3], v[ 7], v[11], v[15]); \ -+ G(r, 4, v[0], v[ 5], v[10], v[15]); \ -+ G(r, 5, v[1], v[ 6], v[11], v[12]); \ -+ G(r, 6, v[2], v[ 7], v[ 8], v[13]); \ -+ G(r, 7, v[3], v[ 4], v[ 9], v[14]); \ -+} while (0) -+ ROUND(0); -+ ROUND(1); -+ ROUND(2); -+ ROUND(3); -+ ROUND(4); -+ ROUND(5); -+ ROUND(6); -+ ROUND(7); -+ ROUND(8); -+ ROUND(9); -+ -+#undef G -+#undef ROUND -+ -+ for (i = 0; i < 8; ++i) -+ state->h[i] ^= v[i] ^ v[i + 8]; -+ -+ block += BLAKE2S_BLOCK_SIZE; -+ --nblocks; -+ } -+} -+ -+void blake2s_update(struct blake2s_state *state, const u8 *in, size_t inlen) -+{ -+ const size_t fill = BLAKE2S_BLOCK_SIZE - state->buflen; -+ -+ if (unlikely(!inlen)) -+ return; -+ if (inlen > fill) { -+ memcpy(state->buf + state->buflen, in, fill); -+ blake2s_compress(state, state->buf, 1, BLAKE2S_BLOCK_SIZE); -+ state->buflen = 0; -+ in += fill; -+ inlen -= fill; -+ } -+ if (inlen > BLAKE2S_BLOCK_SIZE) { -+ const size_t nblocks = DIV_ROUND_UP(inlen, BLAKE2S_BLOCK_SIZE); -+ /* Hash one less (full) block than strictly possible */ -+ blake2s_compress(state, in, nblocks - 1, BLAKE2S_BLOCK_SIZE); -+ in += BLAKE2S_BLOCK_SIZE * (nblocks - 1); -+ inlen -= BLAKE2S_BLOCK_SIZE * (nblocks - 1); -+ } -+ memcpy(state->buf + state->buflen, in, inlen); -+ state->buflen += inlen; -+} -+EXPORT_SYMBOL(blake2s_update); -+ -+void blake2s_final(struct blake2s_state *state, u8 *out) -+{ -+ WARN_ON(IS_ENABLED(DEBUG) && !out); -+ blake2s_set_lastblock(state); -+ memset(state->buf + state->buflen, 0, -+ BLAKE2S_BLOCK_SIZE - state->buflen); /* Padding */ -+ blake2s_compress(state, state->buf, 1, state->buflen); -+ cpu_to_le32_array(state->h, ARRAY_SIZE(state->h)); -+ memcpy(out, state->h, state->outlen); -+ memzero_explicit(state, sizeof(*state)); -+} -+EXPORT_SYMBOL(blake2s_final); -+ -+void blake2s_hmac(u8 *out, const u8 *in, const u8 *key, const size_t outlen, -+ const size_t inlen, const size_t keylen) -+{ -+ struct blake2s_state state; -+ u8 x_key[BLAKE2S_BLOCK_SIZE] __aligned(__alignof__(u32)) = { 0 }; -+ u8 i_hash[BLAKE2S_HASH_SIZE] __aligned(__alignof__(u32)); -+ int i; -+ -+ if (keylen > BLAKE2S_BLOCK_SIZE) { -+ blake2s_init(&state, BLAKE2S_HASH_SIZE); -+ blake2s_update(&state, key, keylen); -+ blake2s_final(&state, x_key); -+ } else -+ memcpy(x_key, key, keylen); -+ -+ for (i = 0; i < BLAKE2S_BLOCK_SIZE; ++i) -+ x_key[i] ^= 0x36; -+ -+ blake2s_init(&state, BLAKE2S_HASH_SIZE); -+ blake2s_update(&state, x_key, BLAKE2S_BLOCK_SIZE); -+ blake2s_update(&state, in, inlen); -+ blake2s_final(&state, i_hash); -+ -+ for (i = 0; i < BLAKE2S_BLOCK_SIZE; ++i) -+ x_key[i] ^= 0x5c ^ 0x36; -+ -+ blake2s_init(&state, BLAKE2S_HASH_SIZE); -+ blake2s_update(&state, x_key, BLAKE2S_BLOCK_SIZE); -+ blake2s_update(&state, i_hash, BLAKE2S_HASH_SIZE); -+ blake2s_final(&state, i_hash); -+ -+ memcpy(out, i_hash, outlen); -+ memzero_explicit(x_key, BLAKE2S_BLOCK_SIZE); -+ memzero_explicit(i_hash, BLAKE2S_HASH_SIZE); -+} -+EXPORT_SYMBOL(blake2s_hmac); -+ -+#include "../selftest/blake2s.c" -+ -+static bool nosimd __initdata = false; -+ -+#ifndef COMPAT_ZINC_IS_A_MODULE -+int __init blake2s_mod_init(void) -+#else -+static int __init mod_init(void) -+#endif -+{ -+ if (!nosimd) -+ blake2s_fpu_init(); -+ if (!selftest_run("blake2s", blake2s_selftest, blake2s_nobs, -+ ARRAY_SIZE(blake2s_nobs))) -+ return -ENOTRECOVERABLE; -+ return 0; -+} -+ -+#ifdef COMPAT_ZINC_IS_A_MODULE -+static void __exit mod_exit(void) -+{ -+} -+ -+module_param(nosimd, bool, 0); -+module_init(mod_init); -+module_exit(mod_exit); -+MODULE_LICENSE("GPL v2"); -+MODULE_DESCRIPTION("BLAKE2s hash function"); -+MODULE_AUTHOR("Jason A. Donenfeld "); -+#endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/chacha20/chacha20-arm-glue.c 2019-08-20 20:26:42.396341425 +0000 -@@ -0,0 +1,98 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include -+#include -+#if defined(CONFIG_ZINC_ARCH_ARM) -+#include -+#include -+#endif -+ -+asmlinkage void chacha20_arm(u8 *out, const u8 *in, const size_t len, -+ const u32 key[8], const u32 counter[4]); -+asmlinkage void hchacha20_arm(const u32 state[16], u32 out[8]); -+asmlinkage void chacha20_neon(u8 *out, const u8 *in, const size_t len, -+ const u32 key[8], const u32 counter[4]); -+ -+static bool chacha20_use_neon __ro_after_init; -+static bool *const chacha20_nobs[] __initconst = { &chacha20_use_neon }; -+static void __init chacha20_fpu_init(void) -+{ -+#if defined(CONFIG_ZINC_ARCH_ARM64) -+ chacha20_use_neon = cpu_have_named_feature(ASIMD); -+#elif defined(CONFIG_ZINC_ARCH_ARM) -+ switch (read_cpuid_part()) { -+ case ARM_CPU_PART_CORTEX_A7: -+ case ARM_CPU_PART_CORTEX_A5: -+ /* The Cortex-A7 and Cortex-A5 do not perform well with the NEON -+ * implementation but do incredibly with the scalar one and use -+ * less power. -+ */ -+ break; -+ default: -+ chacha20_use_neon = elf_hwcap & HWCAP_NEON; -+ } -+#endif -+} -+ -+static inline bool chacha20_arch(struct chacha20_ctx *ctx, u8 *dst, -+ const u8 *src, size_t len, -+ simd_context_t *simd_context) -+{ -+ /* SIMD disables preemption, so relax after processing each page. */ -+ BUILD_BUG_ON(PAGE_SIZE < CHACHA20_BLOCK_SIZE || -+ PAGE_SIZE % CHACHA20_BLOCK_SIZE); -+ -+ for (;;) { -+ if (IS_ENABLED(CONFIG_KERNEL_MODE_NEON) && chacha20_use_neon && -+ len >= CHACHA20_BLOCK_SIZE * 3 && simd_use(simd_context)) { -+ const size_t bytes = min_t(size_t, len, PAGE_SIZE); -+ -+ chacha20_neon(dst, src, bytes, ctx->key, ctx->counter); -+ ctx->counter[0] += (bytes + 63) / 64; -+ len -= bytes; -+ if (!len) -+ break; -+ dst += bytes; -+ src += bytes; -+ simd_relax(simd_context); -+ } else { -+ chacha20_arm(dst, src, len, ctx->key, ctx->counter); -+ ctx->counter[0] += (len + 63) / 64; -+ break; -+ } -+ } -+ -+ return true; -+} -+ -+static inline bool hchacha20_arch(u32 derived_key[CHACHA20_KEY_WORDS], -+ const u8 nonce[HCHACHA20_NONCE_SIZE], -+ const u8 key[HCHACHA20_KEY_SIZE], -+ simd_context_t *simd_context) -+{ -+ if (IS_ENABLED(CONFIG_ZINC_ARCH_ARM)) { -+ u32 x[] = { CHACHA20_CONSTANT_EXPA, -+ CHACHA20_CONSTANT_ND_3, -+ CHACHA20_CONSTANT_2_BY, -+ CHACHA20_CONSTANT_TE_K, -+ get_unaligned_le32(key + 0), -+ get_unaligned_le32(key + 4), -+ get_unaligned_le32(key + 8), -+ get_unaligned_le32(key + 12), -+ get_unaligned_le32(key + 16), -+ get_unaligned_le32(key + 20), -+ get_unaligned_le32(key + 24), -+ get_unaligned_le32(key + 28), -+ get_unaligned_le32(nonce + 0), -+ get_unaligned_le32(nonce + 4), -+ get_unaligned_le32(nonce + 8), -+ get_unaligned_le32(nonce + 12) -+ }; -+ hchacha20_arm(x, derived_key); -+ return true; -+ } -+ return false; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/chacha20/chacha20-mips-glue.c 2019-08-20 20:26:42.396341425 +0000 -@@ -0,0 +1,27 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+asmlinkage void chacha20_mips(u32 state[16], u8 *out, const u8 *in, -+ const size_t len); -+static bool *const chacha20_nobs[] __initconst = { }; -+static void __init chacha20_fpu_init(void) -+{ -+} -+ -+static inline bool chacha20_arch(struct chacha20_ctx *ctx, u8 *dst, -+ const u8 *src, size_t len, -+ simd_context_t *simd_context) -+{ -+ chacha20_mips(ctx->state, dst, src, len); -+ return true; -+} -+ -+static inline bool hchacha20_arch(u32 derived_key[CHACHA20_KEY_WORDS], -+ const u8 nonce[HCHACHA20_NONCE_SIZE], -+ const u8 key[HCHACHA20_KEY_SIZE], -+ simd_context_t *simd_context) -+{ -+ return false; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/chacha20/chacha20-x86_64-glue.c 2019-08-20 20:26:42.397341426 +0000 -@@ -0,0 +1,105 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include -+#include -+#include -+#include -+ -+asmlinkage void hchacha20_ssse3(u32 *derived_key, const u8 *nonce, -+ const u8 *key); -+asmlinkage void chacha20_ssse3(u8 *out, const u8 *in, const size_t len, -+ const u32 key[8], const u32 counter[4]); -+asmlinkage void chacha20_avx2(u8 *out, const u8 *in, const size_t len, -+ const u32 key[8], const u32 counter[4]); -+asmlinkage void chacha20_avx512(u8 *out, const u8 *in, const size_t len, -+ const u32 key[8], const u32 counter[4]); -+asmlinkage void chacha20_avx512vl(u8 *out, const u8 *in, const size_t len, -+ const u32 key[8], const u32 counter[4]); -+ -+static bool chacha20_use_ssse3 __ro_after_init; -+static bool chacha20_use_avx2 __ro_after_init; -+static bool chacha20_use_avx512 __ro_after_init; -+static bool chacha20_use_avx512vl __ro_after_init; -+static bool *const chacha20_nobs[] __initconst = { -+ &chacha20_use_ssse3, &chacha20_use_avx2, &chacha20_use_avx512, -+ &chacha20_use_avx512vl }; -+ -+static void __init chacha20_fpu_init(void) -+{ -+ chacha20_use_ssse3 = boot_cpu_has(X86_FEATURE_SSSE3); -+ chacha20_use_avx2 = -+ boot_cpu_has(X86_FEATURE_AVX) && -+ boot_cpu_has(X86_FEATURE_AVX2) && -+ cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL); -+#ifndef COMPAT_CANNOT_USE_AVX512 -+ chacha20_use_avx512 = -+ boot_cpu_has(X86_FEATURE_AVX) && -+ boot_cpu_has(X86_FEATURE_AVX2) && -+ boot_cpu_has(X86_FEATURE_AVX512F) && -+ cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM | -+ XFEATURE_MASK_AVX512, NULL) && -+ /* Skylake downclocks unacceptably much when using zmm. */ -+ boot_cpu_data.x86_model != INTEL_FAM6_SKYLAKE_X; -+ chacha20_use_avx512vl = -+ boot_cpu_has(X86_FEATURE_AVX) && -+ boot_cpu_has(X86_FEATURE_AVX2) && -+ boot_cpu_has(X86_FEATURE_AVX512F) && -+ boot_cpu_has(X86_FEATURE_AVX512VL) && -+ cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM | -+ XFEATURE_MASK_AVX512, NULL); -+#endif -+} -+ -+static inline bool chacha20_arch(struct chacha20_ctx *ctx, u8 *dst, -+ const u8 *src, size_t len, -+ simd_context_t *simd_context) -+{ -+ /* SIMD disables preemption, so relax after processing each page. */ -+ BUILD_BUG_ON(PAGE_SIZE < CHACHA20_BLOCK_SIZE || -+ PAGE_SIZE % CHACHA20_BLOCK_SIZE); -+ -+ if (!IS_ENABLED(CONFIG_AS_SSSE3) || !chacha20_use_ssse3 || -+ len <= CHACHA20_BLOCK_SIZE || !simd_use(simd_context)) -+ return false; -+ -+ for (;;) { -+ const size_t bytes = min_t(size_t, len, PAGE_SIZE); -+ -+ if (IS_ENABLED(CONFIG_AS_AVX512) && chacha20_use_avx512 && -+ len >= CHACHA20_BLOCK_SIZE * 8) -+ chacha20_avx512(dst, src, bytes, ctx->key, ctx->counter); -+ else if (IS_ENABLED(CONFIG_AS_AVX512) && chacha20_use_avx512vl && -+ len >= CHACHA20_BLOCK_SIZE * 4) -+ chacha20_avx512vl(dst, src, bytes, ctx->key, ctx->counter); -+ else if (IS_ENABLED(CONFIG_AS_AVX2) && chacha20_use_avx2 && -+ len >= CHACHA20_BLOCK_SIZE * 4) -+ chacha20_avx2(dst, src, bytes, ctx->key, ctx->counter); -+ else -+ chacha20_ssse3(dst, src, bytes, ctx->key, ctx->counter); -+ ctx->counter[0] += (bytes + 63) / 64; -+ len -= bytes; -+ if (!len) -+ break; -+ dst += bytes; -+ src += bytes; -+ simd_relax(simd_context); -+ } -+ -+ return true; -+} -+ -+static inline bool hchacha20_arch(u32 derived_key[CHACHA20_KEY_WORDS], -+ const u8 nonce[HCHACHA20_NONCE_SIZE], -+ const u8 key[HCHACHA20_KEY_SIZE], -+ simd_context_t *simd_context) -+{ -+ if (IS_ENABLED(CONFIG_AS_SSSE3) && chacha20_use_ssse3 && -+ simd_use(simd_context)) { -+ hchacha20_ssse3(derived_key, nonce, key); -+ return true; -+ } -+ return false; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/chacha20/chacha20.c 2019-08-20 20:26:42.398341426 +0000 -@@ -0,0 +1,193 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ * -+ * Implementation of the ChaCha20 stream cipher. -+ * -+ * Information: https://cr.yp.to/chacha.html -+ */ -+ -+#include -+#include "../selftest/run.h" -+ -+#include -+#include -+#include -+#include -+#include // For crypto_xor_cpy. -+ -+#if defined(CONFIG_ZINC_ARCH_X86_64) -+#include "chacha20-x86_64-glue.c" -+#elif defined(CONFIG_ZINC_ARCH_ARM) || defined(CONFIG_ZINC_ARCH_ARM64) -+#include "chacha20-arm-glue.c" -+#elif defined(CONFIG_ZINC_ARCH_MIPS) -+#include "chacha20-mips-glue.c" -+#else -+static bool *const chacha20_nobs[] __initconst = { }; -+static void __init chacha20_fpu_init(void) -+{ -+} -+static inline bool chacha20_arch(struct chacha20_ctx *ctx, u8 *dst, -+ const u8 *src, size_t len, -+ simd_context_t *simd_context) -+{ -+ return false; -+} -+static inline bool hchacha20_arch(u32 derived_key[CHACHA20_KEY_WORDS], -+ const u8 nonce[HCHACHA20_NONCE_SIZE], -+ const u8 key[HCHACHA20_KEY_SIZE], -+ simd_context_t *simd_context) -+{ -+ return false; -+} -+#endif -+ -+#define QUARTER_ROUND(x, a, b, c, d) ( \ -+ x[a] += x[b], \ -+ x[d] = rol32((x[d] ^ x[a]), 16), \ -+ x[c] += x[d], \ -+ x[b] = rol32((x[b] ^ x[c]), 12), \ -+ x[a] += x[b], \ -+ x[d] = rol32((x[d] ^ x[a]), 8), \ -+ x[c] += x[d], \ -+ x[b] = rol32((x[b] ^ x[c]), 7) \ -+) -+ -+#define C(i, j) (i * 4 + j) -+ -+#define DOUBLE_ROUND(x) ( \ -+ /* Column Round */ \ -+ QUARTER_ROUND(x, C(0, 0), C(1, 0), C(2, 0), C(3, 0)), \ -+ QUARTER_ROUND(x, C(0, 1), C(1, 1), C(2, 1), C(3, 1)), \ -+ QUARTER_ROUND(x, C(0, 2), C(1, 2), C(2, 2), C(3, 2)), \ -+ QUARTER_ROUND(x, C(0, 3), C(1, 3), C(2, 3), C(3, 3)), \ -+ /* Diagonal Round */ \ -+ QUARTER_ROUND(x, C(0, 0), C(1, 1), C(2, 2), C(3, 3)), \ -+ QUARTER_ROUND(x, C(0, 1), C(1, 2), C(2, 3), C(3, 0)), \ -+ QUARTER_ROUND(x, C(0, 2), C(1, 3), C(2, 0), C(3, 1)), \ -+ QUARTER_ROUND(x, C(0, 3), C(1, 0), C(2, 1), C(3, 2)) \ -+) -+ -+#define TWENTY_ROUNDS(x) ( \ -+ DOUBLE_ROUND(x), \ -+ DOUBLE_ROUND(x), \ -+ DOUBLE_ROUND(x), \ -+ DOUBLE_ROUND(x), \ -+ DOUBLE_ROUND(x), \ -+ DOUBLE_ROUND(x), \ -+ DOUBLE_ROUND(x), \ -+ DOUBLE_ROUND(x), \ -+ DOUBLE_ROUND(x), \ -+ DOUBLE_ROUND(x) \ -+) -+ -+static void chacha20_block_generic(struct chacha20_ctx *ctx, __le32 *stream) -+{ -+ u32 x[CHACHA20_BLOCK_WORDS]; -+ int i; -+ -+ for (i = 0; i < ARRAY_SIZE(x); ++i) -+ x[i] = ctx->state[i]; -+ -+ TWENTY_ROUNDS(x); -+ -+ for (i = 0; i < ARRAY_SIZE(x); ++i) -+ stream[i] = cpu_to_le32(x[i] + ctx->state[i]); -+ -+ ctx->counter[0] += 1; -+} -+ -+static void chacha20_generic(struct chacha20_ctx *ctx, u8 *out, const u8 *in, -+ u32 len) -+{ -+ __le32 buf[CHACHA20_BLOCK_WORDS]; -+ -+ while (len >= CHACHA20_BLOCK_SIZE) { -+ chacha20_block_generic(ctx, buf); -+ crypto_xor_cpy(out, in, (u8 *)buf, CHACHA20_BLOCK_SIZE); -+ len -= CHACHA20_BLOCK_SIZE; -+ out += CHACHA20_BLOCK_SIZE; -+ in += CHACHA20_BLOCK_SIZE; -+ } -+ if (len) { -+ chacha20_block_generic(ctx, buf); -+ crypto_xor_cpy(out, in, (u8 *)buf, len); -+ } -+} -+ -+void chacha20(struct chacha20_ctx *ctx, u8 *dst, const u8 *src, u32 len, -+ simd_context_t *simd_context) -+{ -+ if (!chacha20_arch(ctx, dst, src, len, simd_context)) -+ chacha20_generic(ctx, dst, src, len); -+} -+EXPORT_SYMBOL(chacha20); -+ -+static void hchacha20_generic(u32 derived_key[CHACHA20_KEY_WORDS], -+ const u8 nonce[HCHACHA20_NONCE_SIZE], -+ const u8 key[HCHACHA20_KEY_SIZE]) -+{ -+ u32 x[] = { CHACHA20_CONSTANT_EXPA, -+ CHACHA20_CONSTANT_ND_3, -+ CHACHA20_CONSTANT_2_BY, -+ CHACHA20_CONSTANT_TE_K, -+ get_unaligned_le32(key + 0), -+ get_unaligned_le32(key + 4), -+ get_unaligned_le32(key + 8), -+ get_unaligned_le32(key + 12), -+ get_unaligned_le32(key + 16), -+ get_unaligned_le32(key + 20), -+ get_unaligned_le32(key + 24), -+ get_unaligned_le32(key + 28), -+ get_unaligned_le32(nonce + 0), -+ get_unaligned_le32(nonce + 4), -+ get_unaligned_le32(nonce + 8), -+ get_unaligned_le32(nonce + 12) -+ }; -+ -+ TWENTY_ROUNDS(x); -+ -+ memcpy(derived_key + 0, x + 0, sizeof(u32) * 4); -+ memcpy(derived_key + 4, x + 12, sizeof(u32) * 4); -+} -+ -+/* Derived key should be 32-bit aligned */ -+void hchacha20(u32 derived_key[CHACHA20_KEY_WORDS], -+ const u8 nonce[HCHACHA20_NONCE_SIZE], -+ const u8 key[HCHACHA20_KEY_SIZE], simd_context_t *simd_context) -+{ -+ if (!hchacha20_arch(derived_key, nonce, key, simd_context)) -+ hchacha20_generic(derived_key, nonce, key); -+} -+EXPORT_SYMBOL(hchacha20); -+ -+#include "../selftest/chacha20.c" -+ -+static bool nosimd __initdata = false; -+ -+#ifndef COMPAT_ZINC_IS_A_MODULE -+int __init chacha20_mod_init(void) -+#else -+static int __init mod_init(void) -+#endif -+{ -+ if (!nosimd) -+ chacha20_fpu_init(); -+ if (!selftest_run("chacha20", chacha20_selftest, chacha20_nobs, -+ ARRAY_SIZE(chacha20_nobs))) -+ return -ENOTRECOVERABLE; -+ return 0; -+} -+ -+#ifdef COMPAT_ZINC_IS_A_MODULE -+static void __exit mod_exit(void) -+{ -+} -+ -+module_param(nosimd, bool, 0); -+module_init(mod_init); -+module_exit(mod_exit); -+MODULE_LICENSE("GPL v2"); -+MODULE_DESCRIPTION("ChaCha20 stream cipher"); -+MODULE_AUTHOR("Jason A. Donenfeld "); -+#endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/chacha20poly1305.c 2019-08-20 20:26:42.398341426 +0000 -@@ -0,0 +1,364 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ * -+ * This is an implementation of the ChaCha20Poly1305 AEAD construction. -+ * -+ * Information: https://tools.ietf.org/html/rfc8439 -+ */ -+ -+#include -+#include -+#include -+#include "selftest/run.h" -+ -+#include -+#include -+#include -+#include -+#include // For blkcipher_walk. -+ -+static const u8 pad0[16] = { 0 }; -+ -+static struct blkcipher_desc desc = { .tfm = &(struct crypto_blkcipher){ -+ .base = { .__crt_alg = &(struct crypto_alg){ -+ .cra_blocksize = 1, -+#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS -+ .cra_alignmask = sizeof(u32) - 1 -+#endif -+ } } -+} }; -+ -+static inline void -+__chacha20poly1305_encrypt(u8 *dst, const u8 *src, const size_t src_len, -+ const u8 *ad, const size_t ad_len, const u64 nonce, -+ const u8 key[CHACHA20POLY1305_KEY_SIZE], -+ simd_context_t *simd_context) -+{ -+ struct poly1305_ctx poly1305_state; -+ struct chacha20_ctx chacha20_state; -+ union { -+ u8 block0[POLY1305_KEY_SIZE]; -+ __le64 lens[2]; -+ } b = { { 0 } }; -+ -+ chacha20_init(&chacha20_state, key, nonce); -+ chacha20(&chacha20_state, b.block0, b.block0, sizeof(b.block0), -+ simd_context); -+ poly1305_init(&poly1305_state, b.block0); -+ -+ poly1305_update(&poly1305_state, ad, ad_len, simd_context); -+ poly1305_update(&poly1305_state, pad0, (0x10 - ad_len) & 0xf, -+ simd_context); -+ -+ chacha20(&chacha20_state, dst, src, src_len, simd_context); -+ -+ poly1305_update(&poly1305_state, dst, src_len, simd_context); -+ poly1305_update(&poly1305_state, pad0, (0x10 - src_len) & 0xf, -+ simd_context); -+ -+ b.lens[0] = cpu_to_le64(ad_len); -+ b.lens[1] = cpu_to_le64(src_len); -+ poly1305_update(&poly1305_state, (u8 *)b.lens, sizeof(b.lens), -+ simd_context); -+ -+ poly1305_final(&poly1305_state, dst + src_len, simd_context); -+ -+ memzero_explicit(&chacha20_state, sizeof(chacha20_state)); -+ memzero_explicit(&b, sizeof(b)); -+} -+ -+void chacha20poly1305_encrypt(u8 *dst, const u8 *src, const size_t src_len, -+ const u8 *ad, const size_t ad_len, -+ const u64 nonce, -+ const u8 key[CHACHA20POLY1305_KEY_SIZE]) -+{ -+ simd_context_t simd_context; -+ -+ simd_get(&simd_context); -+ __chacha20poly1305_encrypt(dst, src, src_len, ad, ad_len, nonce, key, -+ &simd_context); -+ simd_put(&simd_context); -+} -+EXPORT_SYMBOL(chacha20poly1305_encrypt); -+ -+bool chacha20poly1305_encrypt_sg(struct scatterlist *dst, -+ struct scatterlist *src, const size_t src_len, -+ const u8 *ad, const size_t ad_len, -+ const u64 nonce, -+ const u8 key[CHACHA20POLY1305_KEY_SIZE], -+ simd_context_t *simd_context) -+{ -+ struct poly1305_ctx poly1305_state; -+ struct chacha20_ctx chacha20_state; -+ int ret = 0; -+ struct blkcipher_walk walk; -+ union { -+ u8 block0[POLY1305_KEY_SIZE]; -+ u8 mac[POLY1305_MAC_SIZE]; -+ __le64 lens[2]; -+ } b = { { 0 } }; -+ -+ chacha20_init(&chacha20_state, key, nonce); -+ chacha20(&chacha20_state, b.block0, b.block0, sizeof(b.block0), -+ simd_context); -+ poly1305_init(&poly1305_state, b.block0); -+ -+ poly1305_update(&poly1305_state, ad, ad_len, simd_context); -+ poly1305_update(&poly1305_state, pad0, (0x10 - ad_len) & 0xf, -+ simd_context); -+ -+ if (likely(src_len)) { -+ blkcipher_walk_init(&walk, dst, src, src_len); -+ ret = blkcipher_walk_virt_block(&desc, &walk, -+ CHACHA20_BLOCK_SIZE); -+ while (walk.nbytes >= CHACHA20_BLOCK_SIZE) { -+ size_t chunk_len = -+ rounddown(walk.nbytes, CHACHA20_BLOCK_SIZE); -+ -+ chacha20(&chacha20_state, walk.dst.virt.addr, -+ walk.src.virt.addr, chunk_len, simd_context); -+ poly1305_update(&poly1305_state, walk.dst.virt.addr, -+ chunk_len, simd_context); -+ simd_relax(simd_context); -+ ret = blkcipher_walk_done(&desc, &walk, -+ walk.nbytes % CHACHA20_BLOCK_SIZE); -+ } -+ if (walk.nbytes) { -+ chacha20(&chacha20_state, walk.dst.virt.addr, -+ walk.src.virt.addr, walk.nbytes, simd_context); -+ poly1305_update(&poly1305_state, walk.dst.virt.addr, -+ walk.nbytes, simd_context); -+ ret = blkcipher_walk_done(&desc, &walk, 0); -+ } -+ } -+ if (unlikely(ret)) -+ goto err; -+ -+ poly1305_update(&poly1305_state, pad0, (0x10 - src_len) & 0xf, -+ simd_context); -+ -+ b.lens[0] = cpu_to_le64(ad_len); -+ b.lens[1] = cpu_to_le64(src_len); -+ poly1305_update(&poly1305_state, (u8 *)b.lens, sizeof(b.lens), -+ simd_context); -+ -+ poly1305_final(&poly1305_state, b.mac, simd_context); -+ scatterwalk_map_and_copy(b.mac, dst, src_len, sizeof(b.mac), 1); -+err: -+ memzero_explicit(&chacha20_state, sizeof(chacha20_state)); -+ memzero_explicit(&b, sizeof(b)); -+ return !ret; -+} -+EXPORT_SYMBOL(chacha20poly1305_encrypt_sg); -+ -+static inline bool -+__chacha20poly1305_decrypt(u8 *dst, const u8 *src, const size_t src_len, -+ const u8 *ad, const size_t ad_len, const u64 nonce, -+ const u8 key[CHACHA20POLY1305_KEY_SIZE], -+ simd_context_t *simd_context) -+{ -+ struct poly1305_ctx poly1305_state; -+ struct chacha20_ctx chacha20_state; -+ int ret; -+ size_t dst_len; -+ union { -+ u8 block0[POLY1305_KEY_SIZE]; -+ u8 mac[POLY1305_MAC_SIZE]; -+ __le64 lens[2]; -+ } b = { { 0 } }; -+ -+ if (unlikely(src_len < POLY1305_MAC_SIZE)) -+ return false; -+ -+ chacha20_init(&chacha20_state, key, nonce); -+ chacha20(&chacha20_state, b.block0, b.block0, sizeof(b.block0), -+ simd_context); -+ poly1305_init(&poly1305_state, b.block0); -+ -+ poly1305_update(&poly1305_state, ad, ad_len, simd_context); -+ poly1305_update(&poly1305_state, pad0, (0x10 - ad_len) & 0xf, -+ simd_context); -+ -+ dst_len = src_len - POLY1305_MAC_SIZE; -+ poly1305_update(&poly1305_state, src, dst_len, simd_context); -+ poly1305_update(&poly1305_state, pad0, (0x10 - dst_len) & 0xf, -+ simd_context); -+ -+ b.lens[0] = cpu_to_le64(ad_len); -+ b.lens[1] = cpu_to_le64(dst_len); -+ poly1305_update(&poly1305_state, (u8 *)b.lens, sizeof(b.lens), -+ simd_context); -+ -+ poly1305_final(&poly1305_state, b.mac, simd_context); -+ -+ ret = crypto_memneq(b.mac, src + dst_len, POLY1305_MAC_SIZE); -+ if (likely(!ret)) -+ chacha20(&chacha20_state, dst, src, dst_len, simd_context); -+ -+ memzero_explicit(&chacha20_state, sizeof(chacha20_state)); -+ memzero_explicit(&b, sizeof(b)); -+ -+ return !ret; -+} -+ -+bool chacha20poly1305_decrypt(u8 *dst, const u8 *src, const size_t src_len, -+ const u8 *ad, const size_t ad_len, -+ const u64 nonce, -+ const u8 key[CHACHA20POLY1305_KEY_SIZE]) -+{ -+ simd_context_t simd_context, ret; -+ -+ simd_get(&simd_context); -+ ret = __chacha20poly1305_decrypt(dst, src, src_len, ad, ad_len, nonce, -+ key, &simd_context); -+ simd_put(&simd_context); -+ return ret; -+} -+EXPORT_SYMBOL(chacha20poly1305_decrypt); -+ -+bool chacha20poly1305_decrypt_sg(struct scatterlist *dst, -+ struct scatterlist *src, const size_t src_len, -+ const u8 *ad, const size_t ad_len, -+ const u64 nonce, -+ const u8 key[CHACHA20POLY1305_KEY_SIZE], -+ simd_context_t *simd_context) -+{ -+ struct poly1305_ctx poly1305_state; -+ struct chacha20_ctx chacha20_state; -+ struct blkcipher_walk walk; -+ int ret = 0; -+ size_t dst_len; -+ union { -+ u8 block0[POLY1305_KEY_SIZE]; -+ struct { -+ u8 read_mac[POLY1305_MAC_SIZE]; -+ u8 computed_mac[POLY1305_MAC_SIZE]; -+ }; -+ __le64 lens[2]; -+ } b = { { 0 } }; -+ -+ if (unlikely(src_len < POLY1305_MAC_SIZE)) -+ return false; -+ -+ chacha20_init(&chacha20_state, key, nonce); -+ chacha20(&chacha20_state, b.block0, b.block0, sizeof(b.block0), -+ simd_context); -+ poly1305_init(&poly1305_state, b.block0); -+ -+ poly1305_update(&poly1305_state, ad, ad_len, simd_context); -+ poly1305_update(&poly1305_state, pad0, (0x10 - ad_len) & 0xf, -+ simd_context); -+ -+ dst_len = src_len - POLY1305_MAC_SIZE; -+ if (likely(dst_len)) { -+ blkcipher_walk_init(&walk, dst, src, dst_len); -+ ret = blkcipher_walk_virt_block(&desc, &walk, -+ CHACHA20_BLOCK_SIZE); -+ while (walk.nbytes >= CHACHA20_BLOCK_SIZE) { -+ size_t chunk_len = -+ rounddown(walk.nbytes, CHACHA20_BLOCK_SIZE); -+ -+ poly1305_update(&poly1305_state, walk.src.virt.addr, -+ chunk_len, simd_context); -+ chacha20(&chacha20_state, walk.dst.virt.addr, -+ walk.src.virt.addr, chunk_len, simd_context); -+ simd_relax(simd_context); -+ ret = blkcipher_walk_done(&desc, &walk, -+ walk.nbytes % CHACHA20_BLOCK_SIZE); -+ } -+ if (walk.nbytes) { -+ poly1305_update(&poly1305_state, walk.src.virt.addr, -+ walk.nbytes, simd_context); -+ chacha20(&chacha20_state, walk.dst.virt.addr, -+ walk.src.virt.addr, walk.nbytes, simd_context); -+ ret = blkcipher_walk_done(&desc, &walk, 0); -+ } -+ } -+ if (unlikely(ret)) -+ goto err; -+ -+ poly1305_update(&poly1305_state, pad0, (0x10 - dst_len) & 0xf, -+ simd_context); -+ -+ b.lens[0] = cpu_to_le64(ad_len); -+ b.lens[1] = cpu_to_le64(dst_len); -+ poly1305_update(&poly1305_state, (u8 *)b.lens, sizeof(b.lens), -+ simd_context); -+ -+ poly1305_final(&poly1305_state, b.computed_mac, simd_context); -+ -+ scatterwalk_map_and_copy(b.read_mac, src, dst_len, POLY1305_MAC_SIZE, 0); -+ ret = crypto_memneq(b.read_mac, b.computed_mac, POLY1305_MAC_SIZE); -+err: -+ memzero_explicit(&chacha20_state, sizeof(chacha20_state)); -+ memzero_explicit(&b, sizeof(b)); -+ return !ret; -+} -+EXPORT_SYMBOL(chacha20poly1305_decrypt_sg); -+ -+void xchacha20poly1305_encrypt(u8 *dst, const u8 *src, const size_t src_len, -+ const u8 *ad, const size_t ad_len, -+ const u8 nonce[XCHACHA20POLY1305_NONCE_SIZE], -+ const u8 key[CHACHA20POLY1305_KEY_SIZE]) -+{ -+ simd_context_t simd_context; -+ u32 derived_key[CHACHA20_KEY_WORDS] __aligned(16); -+ -+ simd_get(&simd_context); -+ hchacha20(derived_key, nonce, key, &simd_context); -+ cpu_to_le32_array(derived_key, ARRAY_SIZE(derived_key)); -+ __chacha20poly1305_encrypt(dst, src, src_len, ad, ad_len, -+ get_unaligned_le64(nonce + 16), -+ (u8 *)derived_key, &simd_context); -+ memzero_explicit(derived_key, CHACHA20POLY1305_KEY_SIZE); -+ simd_put(&simd_context); -+} -+EXPORT_SYMBOL(xchacha20poly1305_encrypt); -+ -+bool xchacha20poly1305_decrypt(u8 *dst, const u8 *src, const size_t src_len, -+ const u8 *ad, const size_t ad_len, -+ const u8 nonce[XCHACHA20POLY1305_NONCE_SIZE], -+ const u8 key[CHACHA20POLY1305_KEY_SIZE]) -+{ -+ bool ret; -+ simd_context_t simd_context; -+ u32 derived_key[CHACHA20_KEY_WORDS] __aligned(16); -+ -+ simd_get(&simd_context); -+ hchacha20(derived_key, nonce, key, &simd_context); -+ cpu_to_le32_array(derived_key, ARRAY_SIZE(derived_key)); -+ ret = __chacha20poly1305_decrypt(dst, src, src_len, ad, ad_len, -+ get_unaligned_le64(nonce + 16), -+ (u8 *)derived_key, &simd_context); -+ memzero_explicit(derived_key, CHACHA20POLY1305_KEY_SIZE); -+ simd_put(&simd_context); -+ return ret; -+} -+EXPORT_SYMBOL(xchacha20poly1305_decrypt); -+ -+#include "selftest/chacha20poly1305.c" -+ -+#ifndef COMPAT_ZINC_IS_A_MODULE -+int __init chacha20poly1305_mod_init(void) -+#else -+static int __init mod_init(void) -+#endif -+{ -+ if (!selftest_run("chacha20poly1305", chacha20poly1305_selftest, -+ NULL, 0)) -+ return -ENOTRECOVERABLE; -+ return 0; -+} -+ -+#ifdef COMPAT_ZINC_IS_A_MODULE -+static void __exit mod_exit(void) -+{ -+} -+ -+module_init(mod_init); -+module_exit(mod_exit); -+MODULE_LICENSE("GPL v2"); -+MODULE_DESCRIPTION("ChaCha20Poly1305 AEAD construction"); -+MODULE_AUTHOR("Jason A. Donenfeld "); -+#endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/curve25519/curve25519-arm-glue.c 2019-08-20 20:26:42.398341426 +0000 -@@ -0,0 +1,43 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include -+#include -+#include -+ -+asmlinkage void curve25519_neon(u8 mypublic[CURVE25519_KEY_SIZE], -+ const u8 secret[CURVE25519_KEY_SIZE], -+ const u8 basepoint[CURVE25519_KEY_SIZE]); -+ -+static bool curve25519_use_neon __ro_after_init; -+static bool *const curve25519_nobs[] __initconst = { &curve25519_use_neon }; -+static void __init curve25519_fpu_init(void) -+{ -+ curve25519_use_neon = elf_hwcap & HWCAP_NEON; -+} -+ -+static inline bool curve25519_arch(u8 mypublic[CURVE25519_KEY_SIZE], -+ const u8 secret[CURVE25519_KEY_SIZE], -+ const u8 basepoint[CURVE25519_KEY_SIZE]) -+{ -+ simd_context_t simd_context; -+ bool used_arch = false; -+ -+ simd_get(&simd_context); -+ if (IS_ENABLED(CONFIG_KERNEL_MODE_NEON) && -+ !IS_ENABLED(CONFIG_CPU_BIG_ENDIAN) && curve25519_use_neon && -+ simd_use(&simd_context)) { -+ curve25519_neon(mypublic, secret, basepoint); -+ used_arch = true; -+ } -+ simd_put(&simd_context); -+ return used_arch; -+} -+ -+static inline bool curve25519_base_arch(u8 pub[CURVE25519_KEY_SIZE], -+ const u8 secret[CURVE25519_KEY_SIZE]) -+{ -+ return false; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/curve25519/curve25519-fiat32.c 2019-08-20 20:26:42.399341426 +0000 -@@ -0,0 +1,860 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2016 The fiat-crypto Authors. -+ * Copyright (C) 2018-2019 Jason A. Donenfeld . All Rights Reserved. -+ * -+ * This is a machine-generated formally verified implementation of Curve25519 -+ * ECDH from: . Though originally -+ * machine generated, it has been tweaked to be suitable for use in the kernel. -+ * It is optimized for 32-bit machines and machines that cannot work efficiently -+ * with 128-bit integer types. -+ */ -+ -+/* fe means field element. Here the field is \Z/(2^255-19). An element t, -+ * entries t[0]...t[9], represents the integer t[0]+2^26 t[1]+2^51 t[2]+2^77 -+ * t[3]+2^102 t[4]+...+2^230 t[9]. -+ * fe limbs are bounded by 1.125*2^26,1.125*2^25,1.125*2^26,1.125*2^25,etc. -+ * Multiplication and carrying produce fe from fe_loose. -+ */ -+typedef struct fe { u32 v[10]; } fe; -+ -+/* fe_loose limbs are bounded by 3.375*2^26,3.375*2^25,3.375*2^26,3.375*2^25,etc -+ * Addition and subtraction produce fe_loose from (fe, fe). -+ */ -+typedef struct fe_loose { u32 v[10]; } fe_loose; -+ -+static __always_inline void fe_frombytes_impl(u32 h[10], const u8 *s) -+{ -+ /* Ignores top bit of s. */ -+ u32 a0 = get_unaligned_le32(s); -+ u32 a1 = get_unaligned_le32(s+4); -+ u32 a2 = get_unaligned_le32(s+8); -+ u32 a3 = get_unaligned_le32(s+12); -+ u32 a4 = get_unaligned_le32(s+16); -+ u32 a5 = get_unaligned_le32(s+20); -+ u32 a6 = get_unaligned_le32(s+24); -+ u32 a7 = get_unaligned_le32(s+28); -+ h[0] = a0&((1<<26)-1); /* 26 used, 32-26 left. 26 */ -+ h[1] = (a0>>26) | ((a1&((1<<19)-1))<< 6); /* (32-26) + 19 = 6+19 = 25 */ -+ h[2] = (a1>>19) | ((a2&((1<<13)-1))<<13); /* (32-19) + 13 = 13+13 = 26 */ -+ h[3] = (a2>>13) | ((a3&((1<< 6)-1))<<19); /* (32-13) + 6 = 19+ 6 = 25 */ -+ h[4] = (a3>> 6); /* (32- 6) = 26 */ -+ h[5] = a4&((1<<25)-1); /* 25 */ -+ h[6] = (a4>>25) | ((a5&((1<<19)-1))<< 7); /* (32-25) + 19 = 7+19 = 26 */ -+ h[7] = (a5>>19) | ((a6&((1<<12)-1))<<13); /* (32-19) + 12 = 13+12 = 25 */ -+ h[8] = (a6>>12) | ((a7&((1<< 6)-1))<<20); /* (32-12) + 6 = 20+ 6 = 26 */ -+ h[9] = (a7>> 6)&((1<<25)-1); /* 25 */ -+} -+ -+static __always_inline void fe_frombytes(fe *h, const u8 *s) -+{ -+ fe_frombytes_impl(h->v, s); -+} -+ -+static __always_inline u8 /*bool*/ -+addcarryx_u25(u8 /*bool*/ c, u32 a, u32 b, u32 *low) -+{ -+ /* This function extracts 25 bits of result and 1 bit of carry -+ * (26 total), so a 32-bit intermediate is sufficient. -+ */ -+ u32 x = a + b + c; -+ *low = x & ((1 << 25) - 1); -+ return (x >> 25) & 1; -+} -+ -+static __always_inline u8 /*bool*/ -+addcarryx_u26(u8 /*bool*/ c, u32 a, u32 b, u32 *low) -+{ -+ /* This function extracts 26 bits of result and 1 bit of carry -+ * (27 total), so a 32-bit intermediate is sufficient. -+ */ -+ u32 x = a + b + c; -+ *low = x & ((1 << 26) - 1); -+ return (x >> 26) & 1; -+} -+ -+static __always_inline u8 /*bool*/ -+subborrow_u25(u8 /*bool*/ c, u32 a, u32 b, u32 *low) -+{ -+ /* This function extracts 25 bits of result and 1 bit of borrow -+ * (26 total), so a 32-bit intermediate is sufficient. -+ */ -+ u32 x = a - b - c; -+ *low = x & ((1 << 25) - 1); -+ return x >> 31; -+} -+ -+static __always_inline u8 /*bool*/ -+subborrow_u26(u8 /*bool*/ c, u32 a, u32 b, u32 *low) -+{ -+ /* This function extracts 26 bits of result and 1 bit of borrow -+ *(27 total), so a 32-bit intermediate is sufficient. -+ */ -+ u32 x = a - b - c; -+ *low = x & ((1 << 26) - 1); -+ return x >> 31; -+} -+ -+static __always_inline u32 cmovznz32(u32 t, u32 z, u32 nz) -+{ -+ t = -!!t; /* all set if nonzero, 0 if 0 */ -+ return (t&nz) | ((~t)&z); -+} -+ -+static __always_inline void fe_freeze(u32 out[10], const u32 in1[10]) -+{ -+ { const u32 x17 = in1[9]; -+ { const u32 x18 = in1[8]; -+ { const u32 x16 = in1[7]; -+ { const u32 x14 = in1[6]; -+ { const u32 x12 = in1[5]; -+ { const u32 x10 = in1[4]; -+ { const u32 x8 = in1[3]; -+ { const u32 x6 = in1[2]; -+ { const u32 x4 = in1[1]; -+ { const u32 x2 = in1[0]; -+ { u32 x20; u8/*bool*/ x21 = subborrow_u26(0x0, x2, 0x3ffffed, &x20); -+ { u32 x23; u8/*bool*/ x24 = subborrow_u25(x21, x4, 0x1ffffff, &x23); -+ { u32 x26; u8/*bool*/ x27 = subborrow_u26(x24, x6, 0x3ffffff, &x26); -+ { u32 x29; u8/*bool*/ x30 = subborrow_u25(x27, x8, 0x1ffffff, &x29); -+ { u32 x32; u8/*bool*/ x33 = subborrow_u26(x30, x10, 0x3ffffff, &x32); -+ { u32 x35; u8/*bool*/ x36 = subborrow_u25(x33, x12, 0x1ffffff, &x35); -+ { u32 x38; u8/*bool*/ x39 = subborrow_u26(x36, x14, 0x3ffffff, &x38); -+ { u32 x41; u8/*bool*/ x42 = subborrow_u25(x39, x16, 0x1ffffff, &x41); -+ { u32 x44; u8/*bool*/ x45 = subborrow_u26(x42, x18, 0x3ffffff, &x44); -+ { u32 x47; u8/*bool*/ x48 = subborrow_u25(x45, x17, 0x1ffffff, &x47); -+ { u32 x49 = cmovznz32(x48, 0x0, 0xffffffff); -+ { u32 x50 = (x49 & 0x3ffffed); -+ { u32 x52; u8/*bool*/ x53 = addcarryx_u26(0x0, x20, x50, &x52); -+ { u32 x54 = (x49 & 0x1ffffff); -+ { u32 x56; u8/*bool*/ x57 = addcarryx_u25(x53, x23, x54, &x56); -+ { u32 x58 = (x49 & 0x3ffffff); -+ { u32 x60; u8/*bool*/ x61 = addcarryx_u26(x57, x26, x58, &x60); -+ { u32 x62 = (x49 & 0x1ffffff); -+ { u32 x64; u8/*bool*/ x65 = addcarryx_u25(x61, x29, x62, &x64); -+ { u32 x66 = (x49 & 0x3ffffff); -+ { u32 x68; u8/*bool*/ x69 = addcarryx_u26(x65, x32, x66, &x68); -+ { u32 x70 = (x49 & 0x1ffffff); -+ { u32 x72; u8/*bool*/ x73 = addcarryx_u25(x69, x35, x70, &x72); -+ { u32 x74 = (x49 & 0x3ffffff); -+ { u32 x76; u8/*bool*/ x77 = addcarryx_u26(x73, x38, x74, &x76); -+ { u32 x78 = (x49 & 0x1ffffff); -+ { u32 x80; u8/*bool*/ x81 = addcarryx_u25(x77, x41, x78, &x80); -+ { u32 x82 = (x49 & 0x3ffffff); -+ { u32 x84; u8/*bool*/ x85 = addcarryx_u26(x81, x44, x82, &x84); -+ { u32 x86 = (x49 & 0x1ffffff); -+ { u32 x88; addcarryx_u25(x85, x47, x86, &x88); -+ out[0] = x52; -+ out[1] = x56; -+ out[2] = x60; -+ out[3] = x64; -+ out[4] = x68; -+ out[5] = x72; -+ out[6] = x76; -+ out[7] = x80; -+ out[8] = x84; -+ out[9] = x88; -+ }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -+} -+ -+static __always_inline void fe_tobytes(u8 s[32], const fe *f) -+{ -+ u32 h[10]; -+ fe_freeze(h, f->v); -+ s[0] = h[0] >> 0; -+ s[1] = h[0] >> 8; -+ s[2] = h[0] >> 16; -+ s[3] = (h[0] >> 24) | (h[1] << 2); -+ s[4] = h[1] >> 6; -+ s[5] = h[1] >> 14; -+ s[6] = (h[1] >> 22) | (h[2] << 3); -+ s[7] = h[2] >> 5; -+ s[8] = h[2] >> 13; -+ s[9] = (h[2] >> 21) | (h[3] << 5); -+ s[10] = h[3] >> 3; -+ s[11] = h[3] >> 11; -+ s[12] = (h[3] >> 19) | (h[4] << 6); -+ s[13] = h[4] >> 2; -+ s[14] = h[4] >> 10; -+ s[15] = h[4] >> 18; -+ s[16] = h[5] >> 0; -+ s[17] = h[5] >> 8; -+ s[18] = h[5] >> 16; -+ s[19] = (h[5] >> 24) | (h[6] << 1); -+ s[20] = h[6] >> 7; -+ s[21] = h[6] >> 15; -+ s[22] = (h[6] >> 23) | (h[7] << 3); -+ s[23] = h[7] >> 5; -+ s[24] = h[7] >> 13; -+ s[25] = (h[7] >> 21) | (h[8] << 4); -+ s[26] = h[8] >> 4; -+ s[27] = h[8] >> 12; -+ s[28] = (h[8] >> 20) | (h[9] << 6); -+ s[29] = h[9] >> 2; -+ s[30] = h[9] >> 10; -+ s[31] = h[9] >> 18; -+} -+ -+/* h = f */ -+static __always_inline void fe_copy(fe *h, const fe *f) -+{ -+ memmove(h, f, sizeof(u32) * 10); -+} -+ -+static __always_inline void fe_copy_lt(fe_loose *h, const fe *f) -+{ -+ memmove(h, f, sizeof(u32) * 10); -+} -+ -+/* h = 0 */ -+static __always_inline void fe_0(fe *h) -+{ -+ memset(h, 0, sizeof(u32) * 10); -+} -+ -+/* h = 1 */ -+static __always_inline void fe_1(fe *h) -+{ -+ memset(h, 0, sizeof(u32) * 10); -+ h->v[0] = 1; -+} -+ -+static void fe_add_impl(u32 out[10], const u32 in1[10], const u32 in2[10]) -+{ -+ { const u32 x20 = in1[9]; -+ { const u32 x21 = in1[8]; -+ { const u32 x19 = in1[7]; -+ { const u32 x17 = in1[6]; -+ { const u32 x15 = in1[5]; -+ { const u32 x13 = in1[4]; -+ { const u32 x11 = in1[3]; -+ { const u32 x9 = in1[2]; -+ { const u32 x7 = in1[1]; -+ { const u32 x5 = in1[0]; -+ { const u32 x38 = in2[9]; -+ { const u32 x39 = in2[8]; -+ { const u32 x37 = in2[7]; -+ { const u32 x35 = in2[6]; -+ { const u32 x33 = in2[5]; -+ { const u32 x31 = in2[4]; -+ { const u32 x29 = in2[3]; -+ { const u32 x27 = in2[2]; -+ { const u32 x25 = in2[1]; -+ { const u32 x23 = in2[0]; -+ out[0] = (x5 + x23); -+ out[1] = (x7 + x25); -+ out[2] = (x9 + x27); -+ out[3] = (x11 + x29); -+ out[4] = (x13 + x31); -+ out[5] = (x15 + x33); -+ out[6] = (x17 + x35); -+ out[7] = (x19 + x37); -+ out[8] = (x21 + x39); -+ out[9] = (x20 + x38); -+ }}}}}}}}}}}}}}}}}}}} -+} -+ -+/* h = f + g -+ * Can overlap h with f or g. -+ */ -+static __always_inline void fe_add(fe_loose *h, const fe *f, const fe *g) -+{ -+ fe_add_impl(h->v, f->v, g->v); -+} -+ -+static void fe_sub_impl(u32 out[10], const u32 in1[10], const u32 in2[10]) -+{ -+ { const u32 x20 = in1[9]; -+ { const u32 x21 = in1[8]; -+ { const u32 x19 = in1[7]; -+ { const u32 x17 = in1[6]; -+ { const u32 x15 = in1[5]; -+ { const u32 x13 = in1[4]; -+ { const u32 x11 = in1[3]; -+ { const u32 x9 = in1[2]; -+ { const u32 x7 = in1[1]; -+ { const u32 x5 = in1[0]; -+ { const u32 x38 = in2[9]; -+ { const u32 x39 = in2[8]; -+ { const u32 x37 = in2[7]; -+ { const u32 x35 = in2[6]; -+ { const u32 x33 = in2[5]; -+ { const u32 x31 = in2[4]; -+ { const u32 x29 = in2[3]; -+ { const u32 x27 = in2[2]; -+ { const u32 x25 = in2[1]; -+ { const u32 x23 = in2[0]; -+ out[0] = ((0x7ffffda + x5) - x23); -+ out[1] = ((0x3fffffe + x7) - x25); -+ out[2] = ((0x7fffffe + x9) - x27); -+ out[3] = ((0x3fffffe + x11) - x29); -+ out[4] = ((0x7fffffe + x13) - x31); -+ out[5] = ((0x3fffffe + x15) - x33); -+ out[6] = ((0x7fffffe + x17) - x35); -+ out[7] = ((0x3fffffe + x19) - x37); -+ out[8] = ((0x7fffffe + x21) - x39); -+ out[9] = ((0x3fffffe + x20) - x38); -+ }}}}}}}}}}}}}}}}}}}} -+} -+ -+/* h = f - g -+ * Can overlap h with f or g. -+ */ -+static __always_inline void fe_sub(fe_loose *h, const fe *f, const fe *g) -+{ -+ fe_sub_impl(h->v, f->v, g->v); -+} -+ -+static void fe_mul_impl(u32 out[10], const u32 in1[10], const u32 in2[10]) -+{ -+ { const u32 x20 = in1[9]; -+ { const u32 x21 = in1[8]; -+ { const u32 x19 = in1[7]; -+ { const u32 x17 = in1[6]; -+ { const u32 x15 = in1[5]; -+ { const u32 x13 = in1[4]; -+ { const u32 x11 = in1[3]; -+ { const u32 x9 = in1[2]; -+ { const u32 x7 = in1[1]; -+ { const u32 x5 = in1[0]; -+ { const u32 x38 = in2[9]; -+ { const u32 x39 = in2[8]; -+ { const u32 x37 = in2[7]; -+ { const u32 x35 = in2[6]; -+ { const u32 x33 = in2[5]; -+ { const u32 x31 = in2[4]; -+ { const u32 x29 = in2[3]; -+ { const u32 x27 = in2[2]; -+ { const u32 x25 = in2[1]; -+ { const u32 x23 = in2[0]; -+ { u64 x40 = ((u64)x23 * x5); -+ { u64 x41 = (((u64)x23 * x7) + ((u64)x25 * x5)); -+ { u64 x42 = ((((u64)(0x2 * x25) * x7) + ((u64)x23 * x9)) + ((u64)x27 * x5)); -+ { u64 x43 = (((((u64)x25 * x9) + ((u64)x27 * x7)) + ((u64)x23 * x11)) + ((u64)x29 * x5)); -+ { u64 x44 = (((((u64)x27 * x9) + (0x2 * (((u64)x25 * x11) + ((u64)x29 * x7)))) + ((u64)x23 * x13)) + ((u64)x31 * x5)); -+ { u64 x45 = (((((((u64)x27 * x11) + ((u64)x29 * x9)) + ((u64)x25 * x13)) + ((u64)x31 * x7)) + ((u64)x23 * x15)) + ((u64)x33 * x5)); -+ { u64 x46 = (((((0x2 * ((((u64)x29 * x11) + ((u64)x25 * x15)) + ((u64)x33 * x7))) + ((u64)x27 * x13)) + ((u64)x31 * x9)) + ((u64)x23 * x17)) + ((u64)x35 * x5)); -+ { u64 x47 = (((((((((u64)x29 * x13) + ((u64)x31 * x11)) + ((u64)x27 * x15)) + ((u64)x33 * x9)) + ((u64)x25 * x17)) + ((u64)x35 * x7)) + ((u64)x23 * x19)) + ((u64)x37 * x5)); -+ { u64 x48 = (((((((u64)x31 * x13) + (0x2 * (((((u64)x29 * x15) + ((u64)x33 * x11)) + ((u64)x25 * x19)) + ((u64)x37 * x7)))) + ((u64)x27 * x17)) + ((u64)x35 * x9)) + ((u64)x23 * x21)) + ((u64)x39 * x5)); -+ { u64 x49 = (((((((((((u64)x31 * x15) + ((u64)x33 * x13)) + ((u64)x29 * x17)) + ((u64)x35 * x11)) + ((u64)x27 * x19)) + ((u64)x37 * x9)) + ((u64)x25 * x21)) + ((u64)x39 * x7)) + ((u64)x23 * x20)) + ((u64)x38 * x5)); -+ { u64 x50 = (((((0x2 * ((((((u64)x33 * x15) + ((u64)x29 * x19)) + ((u64)x37 * x11)) + ((u64)x25 * x20)) + ((u64)x38 * x7))) + ((u64)x31 * x17)) + ((u64)x35 * x13)) + ((u64)x27 * x21)) + ((u64)x39 * x9)); -+ { u64 x51 = (((((((((u64)x33 * x17) + ((u64)x35 * x15)) + ((u64)x31 * x19)) + ((u64)x37 * x13)) + ((u64)x29 * x21)) + ((u64)x39 * x11)) + ((u64)x27 * x20)) + ((u64)x38 * x9)); -+ { u64 x52 = (((((u64)x35 * x17) + (0x2 * (((((u64)x33 * x19) + ((u64)x37 * x15)) + ((u64)x29 * x20)) + ((u64)x38 * x11)))) + ((u64)x31 * x21)) + ((u64)x39 * x13)); -+ { u64 x53 = (((((((u64)x35 * x19) + ((u64)x37 * x17)) + ((u64)x33 * x21)) + ((u64)x39 * x15)) + ((u64)x31 * x20)) + ((u64)x38 * x13)); -+ { u64 x54 = (((0x2 * ((((u64)x37 * x19) + ((u64)x33 * x20)) + ((u64)x38 * x15))) + ((u64)x35 * x21)) + ((u64)x39 * x17)); -+ { u64 x55 = (((((u64)x37 * x21) + ((u64)x39 * x19)) + ((u64)x35 * x20)) + ((u64)x38 * x17)); -+ { u64 x56 = (((u64)x39 * x21) + (0x2 * (((u64)x37 * x20) + ((u64)x38 * x19)))); -+ { u64 x57 = (((u64)x39 * x20) + ((u64)x38 * x21)); -+ { u64 x58 = ((u64)(0x2 * x38) * x20); -+ { u64 x59 = (x48 + (x58 << 0x4)); -+ { u64 x60 = (x59 + (x58 << 0x1)); -+ { u64 x61 = (x60 + x58); -+ { u64 x62 = (x47 + (x57 << 0x4)); -+ { u64 x63 = (x62 + (x57 << 0x1)); -+ { u64 x64 = (x63 + x57); -+ { u64 x65 = (x46 + (x56 << 0x4)); -+ { u64 x66 = (x65 + (x56 << 0x1)); -+ { u64 x67 = (x66 + x56); -+ { u64 x68 = (x45 + (x55 << 0x4)); -+ { u64 x69 = (x68 + (x55 << 0x1)); -+ { u64 x70 = (x69 + x55); -+ { u64 x71 = (x44 + (x54 << 0x4)); -+ { u64 x72 = (x71 + (x54 << 0x1)); -+ { u64 x73 = (x72 + x54); -+ { u64 x74 = (x43 + (x53 << 0x4)); -+ { u64 x75 = (x74 + (x53 << 0x1)); -+ { u64 x76 = (x75 + x53); -+ { u64 x77 = (x42 + (x52 << 0x4)); -+ { u64 x78 = (x77 + (x52 << 0x1)); -+ { u64 x79 = (x78 + x52); -+ { u64 x80 = (x41 + (x51 << 0x4)); -+ { u64 x81 = (x80 + (x51 << 0x1)); -+ { u64 x82 = (x81 + x51); -+ { u64 x83 = (x40 + (x50 << 0x4)); -+ { u64 x84 = (x83 + (x50 << 0x1)); -+ { u64 x85 = (x84 + x50); -+ { u64 x86 = (x85 >> 0x1a); -+ { u32 x87 = ((u32)x85 & 0x3ffffff); -+ { u64 x88 = (x86 + x82); -+ { u64 x89 = (x88 >> 0x19); -+ { u32 x90 = ((u32)x88 & 0x1ffffff); -+ { u64 x91 = (x89 + x79); -+ { u64 x92 = (x91 >> 0x1a); -+ { u32 x93 = ((u32)x91 & 0x3ffffff); -+ { u64 x94 = (x92 + x76); -+ { u64 x95 = (x94 >> 0x19); -+ { u32 x96 = ((u32)x94 & 0x1ffffff); -+ { u64 x97 = (x95 + x73); -+ { u64 x98 = (x97 >> 0x1a); -+ { u32 x99 = ((u32)x97 & 0x3ffffff); -+ { u64 x100 = (x98 + x70); -+ { u64 x101 = (x100 >> 0x19); -+ { u32 x102 = ((u32)x100 & 0x1ffffff); -+ { u64 x103 = (x101 + x67); -+ { u64 x104 = (x103 >> 0x1a); -+ { u32 x105 = ((u32)x103 & 0x3ffffff); -+ { u64 x106 = (x104 + x64); -+ { u64 x107 = (x106 >> 0x19); -+ { u32 x108 = ((u32)x106 & 0x1ffffff); -+ { u64 x109 = (x107 + x61); -+ { u64 x110 = (x109 >> 0x1a); -+ { u32 x111 = ((u32)x109 & 0x3ffffff); -+ { u64 x112 = (x110 + x49); -+ { u64 x113 = (x112 >> 0x19); -+ { u32 x114 = ((u32)x112 & 0x1ffffff); -+ { u64 x115 = (x87 + (0x13 * x113)); -+ { u32 x116 = (u32) (x115 >> 0x1a); -+ { u32 x117 = ((u32)x115 & 0x3ffffff); -+ { u32 x118 = (x116 + x90); -+ { u32 x119 = (x118 >> 0x19); -+ { u32 x120 = (x118 & 0x1ffffff); -+ out[0] = x117; -+ out[1] = x120; -+ out[2] = (x119 + x93); -+ out[3] = x96; -+ out[4] = x99; -+ out[5] = x102; -+ out[6] = x105; -+ out[7] = x108; -+ out[8] = x111; -+ out[9] = x114; -+ }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -+} -+ -+static __always_inline void fe_mul_ttt(fe *h, const fe *f, const fe *g) -+{ -+ fe_mul_impl(h->v, f->v, g->v); -+} -+ -+static __always_inline void fe_mul_tlt(fe *h, const fe_loose *f, const fe *g) -+{ -+ fe_mul_impl(h->v, f->v, g->v); -+} -+ -+static __always_inline void -+fe_mul_tll(fe *h, const fe_loose *f, const fe_loose *g) -+{ -+ fe_mul_impl(h->v, f->v, g->v); -+} -+ -+static void fe_sqr_impl(u32 out[10], const u32 in1[10]) -+{ -+ { const u32 x17 = in1[9]; -+ { const u32 x18 = in1[8]; -+ { const u32 x16 = in1[7]; -+ { const u32 x14 = in1[6]; -+ { const u32 x12 = in1[5]; -+ { const u32 x10 = in1[4]; -+ { const u32 x8 = in1[3]; -+ { const u32 x6 = in1[2]; -+ { const u32 x4 = in1[1]; -+ { const u32 x2 = in1[0]; -+ { u64 x19 = ((u64)x2 * x2); -+ { u64 x20 = ((u64)(0x2 * x2) * x4); -+ { u64 x21 = (0x2 * (((u64)x4 * x4) + ((u64)x2 * x6))); -+ { u64 x22 = (0x2 * (((u64)x4 * x6) + ((u64)x2 * x8))); -+ { u64 x23 = ((((u64)x6 * x6) + ((u64)(0x4 * x4) * x8)) + ((u64)(0x2 * x2) * x10)); -+ { u64 x24 = (0x2 * ((((u64)x6 * x8) + ((u64)x4 * x10)) + ((u64)x2 * x12))); -+ { u64 x25 = (0x2 * (((((u64)x8 * x8) + ((u64)x6 * x10)) + ((u64)x2 * x14)) + ((u64)(0x2 * x4) * x12))); -+ { u64 x26 = (0x2 * (((((u64)x8 * x10) + ((u64)x6 * x12)) + ((u64)x4 * x14)) + ((u64)x2 * x16))); -+ { u64 x27 = (((u64)x10 * x10) + (0x2 * ((((u64)x6 * x14) + ((u64)x2 * x18)) + (0x2 * (((u64)x4 * x16) + ((u64)x8 * x12)))))); -+ { u64 x28 = (0x2 * ((((((u64)x10 * x12) + ((u64)x8 * x14)) + ((u64)x6 * x16)) + ((u64)x4 * x18)) + ((u64)x2 * x17))); -+ { u64 x29 = (0x2 * (((((u64)x12 * x12) + ((u64)x10 * x14)) + ((u64)x6 * x18)) + (0x2 * (((u64)x8 * x16) + ((u64)x4 * x17))))); -+ { u64 x30 = (0x2 * (((((u64)x12 * x14) + ((u64)x10 * x16)) + ((u64)x8 * x18)) + ((u64)x6 * x17))); -+ { u64 x31 = (((u64)x14 * x14) + (0x2 * (((u64)x10 * x18) + (0x2 * (((u64)x12 * x16) + ((u64)x8 * x17)))))); -+ { u64 x32 = (0x2 * ((((u64)x14 * x16) + ((u64)x12 * x18)) + ((u64)x10 * x17))); -+ { u64 x33 = (0x2 * ((((u64)x16 * x16) + ((u64)x14 * x18)) + ((u64)(0x2 * x12) * x17))); -+ { u64 x34 = (0x2 * (((u64)x16 * x18) + ((u64)x14 * x17))); -+ { u64 x35 = (((u64)x18 * x18) + ((u64)(0x4 * x16) * x17)); -+ { u64 x36 = ((u64)(0x2 * x18) * x17); -+ { u64 x37 = ((u64)(0x2 * x17) * x17); -+ { u64 x38 = (x27 + (x37 << 0x4)); -+ { u64 x39 = (x38 + (x37 << 0x1)); -+ { u64 x40 = (x39 + x37); -+ { u64 x41 = (x26 + (x36 << 0x4)); -+ { u64 x42 = (x41 + (x36 << 0x1)); -+ { u64 x43 = (x42 + x36); -+ { u64 x44 = (x25 + (x35 << 0x4)); -+ { u64 x45 = (x44 + (x35 << 0x1)); -+ { u64 x46 = (x45 + x35); -+ { u64 x47 = (x24 + (x34 << 0x4)); -+ { u64 x48 = (x47 + (x34 << 0x1)); -+ { u64 x49 = (x48 + x34); -+ { u64 x50 = (x23 + (x33 << 0x4)); -+ { u64 x51 = (x50 + (x33 << 0x1)); -+ { u64 x52 = (x51 + x33); -+ { u64 x53 = (x22 + (x32 << 0x4)); -+ { u64 x54 = (x53 + (x32 << 0x1)); -+ { u64 x55 = (x54 + x32); -+ { u64 x56 = (x21 + (x31 << 0x4)); -+ { u64 x57 = (x56 + (x31 << 0x1)); -+ { u64 x58 = (x57 + x31); -+ { u64 x59 = (x20 + (x30 << 0x4)); -+ { u64 x60 = (x59 + (x30 << 0x1)); -+ { u64 x61 = (x60 + x30); -+ { u64 x62 = (x19 + (x29 << 0x4)); -+ { u64 x63 = (x62 + (x29 << 0x1)); -+ { u64 x64 = (x63 + x29); -+ { u64 x65 = (x64 >> 0x1a); -+ { u32 x66 = ((u32)x64 & 0x3ffffff); -+ { u64 x67 = (x65 + x61); -+ { u64 x68 = (x67 >> 0x19); -+ { u32 x69 = ((u32)x67 & 0x1ffffff); -+ { u64 x70 = (x68 + x58); -+ { u64 x71 = (x70 >> 0x1a); -+ { u32 x72 = ((u32)x70 & 0x3ffffff); -+ { u64 x73 = (x71 + x55); -+ { u64 x74 = (x73 >> 0x19); -+ { u32 x75 = ((u32)x73 & 0x1ffffff); -+ { u64 x76 = (x74 + x52); -+ { u64 x77 = (x76 >> 0x1a); -+ { u32 x78 = ((u32)x76 & 0x3ffffff); -+ { u64 x79 = (x77 + x49); -+ { u64 x80 = (x79 >> 0x19); -+ { u32 x81 = ((u32)x79 & 0x1ffffff); -+ { u64 x82 = (x80 + x46); -+ { u64 x83 = (x82 >> 0x1a); -+ { u32 x84 = ((u32)x82 & 0x3ffffff); -+ { u64 x85 = (x83 + x43); -+ { u64 x86 = (x85 >> 0x19); -+ { u32 x87 = ((u32)x85 & 0x1ffffff); -+ { u64 x88 = (x86 + x40); -+ { u64 x89 = (x88 >> 0x1a); -+ { u32 x90 = ((u32)x88 & 0x3ffffff); -+ { u64 x91 = (x89 + x28); -+ { u64 x92 = (x91 >> 0x19); -+ { u32 x93 = ((u32)x91 & 0x1ffffff); -+ { u64 x94 = (x66 + (0x13 * x92)); -+ { u32 x95 = (u32) (x94 >> 0x1a); -+ { u32 x96 = ((u32)x94 & 0x3ffffff); -+ { u32 x97 = (x95 + x69); -+ { u32 x98 = (x97 >> 0x19); -+ { u32 x99 = (x97 & 0x1ffffff); -+ out[0] = x96; -+ out[1] = x99; -+ out[2] = (x98 + x72); -+ out[3] = x75; -+ out[4] = x78; -+ out[5] = x81; -+ out[6] = x84; -+ out[7] = x87; -+ out[8] = x90; -+ out[9] = x93; -+ }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -+} -+ -+static __always_inline void fe_sq_tl(fe *h, const fe_loose *f) -+{ -+ fe_sqr_impl(h->v, f->v); -+} -+ -+static __always_inline void fe_sq_tt(fe *h, const fe *f) -+{ -+ fe_sqr_impl(h->v, f->v); -+} -+ -+static __always_inline void fe_loose_invert(fe *out, const fe_loose *z) -+{ -+ fe t0; -+ fe t1; -+ fe t2; -+ fe t3; -+ int i; -+ -+ fe_sq_tl(&t0, z); -+ fe_sq_tt(&t1, &t0); -+ for (i = 1; i < 2; ++i) -+ fe_sq_tt(&t1, &t1); -+ fe_mul_tlt(&t1, z, &t1); -+ fe_mul_ttt(&t0, &t0, &t1); -+ fe_sq_tt(&t2, &t0); -+ fe_mul_ttt(&t1, &t1, &t2); -+ fe_sq_tt(&t2, &t1); -+ for (i = 1; i < 5; ++i) -+ fe_sq_tt(&t2, &t2); -+ fe_mul_ttt(&t1, &t2, &t1); -+ fe_sq_tt(&t2, &t1); -+ for (i = 1; i < 10; ++i) -+ fe_sq_tt(&t2, &t2); -+ fe_mul_ttt(&t2, &t2, &t1); -+ fe_sq_tt(&t3, &t2); -+ for (i = 1; i < 20; ++i) -+ fe_sq_tt(&t3, &t3); -+ fe_mul_ttt(&t2, &t3, &t2); -+ fe_sq_tt(&t2, &t2); -+ for (i = 1; i < 10; ++i) -+ fe_sq_tt(&t2, &t2); -+ fe_mul_ttt(&t1, &t2, &t1); -+ fe_sq_tt(&t2, &t1); -+ for (i = 1; i < 50; ++i) -+ fe_sq_tt(&t2, &t2); -+ fe_mul_ttt(&t2, &t2, &t1); -+ fe_sq_tt(&t3, &t2); -+ for (i = 1; i < 100; ++i) -+ fe_sq_tt(&t3, &t3); -+ fe_mul_ttt(&t2, &t3, &t2); -+ fe_sq_tt(&t2, &t2); -+ for (i = 1; i < 50; ++i) -+ fe_sq_tt(&t2, &t2); -+ fe_mul_ttt(&t1, &t2, &t1); -+ fe_sq_tt(&t1, &t1); -+ for (i = 1; i < 5; ++i) -+ fe_sq_tt(&t1, &t1); -+ fe_mul_ttt(out, &t1, &t0); -+} -+ -+static __always_inline void fe_invert(fe *out, const fe *z) -+{ -+ fe_loose l; -+ fe_copy_lt(&l, z); -+ fe_loose_invert(out, &l); -+} -+ -+/* Replace (f,g) with (g,f) if b == 1; -+ * replace (f,g) with (f,g) if b == 0. -+ * -+ * Preconditions: b in {0,1} -+ */ -+static __always_inline void fe_cswap(fe *f, fe *g, unsigned int b) -+{ -+ unsigned i; -+ b = 0 - b; -+ for (i = 0; i < 10; i++) { -+ u32 x = f->v[i] ^ g->v[i]; -+ x &= b; -+ f->v[i] ^= x; -+ g->v[i] ^= x; -+ } -+} -+ -+/* NOTE: based on fiat-crypto fe_mul, edited for in2=121666, 0, 0.*/ -+static __always_inline void fe_mul_121666_impl(u32 out[10], const u32 in1[10]) -+{ -+ { const u32 x20 = in1[9]; -+ { const u32 x21 = in1[8]; -+ { const u32 x19 = in1[7]; -+ { const u32 x17 = in1[6]; -+ { const u32 x15 = in1[5]; -+ { const u32 x13 = in1[4]; -+ { const u32 x11 = in1[3]; -+ { const u32 x9 = in1[2]; -+ { const u32 x7 = in1[1]; -+ { const u32 x5 = in1[0]; -+ { const u32 x38 = 0; -+ { const u32 x39 = 0; -+ { const u32 x37 = 0; -+ { const u32 x35 = 0; -+ { const u32 x33 = 0; -+ { const u32 x31 = 0; -+ { const u32 x29 = 0; -+ { const u32 x27 = 0; -+ { const u32 x25 = 0; -+ { const u32 x23 = 121666; -+ { u64 x40 = ((u64)x23 * x5); -+ { u64 x41 = (((u64)x23 * x7) + ((u64)x25 * x5)); -+ { u64 x42 = ((((u64)(0x2 * x25) * x7) + ((u64)x23 * x9)) + ((u64)x27 * x5)); -+ { u64 x43 = (((((u64)x25 * x9) + ((u64)x27 * x7)) + ((u64)x23 * x11)) + ((u64)x29 * x5)); -+ { u64 x44 = (((((u64)x27 * x9) + (0x2 * (((u64)x25 * x11) + ((u64)x29 * x7)))) + ((u64)x23 * x13)) + ((u64)x31 * x5)); -+ { u64 x45 = (((((((u64)x27 * x11) + ((u64)x29 * x9)) + ((u64)x25 * x13)) + ((u64)x31 * x7)) + ((u64)x23 * x15)) + ((u64)x33 * x5)); -+ { u64 x46 = (((((0x2 * ((((u64)x29 * x11) + ((u64)x25 * x15)) + ((u64)x33 * x7))) + ((u64)x27 * x13)) + ((u64)x31 * x9)) + ((u64)x23 * x17)) + ((u64)x35 * x5)); -+ { u64 x47 = (((((((((u64)x29 * x13) + ((u64)x31 * x11)) + ((u64)x27 * x15)) + ((u64)x33 * x9)) + ((u64)x25 * x17)) + ((u64)x35 * x7)) + ((u64)x23 * x19)) + ((u64)x37 * x5)); -+ { u64 x48 = (((((((u64)x31 * x13) + (0x2 * (((((u64)x29 * x15) + ((u64)x33 * x11)) + ((u64)x25 * x19)) + ((u64)x37 * x7)))) + ((u64)x27 * x17)) + ((u64)x35 * x9)) + ((u64)x23 * x21)) + ((u64)x39 * x5)); -+ { u64 x49 = (((((((((((u64)x31 * x15) + ((u64)x33 * x13)) + ((u64)x29 * x17)) + ((u64)x35 * x11)) + ((u64)x27 * x19)) + ((u64)x37 * x9)) + ((u64)x25 * x21)) + ((u64)x39 * x7)) + ((u64)x23 * x20)) + ((u64)x38 * x5)); -+ { u64 x50 = (((((0x2 * ((((((u64)x33 * x15) + ((u64)x29 * x19)) + ((u64)x37 * x11)) + ((u64)x25 * x20)) + ((u64)x38 * x7))) + ((u64)x31 * x17)) + ((u64)x35 * x13)) + ((u64)x27 * x21)) + ((u64)x39 * x9)); -+ { u64 x51 = (((((((((u64)x33 * x17) + ((u64)x35 * x15)) + ((u64)x31 * x19)) + ((u64)x37 * x13)) + ((u64)x29 * x21)) + ((u64)x39 * x11)) + ((u64)x27 * x20)) + ((u64)x38 * x9)); -+ { u64 x52 = (((((u64)x35 * x17) + (0x2 * (((((u64)x33 * x19) + ((u64)x37 * x15)) + ((u64)x29 * x20)) + ((u64)x38 * x11)))) + ((u64)x31 * x21)) + ((u64)x39 * x13)); -+ { u64 x53 = (((((((u64)x35 * x19) + ((u64)x37 * x17)) + ((u64)x33 * x21)) + ((u64)x39 * x15)) + ((u64)x31 * x20)) + ((u64)x38 * x13)); -+ { u64 x54 = (((0x2 * ((((u64)x37 * x19) + ((u64)x33 * x20)) + ((u64)x38 * x15))) + ((u64)x35 * x21)) + ((u64)x39 * x17)); -+ { u64 x55 = (((((u64)x37 * x21) + ((u64)x39 * x19)) + ((u64)x35 * x20)) + ((u64)x38 * x17)); -+ { u64 x56 = (((u64)x39 * x21) + (0x2 * (((u64)x37 * x20) + ((u64)x38 * x19)))); -+ { u64 x57 = (((u64)x39 * x20) + ((u64)x38 * x21)); -+ { u64 x58 = ((u64)(0x2 * x38) * x20); -+ { u64 x59 = (x48 + (x58 << 0x4)); -+ { u64 x60 = (x59 + (x58 << 0x1)); -+ { u64 x61 = (x60 + x58); -+ { u64 x62 = (x47 + (x57 << 0x4)); -+ { u64 x63 = (x62 + (x57 << 0x1)); -+ { u64 x64 = (x63 + x57); -+ { u64 x65 = (x46 + (x56 << 0x4)); -+ { u64 x66 = (x65 + (x56 << 0x1)); -+ { u64 x67 = (x66 + x56); -+ { u64 x68 = (x45 + (x55 << 0x4)); -+ { u64 x69 = (x68 + (x55 << 0x1)); -+ { u64 x70 = (x69 + x55); -+ { u64 x71 = (x44 + (x54 << 0x4)); -+ { u64 x72 = (x71 + (x54 << 0x1)); -+ { u64 x73 = (x72 + x54); -+ { u64 x74 = (x43 + (x53 << 0x4)); -+ { u64 x75 = (x74 + (x53 << 0x1)); -+ { u64 x76 = (x75 + x53); -+ { u64 x77 = (x42 + (x52 << 0x4)); -+ { u64 x78 = (x77 + (x52 << 0x1)); -+ { u64 x79 = (x78 + x52); -+ { u64 x80 = (x41 + (x51 << 0x4)); -+ { u64 x81 = (x80 + (x51 << 0x1)); -+ { u64 x82 = (x81 + x51); -+ { u64 x83 = (x40 + (x50 << 0x4)); -+ { u64 x84 = (x83 + (x50 << 0x1)); -+ { u64 x85 = (x84 + x50); -+ { u64 x86 = (x85 >> 0x1a); -+ { u32 x87 = ((u32)x85 & 0x3ffffff); -+ { u64 x88 = (x86 + x82); -+ { u64 x89 = (x88 >> 0x19); -+ { u32 x90 = ((u32)x88 & 0x1ffffff); -+ { u64 x91 = (x89 + x79); -+ { u64 x92 = (x91 >> 0x1a); -+ { u32 x93 = ((u32)x91 & 0x3ffffff); -+ { u64 x94 = (x92 + x76); -+ { u64 x95 = (x94 >> 0x19); -+ { u32 x96 = ((u32)x94 & 0x1ffffff); -+ { u64 x97 = (x95 + x73); -+ { u64 x98 = (x97 >> 0x1a); -+ { u32 x99 = ((u32)x97 & 0x3ffffff); -+ { u64 x100 = (x98 + x70); -+ { u64 x101 = (x100 >> 0x19); -+ { u32 x102 = ((u32)x100 & 0x1ffffff); -+ { u64 x103 = (x101 + x67); -+ { u64 x104 = (x103 >> 0x1a); -+ { u32 x105 = ((u32)x103 & 0x3ffffff); -+ { u64 x106 = (x104 + x64); -+ { u64 x107 = (x106 >> 0x19); -+ { u32 x108 = ((u32)x106 & 0x1ffffff); -+ { u64 x109 = (x107 + x61); -+ { u64 x110 = (x109 >> 0x1a); -+ { u32 x111 = ((u32)x109 & 0x3ffffff); -+ { u64 x112 = (x110 + x49); -+ { u64 x113 = (x112 >> 0x19); -+ { u32 x114 = ((u32)x112 & 0x1ffffff); -+ { u64 x115 = (x87 + (0x13 * x113)); -+ { u32 x116 = (u32) (x115 >> 0x1a); -+ { u32 x117 = ((u32)x115 & 0x3ffffff); -+ { u32 x118 = (x116 + x90); -+ { u32 x119 = (x118 >> 0x19); -+ { u32 x120 = (x118 & 0x1ffffff); -+ out[0] = x117; -+ out[1] = x120; -+ out[2] = (x119 + x93); -+ out[3] = x96; -+ out[4] = x99; -+ out[5] = x102; -+ out[6] = x105; -+ out[7] = x108; -+ out[8] = x111; -+ out[9] = x114; -+ }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -+} -+ -+static __always_inline void fe_mul121666(fe *h, const fe_loose *f) -+{ -+ fe_mul_121666_impl(h->v, f->v); -+} -+ -+static void curve25519_generic(u8 out[CURVE25519_KEY_SIZE], -+ const u8 scalar[CURVE25519_KEY_SIZE], -+ const u8 point[CURVE25519_KEY_SIZE]) -+{ -+ fe x1, x2, z2, x3, z3; -+ fe_loose x2l, z2l, x3l; -+ unsigned swap = 0; -+ int pos; -+ u8 e[32]; -+ -+ memcpy(e, scalar, 32); -+ curve25519_clamp_secret(e); -+ -+ /* The following implementation was transcribed to Coq and proven to -+ * correspond to unary scalar multiplication in affine coordinates given -+ * that x1 != 0 is the x coordinate of some point on the curve. It was -+ * also checked in Coq that doing a ladderstep with x1 = x3 = 0 gives -+ * z2' = z3' = 0, and z2 = z3 = 0 gives z2' = z3' = 0. The statement was -+ * quantified over the underlying field, so it applies to Curve25519 -+ * itself and the quadratic twist of Curve25519. It was not proven in -+ * Coq that prime-field arithmetic correctly simulates extension-field -+ * arithmetic on prime-field values. The decoding of the byte array -+ * representation of e was not considered. -+ * -+ * Specification of Montgomery curves in affine coordinates: -+ * -+ * -+ * Proof that these form a group that is isomorphic to a Weierstrass -+ * curve: -+ * -+ * -+ * Coq transcription and correctness proof of the loop -+ * (where scalarbits=255): -+ * -+ * -+ * preconditions: 0 <= e < 2^255 (not necessarily e < order), -+ * fe_invert(0) = 0 -+ */ -+ fe_frombytes(&x1, point); -+ fe_1(&x2); -+ fe_0(&z2); -+ fe_copy(&x3, &x1); -+ fe_1(&z3); -+ -+ for (pos = 254; pos >= 0; --pos) { -+ fe tmp0, tmp1; -+ fe_loose tmp0l, tmp1l; -+ /* loop invariant as of right before the test, for the case -+ * where x1 != 0: -+ * pos >= -1; if z2 = 0 then x2 is nonzero; if z3 = 0 then x3 -+ * is nonzero -+ * let r := e >> (pos+1) in the following equalities of -+ * projective points: -+ * to_xz (r*P) === if swap then (x3, z3) else (x2, z2) -+ * to_xz ((r+1)*P) === if swap then (x2, z2) else (x3, z3) -+ * x1 is the nonzero x coordinate of the nonzero -+ * point (r*P-(r+1)*P) -+ */ -+ unsigned b = 1 & (e[pos / 8] >> (pos & 7)); -+ swap ^= b; -+ fe_cswap(&x2, &x3, swap); -+ fe_cswap(&z2, &z3, swap); -+ swap = b; -+ /* Coq transcription of ladderstep formula (called from -+ * transcribed loop): -+ * -+ * -+ * x1 != 0 -+ * x1 = 0 -+ */ -+ fe_sub(&tmp0l, &x3, &z3); -+ fe_sub(&tmp1l, &x2, &z2); -+ fe_add(&x2l, &x2, &z2); -+ fe_add(&z2l, &x3, &z3); -+ fe_mul_tll(&z3, &tmp0l, &x2l); -+ fe_mul_tll(&z2, &z2l, &tmp1l); -+ fe_sq_tl(&tmp0, &tmp1l); -+ fe_sq_tl(&tmp1, &x2l); -+ fe_add(&x3l, &z3, &z2); -+ fe_sub(&z2l, &z3, &z2); -+ fe_mul_ttt(&x2, &tmp1, &tmp0); -+ fe_sub(&tmp1l, &tmp1, &tmp0); -+ fe_sq_tl(&z2, &z2l); -+ fe_mul121666(&z3, &tmp1l); -+ fe_sq_tl(&x3, &x3l); -+ fe_add(&tmp0l, &tmp0, &z3); -+ fe_mul_ttt(&z3, &x1, &z2); -+ fe_mul_tll(&z2, &tmp1l, &tmp0l); -+ } -+ /* here pos=-1, so r=e, so to_xz (e*P) === if swap then (x3, z3) -+ * else (x2, z2) -+ */ -+ fe_cswap(&x2, &x3, swap); -+ fe_cswap(&z2, &z3, swap); -+ -+ fe_invert(&z2, &z2); -+ fe_mul_ttt(&x2, &x2, &z2); -+ fe_tobytes(out, &x2); -+ -+ memzero_explicit(&x1, sizeof(x1)); -+ memzero_explicit(&x2, sizeof(x2)); -+ memzero_explicit(&z2, sizeof(z2)); -+ memzero_explicit(&x3, sizeof(x3)); -+ memzero_explicit(&z3, sizeof(z3)); -+ memzero_explicit(&x2l, sizeof(x2l)); -+ memzero_explicit(&z2l, sizeof(z2l)); -+ memzero_explicit(&x3l, sizeof(x3l)); -+ memzero_explicit(&e, sizeof(e)); -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/curve25519/curve25519-hacl64.c 2019-08-20 20:26:42.399341426 +0000 -@@ -0,0 +1,784 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2016-2017 INRIA and Microsoft Corporation. -+ * Copyright (C) 2018-2019 Jason A. Donenfeld . All Rights Reserved. -+ * -+ * This is a machine-generated formally verified implementation of Curve25519 -+ * ECDH from: . Though originally machine -+ * generated, it has been tweaked to be suitable for use in the kernel. It is -+ * optimized for 64-bit machines that can efficiently work with 128-bit -+ * integer types. -+ */ -+ -+typedef __uint128_t u128; -+ -+static __always_inline u64 u64_eq_mask(u64 a, u64 b) -+{ -+ u64 x = a ^ b; -+ u64 minus_x = ~x + (u64)1U; -+ u64 x_or_minus_x = x | minus_x; -+ u64 xnx = x_or_minus_x >> (u32)63U; -+ u64 c = xnx - (u64)1U; -+ return c; -+} -+ -+static __always_inline u64 u64_gte_mask(u64 a, u64 b) -+{ -+ u64 x = a; -+ u64 y = b; -+ u64 x_xor_y = x ^ y; -+ u64 x_sub_y = x - y; -+ u64 x_sub_y_xor_y = x_sub_y ^ y; -+ u64 q = x_xor_y | x_sub_y_xor_y; -+ u64 x_xor_q = x ^ q; -+ u64 x_xor_q_ = x_xor_q >> (u32)63U; -+ u64 c = x_xor_q_ - (u64)1U; -+ return c; -+} -+ -+static __always_inline void modulo_carry_top(u64 *b) -+{ -+ u64 b4 = b[4]; -+ u64 b0 = b[0]; -+ u64 b4_ = b4 & 0x7ffffffffffffLLU; -+ u64 b0_ = b0 + 19 * (b4 >> 51); -+ b[4] = b4_; -+ b[0] = b0_; -+} -+ -+static __always_inline void fproduct_copy_from_wide_(u64 *output, u128 *input) -+{ -+ { -+ u128 xi = input[0]; -+ output[0] = ((u64)(xi)); -+ } -+ { -+ u128 xi = input[1]; -+ output[1] = ((u64)(xi)); -+ } -+ { -+ u128 xi = input[2]; -+ output[2] = ((u64)(xi)); -+ } -+ { -+ u128 xi = input[3]; -+ output[3] = ((u64)(xi)); -+ } -+ { -+ u128 xi = input[4]; -+ output[4] = ((u64)(xi)); -+ } -+} -+ -+static __always_inline void -+fproduct_sum_scalar_multiplication_(u128 *output, u64 *input, u64 s) -+{ -+ output[0] += (u128)input[0] * s; -+ output[1] += (u128)input[1] * s; -+ output[2] += (u128)input[2] * s; -+ output[3] += (u128)input[3] * s; -+ output[4] += (u128)input[4] * s; -+} -+ -+static __always_inline void fproduct_carry_wide_(u128 *tmp) -+{ -+ { -+ u32 ctr = 0; -+ u128 tctr = tmp[ctr]; -+ u128 tctrp1 = tmp[ctr + 1]; -+ u64 r0 = ((u64)(tctr)) & 0x7ffffffffffffLLU; -+ u128 c = ((tctr) >> (51)); -+ tmp[ctr] = ((u128)(r0)); -+ tmp[ctr + 1] = ((tctrp1) + (c)); -+ } -+ { -+ u32 ctr = 1; -+ u128 tctr = tmp[ctr]; -+ u128 tctrp1 = tmp[ctr + 1]; -+ u64 r0 = ((u64)(tctr)) & 0x7ffffffffffffLLU; -+ u128 c = ((tctr) >> (51)); -+ tmp[ctr] = ((u128)(r0)); -+ tmp[ctr + 1] = ((tctrp1) + (c)); -+ } -+ -+ { -+ u32 ctr = 2; -+ u128 tctr = tmp[ctr]; -+ u128 tctrp1 = tmp[ctr + 1]; -+ u64 r0 = ((u64)(tctr)) & 0x7ffffffffffffLLU; -+ u128 c = ((tctr) >> (51)); -+ tmp[ctr] = ((u128)(r0)); -+ tmp[ctr + 1] = ((tctrp1) + (c)); -+ } -+ { -+ u32 ctr = 3; -+ u128 tctr = tmp[ctr]; -+ u128 tctrp1 = tmp[ctr + 1]; -+ u64 r0 = ((u64)(tctr)) & 0x7ffffffffffffLLU; -+ u128 c = ((tctr) >> (51)); -+ tmp[ctr] = ((u128)(r0)); -+ tmp[ctr + 1] = ((tctrp1) + (c)); -+ } -+} -+ -+static __always_inline void fmul_shift_reduce(u64 *output) -+{ -+ u64 tmp = output[4]; -+ u64 b0; -+ { -+ u32 ctr = 5 - 0 - 1; -+ u64 z = output[ctr - 1]; -+ output[ctr] = z; -+ } -+ { -+ u32 ctr = 5 - 1 - 1; -+ u64 z = output[ctr - 1]; -+ output[ctr] = z; -+ } -+ { -+ u32 ctr = 5 - 2 - 1; -+ u64 z = output[ctr - 1]; -+ output[ctr] = z; -+ } -+ { -+ u32 ctr = 5 - 3 - 1; -+ u64 z = output[ctr - 1]; -+ output[ctr] = z; -+ } -+ output[0] = tmp; -+ b0 = output[0]; -+ output[0] = 19 * b0; -+} -+ -+static __always_inline void fmul_mul_shift_reduce_(u128 *output, u64 *input, -+ u64 *input21) -+{ -+ u32 i; -+ u64 input2i; -+ { -+ u64 input2i = input21[0]; -+ fproduct_sum_scalar_multiplication_(output, input, input2i); -+ fmul_shift_reduce(input); -+ } -+ { -+ u64 input2i = input21[1]; -+ fproduct_sum_scalar_multiplication_(output, input, input2i); -+ fmul_shift_reduce(input); -+ } -+ { -+ u64 input2i = input21[2]; -+ fproduct_sum_scalar_multiplication_(output, input, input2i); -+ fmul_shift_reduce(input); -+ } -+ { -+ u64 input2i = input21[3]; -+ fproduct_sum_scalar_multiplication_(output, input, input2i); -+ fmul_shift_reduce(input); -+ } -+ i = 4; -+ input2i = input21[i]; -+ fproduct_sum_scalar_multiplication_(output, input, input2i); -+} -+ -+static __always_inline void fmul_fmul(u64 *output, u64 *input, u64 *input21) -+{ -+ u64 tmp[5] = { input[0], input[1], input[2], input[3], input[4] }; -+ { -+ u128 b4; -+ u128 b0; -+ u128 b4_; -+ u128 b0_; -+ u64 i0; -+ u64 i1; -+ u64 i0_; -+ u64 i1_; -+ u128 t[5] = { 0 }; -+ fmul_mul_shift_reduce_(t, tmp, input21); -+ fproduct_carry_wide_(t); -+ b4 = t[4]; -+ b0 = t[0]; -+ b4_ = ((b4) & (((u128)(0x7ffffffffffffLLU)))); -+ b0_ = ((b0) + (((u128)(19) * (((u64)(((b4) >> (51)))))))); -+ t[4] = b4_; -+ t[0] = b0_; -+ fproduct_copy_from_wide_(output, t); -+ i0 = output[0]; -+ i1 = output[1]; -+ i0_ = i0 & 0x7ffffffffffffLLU; -+ i1_ = i1 + (i0 >> 51); -+ output[0] = i0_; -+ output[1] = i1_; -+ } -+} -+ -+static __always_inline void fsquare_fsquare__(u128 *tmp, u64 *output) -+{ -+ u64 r0 = output[0]; -+ u64 r1 = output[1]; -+ u64 r2 = output[2]; -+ u64 r3 = output[3]; -+ u64 r4 = output[4]; -+ u64 d0 = r0 * 2; -+ u64 d1 = r1 * 2; -+ u64 d2 = r2 * 2 * 19; -+ u64 d419 = r4 * 19; -+ u64 d4 = d419 * 2; -+ u128 s0 = ((((((u128)(r0) * (r0))) + (((u128)(d4) * (r1))))) + -+ (((u128)(d2) * (r3)))); -+ u128 s1 = ((((((u128)(d0) * (r1))) + (((u128)(d4) * (r2))))) + -+ (((u128)(r3 * 19) * (r3)))); -+ u128 s2 = ((((((u128)(d0) * (r2))) + (((u128)(r1) * (r1))))) + -+ (((u128)(d4) * (r3)))); -+ u128 s3 = ((((((u128)(d0) * (r3))) + (((u128)(d1) * (r2))))) + -+ (((u128)(r4) * (d419)))); -+ u128 s4 = ((((((u128)(d0) * (r4))) + (((u128)(d1) * (r3))))) + -+ (((u128)(r2) * (r2)))); -+ tmp[0] = s0; -+ tmp[1] = s1; -+ tmp[2] = s2; -+ tmp[3] = s3; -+ tmp[4] = s4; -+} -+ -+static __always_inline void fsquare_fsquare_(u128 *tmp, u64 *output) -+{ -+ u128 b4; -+ u128 b0; -+ u128 b4_; -+ u128 b0_; -+ u64 i0; -+ u64 i1; -+ u64 i0_; -+ u64 i1_; -+ fsquare_fsquare__(tmp, output); -+ fproduct_carry_wide_(tmp); -+ b4 = tmp[4]; -+ b0 = tmp[0]; -+ b4_ = ((b4) & (((u128)(0x7ffffffffffffLLU)))); -+ b0_ = ((b0) + (((u128)(19) * (((u64)(((b4) >> (51)))))))); -+ tmp[4] = b4_; -+ tmp[0] = b0_; -+ fproduct_copy_from_wide_(output, tmp); -+ i0 = output[0]; -+ i1 = output[1]; -+ i0_ = i0 & 0x7ffffffffffffLLU; -+ i1_ = i1 + (i0 >> 51); -+ output[0] = i0_; -+ output[1] = i1_; -+} -+ -+static __always_inline void fsquare_fsquare_times_(u64 *output, u128 *tmp, -+ u32 count1) -+{ -+ u32 i; -+ fsquare_fsquare_(tmp, output); -+ for (i = 1; i < count1; ++i) -+ fsquare_fsquare_(tmp, output); -+} -+ -+static __always_inline void fsquare_fsquare_times(u64 *output, u64 *input, -+ u32 count1) -+{ -+ u128 t[5]; -+ memcpy(output, input, 5 * sizeof(*input)); -+ fsquare_fsquare_times_(output, t, count1); -+} -+ -+static __always_inline void fsquare_fsquare_times_inplace(u64 *output, -+ u32 count1) -+{ -+ u128 t[5]; -+ fsquare_fsquare_times_(output, t, count1); -+} -+ -+static __always_inline void crecip_crecip(u64 *out, u64 *z) -+{ -+ u64 buf[20] = { 0 }; -+ u64 *a0 = buf; -+ u64 *t00 = buf + 5; -+ u64 *b0 = buf + 10; -+ u64 *t01; -+ u64 *b1; -+ u64 *c0; -+ u64 *a; -+ u64 *t0; -+ u64 *b; -+ u64 *c; -+ fsquare_fsquare_times(a0, z, 1); -+ fsquare_fsquare_times(t00, a0, 2); -+ fmul_fmul(b0, t00, z); -+ fmul_fmul(a0, b0, a0); -+ fsquare_fsquare_times(t00, a0, 1); -+ fmul_fmul(b0, t00, b0); -+ fsquare_fsquare_times(t00, b0, 5); -+ t01 = buf + 5; -+ b1 = buf + 10; -+ c0 = buf + 15; -+ fmul_fmul(b1, t01, b1); -+ fsquare_fsquare_times(t01, b1, 10); -+ fmul_fmul(c0, t01, b1); -+ fsquare_fsquare_times(t01, c0, 20); -+ fmul_fmul(t01, t01, c0); -+ fsquare_fsquare_times_inplace(t01, 10); -+ fmul_fmul(b1, t01, b1); -+ fsquare_fsquare_times(t01, b1, 50); -+ a = buf; -+ t0 = buf + 5; -+ b = buf + 10; -+ c = buf + 15; -+ fmul_fmul(c, t0, b); -+ fsquare_fsquare_times(t0, c, 100); -+ fmul_fmul(t0, t0, c); -+ fsquare_fsquare_times_inplace(t0, 50); -+ fmul_fmul(t0, t0, b); -+ fsquare_fsquare_times_inplace(t0, 5); -+ fmul_fmul(out, t0, a); -+} -+ -+static __always_inline void fsum(u64 *a, u64 *b) -+{ -+ a[0] += b[0]; -+ a[1] += b[1]; -+ a[2] += b[2]; -+ a[3] += b[3]; -+ a[4] += b[4]; -+} -+ -+static __always_inline void fdifference(u64 *a, u64 *b) -+{ -+ u64 tmp[5] = { 0 }; -+ u64 b0; -+ u64 b1; -+ u64 b2; -+ u64 b3; -+ u64 b4; -+ memcpy(tmp, b, 5 * sizeof(*b)); -+ b0 = tmp[0]; -+ b1 = tmp[1]; -+ b2 = tmp[2]; -+ b3 = tmp[3]; -+ b4 = tmp[4]; -+ tmp[0] = b0 + 0x3fffffffffff68LLU; -+ tmp[1] = b1 + 0x3ffffffffffff8LLU; -+ tmp[2] = b2 + 0x3ffffffffffff8LLU; -+ tmp[3] = b3 + 0x3ffffffffffff8LLU; -+ tmp[4] = b4 + 0x3ffffffffffff8LLU; -+ { -+ u64 xi = a[0]; -+ u64 yi = tmp[0]; -+ a[0] = yi - xi; -+ } -+ { -+ u64 xi = a[1]; -+ u64 yi = tmp[1]; -+ a[1] = yi - xi; -+ } -+ { -+ u64 xi = a[2]; -+ u64 yi = tmp[2]; -+ a[2] = yi - xi; -+ } -+ { -+ u64 xi = a[3]; -+ u64 yi = tmp[3]; -+ a[3] = yi - xi; -+ } -+ { -+ u64 xi = a[4]; -+ u64 yi = tmp[4]; -+ a[4] = yi - xi; -+ } -+} -+ -+static __always_inline void fscalar(u64 *output, u64 *b, u64 s) -+{ -+ u128 tmp[5]; -+ u128 b4; -+ u128 b0; -+ u128 b4_; -+ u128 b0_; -+ { -+ u64 xi = b[0]; -+ tmp[0] = ((u128)(xi) * (s)); -+ } -+ { -+ u64 xi = b[1]; -+ tmp[1] = ((u128)(xi) * (s)); -+ } -+ { -+ u64 xi = b[2]; -+ tmp[2] = ((u128)(xi) * (s)); -+ } -+ { -+ u64 xi = b[3]; -+ tmp[3] = ((u128)(xi) * (s)); -+ } -+ { -+ u64 xi = b[4]; -+ tmp[4] = ((u128)(xi) * (s)); -+ } -+ fproduct_carry_wide_(tmp); -+ b4 = tmp[4]; -+ b0 = tmp[0]; -+ b4_ = ((b4) & (((u128)(0x7ffffffffffffLLU)))); -+ b0_ = ((b0) + (((u128)(19) * (((u64)(((b4) >> (51)))))))); -+ tmp[4] = b4_; -+ tmp[0] = b0_; -+ fproduct_copy_from_wide_(output, tmp); -+} -+ -+static __always_inline void fmul(u64 *output, u64 *a, u64 *b) -+{ -+ fmul_fmul(output, a, b); -+} -+ -+static __always_inline void crecip(u64 *output, u64 *input) -+{ -+ crecip_crecip(output, input); -+} -+ -+static __always_inline void point_swap_conditional_step(u64 *a, u64 *b, -+ u64 swap1, u32 ctr) -+{ -+ u32 i = ctr - 1; -+ u64 ai = a[i]; -+ u64 bi = b[i]; -+ u64 x = swap1 & (ai ^ bi); -+ u64 ai1 = ai ^ x; -+ u64 bi1 = bi ^ x; -+ a[i] = ai1; -+ b[i] = bi1; -+} -+ -+static __always_inline void point_swap_conditional5(u64 *a, u64 *b, u64 swap1) -+{ -+ point_swap_conditional_step(a, b, swap1, 5); -+ point_swap_conditional_step(a, b, swap1, 4); -+ point_swap_conditional_step(a, b, swap1, 3); -+ point_swap_conditional_step(a, b, swap1, 2); -+ point_swap_conditional_step(a, b, swap1, 1); -+} -+ -+static __always_inline void point_swap_conditional(u64 *a, u64 *b, u64 iswap) -+{ -+ u64 swap1 = 0 - iswap; -+ point_swap_conditional5(a, b, swap1); -+ point_swap_conditional5(a + 5, b + 5, swap1); -+} -+ -+static __always_inline void point_copy(u64 *output, u64 *input) -+{ -+ memcpy(output, input, 5 * sizeof(*input)); -+ memcpy(output + 5, input + 5, 5 * sizeof(*input)); -+} -+ -+static __always_inline void addanddouble_fmonty(u64 *pp, u64 *ppq, u64 *p, -+ u64 *pq, u64 *qmqp) -+{ -+ u64 *qx = qmqp; -+ u64 *x2 = pp; -+ u64 *z2 = pp + 5; -+ u64 *x3 = ppq; -+ u64 *z3 = ppq + 5; -+ u64 *x = p; -+ u64 *z = p + 5; -+ u64 *xprime = pq; -+ u64 *zprime = pq + 5; -+ u64 buf[40] = { 0 }; -+ u64 *origx = buf; -+ u64 *origxprime0 = buf + 5; -+ u64 *xxprime0; -+ u64 *zzprime0; -+ u64 *origxprime; -+ xxprime0 = buf + 25; -+ zzprime0 = buf + 30; -+ memcpy(origx, x, 5 * sizeof(*x)); -+ fsum(x, z); -+ fdifference(z, origx); -+ memcpy(origxprime0, xprime, 5 * sizeof(*xprime)); -+ fsum(xprime, zprime); -+ fdifference(zprime, origxprime0); -+ fmul(xxprime0, xprime, z); -+ fmul(zzprime0, x, zprime); -+ origxprime = buf + 5; -+ { -+ u64 *xx0; -+ u64 *zz0; -+ u64 *xxprime; -+ u64 *zzprime; -+ u64 *zzzprime; -+ xx0 = buf + 15; -+ zz0 = buf + 20; -+ xxprime = buf + 25; -+ zzprime = buf + 30; -+ zzzprime = buf + 35; -+ memcpy(origxprime, xxprime, 5 * sizeof(*xxprime)); -+ fsum(xxprime, zzprime); -+ fdifference(zzprime, origxprime); -+ fsquare_fsquare_times(x3, xxprime, 1); -+ fsquare_fsquare_times(zzzprime, zzprime, 1); -+ fmul(z3, zzzprime, qx); -+ fsquare_fsquare_times(xx0, x, 1); -+ fsquare_fsquare_times(zz0, z, 1); -+ { -+ u64 *zzz; -+ u64 *xx; -+ u64 *zz; -+ u64 scalar; -+ zzz = buf + 10; -+ xx = buf + 15; -+ zz = buf + 20; -+ fmul(x2, xx, zz); -+ fdifference(zz, xx); -+ scalar = 121665; -+ fscalar(zzz, zz, scalar); -+ fsum(zzz, xx); -+ fmul(z2, zzz, zz); -+ } -+ } -+} -+ -+static __always_inline void -+ladder_smallloop_cmult_small_loop_step(u64 *nq, u64 *nqpq, u64 *nq2, u64 *nqpq2, -+ u64 *q, u8 byt) -+{ -+ u64 bit0 = (u64)(byt >> 7); -+ u64 bit; -+ point_swap_conditional(nq, nqpq, bit0); -+ addanddouble_fmonty(nq2, nqpq2, nq, nqpq, q); -+ bit = (u64)(byt >> 7); -+ point_swap_conditional(nq2, nqpq2, bit); -+} -+ -+static __always_inline void -+ladder_smallloop_cmult_small_loop_double_step(u64 *nq, u64 *nqpq, u64 *nq2, -+ u64 *nqpq2, u64 *q, u8 byt) -+{ -+ u8 byt1; -+ ladder_smallloop_cmult_small_loop_step(nq, nqpq, nq2, nqpq2, q, byt); -+ byt1 = byt << 1; -+ ladder_smallloop_cmult_small_loop_step(nq2, nqpq2, nq, nqpq, q, byt1); -+} -+ -+static __always_inline void -+ladder_smallloop_cmult_small_loop(u64 *nq, u64 *nqpq, u64 *nq2, u64 *nqpq2, -+ u64 *q, u8 byt, u32 i) -+{ -+ while (i--) { -+ ladder_smallloop_cmult_small_loop_double_step(nq, nqpq, nq2, -+ nqpq2, q, byt); -+ byt <<= 2; -+ } -+} -+ -+static __always_inline void ladder_bigloop_cmult_big_loop(u8 *n1, u64 *nq, -+ u64 *nqpq, u64 *nq2, -+ u64 *nqpq2, u64 *q, -+ u32 i) -+{ -+ while (i--) { -+ u8 byte = n1[i]; -+ ladder_smallloop_cmult_small_loop(nq, nqpq, nq2, nqpq2, q, -+ byte, 4); -+ } -+} -+ -+static void ladder_cmult(u64 *result, u8 *n1, u64 *q) -+{ -+ u64 point_buf[40] = { 0 }; -+ u64 *nq = point_buf; -+ u64 *nqpq = point_buf + 10; -+ u64 *nq2 = point_buf + 20; -+ u64 *nqpq2 = point_buf + 30; -+ point_copy(nqpq, q); -+ nq[0] = 1; -+ ladder_bigloop_cmult_big_loop(n1, nq, nqpq, nq2, nqpq2, q, 32); -+ point_copy(result, nq); -+} -+ -+static __always_inline void format_fexpand(u64 *output, const u8 *input) -+{ -+ const u8 *x00 = input + 6; -+ const u8 *x01 = input + 12; -+ const u8 *x02 = input + 19; -+ const u8 *x0 = input + 24; -+ u64 i0, i1, i2, i3, i4, output0, output1, output2, output3, output4; -+ i0 = get_unaligned_le64(input); -+ i1 = get_unaligned_le64(x00); -+ i2 = get_unaligned_le64(x01); -+ i3 = get_unaligned_le64(x02); -+ i4 = get_unaligned_le64(x0); -+ output0 = i0 & 0x7ffffffffffffLLU; -+ output1 = i1 >> 3 & 0x7ffffffffffffLLU; -+ output2 = i2 >> 6 & 0x7ffffffffffffLLU; -+ output3 = i3 >> 1 & 0x7ffffffffffffLLU; -+ output4 = i4 >> 12 & 0x7ffffffffffffLLU; -+ output[0] = output0; -+ output[1] = output1; -+ output[2] = output2; -+ output[3] = output3; -+ output[4] = output4; -+} -+ -+static __always_inline void format_fcontract_first_carry_pass(u64 *input) -+{ -+ u64 t0 = input[0]; -+ u64 t1 = input[1]; -+ u64 t2 = input[2]; -+ u64 t3 = input[3]; -+ u64 t4 = input[4]; -+ u64 t1_ = t1 + (t0 >> 51); -+ u64 t0_ = t0 & 0x7ffffffffffffLLU; -+ u64 t2_ = t2 + (t1_ >> 51); -+ u64 t1__ = t1_ & 0x7ffffffffffffLLU; -+ u64 t3_ = t3 + (t2_ >> 51); -+ u64 t2__ = t2_ & 0x7ffffffffffffLLU; -+ u64 t4_ = t4 + (t3_ >> 51); -+ u64 t3__ = t3_ & 0x7ffffffffffffLLU; -+ input[0] = t0_; -+ input[1] = t1__; -+ input[2] = t2__; -+ input[3] = t3__; -+ input[4] = t4_; -+} -+ -+static __always_inline void format_fcontract_first_carry_full(u64 *input) -+{ -+ format_fcontract_first_carry_pass(input); -+ modulo_carry_top(input); -+} -+ -+static __always_inline void format_fcontract_second_carry_pass(u64 *input) -+{ -+ u64 t0 = input[0]; -+ u64 t1 = input[1]; -+ u64 t2 = input[2]; -+ u64 t3 = input[3]; -+ u64 t4 = input[4]; -+ u64 t1_ = t1 + (t0 >> 51); -+ u64 t0_ = t0 & 0x7ffffffffffffLLU; -+ u64 t2_ = t2 + (t1_ >> 51); -+ u64 t1__ = t1_ & 0x7ffffffffffffLLU; -+ u64 t3_ = t3 + (t2_ >> 51); -+ u64 t2__ = t2_ & 0x7ffffffffffffLLU; -+ u64 t4_ = t4 + (t3_ >> 51); -+ u64 t3__ = t3_ & 0x7ffffffffffffLLU; -+ input[0] = t0_; -+ input[1] = t1__; -+ input[2] = t2__; -+ input[3] = t3__; -+ input[4] = t4_; -+} -+ -+static __always_inline void format_fcontract_second_carry_full(u64 *input) -+{ -+ u64 i0; -+ u64 i1; -+ u64 i0_; -+ u64 i1_; -+ format_fcontract_second_carry_pass(input); -+ modulo_carry_top(input); -+ i0 = input[0]; -+ i1 = input[1]; -+ i0_ = i0 & 0x7ffffffffffffLLU; -+ i1_ = i1 + (i0 >> 51); -+ input[0] = i0_; -+ input[1] = i1_; -+} -+ -+static __always_inline void format_fcontract_trim(u64 *input) -+{ -+ u64 a0 = input[0]; -+ u64 a1 = input[1]; -+ u64 a2 = input[2]; -+ u64 a3 = input[3]; -+ u64 a4 = input[4]; -+ u64 mask0 = u64_gte_mask(a0, 0x7ffffffffffedLLU); -+ u64 mask1 = u64_eq_mask(a1, 0x7ffffffffffffLLU); -+ u64 mask2 = u64_eq_mask(a2, 0x7ffffffffffffLLU); -+ u64 mask3 = u64_eq_mask(a3, 0x7ffffffffffffLLU); -+ u64 mask4 = u64_eq_mask(a4, 0x7ffffffffffffLLU); -+ u64 mask = (((mask0 & mask1) & mask2) & mask3) & mask4; -+ u64 a0_ = a0 - (0x7ffffffffffedLLU & mask); -+ u64 a1_ = a1 - (0x7ffffffffffffLLU & mask); -+ u64 a2_ = a2 - (0x7ffffffffffffLLU & mask); -+ u64 a3_ = a3 - (0x7ffffffffffffLLU & mask); -+ u64 a4_ = a4 - (0x7ffffffffffffLLU & mask); -+ input[0] = a0_; -+ input[1] = a1_; -+ input[2] = a2_; -+ input[3] = a3_; -+ input[4] = a4_; -+} -+ -+static __always_inline void format_fcontract_store(u8 *output, u64 *input) -+{ -+ u64 t0 = input[0]; -+ u64 t1 = input[1]; -+ u64 t2 = input[2]; -+ u64 t3 = input[3]; -+ u64 t4 = input[4]; -+ u64 o0 = t1 << 51 | t0; -+ u64 o1 = t2 << 38 | t1 >> 13; -+ u64 o2 = t3 << 25 | t2 >> 26; -+ u64 o3 = t4 << 12 | t3 >> 39; -+ u8 *b0 = output; -+ u8 *b1 = output + 8; -+ u8 *b2 = output + 16; -+ u8 *b3 = output + 24; -+ put_unaligned_le64(o0, b0); -+ put_unaligned_le64(o1, b1); -+ put_unaligned_le64(o2, b2); -+ put_unaligned_le64(o3, b3); -+} -+ -+static __always_inline void format_fcontract(u8 *output, u64 *input) -+{ -+ format_fcontract_first_carry_full(input); -+ format_fcontract_second_carry_full(input); -+ format_fcontract_trim(input); -+ format_fcontract_store(output, input); -+} -+ -+static __always_inline void format_scalar_of_point(u8 *scalar, u64 *point) -+{ -+ u64 *x = point; -+ u64 *z = point + 5; -+ u64 buf[10] __aligned(32) = { 0 }; -+ u64 *zmone = buf; -+ u64 *sc = buf + 5; -+ crecip(zmone, z); -+ fmul(sc, x, zmone); -+ format_fcontract(scalar, sc); -+} -+ -+static void curve25519_generic(u8 mypublic[CURVE25519_KEY_SIZE], -+ const u8 secret[CURVE25519_KEY_SIZE], -+ const u8 basepoint[CURVE25519_KEY_SIZE]) -+{ -+ u64 buf0[10] __aligned(32) = { 0 }; -+ u64 *x0 = buf0; -+ u64 *z = buf0 + 5; -+ u64 *q; -+ format_fexpand(x0, basepoint); -+ z[0] = 1; -+ q = buf0; -+ { -+ u8 e[32] __aligned(32) = { 0 }; -+ u8 *scalar; -+ memcpy(e, secret, 32); -+ curve25519_clamp_secret(e); -+ scalar = e; -+ { -+ u64 buf[15] = { 0 }; -+ u64 *nq = buf; -+ u64 *x = nq; -+ x[0] = 1; -+ ladder_cmult(nq, scalar, q); -+ format_scalar_of_point(mypublic, nq); -+ memzero_explicit(buf, sizeof(buf)); -+ } -+ memzero_explicit(e, sizeof(e)); -+ } -+ memzero_explicit(buf0, sizeof(buf0)); -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/curve25519/curve25519-x86_64-glue.c 2019-08-20 20:26:42.399341426 +0000 -@@ -0,0 +1,50 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include -+#include -+ -+#include "curve25519-x86_64.c" -+ -+static bool curve25519_use_bmi2 __ro_after_init; -+static bool curve25519_use_adx __ro_after_init; -+static bool *const curve25519_nobs[] __initconst = { -+ &curve25519_use_bmi2, &curve25519_use_adx }; -+ -+static void __init curve25519_fpu_init(void) -+{ -+ curve25519_use_bmi2 = IS_ENABLED(CONFIG_AS_BMI2) && -+ boot_cpu_has(X86_FEATURE_BMI2); -+ curve25519_use_adx = IS_ENABLED(CONFIG_AS_ADX) && -+ boot_cpu_has(X86_FEATURE_BMI2) && -+ boot_cpu_has(X86_FEATURE_ADX); -+} -+ -+static inline bool curve25519_arch(u8 mypublic[CURVE25519_KEY_SIZE], -+ const u8 secret[CURVE25519_KEY_SIZE], -+ const u8 basepoint[CURVE25519_KEY_SIZE]) -+{ -+ if (IS_ENABLED(CONFIG_AS_ADX) && curve25519_use_adx) { -+ curve25519_adx(mypublic, secret, basepoint); -+ return true; -+ } else if (IS_ENABLED(CONFIG_AS_BMI2) && curve25519_use_bmi2) { -+ curve25519_bmi2(mypublic, secret, basepoint); -+ return true; -+ } -+ return false; -+} -+ -+static inline bool curve25519_base_arch(u8 pub[CURVE25519_KEY_SIZE], -+ const u8 secret[CURVE25519_KEY_SIZE]) -+{ -+ if (IS_ENABLED(CONFIG_AS_ADX) && curve25519_use_adx) { -+ curve25519_adx_base(pub, secret); -+ return true; -+ } else if (IS_ENABLED(CONFIG_AS_BMI2) && curve25519_use_bmi2) { -+ curve25519_bmi2_base(pub, secret); -+ return true; -+ } -+ return false; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/curve25519/curve25519-x86_64.c 2019-08-20 20:26:42.400341426 +0000 -@@ -0,0 +1,2366 @@ -+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause -+/* -+ * Copyright (c) 2017 Armando Faz . All Rights Reserved. -+ * Copyright (C) 2018-2019 Jason A. Donenfeld . All Rights Reserved. -+ * Copyright (C) 2018 Samuel Neves . All Rights Reserved. -+ */ -+ -+enum { NUM_WORDS_ELTFP25519 = 4 }; -+typedef __aligned(32) u64 eltfp25519_1w[NUM_WORDS_ELTFP25519]; -+typedef __aligned(32) u64 eltfp25519_1w_buffer[2 * NUM_WORDS_ELTFP25519]; -+ -+#define mul_eltfp25519_1w_adx(c, a, b) do { \ -+ mul_256x256_integer_adx(m.buffer, a, b); \ -+ red_eltfp25519_1w_adx(c, m.buffer); \ -+} while (0) -+ -+#define mul_eltfp25519_1w_bmi2(c, a, b) do { \ -+ mul_256x256_integer_bmi2(m.buffer, a, b); \ -+ red_eltfp25519_1w_bmi2(c, m.buffer); \ -+} while (0) -+ -+#define sqr_eltfp25519_1w_adx(a) do { \ -+ sqr_256x256_integer_adx(m.buffer, a); \ -+ red_eltfp25519_1w_adx(a, m.buffer); \ -+} while (0) -+ -+#define sqr_eltfp25519_1w_bmi2(a) do { \ -+ sqr_256x256_integer_bmi2(m.buffer, a); \ -+ red_eltfp25519_1w_bmi2(a, m.buffer); \ -+} while (0) -+ -+#define mul_eltfp25519_2w_adx(c, a, b) do { \ -+ mul2_256x256_integer_adx(m.buffer, a, b); \ -+ red_eltfp25519_2w_adx(c, m.buffer); \ -+} while (0) -+ -+#define mul_eltfp25519_2w_bmi2(c, a, b) do { \ -+ mul2_256x256_integer_bmi2(m.buffer, a, b); \ -+ red_eltfp25519_2w_bmi2(c, m.buffer); \ -+} while (0) -+ -+#define sqr_eltfp25519_2w_adx(a) do { \ -+ sqr2_256x256_integer_adx(m.buffer, a); \ -+ red_eltfp25519_2w_adx(a, m.buffer); \ -+} while (0) -+ -+#define sqr_eltfp25519_2w_bmi2(a) do { \ -+ sqr2_256x256_integer_bmi2(m.buffer, a); \ -+ red_eltfp25519_2w_bmi2(a, m.buffer); \ -+} while (0) -+ -+#define sqrn_eltfp25519_1w_adx(a, times) do { \ -+ int ____counter = (times); \ -+ while (____counter-- > 0) \ -+ sqr_eltfp25519_1w_adx(a); \ -+} while (0) -+ -+#define sqrn_eltfp25519_1w_bmi2(a, times) do { \ -+ int ____counter = (times); \ -+ while (____counter-- > 0) \ -+ sqr_eltfp25519_1w_bmi2(a); \ -+} while (0) -+ -+#define copy_eltfp25519_1w(C, A) do { \ -+ (C)[0] = (A)[0]; \ -+ (C)[1] = (A)[1]; \ -+ (C)[2] = (A)[2]; \ -+ (C)[3] = (A)[3]; \ -+} while (0) -+ -+#define setzero_eltfp25519_1w(C) do { \ -+ (C)[0] = 0; \ -+ (C)[1] = 0; \ -+ (C)[2] = 0; \ -+ (C)[3] = 0; \ -+} while (0) -+ -+__aligned(32) static const u64 table_ladder_8k[252 * NUM_WORDS_ELTFP25519] = { -+ /* 1 */ 0xfffffffffffffff3UL, 0xffffffffffffffffUL, -+ 0xffffffffffffffffUL, 0x5fffffffffffffffUL, -+ /* 2 */ 0x6b8220f416aafe96UL, 0x82ebeb2b4f566a34UL, -+ 0xd5a9a5b075a5950fUL, 0x5142b2cf4b2488f4UL, -+ /* 3 */ 0x6aaebc750069680cUL, 0x89cf7820a0f99c41UL, -+ 0x2a58d9183b56d0f4UL, 0x4b5aca80e36011a4UL, -+ /* 4 */ 0x329132348c29745dUL, 0xf4a2e616e1642fd7UL, -+ 0x1e45bb03ff67bc34UL, 0x306912d0f42a9b4aUL, -+ /* 5 */ 0xff886507e6af7154UL, 0x04f50e13dfeec82fUL, -+ 0xaa512fe82abab5ceUL, 0x174e251a68d5f222UL, -+ /* 6 */ 0xcf96700d82028898UL, 0x1743e3370a2c02c5UL, -+ 0x379eec98b4e86eaaUL, 0x0c59888a51e0482eUL, -+ /* 7 */ 0xfbcbf1d699b5d189UL, 0xacaef0d58e9fdc84UL, -+ 0xc1c20d06231f7614UL, 0x2938218da274f972UL, -+ /* 8 */ 0xf6af49beff1d7f18UL, 0xcc541c22387ac9c2UL, -+ 0x96fcc9ef4015c56bUL, 0x69c1627c690913a9UL, -+ /* 9 */ 0x7a86fd2f4733db0eUL, 0xfdb8c4f29e087de9UL, -+ 0x095e4b1a8ea2a229UL, 0x1ad7a7c829b37a79UL, -+ /* 10 */ 0x342d89cad17ea0c0UL, 0x67bedda6cced2051UL, -+ 0x19ca31bf2bb42f74UL, 0x3df7b4c84980acbbUL, -+ /* 11 */ 0xa8c6444dc80ad883UL, 0xb91e440366e3ab85UL, -+ 0xc215cda00164f6d8UL, 0x3d867c6ef247e668UL, -+ /* 12 */ 0xc7dd582bcc3e658cUL, 0xfd2c4748ee0e5528UL, -+ 0xa0fd9b95cc9f4f71UL, 0x7529d871b0675ddfUL, -+ /* 13 */ 0xb8f568b42d3cbd78UL, 0x1233011b91f3da82UL, -+ 0x2dce6ccd4a7c3b62UL, 0x75e7fc8e9e498603UL, -+ /* 14 */ 0x2f4f13f1fcd0b6ecUL, 0xf1a8ca1f29ff7a45UL, -+ 0xc249c1a72981e29bUL, 0x6ebe0dbb8c83b56aUL, -+ /* 15 */ 0x7114fa8d170bb222UL, 0x65a2dcd5bf93935fUL, -+ 0xbdc41f68b59c979aUL, 0x2f0eef79a2ce9289UL, -+ /* 16 */ 0x42ecbf0c083c37ceUL, 0x2930bc09ec496322UL, -+ 0xf294b0c19cfeac0dUL, 0x3780aa4bedfabb80UL, -+ /* 17 */ 0x56c17d3e7cead929UL, 0xe7cb4beb2e5722c5UL, -+ 0x0ce931732dbfe15aUL, 0x41b883c7621052f8UL, -+ /* 18 */ 0xdbf75ca0c3d25350UL, 0x2936be086eb1e351UL, -+ 0xc936e03cb4a9b212UL, 0x1d45bf82322225aaUL, -+ /* 19 */ 0xe81ab1036a024cc5UL, 0xe212201c304c9a72UL, -+ 0xc5d73fba6832b1fcUL, 0x20ffdb5a4d839581UL, -+ /* 20 */ 0xa283d367be5d0fadUL, 0x6c2b25ca8b164475UL, -+ 0x9d4935467caaf22eUL, 0x5166408eee85ff49UL, -+ /* 21 */ 0x3c67baa2fab4e361UL, 0xb3e433c67ef35cefUL, -+ 0x5259729241159b1cUL, 0x6a621892d5b0ab33UL, -+ /* 22 */ 0x20b74a387555cdcbUL, 0x532aa10e1208923fUL, -+ 0xeaa17b7762281dd1UL, 0x61ab3443f05c44bfUL, -+ /* 23 */ 0x257a6c422324def8UL, 0x131c6c1017e3cf7fUL, -+ 0x23758739f630a257UL, 0x295a407a01a78580UL, -+ /* 24 */ 0xf8c443246d5da8d9UL, 0x19d775450c52fa5dUL, -+ 0x2afcfc92731bf83dUL, 0x7d10c8e81b2b4700UL, -+ /* 25 */ 0xc8e0271f70baa20bUL, 0x993748867ca63957UL, -+ 0x5412efb3cb7ed4bbUL, 0x3196d36173e62975UL, -+ /* 26 */ 0xde5bcad141c7dffcUL, 0x47cc8cd2b395c848UL, -+ 0xa34cd942e11af3cbUL, 0x0256dbf2d04ecec2UL, -+ /* 27 */ 0x875ab7e94b0e667fUL, 0xcad4dd83c0850d10UL, -+ 0x47f12e8f4e72c79fUL, 0x5f1a87bb8c85b19bUL, -+ /* 28 */ 0x7ae9d0b6437f51b8UL, 0x12c7ce5518879065UL, -+ 0x2ade09fe5cf77aeeUL, 0x23a05a2f7d2c5627UL, -+ /* 29 */ 0x5908e128f17c169aUL, 0xf77498dd8ad0852dUL, -+ 0x74b4c4ceab102f64UL, 0x183abadd10139845UL, -+ /* 30 */ 0xb165ba8daa92aaacUL, 0xd5c5ef9599386705UL, -+ 0xbe2f8f0cf8fc40d1UL, 0x2701e635ee204514UL, -+ /* 31 */ 0x629fa80020156514UL, 0xf223868764a8c1ceUL, -+ 0x5b894fff0b3f060eUL, 0x60d9944cf708a3faUL, -+ /* 32 */ 0xaeea001a1c7a201fUL, 0xebf16a633ee2ce63UL, -+ 0x6f7709594c7a07e1UL, 0x79b958150d0208cbUL, -+ /* 33 */ 0x24b55e5301d410e7UL, 0xe3a34edff3fdc84dUL, -+ 0xd88768e4904032d8UL, 0x131384427b3aaeecUL, -+ /* 34 */ 0x8405e51286234f14UL, 0x14dc4739adb4c529UL, -+ 0xb8a2b5b250634ffdUL, 0x2fe2a94ad8a7ff93UL, -+ /* 35 */ 0xec5c57efe843faddUL, 0x2843ce40f0bb9918UL, -+ 0xa4b561d6cf3d6305UL, 0x743629bde8fb777eUL, -+ /* 36 */ 0x343edd46bbaf738fUL, 0xed981828b101a651UL, -+ 0xa401760b882c797aUL, 0x1fc223e28dc88730UL, -+ /* 37 */ 0x48604e91fc0fba0eUL, 0xb637f78f052c6fa4UL, -+ 0x91ccac3d09e9239cUL, 0x23f7eed4437a687cUL, -+ /* 38 */ 0x5173b1118d9bd800UL, 0x29d641b63189d4a7UL, -+ 0xfdbf177988bbc586UL, 0x2959894fcad81df5UL, -+ /* 39 */ 0xaebc8ef3b4bbc899UL, 0x4148995ab26992b9UL, -+ 0x24e20b0134f92cfbUL, 0x40d158894a05dee8UL, -+ /* 40 */ 0x46b00b1185af76f6UL, 0x26bac77873187a79UL, -+ 0x3dc0bf95ab8fff5fUL, 0x2a608bd8945524d7UL, -+ /* 41 */ 0x26449588bd446302UL, 0x7c4bc21c0388439cUL, -+ 0x8e98a4f383bd11b2UL, 0x26218d7bc9d876b9UL, -+ /* 42 */ 0xe3081542997c178aUL, 0x3c2d29a86fb6606fUL, -+ 0x5c217736fa279374UL, 0x7dde05734afeb1faUL, -+ /* 43 */ 0x3bf10e3906d42babUL, 0xe4f7803e1980649cUL, -+ 0xe6053bf89595bf7aUL, 0x394faf38da245530UL, -+ /* 44 */ 0x7a8efb58896928f4UL, 0xfbc778e9cc6a113cUL, -+ 0x72670ce330af596fUL, 0x48f222a81d3d6cf7UL, -+ /* 45 */ 0xf01fce410d72caa7UL, 0x5a20ecc7213b5595UL, -+ 0x7bc21165c1fa1483UL, 0x07f89ae31da8a741UL, -+ /* 46 */ 0x05d2c2b4c6830ff9UL, 0xd43e330fc6316293UL, -+ 0xa5a5590a96d3a904UL, 0x705edb91a65333b6UL, -+ /* 47 */ 0x048ee15e0bb9a5f7UL, 0x3240cfca9e0aaf5dUL, -+ 0x8f4b71ceedc4a40bUL, 0x621c0da3de544a6dUL, -+ /* 48 */ 0x92872836a08c4091UL, 0xce8375b010c91445UL, -+ 0x8a72eb524f276394UL, 0x2667fcfa7ec83635UL, -+ /* 49 */ 0x7f4c173345e8752aUL, 0x061b47feee7079a5UL, -+ 0x25dd9afa9f86ff34UL, 0x3780cef5425dc89cUL, -+ /* 50 */ 0x1a46035a513bb4e9UL, 0x3e1ef379ac575adaUL, -+ 0xc78c5f1c5fa24b50UL, 0x321a967634fd9f22UL, -+ /* 51 */ 0x946707b8826e27faUL, 0x3dca84d64c506fd0UL, -+ 0xc189218075e91436UL, 0x6d9284169b3b8484UL, -+ /* 52 */ 0x3a67e840383f2ddfUL, 0x33eec9a30c4f9b75UL, -+ 0x3ec7c86fa783ef47UL, 0x26ec449fbac9fbc4UL, -+ /* 53 */ 0x5c0f38cba09b9e7dUL, 0x81168cc762a3478cUL, -+ 0x3e23b0d306fc121cUL, 0x5a238aa0a5efdcddUL, -+ /* 54 */ 0x1ba26121c4ea43ffUL, 0x36f8c77f7c8832b5UL, -+ 0x88fbea0b0adcf99aUL, 0x5ca9938ec25bebf9UL, -+ /* 55 */ 0xd5436a5e51fccda0UL, 0x1dbc4797c2cd893bUL, -+ 0x19346a65d3224a08UL, 0x0f5034e49b9af466UL, -+ /* 56 */ 0xf23c3967a1e0b96eUL, 0xe58b08fa867a4d88UL, -+ 0xfb2fabc6a7341679UL, 0x2a75381eb6026946UL, -+ /* 57 */ 0xc80a3be4c19420acUL, 0x66b1f6c681f2b6dcUL, -+ 0x7cf7036761e93388UL, 0x25abbbd8a660a4c4UL, -+ /* 58 */ 0x91ea12ba14fd5198UL, 0x684950fc4a3cffa9UL, -+ 0xf826842130f5ad28UL, 0x3ea988f75301a441UL, -+ /* 59 */ 0xc978109a695f8c6fUL, 0x1746eb4a0530c3f3UL, -+ 0x444d6d77b4459995UL, 0x75952b8c054e5cc7UL, -+ /* 60 */ 0xa3703f7915f4d6aaUL, 0x66c346202f2647d8UL, -+ 0xd01469df811d644bUL, 0x77fea47d81a5d71fUL, -+ /* 61 */ 0xc5e9529ef57ca381UL, 0x6eeeb4b9ce2f881aUL, -+ 0xb6e91a28e8009bd6UL, 0x4b80be3e9afc3fecUL, -+ /* 62 */ 0x7e3773c526aed2c5UL, 0x1b4afcb453c9a49dUL, -+ 0xa920bdd7baffb24dUL, 0x7c54699f122d400eUL, -+ /* 63 */ 0xef46c8e14fa94bc8UL, 0xe0b074ce2952ed5eUL, -+ 0xbea450e1dbd885d5UL, 0x61b68649320f712cUL, -+ /* 64 */ 0x8a485f7309ccbdd1UL, 0xbd06320d7d4d1a2dUL, -+ 0x25232973322dbef4UL, 0x445dc4758c17f770UL, -+ /* 65 */ 0xdb0434177cc8933cUL, 0xed6fe82175ea059fUL, -+ 0x1efebefdc053db34UL, 0x4adbe867c65daf99UL, -+ /* 66 */ 0x3acd71a2a90609dfUL, 0xe5e991856dd04050UL, -+ 0x1ec69b688157c23cUL, 0x697427f6885cfe4dUL, -+ /* 67 */ 0xd7be7b9b65e1a851UL, 0xa03d28d522c536ddUL, -+ 0x28399d658fd2b645UL, 0x49e5b7e17c2641e1UL, -+ /* 68 */ 0x6f8c3a98700457a4UL, 0x5078f0a25ebb6778UL, -+ 0xd13c3ccbc382960fUL, 0x2e003258a7df84b1UL, -+ /* 69 */ 0x8ad1f39be6296a1cUL, 0xc1eeaa652a5fbfb2UL, -+ 0x33ee0673fd26f3cbUL, 0x59256173a69d2cccUL, -+ /* 70 */ 0x41ea07aa4e18fc41UL, 0xd9fc19527c87a51eUL, -+ 0xbdaacb805831ca6fUL, 0x445b652dc916694fUL, -+ /* 71 */ 0xce92a3a7f2172315UL, 0x1edc282de11b9964UL, -+ 0xa1823aafe04c314aUL, 0x790a2d94437cf586UL, -+ /* 72 */ 0x71c447fb93f6e009UL, 0x8922a56722845276UL, -+ 0xbf70903b204f5169UL, 0x2f7a89891ba319feUL, -+ /* 73 */ 0x02a08eb577e2140cUL, 0xed9a4ed4427bdcf4UL, -+ 0x5253ec44e4323cd1UL, 0x3e88363c14e9355bUL, -+ /* 74 */ 0xaa66c14277110b8cUL, 0x1ae0391610a23390UL, -+ 0x2030bd12c93fc2a2UL, 0x3ee141579555c7abUL, -+ /* 75 */ 0x9214de3a6d6e7d41UL, 0x3ccdd88607f17efeUL, -+ 0x674f1288f8e11217UL, 0x5682250f329f93d0UL, -+ /* 76 */ 0x6cf00b136d2e396eUL, 0x6e4cf86f1014debfUL, -+ 0x5930b1b5bfcc4e83UL, 0x047069b48aba16b6UL, -+ /* 77 */ 0x0d4ce4ab69b20793UL, 0xb24db91a97d0fb9eUL, -+ 0xcdfa50f54e00d01dUL, 0x221b1085368bddb5UL, -+ /* 78 */ 0xe7e59468b1e3d8d2UL, 0x53c56563bd122f93UL, -+ 0xeee8a903e0663f09UL, 0x61efa662cbbe3d42UL, -+ /* 79 */ 0x2cf8ddddde6eab2aUL, 0x9bf80ad51435f231UL, -+ 0x5deadacec9f04973UL, 0x29275b5d41d29b27UL, -+ /* 80 */ 0xcfde0f0895ebf14fUL, 0xb9aab96b054905a7UL, -+ 0xcae80dd9a1c420fdUL, 0x0a63bf2f1673bbc7UL, -+ /* 81 */ 0x092f6e11958fbc8cUL, 0x672a81e804822fadUL, -+ 0xcac8351560d52517UL, 0x6f3f7722c8f192f8UL, -+ /* 82 */ 0xf8ba90ccc2e894b7UL, 0x2c7557a438ff9f0dUL, -+ 0x894d1d855ae52359UL, 0x68e122157b743d69UL, -+ /* 83 */ 0xd87e5570cfb919f3UL, 0x3f2cdecd95798db9UL, -+ 0x2121154710c0a2ceUL, 0x3c66a115246dc5b2UL, -+ /* 84 */ 0xcbedc562294ecb72UL, 0xba7143c36a280b16UL, -+ 0x9610c2efd4078b67UL, 0x6144735d946a4b1eUL, -+ /* 85 */ 0x536f111ed75b3350UL, 0x0211db8c2041d81bUL, -+ 0xf93cb1000e10413cUL, 0x149dfd3c039e8876UL, -+ /* 86 */ 0xd479dde46b63155bUL, 0xb66e15e93c837976UL, -+ 0xdafde43b1f13e038UL, 0x5fafda1a2e4b0b35UL, -+ /* 87 */ 0x3600bbdf17197581UL, 0x3972050bbe3cd2c2UL, -+ 0x5938906dbdd5be86UL, 0x34fce5e43f9b860fUL, -+ /* 88 */ 0x75a8a4cd42d14d02UL, 0x828dabc53441df65UL, -+ 0x33dcabedd2e131d3UL, 0x3ebad76fb814d25fUL, -+ /* 89 */ 0xd4906f566f70e10fUL, 0x5d12f7aa51690f5aUL, -+ 0x45adb16e76cefcf2UL, 0x01f768aead232999UL, -+ /* 90 */ 0x2b6cc77b6248febdUL, 0x3cd30628ec3aaffdUL, -+ 0xce1c0b80d4ef486aUL, 0x4c3bff2ea6f66c23UL, -+ /* 91 */ 0x3f2ec4094aeaeb5fUL, 0x61b19b286e372ca7UL, -+ 0x5eefa966de2a701dUL, 0x23b20565de55e3efUL, -+ /* 92 */ 0xe301ca5279d58557UL, 0x07b2d4ce27c2874fUL, -+ 0xa532cd8a9dcf1d67UL, 0x2a52fee23f2bff56UL, -+ /* 93 */ 0x8624efb37cd8663dUL, 0xbbc7ac20ffbd7594UL, -+ 0x57b85e9c82d37445UL, 0x7b3052cb86a6ec66UL, -+ /* 94 */ 0x3482f0ad2525e91eUL, 0x2cb68043d28edca0UL, -+ 0xaf4f6d052e1b003aUL, 0x185f8c2529781b0aUL, -+ /* 95 */ 0xaa41de5bd80ce0d6UL, 0x9407b2416853e9d6UL, -+ 0x563ec36e357f4c3aUL, 0x4cc4b8dd0e297bceUL, -+ /* 96 */ 0xa2fc1a52ffb8730eUL, 0x1811f16e67058e37UL, -+ 0x10f9a366cddf4ee1UL, 0x72f4a0c4a0b9f099UL, -+ /* 97 */ 0x8c16c06f663f4ea7UL, 0x693b3af74e970fbaUL, -+ 0x2102e7f1d69ec345UL, 0x0ba53cbc968a8089UL, -+ /* 98 */ 0xca3d9dc7fea15537UL, 0x4c6824bb51536493UL, -+ 0xb9886314844006b1UL, 0x40d2a72ab454cc60UL, -+ /* 99 */ 0x5936a1b712570975UL, 0x91b9d648debda657UL, -+ 0x3344094bb64330eaUL, 0x006ba10d12ee51d0UL, -+ /* 100 */ 0x19228468f5de5d58UL, 0x0eb12f4c38cc05b0UL, -+ 0xa1039f9dd5601990UL, 0x4502d4ce4fff0e0bUL, -+ /* 101 */ 0xeb2054106837c189UL, 0xd0f6544c6dd3b93cUL, -+ 0x40727064c416d74fUL, 0x6e15c6114b502ef0UL, -+ /* 102 */ 0x4df2a398cfb1a76bUL, 0x11256c7419f2f6b1UL, -+ 0x4a497962066e6043UL, 0x705b3aab41355b44UL, -+ /* 103 */ 0x365ef536d797b1d8UL, 0x00076bd622ddf0dbUL, -+ 0x3bbf33b0e0575a88UL, 0x3777aa05c8e4ca4dUL, -+ /* 104 */ 0x392745c85578db5fUL, 0x6fda4149dbae5ae2UL, -+ 0xb1f0b00b8adc9867UL, 0x09963437d36f1da3UL, -+ /* 105 */ 0x7e824e90a5dc3853UL, 0xccb5f6641f135cbdUL, -+ 0x6736d86c87ce8fccUL, 0x625f3ce26604249fUL, -+ /* 106 */ 0xaf8ac8059502f63fUL, 0x0c05e70a2e351469UL, -+ 0x35292e9c764b6305UL, 0x1a394360c7e23ac3UL, -+ /* 107 */ 0xd5c6d53251183264UL, 0x62065abd43c2b74fUL, -+ 0xb5fbf5d03b973f9bUL, 0x13a3da3661206e5eUL, -+ /* 108 */ 0xc6bd5837725d94e5UL, 0x18e30912205016c5UL, -+ 0x2088ce1570033c68UL, 0x7fba1f495c837987UL, -+ /* 109 */ 0x5a8c7423f2f9079dUL, 0x1735157b34023fc5UL, -+ 0xe4f9b49ad2fab351UL, 0x6691ff72c878e33cUL, -+ /* 110 */ 0x122c2adedc5eff3eUL, 0xf8dd4bf1d8956cf4UL, -+ 0xeb86205d9e9e5bdaUL, 0x049b92b9d975c743UL, -+ /* 111 */ 0xa5379730b0f6c05aUL, 0x72a0ffacc6f3a553UL, -+ 0xb0032c34b20dcd6dUL, 0x470e9dbc88d5164aUL, -+ /* 112 */ 0xb19cf10ca237c047UL, 0xb65466711f6c81a2UL, -+ 0xb3321bd16dd80b43UL, 0x48c14f600c5fbe8eUL, -+ /* 113 */ 0x66451c264aa6c803UL, 0xb66e3904a4fa7da6UL, -+ 0xd45f19b0b3128395UL, 0x31602627c3c9bc10UL, -+ /* 114 */ 0x3120dc4832e4e10dUL, 0xeb20c46756c717f7UL, -+ 0x00f52e3f67280294UL, 0x566d4fc14730c509UL, -+ /* 115 */ 0x7e3a5d40fd837206UL, 0xc1e926dc7159547aUL, -+ 0x216730fba68d6095UL, 0x22e8c3843f69cea7UL, -+ /* 116 */ 0x33d074e8930e4b2bUL, 0xb6e4350e84d15816UL, -+ 0x5534c26ad6ba2365UL, 0x7773c12f89f1f3f3UL, -+ /* 117 */ 0x8cba404da57962aaUL, 0x5b9897a81999ce56UL, -+ 0x508e862f121692fcUL, 0x3a81907fa093c291UL, -+ /* 118 */ 0x0dded0ff4725a510UL, 0x10d8cc10673fc503UL, -+ 0x5b9d151c9f1f4e89UL, 0x32a5c1d5cb09a44cUL, -+ /* 119 */ 0x1e0aa442b90541fbUL, 0x5f85eb7cc1b485dbUL, -+ 0xbee595ce8a9df2e5UL, 0x25e496c722422236UL, -+ /* 120 */ 0x5edf3c46cd0fe5b9UL, 0x34e75a7ed2a43388UL, -+ 0xe488de11d761e352UL, 0x0e878a01a085545cUL, -+ /* 121 */ 0xba493c77e021bb04UL, 0x2b4d1843c7df899aUL, -+ 0x9ea37a487ae80d67UL, 0x67a9958011e41794UL, -+ /* 122 */ 0x4b58051a6697b065UL, 0x47e33f7d8d6ba6d4UL, -+ 0xbb4da8d483ca46c1UL, 0x68becaa181c2db0dUL, -+ /* 123 */ 0x8d8980e90b989aa5UL, 0xf95eb14a2c93c99bUL, -+ 0x51c6c7c4796e73a2UL, 0x6e228363b5efb569UL, -+ /* 124 */ 0xc6bbc0b02dd624c8UL, 0x777eb47dec8170eeUL, -+ 0x3cde15a004cfafa9UL, 0x1dc6bc087160bf9bUL, -+ /* 125 */ 0x2e07e043eec34002UL, 0x18e9fc677a68dc7fUL, -+ 0xd8da03188bd15b9aUL, 0x48fbc3bb00568253UL, -+ /* 126 */ 0x57547d4cfb654ce1UL, 0xd3565b82a058e2adUL, -+ 0xf63eaf0bbf154478UL, 0x47531ef114dfbb18UL, -+ /* 127 */ 0xe1ec630a4278c587UL, 0x5507d546ca8e83f3UL, -+ 0x85e135c63adc0c2bUL, 0x0aa7efa85682844eUL, -+ /* 128 */ 0x72691ba8b3e1f615UL, 0x32b4e9701fbe3ffaUL, -+ 0x97b6d92e39bb7868UL, 0x2cfe53dea02e39e8UL, -+ /* 129 */ 0x687392cd85cd52b0UL, 0x27ff66c910e29831UL, -+ 0x97134556a9832d06UL, 0x269bb0360a84f8a0UL, -+ /* 130 */ 0x706e55457643f85cUL, 0x3734a48c9b597d1bUL, -+ 0x7aee91e8c6efa472UL, 0x5cd6abc198a9d9e0UL, -+ /* 131 */ 0x0e04de06cb3ce41aUL, 0xd8c6eb893402e138UL, -+ 0x904659bb686e3772UL, 0x7215c371746ba8c8UL, -+ /* 132 */ 0xfd12a97eeae4a2d9UL, 0x9514b7516394f2c5UL, -+ 0x266fd5809208f294UL, 0x5c847085619a26b9UL, -+ /* 133 */ 0x52985410fed694eaUL, 0x3c905b934a2ed254UL, -+ 0x10bb47692d3be467UL, 0x063b3d2d69e5e9e1UL, -+ /* 134 */ 0x472726eedda57debUL, 0xefb6c4ae10f41891UL, -+ 0x2b1641917b307614UL, 0x117c554fc4f45b7cUL, -+ /* 135 */ 0xc07cf3118f9d8812UL, 0x01dbd82050017939UL, -+ 0xd7e803f4171b2827UL, 0x1015e87487d225eaUL, -+ /* 136 */ 0xc58de3fed23acc4dUL, 0x50db91c294a7be2dUL, -+ 0x0b94d43d1c9cf457UL, 0x6b1640fa6e37524aUL, -+ /* 137 */ 0x692f346c5fda0d09UL, 0x200b1c59fa4d3151UL, -+ 0xb8c46f760777a296UL, 0x4b38395f3ffdfbcfUL, -+ /* 138 */ 0x18d25e00be54d671UL, 0x60d50582bec8aba6UL, -+ 0x87ad8f263b78b982UL, 0x50fdf64e9cda0432UL, -+ /* 139 */ 0x90f567aac578dcf0UL, 0xef1e9b0ef2a3133bUL, -+ 0x0eebba9242d9de71UL, 0x15473c9bf03101c7UL, -+ /* 140 */ 0x7c77e8ae56b78095UL, 0xb678e7666e6f078eUL, -+ 0x2da0b9615348ba1fUL, 0x7cf931c1ff733f0bUL, -+ /* 141 */ 0x26b357f50a0a366cUL, 0xe9708cf42b87d732UL, -+ 0xc13aeea5f91cb2c0UL, 0x35d90c991143bb4cUL, -+ /* 142 */ 0x47c1c404a9a0d9dcUL, 0x659e58451972d251UL, -+ 0x3875a8c473b38c31UL, 0x1fbd9ed379561f24UL, -+ /* 143 */ 0x11fabc6fd41ec28dUL, 0x7ef8dfe3cd2a2dcaUL, -+ 0x72e73b5d8c404595UL, 0x6135fa4954b72f27UL, -+ /* 144 */ 0xccfc32a2de24b69cUL, 0x3f55698c1f095d88UL, -+ 0xbe3350ed5ac3f929UL, 0x5e9bf806ca477eebUL, -+ /* 145 */ 0xe9ce8fb63c309f68UL, 0x5376f63565e1f9f4UL, -+ 0xd1afcfb35a6393f1UL, 0x6632a1ede5623506UL, -+ /* 146 */ 0x0b7d6c390c2ded4cUL, 0x56cb3281df04cb1fUL, -+ 0x66305a1249ecc3c7UL, 0x5d588b60a38ca72aUL, -+ /* 147 */ 0xa6ecbf78e8e5f42dUL, 0x86eeb44b3c8a3eecUL, -+ 0xec219c48fbd21604UL, 0x1aaf1af517c36731UL, -+ /* 148 */ 0xc306a2836769bde7UL, 0x208280622b1e2adbUL, -+ 0x8027f51ffbff94a6UL, 0x76cfa1ce1124f26bUL, -+ /* 149 */ 0x18eb00562422abb6UL, 0xf377c4d58f8c29c3UL, -+ 0x4dbbc207f531561aUL, 0x0253b7f082128a27UL, -+ /* 150 */ 0x3d1f091cb62c17e0UL, 0x4860e1abd64628a9UL, -+ 0x52d17436309d4253UL, 0x356f97e13efae576UL, -+ /* 151 */ 0xd351e11aa150535bUL, 0x3e6b45bb1dd878ccUL, -+ 0x0c776128bed92c98UL, 0x1d34ae93032885b8UL, -+ /* 152 */ 0x4ba0488ca85ba4c3UL, 0x985348c33c9ce6ceUL, -+ 0x66124c6f97bda770UL, 0x0f81a0290654124aUL, -+ /* 153 */ 0x9ed09ca6569b86fdUL, 0x811009fd18af9a2dUL, -+ 0xff08d03f93d8c20aUL, 0x52a148199faef26bUL, -+ /* 154 */ 0x3e03f9dc2d8d1b73UL, 0x4205801873961a70UL, -+ 0xc0d987f041a35970UL, 0x07aa1f15a1c0d549UL, -+ /* 155 */ 0xdfd46ce08cd27224UL, 0x6d0a024f934e4239UL, -+ 0x808a7a6399897b59UL, 0x0a4556e9e13d95a2UL, -+ /* 156 */ 0xd21a991fe9c13045UL, 0x9b0e8548fe7751b8UL, -+ 0x5da643cb4bf30035UL, 0x77db28d63940f721UL, -+ /* 157 */ 0xfc5eeb614adc9011UL, 0x5229419ae8c411ebUL, -+ 0x9ec3e7787d1dcf74UL, 0x340d053e216e4cb5UL, -+ /* 158 */ 0xcac7af39b48df2b4UL, 0xc0faec2871a10a94UL, -+ 0x140a69245ca575edUL, 0x0cf1c37134273a4cUL, -+ /* 159 */ 0xc8ee306ac224b8a5UL, 0x57eaee7ccb4930b0UL, -+ 0xa1e806bdaacbe74fUL, 0x7d9a62742eeb657dUL, -+ /* 160 */ 0x9eb6b6ef546c4830UL, 0x885cca1fddb36e2eUL, -+ 0xe6b9f383ef0d7105UL, 0x58654fef9d2e0412UL, -+ /* 161 */ 0xa905c4ffbe0e8e26UL, 0x942de5df9b31816eUL, -+ 0x497d723f802e88e1UL, 0x30684dea602f408dUL, -+ /* 162 */ 0x21e5a278a3e6cb34UL, 0xaefb6e6f5b151dc4UL, -+ 0xb30b8e049d77ca15UL, 0x28c3c9cf53b98981UL, -+ /* 163 */ 0x287fb721556cdd2aUL, 0x0d317ca897022274UL, -+ 0x7468c7423a543258UL, 0x4a7f11464eb5642fUL, -+ /* 164 */ 0xa237a4774d193aa6UL, 0xd865986ea92129a1UL, -+ 0x24c515ecf87c1a88UL, 0x604003575f39f5ebUL, -+ /* 165 */ 0x47b9f189570a9b27UL, 0x2b98cede465e4b78UL, -+ 0x026df551dbb85c20UL, 0x74fcd91047e21901UL, -+ /* 166 */ 0x13e2a90a23c1bfa3UL, 0x0cb0074e478519f6UL, -+ 0x5ff1cbbe3af6cf44UL, 0x67fe5438be812dbeUL, -+ /* 167 */ 0xd13cf64fa40f05b0UL, 0x054dfb2f32283787UL, -+ 0x4173915b7f0d2aeaUL, 0x482f144f1f610d4eUL, -+ /* 168 */ 0xf6210201b47f8234UL, 0x5d0ae1929e70b990UL, -+ 0xdcd7f455b049567cUL, 0x7e93d0f1f0916f01UL, -+ /* 169 */ 0xdd79cbf18a7db4faUL, 0xbe8391bf6f74c62fUL, -+ 0x027145d14b8291bdUL, 0x585a73ea2cbf1705UL, -+ /* 170 */ 0x485ca03e928a0db2UL, 0x10fc01a5742857e7UL, -+ 0x2f482edbd6d551a7UL, 0x0f0433b5048fdb8aUL, -+ /* 171 */ 0x60da2e8dd7dc6247UL, 0x88b4c9d38cd4819aUL, -+ 0x13033ac001f66697UL, 0x273b24fe3b367d75UL, -+ /* 172 */ 0xc6e8f66a31b3b9d4UL, 0x281514a494df49d5UL, -+ 0xd1726fdfc8b23da7UL, 0x4b3ae7d103dee548UL, -+ /* 173 */ 0xc6256e19ce4b9d7eUL, 0xff5c5cf186e3c61cUL, -+ 0xacc63ca34b8ec145UL, 0x74621888fee66574UL, -+ /* 174 */ 0x956f409645290a1eUL, 0xef0bf8e3263a962eUL, -+ 0xed6a50eb5ec2647bUL, 0x0694283a9dca7502UL, -+ /* 175 */ 0x769b963643a2dcd1UL, 0x42b7c8ea09fc5353UL, -+ 0x4f002aee13397eabUL, 0x63005e2c19b7d63aUL, -+ /* 176 */ 0xca6736da63023beaUL, 0x966c7f6db12a99b7UL, -+ 0xace09390c537c5e1UL, 0x0b696063a1aa89eeUL, -+ /* 177 */ 0xebb03e97288c56e5UL, 0x432a9f9f938c8be8UL, -+ 0xa6a5a93d5b717f71UL, 0x1a5fb4c3e18f9d97UL, -+ /* 178 */ 0x1c94e7ad1c60cdceUL, 0xee202a43fc02c4a0UL, -+ 0x8dafe4d867c46a20UL, 0x0a10263c8ac27b58UL, -+ /* 179 */ 0xd0dea9dfe4432a4aUL, 0x856af87bbe9277c5UL, -+ 0xce8472acc212c71aUL, 0x6f151b6d9bbb1e91UL, -+ /* 180 */ 0x26776c527ceed56aUL, 0x7d211cb7fbf8faecUL, -+ 0x37ae66a6fd4609ccUL, 0x1f81b702d2770c42UL, -+ /* 181 */ 0x2fb0b057eac58392UL, 0xe1dd89fe29744e9dUL, -+ 0xc964f8eb17beb4f8UL, 0x29571073c9a2d41eUL, -+ /* 182 */ 0xa948a18981c0e254UL, 0x2df6369b65b22830UL, -+ 0xa33eb2d75fcfd3c6UL, 0x078cd6ec4199a01fUL, -+ /* 183 */ 0x4a584a41ad900d2fUL, 0x32142b78e2c74c52UL, -+ 0x68c4e8338431c978UL, 0x7f69ea9008689fc2UL, -+ /* 184 */ 0x52f2c81e46a38265UL, 0xfd78072d04a832fdUL, -+ 0x8cd7d5fa25359e94UL, 0x4de71b7454cc29d2UL, -+ /* 185 */ 0x42eb60ad1eda6ac9UL, 0x0aad37dfdbc09c3aUL, -+ 0x81004b71e33cc191UL, 0x44e6be345122803cUL, -+ /* 186 */ 0x03fe8388ba1920dbUL, 0xf5d57c32150db008UL, -+ 0x49c8c4281af60c29UL, 0x21edb518de701aeeUL, -+ /* 187 */ 0x7fb63e418f06dc99UL, 0xa4460d99c166d7b8UL, -+ 0x24dd5248ce520a83UL, 0x5ec3ad712b928358UL, -+ /* 188 */ 0x15022a5fbd17930fUL, 0xa4f64a77d82570e3UL, -+ 0x12bc8d6915783712UL, 0x498194c0fc620abbUL, -+ /* 189 */ 0x38a2d9d255686c82UL, 0x785c6bd9193e21f0UL, -+ 0xe4d5c81ab24a5484UL, 0x56307860b2e20989UL, -+ /* 190 */ 0x429d55f78b4d74c4UL, 0x22f1834643350131UL, -+ 0x1e60c24598c71fffUL, 0x59f2f014979983efUL, -+ /* 191 */ 0x46a47d56eb494a44UL, 0x3e22a854d636a18eUL, -+ 0xb346e15274491c3bUL, 0x2ceafd4e5390cde7UL, -+ /* 192 */ 0xba8a8538be0d6675UL, 0x4b9074bb50818e23UL, -+ 0xcbdab89085d304c3UL, 0x61a24fe0e56192c4UL, -+ /* 193 */ 0xcb7615e6db525bcbUL, 0xdd7d8c35a567e4caUL, -+ 0xe6b4153acafcdd69UL, 0x2d668e097f3c9766UL, -+ /* 194 */ 0xa57e7e265ce55ef0UL, 0x5d9f4e527cd4b967UL, -+ 0xfbc83606492fd1e5UL, 0x090d52beb7c3f7aeUL, -+ /* 195 */ 0x09b9515a1e7b4d7cUL, 0x1f266a2599da44c0UL, -+ 0xa1c49548e2c55504UL, 0x7ef04287126f15ccUL, -+ /* 196 */ 0xfed1659dbd30ef15UL, 0x8b4ab9eec4e0277bUL, -+ 0x884d6236a5df3291UL, 0x1fd96ea6bf5cf788UL, -+ /* 197 */ 0x42a161981f190d9aUL, 0x61d849507e6052c1UL, -+ 0x9fe113bf285a2cd5UL, 0x7c22d676dbad85d8UL, -+ /* 198 */ 0x82e770ed2bfbd27dUL, 0x4c05b2ece996f5a5UL, -+ 0xcd40a9c2b0900150UL, 0x5895319213d9bf64UL, -+ /* 199 */ 0xe7cc5d703fea2e08UL, 0xb50c491258e2188cUL, -+ 0xcce30baa48205bf0UL, 0x537c659ccfa32d62UL, -+ /* 200 */ 0x37b6623a98cfc088UL, 0xfe9bed1fa4d6aca4UL, -+ 0x04d29b8e56a8d1b0UL, 0x725f71c40b519575UL, -+ /* 201 */ 0x28c7f89cd0339ce6UL, 0x8367b14469ddc18bUL, -+ 0x883ada83a6a1652cUL, 0x585f1974034d6c17UL, -+ /* 202 */ 0x89cfb266f1b19188UL, 0xe63b4863e7c35217UL, -+ 0xd88c9da6b4c0526aUL, 0x3e035c9df0954635UL, -+ /* 203 */ 0xdd9d5412fb45de9dUL, 0xdd684532e4cff40dUL, -+ 0x4b5c999b151d671cUL, 0x2d8c2cc811e7f690UL, -+ /* 204 */ 0x7f54be1d90055d40UL, 0xa464c5df464aaf40UL, -+ 0x33979624f0e917beUL, 0x2c018dc527356b30UL, -+ /* 205 */ 0xa5415024e330b3d4UL, 0x73ff3d96691652d3UL, -+ 0x94ec42c4ef9b59f1UL, 0x0747201618d08e5aUL, -+ /* 206 */ 0x4d6ca48aca411c53UL, 0x66415f2fcfa66119UL, -+ 0x9c4dd40051e227ffUL, 0x59810bc09a02f7ebUL, -+ /* 207 */ 0x2a7eb171b3dc101dUL, 0x441c5ab99ffef68eUL, -+ 0x32025c9b93b359eaUL, 0x5e8ce0a71e9d112fUL, -+ /* 208 */ 0xbfcccb92429503fdUL, 0xd271ba752f095d55UL, -+ 0x345ead5e972d091eUL, 0x18c8df11a83103baUL, -+ /* 209 */ 0x90cd949a9aed0f4cUL, 0xc5d1f4cb6660e37eUL, -+ 0xb8cac52d56c52e0bUL, 0x6e42e400c5808e0dUL, -+ /* 210 */ 0xa3b46966eeaefd23UL, 0x0c4f1f0be39ecdcaUL, -+ 0x189dc8c9d683a51dUL, 0x51f27f054c09351bUL, -+ /* 211 */ 0x4c487ccd2a320682UL, 0x587ea95bb3df1c96UL, -+ 0xc8ccf79e555cb8e8UL, 0x547dc829a206d73dUL, -+ /* 212 */ 0xb822a6cd80c39b06UL, 0xe96d54732000d4c6UL, -+ 0x28535b6f91463b4dUL, 0x228f4660e2486e1dUL, -+ /* 213 */ 0x98799538de8d3abfUL, 0x8cd8330045ebca6eUL, -+ 0x79952a008221e738UL, 0x4322e1a7535cd2bbUL, -+ /* 214 */ 0xb114c11819d1801cUL, 0x2016e4d84f3f5ec7UL, -+ 0xdd0e2df409260f4cUL, 0x5ec362c0ae5f7266UL, -+ /* 215 */ 0xc0462b18b8b2b4eeUL, 0x7cc8d950274d1afbUL, -+ 0xf25f7105436b02d2UL, 0x43bbf8dcbff9ccd3UL, -+ /* 216 */ 0xb6ad1767a039e9dfUL, 0xb0714da8f69d3583UL, -+ 0x5e55fa18b42931f5UL, 0x4ed5558f33c60961UL, -+ /* 217 */ 0x1fe37901c647a5ddUL, 0x593ddf1f8081d357UL, -+ 0x0249a4fd813fd7a6UL, 0x69acca274e9caf61UL, -+ /* 218 */ 0x047ba3ea330721c9UL, 0x83423fc20e7e1ea0UL, -+ 0x1df4c0af01314a60UL, 0x09a62dab89289527UL, -+ /* 219 */ 0xa5b325a49cc6cb00UL, 0xe94b5dc654b56cb6UL, -+ 0x3be28779adc994a0UL, 0x4296e8f8ba3a4aadUL, -+ /* 220 */ 0x328689761e451eabUL, 0x2e4d598bff59594aUL, -+ 0x49b96853d7a7084aUL, 0x4980a319601420a8UL, -+ /* 221 */ 0x9565b9e12f552c42UL, 0x8a5318db7100fe96UL, -+ 0x05c90b4d43add0d7UL, 0x538b4cd66a5d4edaUL, -+ /* 222 */ 0xf4e94fc3e89f039fUL, 0x592c9af26f618045UL, -+ 0x08a36eb5fd4b9550UL, 0x25fffaf6c2ed1419UL, -+ /* 223 */ 0x34434459cc79d354UL, 0xeeecbfb4b1d5476bUL, -+ 0xddeb34a061615d99UL, 0x5129cecceb64b773UL, -+ /* 224 */ 0xee43215894993520UL, 0x772f9c7cf14c0b3bUL, -+ 0xd2e2fce306bedad5UL, 0x715f42b546f06a97UL, -+ /* 225 */ 0x434ecdceda5b5f1aUL, 0x0da17115a49741a9UL, -+ 0x680bd77c73edad2eUL, 0x487c02354edd9041UL, -+ /* 226 */ 0xb8efeff3a70ed9c4UL, 0x56a32aa3e857e302UL, -+ 0xdf3a68bd48a2a5a0UL, 0x07f650b73176c444UL, -+ /* 227 */ 0xe38b9b1626e0ccb1UL, 0x79e053c18b09fb36UL, -+ 0x56d90319c9f94964UL, 0x1ca941e7ac9ff5c4UL, -+ /* 228 */ 0x49c4df29162fa0bbUL, 0x8488cf3282b33305UL, -+ 0x95dfda14cabb437dUL, 0x3391f78264d5ad86UL, -+ /* 229 */ 0x729ae06ae2b5095dUL, 0xd58a58d73259a946UL, -+ 0xe9834262d13921edUL, 0x27fedafaa54bb592UL, -+ /* 230 */ 0xa99dc5b829ad48bbUL, 0x5f025742499ee260UL, -+ 0x802c8ecd5d7513fdUL, 0x78ceb3ef3f6dd938UL, -+ /* 231 */ 0xc342f44f8a135d94UL, 0x7b9edb44828cdda3UL, -+ 0x9436d11a0537cfe7UL, 0x5064b164ec1ab4c8UL, -+ /* 232 */ 0x7020eccfd37eb2fcUL, 0x1f31ea3ed90d25fcUL, -+ 0x1b930d7bdfa1bb34UL, 0x5344467a48113044UL, -+ /* 233 */ 0x70073170f25e6dfbUL, 0xe385dc1a50114cc8UL, -+ 0x2348698ac8fc4f00UL, 0x2a77a55284dd40d8UL, -+ /* 234 */ 0xfe06afe0c98c6ce4UL, 0xc235df96dddfd6e4UL, -+ 0x1428d01e33bf1ed3UL, 0x785768ec9300bdafUL, -+ /* 235 */ 0x9702e57a91deb63bUL, 0x61bdb8bfe5ce8b80UL, -+ 0x645b426f3d1d58acUL, 0x4804a82227a557bcUL, -+ /* 236 */ 0x8e57048ab44d2601UL, 0x68d6501a4b3a6935UL, -+ 0xc39c9ec3f9e1c293UL, 0x4172f257d4de63e2UL, -+ /* 237 */ 0xd368b450330c6401UL, 0x040d3017418f2391UL, -+ 0x2c34bb6090b7d90dUL, 0x16f649228fdfd51fUL, -+ /* 238 */ 0xbea6818e2b928ef5UL, 0xe28ccf91cdc11e72UL, -+ 0x594aaa68e77a36cdUL, 0x313034806c7ffd0fUL, -+ /* 239 */ 0x8a9d27ac2249bd65UL, 0x19a3b464018e9512UL, -+ 0xc26ccff352b37ec7UL, 0x056f68341d797b21UL, -+ /* 240 */ 0x5e79d6757efd2327UL, 0xfabdbcb6553afe15UL, -+ 0xd3e7222c6eaf5a60UL, 0x7046c76d4dae743bUL, -+ /* 241 */ 0x660be872b18d4a55UL, 0x19992518574e1496UL, -+ 0xc103053a302bdcbbUL, 0x3ed8e9800b218e8eUL, -+ /* 242 */ 0x7b0b9239fa75e03eUL, 0xefe9fb684633c083UL, -+ 0x98a35fbe391a7793UL, 0x6065510fe2d0fe34UL, -+ /* 243 */ 0x55cb668548abad0cUL, 0xb4584548da87e527UL, -+ 0x2c43ecea0107c1ddUL, 0x526028809372de35UL, -+ /* 244 */ 0x3415c56af9213b1fUL, 0x5bee1a4d017e98dbUL, -+ 0x13f6b105b5cf709bUL, 0x5ff20e3482b29ab6UL, -+ /* 245 */ 0x0aa29c75cc2e6c90UL, 0xfc7d73ca3a70e206UL, -+ 0x899fc38fc4b5c515UL, 0x250386b124ffc207UL, -+ /* 246 */ 0x54ea28d5ae3d2b56UL, 0x9913149dd6de60ceUL, -+ 0x16694fc58f06d6c1UL, 0x46b23975eb018fc7UL, -+ /* 247 */ 0x470a6a0fb4b7b4e2UL, 0x5d92475a8f7253deUL, -+ 0xabeee5b52fbd3adbUL, 0x7fa20801a0806968UL, -+ /* 248 */ 0x76f3faf19f7714d2UL, 0xb3e840c12f4660c3UL, -+ 0x0fb4cd8df212744eUL, 0x4b065a251d3a2dd2UL, -+ /* 249 */ 0x5cebde383d77cd4aUL, 0x6adf39df882c9cb1UL, -+ 0xa2dd242eb09af759UL, 0x3147c0e50e5f6422UL, -+ /* 250 */ 0x164ca5101d1350dbUL, 0xf8d13479c33fc962UL, -+ 0xe640ce4d13e5da08UL, 0x4bdee0c45061f8baUL, -+ /* 251 */ 0xd7c46dc1a4edb1c9UL, 0x5514d7b6437fd98aUL, -+ 0x58942f6bb2a1c00bUL, 0x2dffb2ab1d70710eUL, -+ /* 252 */ 0xccdfcf2fc18b6d68UL, 0xa8ebcba8b7806167UL, -+ 0x980697f95e2937e3UL, 0x02fbba1cd0126e8cUL -+}; -+ -+#ifdef CONFIG_AS_ADX -+/* c is two 512-bit products: c0[0:7]=a0[0:3]*b0[0:3] and c1[8:15]=a1[4:7]*b1[4:7] -+ * a is two 256-bit integers: a0[0:3] and a1[4:7] -+ * b is two 256-bit integers: b0[0:3] and b1[4:7] -+ */ -+static void mul2_256x256_integer_adx(u64 *const c, const u64 *const a, -+ const u64 *const b) -+{ -+ asm volatile( -+ "xorl %%r14d, %%r14d ;" -+ "movq (%1), %%rdx; " /* A[0] */ -+ "mulx (%2), %%r8, %%r15; " /* A[0]*B[0] */ -+ "xorl %%r10d, %%r10d ;" -+ "movq %%r8, (%0) ;" -+ "mulx 8(%2), %%r10, %%rax; " /* A[0]*B[1] */ -+ "adox %%r10, %%r15 ;" -+ "mulx 16(%2), %%r8, %%rbx; " /* A[0]*B[2] */ -+ "adox %%r8, %%rax ;" -+ "mulx 24(%2), %%r10, %%rcx; " /* A[0]*B[3] */ -+ "adox %%r10, %%rbx ;" -+ /******************************************/ -+ "adox %%r14, %%rcx ;" -+ -+ "movq 8(%1), %%rdx; " /* A[1] */ -+ "mulx (%2), %%r8, %%r9; " /* A[1]*B[0] */ -+ "adox %%r15, %%r8 ;" -+ "movq %%r8, 8(%0) ;" -+ "mulx 8(%2), %%r10, %%r11; " /* A[1]*B[1] */ -+ "adox %%r10, %%r9 ;" -+ "adcx %%r9, %%rax ;" -+ "mulx 16(%2), %%r8, %%r13; " /* A[1]*B[2] */ -+ "adox %%r8, %%r11 ;" -+ "adcx %%r11, %%rbx ;" -+ "mulx 24(%2), %%r10, %%r15; " /* A[1]*B[3] */ -+ "adox %%r10, %%r13 ;" -+ "adcx %%r13, %%rcx ;" -+ /******************************************/ -+ "adox %%r14, %%r15 ;" -+ "adcx %%r14, %%r15 ;" -+ -+ "movq 16(%1), %%rdx; " /* A[2] */ -+ "xorl %%r10d, %%r10d ;" -+ "mulx (%2), %%r8, %%r9; " /* A[2]*B[0] */ -+ "adox %%rax, %%r8 ;" -+ "movq %%r8, 16(%0) ;" -+ "mulx 8(%2), %%r10, %%r11; " /* A[2]*B[1] */ -+ "adox %%r10, %%r9 ;" -+ "adcx %%r9, %%rbx ;" -+ "mulx 16(%2), %%r8, %%r13; " /* A[2]*B[2] */ -+ "adox %%r8, %%r11 ;" -+ "adcx %%r11, %%rcx ;" -+ "mulx 24(%2), %%r10, %%rax; " /* A[2]*B[3] */ -+ "adox %%r10, %%r13 ;" -+ "adcx %%r13, %%r15 ;" -+ /******************************************/ -+ "adox %%r14, %%rax ;" -+ "adcx %%r14, %%rax ;" -+ -+ "movq 24(%1), %%rdx; " /* A[3] */ -+ "xorl %%r10d, %%r10d ;" -+ "mulx (%2), %%r8, %%r9; " /* A[3]*B[0] */ -+ "adox %%rbx, %%r8 ;" -+ "movq %%r8, 24(%0) ;" -+ "mulx 8(%2), %%r10, %%r11; " /* A[3]*B[1] */ -+ "adox %%r10, %%r9 ;" -+ "adcx %%r9, %%rcx ;" -+ "movq %%rcx, 32(%0) ;" -+ "mulx 16(%2), %%r8, %%r13; " /* A[3]*B[2] */ -+ "adox %%r8, %%r11 ;" -+ "adcx %%r11, %%r15 ;" -+ "movq %%r15, 40(%0) ;" -+ "mulx 24(%2), %%r10, %%rbx; " /* A[3]*B[3] */ -+ "adox %%r10, %%r13 ;" -+ "adcx %%r13, %%rax ;" -+ "movq %%rax, 48(%0) ;" -+ /******************************************/ -+ "adox %%r14, %%rbx ;" -+ "adcx %%r14, %%rbx ;" -+ "movq %%rbx, 56(%0) ;" -+ -+ "movq 32(%1), %%rdx; " /* C[0] */ -+ "mulx 32(%2), %%r8, %%r15; " /* C[0]*D[0] */ -+ "xorl %%r10d, %%r10d ;" -+ "movq %%r8, 64(%0);" -+ "mulx 40(%2), %%r10, %%rax; " /* C[0]*D[1] */ -+ "adox %%r10, %%r15 ;" -+ "mulx 48(%2), %%r8, %%rbx; " /* C[0]*D[2] */ -+ "adox %%r8, %%rax ;" -+ "mulx 56(%2), %%r10, %%rcx; " /* C[0]*D[3] */ -+ "adox %%r10, %%rbx ;" -+ /******************************************/ -+ "adox %%r14, %%rcx ;" -+ -+ "movq 40(%1), %%rdx; " /* C[1] */ -+ "xorl %%r10d, %%r10d ;" -+ "mulx 32(%2), %%r8, %%r9; " /* C[1]*D[0] */ -+ "adox %%r15, %%r8 ;" -+ "movq %%r8, 72(%0);" -+ "mulx 40(%2), %%r10, %%r11; " /* C[1]*D[1] */ -+ "adox %%r10, %%r9 ;" -+ "adcx %%r9, %%rax ;" -+ "mulx 48(%2), %%r8, %%r13; " /* C[1]*D[2] */ -+ "adox %%r8, %%r11 ;" -+ "adcx %%r11, %%rbx ;" -+ "mulx 56(%2), %%r10, %%r15; " /* C[1]*D[3] */ -+ "adox %%r10, %%r13 ;" -+ "adcx %%r13, %%rcx ;" -+ /******************************************/ -+ "adox %%r14, %%r15 ;" -+ "adcx %%r14, %%r15 ;" -+ -+ "movq 48(%1), %%rdx; " /* C[2] */ -+ "xorl %%r10d, %%r10d ;" -+ "mulx 32(%2), %%r8, %%r9; " /* C[2]*D[0] */ -+ "adox %%rax, %%r8 ;" -+ "movq %%r8, 80(%0);" -+ "mulx 40(%2), %%r10, %%r11; " /* C[2]*D[1] */ -+ "adox %%r10, %%r9 ;" -+ "adcx %%r9, %%rbx ;" -+ "mulx 48(%2), %%r8, %%r13; " /* C[2]*D[2] */ -+ "adox %%r8, %%r11 ;" -+ "adcx %%r11, %%rcx ;" -+ "mulx 56(%2), %%r10, %%rax; " /* C[2]*D[3] */ -+ "adox %%r10, %%r13 ;" -+ "adcx %%r13, %%r15 ;" -+ /******************************************/ -+ "adox %%r14, %%rax ;" -+ "adcx %%r14, %%rax ;" -+ -+ "movq 56(%1), %%rdx; " /* C[3] */ -+ "xorl %%r10d, %%r10d ;" -+ "mulx 32(%2), %%r8, %%r9; " /* C[3]*D[0] */ -+ "adox %%rbx, %%r8 ;" -+ "movq %%r8, 88(%0);" -+ "mulx 40(%2), %%r10, %%r11; " /* C[3]*D[1] */ -+ "adox %%r10, %%r9 ;" -+ "adcx %%r9, %%rcx ;" -+ "movq %%rcx, 96(%0) ;" -+ "mulx 48(%2), %%r8, %%r13; " /* C[3]*D[2] */ -+ "adox %%r8, %%r11 ;" -+ "adcx %%r11, %%r15 ;" -+ "movq %%r15, 104(%0) ;" -+ "mulx 56(%2), %%r10, %%rbx; " /* C[3]*D[3] */ -+ "adox %%r10, %%r13 ;" -+ "adcx %%r13, %%rax ;" -+ "movq %%rax, 112(%0) ;" -+ /******************************************/ -+ "adox %%r14, %%rbx ;" -+ "adcx %%r14, %%rbx ;" -+ "movq %%rbx, 120(%0) ;" -+ : -+ : "r"(c), "r"(a), "r"(b) -+ : "memory", "cc", "%rax", "%rbx", "%rcx", "%rdx", "%r8", "%r9", -+ "%r10", "%r11", "%r13", "%r14", "%r15"); -+} -+#endif -+ -+#ifdef CONFIG_AS_BMI2 -+static void mul2_256x256_integer_bmi2(u64 *const c, const u64 *const a, -+ const u64 *const b) -+{ -+ asm volatile( -+ "movq (%1), %%rdx; " /* A[0] */ -+ "mulx (%2), %%r8, %%r15; " /* A[0]*B[0] */ -+ "movq %%r8, (%0) ;" -+ "mulx 8(%2), %%r10, %%rax; " /* A[0]*B[1] */ -+ "addq %%r10, %%r15 ;" -+ "mulx 16(%2), %%r8, %%rbx; " /* A[0]*B[2] */ -+ "adcq %%r8, %%rax ;" -+ "mulx 24(%2), %%r10, %%rcx; " /* A[0]*B[3] */ -+ "adcq %%r10, %%rbx ;" -+ /******************************************/ -+ "adcq $0, %%rcx ;" -+ -+ "movq 8(%1), %%rdx; " /* A[1] */ -+ "mulx (%2), %%r8, %%r9; " /* A[1]*B[0] */ -+ "addq %%r15, %%r8 ;" -+ "movq %%r8, 8(%0) ;" -+ "mulx 8(%2), %%r10, %%r11; " /* A[1]*B[1] */ -+ "adcq %%r10, %%r9 ;" -+ "mulx 16(%2), %%r8, %%r13; " /* A[1]*B[2] */ -+ "adcq %%r8, %%r11 ;" -+ "mulx 24(%2), %%r10, %%r15; " /* A[1]*B[3] */ -+ "adcq %%r10, %%r13 ;" -+ /******************************************/ -+ "adcq $0, %%r15 ;" -+ -+ "addq %%r9, %%rax ;" -+ "adcq %%r11, %%rbx ;" -+ "adcq %%r13, %%rcx ;" -+ "adcq $0, %%r15 ;" -+ -+ "movq 16(%1), %%rdx; " /* A[2] */ -+ "mulx (%2), %%r8, %%r9; " /* A[2]*B[0] */ -+ "addq %%rax, %%r8 ;" -+ "movq %%r8, 16(%0) ;" -+ "mulx 8(%2), %%r10, %%r11; " /* A[2]*B[1] */ -+ "adcq %%r10, %%r9 ;" -+ "mulx 16(%2), %%r8, %%r13; " /* A[2]*B[2] */ -+ "adcq %%r8, %%r11 ;" -+ "mulx 24(%2), %%r10, %%rax; " /* A[2]*B[3] */ -+ "adcq %%r10, %%r13 ;" -+ /******************************************/ -+ "adcq $0, %%rax ;" -+ -+ "addq %%r9, %%rbx ;" -+ "adcq %%r11, %%rcx ;" -+ "adcq %%r13, %%r15 ;" -+ "adcq $0, %%rax ;" -+ -+ "movq 24(%1), %%rdx; " /* A[3] */ -+ "mulx (%2), %%r8, %%r9; " /* A[3]*B[0] */ -+ "addq %%rbx, %%r8 ;" -+ "movq %%r8, 24(%0) ;" -+ "mulx 8(%2), %%r10, %%r11; " /* A[3]*B[1] */ -+ "adcq %%r10, %%r9 ;" -+ "mulx 16(%2), %%r8, %%r13; " /* A[3]*B[2] */ -+ "adcq %%r8, %%r11 ;" -+ "mulx 24(%2), %%r10, %%rbx; " /* A[3]*B[3] */ -+ "adcq %%r10, %%r13 ;" -+ /******************************************/ -+ "adcq $0, %%rbx ;" -+ -+ "addq %%r9, %%rcx ;" -+ "movq %%rcx, 32(%0) ;" -+ "adcq %%r11, %%r15 ;" -+ "movq %%r15, 40(%0) ;" -+ "adcq %%r13, %%rax ;" -+ "movq %%rax, 48(%0) ;" -+ "adcq $0, %%rbx ;" -+ "movq %%rbx, 56(%0) ;" -+ -+ "movq 32(%1), %%rdx; " /* C[0] */ -+ "mulx 32(%2), %%r8, %%r15; " /* C[0]*D[0] */ -+ "movq %%r8, 64(%0) ;" -+ "mulx 40(%2), %%r10, %%rax; " /* C[0]*D[1] */ -+ "addq %%r10, %%r15 ;" -+ "mulx 48(%2), %%r8, %%rbx; " /* C[0]*D[2] */ -+ "adcq %%r8, %%rax ;" -+ "mulx 56(%2), %%r10, %%rcx; " /* C[0]*D[3] */ -+ "adcq %%r10, %%rbx ;" -+ /******************************************/ -+ "adcq $0, %%rcx ;" -+ -+ "movq 40(%1), %%rdx; " /* C[1] */ -+ "mulx 32(%2), %%r8, %%r9; " /* C[1]*D[0] */ -+ "addq %%r15, %%r8 ;" -+ "movq %%r8, 72(%0) ;" -+ "mulx 40(%2), %%r10, %%r11; " /* C[1]*D[1] */ -+ "adcq %%r10, %%r9 ;" -+ "mulx 48(%2), %%r8, %%r13; " /* C[1]*D[2] */ -+ "adcq %%r8, %%r11 ;" -+ "mulx 56(%2), %%r10, %%r15; " /* C[1]*D[3] */ -+ "adcq %%r10, %%r13 ;" -+ /******************************************/ -+ "adcq $0, %%r15 ;" -+ -+ "addq %%r9, %%rax ;" -+ "adcq %%r11, %%rbx ;" -+ "adcq %%r13, %%rcx ;" -+ "adcq $0, %%r15 ;" -+ -+ "movq 48(%1), %%rdx; " /* C[2] */ -+ "mulx 32(%2), %%r8, %%r9; " /* C[2]*D[0] */ -+ "addq %%rax, %%r8 ;" -+ "movq %%r8, 80(%0) ;" -+ "mulx 40(%2), %%r10, %%r11; " /* C[2]*D[1] */ -+ "adcq %%r10, %%r9 ;" -+ "mulx 48(%2), %%r8, %%r13; " /* C[2]*D[2] */ -+ "adcq %%r8, %%r11 ;" -+ "mulx 56(%2), %%r10, %%rax; " /* C[2]*D[3] */ -+ "adcq %%r10, %%r13 ;" -+ /******************************************/ -+ "adcq $0, %%rax ;" -+ -+ "addq %%r9, %%rbx ;" -+ "adcq %%r11, %%rcx ;" -+ "adcq %%r13, %%r15 ;" -+ "adcq $0, %%rax ;" -+ -+ "movq 56(%1), %%rdx; " /* C[3] */ -+ "mulx 32(%2), %%r8, %%r9; " /* C[3]*D[0] */ -+ "addq %%rbx, %%r8 ;" -+ "movq %%r8, 88(%0) ;" -+ "mulx 40(%2), %%r10, %%r11; " /* C[3]*D[1] */ -+ "adcq %%r10, %%r9 ;" -+ "mulx 48(%2), %%r8, %%r13; " /* C[3]*D[2] */ -+ "adcq %%r8, %%r11 ;" -+ "mulx 56(%2), %%r10, %%rbx; " /* C[3]*D[3] */ -+ "adcq %%r10, %%r13 ;" -+ /******************************************/ -+ "adcq $0, %%rbx ;" -+ -+ "addq %%r9, %%rcx ;" -+ "movq %%rcx, 96(%0) ;" -+ "adcq %%r11, %%r15 ;" -+ "movq %%r15, 104(%0) ;" -+ "adcq %%r13, %%rax ;" -+ "movq %%rax, 112(%0) ;" -+ "adcq $0, %%rbx ;" -+ "movq %%rbx, 120(%0) ;" -+ : -+ : "r"(c), "r"(a), "r"(b) -+ : "memory", "cc", "%rax", "%rbx", "%rcx", "%rdx", "%r8", "%r9", -+ "%r10", "%r11", "%r13", "%r15"); -+} -+#endif -+ -+#ifdef CONFIG_AS_ADX -+static void sqr2_256x256_integer_adx(u64 *const c, const u64 *const a) -+{ -+ asm volatile( -+ "movq (%1), %%rdx ;" /* A[0] */ -+ "mulx 8(%1), %%r8, %%r14 ;" /* A[1]*A[0] */ -+ "xorl %%r15d, %%r15d;" -+ "mulx 16(%1), %%r9, %%r10 ;" /* A[2]*A[0] */ -+ "adcx %%r14, %%r9 ;" -+ "mulx 24(%1), %%rax, %%rcx ;" /* A[3]*A[0] */ -+ "adcx %%rax, %%r10 ;" -+ "movq 24(%1), %%rdx ;" /* A[3] */ -+ "mulx 8(%1), %%r11, %%rbx ;" /* A[1]*A[3] */ -+ "adcx %%rcx, %%r11 ;" -+ "mulx 16(%1), %%rax, %%r13 ;" /* A[2]*A[3] */ -+ "adcx %%rax, %%rbx ;" -+ "movq 8(%1), %%rdx ;" /* A[1] */ -+ "adcx %%r15, %%r13 ;" -+ "mulx 16(%1), %%rax, %%rcx ;" /* A[2]*A[1] */ -+ "movq $0, %%r14 ;" -+ /******************************************/ -+ "adcx %%r15, %%r14 ;" -+ -+ "xorl %%r15d, %%r15d;" -+ "adox %%rax, %%r10 ;" -+ "adcx %%r8, %%r8 ;" -+ "adox %%rcx, %%r11 ;" -+ "adcx %%r9, %%r9 ;" -+ "adox %%r15, %%rbx ;" -+ "adcx %%r10, %%r10 ;" -+ "adox %%r15, %%r13 ;" -+ "adcx %%r11, %%r11 ;" -+ "adox %%r15, %%r14 ;" -+ "adcx %%rbx, %%rbx ;" -+ "adcx %%r13, %%r13 ;" -+ "adcx %%r14, %%r14 ;" -+ -+ "movq (%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ;" /* A[0]^2 */ -+ /*******************/ -+ "movq %%rax, 0(%0) ;" -+ "addq %%rcx, %%r8 ;" -+ "movq %%r8, 8(%0) ;" -+ "movq 8(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ;" /* A[1]^2 */ -+ "adcq %%rax, %%r9 ;" -+ "movq %%r9, 16(%0) ;" -+ "adcq %%rcx, %%r10 ;" -+ "movq %%r10, 24(%0) ;" -+ "movq 16(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ;" /* A[2]^2 */ -+ "adcq %%rax, %%r11 ;" -+ "movq %%r11, 32(%0) ;" -+ "adcq %%rcx, %%rbx ;" -+ "movq %%rbx, 40(%0) ;" -+ "movq 24(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ;" /* A[3]^2 */ -+ "adcq %%rax, %%r13 ;" -+ "movq %%r13, 48(%0) ;" -+ "adcq %%rcx, %%r14 ;" -+ "movq %%r14, 56(%0) ;" -+ -+ -+ "movq 32(%1), %%rdx ;" /* B[0] */ -+ "mulx 40(%1), %%r8, %%r14 ;" /* B[1]*B[0] */ -+ "xorl %%r15d, %%r15d;" -+ "mulx 48(%1), %%r9, %%r10 ;" /* B[2]*B[0] */ -+ "adcx %%r14, %%r9 ;" -+ "mulx 56(%1), %%rax, %%rcx ;" /* B[3]*B[0] */ -+ "adcx %%rax, %%r10 ;" -+ "movq 56(%1), %%rdx ;" /* B[3] */ -+ "mulx 40(%1), %%r11, %%rbx ;" /* B[1]*B[3] */ -+ "adcx %%rcx, %%r11 ;" -+ "mulx 48(%1), %%rax, %%r13 ;" /* B[2]*B[3] */ -+ "adcx %%rax, %%rbx ;" -+ "movq 40(%1), %%rdx ;" /* B[1] */ -+ "adcx %%r15, %%r13 ;" -+ "mulx 48(%1), %%rax, %%rcx ;" /* B[2]*B[1] */ -+ "movq $0, %%r14 ;" -+ /******************************************/ -+ "adcx %%r15, %%r14 ;" -+ -+ "xorl %%r15d, %%r15d;" -+ "adox %%rax, %%r10 ;" -+ "adcx %%r8, %%r8 ;" -+ "adox %%rcx, %%r11 ;" -+ "adcx %%r9, %%r9 ;" -+ "adox %%r15, %%rbx ;" -+ "adcx %%r10, %%r10 ;" -+ "adox %%r15, %%r13 ;" -+ "adcx %%r11, %%r11 ;" -+ "adox %%r15, %%r14 ;" -+ "adcx %%rbx, %%rbx ;" -+ "adcx %%r13, %%r13 ;" -+ "adcx %%r14, %%r14 ;" -+ -+ "movq 32(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ;" /* B[0]^2 */ -+ /*******************/ -+ "movq %%rax, 64(%0) ;" -+ "addq %%rcx, %%r8 ;" -+ "movq %%r8, 72(%0) ;" -+ "movq 40(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ;" /* B[1]^2 */ -+ "adcq %%rax, %%r9 ;" -+ "movq %%r9, 80(%0) ;" -+ "adcq %%rcx, %%r10 ;" -+ "movq %%r10, 88(%0) ;" -+ "movq 48(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ;" /* B[2]^2 */ -+ "adcq %%rax, %%r11 ;" -+ "movq %%r11, 96(%0) ;" -+ "adcq %%rcx, %%rbx ;" -+ "movq %%rbx, 104(%0) ;" -+ "movq 56(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ;" /* B[3]^2 */ -+ "adcq %%rax, %%r13 ;" -+ "movq %%r13, 112(%0) ;" -+ "adcq %%rcx, %%r14 ;" -+ "movq %%r14, 120(%0) ;" -+ : -+ : "r"(c), "r"(a) -+ : "memory", "cc", "%rax", "%rbx", "%rcx", "%rdx", "%r8", "%r9", -+ "%r10", "%r11", "%r13", "%r14", "%r15"); -+} -+#endif -+ -+#ifdef CONFIG_AS_BMI2 -+static void sqr2_256x256_integer_bmi2(u64 *const c, const u64 *const a) -+{ -+ asm volatile( -+ "movq 8(%1), %%rdx ;" /* A[1] */ -+ "mulx (%1), %%r8, %%r9 ;" /* A[0]*A[1] */ -+ "mulx 16(%1), %%r10, %%r11 ;" /* A[2]*A[1] */ -+ "mulx 24(%1), %%rcx, %%r14 ;" /* A[3]*A[1] */ -+ -+ "movq 16(%1), %%rdx ;" /* A[2] */ -+ "mulx 24(%1), %%r15, %%r13 ;" /* A[3]*A[2] */ -+ "mulx (%1), %%rax, %%rdx ;" /* A[0]*A[2] */ -+ -+ "addq %%rax, %%r9 ;" -+ "adcq %%rdx, %%r10 ;" -+ "adcq %%rcx, %%r11 ;" -+ "adcq %%r14, %%r15 ;" -+ "adcq $0, %%r13 ;" -+ "movq $0, %%r14 ;" -+ "adcq $0, %%r14 ;" -+ -+ "movq (%1), %%rdx ;" /* A[0] */ -+ "mulx 24(%1), %%rax, %%rcx ;" /* A[0]*A[3] */ -+ -+ "addq %%rax, %%r10 ;" -+ "adcq %%rcx, %%r11 ;" -+ "adcq $0, %%r15 ;" -+ "adcq $0, %%r13 ;" -+ "adcq $0, %%r14 ;" -+ -+ "shldq $1, %%r13, %%r14 ;" -+ "shldq $1, %%r15, %%r13 ;" -+ "shldq $1, %%r11, %%r15 ;" -+ "shldq $1, %%r10, %%r11 ;" -+ "shldq $1, %%r9, %%r10 ;" -+ "shldq $1, %%r8, %%r9 ;" -+ "shlq $1, %%r8 ;" -+ -+ /*******************/ -+ "mulx %%rdx, %%rax, %%rcx ; " /* A[0]^2 */ -+ /*******************/ -+ "movq %%rax, 0(%0) ;" -+ "addq %%rcx, %%r8 ;" -+ "movq %%r8, 8(%0) ;" -+ "movq 8(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ; " /* A[1]^2 */ -+ "adcq %%rax, %%r9 ;" -+ "movq %%r9, 16(%0) ;" -+ "adcq %%rcx, %%r10 ;" -+ "movq %%r10, 24(%0) ;" -+ "movq 16(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ; " /* A[2]^2 */ -+ "adcq %%rax, %%r11 ;" -+ "movq %%r11, 32(%0) ;" -+ "adcq %%rcx, %%r15 ;" -+ "movq %%r15, 40(%0) ;" -+ "movq 24(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ; " /* A[3]^2 */ -+ "adcq %%rax, %%r13 ;" -+ "movq %%r13, 48(%0) ;" -+ "adcq %%rcx, %%r14 ;" -+ "movq %%r14, 56(%0) ;" -+ -+ "movq 40(%1), %%rdx ;" /* B[1] */ -+ "mulx 32(%1), %%r8, %%r9 ;" /* B[0]*B[1] */ -+ "mulx 48(%1), %%r10, %%r11 ;" /* B[2]*B[1] */ -+ "mulx 56(%1), %%rcx, %%r14 ;" /* B[3]*B[1] */ -+ -+ "movq 48(%1), %%rdx ;" /* B[2] */ -+ "mulx 56(%1), %%r15, %%r13 ;" /* B[3]*B[2] */ -+ "mulx 32(%1), %%rax, %%rdx ;" /* B[0]*B[2] */ -+ -+ "addq %%rax, %%r9 ;" -+ "adcq %%rdx, %%r10 ;" -+ "adcq %%rcx, %%r11 ;" -+ "adcq %%r14, %%r15 ;" -+ "adcq $0, %%r13 ;" -+ "movq $0, %%r14 ;" -+ "adcq $0, %%r14 ;" -+ -+ "movq 32(%1), %%rdx ;" /* B[0] */ -+ "mulx 56(%1), %%rax, %%rcx ;" /* B[0]*B[3] */ -+ -+ "addq %%rax, %%r10 ;" -+ "adcq %%rcx, %%r11 ;" -+ "adcq $0, %%r15 ;" -+ "adcq $0, %%r13 ;" -+ "adcq $0, %%r14 ;" -+ -+ "shldq $1, %%r13, %%r14 ;" -+ "shldq $1, %%r15, %%r13 ;" -+ "shldq $1, %%r11, %%r15 ;" -+ "shldq $1, %%r10, %%r11 ;" -+ "shldq $1, %%r9, %%r10 ;" -+ "shldq $1, %%r8, %%r9 ;" -+ "shlq $1, %%r8 ;" -+ -+ /*******************/ -+ "mulx %%rdx, %%rax, %%rcx ; " /* B[0]^2 */ -+ /*******************/ -+ "movq %%rax, 64(%0) ;" -+ "addq %%rcx, %%r8 ;" -+ "movq %%r8, 72(%0) ;" -+ "movq 40(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ; " /* B[1]^2 */ -+ "adcq %%rax, %%r9 ;" -+ "movq %%r9, 80(%0) ;" -+ "adcq %%rcx, %%r10 ;" -+ "movq %%r10, 88(%0) ;" -+ "movq 48(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ; " /* B[2]^2 */ -+ "adcq %%rax, %%r11 ;" -+ "movq %%r11, 96(%0) ;" -+ "adcq %%rcx, %%r15 ;" -+ "movq %%r15, 104(%0) ;" -+ "movq 56(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ; " /* B[3]^2 */ -+ "adcq %%rax, %%r13 ;" -+ "movq %%r13, 112(%0) ;" -+ "adcq %%rcx, %%r14 ;" -+ "movq %%r14, 120(%0) ;" -+ : -+ : "r"(c), "r"(a) -+ : "memory", "cc", "%rax", "%rcx", "%rdx", "%r8", "%r9", "%r10", -+ "%r11", "%r13", "%r14", "%r15"); -+} -+#endif -+ -+#ifdef CONFIG_AS_ADX -+static void red_eltfp25519_2w_adx(u64 *const c, const u64 *const a) -+{ -+ asm volatile( -+ "movl $38, %%edx; " /* 2*c = 38 = 2^256 */ -+ "mulx 32(%1), %%r8, %%r10; " /* c*C[4] */ -+ "xorl %%ebx, %%ebx ;" -+ "adox (%1), %%r8 ;" -+ "mulx 40(%1), %%r9, %%r11; " /* c*C[5] */ -+ "adcx %%r10, %%r9 ;" -+ "adox 8(%1), %%r9 ;" -+ "mulx 48(%1), %%r10, %%rax; " /* c*C[6] */ -+ "adcx %%r11, %%r10 ;" -+ "adox 16(%1), %%r10 ;" -+ "mulx 56(%1), %%r11, %%rcx; " /* c*C[7] */ -+ "adcx %%rax, %%r11 ;" -+ "adox 24(%1), %%r11 ;" -+ /***************************************/ -+ "adcx %%rbx, %%rcx ;" -+ "adox %%rbx, %%rcx ;" -+ "imul %%rdx, %%rcx ;" /* c*C[4], cf=0, of=0 */ -+ "adcx %%rcx, %%r8 ;" -+ "adcx %%rbx, %%r9 ;" -+ "movq %%r9, 8(%0) ;" -+ "adcx %%rbx, %%r10 ;" -+ "movq %%r10, 16(%0) ;" -+ "adcx %%rbx, %%r11 ;" -+ "movq %%r11, 24(%0) ;" -+ "mov $0, %%ecx ;" -+ "cmovc %%edx, %%ecx ;" -+ "addq %%rcx, %%r8 ;" -+ "movq %%r8, (%0) ;" -+ -+ "mulx 96(%1), %%r8, %%r10; " /* c*C[4] */ -+ "xorl %%ebx, %%ebx ;" -+ "adox 64(%1), %%r8 ;" -+ "mulx 104(%1), %%r9, %%r11; " /* c*C[5] */ -+ "adcx %%r10, %%r9 ;" -+ "adox 72(%1), %%r9 ;" -+ "mulx 112(%1), %%r10, %%rax; " /* c*C[6] */ -+ "adcx %%r11, %%r10 ;" -+ "adox 80(%1), %%r10 ;" -+ "mulx 120(%1), %%r11, %%rcx; " /* c*C[7] */ -+ "adcx %%rax, %%r11 ;" -+ "adox 88(%1), %%r11 ;" -+ /****************************************/ -+ "adcx %%rbx, %%rcx ;" -+ "adox %%rbx, %%rcx ;" -+ "imul %%rdx, %%rcx ;" /* c*C[4], cf=0, of=0 */ -+ "adcx %%rcx, %%r8 ;" -+ "adcx %%rbx, %%r9 ;" -+ "movq %%r9, 40(%0) ;" -+ "adcx %%rbx, %%r10 ;" -+ "movq %%r10, 48(%0) ;" -+ "adcx %%rbx, %%r11 ;" -+ "movq %%r11, 56(%0) ;" -+ "mov $0, %%ecx ;" -+ "cmovc %%edx, %%ecx ;" -+ "addq %%rcx, %%r8 ;" -+ "movq %%r8, 32(%0) ;" -+ : -+ : "r"(c), "r"(a) -+ : "memory", "cc", "%rax", "%rbx", "%rcx", "%rdx", "%r8", "%r9", -+ "%r10", "%r11"); -+} -+#endif -+ -+#ifdef CONFIG_AS_BMI2 -+static void red_eltfp25519_2w_bmi2(u64 *const c, const u64 *const a) -+{ -+ asm volatile( -+ "movl $38, %%edx ; " /* 2*c = 38 = 2^256 */ -+ "mulx 32(%1), %%r8, %%r10 ;" /* c*C[4] */ -+ "mulx 40(%1), %%r9, %%r11 ;" /* c*C[5] */ -+ "addq %%r10, %%r9 ;" -+ "mulx 48(%1), %%r10, %%rax ;" /* c*C[6] */ -+ "adcq %%r11, %%r10 ;" -+ "mulx 56(%1), %%r11, %%rcx ;" /* c*C[7] */ -+ "adcq %%rax, %%r11 ;" -+ /***************************************/ -+ "adcq $0, %%rcx ;" -+ "addq (%1), %%r8 ;" -+ "adcq 8(%1), %%r9 ;" -+ "adcq 16(%1), %%r10 ;" -+ "adcq 24(%1), %%r11 ;" -+ "adcq $0, %%rcx ;" -+ "imul %%rdx, %%rcx ;" /* c*C[4], cf=0 */ -+ "addq %%rcx, %%r8 ;" -+ "adcq $0, %%r9 ;" -+ "movq %%r9, 8(%0) ;" -+ "adcq $0, %%r10 ;" -+ "movq %%r10, 16(%0) ;" -+ "adcq $0, %%r11 ;" -+ "movq %%r11, 24(%0) ;" -+ "mov $0, %%ecx ;" -+ "cmovc %%edx, %%ecx ;" -+ "addq %%rcx, %%r8 ;" -+ "movq %%r8, (%0) ;" -+ -+ "mulx 96(%1), %%r8, %%r10 ;" /* c*C[4] */ -+ "mulx 104(%1), %%r9, %%r11 ;" /* c*C[5] */ -+ "addq %%r10, %%r9 ;" -+ "mulx 112(%1), %%r10, %%rax ;" /* c*C[6] */ -+ "adcq %%r11, %%r10 ;" -+ "mulx 120(%1), %%r11, %%rcx ;" /* c*C[7] */ -+ "adcq %%rax, %%r11 ;" -+ /****************************************/ -+ "adcq $0, %%rcx ;" -+ "addq 64(%1), %%r8 ;" -+ "adcq 72(%1), %%r9 ;" -+ "adcq 80(%1), %%r10 ;" -+ "adcq 88(%1), %%r11 ;" -+ "adcq $0, %%rcx ;" -+ "imul %%rdx, %%rcx ;" /* c*C[4], cf=0 */ -+ "addq %%rcx, %%r8 ;" -+ "adcq $0, %%r9 ;" -+ "movq %%r9, 40(%0) ;" -+ "adcq $0, %%r10 ;" -+ "movq %%r10, 48(%0) ;" -+ "adcq $0, %%r11 ;" -+ "movq %%r11, 56(%0) ;" -+ "mov $0, %%ecx ;" -+ "cmovc %%edx, %%ecx ;" -+ "addq %%rcx, %%r8 ;" -+ "movq %%r8, 32(%0) ;" -+ : -+ : "r"(c), "r"(a) -+ : "memory", "cc", "%rax", "%rcx", "%rdx", "%r8", "%r9", "%r10", -+ "%r11"); -+} -+#endif -+ -+#ifdef CONFIG_AS_ADX -+static void mul_256x256_integer_adx(u64 *const c, const u64 *const a, -+ const u64 *const b) -+{ -+ asm volatile( -+ "movq (%1), %%rdx; " /* A[0] */ -+ "mulx (%2), %%r8, %%r9; " /* A[0]*B[0] */ -+ "xorl %%r10d, %%r10d ;" -+ "movq %%r8, (%0) ;" -+ "mulx 8(%2), %%r10, %%r11; " /* A[0]*B[1] */ -+ "adox %%r9, %%r10 ;" -+ "movq %%r10, 8(%0) ;" -+ "mulx 16(%2), %%r15, %%r13; " /* A[0]*B[2] */ -+ "adox %%r11, %%r15 ;" -+ "mulx 24(%2), %%r14, %%rdx; " /* A[0]*B[3] */ -+ "adox %%r13, %%r14 ;" -+ "movq $0, %%rax ;" -+ /******************************************/ -+ "adox %%rdx, %%rax ;" -+ -+ "movq 8(%1), %%rdx; " /* A[1] */ -+ "mulx (%2), %%r8, %%r9; " /* A[1]*B[0] */ -+ "xorl %%r10d, %%r10d ;" -+ "adcx 8(%0), %%r8 ;" -+ "movq %%r8, 8(%0) ;" -+ "mulx 8(%2), %%r10, %%r11; " /* A[1]*B[1] */ -+ "adox %%r9, %%r10 ;" -+ "adcx %%r15, %%r10 ;" -+ "movq %%r10, 16(%0) ;" -+ "mulx 16(%2), %%r15, %%r13; " /* A[1]*B[2] */ -+ "adox %%r11, %%r15 ;" -+ "adcx %%r14, %%r15 ;" -+ "movq $0, %%r8 ;" -+ "mulx 24(%2), %%r14, %%rdx; " /* A[1]*B[3] */ -+ "adox %%r13, %%r14 ;" -+ "adcx %%rax, %%r14 ;" -+ "movq $0, %%rax ;" -+ /******************************************/ -+ "adox %%rdx, %%rax ;" -+ "adcx %%r8, %%rax ;" -+ -+ "movq 16(%1), %%rdx; " /* A[2] */ -+ "mulx (%2), %%r8, %%r9; " /* A[2]*B[0] */ -+ "xorl %%r10d, %%r10d ;" -+ "adcx 16(%0), %%r8 ;" -+ "movq %%r8, 16(%0) ;" -+ "mulx 8(%2), %%r10, %%r11; " /* A[2]*B[1] */ -+ "adox %%r9, %%r10 ;" -+ "adcx %%r15, %%r10 ;" -+ "movq %%r10, 24(%0) ;" -+ "mulx 16(%2), %%r15, %%r13; " /* A[2]*B[2] */ -+ "adox %%r11, %%r15 ;" -+ "adcx %%r14, %%r15 ;" -+ "movq $0, %%r8 ;" -+ "mulx 24(%2), %%r14, %%rdx; " /* A[2]*B[3] */ -+ "adox %%r13, %%r14 ;" -+ "adcx %%rax, %%r14 ;" -+ "movq $0, %%rax ;" -+ /******************************************/ -+ "adox %%rdx, %%rax ;" -+ "adcx %%r8, %%rax ;" -+ -+ "movq 24(%1), %%rdx; " /* A[3] */ -+ "mulx (%2), %%r8, %%r9; " /* A[3]*B[0] */ -+ "xorl %%r10d, %%r10d ;" -+ "adcx 24(%0), %%r8 ;" -+ "movq %%r8, 24(%0) ;" -+ "mulx 8(%2), %%r10, %%r11; " /* A[3]*B[1] */ -+ "adox %%r9, %%r10 ;" -+ "adcx %%r15, %%r10 ;" -+ "movq %%r10, 32(%0) ;" -+ "mulx 16(%2), %%r15, %%r13; " /* A[3]*B[2] */ -+ "adox %%r11, %%r15 ;" -+ "adcx %%r14, %%r15 ;" -+ "movq %%r15, 40(%0) ;" -+ "movq $0, %%r8 ;" -+ "mulx 24(%2), %%r14, %%rdx; " /* A[3]*B[3] */ -+ "adox %%r13, %%r14 ;" -+ "adcx %%rax, %%r14 ;" -+ "movq %%r14, 48(%0) ;" -+ "movq $0, %%rax ;" -+ /******************************************/ -+ "adox %%rdx, %%rax ;" -+ "adcx %%r8, %%rax ;" -+ "movq %%rax, 56(%0) ;" -+ : -+ : "r"(c), "r"(a), "r"(b) -+ : "memory", "cc", "%rax", "%rdx", "%r8", "%r9", "%r10", "%r11", -+ "%r13", "%r14", "%r15"); -+} -+#endif -+ -+#ifdef CONFIG_AS_BMI2 -+static void mul_256x256_integer_bmi2(u64 *const c, const u64 *const a, -+ const u64 *const b) -+{ -+ asm volatile( -+ "movq (%1), %%rdx; " /* A[0] */ -+ "mulx (%2), %%r8, %%r15; " /* A[0]*B[0] */ -+ "movq %%r8, (%0) ;" -+ "mulx 8(%2), %%r10, %%rax; " /* A[0]*B[1] */ -+ "addq %%r10, %%r15 ;" -+ "mulx 16(%2), %%r8, %%rbx; " /* A[0]*B[2] */ -+ "adcq %%r8, %%rax ;" -+ "mulx 24(%2), %%r10, %%rcx; " /* A[0]*B[3] */ -+ "adcq %%r10, %%rbx ;" -+ /******************************************/ -+ "adcq $0, %%rcx ;" -+ -+ "movq 8(%1), %%rdx; " /* A[1] */ -+ "mulx (%2), %%r8, %%r9; " /* A[1]*B[0] */ -+ "addq %%r15, %%r8 ;" -+ "movq %%r8, 8(%0) ;" -+ "mulx 8(%2), %%r10, %%r11; " /* A[1]*B[1] */ -+ "adcq %%r10, %%r9 ;" -+ "mulx 16(%2), %%r8, %%r13; " /* A[1]*B[2] */ -+ "adcq %%r8, %%r11 ;" -+ "mulx 24(%2), %%r10, %%r15; " /* A[1]*B[3] */ -+ "adcq %%r10, %%r13 ;" -+ /******************************************/ -+ "adcq $0, %%r15 ;" -+ -+ "addq %%r9, %%rax ;" -+ "adcq %%r11, %%rbx ;" -+ "adcq %%r13, %%rcx ;" -+ "adcq $0, %%r15 ;" -+ -+ "movq 16(%1), %%rdx; " /* A[2] */ -+ "mulx (%2), %%r8, %%r9; " /* A[2]*B[0] */ -+ "addq %%rax, %%r8 ;" -+ "movq %%r8, 16(%0) ;" -+ "mulx 8(%2), %%r10, %%r11; " /* A[2]*B[1] */ -+ "adcq %%r10, %%r9 ;" -+ "mulx 16(%2), %%r8, %%r13; " /* A[2]*B[2] */ -+ "adcq %%r8, %%r11 ;" -+ "mulx 24(%2), %%r10, %%rax; " /* A[2]*B[3] */ -+ "adcq %%r10, %%r13 ;" -+ /******************************************/ -+ "adcq $0, %%rax ;" -+ -+ "addq %%r9, %%rbx ;" -+ "adcq %%r11, %%rcx ;" -+ "adcq %%r13, %%r15 ;" -+ "adcq $0, %%rax ;" -+ -+ "movq 24(%1), %%rdx; " /* A[3] */ -+ "mulx (%2), %%r8, %%r9; " /* A[3]*B[0] */ -+ "addq %%rbx, %%r8 ;" -+ "movq %%r8, 24(%0) ;" -+ "mulx 8(%2), %%r10, %%r11; " /* A[3]*B[1] */ -+ "adcq %%r10, %%r9 ;" -+ "mulx 16(%2), %%r8, %%r13; " /* A[3]*B[2] */ -+ "adcq %%r8, %%r11 ;" -+ "mulx 24(%2), %%r10, %%rbx; " /* A[3]*B[3] */ -+ "adcq %%r10, %%r13 ;" -+ /******************************************/ -+ "adcq $0, %%rbx ;" -+ -+ "addq %%r9, %%rcx ;" -+ "movq %%rcx, 32(%0) ;" -+ "adcq %%r11, %%r15 ;" -+ "movq %%r15, 40(%0) ;" -+ "adcq %%r13, %%rax ;" -+ "movq %%rax, 48(%0) ;" -+ "adcq $0, %%rbx ;" -+ "movq %%rbx, 56(%0) ;" -+ : -+ : "r"(c), "r"(a), "r"(b) -+ : "memory", "cc", "%rax", "%rbx", "%rcx", "%rdx", "%r8", "%r9", -+ "%r10", "%r11", "%r13", "%r15"); -+} -+#endif -+ -+#ifdef CONFIG_AS_ADX -+static void sqr_256x256_integer_adx(u64 *const c, const u64 *const a) -+{ -+ asm volatile( -+ "movq (%1), %%rdx ;" /* A[0] */ -+ "mulx 8(%1), %%r8, %%r14 ;" /* A[1]*A[0] */ -+ "xorl %%r15d, %%r15d;" -+ "mulx 16(%1), %%r9, %%r10 ;" /* A[2]*A[0] */ -+ "adcx %%r14, %%r9 ;" -+ "mulx 24(%1), %%rax, %%rcx ;" /* A[3]*A[0] */ -+ "adcx %%rax, %%r10 ;" -+ "movq 24(%1), %%rdx ;" /* A[3] */ -+ "mulx 8(%1), %%r11, %%rbx ;" /* A[1]*A[3] */ -+ "adcx %%rcx, %%r11 ;" -+ "mulx 16(%1), %%rax, %%r13 ;" /* A[2]*A[3] */ -+ "adcx %%rax, %%rbx ;" -+ "movq 8(%1), %%rdx ;" /* A[1] */ -+ "adcx %%r15, %%r13 ;" -+ "mulx 16(%1), %%rax, %%rcx ;" /* A[2]*A[1] */ -+ "movq $0, %%r14 ;" -+ /******************************************/ -+ "adcx %%r15, %%r14 ;" -+ -+ "xorl %%r15d, %%r15d;" -+ "adox %%rax, %%r10 ;" -+ "adcx %%r8, %%r8 ;" -+ "adox %%rcx, %%r11 ;" -+ "adcx %%r9, %%r9 ;" -+ "adox %%r15, %%rbx ;" -+ "adcx %%r10, %%r10 ;" -+ "adox %%r15, %%r13 ;" -+ "adcx %%r11, %%r11 ;" -+ "adox %%r15, %%r14 ;" -+ "adcx %%rbx, %%rbx ;" -+ "adcx %%r13, %%r13 ;" -+ "adcx %%r14, %%r14 ;" -+ -+ "movq (%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ;" /* A[0]^2 */ -+ /*******************/ -+ "movq %%rax, 0(%0) ;" -+ "addq %%rcx, %%r8 ;" -+ "movq %%r8, 8(%0) ;" -+ "movq 8(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ;" /* A[1]^2 */ -+ "adcq %%rax, %%r9 ;" -+ "movq %%r9, 16(%0) ;" -+ "adcq %%rcx, %%r10 ;" -+ "movq %%r10, 24(%0) ;" -+ "movq 16(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ;" /* A[2]^2 */ -+ "adcq %%rax, %%r11 ;" -+ "movq %%r11, 32(%0) ;" -+ "adcq %%rcx, %%rbx ;" -+ "movq %%rbx, 40(%0) ;" -+ "movq 24(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ;" /* A[3]^2 */ -+ "adcq %%rax, %%r13 ;" -+ "movq %%r13, 48(%0) ;" -+ "adcq %%rcx, %%r14 ;" -+ "movq %%r14, 56(%0) ;" -+ : -+ : "r"(c), "r"(a) -+ : "memory", "cc", "%rax", "%rbx", "%rcx", "%rdx", "%r8", "%r9", -+ "%r10", "%r11", "%r13", "%r14", "%r15"); -+} -+#endif -+ -+#ifdef CONFIG_AS_BMI2 -+static void sqr_256x256_integer_bmi2(u64 *const c, const u64 *const a) -+{ -+ asm volatile( -+ "movq 8(%1), %%rdx ;" /* A[1] */ -+ "mulx (%1), %%r8, %%r9 ;" /* A[0]*A[1] */ -+ "mulx 16(%1), %%r10, %%r11 ;" /* A[2]*A[1] */ -+ "mulx 24(%1), %%rcx, %%r14 ;" /* A[3]*A[1] */ -+ -+ "movq 16(%1), %%rdx ;" /* A[2] */ -+ "mulx 24(%1), %%r15, %%r13 ;" /* A[3]*A[2] */ -+ "mulx (%1), %%rax, %%rdx ;" /* A[0]*A[2] */ -+ -+ "addq %%rax, %%r9 ;" -+ "adcq %%rdx, %%r10 ;" -+ "adcq %%rcx, %%r11 ;" -+ "adcq %%r14, %%r15 ;" -+ "adcq $0, %%r13 ;" -+ "movq $0, %%r14 ;" -+ "adcq $0, %%r14 ;" -+ -+ "movq (%1), %%rdx ;" /* A[0] */ -+ "mulx 24(%1), %%rax, %%rcx ;" /* A[0]*A[3] */ -+ -+ "addq %%rax, %%r10 ;" -+ "adcq %%rcx, %%r11 ;" -+ "adcq $0, %%r15 ;" -+ "adcq $0, %%r13 ;" -+ "adcq $0, %%r14 ;" -+ -+ "shldq $1, %%r13, %%r14 ;" -+ "shldq $1, %%r15, %%r13 ;" -+ "shldq $1, %%r11, %%r15 ;" -+ "shldq $1, %%r10, %%r11 ;" -+ "shldq $1, %%r9, %%r10 ;" -+ "shldq $1, %%r8, %%r9 ;" -+ "shlq $1, %%r8 ;" -+ -+ /*******************/ -+ "mulx %%rdx, %%rax, %%rcx ;" /* A[0]^2 */ -+ /*******************/ -+ "movq %%rax, 0(%0) ;" -+ "addq %%rcx, %%r8 ;" -+ "movq %%r8, 8(%0) ;" -+ "movq 8(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ;" /* A[1]^2 */ -+ "adcq %%rax, %%r9 ;" -+ "movq %%r9, 16(%0) ;" -+ "adcq %%rcx, %%r10 ;" -+ "movq %%r10, 24(%0) ;" -+ "movq 16(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ;" /* A[2]^2 */ -+ "adcq %%rax, %%r11 ;" -+ "movq %%r11, 32(%0) ;" -+ "adcq %%rcx, %%r15 ;" -+ "movq %%r15, 40(%0) ;" -+ "movq 24(%1), %%rdx ;" -+ "mulx %%rdx, %%rax, %%rcx ;" /* A[3]^2 */ -+ "adcq %%rax, %%r13 ;" -+ "movq %%r13, 48(%0) ;" -+ "adcq %%rcx, %%r14 ;" -+ "movq %%r14, 56(%0) ;" -+ : -+ : "r"(c), "r"(a) -+ : "memory", "cc", "%rax", "%rcx", "%rdx", "%r8", "%r9", "%r10", -+ "%r11", "%r13", "%r14", "%r15"); -+} -+#endif -+ -+#ifdef CONFIG_AS_ADX -+static void red_eltfp25519_1w_adx(u64 *const c, const u64 *const a) -+{ -+ asm volatile( -+ "movl $38, %%edx ;" /* 2*c = 38 = 2^256 */ -+ "mulx 32(%1), %%r8, %%r10 ;" /* c*C[4] */ -+ "xorl %%ebx, %%ebx ;" -+ "adox (%1), %%r8 ;" -+ "mulx 40(%1), %%r9, %%r11 ;" /* c*C[5] */ -+ "adcx %%r10, %%r9 ;" -+ "adox 8(%1), %%r9 ;" -+ "mulx 48(%1), %%r10, %%rax ;" /* c*C[6] */ -+ "adcx %%r11, %%r10 ;" -+ "adox 16(%1), %%r10 ;" -+ "mulx 56(%1), %%r11, %%rcx ;" /* c*C[7] */ -+ "adcx %%rax, %%r11 ;" -+ "adox 24(%1), %%r11 ;" -+ /***************************************/ -+ "adcx %%rbx, %%rcx ;" -+ "adox %%rbx, %%rcx ;" -+ "imul %%rdx, %%rcx ;" /* c*C[4], cf=0, of=0 */ -+ "adcx %%rcx, %%r8 ;" -+ "adcx %%rbx, %%r9 ;" -+ "movq %%r9, 8(%0) ;" -+ "adcx %%rbx, %%r10 ;" -+ "movq %%r10, 16(%0) ;" -+ "adcx %%rbx, %%r11 ;" -+ "movq %%r11, 24(%0) ;" -+ "mov $0, %%ecx ;" -+ "cmovc %%edx, %%ecx ;" -+ "addq %%rcx, %%r8 ;" -+ "movq %%r8, (%0) ;" -+ : -+ : "r"(c), "r"(a) -+ : "memory", "cc", "%rax", "%rbx", "%rcx", "%rdx", "%r8", "%r9", -+ "%r10", "%r11"); -+} -+#endif -+ -+#ifdef CONFIG_AS_BMI2 -+static void red_eltfp25519_1w_bmi2(u64 *const c, const u64 *const a) -+{ -+ asm volatile( -+ "movl $38, %%edx ;" /* 2*c = 38 = 2^256 */ -+ "mulx 32(%1), %%r8, %%r10 ;" /* c*C[4] */ -+ "mulx 40(%1), %%r9, %%r11 ;" /* c*C[5] */ -+ "addq %%r10, %%r9 ;" -+ "mulx 48(%1), %%r10, %%rax ;" /* c*C[6] */ -+ "adcq %%r11, %%r10 ;" -+ "mulx 56(%1), %%r11, %%rcx ;" /* c*C[7] */ -+ "adcq %%rax, %%r11 ;" -+ /***************************************/ -+ "adcq $0, %%rcx ;" -+ "addq (%1), %%r8 ;" -+ "adcq 8(%1), %%r9 ;" -+ "adcq 16(%1), %%r10 ;" -+ "adcq 24(%1), %%r11 ;" -+ "adcq $0, %%rcx ;" -+ "imul %%rdx, %%rcx ;" /* c*C[4], cf=0 */ -+ "addq %%rcx, %%r8 ;" -+ "adcq $0, %%r9 ;" -+ "movq %%r9, 8(%0) ;" -+ "adcq $0, %%r10 ;" -+ "movq %%r10, 16(%0) ;" -+ "adcq $0, %%r11 ;" -+ "movq %%r11, 24(%0) ;" -+ "mov $0, %%ecx ;" -+ "cmovc %%edx, %%ecx ;" -+ "addq %%rcx, %%r8 ;" -+ "movq %%r8, (%0) ;" -+ : -+ : "r"(c), "r"(a) -+ : "memory", "cc", "%rax", "%rcx", "%rdx", "%r8", "%r9", "%r10", -+ "%r11"); -+} -+#endif -+ -+#ifdef CONFIG_AS_ADX -+static __always_inline void -+add_eltfp25519_1w_adx(u64 *const c, const u64 *const a, const u64 *const b) -+{ -+ asm volatile( -+ "mov $38, %%eax ;" -+ "xorl %%ecx, %%ecx ;" -+ "movq (%2), %%r8 ;" -+ "adcx (%1), %%r8 ;" -+ "movq 8(%2), %%r9 ;" -+ "adcx 8(%1), %%r9 ;" -+ "movq 16(%2), %%r10 ;" -+ "adcx 16(%1), %%r10 ;" -+ "movq 24(%2), %%r11 ;" -+ "adcx 24(%1), %%r11 ;" -+ "cmovc %%eax, %%ecx ;" -+ "xorl %%eax, %%eax ;" -+ "adcx %%rcx, %%r8 ;" -+ "adcx %%rax, %%r9 ;" -+ "movq %%r9, 8(%0) ;" -+ "adcx %%rax, %%r10 ;" -+ "movq %%r10, 16(%0) ;" -+ "adcx %%rax, %%r11 ;" -+ "movq %%r11, 24(%0) ;" -+ "mov $38, %%ecx ;" -+ "cmovc %%ecx, %%eax ;" -+ "addq %%rax, %%r8 ;" -+ "movq %%r8, (%0) ;" -+ : -+ : "r"(c), "r"(a), "r"(b) -+ : "memory", "cc", "%rax", "%rcx", "%r8", "%r9", "%r10", "%r11"); -+} -+#endif -+ -+#ifdef CONFIG_AS_BMI2 -+static __always_inline void -+add_eltfp25519_1w_bmi2(u64 *const c, const u64 *const a, const u64 *const b) -+{ -+ asm volatile( -+ "mov $38, %%eax ;" -+ "movq (%2), %%r8 ;" -+ "addq (%1), %%r8 ;" -+ "movq 8(%2), %%r9 ;" -+ "adcq 8(%1), %%r9 ;" -+ "movq 16(%2), %%r10 ;" -+ "adcq 16(%1), %%r10 ;" -+ "movq 24(%2), %%r11 ;" -+ "adcq 24(%1), %%r11 ;" -+ "mov $0, %%ecx ;" -+ "cmovc %%eax, %%ecx ;" -+ "addq %%rcx, %%r8 ;" -+ "adcq $0, %%r9 ;" -+ "movq %%r9, 8(%0) ;" -+ "adcq $0, %%r10 ;" -+ "movq %%r10, 16(%0) ;" -+ "adcq $0, %%r11 ;" -+ "movq %%r11, 24(%0) ;" -+ "mov $0, %%ecx ;" -+ "cmovc %%eax, %%ecx ;" -+ "addq %%rcx, %%r8 ;" -+ "movq %%r8, (%0) ;" -+ : -+ : "r"(c), "r"(a), "r"(b) -+ : "memory", "cc", "%rax", "%rcx", "%r8", "%r9", "%r10", "%r11"); -+} -+#endif -+ -+static __always_inline void -+sub_eltfp25519_1w(u64 *const c, const u64 *const a, const u64 *const b) -+{ -+ asm volatile( -+ "mov $38, %%eax ;" -+ "movq (%1), %%r8 ;" -+ "subq (%2), %%r8 ;" -+ "movq 8(%1), %%r9 ;" -+ "sbbq 8(%2), %%r9 ;" -+ "movq 16(%1), %%r10 ;" -+ "sbbq 16(%2), %%r10 ;" -+ "movq 24(%1), %%r11 ;" -+ "sbbq 24(%2), %%r11 ;" -+ "mov $0, %%ecx ;" -+ "cmovc %%eax, %%ecx ;" -+ "subq %%rcx, %%r8 ;" -+ "sbbq $0, %%r9 ;" -+ "movq %%r9, 8(%0) ;" -+ "sbbq $0, %%r10 ;" -+ "movq %%r10, 16(%0) ;" -+ "sbbq $0, %%r11 ;" -+ "movq %%r11, 24(%0) ;" -+ "mov $0, %%ecx ;" -+ "cmovc %%eax, %%ecx ;" -+ "subq %%rcx, %%r8 ;" -+ "movq %%r8, (%0) ;" -+ : -+ : "r"(c), "r"(a), "r"(b) -+ : "memory", "cc", "%rax", "%rcx", "%r8", "%r9", "%r10", "%r11"); -+} -+ -+/* Multiplication by a24 = (A+2)/4 = (486662+2)/4 = 121666 */ -+static __always_inline void -+mul_a24_eltfp25519_1w(u64 *const c, const u64 *const a) -+{ -+ const u64 a24 = 121666; -+ asm volatile( -+ "movq %2, %%rdx ;" -+ "mulx (%1), %%r8, %%r10 ;" -+ "mulx 8(%1), %%r9, %%r11 ;" -+ "addq %%r10, %%r9 ;" -+ "mulx 16(%1), %%r10, %%rax ;" -+ "adcq %%r11, %%r10 ;" -+ "mulx 24(%1), %%r11, %%rcx ;" -+ "adcq %%rax, %%r11 ;" -+ /**************************/ -+ "adcq $0, %%rcx ;" -+ "movl $38, %%edx ;" /* 2*c = 38 = 2^256 mod 2^255-19*/ -+ "imul %%rdx, %%rcx ;" -+ "addq %%rcx, %%r8 ;" -+ "adcq $0, %%r9 ;" -+ "movq %%r9, 8(%0) ;" -+ "adcq $0, %%r10 ;" -+ "movq %%r10, 16(%0) ;" -+ "adcq $0, %%r11 ;" -+ "movq %%r11, 24(%0) ;" -+ "mov $0, %%ecx ;" -+ "cmovc %%edx, %%ecx ;" -+ "addq %%rcx, %%r8 ;" -+ "movq %%r8, (%0) ;" -+ : -+ : "r"(c), "r"(a), "r"(a24) -+ : "memory", "cc", "%rax", "%rcx", "%rdx", "%r8", "%r9", "%r10", -+ "%r11"); -+} -+ -+#ifdef CONFIG_AS_ADX -+static void inv_eltfp25519_1w_adx(u64 *const c, const u64 *const a) -+{ -+ struct { -+ eltfp25519_1w_buffer buffer; -+ eltfp25519_1w x0, x1, x2; -+ } __aligned(32) m; -+ u64 *T[4]; -+ -+ T[0] = m.x0; -+ T[1] = c; /* x^(-1) */ -+ T[2] = m.x1; -+ T[3] = m.x2; -+ -+ copy_eltfp25519_1w(T[1], a); -+ sqrn_eltfp25519_1w_adx(T[1], 1); -+ copy_eltfp25519_1w(T[2], T[1]); -+ sqrn_eltfp25519_1w_adx(T[2], 2); -+ mul_eltfp25519_1w_adx(T[0], a, T[2]); -+ mul_eltfp25519_1w_adx(T[1], T[1], T[0]); -+ copy_eltfp25519_1w(T[2], T[1]); -+ sqrn_eltfp25519_1w_adx(T[2], 1); -+ mul_eltfp25519_1w_adx(T[0], T[0], T[2]); -+ copy_eltfp25519_1w(T[2], T[0]); -+ sqrn_eltfp25519_1w_adx(T[2], 5); -+ mul_eltfp25519_1w_adx(T[0], T[0], T[2]); -+ copy_eltfp25519_1w(T[2], T[0]); -+ sqrn_eltfp25519_1w_adx(T[2], 10); -+ mul_eltfp25519_1w_adx(T[2], T[2], T[0]); -+ copy_eltfp25519_1w(T[3], T[2]); -+ sqrn_eltfp25519_1w_adx(T[3], 20); -+ mul_eltfp25519_1w_adx(T[3], T[3], T[2]); -+ sqrn_eltfp25519_1w_adx(T[3], 10); -+ mul_eltfp25519_1w_adx(T[3], T[3], T[0]); -+ copy_eltfp25519_1w(T[0], T[3]); -+ sqrn_eltfp25519_1w_adx(T[0], 50); -+ mul_eltfp25519_1w_adx(T[0], T[0], T[3]); -+ copy_eltfp25519_1w(T[2], T[0]); -+ sqrn_eltfp25519_1w_adx(T[2], 100); -+ mul_eltfp25519_1w_adx(T[2], T[2], T[0]); -+ sqrn_eltfp25519_1w_adx(T[2], 50); -+ mul_eltfp25519_1w_adx(T[2], T[2], T[3]); -+ sqrn_eltfp25519_1w_adx(T[2], 5); -+ mul_eltfp25519_1w_adx(T[1], T[1], T[2]); -+ -+ memzero_explicit(&m, sizeof(m)); -+} -+#endif -+ -+#ifdef CONFIG_AS_BMI2 -+static void inv_eltfp25519_1w_bmi2(u64 *const c, const u64 *const a) -+{ -+ struct { -+ eltfp25519_1w_buffer buffer; -+ eltfp25519_1w x0, x1, x2; -+ } __aligned(32) m; -+ u64 *T[5]; -+ -+ T[0] = m.x0; -+ T[1] = c; /* x^(-1) */ -+ T[2] = m.x1; -+ T[3] = m.x2; -+ -+ copy_eltfp25519_1w(T[1], a); -+ sqrn_eltfp25519_1w_bmi2(T[1], 1); -+ copy_eltfp25519_1w(T[2], T[1]); -+ sqrn_eltfp25519_1w_bmi2(T[2], 2); -+ mul_eltfp25519_1w_bmi2(T[0], a, T[2]); -+ mul_eltfp25519_1w_bmi2(T[1], T[1], T[0]); -+ copy_eltfp25519_1w(T[2], T[1]); -+ sqrn_eltfp25519_1w_bmi2(T[2], 1); -+ mul_eltfp25519_1w_bmi2(T[0], T[0], T[2]); -+ copy_eltfp25519_1w(T[2], T[0]); -+ sqrn_eltfp25519_1w_bmi2(T[2], 5); -+ mul_eltfp25519_1w_bmi2(T[0], T[0], T[2]); -+ copy_eltfp25519_1w(T[2], T[0]); -+ sqrn_eltfp25519_1w_bmi2(T[2], 10); -+ mul_eltfp25519_1w_bmi2(T[2], T[2], T[0]); -+ copy_eltfp25519_1w(T[3], T[2]); -+ sqrn_eltfp25519_1w_bmi2(T[3], 20); -+ mul_eltfp25519_1w_bmi2(T[3], T[3], T[2]); -+ sqrn_eltfp25519_1w_bmi2(T[3], 10); -+ mul_eltfp25519_1w_bmi2(T[3], T[3], T[0]); -+ copy_eltfp25519_1w(T[0], T[3]); -+ sqrn_eltfp25519_1w_bmi2(T[0], 50); -+ mul_eltfp25519_1w_bmi2(T[0], T[0], T[3]); -+ copy_eltfp25519_1w(T[2], T[0]); -+ sqrn_eltfp25519_1w_bmi2(T[2], 100); -+ mul_eltfp25519_1w_bmi2(T[2], T[2], T[0]); -+ sqrn_eltfp25519_1w_bmi2(T[2], 50); -+ mul_eltfp25519_1w_bmi2(T[2], T[2], T[3]); -+ sqrn_eltfp25519_1w_bmi2(T[2], 5); -+ mul_eltfp25519_1w_bmi2(T[1], T[1], T[2]); -+ -+ memzero_explicit(&m, sizeof(m)); -+} -+#endif -+ -+/* Given c, a 256-bit number, fred_eltfp25519_1w updates c -+ * with a number such that 0 <= C < 2**255-19. -+ */ -+static __always_inline void fred_eltfp25519_1w(u64 *const c) -+{ -+ u64 tmp0 = 38, tmp1 = 19; -+ asm volatile( -+ "btrq $63, %3 ;" /* Put bit 255 in carry flag and clear */ -+ "cmovncl %k5, %k4 ;" /* c[255] ? 38 : 19 */ -+ -+ /* Add either 19 or 38 to c */ -+ "addq %4, %0 ;" -+ "adcq $0, %1 ;" -+ "adcq $0, %2 ;" -+ "adcq $0, %3 ;" -+ -+ /* Test for bit 255 again; only triggered on overflow modulo 2^255-19 */ -+ "movl $0, %k4 ;" -+ "cmovnsl %k5, %k4 ;" /* c[255] ? 0 : 19 */ -+ "btrq $63, %3 ;" /* Clear bit 255 */ -+ -+ /* Subtract 19 if necessary */ -+ "subq %4, %0 ;" -+ "sbbq $0, %1 ;" -+ "sbbq $0, %2 ;" -+ "sbbq $0, %3 ;" -+ -+ : "+r"(c[0]), "+r"(c[1]), "+r"(c[2]), "+r"(c[3]), "+r"(tmp0), -+ "+r"(tmp1) -+ : -+ : "memory", "cc"); -+} -+ -+static __always_inline void cswap(u8 bit, u64 *const px, u64 *const py) -+{ -+ u64 temp; -+ asm volatile( -+ "test %9, %9 ;" -+ "movq %0, %8 ;" -+ "cmovnzq %4, %0 ;" -+ "cmovnzq %8, %4 ;" -+ "movq %1, %8 ;" -+ "cmovnzq %5, %1 ;" -+ "cmovnzq %8, %5 ;" -+ "movq %2, %8 ;" -+ "cmovnzq %6, %2 ;" -+ "cmovnzq %8, %6 ;" -+ "movq %3, %8 ;" -+ "cmovnzq %7, %3 ;" -+ "cmovnzq %8, %7 ;" -+ : "+r"(px[0]), "+r"(px[1]), "+r"(px[2]), "+r"(px[3]), -+ "+r"(py[0]), "+r"(py[1]), "+r"(py[2]), "+r"(py[3]), -+ "=r"(temp) -+ : "r"(bit) -+ : "cc" -+ ); -+} -+ -+static __always_inline void cselect(u8 bit, u64 *const px, const u64 *const py) -+{ -+ asm volatile( -+ "test %4, %4 ;" -+ "cmovnzq %5, %0 ;" -+ "cmovnzq %6, %1 ;" -+ "cmovnzq %7, %2 ;" -+ "cmovnzq %8, %3 ;" -+ : "+r"(px[0]), "+r"(px[1]), "+r"(px[2]), "+r"(px[3]) -+ : "r"(bit), "rm"(py[0]), "rm"(py[1]), "rm"(py[2]), "rm"(py[3]) -+ : "cc" -+ ); -+} -+ -+static void curve25519_adx(u8 shared[CURVE25519_KEY_SIZE], -+ const u8 private_key[CURVE25519_KEY_SIZE], -+ const u8 session_key[CURVE25519_KEY_SIZE]) -+{ -+#ifdef CONFIG_AS_ADX -+ struct { -+ u64 buffer[4 * NUM_WORDS_ELTFP25519]; -+ u64 coordinates[4 * NUM_WORDS_ELTFP25519]; -+ u64 workspace[6 * NUM_WORDS_ELTFP25519]; -+ u8 session[CURVE25519_KEY_SIZE]; -+ u8 private[CURVE25519_KEY_SIZE]; -+ } __aligned(32) m; -+ -+ int i = 0, j = 0; -+ u64 prev = 0; -+ u64 *const X1 = (u64 *)m.session; -+ u64 *const key = (u64 *)m.private; -+ u64 *const Px = m.coordinates + 0; -+ u64 *const Pz = m.coordinates + 4; -+ u64 *const Qx = m.coordinates + 8; -+ u64 *const Qz = m.coordinates + 12; -+ u64 *const X2 = Qx; -+ u64 *const Z2 = Qz; -+ u64 *const X3 = Px; -+ u64 *const Z3 = Pz; -+ u64 *const X2Z2 = Qx; -+ u64 *const X3Z3 = Px; -+ -+ u64 *const A = m.workspace + 0; -+ u64 *const B = m.workspace + 4; -+ u64 *const D = m.workspace + 8; -+ u64 *const C = m.workspace + 12; -+ u64 *const DA = m.workspace + 16; -+ u64 *const CB = m.workspace + 20; -+ u64 *const AB = A; -+ u64 *const DC = D; -+ u64 *const DACB = DA; -+ -+ memcpy(m.private, private_key, sizeof(m.private)); -+ memcpy(m.session, session_key, sizeof(m.session)); -+ -+ curve25519_clamp_secret(m.private); -+ -+ /* As in the draft: -+ * When receiving such an array, implementations of curve25519 -+ * MUST mask the most-significant bit in the final byte. This -+ * is done to preserve compatibility with point formats which -+ * reserve the sign bit for use in other protocols and to -+ * increase resistance to implementation fingerprinting -+ */ -+ m.session[CURVE25519_KEY_SIZE - 1] &= (1 << (255 % 8)) - 1; -+ -+ copy_eltfp25519_1w(Px, X1); -+ setzero_eltfp25519_1w(Pz); -+ setzero_eltfp25519_1w(Qx); -+ setzero_eltfp25519_1w(Qz); -+ -+ Pz[0] = 1; -+ Qx[0] = 1; -+ -+ /* main-loop */ -+ prev = 0; -+ j = 62; -+ for (i = 3; i >= 0; --i) { -+ while (j >= 0) { -+ u64 bit = (key[i] >> j) & 0x1; -+ u64 swap = bit ^ prev; -+ prev = bit; -+ -+ add_eltfp25519_1w_adx(A, X2, Z2); /* A = (X2+Z2) */ -+ sub_eltfp25519_1w(B, X2, Z2); /* B = (X2-Z2) */ -+ add_eltfp25519_1w_adx(C, X3, Z3); /* C = (X3+Z3) */ -+ sub_eltfp25519_1w(D, X3, Z3); /* D = (X3-Z3) */ -+ mul_eltfp25519_2w_adx(DACB, AB, DC); /* [DA|CB] = [A|B]*[D|C] */ -+ -+ cselect(swap, A, C); -+ cselect(swap, B, D); -+ -+ sqr_eltfp25519_2w_adx(AB); /* [AA|BB] = [A^2|B^2] */ -+ add_eltfp25519_1w_adx(X3, DA, CB); /* X3 = (DA+CB) */ -+ sub_eltfp25519_1w(Z3, DA, CB); /* Z3 = (DA-CB) */ -+ sqr_eltfp25519_2w_adx(X3Z3); /* [X3|Z3] = [(DA+CB)|(DA+CB)]^2 */ -+ -+ copy_eltfp25519_1w(X2, B); /* X2 = B^2 */ -+ sub_eltfp25519_1w(Z2, A, B); /* Z2 = E = AA-BB */ -+ -+ mul_a24_eltfp25519_1w(B, Z2); /* B = a24*E */ -+ add_eltfp25519_1w_adx(B, B, X2); /* B = a24*E+B */ -+ mul_eltfp25519_2w_adx(X2Z2, X2Z2, AB); /* [X2|Z2] = [B|E]*[A|a24*E+B] */ -+ mul_eltfp25519_1w_adx(Z3, Z3, X1); /* Z3 = Z3*X1 */ -+ --j; -+ } -+ j = 63; -+ } -+ -+ inv_eltfp25519_1w_adx(A, Qz); -+ mul_eltfp25519_1w_adx((u64 *)shared, Qx, A); -+ fred_eltfp25519_1w((u64 *)shared); -+ -+ memzero_explicit(&m, sizeof(m)); -+#endif -+} -+ -+static void curve25519_adx_base(u8 session_key[CURVE25519_KEY_SIZE], -+ const u8 private_key[CURVE25519_KEY_SIZE]) -+{ -+#ifdef CONFIG_AS_ADX -+ struct { -+ u64 buffer[4 * NUM_WORDS_ELTFP25519]; -+ u64 coordinates[4 * NUM_WORDS_ELTFP25519]; -+ u64 workspace[4 * NUM_WORDS_ELTFP25519]; -+ u8 private[CURVE25519_KEY_SIZE]; -+ } __aligned(32) m; -+ -+ const int ite[4] = { 64, 64, 64, 63 }; -+ const int q = 3; -+ u64 swap = 1; -+ -+ int i = 0, j = 0, k = 0; -+ u64 *const key = (u64 *)m.private; -+ u64 *const Ur1 = m.coordinates + 0; -+ u64 *const Zr1 = m.coordinates + 4; -+ u64 *const Ur2 = m.coordinates + 8; -+ u64 *const Zr2 = m.coordinates + 12; -+ -+ u64 *const UZr1 = m.coordinates + 0; -+ u64 *const ZUr2 = m.coordinates + 8; -+ -+ u64 *const A = m.workspace + 0; -+ u64 *const B = m.workspace + 4; -+ u64 *const C = m.workspace + 8; -+ u64 *const D = m.workspace + 12; -+ -+ u64 *const AB = m.workspace + 0; -+ u64 *const CD = m.workspace + 8; -+ -+ const u64 *const P = table_ladder_8k; -+ -+ memcpy(m.private, private_key, sizeof(m.private)); -+ -+ curve25519_clamp_secret(m.private); -+ -+ setzero_eltfp25519_1w(Ur1); -+ setzero_eltfp25519_1w(Zr1); -+ setzero_eltfp25519_1w(Zr2); -+ Ur1[0] = 1; -+ Zr1[0] = 1; -+ Zr2[0] = 1; -+ -+ /* G-S */ -+ Ur2[3] = 0x1eaecdeee27cab34UL; -+ Ur2[2] = 0xadc7a0b9235d48e2UL; -+ Ur2[1] = 0xbbf095ae14b2edf8UL; -+ Ur2[0] = 0x7e94e1fec82faabdUL; -+ -+ /* main-loop */ -+ j = q; -+ for (i = 0; i < NUM_WORDS_ELTFP25519; ++i) { -+ while (j < ite[i]) { -+ u64 bit = (key[i] >> j) & 0x1; -+ k = (64 * i + j - q); -+ swap = swap ^ bit; -+ cswap(swap, Ur1, Ur2); -+ cswap(swap, Zr1, Zr2); -+ swap = bit; -+ /* Addition */ -+ sub_eltfp25519_1w(B, Ur1, Zr1); /* B = Ur1-Zr1 */ -+ add_eltfp25519_1w_adx(A, Ur1, Zr1); /* A = Ur1+Zr1 */ -+ mul_eltfp25519_1w_adx(C, &P[4 * k], B); /* C = M0-B */ -+ sub_eltfp25519_1w(B, A, C); /* B = (Ur1+Zr1) - M*(Ur1-Zr1) */ -+ add_eltfp25519_1w_adx(A, A, C); /* A = (Ur1+Zr1) + M*(Ur1-Zr1) */ -+ sqr_eltfp25519_2w_adx(AB); /* A = A^2 | B = B^2 */ -+ mul_eltfp25519_2w_adx(UZr1, ZUr2, AB); /* Ur1 = Zr2*A | Zr1 = Ur2*B */ -+ ++j; -+ } -+ j = 0; -+ } -+ -+ /* Doubling */ -+ for (i = 0; i < q; ++i) { -+ add_eltfp25519_1w_adx(A, Ur1, Zr1); /* A = Ur1+Zr1 */ -+ sub_eltfp25519_1w(B, Ur1, Zr1); /* B = Ur1-Zr1 */ -+ sqr_eltfp25519_2w_adx(AB); /* A = A**2 B = B**2 */ -+ copy_eltfp25519_1w(C, B); /* C = B */ -+ sub_eltfp25519_1w(B, A, B); /* B = A-B */ -+ mul_a24_eltfp25519_1w(D, B); /* D = my_a24*B */ -+ add_eltfp25519_1w_adx(D, D, C); /* D = D+C */ -+ mul_eltfp25519_2w_adx(UZr1, AB, CD); /* Ur1 = A*B Zr1 = Zr1*A */ -+ } -+ -+ /* Convert to affine coordinates */ -+ inv_eltfp25519_1w_adx(A, Zr1); -+ mul_eltfp25519_1w_adx((u64 *)session_key, Ur1, A); -+ fred_eltfp25519_1w((u64 *)session_key); -+ -+ memzero_explicit(&m, sizeof(m)); -+#endif -+} -+ -+static void curve25519_bmi2(u8 shared[CURVE25519_KEY_SIZE], -+ const u8 private_key[CURVE25519_KEY_SIZE], -+ const u8 session_key[CURVE25519_KEY_SIZE]) -+{ -+#ifdef CONFIG_AS_BMI2 -+ struct { -+ u64 buffer[4 * NUM_WORDS_ELTFP25519]; -+ u64 coordinates[4 * NUM_WORDS_ELTFP25519]; -+ u64 workspace[6 * NUM_WORDS_ELTFP25519]; -+ u8 session[CURVE25519_KEY_SIZE]; -+ u8 private[CURVE25519_KEY_SIZE]; -+ } __aligned(32) m; -+ -+ int i = 0, j = 0; -+ u64 prev = 0; -+ u64 *const X1 = (u64 *)m.session; -+ u64 *const key = (u64 *)m.private; -+ u64 *const Px = m.coordinates + 0; -+ u64 *const Pz = m.coordinates + 4; -+ u64 *const Qx = m.coordinates + 8; -+ u64 *const Qz = m.coordinates + 12; -+ u64 *const X2 = Qx; -+ u64 *const Z2 = Qz; -+ u64 *const X3 = Px; -+ u64 *const Z3 = Pz; -+ u64 *const X2Z2 = Qx; -+ u64 *const X3Z3 = Px; -+ -+ u64 *const A = m.workspace + 0; -+ u64 *const B = m.workspace + 4; -+ u64 *const D = m.workspace + 8; -+ u64 *const C = m.workspace + 12; -+ u64 *const DA = m.workspace + 16; -+ u64 *const CB = m.workspace + 20; -+ u64 *const AB = A; -+ u64 *const DC = D; -+ u64 *const DACB = DA; -+ -+ memcpy(m.private, private_key, sizeof(m.private)); -+ memcpy(m.session, session_key, sizeof(m.session)); -+ -+ curve25519_clamp_secret(m.private); -+ -+ /* As in the draft: -+ * When receiving such an array, implementations of curve25519 -+ * MUST mask the most-significant bit in the final byte. This -+ * is done to preserve compatibility with point formats which -+ * reserve the sign bit for use in other protocols and to -+ * increase resistance to implementation fingerprinting -+ */ -+ m.session[CURVE25519_KEY_SIZE - 1] &= (1 << (255 % 8)) - 1; -+ -+ copy_eltfp25519_1w(Px, X1); -+ setzero_eltfp25519_1w(Pz); -+ setzero_eltfp25519_1w(Qx); -+ setzero_eltfp25519_1w(Qz); -+ -+ Pz[0] = 1; -+ Qx[0] = 1; -+ -+ /* main-loop */ -+ prev = 0; -+ j = 62; -+ for (i = 3; i >= 0; --i) { -+ while (j >= 0) { -+ u64 bit = (key[i] >> j) & 0x1; -+ u64 swap = bit ^ prev; -+ prev = bit; -+ -+ add_eltfp25519_1w_bmi2(A, X2, Z2); /* A = (X2+Z2) */ -+ sub_eltfp25519_1w(B, X2, Z2); /* B = (X2-Z2) */ -+ add_eltfp25519_1w_bmi2(C, X3, Z3); /* C = (X3+Z3) */ -+ sub_eltfp25519_1w(D, X3, Z3); /* D = (X3-Z3) */ -+ mul_eltfp25519_2w_bmi2(DACB, AB, DC); /* [DA|CB] = [A|B]*[D|C] */ -+ -+ cselect(swap, A, C); -+ cselect(swap, B, D); -+ -+ sqr_eltfp25519_2w_bmi2(AB); /* [AA|BB] = [A^2|B^2] */ -+ add_eltfp25519_1w_bmi2(X3, DA, CB); /* X3 = (DA+CB) */ -+ sub_eltfp25519_1w(Z3, DA, CB); /* Z3 = (DA-CB) */ -+ sqr_eltfp25519_2w_bmi2(X3Z3); /* [X3|Z3] = [(DA+CB)|(DA+CB)]^2 */ -+ -+ copy_eltfp25519_1w(X2, B); /* X2 = B^2 */ -+ sub_eltfp25519_1w(Z2, A, B); /* Z2 = E = AA-BB */ -+ -+ mul_a24_eltfp25519_1w(B, Z2); /* B = a24*E */ -+ add_eltfp25519_1w_bmi2(B, B, X2); /* B = a24*E+B */ -+ mul_eltfp25519_2w_bmi2(X2Z2, X2Z2, AB); /* [X2|Z2] = [B|E]*[A|a24*E+B] */ -+ mul_eltfp25519_1w_bmi2(Z3, Z3, X1); /* Z3 = Z3*X1 */ -+ --j; -+ } -+ j = 63; -+ } -+ -+ inv_eltfp25519_1w_bmi2(A, Qz); -+ mul_eltfp25519_1w_bmi2((u64 *)shared, Qx, A); -+ fred_eltfp25519_1w((u64 *)shared); -+ -+ memzero_explicit(&m, sizeof(m)); -+#endif -+} -+ -+static void curve25519_bmi2_base(u8 session_key[CURVE25519_KEY_SIZE], -+ const u8 private_key[CURVE25519_KEY_SIZE]) -+{ -+#ifdef CONFIG_AS_BMI2 -+ struct { -+ u64 buffer[4 * NUM_WORDS_ELTFP25519]; -+ u64 coordinates[4 * NUM_WORDS_ELTFP25519]; -+ u64 workspace[4 * NUM_WORDS_ELTFP25519]; -+ u8 private[CURVE25519_KEY_SIZE]; -+ } __aligned(32) m; -+ -+ const int ite[4] = { 64, 64, 64, 63 }; -+ const int q = 3; -+ u64 swap = 1; -+ -+ int i = 0, j = 0, k = 0; -+ u64 *const key = (u64 *)m.private; -+ u64 *const Ur1 = m.coordinates + 0; -+ u64 *const Zr1 = m.coordinates + 4; -+ u64 *const Ur2 = m.coordinates + 8; -+ u64 *const Zr2 = m.coordinates + 12; -+ -+ u64 *const UZr1 = m.coordinates + 0; -+ u64 *const ZUr2 = m.coordinates + 8; -+ -+ u64 *const A = m.workspace + 0; -+ u64 *const B = m.workspace + 4; -+ u64 *const C = m.workspace + 8; -+ u64 *const D = m.workspace + 12; -+ -+ u64 *const AB = m.workspace + 0; -+ u64 *const CD = m.workspace + 8; -+ -+ const u64 *const P = table_ladder_8k; -+ -+ memcpy(m.private, private_key, sizeof(m.private)); -+ -+ curve25519_clamp_secret(m.private); -+ -+ setzero_eltfp25519_1w(Ur1); -+ setzero_eltfp25519_1w(Zr1); -+ setzero_eltfp25519_1w(Zr2); -+ Ur1[0] = 1; -+ Zr1[0] = 1; -+ Zr2[0] = 1; -+ -+ /* G-S */ -+ Ur2[3] = 0x1eaecdeee27cab34UL; -+ Ur2[2] = 0xadc7a0b9235d48e2UL; -+ Ur2[1] = 0xbbf095ae14b2edf8UL; -+ Ur2[0] = 0x7e94e1fec82faabdUL; -+ -+ /* main-loop */ -+ j = q; -+ for (i = 0; i < NUM_WORDS_ELTFP25519; ++i) { -+ while (j < ite[i]) { -+ u64 bit = (key[i] >> j) & 0x1; -+ k = (64 * i + j - q); -+ swap = swap ^ bit; -+ cswap(swap, Ur1, Ur2); -+ cswap(swap, Zr1, Zr2); -+ swap = bit; -+ /* Addition */ -+ sub_eltfp25519_1w(B, Ur1, Zr1); /* B = Ur1-Zr1 */ -+ add_eltfp25519_1w_bmi2(A, Ur1, Zr1); /* A = Ur1+Zr1 */ -+ mul_eltfp25519_1w_bmi2(C, &P[4 * k], B);/* C = M0-B */ -+ sub_eltfp25519_1w(B, A, C); /* B = (Ur1+Zr1) - M*(Ur1-Zr1) */ -+ add_eltfp25519_1w_bmi2(A, A, C); /* A = (Ur1+Zr1) + M*(Ur1-Zr1) */ -+ sqr_eltfp25519_2w_bmi2(AB); /* A = A^2 | B = B^2 */ -+ mul_eltfp25519_2w_bmi2(UZr1, ZUr2, AB); /* Ur1 = Zr2*A | Zr1 = Ur2*B */ -+ ++j; -+ } -+ j = 0; -+ } -+ -+ /* Doubling */ -+ for (i = 0; i < q; ++i) { -+ add_eltfp25519_1w_bmi2(A, Ur1, Zr1); /* A = Ur1+Zr1 */ -+ sub_eltfp25519_1w(B, Ur1, Zr1); /* B = Ur1-Zr1 */ -+ sqr_eltfp25519_2w_bmi2(AB); /* A = A**2 B = B**2 */ -+ copy_eltfp25519_1w(C, B); /* C = B */ -+ sub_eltfp25519_1w(B, A, B); /* B = A-B */ -+ mul_a24_eltfp25519_1w(D, B); /* D = my_a24*B */ -+ add_eltfp25519_1w_bmi2(D, D, C); /* D = D+C */ -+ mul_eltfp25519_2w_bmi2(UZr1, AB, CD); /* Ur1 = A*B Zr1 = Zr1*A */ -+ } -+ -+ /* Convert to affine coordinates */ -+ inv_eltfp25519_1w_bmi2(A, Zr1); -+ mul_eltfp25519_1w_bmi2((u64 *)session_key, Ur1, A); -+ fred_eltfp25519_1w((u64 *)session_key); -+ -+ memzero_explicit(&m, sizeof(m)); -+#endif -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/curve25519/curve25519.c 2019-08-20 20:26:42.400341426 +0000 -@@ -0,0 +1,113 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ * -+ * This is an implementation of the Curve25519 ECDH algorithm, using either -+ * a 32-bit implementation or a 64-bit implementation with 128-bit integers, -+ * depending on what is supported by the target compiler. -+ * -+ * Information: https://cr.yp.to/ecdh.html -+ */ -+ -+#include -+#include "../selftest/run.h" -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include // For crypto_memneq. -+ -+#if defined(CONFIG_ZINC_ARCH_X86_64) -+#include "curve25519-x86_64-glue.c" -+#elif defined(CONFIG_ZINC_ARCH_ARM) -+#include "curve25519-arm-glue.c" -+#else -+static bool *const curve25519_nobs[] __initconst = { }; -+static void __init curve25519_fpu_init(void) -+{ -+} -+static inline bool curve25519_arch(u8 mypublic[CURVE25519_KEY_SIZE], -+ const u8 secret[CURVE25519_KEY_SIZE], -+ const u8 basepoint[CURVE25519_KEY_SIZE]) -+{ -+ return false; -+} -+static inline bool curve25519_base_arch(u8 pub[CURVE25519_KEY_SIZE], -+ const u8 secret[CURVE25519_KEY_SIZE]) -+{ -+ return false; -+} -+#endif -+ -+#if defined(CONFIG_ARCH_SUPPORTS_INT128) && defined(__SIZEOF_INT128__) -+#include "curve25519-hacl64.c" -+#else -+#include "curve25519-fiat32.c" -+#endif -+ -+static const u8 null_point[CURVE25519_KEY_SIZE] = { 0 }; -+ -+bool curve25519(u8 mypublic[CURVE25519_KEY_SIZE], -+ const u8 secret[CURVE25519_KEY_SIZE], -+ const u8 basepoint[CURVE25519_KEY_SIZE]) -+{ -+ if (!curve25519_arch(mypublic, secret, basepoint)) -+ curve25519_generic(mypublic, secret, basepoint); -+ return crypto_memneq(mypublic, null_point, CURVE25519_KEY_SIZE); -+} -+EXPORT_SYMBOL(curve25519); -+ -+bool curve25519_generate_public(u8 pub[CURVE25519_KEY_SIZE], -+ const u8 secret[CURVE25519_KEY_SIZE]) -+{ -+ static const u8 basepoint[CURVE25519_KEY_SIZE] __aligned(32) = { 9 }; -+ -+ if (unlikely(!crypto_memneq(secret, null_point, CURVE25519_KEY_SIZE))) -+ return false; -+ -+ if (curve25519_base_arch(pub, secret)) -+ return crypto_memneq(pub, null_point, CURVE25519_KEY_SIZE); -+ return curve25519(pub, secret, basepoint); -+} -+EXPORT_SYMBOL(curve25519_generate_public); -+ -+void curve25519_generate_secret(u8 secret[CURVE25519_KEY_SIZE]) -+{ -+ get_random_bytes_wait(secret, CURVE25519_KEY_SIZE); -+ curve25519_clamp_secret(secret); -+} -+EXPORT_SYMBOL(curve25519_generate_secret); -+ -+#include "../selftest/curve25519.c" -+ -+static bool nosimd __initdata = false; -+ -+#ifndef COMPAT_ZINC_IS_A_MODULE -+int __init curve25519_mod_init(void) -+#else -+static int __init mod_init(void) -+#endif -+{ -+ if (!nosimd) -+ curve25519_fpu_init(); -+ if (!selftest_run("curve25519", curve25519_selftest, curve25519_nobs, -+ ARRAY_SIZE(curve25519_nobs))) -+ return -ENOTRECOVERABLE; -+ return 0; -+} -+ -+#ifdef COMPAT_ZINC_IS_A_MODULE -+static void __exit mod_exit(void) -+{ -+} -+ -+module_param(nosimd, bool, 0); -+module_init(mod_init); -+module_exit(mod_exit); -+MODULE_LICENSE("GPL v2"); -+MODULE_DESCRIPTION("Curve25519 scalar multiplication"); -+MODULE_AUTHOR("Jason A. Donenfeld "); -+#endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/poly1305/poly1305-arm-glue.c 2019-08-20 20:26:42.400341426 +0000 -@@ -0,0 +1,140 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include -+#include -+ -+asmlinkage void poly1305_init_arm(void *ctx, const u8 key[16]); -+asmlinkage void poly1305_blocks_arm(void *ctx, const u8 *inp, const size_t len, -+ const u32 padbit); -+asmlinkage void poly1305_emit_arm(void *ctx, u8 mac[16], const u32 nonce[4]); -+asmlinkage void poly1305_blocks_neon(void *ctx, const u8 *inp, const size_t len, -+ const u32 padbit); -+asmlinkage void poly1305_emit_neon(void *ctx, u8 mac[16], const u32 nonce[4]); -+ -+static bool poly1305_use_neon __ro_after_init; -+static bool *const poly1305_nobs[] __initconst = { &poly1305_use_neon }; -+ -+static void __init poly1305_fpu_init(void) -+{ -+#if defined(CONFIG_ZINC_ARCH_ARM64) -+ poly1305_use_neon = cpu_have_named_feature(ASIMD); -+#elif defined(CONFIG_ZINC_ARCH_ARM) -+ poly1305_use_neon = elf_hwcap & HWCAP_NEON; -+#endif -+} -+ -+#if defined(CONFIG_ZINC_ARCH_ARM64) -+struct poly1305_arch_internal { -+ union { -+ u32 h[5]; -+ struct { -+ u64 h0, h1, h2; -+ }; -+ }; -+ u64 is_base2_26; -+ u64 r[2]; -+}; -+#elif defined(CONFIG_ZINC_ARCH_ARM) -+struct poly1305_arch_internal { -+ union { -+ u32 h[5]; -+ struct { -+ u64 h0, h1; -+ u32 h2; -+ } __packed; -+ }; -+ u32 r[4]; -+ u32 is_base2_26; -+}; -+#endif -+ -+/* The NEON code uses base 2^26, while the scalar code uses base 2^64 on 64-bit -+ * and base 2^32 on 32-bit. If we hit the unfortunate situation of using NEON -+ * and then having to go back to scalar -- because the user is silly and has -+ * called the update function from two separate contexts -- then we need to -+ * convert back to the original base before proceeding. The below function is -+ * written for 64-bit integers, and so we have to swap words at the end on -+ * big-endian 32-bit. It is possible to reason that the initial reduction below -+ * is sufficient given the implementation invariants. However, for an avoidance -+ * of doubt and because this is not performance critical, we do the full -+ * reduction anyway. -+ */ -+static void convert_to_base2_64(void *ctx) -+{ -+ struct poly1305_arch_internal *state = ctx; -+ u32 cy; -+ -+ if (!IS_ENABLED(CONFIG_KERNEL_MODE_NEON) || !state->is_base2_26) -+ return; -+ -+ cy = state->h[0] >> 26; state->h[0] &= 0x3ffffff; state->h[1] += cy; -+ cy = state->h[1] >> 26; state->h[1] &= 0x3ffffff; state->h[2] += cy; -+ cy = state->h[2] >> 26; state->h[2] &= 0x3ffffff; state->h[3] += cy; -+ cy = state->h[3] >> 26; state->h[3] &= 0x3ffffff; state->h[4] += cy; -+ state->h0 = ((u64)state->h[2] << 52) | ((u64)state->h[1] << 26) | state->h[0]; -+ state->h1 = ((u64)state->h[4] << 40) | ((u64)state->h[3] << 14) | (state->h[2] >> 12); -+ state->h2 = state->h[4] >> 24; -+ if (IS_ENABLED(CONFIG_ZINC_ARCH_ARM) && IS_ENABLED(CONFIG_CPU_BIG_ENDIAN)) { -+ state->h0 = rol64(state->h0, 32); -+ state->h1 = rol64(state->h1, 32); -+ } -+#define ULT(a, b) ((a ^ ((a ^ b) | ((a - b) ^ b))) >> (sizeof(a) * 8 - 1)) -+ cy = (state->h2 >> 2) + (state->h2 & ~3ULL); -+ state->h2 &= 3; -+ state->h0 += cy; -+ state->h1 += (cy = ULT(state->h0, cy)); -+ state->h2 += ULT(state->h1, cy); -+#undef ULT -+ state->is_base2_26 = 0; -+} -+ -+static inline bool poly1305_init_arch(void *ctx, -+ const u8 key[POLY1305_KEY_SIZE]) -+{ -+ poly1305_init_arm(ctx, key); -+ return true; -+} -+ -+static inline bool poly1305_blocks_arch(void *ctx, const u8 *inp, -+ size_t len, const u32 padbit, -+ simd_context_t *simd_context) -+{ -+ /* SIMD disables preemption, so relax after processing each page. */ -+ BUILD_BUG_ON(PAGE_SIZE < POLY1305_BLOCK_SIZE || -+ PAGE_SIZE % POLY1305_BLOCK_SIZE); -+ -+ if (!IS_ENABLED(CONFIG_KERNEL_MODE_NEON) || !poly1305_use_neon || -+ !simd_use(simd_context)) { -+ convert_to_base2_64(ctx); -+ poly1305_blocks_arm(ctx, inp, len, padbit); -+ return true; -+ } -+ -+ for (;;) { -+ const size_t bytes = min_t(size_t, len, PAGE_SIZE); -+ -+ poly1305_blocks_neon(ctx, inp, bytes, padbit); -+ len -= bytes; -+ if (!len) -+ break; -+ inp += bytes; -+ simd_relax(simd_context); -+ } -+ return true; -+} -+ -+static inline bool poly1305_emit_arch(void *ctx, u8 mac[POLY1305_MAC_SIZE], -+ const u32 nonce[4], -+ simd_context_t *simd_context) -+{ -+ if (!IS_ENABLED(CONFIG_KERNEL_MODE_NEON) || !poly1305_use_neon || -+ !simd_use(simd_context)) { -+ convert_to_base2_64(ctx); -+ poly1305_emit_arm(ctx, mac, nonce); -+ } else -+ poly1305_emit_neon(ctx, mac, nonce); -+ return true; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/poly1305/poly1305-donna32.c 2019-08-20 20:26:42.400341426 +0000 -@@ -0,0 +1,205 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ * -+ * This is based in part on Andrew Moon's poly1305-donna, which is in the -+ * public domain. -+ */ -+ -+struct poly1305_internal { -+ u32 h[5]; -+ u32 r[5]; -+ u32 s[4]; -+}; -+ -+static void poly1305_init_generic(void *ctx, const u8 key[16]) -+{ -+ struct poly1305_internal *st = (struct poly1305_internal *)ctx; -+ -+ /* r &= 0xffffffc0ffffffc0ffffffc0fffffff */ -+ st->r[0] = (get_unaligned_le32(&key[0])) & 0x3ffffff; -+ st->r[1] = (get_unaligned_le32(&key[3]) >> 2) & 0x3ffff03; -+ st->r[2] = (get_unaligned_le32(&key[6]) >> 4) & 0x3ffc0ff; -+ st->r[3] = (get_unaligned_le32(&key[9]) >> 6) & 0x3f03fff; -+ st->r[4] = (get_unaligned_le32(&key[12]) >> 8) & 0x00fffff; -+ -+ /* s = 5*r */ -+ st->s[0] = st->r[1] * 5; -+ st->s[1] = st->r[2] * 5; -+ st->s[2] = st->r[3] * 5; -+ st->s[3] = st->r[4] * 5; -+ -+ /* h = 0 */ -+ st->h[0] = 0; -+ st->h[1] = 0; -+ st->h[2] = 0; -+ st->h[3] = 0; -+ st->h[4] = 0; -+} -+ -+static void poly1305_blocks_generic(void *ctx, const u8 *input, size_t len, -+ const u32 padbit) -+{ -+ struct poly1305_internal *st = (struct poly1305_internal *)ctx; -+ const u32 hibit = padbit << 24; -+ u32 r0, r1, r2, r3, r4; -+ u32 s1, s2, s3, s4; -+ u32 h0, h1, h2, h3, h4; -+ u64 d0, d1, d2, d3, d4; -+ u32 c; -+ -+ r0 = st->r[0]; -+ r1 = st->r[1]; -+ r2 = st->r[2]; -+ r3 = st->r[3]; -+ r4 = st->r[4]; -+ -+ s1 = st->s[0]; -+ s2 = st->s[1]; -+ s3 = st->s[2]; -+ s4 = st->s[3]; -+ -+ h0 = st->h[0]; -+ h1 = st->h[1]; -+ h2 = st->h[2]; -+ h3 = st->h[3]; -+ h4 = st->h[4]; -+ -+ while (len >= POLY1305_BLOCK_SIZE) { -+ /* h += m[i] */ -+ h0 += (get_unaligned_le32(&input[0])) & 0x3ffffff; -+ h1 += (get_unaligned_le32(&input[3]) >> 2) & 0x3ffffff; -+ h2 += (get_unaligned_le32(&input[6]) >> 4) & 0x3ffffff; -+ h3 += (get_unaligned_le32(&input[9]) >> 6) & 0x3ffffff; -+ h4 += (get_unaligned_le32(&input[12]) >> 8) | hibit; -+ -+ /* h *= r */ -+ d0 = ((u64)h0 * r0) + ((u64)h1 * s4) + -+ ((u64)h2 * s3) + ((u64)h3 * s2) + -+ ((u64)h4 * s1); -+ d1 = ((u64)h0 * r1) + ((u64)h1 * r0) + -+ ((u64)h2 * s4) + ((u64)h3 * s3) + -+ ((u64)h4 * s2); -+ d2 = ((u64)h0 * r2) + ((u64)h1 * r1) + -+ ((u64)h2 * r0) + ((u64)h3 * s4) + -+ ((u64)h4 * s3); -+ d3 = ((u64)h0 * r3) + ((u64)h1 * r2) + -+ ((u64)h2 * r1) + ((u64)h3 * r0) + -+ ((u64)h4 * s4); -+ d4 = ((u64)h0 * r4) + ((u64)h1 * r3) + -+ ((u64)h2 * r2) + ((u64)h3 * r1) + -+ ((u64)h4 * r0); -+ -+ /* (partial) h %= p */ -+ c = (u32)(d0 >> 26); -+ h0 = (u32)d0 & 0x3ffffff; -+ d1 += c; -+ c = (u32)(d1 >> 26); -+ h1 = (u32)d1 & 0x3ffffff; -+ d2 += c; -+ c = (u32)(d2 >> 26); -+ h2 = (u32)d2 & 0x3ffffff; -+ d3 += c; -+ c = (u32)(d3 >> 26); -+ h3 = (u32)d3 & 0x3ffffff; -+ d4 += c; -+ c = (u32)(d4 >> 26); -+ h4 = (u32)d4 & 0x3ffffff; -+ h0 += c * 5; -+ c = (h0 >> 26); -+ h0 = h0 & 0x3ffffff; -+ h1 += c; -+ -+ input += POLY1305_BLOCK_SIZE; -+ len -= POLY1305_BLOCK_SIZE; -+ } -+ -+ st->h[0] = h0; -+ st->h[1] = h1; -+ st->h[2] = h2; -+ st->h[3] = h3; -+ st->h[4] = h4; -+} -+ -+static void poly1305_emit_generic(void *ctx, u8 mac[16], const u32 nonce[4]) -+{ -+ struct poly1305_internal *st = (struct poly1305_internal *)ctx; -+ u32 h0, h1, h2, h3, h4, c; -+ u32 g0, g1, g2, g3, g4; -+ u64 f; -+ u32 mask; -+ -+ /* fully carry h */ -+ h0 = st->h[0]; -+ h1 = st->h[1]; -+ h2 = st->h[2]; -+ h3 = st->h[3]; -+ h4 = st->h[4]; -+ -+ c = h1 >> 26; -+ h1 = h1 & 0x3ffffff; -+ h2 += c; -+ c = h2 >> 26; -+ h2 = h2 & 0x3ffffff; -+ h3 += c; -+ c = h3 >> 26; -+ h3 = h3 & 0x3ffffff; -+ h4 += c; -+ c = h4 >> 26; -+ h4 = h4 & 0x3ffffff; -+ h0 += c * 5; -+ c = h0 >> 26; -+ h0 = h0 & 0x3ffffff; -+ h1 += c; -+ -+ /* compute h + -p */ -+ g0 = h0 + 5; -+ c = g0 >> 26; -+ g0 &= 0x3ffffff; -+ g1 = h1 + c; -+ c = g1 >> 26; -+ g1 &= 0x3ffffff; -+ g2 = h2 + c; -+ c = g2 >> 26; -+ g2 &= 0x3ffffff; -+ g3 = h3 + c; -+ c = g3 >> 26; -+ g3 &= 0x3ffffff; -+ g4 = h4 + c - (1UL << 26); -+ -+ /* select h if h < p, or h + -p if h >= p */ -+ mask = (g4 >> ((sizeof(u32) * 8) - 1)) - 1; -+ g0 &= mask; -+ g1 &= mask; -+ g2 &= mask; -+ g3 &= mask; -+ g4 &= mask; -+ mask = ~mask; -+ -+ h0 = (h0 & mask) | g0; -+ h1 = (h1 & mask) | g1; -+ h2 = (h2 & mask) | g2; -+ h3 = (h3 & mask) | g3; -+ h4 = (h4 & mask) | g4; -+ -+ /* h = h % (2^128) */ -+ h0 = ((h0) | (h1 << 26)) & 0xffffffff; -+ h1 = ((h1 >> 6) | (h2 << 20)) & 0xffffffff; -+ h2 = ((h2 >> 12) | (h3 << 14)) & 0xffffffff; -+ h3 = ((h3 >> 18) | (h4 << 8)) & 0xffffffff; -+ -+ /* mac = (h + nonce) % (2^128) */ -+ f = (u64)h0 + nonce[0]; -+ h0 = (u32)f; -+ f = (u64)h1 + nonce[1] + (f >> 32); -+ h1 = (u32)f; -+ f = (u64)h2 + nonce[2] + (f >> 32); -+ h2 = (u32)f; -+ f = (u64)h3 + nonce[3] + (f >> 32); -+ h3 = (u32)f; -+ -+ put_unaligned_le32(h0, &mac[0]); -+ put_unaligned_le32(h1, &mac[4]); -+ put_unaligned_le32(h2, &mac[8]); -+ put_unaligned_le32(h3, &mac[12]); -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/poly1305/poly1305-donna64.c 2019-08-20 20:26:42.401341426 +0000 -@@ -0,0 +1,182 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ * -+ * This is based in part on Andrew Moon's poly1305-donna, which is in the -+ * public domain. -+ */ -+ -+typedef __uint128_t u128; -+ -+struct poly1305_internal { -+ u64 r[3]; -+ u64 h[3]; -+ u64 s[2]; -+}; -+ -+static void poly1305_init_generic(void *ctx, const u8 key[16]) -+{ -+ struct poly1305_internal *st = (struct poly1305_internal *)ctx; -+ u64 t0, t1; -+ -+ /* r &= 0xffffffc0ffffffc0ffffffc0fffffff */ -+ t0 = get_unaligned_le64(&key[0]); -+ t1 = get_unaligned_le64(&key[8]); -+ -+ st->r[0] = t0 & 0xffc0fffffffULL; -+ st->r[1] = ((t0 >> 44) | (t1 << 20)) & 0xfffffc0ffffULL; -+ st->r[2] = ((t1 >> 24)) & 0x00ffffffc0fULL; -+ -+ /* s = 20*r */ -+ st->s[0] = st->r[1] * 20; -+ st->s[1] = st->r[2] * 20; -+ -+ /* h = 0 */ -+ st->h[0] = 0; -+ st->h[1] = 0; -+ st->h[2] = 0; -+} -+ -+static void poly1305_blocks_generic(void *ctx, const u8 *input, size_t len, -+ const u32 padbit) -+{ -+ struct poly1305_internal *st = (struct poly1305_internal *)ctx; -+ const u64 hibit = ((u64)padbit) << 40; -+ u64 r0, r1, r2; -+ u64 s1, s2; -+ u64 h0, h1, h2; -+ u64 c; -+ u128 d0, d1, d2, d; -+ -+ r0 = st->r[0]; -+ r1 = st->r[1]; -+ r2 = st->r[2]; -+ -+ h0 = st->h[0]; -+ h1 = st->h[1]; -+ h2 = st->h[2]; -+ -+ s1 = st->s[0]; -+ s2 = st->s[1]; -+ -+ while (len >= POLY1305_BLOCK_SIZE) { -+ u64 t0, t1; -+ -+ /* h += m[i] */ -+ t0 = get_unaligned_le64(&input[0]); -+ t1 = get_unaligned_le64(&input[8]); -+ -+ h0 += t0 & 0xfffffffffffULL; -+ h1 += ((t0 >> 44) | (t1 << 20)) & 0xfffffffffffULL; -+ h2 += (((t1 >> 24)) & 0x3ffffffffffULL) | hibit; -+ -+ /* h *= r */ -+ d0 = (u128)h0 * r0; -+ d = (u128)h1 * s2; -+ d0 += d; -+ d = (u128)h2 * s1; -+ d0 += d; -+ d1 = (u128)h0 * r1; -+ d = (u128)h1 * r0; -+ d1 += d; -+ d = (u128)h2 * s2; -+ d1 += d; -+ d2 = (u128)h0 * r2; -+ d = (u128)h1 * r1; -+ d2 += d; -+ d = (u128)h2 * r0; -+ d2 += d; -+ -+ /* (partial) h %= p */ -+ c = (u64)(d0 >> 44); -+ h0 = (u64)d0 & 0xfffffffffffULL; -+ d1 += c; -+ c = (u64)(d1 >> 44); -+ h1 = (u64)d1 & 0xfffffffffffULL; -+ d2 += c; -+ c = (u64)(d2 >> 42); -+ h2 = (u64)d2 & 0x3ffffffffffULL; -+ h0 += c * 5; -+ c = h0 >> 44; -+ h0 = h0 & 0xfffffffffffULL; -+ h1 += c; -+ -+ input += POLY1305_BLOCK_SIZE; -+ len -= POLY1305_BLOCK_SIZE; -+ } -+ -+ st->h[0] = h0; -+ st->h[1] = h1; -+ st->h[2] = h2; -+} -+ -+static void poly1305_emit_generic(void *ctx, u8 mac[16], const u32 nonce[4]) -+{ -+ struct poly1305_internal *st = (struct poly1305_internal *)ctx; -+ u64 h0, h1, h2, c; -+ u64 g0, g1, g2; -+ u64 t0, t1; -+ -+ /* fully carry h */ -+ h0 = st->h[0]; -+ h1 = st->h[1]; -+ h2 = st->h[2]; -+ -+ c = h1 >> 44; -+ h1 &= 0xfffffffffffULL; -+ h2 += c; -+ c = h2 >> 42; -+ h2 &= 0x3ffffffffffULL; -+ h0 += c * 5; -+ c = h0 >> 44; -+ h0 &= 0xfffffffffffULL; -+ h1 += c; -+ c = h1 >> 44; -+ h1 &= 0xfffffffffffULL; -+ h2 += c; -+ c = h2 >> 42; -+ h2 &= 0x3ffffffffffULL; -+ h0 += c * 5; -+ c = h0 >> 44; -+ h0 &= 0xfffffffffffULL; -+ h1 += c; -+ -+ /* compute h + -p */ -+ g0 = h0 + 5; -+ c = g0 >> 44; -+ g0 &= 0xfffffffffffULL; -+ g1 = h1 + c; -+ c = g1 >> 44; -+ g1 &= 0xfffffffffffULL; -+ g2 = h2 + c - (1ULL << 42); -+ -+ /* select h if h < p, or h + -p if h >= p */ -+ c = (g2 >> ((sizeof(u64) * 8) - 1)) - 1; -+ g0 &= c; -+ g1 &= c; -+ g2 &= c; -+ c = ~c; -+ h0 = (h0 & c) | g0; -+ h1 = (h1 & c) | g1; -+ h2 = (h2 & c) | g2; -+ -+ /* h = (h + nonce) */ -+ t0 = ((u64)nonce[1] << 32) | nonce[0]; -+ t1 = ((u64)nonce[3] << 32) | nonce[2]; -+ -+ h0 += t0 & 0xfffffffffffULL; -+ c = h0 >> 44; -+ h0 &= 0xfffffffffffULL; -+ h1 += (((t0 >> 44) | (t1 << 20)) & 0xfffffffffffULL) + c; -+ c = h1 >> 44; -+ h1 &= 0xfffffffffffULL; -+ h2 += (((t1 >> 24)) & 0x3ffffffffffULL) + c; -+ h2 &= 0x3ffffffffffULL; -+ -+ /* mac = h % (2^128) */ -+ h0 = h0 | (h1 << 44); -+ h1 = (h1 >> 20) | (h2 << 24); -+ -+ put_unaligned_le64(h0, &mac[0]); -+ put_unaligned_le64(h1, &mac[8]); -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/poly1305/poly1305-mips-glue.c 2019-08-20 20:26:42.401341426 +0000 -@@ -0,0 +1,37 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+asmlinkage void poly1305_init_mips(void *ctx, const u8 key[16]); -+asmlinkage void poly1305_blocks_mips(void *ctx, const u8 *inp, const size_t len, -+ const u32 padbit); -+asmlinkage void poly1305_emit_mips(void *ctx, u8 mac[16], const u32 nonce[4]); -+ -+static bool *const poly1305_nobs[] __initconst = { }; -+static void __init poly1305_fpu_init(void) -+{ -+} -+ -+static inline bool poly1305_init_arch(void *ctx, -+ const u8 key[POLY1305_KEY_SIZE]) -+{ -+ poly1305_init_mips(ctx, key); -+ return true; -+} -+ -+static inline bool poly1305_blocks_arch(void *ctx, const u8 *inp, -+ size_t len, const u32 padbit, -+ simd_context_t *simd_context) -+{ -+ poly1305_blocks_mips(ctx, inp, len, padbit); -+ return true; -+} -+ -+static inline bool poly1305_emit_arch(void *ctx, u8 mac[POLY1305_MAC_SIZE], -+ const u32 nonce[4], -+ simd_context_t *simd_context) -+{ -+ poly1305_emit_mips(ctx, mac, nonce); -+ return true; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/poly1305/poly1305-x86_64-glue.c 2019-08-20 20:26:42.401341426 +0000 -@@ -0,0 +1,156 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include -+#include -+#include -+ -+asmlinkage void poly1305_init_x86_64(void *ctx, -+ const u8 key[POLY1305_KEY_SIZE]); -+asmlinkage void poly1305_blocks_x86_64(void *ctx, const u8 *inp, -+ const size_t len, const u32 padbit); -+asmlinkage void poly1305_emit_x86_64(void *ctx, u8 mac[POLY1305_MAC_SIZE], -+ const u32 nonce[4]); -+asmlinkage void poly1305_emit_avx(void *ctx, u8 mac[POLY1305_MAC_SIZE], -+ const u32 nonce[4]); -+asmlinkage void poly1305_blocks_avx(void *ctx, const u8 *inp, const size_t len, -+ const u32 padbit); -+asmlinkage void poly1305_blocks_avx2(void *ctx, const u8 *inp, const size_t len, -+ const u32 padbit); -+asmlinkage void poly1305_blocks_avx512(void *ctx, const u8 *inp, -+ const size_t len, const u32 padbit); -+ -+static bool poly1305_use_avx __ro_after_init; -+static bool poly1305_use_avx2 __ro_after_init; -+static bool poly1305_use_avx512 __ro_after_init; -+static bool *const poly1305_nobs[] __initconst = { -+ &poly1305_use_avx, &poly1305_use_avx2, &poly1305_use_avx512 }; -+ -+static void __init poly1305_fpu_init(void) -+{ -+ poly1305_use_avx = -+ boot_cpu_has(X86_FEATURE_AVX) && -+ cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL); -+ poly1305_use_avx2 = -+ boot_cpu_has(X86_FEATURE_AVX) && -+ boot_cpu_has(X86_FEATURE_AVX2) && -+ cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL); -+#ifndef COMPAT_CANNOT_USE_AVX512 -+ poly1305_use_avx512 = -+ boot_cpu_has(X86_FEATURE_AVX) && -+ boot_cpu_has(X86_FEATURE_AVX2) && -+ boot_cpu_has(X86_FEATURE_AVX512F) && -+ cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM | -+ XFEATURE_MASK_AVX512, NULL) && -+ /* Skylake downclocks unacceptably much when using zmm. */ -+ boot_cpu_data.x86_model != INTEL_FAM6_SKYLAKE_X; -+#endif -+} -+ -+static inline bool poly1305_init_arch(void *ctx, -+ const u8 key[POLY1305_KEY_SIZE]) -+{ -+ poly1305_init_x86_64(ctx, key); -+ return true; -+} -+ -+struct poly1305_arch_internal { -+ union { -+ struct { -+ u32 h[5]; -+ u32 is_base2_26; -+ }; -+ u64 hs[3]; -+ }; -+ u64 r[2]; -+ u64 pad; -+ struct { u32 r2, r1, r4, r3; } rn[9]; -+}; -+ -+/* The AVX code uses base 2^26, while the scalar code uses base 2^64. If we hit -+ * the unfortunate situation of using AVX and then having to go back to scalar -+ * -- because the user is silly and has called the update function from two -+ * separate contexts -- then we need to convert back to the original base before -+ * proceeding. It is possible to reason that the initial reduction below is -+ * sufficient given the implementation invariants. However, for an avoidance of -+ * doubt and because this is not performance critical, we do the full reduction -+ * anyway. -+ */ -+static void convert_to_base2_64(void *ctx) -+{ -+ struct poly1305_arch_internal *state = ctx; -+ u32 cy; -+ -+ if (!state->is_base2_26) -+ return; -+ -+ cy = state->h[0] >> 26; state->h[0] &= 0x3ffffff; state->h[1] += cy; -+ cy = state->h[1] >> 26; state->h[1] &= 0x3ffffff; state->h[2] += cy; -+ cy = state->h[2] >> 26; state->h[2] &= 0x3ffffff; state->h[3] += cy; -+ cy = state->h[3] >> 26; state->h[3] &= 0x3ffffff; state->h[4] += cy; -+ state->hs[0] = ((u64)state->h[2] << 52) | ((u64)state->h[1] << 26) | state->h[0]; -+ state->hs[1] = ((u64)state->h[4] << 40) | ((u64)state->h[3] << 14) | (state->h[2] >> 12); -+ state->hs[2] = state->h[4] >> 24; -+#define ULT(a, b) ((a ^ ((a ^ b) | ((a - b) ^ b))) >> (sizeof(a) * 8 - 1)) -+ cy = (state->hs[2] >> 2) + (state->hs[2] & ~3ULL); -+ state->hs[2] &= 3; -+ state->hs[0] += cy; -+ state->hs[1] += (cy = ULT(state->hs[0], cy)); -+ state->hs[2] += ULT(state->hs[1], cy); -+#undef ULT -+ state->is_base2_26 = 0; -+} -+ -+static inline bool poly1305_blocks_arch(void *ctx, const u8 *inp, -+ size_t len, const u32 padbit, -+ simd_context_t *simd_context) -+{ -+ struct poly1305_arch_internal *state = ctx; -+ -+ /* SIMD disables preemption, so relax after processing each page. */ -+ BUILD_BUG_ON(PAGE_SIZE < POLY1305_BLOCK_SIZE || -+ PAGE_SIZE % POLY1305_BLOCK_SIZE); -+ -+ if (!IS_ENABLED(CONFIG_AS_AVX) || !poly1305_use_avx || -+ (len < (POLY1305_BLOCK_SIZE * 18) && !state->is_base2_26) || -+ !simd_use(simd_context)) { -+ convert_to_base2_64(ctx); -+ poly1305_blocks_x86_64(ctx, inp, len, padbit); -+ return true; -+ } -+ -+ for (;;) { -+ const size_t bytes = min_t(size_t, len, PAGE_SIZE); -+ -+ if (IS_ENABLED(CONFIG_AS_AVX512) && poly1305_use_avx512) -+ poly1305_blocks_avx512(ctx, inp, bytes, padbit); -+ else if (IS_ENABLED(CONFIG_AS_AVX2) && poly1305_use_avx2) -+ poly1305_blocks_avx2(ctx, inp, bytes, padbit); -+ else -+ poly1305_blocks_avx(ctx, inp, bytes, padbit); -+ len -= bytes; -+ if (!len) -+ break; -+ inp += bytes; -+ simd_relax(simd_context); -+ } -+ -+ return true; -+} -+ -+static inline bool poly1305_emit_arch(void *ctx, u8 mac[POLY1305_MAC_SIZE], -+ const u32 nonce[4], -+ simd_context_t *simd_context) -+{ -+ struct poly1305_arch_internal *state = ctx; -+ -+ if (!IS_ENABLED(CONFIG_AS_AVX) || !poly1305_use_avx || -+ !state->is_base2_26 || !simd_use(simd_context)) { -+ convert_to_base2_64(ctx); -+ poly1305_emit_x86_64(ctx, mac, nonce); -+ } else -+ poly1305_emit_avx(ctx, mac, nonce); -+ return true; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/poly1305/poly1305.c 2019-08-20 20:26:42.402341426 +0000 -@@ -0,0 +1,168 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ * -+ * Implementation of the Poly1305 message authenticator. -+ * -+ * Information: https://cr.yp.to/mac.html -+ */ -+ -+#include -+#include "../selftest/run.h" -+ -+#include -+#include -+#include -+#include -+#include -+ -+#if defined(CONFIG_ZINC_ARCH_X86_64) -+#include "poly1305-x86_64-glue.c" -+#elif defined(CONFIG_ZINC_ARCH_ARM) || defined(CONFIG_ZINC_ARCH_ARM64) -+#include "poly1305-arm-glue.c" -+#elif defined(CONFIG_ZINC_ARCH_MIPS) || defined(CONFIG_ZINC_ARCH_MIPS64) -+#include "poly1305-mips-glue.c" -+#else -+static inline bool poly1305_init_arch(void *ctx, -+ const u8 key[POLY1305_KEY_SIZE]) -+{ -+ return false; -+} -+static inline bool poly1305_blocks_arch(void *ctx, const u8 *input, -+ size_t len, const u32 padbit, -+ simd_context_t *simd_context) -+{ -+ return false; -+} -+static inline bool poly1305_emit_arch(void *ctx, u8 mac[POLY1305_MAC_SIZE], -+ const u32 nonce[4], -+ simd_context_t *simd_context) -+{ -+ return false; -+} -+static bool *const poly1305_nobs[] __initconst = { }; -+static void __init poly1305_fpu_init(void) -+{ -+} -+#endif -+ -+#if defined(CONFIG_ARCH_SUPPORTS_INT128) && defined(__SIZEOF_INT128__) -+#include "poly1305-donna64.c" -+#else -+#include "poly1305-donna32.c" -+#endif -+ -+void poly1305_init(struct poly1305_ctx *ctx, const u8 key[POLY1305_KEY_SIZE]) -+{ -+ ctx->nonce[0] = get_unaligned_le32(&key[16]); -+ ctx->nonce[1] = get_unaligned_le32(&key[20]); -+ ctx->nonce[2] = get_unaligned_le32(&key[24]); -+ ctx->nonce[3] = get_unaligned_le32(&key[28]); -+ -+ if (!poly1305_init_arch(ctx->opaque, key)) -+ poly1305_init_generic(ctx->opaque, key); -+ -+ ctx->num = 0; -+} -+EXPORT_SYMBOL(poly1305_init); -+ -+static inline void poly1305_blocks(void *ctx, const u8 *input, const size_t len, -+ const u32 padbit, -+ simd_context_t *simd_context) -+{ -+ if (!poly1305_blocks_arch(ctx, input, len, padbit, simd_context)) -+ poly1305_blocks_generic(ctx, input, len, padbit); -+} -+ -+static inline void poly1305_emit(void *ctx, u8 mac[POLY1305_KEY_SIZE], -+ const u32 nonce[4], -+ simd_context_t *simd_context) -+{ -+ if (!poly1305_emit_arch(ctx, mac, nonce, simd_context)) -+ poly1305_emit_generic(ctx, mac, nonce); -+} -+ -+void poly1305_update(struct poly1305_ctx *ctx, const u8 *input, size_t len, -+ simd_context_t *simd_context) -+{ -+ const size_t num = ctx->num; -+ size_t rem; -+ -+ if (num) { -+ rem = POLY1305_BLOCK_SIZE - num; -+ if (len < rem) { -+ memcpy(ctx->data + num, input, len); -+ ctx->num = num + len; -+ return; -+ } -+ memcpy(ctx->data + num, input, rem); -+ poly1305_blocks(ctx->opaque, ctx->data, POLY1305_BLOCK_SIZE, 1, -+ simd_context); -+ input += rem; -+ len -= rem; -+ } -+ -+ rem = len % POLY1305_BLOCK_SIZE; -+ len -= rem; -+ -+ if (len >= POLY1305_BLOCK_SIZE) { -+ poly1305_blocks(ctx->opaque, input, len, 1, simd_context); -+ input += len; -+ } -+ -+ if (rem) -+ memcpy(ctx->data, input, rem); -+ -+ ctx->num = rem; -+} -+EXPORT_SYMBOL(poly1305_update); -+ -+void poly1305_final(struct poly1305_ctx *ctx, u8 mac[POLY1305_MAC_SIZE], -+ simd_context_t *simd_context) -+{ -+ size_t num = ctx->num; -+ -+ if (num) { -+ ctx->data[num++] = 1; -+ while (num < POLY1305_BLOCK_SIZE) -+ ctx->data[num++] = 0; -+ poly1305_blocks(ctx->opaque, ctx->data, POLY1305_BLOCK_SIZE, 0, -+ simd_context); -+ } -+ -+ poly1305_emit(ctx->opaque, mac, ctx->nonce, simd_context); -+ -+ memzero_explicit(ctx, sizeof(*ctx)); -+} -+EXPORT_SYMBOL(poly1305_final); -+ -+#include "../selftest/poly1305.c" -+ -+static bool nosimd __initdata = false; -+ -+#ifndef COMPAT_ZINC_IS_A_MODULE -+int __init poly1305_mod_init(void) -+#else -+static int __init mod_init(void) -+#endif -+{ -+ if (!nosimd) -+ poly1305_fpu_init(); -+ if (!selftest_run("poly1305", poly1305_selftest, poly1305_nobs, -+ ARRAY_SIZE(poly1305_nobs))) -+ return -ENOTRECOVERABLE; -+ return 0; -+} -+ -+#ifdef COMPAT_ZINC_IS_A_MODULE -+static void __exit mod_exit(void) -+{ -+} -+ -+module_param(nosimd, bool, 0); -+module_init(mod_init); -+module_exit(mod_exit); -+MODULE_LICENSE("GPL v2"); -+MODULE_DESCRIPTION("Poly1305 one-time authenticator"); -+MODULE_AUTHOR("Jason A. Donenfeld "); -+#endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/selftest/blake2s.c 2019-08-20 20:26:42.403341426 +0000 -@@ -0,0 +1,2090 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+static const u8 blake2s_testvecs[][BLAKE2S_HASH_SIZE] __initconst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, 0x95, 0x6e, 0xd5, 0x52, 0x8e, -+ 0x86, 0xaa, 0x99, 0x4a, 0xcb, 0x38, 0xfe, 0x2d } -+}; -+ -+static const u8 blake2s_keyed_testvecs[][BLAKE2S_HASH_SIZE] __initconst = { -+ { 0x48, 0xa8, 0x99, 0x7d, 0xa4, 0x07, 0x87, 0x6b, -+ 0x3d, 0x79, 0xc0, 0xd9, 0x23, 0x25, 0xad, 0x3b, -+ 0x89, 0xcb, 0xb7, 0x54, 0xd8, 0x6a, 0xb7, 0x1a, -+ 0xee, 0x04, 0x7a, 0xd3, 0x45, 0xfd, 0x2c, 0x49 }, -+ { 0x40, 0xd1, 0x5f, 0xee, 0x7c, 0x32, 0x88, 0x30, -+ 0x16, 0x6a, 0xc3, 0xf9, 0x18, 0x65, 0x0f, 0x80, -+ 0x7e, 0x7e, 0x01, 0xe1, 0x77, 0x25, 0x8c, 0xdc, -+ 0x0a, 0x39, 0xb1, 0x1f, 0x59, 0x80, 0x66, 0xf1 }, -+ { 0x6b, 0xb7, 0x13, 0x00, 0x64, 0x4c, 0xd3, 0x99, -+ 0x1b, 0x26, 0xcc, 0xd4, 0xd2, 0x74, 0xac, 0xd1, -+ 0xad, 0xea, 0xb8, 0xb1, 0xd7, 0x91, 0x45, 0x46, -+ 0xc1, 0x19, 0x8b, 0xbe, 0x9f, 0xc9, 0xd8, 0x03 }, -+ { 0x1d, 0x22, 0x0d, 0xbe, 0x2e, 0xe1, 0x34, 0x66, -+ 0x1f, 0xdf, 0x6d, 0x9e, 0x74, 0xb4, 0x17, 0x04, -+ 0x71, 0x05, 0x56, 0xf2, 0xf6, 0xe5, 0xa0, 0x91, -+ 0xb2, 0x27, 0x69, 0x74, 0x45, 0xdb, 0xea, 0x6b }, -+ { 0xf6, 0xc3, 0xfb, 0xad, 0xb4, 0xcc, 0x68, 0x7a, -+ 0x00, 0x64, 0xa5, 0xbe, 0x6e, 0x79, 0x1b, 0xec, -+ 0x63, 0xb8, 0x68, 0xad, 0x62, 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, 0xb7, 0x35, 0x06, 0x1a, 0xbc, 0x51, 0x9d, -+ 0xfe, 0x97, 0x9e, 0x54, 0xc1, 0xee, 0x5b, 0xfa, -+ 0xd0, 0xa9, 0xd8, 0x58, 0xb3, 0x31, 0x5b, 0xad, -+ 0x34, 0xbd, 0xe9, 0x99, 0xef, 0xd7, 0x24, 0xdd } -+}; -+ -+static bool __init blake2s_selftest(void) -+{ -+ u8 key[BLAKE2S_KEY_SIZE]; -+ u8 buf[ARRAY_SIZE(blake2s_testvecs)]; -+ u8 hash[BLAKE2S_HASH_SIZE]; -+ size_t i; -+ bool success = true; -+ -+ for (i = 0; i < BLAKE2S_KEY_SIZE; ++i) -+ key[i] = (u8)i; -+ -+ for (i = 0; i < ARRAY_SIZE(blake2s_testvecs); ++i) -+ buf[i] = (u8)i; -+ -+ for (i = 0; i < ARRAY_SIZE(blake2s_keyed_testvecs); ++i) { -+ blake2s(hash, buf, key, BLAKE2S_HASH_SIZE, i, BLAKE2S_KEY_SIZE); -+ if (memcmp(hash, blake2s_keyed_testvecs[i], BLAKE2S_HASH_SIZE)) { -+ pr_err("blake2s keyed self-test %zu: FAIL\n", i + 1); -+ success = false; -+ } -+ } -+ -+ for (i = 0; i < ARRAY_SIZE(blake2s_testvecs); ++i) { -+ blake2s(hash, buf, NULL, BLAKE2S_HASH_SIZE, i, 0); -+ if (memcmp(hash, blake2s_testvecs[i], BLAKE2S_HASH_SIZE)) { -+ pr_err("blake2s unkeyed self-test %zu: FAIL\n", i + i); -+ success = false; -+ } -+ } -+ return success; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/selftest/chacha20.c 2019-08-20 20:26:42.403341426 +0000 -@@ -0,0 +1,2698 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+struct chacha20_testvec { -+ const u8 *input, *output, *key; -+ u64 nonce; -+ size_t ilen; -+}; -+ -+struct hchacha20_testvec { -+ u8 key[HCHACHA20_KEY_SIZE]; -+ u8 nonce[HCHACHA20_NONCE_SIZE]; -+ u8 output[CHACHA20_KEY_SIZE]; -+}; -+ -+/* These test vectors are generated by reference implementations and are -+ * designed to check chacha20 implementation block handling, as well as from -+ * the draft-arciszewski-xchacha-01 document. -+ */ -+ -+static const u8 input01[] __initconst = { }; -+static const u8 output01[] __initconst = { }; -+static const u8 key01[] __initconst = { -+ 0x09, 0xf4, 0xe8, 0x57, 0x10, 0xf2, 0x12, 0xc3, -+ 0xc6, 0x91, 0xc4, 0x09, 0x97, 0x46, 0xef, 0xfe, -+ 0x02, 0x00, 0xe4, 0x5c, 0x82, 0xed, 0x16, 0xf3, -+ 0x32, 0xbe, 0xec, 0x7a, 0xe6, 0x68, 0x12, 0x26 -+}; -+enum { nonce01 = 0x3834e2afca3c66d3ULL }; -+ -+static const u8 input02[] __initconst = { -+ 0x9d -+}; -+static const u8 output02[] __initconst = { -+ 0x94 -+}; -+static const u8 key02[] __initconst = { -+ 0x8c, 0x01, 0xac, 0xaf, 0x62, 0x63, 0x56, 0x7a, -+ 0xad, 0x23, 0x4c, 0x58, 0x29, 0x29, 0xbe, 0xab, -+ 0xe9, 0xf8, 0xdf, 0x6c, 0x8c, 0x74, 0x4d, 0x7d, -+ 0x13, 0x94, 0x10, 0x02, 0x3d, 0x8e, 0x9f, 0x94 -+}; -+enum { nonce02 = 0x5d1b3bfdedd9f73aULL }; -+ -+static const u8 input03[] __initconst = { -+ 0x04, 0x16 -+}; -+static const u8 output03[] __initconst = { -+ 0x92, 0x07 -+}; -+static const u8 key03[] __initconst = { -+ 0x22, 0x0c, 0x79, 0x2c, 0x38, 0x51, 0xbe, 0x99, -+ 0xa9, 0x59, 0x24, 0x50, 0xef, 0x87, 0x38, 0xa6, -+ 0xa0, 0x97, 0x20, 0xcb, 0xb4, 0x0c, 0x94, 0x67, -+ 0x1f, 0x98, 0xdc, 0xc4, 0x83, 0xbc, 0x35, 0x4d -+}; -+enum { nonce03 = 0x7a3353ad720a3e2eULL }; -+ -+static const u8 input04[] __initconst = { -+ 0xc7, 0xcc, 0xd0 -+}; -+static const u8 output04[] __initconst = { -+ 0xd8, 0x41, 0x80 -+}; -+static const u8 key04[] __initconst = { -+ 0x81, 0x5e, 0x12, 0x01, 0xc4, 0x36, 0x15, 0x03, -+ 0x11, 0xa0, 0xe9, 0x86, 0xbb, 0x5a, 0xdc, 0x45, -+ 0x7d, 0x5e, 0x98, 0xf8, 0x06, 0x76, 0x1c, 0xec, -+ 0xc0, 0xf7, 0xca, 0x4e, 0x99, 0xd9, 0x42, 0x38 -+}; -+enum { nonce04 = 0x6816e2fc66176da2ULL }; -+ -+static const u8 input05[] __initconst = { -+ 0x48, 0xf1, 0x31, 0x5f -+}; -+static const u8 output05[] __initconst = { -+ 0x48, 0xf7, 0x13, 0x67 -+}; -+static const u8 key05[] __initconst = { -+ 0x3f, 0xd6, 0xb6, 0x5e, 0x2f, 0xda, 0x82, 0x39, -+ 0x97, 0x06, 0xd3, 0x62, 0x4f, 0xbd, 0xcb, 0x9b, -+ 0x1d, 0xe6, 0x4a, 0x76, 0xab, 0xdd, 0x14, 0x50, -+ 0x59, 0x21, 0xe3, 0xb2, 0xc7, 0x95, 0xbc, 0x45 -+}; -+enum { nonce05 = 0xc41a7490e228cc42ULL }; -+ -+static const u8 input06[] __initconst = { -+ 0xae, 0xa2, 0x85, 0x1d, 0xc8 -+}; -+static const u8 output06[] __initconst = { -+ 0xfa, 0xff, 0x45, 0x6b, 0x6f -+}; -+static const u8 key06[] __initconst = { -+ 0x04, 0x8d, 0xea, 0x67, 0x20, 0x78, 0xfb, 0x8f, -+ 0x49, 0x80, 0x35, 0xb5, 0x7b, 0xe4, 0x31, 0x74, -+ 0x57, 0x43, 0x3a, 0x64, 0x64, 0xb9, 0xe6, 0x23, -+ 0x4d, 0xfe, 0xb8, 0x7b, 0x71, 0x4d, 0x9d, 0x21 -+}; -+enum { nonce06 = 0x251366db50b10903ULL }; -+ -+static const u8 input07[] __initconst = { -+ 0x1a, 0x32, 0x85, 0xb6, 0xe8, 0x52 -+}; -+static const u8 output07[] __initconst = { -+ 0xd3, 0x5f, 0xf0, 0x07, 0x69, 0xec -+}; -+static const u8 key07[] __initconst = { -+ 0xbf, 0x2d, 0x42, 0x99, 0x97, 0x76, 0x04, 0xad, -+ 0xd3, 0x8f, 0x6e, 0x6a, 0x34, 0x85, 0xaf, 0x81, -+ 0xef, 0x36, 0x33, 0xd5, 0x43, 0xa2, 0xaa, 0x08, -+ 0x0f, 0x77, 0x42, 0x83, 0x58, 0xc5, 0x42, 0x2a -+}; -+enum { nonce07 = 0xe0796da17dba9b58ULL }; -+ -+static const u8 input08[] __initconst = { -+ 0x40, 0xae, 0xcd, 0xe4, 0x3d, 0x22, 0xe0 -+}; -+static const u8 output08[] __initconst = { -+ 0xfd, 0x8a, 0x9f, 0x3d, 0x05, 0xc9, 0xd3 -+}; -+static const u8 key08[] __initconst = { -+ 0xdc, 0x3f, 0x41, 0xe3, 0x23, 0x2a, 0x8d, 0xf6, -+ 0x41, 0x2a, 0xa7, 0x66, 0x05, 0x68, 0xe4, 0x7b, -+ 0xc4, 0x58, 0xd6, 0xcc, 0xdf, 0x0d, 0xc6, 0x25, -+ 0x1b, 0x61, 0x32, 0x12, 0x4e, 0xf1, 0xe6, 0x29 -+}; -+enum { nonce08 = 0xb1d2536d9e159832ULL }; -+ -+static const u8 input09[] __initconst = { -+ 0xba, 0x1d, 0x14, 0x16, 0x9f, 0x83, 0x67, 0x24 -+}; -+static const u8 output09[] __initconst = { -+ 0x7c, 0xe3, 0x78, 0x1d, 0xa2, 0xe7, 0xe9, 0x39 -+}; -+static const u8 key09[] __initconst = { -+ 0x17, 0x55, 0x90, 0x52, 0xa4, 0xce, 0x12, 0xae, -+ 0xd4, 0xfd, 0xd4, 0xfb, 0xd5, 0x18, 0x59, 0x50, -+ 0x4e, 0x51, 0x99, 0x32, 0x09, 0x31, 0xfc, 0xf7, -+ 0x27, 0x10, 0x8e, 0xa2, 0x4b, 0xa5, 0xf5, 0x62 -+}; -+enum { nonce09 = 0x495fc269536d003ULL }; -+ -+static const u8 input10[] __initconst = { -+ 0x09, 0xfd, 0x3c, 0x0b, 0x3d, 0x0e, 0xf3, 0x9d, -+ 0x27 -+}; -+static const u8 output10[] __initconst = { -+ 0xdc, 0xe4, 0x33, 0x60, 0x0c, 0x07, 0xcb, 0x51, -+ 0x6b -+}; -+static const u8 key10[] __initconst = { -+ 0x4e, 0x00, 0x72, 0x37, 0x0f, 0x52, 0x4d, 0x6f, -+ 0x37, 0x50, 0x3c, 0xb3, 0x51, 0x81, 0x49, 0x16, -+ 0x7e, 0xfd, 0xb1, 0x51, 0x72, 0x2e, 0xe4, 0x16, -+ 0x68, 0x5c, 0x5b, 0x8a, 0xc3, 0x90, 0x70, 0x04 -+}; -+enum { nonce10 = 0x1ad9d1114d88cbbdULL }; -+ -+static const u8 input11[] __initconst = { -+ 0x70, 0x18, 0x52, 0x85, 0xba, 0x66, 0xff, 0x2c, -+ 0x9a, 0x46 -+}; -+static const u8 output11[] __initconst = { -+ 0xf5, 0x2a, 0x7a, 0xfd, 0x31, 0x7c, 0x91, 0x41, -+ 0xb1, 0xcf -+}; -+static const u8 key11[] __initconst = { -+ 0x48, 0xb4, 0xd0, 0x7c, 0x88, 0xd1, 0x96, 0x0d, -+ 0x80, 0x33, 0xb4, 0xd5, 0x31, 0x9a, 0x88, 0xca, -+ 0x14, 0xdc, 0xf0, 0xa8, 0xf3, 0xac, 0xb8, 0x47, -+ 0x75, 0x86, 0x7c, 0x88, 0x50, 0x11, 0x43, 0x40 -+}; -+enum { nonce11 = 0x47c35dd1f4f8aa4fULL }; -+ -+static const u8 input12[] __initconst = { -+ 0x9e, 0x8e, 0x3d, 0x2a, 0x05, 0xfd, 0xe4, 0x90, -+ 0x24, 0x1c, 0xd3 -+}; -+static const u8 output12[] __initconst = { -+ 0x97, 0x72, 0x40, 0x9f, 0xc0, 0x6b, 0x05, 0x33, -+ 0x42, 0x7e, 0x28 -+}; -+static const u8 key12[] __initconst = { -+ 0xee, 0xff, 0x33, 0x33, 0xe0, 0x28, 0xdf, 0xa2, -+ 0xb6, 0x5e, 0x25, 0x09, 0x52, 0xde, 0xa5, 0x9c, -+ 0x8f, 0x95, 0xa9, 0x03, 0x77, 0x0f, 0xbe, 0xa1, -+ 0xd0, 0x7d, 0x73, 0x2f, 0xf8, 0x7e, 0x51, 0x44 -+}; -+enum { nonce12 = 0xc22d044dc6ea4af3ULL }; -+ -+static const u8 input13[] __initconst = { -+ 0x9c, 0x16, 0xa2, 0x22, 0x4d, 0xbe, 0x04, 0x9a, -+ 0xb3, 0xb5, 0xc6, 0x58 -+}; -+static const u8 output13[] __initconst = { -+ 0xf0, 0x81, 0xdb, 0x6d, 0xa3, 0xe9, 0xb2, 0xc6, -+ 0x32, 0x50, 0x16, 0x9f -+}; -+static const u8 key13[] __initconst = { -+ 0x96, 0xb3, 0x01, 0xd2, 0x7a, 0x8c, 0x94, 0x09, -+ 0x4f, 0x58, 0xbe, 0x80, 0xcc, 0xa9, 0x7e, 0x2d, -+ 0xad, 0x58, 0x3b, 0x63, 0xb8, 0x5c, 0x17, 0xce, -+ 0xbf, 0x43, 0x33, 0x7a, 0x7b, 0x82, 0x28, 0x2f -+}; -+enum { nonce13 = 0x2a5d05d88cd7b0daULL }; -+ -+static const u8 input14[] __initconst = { -+ 0x57, 0x4f, 0xaa, 0x30, 0xe6, 0x23, 0x50, 0x86, -+ 0x91, 0xa5, 0x60, 0x96, 0x2b -+}; -+static const u8 output14[] __initconst = { -+ 0x6c, 0x1f, 0x3b, 0x42, 0xb6, 0x2f, 0xf0, 0xbd, -+ 0x76, 0x60, 0xc7, 0x7e, 0x8d -+}; -+static const u8 key14[] __initconst = { -+ 0x22, 0x85, 0xaf, 0x8f, 0xa3, 0x53, 0xa0, 0xc4, -+ 0xb5, 0x75, 0xc0, 0xba, 0x30, 0x92, 0xc3, 0x32, -+ 0x20, 0x5a, 0x8f, 0x7e, 0x93, 0xda, 0x65, 0x18, -+ 0xd1, 0xf6, 0x9a, 0x9b, 0x8f, 0x85, 0x30, 0xe6 -+}; -+enum { nonce14 = 0xf9946c166aa4475fULL }; -+ -+static const u8 input15[] __initconst = { -+ 0x89, 0x81, 0xc7, 0xe2, 0x00, 0xac, 0x52, 0x70, -+ 0xa4, 0x79, 0xab, 0xeb, 0x74, 0xf7 -+}; -+static const u8 output15[] __initconst = { -+ 0xb4, 0xd0, 0xa9, 0x9d, 0x15, 0x5f, 0x48, 0xd6, -+ 0x00, 0x7e, 0x4c, 0x77, 0x5a, 0x46 -+}; -+static const u8 key15[] __initconst = { -+ 0x0a, 0x66, 0x36, 0xca, 0x5d, 0x82, 0x23, 0xb6, -+ 0xe4, 0x9b, 0xad, 0x5e, 0xd0, 0x7f, 0xf6, 0x7a, -+ 0x7b, 0x03, 0xa7, 0x4c, 0xfd, 0xec, 0xd5, 0xa1, -+ 0xfc, 0x25, 0x54, 0xda, 0x5a, 0x5c, 0xf0, 0x2c -+}; -+enum { nonce15 = 0x9ab2b87a35e772c8ULL }; -+ -+static const u8 input16[] __initconst = { -+ 0x5f, 0x09, 0xc0, 0x8b, 0x1e, 0xde, 0xca, 0xd9, -+ 0xb7, 0x5c, 0x23, 0xc9, 0x55, 0x1e, 0xcf -+}; -+static const u8 output16[] __initconst = { -+ 0x76, 0x9b, 0x53, 0xf3, 0x66, 0x88, 0x28, 0x60, -+ 0x98, 0x80, 0x2c, 0xa8, 0x80, 0xa6, 0x48 -+}; -+static const u8 key16[] __initconst = { -+ 0x80, 0xb5, 0x51, 0xdf, 0x17, 0x5b, 0xb0, 0xef, -+ 0x8b, 0x5b, 0x2e, 0x3e, 0xc5, 0xe3, 0xa5, 0x86, -+ 0xac, 0x0d, 0x8e, 0x32, 0x90, 0x9d, 0x82, 0x27, -+ 0xf1, 0x23, 0x26, 0xc3, 0xea, 0x55, 0xb6, 0x63 -+}; -+enum { nonce16 = 0xa82e9d39e4d02ef5ULL }; -+ -+static const u8 input17[] __initconst = { -+ 0x87, 0x0b, 0x36, 0x71, 0x7c, 0xb9, 0x0b, 0x80, -+ 0x4d, 0x77, 0x5c, 0x4f, 0xf5, 0x51, 0x0e, 0x1a -+}; -+static const u8 output17[] __initconst = { -+ 0xf1, 0x12, 0x4a, 0x8a, 0xd9, 0xd0, 0x08, 0x67, -+ 0x66, 0xd7, 0x34, 0xea, 0x32, 0x3b, 0x54, 0x0e -+}; -+static const u8 key17[] __initconst = { -+ 0xfb, 0x71, 0x5f, 0x3f, 0x7a, 0xc0, 0x9a, 0xc8, -+ 0xc8, 0xcf, 0xe8, 0xbc, 0xfb, 0x09, 0xbf, 0x89, -+ 0x6a, 0xef, 0xd5, 0xe5, 0x36, 0x87, 0x14, 0x76, -+ 0x00, 0xb9, 0x32, 0x28, 0xb2, 0x00, 0x42, 0x53 -+}; -+enum { nonce17 = 0x229b87e73d557b96ULL }; -+ -+static const u8 input18[] __initconst = { -+ 0x38, 0x42, 0xb5, 0x37, 0xb4, 0x3d, 0xfe, 0x59, -+ 0x38, 0x68, 0x88, 0xfa, 0x89, 0x8a, 0x5f, 0x90, -+ 0x3c -+}; -+static const u8 output18[] __initconst = { -+ 0xac, 0xad, 0x14, 0xe8, 0x7e, 0xd7, 0xce, 0x96, -+ 0x3d, 0xb3, 0x78, 0x85, 0x22, 0x5a, 0xcb, 0x39, -+ 0xd4 -+}; -+static const u8 key18[] __initconst = { -+ 0xe1, 0xc1, 0xa8, 0xe0, 0x91, 0xe7, 0x38, 0x66, -+ 0x80, 0x17, 0x12, 0x3c, 0x5e, 0x2d, 0xbb, 0xea, -+ 0xeb, 0x6c, 0x8b, 0xc8, 0x1b, 0x6f, 0x7c, 0xea, -+ 0x50, 0x57, 0x23, 0x1e, 0x65, 0x6f, 0x6d, 0x81 -+}; -+enum { nonce18 = 0xfaf5fcf8f30e57a9ULL }; -+ -+static const u8 input19[] __initconst = { -+ 0x1c, 0x4a, 0x30, 0x26, 0xef, 0x9a, 0x32, 0xa7, -+ 0x8f, 0xe5, 0xc0, 0x0f, 0x30, 0x3a, 0xbf, 0x38, -+ 0x54, 0xba -+}; -+static const u8 output19[] __initconst = { -+ 0x57, 0x67, 0x54, 0x4f, 0x31, 0xd6, 0xef, 0x35, -+ 0x0b, 0xd9, 0x52, 0xa7, 0x46, 0x7d, 0x12, 0x17, -+ 0x1e, 0xe3 -+}; -+static const u8 key19[] __initconst = { -+ 0x5a, 0x79, 0xc1, 0xea, 0x33, 0xb3, 0xc7, 0x21, -+ 0xec, 0xf8, 0xcb, 0xd2, 0x58, 0x96, 0x23, 0xd6, -+ 0x4d, 0xed, 0x2f, 0xdf, 0x8a, 0x79, 0xe6, 0x8b, -+ 0x38, 0xa3, 0xc3, 0x7a, 0x33, 0xda, 0x02, 0xc7 -+}; -+enum { nonce19 = 0x2b23b61840429604ULL }; -+ -+static const u8 input20[] __initconst = { -+ 0xab, 0xe9, 0x32, 0xbb, 0x35, 0x17, 0xe0, 0x60, -+ 0x80, 0xb1, 0x27, 0xdc, 0xe6, 0x62, 0x9e, 0x0c, -+ 0x77, 0xf4, 0x50 -+}; -+static const u8 output20[] __initconst = { -+ 0x54, 0x6d, 0xaa, 0xfc, 0x08, 0xfb, 0x71, 0xa8, -+ 0xd6, 0x1d, 0x7d, 0xf3, 0x45, 0x10, 0xb5, 0x4c, -+ 0xcc, 0x4b, 0x45 -+}; -+static const u8 key20[] __initconst = { -+ 0xa3, 0xfd, 0x3d, 0xa9, 0xeb, 0xea, 0x2c, 0x69, -+ 0xcf, 0x59, 0x38, 0x13, 0x5b, 0xa7, 0x53, 0x8f, -+ 0x5e, 0xa2, 0x33, 0x86, 0x4c, 0x75, 0x26, 0xaf, -+ 0x35, 0x12, 0x09, 0x71, 0x81, 0xea, 0x88, 0x66 -+}; -+enum { nonce20 = 0x7459667a8fadff58ULL }; -+ -+static const u8 input21[] __initconst = { -+ 0xa6, 0x82, 0x21, 0x23, 0xad, 0x27, 0x3f, 0xc6, -+ 0xd7, 0x16, 0x0d, 0x6d, 0x24, 0x15, 0x54, 0xc5, -+ 0x96, 0x72, 0x59, 0x8a -+}; -+static const u8 output21[] __initconst = { -+ 0x5f, 0x34, 0x32, 0xea, 0x06, 0xd4, 0x9e, 0x01, -+ 0xdc, 0x32, 0x32, 0x40, 0x66, 0x73, 0x6d, 0x4a, -+ 0x6b, 0x12, 0x20, 0xe8 -+}; -+static const u8 key21[] __initconst = { -+ 0x96, 0xfd, 0x13, 0x23, 0xa9, 0x89, 0x04, 0xe6, -+ 0x31, 0xa5, 0x2c, 0xc1, 0x40, 0xd5, 0x69, 0x5c, -+ 0x32, 0x79, 0x56, 0xe0, 0x29, 0x93, 0x8f, 0xe8, -+ 0x5f, 0x65, 0x53, 0x7f, 0xc1, 0xe9, 0xaf, 0xaf -+}; -+enum { nonce21 = 0xba8defee9d8e13b5ULL }; -+ -+static const u8 input22[] __initconst = { -+ 0xb8, 0x32, 0x1a, 0x81, 0xd8, 0x38, 0x89, 0x5a, -+ 0xb0, 0x05, 0xbe, 0xf4, 0xd2, 0x08, 0xc6, 0xee, -+ 0x79, 0x7b, 0x3a, 0x76, 0x59 -+}; -+static const u8 output22[] __initconst = { -+ 0xb7, 0xba, 0xae, 0x80, 0xe4, 0x9f, 0x79, 0x84, -+ 0x5a, 0x48, 0x50, 0x6d, 0xcb, 0xd0, 0x06, 0x0c, -+ 0x15, 0x63, 0xa7, 0x5e, 0xbd -+}; -+static const u8 key22[] __initconst = { -+ 0x0f, 0x35, 0x3d, 0xeb, 0x5f, 0x0a, 0x82, 0x0d, -+ 0x24, 0x59, 0x71, 0xd8, 0xe6, 0x2d, 0x5f, 0xe1, -+ 0x7e, 0x0c, 0xae, 0xf6, 0xdc, 0x2c, 0xc5, 0x4a, -+ 0x38, 0x88, 0xf2, 0xde, 0xd9, 0x5f, 0x76, 0x7c -+}; -+enum { nonce22 = 0xe77f1760e9f5e192ULL }; -+ -+static const u8 input23[] __initconst = { -+ 0x4b, 0x1e, 0x79, 0x99, 0xcf, 0xef, 0x64, 0x4b, -+ 0xb0, 0x66, 0xae, 0x99, 0x2e, 0x68, 0x97, 0xf5, -+ 0x5d, 0x9b, 0x3f, 0x7a, 0xa9, 0xd9 -+}; -+static const u8 output23[] __initconst = { -+ 0x5f, 0xa4, 0x08, 0x39, 0xca, 0xfa, 0x2b, 0x83, -+ 0x5d, 0x95, 0x70, 0x7c, 0x2e, 0xd4, 0xae, 0xfa, -+ 0x45, 0x4a, 0x77, 0x7f, 0xa7, 0x65 -+}; -+static const u8 key23[] __initconst = { -+ 0x4a, 0x06, 0x83, 0x64, 0xaa, 0xe3, 0x38, 0x32, -+ 0x28, 0x5d, 0xa4, 0xb2, 0x5a, 0xee, 0xcf, 0x8e, -+ 0x19, 0x67, 0xf1, 0x09, 0xe8, 0xc9, 0xf6, 0x40, -+ 0x02, 0x6d, 0x0b, 0xde, 0xfa, 0x81, 0x03, 0xb1 -+}; -+enum { nonce23 = 0x9b3f349158709849ULL }; -+ -+static const u8 input24[] __initconst = { -+ 0xc6, 0xfc, 0x47, 0x5e, 0xd8, 0xed, 0xa9, 0xe5, -+ 0x4f, 0x82, 0x79, 0x35, 0xee, 0x3e, 0x7e, 0x3e, -+ 0x35, 0x70, 0x6e, 0xfa, 0x6d, 0x08, 0xe8 -+}; -+static const u8 output24[] __initconst = { -+ 0x3b, 0xc5, 0xf8, 0xc2, 0xbf, 0x2b, 0x90, 0x33, -+ 0xa6, 0xae, 0xf5, 0x5a, 0x65, 0xb3, 0x3d, 0xe1, -+ 0xcd, 0x5f, 0x55, 0xfa, 0xe7, 0xa5, 0x4a -+}; -+static const u8 key24[] __initconst = { -+ 0x00, 0x24, 0xc3, 0x65, 0x5f, 0xe6, 0x31, 0xbb, -+ 0x6d, 0xfc, 0x20, 0x7b, 0x1b, 0xa8, 0x96, 0x26, -+ 0x55, 0x21, 0x62, 0x25, 0x7e, 0xba, 0x23, 0x97, -+ 0xc9, 0xb8, 0x53, 0xa8, 0xef, 0xab, 0xad, 0x61 -+}; -+enum { nonce24 = 0x13ee0b8f526177c3ULL }; -+ -+static const u8 input25[] __initconst = { -+ 0x33, 0x07, 0x16, 0xb1, 0x34, 0x33, 0x67, 0x04, -+ 0x9b, 0x0a, 0xce, 0x1b, 0xe9, 0xde, 0x1a, 0xec, -+ 0xd0, 0x55, 0xfb, 0xc6, 0x33, 0xaf, 0x2d, 0xe3 -+}; -+static const u8 output25[] __initconst = { -+ 0x05, 0x93, 0x10, 0xd1, 0x58, 0x6f, 0x68, 0x62, -+ 0x45, 0xdb, 0x91, 0xae, 0x70, 0xcf, 0xd4, 0x5f, -+ 0xee, 0xdf, 0xd5, 0xba, 0x9e, 0xde, 0x68, 0xe6 -+}; -+static const u8 key25[] __initconst = { -+ 0x83, 0xa9, 0x4f, 0x5d, 0x74, 0xd5, 0x91, 0xb3, -+ 0xc9, 0x97, 0x19, 0x15, 0xdb, 0x0d, 0x0b, 0x4a, -+ 0x3d, 0x55, 0xcf, 0xab, 0xb2, 0x05, 0x21, 0x35, -+ 0x45, 0x50, 0xeb, 0xf8, 0xf5, 0xbf, 0x36, 0x35 -+}; -+enum { nonce25 = 0x7c6f459e49ebfebcULL }; -+ -+static const u8 input26[] __initconst = { -+ 0xc2, 0xd4, 0x7a, 0xa3, 0x92, 0xe1, 0xac, 0x46, -+ 0x1a, 0x15, 0x38, 0xc9, 0xb5, 0xfd, 0xdf, 0x84, -+ 0x38, 0xbc, 0x6b, 0x1d, 0xb0, 0x83, 0x43, 0x04, -+ 0x39 -+}; -+static const u8 output26[] __initconst = { -+ 0x7f, 0xde, 0xd6, 0x87, 0xcc, 0x34, 0xf4, 0x12, -+ 0xae, 0x55, 0xa5, 0x89, 0x95, 0x29, 0xfc, 0x18, -+ 0xd8, 0xc7, 0x7c, 0xd3, 0xcb, 0x85, 0x95, 0x21, -+ 0xd2 -+}; -+static const u8 key26[] __initconst = { -+ 0xe4, 0xd0, 0x54, 0x1d, 0x7d, 0x47, 0xa8, 0xc1, -+ 0x08, 0xca, 0xe2, 0x42, 0x52, 0x95, 0x16, 0x43, -+ 0xa3, 0x01, 0x23, 0x03, 0xcc, 0x3b, 0x81, 0x78, -+ 0x23, 0xcc, 0xa7, 0x36, 0xd7, 0xa0, 0x97, 0x8d -+}; -+enum { nonce26 = 0x524401012231683ULL }; -+ -+static const u8 input27[] __initconst = { -+ 0x0d, 0xb0, 0xcf, 0xec, 0xfc, 0x38, 0x9d, 0x9d, -+ 0x89, 0x00, 0x96, 0xf2, 0x79, 0x8a, 0xa1, 0x8d, -+ 0x32, 0x5e, 0xc6, 0x12, 0x22, 0xec, 0xf6, 0x52, -+ 0xc1, 0x0b -+}; -+static const u8 output27[] __initconst = { -+ 0xef, 0xe1, 0xf2, 0x67, 0x8e, 0x2c, 0x00, 0x9f, -+ 0x1d, 0x4c, 0x66, 0x1f, 0x94, 0x58, 0xdc, 0xbb, -+ 0xb9, 0x11, 0x8f, 0x74, 0xfd, 0x0e, 0x14, 0x01, -+ 0xa8, 0x21 -+}; -+static const u8 key27[] __initconst = { -+ 0x78, 0x71, 0xa4, 0xe6, 0xb2, 0x95, 0x44, 0x12, -+ 0x81, 0xaa, 0x7e, 0x94, 0xa7, 0x8d, 0x44, 0xea, -+ 0xc4, 0xbc, 0x01, 0xb7, 0x9e, 0xf7, 0x82, 0x9e, -+ 0x3b, 0x23, 0x9f, 0x31, 0xdd, 0xb8, 0x0d, 0x18 -+}; -+enum { nonce27 = 0xd58fe0e58fb254d6ULL }; -+ -+static const u8 input28[] __initconst = { -+ 0xaa, 0xb7, 0xaa, 0xd9, 0xa8, 0x91, 0xd7, 0x8a, -+ 0x97, 0x9b, 0xdb, 0x7c, 0x47, 0x2b, 0xdb, 0xd2, -+ 0xda, 0x77, 0xb1, 0xfa, 0x2d, 0x12, 0xe3, 0xe9, -+ 0xc4, 0x7f, 0x54 -+}; -+static const u8 output28[] __initconst = { -+ 0x87, 0x84, 0xa9, 0xa6, 0xad, 0x8f, 0xe6, 0x0f, -+ 0x69, 0xf8, 0x21, 0xc3, 0x54, 0x95, 0x0f, 0xb0, -+ 0x4e, 0xc7, 0x02, 0xe4, 0x04, 0xb0, 0x6c, 0x42, -+ 0x8c, 0x63, 0xe3 -+}; -+static const u8 key28[] __initconst = { -+ 0x12, 0x23, 0x37, 0x95, 0x04, 0xb4, 0x21, 0xe8, -+ 0xbc, 0x65, 0x46, 0x7a, 0xf4, 0x01, 0x05, 0x3f, -+ 0xb1, 0x34, 0x73, 0xd2, 0x49, 0xbf, 0x6f, 0x20, -+ 0xbd, 0x23, 0x58, 0x5f, 0xd1, 0x73, 0x57, 0xa6 -+}; -+enum { nonce28 = 0x3a04d51491eb4e07ULL }; -+ -+static const u8 input29[] __initconst = { -+ 0x55, 0xd0, 0xd4, 0x4b, 0x17, 0xc8, 0xc4, 0x2b, -+ 0xc0, 0x28, 0xbd, 0x9d, 0x65, 0x4d, 0xaf, 0x77, -+ 0x72, 0x7c, 0x36, 0x68, 0xa7, 0xb6, 0x87, 0x4d, -+ 0xb9, 0x27, 0x25, 0x6c -+}; -+static const u8 output29[] __initconst = { -+ 0x0e, 0xac, 0x4c, 0xf5, 0x12, 0xb5, 0x56, 0xa5, -+ 0x00, 0x9a, 0xd6, 0xe5, 0x1a, 0x59, 0x2c, 0xf6, -+ 0x42, 0x22, 0xcf, 0x23, 0x98, 0x34, 0x29, 0xac, -+ 0x6e, 0xe3, 0x37, 0x6d -+}; -+static const u8 key29[] __initconst = { -+ 0xda, 0x9d, 0x05, 0x0c, 0x0c, 0xba, 0x75, 0xb9, -+ 0x9e, 0xb1, 0x8d, 0xd9, 0x73, 0x26, 0x2c, 0xa9, -+ 0x3a, 0xb5, 0xcb, 0x19, 0x49, 0xa7, 0x4f, 0xf7, -+ 0x64, 0x35, 0x23, 0x20, 0x2a, 0x45, 0x78, 0xc7 -+}; -+enum { nonce29 = 0xc25ac9982431cbfULL }; -+ -+static const u8 input30[] __initconst = { -+ 0x4e, 0xd6, 0x85, 0xbb, 0xe7, 0x99, 0xfa, 0x04, -+ 0x33, 0x24, 0xfd, 0x75, 0x18, 0xe3, 0xd3, 0x25, -+ 0xcd, 0xca, 0xae, 0x00, 0xbe, 0x52, 0x56, 0x4a, -+ 0x31, 0xe9, 0x4f, 0xae, 0x8a -+}; -+static const u8 output30[] __initconst = { -+ 0x30, 0x36, 0x32, 0xa2, 0x3c, 0xb6, 0xf9, 0xf9, -+ 0x76, 0x70, 0xad, 0xa6, 0x10, 0x41, 0x00, 0x4a, -+ 0xfa, 0xce, 0x1b, 0x86, 0x05, 0xdb, 0x77, 0x96, -+ 0xb3, 0xb7, 0x8f, 0x61, 0x24 -+}; -+static const u8 key30[] __initconst = { -+ 0x49, 0x35, 0x4c, 0x15, 0x98, 0xfb, 0xc6, 0x57, -+ 0x62, 0x6d, 0x06, 0xc3, 0xd4, 0x79, 0x20, 0x96, -+ 0x05, 0x2a, 0x31, 0x63, 0xc0, 0x44, 0x42, 0x09, -+ 0x13, 0x13, 0xff, 0x1b, 0xc8, 0x63, 0x1f, 0x0b -+}; -+enum { nonce30 = 0x4967f9c08e41568bULL }; -+ -+static const u8 input31[] __initconst = { -+ 0x91, 0x04, 0x20, 0x47, 0x59, 0xee, 0xa6, 0x0f, -+ 0x04, 0x75, 0xc8, 0x18, 0x95, 0x44, 0x01, 0x28, -+ 0x20, 0x6f, 0x73, 0x68, 0x66, 0xb5, 0x03, 0xb3, -+ 0x58, 0x27, 0x6e, 0x7a, 0x76, 0xb8 -+}; -+static const u8 output31[] __initconst = { -+ 0xe8, 0x03, 0x78, 0x9d, 0x13, 0x15, 0x98, 0xef, -+ 0x64, 0x68, 0x12, 0x41, 0xb0, 0x29, 0x94, 0x0c, -+ 0x83, 0x35, 0x46, 0xa9, 0x74, 0xe1, 0x75, 0xf0, -+ 0xb6, 0x96, 0xc3, 0x6f, 0xd7, 0x70 -+}; -+static const u8 key31[] __initconst = { -+ 0xef, 0xcd, 0x5a, 0x4a, 0xf4, 0x7e, 0x6a, 0x3a, -+ 0x11, 0x88, 0x72, 0x94, 0xb8, 0xae, 0x84, 0xc3, -+ 0x66, 0xe0, 0xde, 0x4b, 0x00, 0xa5, 0xd6, 0x2d, -+ 0x50, 0xb7, 0x28, 0xff, 0x76, 0x57, 0x18, 0x1f -+}; -+enum { nonce31 = 0xcb6f428fa4192e19ULL }; -+ -+static const u8 input32[] __initconst = { -+ 0x90, 0x06, 0x50, 0x4b, 0x98, 0x14, 0x30, 0xf1, -+ 0xb8, 0xd7, 0xf0, 0xa4, 0x3e, 0x4e, 0xd8, 0x00, -+ 0xea, 0xdb, 0x4f, 0x93, 0x05, 0xef, 0x02, 0x71, -+ 0x1a, 0xcd, 0xa3, 0xb1, 0xae, 0xd3, 0x18 -+}; -+static const u8 output32[] __initconst = { -+ 0xcb, 0x4a, 0x37, 0x3f, 0xea, 0x40, 0xab, 0x86, -+ 0xfe, 0xcc, 0x07, 0xd5, 0xdc, 0xb2, 0x25, 0xb6, -+ 0xfd, 0x2a, 0x72, 0xbc, 0x5e, 0xd4, 0x75, 0xff, -+ 0x71, 0xfc, 0xce, 0x1e, 0x6f, 0x22, 0xc1 -+}; -+static const u8 key32[] __initconst = { -+ 0xfc, 0x6d, 0xc3, 0x80, 0xce, 0xa4, 0x31, 0xa1, -+ 0xcc, 0xfa, 0x9d, 0x10, 0x0b, 0xc9, 0x11, 0x77, -+ 0x34, 0xdb, 0xad, 0x1b, 0xc4, 0xfc, 0xeb, 0x79, -+ 0x91, 0xda, 0x59, 0x3b, 0x0d, 0xb1, 0x19, 0x3b -+}; -+enum { nonce32 = 0x88551bf050059467ULL }; -+ -+static const u8 input33[] __initconst = { -+ 0x88, 0x94, 0x71, 0x92, 0xe8, 0xd7, 0xf9, 0xbd, -+ 0x55, 0xe3, 0x22, 0xdb, 0x99, 0x51, 0xfb, 0x50, -+ 0xbf, 0x82, 0xb5, 0x70, 0x8b, 0x2b, 0x6a, 0x03, -+ 0x37, 0xa0, 0xc6, 0x19, 0x5d, 0xc9, 0xbc, 0xcc -+}; -+static const u8 output33[] __initconst = { -+ 0xb6, 0x17, 0x51, 0xc8, 0xea, 0x8a, 0x14, 0xdc, -+ 0x23, 0x1b, 0xd4, 0xed, 0xbf, 0x50, 0xb9, 0x38, -+ 0x00, 0xc2, 0x3f, 0x78, 0x3d, 0xbf, 0xa0, 0x84, -+ 0xef, 0x45, 0xb2, 0x7d, 0x48, 0x7b, 0x62, 0xa7 -+}; -+static const u8 key33[] __initconst = { -+ 0xb9, 0x8f, 0x6a, 0xad, 0xb4, 0x6f, 0xb5, 0xdc, -+ 0x48, 0xfa, 0x43, 0x57, 0x62, 0x97, 0xef, 0x89, -+ 0x4c, 0x5a, 0x7b, 0x67, 0xb8, 0x9d, 0xf0, 0x42, -+ 0x2b, 0x8f, 0xf3, 0x18, 0x05, 0x2e, 0x48, 0xd0 -+}; -+enum { nonce33 = 0x31f16488fe8447f5ULL }; -+ -+static const u8 input34[] __initconst = { -+ 0xda, 0x2b, 0x3d, 0x63, 0x9e, 0x4f, 0xc2, 0xb8, -+ 0x7f, 0xc2, 0x1a, 0x8b, 0x0d, 0x95, 0x65, 0x55, -+ 0x52, 0xba, 0x51, 0x51, 0xc0, 0x61, 0x9f, 0x0a, -+ 0x5d, 0xb0, 0x59, 0x8c, 0x64, 0x6a, 0xab, 0xf5, -+ 0x57 -+}; -+static const u8 output34[] __initconst = { -+ 0x5c, 0xf6, 0x62, 0x24, 0x8c, 0x45, 0xa3, 0x26, -+ 0xd0, 0xe4, 0x88, 0x1c, 0xed, 0xc4, 0x26, 0x58, -+ 0xb5, 0x5d, 0x92, 0xc4, 0x17, 0x44, 0x1c, 0xb8, -+ 0x2c, 0xf3, 0x55, 0x7e, 0xd6, 0xe5, 0xb3, 0x65, -+ 0xa8 -+}; -+static const u8 key34[] __initconst = { -+ 0xde, 0xd1, 0x27, 0xb7, 0x7c, 0xfa, 0xa6, 0x78, -+ 0x39, 0x80, 0xdf, 0xb7, 0x46, 0xac, 0x71, 0x26, -+ 0xd0, 0x2a, 0x56, 0x79, 0x12, 0xeb, 0x26, 0x37, -+ 0x01, 0x0d, 0x30, 0xe0, 0xe3, 0x66, 0xb2, 0xf4 -+}; -+enum { nonce34 = 0x92d0d9b252c24149ULL }; -+ -+static const u8 input35[] __initconst = { -+ 0x3a, 0x15, 0x5b, 0x75, 0x6e, 0xd0, 0x52, 0x20, -+ 0x6c, 0x82, 0xfa, 0xce, 0x5b, 0xea, 0xf5, 0x43, -+ 0xc1, 0x81, 0x7c, 0xb2, 0xac, 0x16, 0x3f, 0xd3, -+ 0x5a, 0xaf, 0x55, 0x98, 0xf4, 0xc6, 0xba, 0x71, -+ 0x25, 0x8b -+}; -+static const u8 output35[] __initconst = { -+ 0xb3, 0xaf, 0xac, 0x6d, 0x4d, 0xc7, 0x68, 0x56, -+ 0x50, 0x5b, 0x69, 0x2a, 0xe5, 0x90, 0xf9, 0x5f, -+ 0x99, 0x88, 0xff, 0x0c, 0xa6, 0xb1, 0x83, 0xd6, -+ 0x80, 0xa6, 0x1b, 0xde, 0x94, 0xa4, 0x2c, 0xc3, -+ 0x74, 0xfa -+}; -+static const u8 key35[] __initconst = { -+ 0xd8, 0x24, 0xe2, 0x06, 0xd7, 0x7a, 0xce, 0x81, -+ 0x52, 0x72, 0x02, 0x69, 0x89, 0xc4, 0xe9, 0x53, -+ 0x3b, 0x08, 0x5f, 0x98, 0x1e, 0x1b, 0x99, 0x6e, -+ 0x28, 0x17, 0x6d, 0xba, 0xc0, 0x96, 0xf9, 0x3c -+}; -+enum { nonce35 = 0x7baf968c4c8e3a37ULL }; -+ -+static const u8 input36[] __initconst = { -+ 0x31, 0x5d, 0x4f, 0xe3, 0xac, 0xad, 0x17, 0xa6, -+ 0xb5, 0x01, 0xe2, 0xc6, 0xd4, 0x7e, 0xc4, 0x80, -+ 0xc0, 0x59, 0x72, 0xbb, 0x4b, 0x74, 0x6a, 0x41, -+ 0x0f, 0x9c, 0xf6, 0xca, 0x20, 0xb3, 0x73, 0x07, -+ 0x6b, 0x02, 0x2a -+}; -+static const u8 output36[] __initconst = { -+ 0xf9, 0x09, 0x92, 0x94, 0x7e, 0x31, 0xf7, 0x53, -+ 0xe8, 0x8a, 0x5b, 0x20, 0xef, 0x9b, 0x45, 0x81, -+ 0xba, 0x5e, 0x45, 0x63, 0xc1, 0xc7, 0x9e, 0x06, -+ 0x0e, 0xd9, 0x62, 0x8e, 0x96, 0xf9, 0xfa, 0x43, -+ 0x4d, 0xd4, 0x28 -+}; -+static const u8 key36[] __initconst = { -+ 0x13, 0x30, 0x4c, 0x06, 0xae, 0x18, 0xde, 0x03, -+ 0x1d, 0x02, 0x40, 0xf5, 0xbb, 0x19, 0xe3, 0x88, -+ 0x41, 0xb1, 0x29, 0x15, 0x97, 0xc2, 0x69, 0x3f, -+ 0x32, 0x2a, 0x0c, 0x8b, 0xcf, 0x83, 0x8b, 0x6c -+}; -+enum { nonce36 = 0x226d251d475075a0ULL }; -+ -+static const u8 input37[] __initconst = { -+ 0x10, 0x18, 0xbe, 0xfd, 0x66, 0xc9, 0x77, 0xcc, -+ 0x43, 0xe5, 0x46, 0x0b, 0x08, 0x8b, 0xae, 0x11, -+ 0x86, 0x15, 0xc2, 0xf6, 0x45, 0xd4, 0x5f, 0xd6, -+ 0xb6, 0x5f, 0x9f, 0x3e, 0x97, 0xb7, 0xd4, 0xad, -+ 0x0b, 0xe8, 0x31, 0x94 -+}; -+static const u8 output37[] __initconst = { -+ 0x03, 0x2c, 0x1c, 0xee, 0xc6, 0xdd, 0xed, 0x38, -+ 0x80, 0x6d, 0x84, 0x16, 0xc3, 0xc2, 0x04, 0x63, -+ 0xcd, 0xa7, 0x6e, 0x36, 0x8b, 0xed, 0x78, 0x63, -+ 0x95, 0xfc, 0x69, 0x7a, 0x3f, 0x8d, 0x75, 0x6b, -+ 0x6c, 0x26, 0x56, 0x4d -+}; -+static const u8 key37[] __initconst = { -+ 0xac, 0x84, 0x4d, 0xa9, 0x29, 0x49, 0x3c, 0x39, -+ 0x7f, 0xd9, 0xa6, 0x01, 0xf3, 0x7e, 0xfa, 0x4a, -+ 0x14, 0x80, 0x22, 0x74, 0xf0, 0x29, 0x30, 0x2d, -+ 0x07, 0x21, 0xda, 0xc0, 0x4d, 0x70, 0x56, 0xa2 -+}; -+enum { nonce37 = 0x167823ce3b64925aULL }; -+ -+static const u8 input38[] __initconst = { -+ 0x30, 0x8f, 0xfa, 0x24, 0x29, 0xb1, 0xfb, 0xce, -+ 0x31, 0x62, 0xdc, 0xd0, 0x46, 0xab, 0xe1, 0x31, -+ 0xd9, 0xae, 0x60, 0x0d, 0xca, 0x0a, 0x49, 0x12, -+ 0x3d, 0x92, 0xe9, 0x91, 0x67, 0x12, 0x62, 0x18, -+ 0x89, 0xe2, 0xf9, 0x1c, 0xcc -+}; -+static const u8 output38[] __initconst = { -+ 0x56, 0x9c, 0xc8, 0x7a, 0xc5, 0x98, 0xa3, 0x0f, -+ 0xba, 0xd5, 0x3e, 0xe1, 0xc9, 0x33, 0x64, 0x33, -+ 0xf0, 0xd5, 0xf7, 0x43, 0x66, 0x0e, 0x08, 0x9a, -+ 0x6e, 0x09, 0xe4, 0x01, 0x0d, 0x1e, 0x2f, 0x4b, -+ 0xed, 0x9c, 0x08, 0x8c, 0x03 -+}; -+static const u8 key38[] __initconst = { -+ 0x77, 0x52, 0x2a, 0x23, 0xf1, 0xc5, 0x96, 0x2b, -+ 0x89, 0x4f, 0x3e, 0xf3, 0xff, 0x0e, 0x94, 0xce, -+ 0xf1, 0xbd, 0x53, 0xf5, 0x77, 0xd6, 0x9e, 0x47, -+ 0x49, 0x3d, 0x16, 0x64, 0xff, 0x95, 0x42, 0x42 -+}; -+enum { nonce38 = 0xff629d7b82cef357ULL }; -+ -+static const u8 input39[] __initconst = { -+ 0x38, 0x26, 0x27, 0xd0, 0xc2, 0xf5, 0x34, 0xba, -+ 0xda, 0x0f, 0x1c, 0x1c, 0x9a, 0x70, 0xe5, 0x8a, -+ 0x78, 0x2d, 0x8f, 0x9a, 0xbf, 0x89, 0x6a, 0xfd, -+ 0xd4, 0x9c, 0x33, 0xf1, 0xb6, 0x89, 0x16, 0xe3, -+ 0x6a, 0x00, 0xfa, 0x3a, 0x0f, 0x26 -+}; -+static const u8 output39[] __initconst = { -+ 0x0f, 0xaf, 0x91, 0x6d, 0x9c, 0x99, 0xa4, 0xf7, -+ 0x3b, 0x9d, 0x9a, 0x98, 0xca, 0xbb, 0x50, 0x48, -+ 0xee, 0xcb, 0x5d, 0xa1, 0x37, 0x2d, 0x36, 0x09, -+ 0x2a, 0xe2, 0x1c, 0x3d, 0x98, 0x40, 0x1c, 0x16, -+ 0x56, 0xa7, 0x98, 0xe9, 0x7d, 0x2b -+}; -+static const u8 key39[] __initconst = { -+ 0x6e, 0x83, 0x15, 0x4d, 0xf8, 0x78, 0xa8, 0x0e, -+ 0x71, 0x37, 0xd4, 0x6e, 0x28, 0x5c, 0x06, 0xa1, -+ 0x2d, 0x6c, 0x72, 0x7a, 0xfd, 0xf8, 0x65, 0x1a, -+ 0xb8, 0xe6, 0x29, 0x7b, 0xe5, 0xb3, 0x23, 0x79 -+}; -+enum { nonce39 = 0xa4d8c491cf093e9dULL }; -+ -+static const u8 input40[] __initconst = { -+ 0x8f, 0x32, 0x7c, 0x40, 0x37, 0x95, 0x08, 0x00, -+ 0x00, 0xfe, 0x2f, 0x95, 0x20, 0x12, 0x40, 0x18, -+ 0x5e, 0x7e, 0x5e, 0x99, 0xee, 0x8d, 0x91, 0x7d, -+ 0x50, 0x7d, 0x21, 0x45, 0x27, 0xe1, 0x7f, 0xd4, -+ 0x73, 0x10, 0xe1, 0x33, 0xbc, 0xf8, 0xdd -+}; -+static const u8 output40[] __initconst = { -+ 0x78, 0x7c, 0xdc, 0x55, 0x2b, 0xd9, 0x2b, 0x3a, -+ 0xdd, 0x56, 0x11, 0x52, 0xd3, 0x2e, 0xe0, 0x0d, -+ 0x23, 0x20, 0x8a, 0xf1, 0x4f, 0xee, 0xf1, 0x68, -+ 0xf6, 0xdc, 0x53, 0xcf, 0x17, 0xd4, 0xf0, 0x6c, -+ 0xdc, 0x80, 0x5f, 0x1c, 0xa4, 0x91, 0x05 -+}; -+static const u8 key40[] __initconst = { -+ 0x0d, 0x86, 0xbf, 0x8a, 0xba, 0x9e, 0x39, 0x91, -+ 0xa8, 0xe7, 0x22, 0xf0, 0x0c, 0x43, 0x18, 0xe4, -+ 0x1f, 0xb0, 0xaf, 0x8a, 0x34, 0x31, 0xf4, 0x41, -+ 0xf0, 0x89, 0x85, 0xca, 0x5d, 0x05, 0x3b, 0x94 -+}; -+enum { nonce40 = 0xae7acc4f5986439eULL }; -+ -+static const u8 input41[] __initconst = { -+ 0x20, 0x5f, 0xc1, 0x83, 0x36, 0x02, 0x76, 0x96, -+ 0xf0, 0xbf, 0x8e, 0x0e, 0x1a, 0xd1, 0xc7, 0x88, -+ 0x18, 0xc7, 0x09, 0xc4, 0x15, 0xd9, 0x4f, 0x5e, -+ 0x1f, 0xb3, 0xb4, 0x6d, 0xcb, 0xa0, 0xd6, 0x8a, -+ 0x3b, 0x40, 0x8e, 0x80, 0xf1, 0xe8, 0x8f, 0x5f -+}; -+static const u8 output41[] __initconst = { -+ 0x0b, 0xd1, 0x49, 0x9a, 0x9d, 0xe8, 0x97, 0xb8, -+ 0xd1, 0xeb, 0x90, 0x62, 0x37, 0xd2, 0x99, 0x15, -+ 0x67, 0x6d, 0x27, 0x93, 0xce, 0x37, 0x65, 0xa2, -+ 0x94, 0x88, 0xd6, 0x17, 0xbc, 0x1c, 0x6e, 0xa2, -+ 0xcc, 0xfb, 0x81, 0x0e, 0x30, 0x60, 0x5a, 0x6f -+}; -+static const u8 key41[] __initconst = { -+ 0x36, 0x27, 0x57, 0x01, 0x21, 0x68, 0x97, 0xc7, -+ 0x00, 0x67, 0x7b, 0xe9, 0x0f, 0x55, 0x49, 0xbb, -+ 0x92, 0x18, 0x98, 0xf5, 0x5e, 0xbc, 0xe7, 0x5a, -+ 0x9d, 0x3d, 0xc7, 0xbd, 0x59, 0xec, 0x82, 0x8e -+}; -+enum { nonce41 = 0x5da05e4c8dfab464ULL }; -+ -+static const u8 input42[] __initconst = { -+ 0xca, 0x30, 0xcd, 0x63, 0xf0, 0x2d, 0xf1, 0x03, -+ 0x4d, 0x0d, 0xf2, 0xf7, 0x6f, 0xae, 0xd6, 0x34, -+ 0xea, 0xf6, 0x13, 0xcf, 0x1c, 0xa0, 0xd0, 0xe8, -+ 0xa4, 0x78, 0x80, 0x3b, 0x1e, 0xa5, 0x32, 0x4c, -+ 0x73, 0x12, 0xd4, 0x6a, 0x94, 0xbc, 0xba, 0x80, -+ 0x5e -+}; -+static const u8 output42[] __initconst = { -+ 0xec, 0x3f, 0x18, 0x31, 0xc0, 0x7b, 0xb5, 0xe2, -+ 0xad, 0xf3, 0xec, 0xa0, 0x16, 0x9d, 0xef, 0xce, -+ 0x05, 0x65, 0x59, 0x9d, 0x5a, 0xca, 0x3e, 0x13, -+ 0xb9, 0x5d, 0x5d, 0xb5, 0xeb, 0xae, 0xc0, 0x87, -+ 0xbb, 0xfd, 0xe7, 0xe4, 0x89, 0x5b, 0xd2, 0x6c, -+ 0x56 -+}; -+static const u8 key42[] __initconst = { -+ 0x7c, 0x6b, 0x7e, 0x77, 0xcc, 0x8c, 0x1b, 0x03, -+ 0x8b, 0x2a, 0xb3, 0x7c, 0x5a, 0x73, 0xcc, 0xac, -+ 0xdd, 0x53, 0x54, 0x0c, 0x85, 0xed, 0xcd, 0x47, -+ 0x24, 0xc1, 0xb8, 0x9b, 0x2e, 0x41, 0x92, 0x36 -+}; -+enum { nonce42 = 0xe4d7348b09682c9cULL }; -+ -+static const u8 input43[] __initconst = { -+ 0x52, 0xf2, 0x4b, 0x7c, 0xe5, 0x58, 0xe8, 0xd2, -+ 0xb7, 0xf3, 0xa1, 0x29, 0x68, 0xa2, 0x50, 0x50, -+ 0xae, 0x9c, 0x1b, 0xe2, 0x67, 0x77, 0xe2, 0xdb, -+ 0x85, 0x55, 0x7e, 0x84, 0x8a, 0x12, 0x3c, 0xb6, -+ 0x2e, 0xed, 0xd3, 0xec, 0x47, 0x68, 0xfa, 0x52, -+ 0x46, 0x9d -+}; -+static const u8 output43[] __initconst = { -+ 0x1b, 0xf0, 0x05, 0xe4, 0x1c, 0xd8, 0x74, 0x9a, -+ 0xf0, 0xee, 0x00, 0x54, 0xce, 0x02, 0x83, 0x15, -+ 0xfb, 0x23, 0x35, 0x78, 0xc3, 0xda, 0x98, 0xd8, -+ 0x9d, 0x1b, 0xb2, 0x51, 0x82, 0xb0, 0xff, 0xbe, -+ 0x05, 0xa9, 0xa4, 0x04, 0xba, 0xea, 0x4b, 0x73, -+ 0x47, 0x6e -+}; -+static const u8 key43[] __initconst = { -+ 0xeb, 0xec, 0x0e, 0xa1, 0x65, 0xe2, 0x99, 0x46, -+ 0xd8, 0x54, 0x8c, 0x4a, 0x93, 0xdf, 0x6d, 0xbf, -+ 0x93, 0x34, 0x94, 0x57, 0xc9, 0x12, 0x9d, 0x68, -+ 0x05, 0xc5, 0x05, 0xad, 0x5a, 0xc9, 0x2a, 0x3b -+}; -+enum { nonce43 = 0xe14f6a902b7827fULL }; -+ -+static const u8 input44[] __initconst = { -+ 0x3e, 0x22, 0x3e, 0x8e, 0xcd, 0x18, 0xe2, 0xa3, -+ 0x8d, 0x8b, 0x38, 0xc3, 0x02, 0xa3, 0x31, 0x48, -+ 0xc6, 0x0e, 0xec, 0x99, 0x51, 0x11, 0x6d, 0x8b, -+ 0x32, 0x35, 0x3b, 0x08, 0x58, 0x76, 0x25, 0x30, -+ 0xe2, 0xfc, 0xa2, 0x46, 0x7d, 0x6e, 0x34, 0x87, -+ 0xac, 0x42, 0xbf -+}; -+static const u8 output44[] __initconst = { -+ 0x08, 0x92, 0x58, 0x02, 0x1a, 0xf4, 0x1f, 0x3d, -+ 0x38, 0x7b, 0x6b, 0xf6, 0x84, 0x07, 0xa3, 0x19, -+ 0x17, 0x2a, 0xed, 0x57, 0x1c, 0xf9, 0x55, 0x37, -+ 0x4e, 0xf4, 0x68, 0x68, 0x82, 0x02, 0x4f, 0xca, -+ 0x21, 0x00, 0xc6, 0x66, 0x79, 0x53, 0x19, 0xef, -+ 0x7f, 0xdd, 0x74 -+}; -+static const u8 key44[] __initconst = { -+ 0x73, 0xb6, 0x3e, 0xf4, 0x57, 0x52, 0xa6, 0x43, -+ 0x51, 0xd8, 0x25, 0x00, 0xdb, 0xb4, 0x52, 0x69, -+ 0xd6, 0x27, 0x49, 0xeb, 0x9b, 0xf1, 0x7b, 0xa0, -+ 0xd6, 0x7c, 0x9c, 0xd8, 0x95, 0x03, 0x69, 0x26 -+}; -+enum { nonce44 = 0xf5e6dc4f35ce24e5ULL }; -+ -+static const u8 input45[] __initconst = { -+ 0x55, 0x76, 0xc0, 0xf1, 0x74, 0x03, 0x7a, 0x6d, -+ 0x14, 0xd8, 0x36, 0x2c, 0x9f, 0x9a, 0x59, 0x7a, -+ 0x2a, 0xf5, 0x77, 0x84, 0x70, 0x7c, 0x1d, 0x04, -+ 0x90, 0x45, 0xa4, 0xc1, 0x5e, 0xdd, 0x2e, 0x07, -+ 0x18, 0x34, 0xa6, 0x85, 0x56, 0x4f, 0x09, 0xaf, -+ 0x2f, 0x83, 0xe1, 0xc6 -+}; -+static const u8 output45[] __initconst = { -+ 0x22, 0x46, 0xe4, 0x0b, 0x3a, 0x55, 0xcc, 0x9b, -+ 0xf0, 0xc0, 0x53, 0xcd, 0x95, 0xc7, 0x57, 0x6c, -+ 0x77, 0x46, 0x41, 0x72, 0x07, 0xbf, 0xa8, 0xe5, -+ 0x68, 0x69, 0xd8, 0x1e, 0x45, 0xc1, 0xa2, 0x50, -+ 0xa5, 0xd1, 0x62, 0xc9, 0x5a, 0x7d, 0x08, 0x14, -+ 0xae, 0x44, 0x16, 0xb9 -+}; -+static const u8 key45[] __initconst = { -+ 0x41, 0xf3, 0x88, 0xb2, 0x51, 0x25, 0x47, 0x02, -+ 0x39, 0xe8, 0x15, 0x3a, 0x22, 0x78, 0x86, 0x0b, -+ 0xf9, 0x1e, 0x8d, 0x98, 0xb2, 0x22, 0x82, 0xac, -+ 0x42, 0x94, 0xde, 0x64, 0xf0, 0xfd, 0xb3, 0x6c -+}; -+enum { nonce45 = 0xf51a582daf4aa01aULL }; -+ -+static const u8 input46[] __initconst = { -+ 0xf6, 0xff, 0x20, 0xf9, 0x26, 0x7e, 0x0f, 0xa8, -+ 0x6a, 0x45, 0x5a, 0x91, 0x73, 0xc4, 0x4c, 0x63, -+ 0xe5, 0x61, 0x59, 0xca, 0xec, 0xc0, 0x20, 0x35, -+ 0xbc, 0x9f, 0x58, 0x9c, 0x5e, 0xa1, 0x17, 0x46, -+ 0xcc, 0xab, 0x6e, 0xd0, 0x4f, 0x24, 0xeb, 0x05, -+ 0x4d, 0x40, 0x41, 0xe0, 0x9d -+}; -+static const u8 output46[] __initconst = { -+ 0x31, 0x6e, 0x63, 0x3f, 0x9c, 0xe6, 0xb1, 0xb7, -+ 0xef, 0x47, 0x46, 0xd7, 0xb1, 0x53, 0x42, 0x2f, -+ 0x2c, 0xc8, 0x01, 0xae, 0x8b, 0xec, 0x42, 0x2c, -+ 0x6b, 0x2c, 0x9c, 0xb2, 0xf0, 0x29, 0x06, 0xa5, -+ 0xcd, 0x7e, 0xc7, 0x3a, 0x38, 0x98, 0x8a, 0xde, -+ 0x03, 0x29, 0x14, 0x8f, 0xf9 -+}; -+static const u8 key46[] __initconst = { -+ 0xac, 0xa6, 0x44, 0x4a, 0x0d, 0x42, 0x10, 0xbc, -+ 0xd3, 0xc9, 0x8e, 0x9e, 0x71, 0xa3, 0x1c, 0x14, -+ 0x9d, 0x65, 0x0d, 0x49, 0x4d, 0x8c, 0xec, 0x46, -+ 0xe1, 0x41, 0xcd, 0xf5, 0xfc, 0x82, 0x75, 0x34 -+}; -+enum { nonce46 = 0x25f85182df84dec5ULL }; -+ -+static const u8 input47[] __initconst = { -+ 0xa1, 0xd2, 0xf2, 0x52, 0x2f, 0x79, 0x50, 0xb2, -+ 0x42, 0x29, 0x5b, 0x44, 0x20, 0xf9, 0xbd, 0x85, -+ 0xb7, 0x65, 0x77, 0x86, 0xce, 0x3e, 0x1c, 0xe4, -+ 0x70, 0x80, 0xdd, 0x72, 0x07, 0x48, 0x0f, 0x84, -+ 0x0d, 0xfd, 0x97, 0xc0, 0xb7, 0x48, 0x9b, 0xb4, -+ 0xec, 0xff, 0x73, 0x14, 0x99, 0xe4 -+}; -+static const u8 output47[] __initconst = { -+ 0xe5, 0x3c, 0x78, 0x66, 0x31, 0x1e, 0xd6, 0xc4, -+ 0x9e, 0x71, 0xb3, 0xd7, 0xd5, 0xad, 0x84, 0xf2, -+ 0x78, 0x61, 0x77, 0xf8, 0x31, 0xf0, 0x13, 0xad, -+ 0x66, 0xf5, 0x31, 0x7d, 0xeb, 0xdf, 0xaf, 0xcb, -+ 0xac, 0x28, 0x6c, 0xc2, 0x9e, 0xe7, 0x78, 0xa2, -+ 0xa2, 0x58, 0xce, 0x84, 0x76, 0x70 -+}; -+static const u8 key47[] __initconst = { -+ 0x05, 0x7f, 0xc0, 0x7f, 0x37, 0x20, 0x71, 0x02, -+ 0x3a, 0xe7, 0x20, 0x5a, 0x0a, 0x8f, 0x79, 0x5a, -+ 0xfe, 0xbb, 0x43, 0x4d, 0x2f, 0xcb, 0xf6, 0x9e, -+ 0xa2, 0x97, 0x00, 0xad, 0x0d, 0x51, 0x7e, 0x17 -+}; -+enum { nonce47 = 0xae707c60f54de32bULL }; -+ -+static const u8 input48[] __initconst = { -+ 0x80, 0x93, 0x77, 0x2e, 0x8d, 0xe8, 0xe6, 0xc1, -+ 0x27, 0xe6, 0xf2, 0x89, 0x5b, 0x33, 0x62, 0x18, -+ 0x80, 0x6e, 0x17, 0x22, 0x8e, 0x83, 0x31, 0x40, -+ 0x8f, 0xc9, 0x5c, 0x52, 0x6c, 0x0e, 0xa5, 0xe9, -+ 0x6c, 0x7f, 0xd4, 0x6a, 0x27, 0x56, 0x99, 0xce, -+ 0x8d, 0x37, 0x59, 0xaf, 0xc0, 0x0e, 0xe1 -+}; -+static const u8 output48[] __initconst = { -+ 0x02, 0xa4, 0x2e, 0x33, 0xb7, 0x7c, 0x2b, 0x9a, -+ 0x18, 0x5a, 0xba, 0x53, 0x38, 0xaf, 0x00, 0xeb, -+ 0xd8, 0x3d, 0x02, 0x77, 0x43, 0x45, 0x03, 0x91, -+ 0xe2, 0x5e, 0x4e, 0xeb, 0x50, 0xd5, 0x5b, 0xe0, -+ 0xf3, 0x33, 0xa7, 0xa2, 0xac, 0x07, 0x6f, 0xeb, -+ 0x3f, 0x6c, 0xcd, 0xf2, 0x6c, 0x61, 0x64 -+}; -+static const u8 key48[] __initconst = { -+ 0xf3, 0x79, 0xe7, 0xf8, 0x0e, 0x02, 0x05, 0x6b, -+ 0x83, 0x1a, 0xe7, 0x86, 0x6b, 0xe6, 0x8f, 0x3f, -+ 0xd3, 0xa3, 0xe4, 0x6e, 0x29, 0x06, 0xad, 0xbc, -+ 0xe8, 0x33, 0x56, 0x39, 0xdf, 0xb0, 0xe2, 0xfe -+}; -+enum { nonce48 = 0xd849b938c6569da0ULL }; -+ -+static const u8 input49[] __initconst = { -+ 0x89, 0x3b, 0x88, 0x9e, 0x7b, 0x38, 0x16, 0x9f, -+ 0xa1, 0x28, 0xf6, 0xf5, 0x23, 0x74, 0x28, 0xb0, -+ 0xdf, 0x6c, 0x9e, 0x8a, 0x71, 0xaf, 0xed, 0x7a, -+ 0x39, 0x21, 0x57, 0x7d, 0x31, 0x6c, 0xee, 0x0d, -+ 0x11, 0x8d, 0x41, 0x9a, 0x5f, 0xb7, 0x27, 0x40, -+ 0x08, 0xad, 0xc6, 0xe0, 0x00, 0x43, 0x9e, 0xae -+}; -+static const u8 output49[] __initconst = { -+ 0x4d, 0xfd, 0xdb, 0x4c, 0x77, 0xc1, 0x05, 0x07, -+ 0x4d, 0x6d, 0x32, 0xcb, 0x2e, 0x0e, 0xff, 0x65, -+ 0xc9, 0x27, 0xeb, 0xa9, 0x46, 0x5b, 0xab, 0x06, -+ 0xe6, 0xb6, 0x5a, 0x1e, 0x00, 0xfb, 0xcf, 0xe4, -+ 0xb9, 0x71, 0x40, 0x10, 0xef, 0x12, 0x39, 0xf0, -+ 0xea, 0x40, 0xb8, 0x9a, 0xa2, 0x85, 0x38, 0x48 -+}; -+static const u8 key49[] __initconst = { -+ 0xe7, 0x10, 0x40, 0xd9, 0x66, 0xc0, 0xa8, 0x6d, -+ 0xa3, 0xcc, 0x8b, 0xdd, 0x93, 0xf2, 0x6e, 0xe0, -+ 0x90, 0x7f, 0xd0, 0xf4, 0x37, 0x0c, 0x8b, 0x9b, -+ 0x4c, 0x4d, 0xe6, 0xf2, 0x1f, 0xe9, 0x95, 0x24 -+}; -+enum { nonce49 = 0xf269817bdae01bc0ULL }; -+ -+static const u8 input50[] __initconst = { -+ 0xda, 0x5b, 0x60, 0xcd, 0xed, 0x58, 0x8e, 0x7f, -+ 0xae, 0xdd, 0xc8, 0x2e, 0x16, 0x90, 0xea, 0x4b, -+ 0x0c, 0x74, 0x14, 0x35, 0xeb, 0xee, 0x2c, 0xff, -+ 0x46, 0x99, 0x97, 0x6e, 0xae, 0xa7, 0x8e, 0x6e, -+ 0x38, 0xfe, 0x63, 0xe7, 0x51, 0xd9, 0xaa, 0xce, -+ 0x7b, 0x1e, 0x7e, 0x5d, 0xc0, 0xe8, 0x10, 0x06, -+ 0x14 -+}; -+static const u8 output50[] __initconst = { -+ 0xe4, 0xe5, 0x86, 0x1b, 0x66, 0x19, 0xac, 0x49, -+ 0x1c, 0xbd, 0xee, 0x03, 0xaf, 0x11, 0xfc, 0x1f, -+ 0x6a, 0xd2, 0x50, 0x5c, 0xea, 0x2c, 0xa5, 0x75, -+ 0xfd, 0xb7, 0x0e, 0x80, 0x8f, 0xed, 0x3f, 0x31, -+ 0x47, 0xac, 0x67, 0x43, 0xb8, 0x2e, 0xb4, 0x81, -+ 0x6d, 0xe4, 0x1e, 0xb7, 0x8b, 0x0c, 0x53, 0xa9, -+ 0x26 -+}; -+static const u8 key50[] __initconst = { -+ 0xd7, 0xb2, 0x04, 0x76, 0x30, 0xcc, 0x38, 0x45, -+ 0xef, 0xdb, 0xc5, 0x86, 0x08, 0x61, 0xf0, 0xee, -+ 0x6d, 0xd8, 0x22, 0x04, 0x8c, 0xfb, 0xcb, 0x37, -+ 0xa6, 0xfb, 0x95, 0x22, 0xe1, 0x87, 0xb7, 0x6f -+}; -+enum { nonce50 = 0x3b44d09c45607d38ULL }; -+ -+static const u8 input51[] __initconst = { -+ 0xa9, 0x41, 0x02, 0x4b, 0xd7, 0xd5, 0xd1, 0xf1, -+ 0x21, 0x55, 0xb2, 0x75, 0x6d, 0x77, 0x1b, 0x86, -+ 0xa9, 0xc8, 0x90, 0xfd, 0xed, 0x4a, 0x7b, 0x6c, -+ 0xb2, 0x5f, 0x9b, 0x5f, 0x16, 0xa1, 0x54, 0xdb, -+ 0xd6, 0x3f, 0x6a, 0x7f, 0x2e, 0x51, 0x9d, 0x49, -+ 0x5b, 0xa5, 0x0e, 0xf9, 0xfb, 0x2a, 0x38, 0xff, -+ 0x20, 0x8c -+}; -+static const u8 output51[] __initconst = { -+ 0x18, 0xf7, 0x88, 0xc1, 0x72, 0xfd, 0x90, 0x4b, -+ 0xa9, 0x2d, 0xdb, 0x47, 0xb0, 0xa5, 0xc4, 0x37, -+ 0x01, 0x95, 0xc4, 0xb1, 0xab, 0xc5, 0x5b, 0xcd, -+ 0xe1, 0x97, 0x78, 0x13, 0xde, 0x6a, 0xff, 0x36, -+ 0xce, 0xa4, 0x67, 0xc5, 0x4a, 0x45, 0x2b, 0xd9, -+ 0xff, 0x8f, 0x06, 0x7c, 0x63, 0xbb, 0x83, 0x17, -+ 0xb4, 0x6b -+}; -+static const u8 key51[] __initconst = { -+ 0x82, 0x1a, 0x79, 0xab, 0x9a, 0xb5, 0x49, 0x6a, -+ 0x30, 0x6b, 0x99, 0x19, 0x11, 0xc7, 0xa2, 0xf4, -+ 0xca, 0x55, 0xb9, 0xdd, 0xe7, 0x2f, 0xe7, 0xc1, -+ 0xdd, 0x27, 0xad, 0x80, 0xf2, 0x56, 0xad, 0xf3 -+}; -+enum { nonce51 = 0xe93aff94ca71a4a6ULL }; -+ -+static const u8 input52[] __initconst = { -+ 0x89, 0xdd, 0xf3, 0xfa, 0xb6, 0xc1, 0xaa, 0x9a, -+ 0xc8, 0xad, 0x6b, 0x00, 0xa1, 0x65, 0xea, 0x14, -+ 0x55, 0x54, 0x31, 0x8f, 0xf0, 0x03, 0x84, 0x51, -+ 0x17, 0x1e, 0x0a, 0x93, 0x6e, 0x79, 0x96, 0xa3, -+ 0x2a, 0x85, 0x9c, 0x89, 0xf8, 0xd1, 0xe2, 0x15, -+ 0x95, 0x05, 0xf4, 0x43, 0x4d, 0x6b, 0xf0, 0x71, -+ 0x3b, 0x3e, 0xba -+}; -+static const u8 output52[] __initconst = { -+ 0x0c, 0x42, 0x6a, 0xb3, 0x66, 0x63, 0x5d, 0x2c, -+ 0x9f, 0x3d, 0xa6, 0x6e, 0xc7, 0x5f, 0x79, 0x2f, -+ 0x50, 0xe3, 0xd6, 0x07, 0x56, 0xa4, 0x2b, 0x2d, -+ 0x8d, 0x10, 0xc0, 0x6c, 0xa2, 0xfc, 0x97, 0xec, -+ 0x3f, 0x5c, 0x8d, 0x59, 0xbe, 0x84, 0xf1, 0x3e, -+ 0x38, 0x47, 0x4f, 0x75, 0x25, 0x66, 0x88, 0x14, -+ 0x03, 0xdd, 0xde -+}; -+static const u8 key52[] __initconst = { -+ 0x4f, 0xb0, 0x27, 0xb6, 0xdd, 0x24, 0x0c, 0xdb, -+ 0x6b, 0x71, 0x2e, 0xac, 0xfc, 0x3f, 0xa6, 0x48, -+ 0x5d, 0xd5, 0xff, 0x53, 0xb5, 0x62, 0xf1, 0xe0, -+ 0x93, 0xfe, 0x39, 0x4c, 0x9f, 0x03, 0x11, 0xa7 -+}; -+enum { nonce52 = 0xed8becec3bdf6f25ULL }; -+ -+static const u8 input53[] __initconst = { -+ 0x68, 0xd1, 0xc7, 0x74, 0x44, 0x1c, 0x84, 0xde, -+ 0x27, 0x27, 0x35, 0xf0, 0x18, 0x0b, 0x57, 0xaa, -+ 0xd0, 0x1a, 0xd3, 0x3b, 0x5e, 0x5c, 0x62, 0x93, -+ 0xd7, 0x6b, 0x84, 0x3b, 0x71, 0x83, 0x77, 0x01, -+ 0x3e, 0x59, 0x45, 0xf4, 0x77, 0x6c, 0x6b, 0xcb, -+ 0x88, 0x45, 0x09, 0x1d, 0xc6, 0x45, 0x6e, 0xdc, -+ 0x6e, 0x51, 0xb8, 0x28 -+}; -+static const u8 output53[] __initconst = { -+ 0xc5, 0x90, 0x96, 0x78, 0x02, 0xf5, 0xc4, 0x3c, -+ 0xde, 0xd4, 0xd4, 0xc6, 0xa7, 0xad, 0x12, 0x47, -+ 0x45, 0xce, 0xcd, 0x8c, 0x35, 0xcc, 0xa6, 0x9e, -+ 0x5a, 0xc6, 0x60, 0xbb, 0xe3, 0xed, 0xec, 0x68, -+ 0x3f, 0x64, 0xf7, 0x06, 0x63, 0x9c, 0x8c, 0xc8, -+ 0x05, 0x3a, 0xad, 0x32, 0x79, 0x8b, 0x45, 0x96, -+ 0x93, 0x73, 0x4c, 0xe0 -+}; -+static const u8 key53[] __initconst = { -+ 0x42, 0x4b, 0x20, 0x81, 0x49, 0x50, 0xe9, 0xc2, -+ 0x43, 0x69, 0x36, 0xe7, 0x68, 0xae, 0xd5, 0x7e, -+ 0x42, 0x1a, 0x1b, 0xb4, 0x06, 0x4d, 0xa7, 0x17, -+ 0xb5, 0x31, 0xd6, 0x0c, 0xb0, 0x5c, 0x41, 0x0b -+}; -+enum { nonce53 = 0xf44ce1931fbda3d7ULL }; -+ -+static const u8 input54[] __initconst = { -+ 0x7b, 0xf6, 0x8b, 0xae, 0xc0, 0xcb, 0x10, 0x8e, -+ 0xe8, 0xd8, 0x2e, 0x3b, 0x14, 0xba, 0xb4, 0xd2, -+ 0x58, 0x6b, 0x2c, 0xec, 0xc1, 0x81, 0x71, 0xb4, -+ 0xc6, 0xea, 0x08, 0xc5, 0xc9, 0x78, 0xdb, 0xa2, -+ 0xfa, 0x44, 0x50, 0x9b, 0xc8, 0x53, 0x8d, 0x45, -+ 0x42, 0xe7, 0x09, 0xc4, 0x29, 0xd8, 0x75, 0x02, -+ 0xbb, 0xb2, 0x78, 0xcf, 0xe7 -+}; -+static const u8 output54[] __initconst = { -+ 0xaf, 0x2c, 0x83, 0x26, 0x6e, 0x7f, 0xa6, 0xe9, -+ 0x03, 0x75, 0xfe, 0xfe, 0x87, 0x58, 0xcf, 0xb5, -+ 0xbc, 0x3c, 0x9d, 0xa1, 0x6e, 0x13, 0xf1, 0x0f, -+ 0x9e, 0xbc, 0xe0, 0x54, 0x24, 0x32, 0xce, 0x95, -+ 0xe6, 0xa5, 0x59, 0x3d, 0x24, 0x1d, 0x8f, 0xb1, -+ 0x74, 0x6c, 0x56, 0xe7, 0x96, 0xc1, 0x91, 0xc8, -+ 0x2d, 0x0e, 0xb7, 0x51, 0x10 -+}; -+static const u8 key54[] __initconst = { -+ 0x00, 0x68, 0x74, 0xdc, 0x30, 0x9e, 0xe3, 0x52, -+ 0xa9, 0xae, 0xb6, 0x7c, 0xa1, 0xdc, 0x12, 0x2d, -+ 0x98, 0x32, 0x7a, 0x77, 0xe1, 0xdd, 0xa3, 0x76, -+ 0x72, 0x34, 0x83, 0xd8, 0xb7, 0x69, 0xba, 0x77 -+}; -+enum { nonce54 = 0xbea57d79b798b63aULL }; -+ -+static const u8 input55[] __initconst = { -+ 0xb5, 0xf4, 0x2f, 0xc1, 0x5e, 0x10, 0xa7, 0x4e, -+ 0x74, 0x3d, 0xa3, 0x96, 0xc0, 0x4d, 0x7b, 0x92, -+ 0x8f, 0xdb, 0x2d, 0x15, 0x52, 0x6a, 0x95, 0x5e, -+ 0x40, 0x81, 0x4f, 0x70, 0x73, 0xea, 0x84, 0x65, -+ 0x3d, 0x9a, 0x4e, 0x03, 0x95, 0xf8, 0x5d, 0x2f, -+ 0x07, 0x02, 0x13, 0x13, 0xdd, 0x82, 0xe6, 0x3b, -+ 0xe1, 0x5f, 0xb3, 0x37, 0x9b, 0x88 -+}; -+static const u8 output55[] __initconst = { -+ 0xc1, 0x88, 0xbd, 0x92, 0x77, 0xad, 0x7c, 0x5f, -+ 0xaf, 0xa8, 0x57, 0x0e, 0x40, 0x0a, 0xdc, 0x70, -+ 0xfb, 0xc6, 0x71, 0xfd, 0xc4, 0x74, 0x60, 0xcc, -+ 0xa0, 0x89, 0x8e, 0x99, 0xf0, 0x06, 0xa6, 0x7c, -+ 0x97, 0x42, 0x21, 0x81, 0x6a, 0x07, 0xe7, 0xb3, -+ 0xf7, 0xa5, 0x03, 0x71, 0x50, 0x05, 0x63, 0x17, -+ 0xa9, 0x46, 0x0b, 0xff, 0x30, 0x78 -+}; -+static const u8 key55[] __initconst = { -+ 0x19, 0x8f, 0xe7, 0xd7, 0x6b, 0x7f, 0x6f, 0x69, -+ 0x86, 0x91, 0x0f, 0xa7, 0x4a, 0x69, 0x8e, 0x34, -+ 0xf3, 0xdb, 0xde, 0xaf, 0xf2, 0x66, 0x1d, 0x64, -+ 0x97, 0x0c, 0xcf, 0xfa, 0x33, 0x84, 0xfd, 0x0c -+}; -+enum { nonce55 = 0x80aa3d3e2c51ef06ULL }; -+ -+static const u8 input56[] __initconst = { -+ 0x6b, 0xe9, 0x73, 0x42, 0x27, 0x5e, 0x12, 0xcd, -+ 0xaa, 0x45, 0x12, 0x8b, 0xb3, 0xe6, 0x54, 0x33, -+ 0x31, 0x7d, 0xe2, 0x25, 0xc6, 0x86, 0x47, 0x67, -+ 0x86, 0x83, 0xe4, 0x46, 0xb5, 0x8f, 0x2c, 0xbb, -+ 0xe4, 0xb8, 0x9f, 0xa2, 0xa4, 0xe8, 0x75, 0x96, -+ 0x92, 0x51, 0x51, 0xac, 0x8e, 0x2e, 0x6f, 0xfc, -+ 0xbd, 0x0d, 0xa3, 0x9f, 0x16, 0x55, 0x3e -+}; -+static const u8 output56[] __initconst = { -+ 0x42, 0x99, 0x73, 0x6c, 0xd9, 0x4b, 0x16, 0xe5, -+ 0x18, 0x63, 0x1a, 0xd9, 0x0e, 0xf1, 0x15, 0x2e, -+ 0x0f, 0x4b, 0xe4, 0x5f, 0xa0, 0x4d, 0xde, 0x9f, -+ 0xa7, 0x18, 0xc1, 0x0c, 0x0b, 0xae, 0x55, 0xe4, -+ 0x89, 0x18, 0xa4, 0x78, 0x9d, 0x25, 0x0d, 0xd5, -+ 0x94, 0x0f, 0xf9, 0x78, 0xa3, 0xa6, 0xe9, 0x9e, -+ 0x2c, 0x73, 0xf0, 0xf7, 0x35, 0xf3, 0x2b -+}; -+static const u8 key56[] __initconst = { -+ 0x7d, 0x12, 0xad, 0x51, 0xd5, 0x6f, 0x8f, 0x96, -+ 0xc0, 0x5d, 0x9a, 0xd1, 0x7e, 0x20, 0x98, 0x0e, -+ 0x3c, 0x0a, 0x67, 0x6b, 0x1b, 0x88, 0x69, 0xd4, -+ 0x07, 0x8c, 0xaf, 0x0f, 0x3a, 0x28, 0xe4, 0x5d -+}; -+enum { nonce56 = 0x70f4c372fb8b5984ULL }; -+ -+static const u8 input57[] __initconst = { -+ 0x28, 0xa3, 0x06, 0xe8, 0xe7, 0x08, 0xb9, 0xef, -+ 0x0d, 0x63, 0x15, 0x99, 0xb2, 0x78, 0x7e, 0xaf, -+ 0x30, 0x50, 0xcf, 0xea, 0xc9, 0x91, 0x41, 0x2f, -+ 0x3b, 0x38, 0x70, 0xc4, 0x87, 0xb0, 0x3a, 0xee, -+ 0x4a, 0xea, 0xe3, 0x83, 0x68, 0x8b, 0xcf, 0xda, -+ 0x04, 0xa5, 0xbd, 0xb2, 0xde, 0x3c, 0x55, 0x13, -+ 0xfe, 0x96, 0xad, 0xc1, 0x61, 0x1b, 0x98, 0xde -+}; -+static const u8 output57[] __initconst = { -+ 0xf4, 0x44, 0xe9, 0xd2, 0x6d, 0xc2, 0x5a, 0xe9, -+ 0xfd, 0x7e, 0x41, 0x54, 0x3f, 0xf4, 0x12, 0xd8, -+ 0x55, 0x0d, 0x12, 0x9b, 0xd5, 0x2e, 0x95, 0xe5, -+ 0x77, 0x42, 0x3f, 0x2c, 0xfb, 0x28, 0x9d, 0x72, -+ 0x6d, 0x89, 0x82, 0x27, 0x64, 0x6f, 0x0d, 0x57, -+ 0xa1, 0x25, 0xa3, 0x6b, 0x88, 0x9a, 0xac, 0x0c, -+ 0x76, 0x19, 0x90, 0xe2, 0x50, 0x5a, 0xf8, 0x12 -+}; -+static const u8 key57[] __initconst = { -+ 0x08, 0x26, 0xb8, 0xac, 0xf3, 0xa5, 0xc6, 0xa3, -+ 0x7f, 0x09, 0x87, 0xf5, 0x6c, 0x5a, 0x85, 0x6c, -+ 0x3d, 0xbd, 0xde, 0xd5, 0x87, 0xa3, 0x98, 0x7a, -+ 0xaa, 0x40, 0x3e, 0xf7, 0xff, 0x44, 0x5d, 0xee -+}; -+enum { nonce57 = 0xc03a6130bf06b089ULL }; -+ -+static const u8 input58[] __initconst = { -+ 0x82, 0xa5, 0x38, 0x6f, 0xaa, 0xb4, 0xaf, 0xb2, -+ 0x42, 0x01, 0xa8, 0x39, 0x3f, 0x15, 0x51, 0xa8, -+ 0x11, 0x1b, 0x93, 0xca, 0x9c, 0xa0, 0x57, 0x68, -+ 0x8f, 0xdb, 0x68, 0x53, 0x51, 0x6d, 0x13, 0x22, -+ 0x12, 0x9b, 0xbd, 0x33, 0xa8, 0x52, 0x40, 0x57, -+ 0x80, 0x9b, 0x98, 0xef, 0x56, 0x70, 0x11, 0xfa, -+ 0x36, 0x69, 0x7d, 0x15, 0x48, 0xf9, 0x3b, 0xeb, -+ 0x42 -+}; -+static const u8 output58[] __initconst = { -+ 0xff, 0x3a, 0x74, 0xc3, 0x3e, 0x44, 0x64, 0x4d, -+ 0x0e, 0x5f, 0x9d, 0xa8, 0xdb, 0xbe, 0x12, 0xef, -+ 0xba, 0x56, 0x65, 0x50, 0x76, 0xaf, 0xa4, 0x4e, -+ 0x01, 0xc1, 0xd3, 0x31, 0x14, 0xe2, 0xbe, 0x7b, -+ 0xa5, 0x67, 0xb4, 0xe3, 0x68, 0x40, 0x9c, 0xb0, -+ 0xb1, 0x78, 0xef, 0x49, 0x03, 0x0f, 0x2d, 0x56, -+ 0xb4, 0x37, 0xdb, 0xbc, 0x2d, 0x68, 0x1c, 0x3c, -+ 0xf1 -+}; -+static const u8 key58[] __initconst = { -+ 0x7e, 0xf1, 0x7c, 0x20, 0x65, 0xed, 0xcd, 0xd7, -+ 0x57, 0xe8, 0xdb, 0x90, 0x87, 0xdb, 0x5f, 0x63, -+ 0x3d, 0xdd, 0xb8, 0x2b, 0x75, 0x8e, 0x04, 0xb5, -+ 0xf4, 0x12, 0x79, 0xa9, 0x4d, 0x42, 0x16, 0x7f -+}; -+enum { nonce58 = 0x92838183f80d2f7fULL }; -+ -+static const u8 input59[] __initconst = { -+ 0x37, 0xf1, 0x9d, 0xdd, 0xd7, 0x08, 0x9f, 0x13, -+ 0xc5, 0x21, 0x82, 0x75, 0x08, 0x9e, 0x25, 0x16, -+ 0xb1, 0xd1, 0x71, 0x42, 0x28, 0x63, 0xac, 0x47, -+ 0x71, 0x54, 0xb1, 0xfc, 0x39, 0xf0, 0x61, 0x4f, -+ 0x7c, 0x6d, 0x4f, 0xc8, 0x33, 0xef, 0x7e, 0xc8, -+ 0xc0, 0x97, 0xfc, 0x1a, 0x61, 0xb4, 0x87, 0x6f, -+ 0xdd, 0x5a, 0x15, 0x7b, 0x1b, 0x95, 0x50, 0x94, -+ 0x1d, 0xba -+}; -+static const u8 output59[] __initconst = { -+ 0x73, 0x67, 0xc5, 0x07, 0xbb, 0x57, 0x79, 0xd5, -+ 0xc9, 0x04, 0xdd, 0x88, 0xf3, 0x86, 0xe5, 0x70, -+ 0x49, 0x31, 0xe0, 0xcc, 0x3b, 0x1d, 0xdf, 0xb0, -+ 0xaf, 0xf4, 0x2d, 0xe0, 0x06, 0x10, 0x91, 0x8d, -+ 0x1c, 0xcf, 0x31, 0x0b, 0xf6, 0x73, 0xda, 0x1c, -+ 0xf0, 0x17, 0x52, 0x9e, 0x20, 0x2e, 0x9f, 0x8c, -+ 0xb3, 0x59, 0xce, 0xd4, 0xd3, 0xc1, 0x81, 0xe9, -+ 0x11, 0x36 -+}; -+static const u8 key59[] __initconst = { -+ 0xbd, 0x07, 0xd0, 0x53, 0x2c, 0xb3, 0xcc, 0x3f, -+ 0xc4, 0x95, 0xfd, 0xe7, 0x81, 0xb3, 0x29, 0x99, -+ 0x05, 0x45, 0xd6, 0x95, 0x25, 0x0b, 0x72, 0xd3, -+ 0xcd, 0xbb, 0x73, 0xf8, 0xfa, 0xc0, 0x9b, 0x7a -+}; -+enum { nonce59 = 0x4a0db819b0d519e2ULL }; -+ -+static const u8 input60[] __initconst = { -+ 0x58, 0x4e, 0xdf, 0x94, 0x3c, 0x76, 0x0a, 0x79, -+ 0x47, 0xf1, 0xbe, 0x88, 0xd3, 0xba, 0x94, 0xd8, -+ 0xe2, 0x8f, 0xe3, 0x2f, 0x2f, 0x74, 0x82, 0x55, -+ 0xc3, 0xda, 0xe2, 0x4e, 0x2c, 0x8c, 0x45, 0x1d, -+ 0x72, 0x8f, 0x54, 0x41, 0xb5, 0xb7, 0x69, 0xe4, -+ 0xdc, 0xd2, 0x36, 0x21, 0x5c, 0x28, 0x52, 0xf7, -+ 0x98, 0x8e, 0x72, 0xa7, 0x6d, 0x57, 0xed, 0xdc, -+ 0x3c, 0xe6, 0x6a -+}; -+static const u8 output60[] __initconst = { -+ 0xda, 0xaf, 0xb5, 0xe3, 0x30, 0x65, 0x5c, 0xb1, -+ 0x48, 0x08, 0x43, 0x7b, 0x9e, 0xd2, 0x6a, 0x62, -+ 0x56, 0x7c, 0xad, 0xd9, 0xe5, 0xf6, 0x09, 0x71, -+ 0xcd, 0xe6, 0x05, 0x6b, 0x3f, 0x44, 0x3a, 0x5c, -+ 0xf6, 0xf8, 0xd7, 0xce, 0x7d, 0xd1, 0xe0, 0x4f, -+ 0x88, 0x15, 0x04, 0xd8, 0x20, 0xf0, 0x3e, 0xef, -+ 0xae, 0xa6, 0x27, 0xa3, 0x0e, 0xfc, 0x18, 0x90, -+ 0x33, 0xcd, 0xd3 -+}; -+static const u8 key60[] __initconst = { -+ 0xbf, 0xfd, 0x25, 0xb5, 0xb2, 0xfc, 0x78, 0x0c, -+ 0x8e, 0xb9, 0x57, 0x2f, 0x26, 0x4a, 0x7e, 0x71, -+ 0xcc, 0xf2, 0xe0, 0xfd, 0x24, 0x11, 0x20, 0x23, -+ 0x57, 0x00, 0xff, 0x80, 0x11, 0x0c, 0x1e, 0xff -+}; -+enum { nonce60 = 0xf18df56fdb7954adULL }; -+ -+static const u8 input61[] __initconst = { -+ 0xb0, 0xf3, 0x06, 0xbc, 0x22, 0xae, 0x49, 0x40, -+ 0xae, 0xff, 0x1b, 0x31, 0xa7, 0x98, 0xab, 0x1d, -+ 0xe7, 0x40, 0x23, 0x18, 0x4f, 0xab, 0x8e, 0x93, -+ 0x82, 0xf4, 0x56, 0x61, 0xfd, 0x2b, 0xcf, 0xa7, -+ 0xc4, 0xb4, 0x0a, 0xf4, 0xcb, 0xc7, 0x8c, 0x40, -+ 0x57, 0xac, 0x0b, 0x3e, 0x2a, 0x0a, 0x67, 0x83, -+ 0x50, 0xbf, 0xec, 0xb0, 0xc7, 0xf1, 0x32, 0x26, -+ 0x98, 0x80, 0x33, 0xb4 -+}; -+static const u8 output61[] __initconst = { -+ 0x9d, 0x23, 0x0e, 0xff, 0xcc, 0x7c, 0xd5, 0xcf, -+ 0x1a, 0xb8, 0x59, 0x1e, 0x92, 0xfd, 0x7f, 0xca, -+ 0xca, 0x3c, 0x18, 0x81, 0xde, 0xfa, 0x59, 0xc8, -+ 0x6f, 0x9c, 0x24, 0x3f, 0x3a, 0xe6, 0x0b, 0xb4, -+ 0x34, 0x48, 0x69, 0xfc, 0xb6, 0xea, 0xb2, 0xde, -+ 0x9f, 0xfd, 0x92, 0x36, 0x18, 0x98, 0x99, 0xaa, -+ 0x65, 0xe2, 0xea, 0xf4, 0xb1, 0x47, 0x8e, 0xb0, -+ 0xe7, 0xd4, 0x7a, 0x2c -+}; -+static const u8 key61[] __initconst = { -+ 0xd7, 0xfd, 0x9b, 0xbd, 0x8f, 0x65, 0x0d, 0x00, -+ 0xca, 0xa1, 0x6c, 0x85, 0x85, 0xa4, 0x6d, 0xf1, -+ 0xb1, 0x68, 0x0c, 0x8b, 0x5d, 0x37, 0x72, 0xd0, -+ 0xd8, 0xd2, 0x25, 0xab, 0x9f, 0x7b, 0x7d, 0x95 -+}; -+enum { nonce61 = 0xd82caf72a9c4864fULL }; -+ -+static const u8 input62[] __initconst = { -+ 0x10, 0x77, 0xf3, 0x2f, 0xc2, 0x50, 0xd6, 0x0c, -+ 0xba, 0xa8, 0x8d, 0xce, 0x0d, 0x58, 0x9e, 0x87, -+ 0xb1, 0x59, 0x66, 0x0a, 0x4a, 0xb3, 0xd8, 0xca, -+ 0x0a, 0x6b, 0xf8, 0xc6, 0x2b, 0x3f, 0x8e, 0x09, -+ 0xe0, 0x0a, 0x15, 0x85, 0xfe, 0xaa, 0xc6, 0xbd, -+ 0x30, 0xef, 0xe4, 0x10, 0x78, 0x03, 0xc1, 0xc7, -+ 0x8a, 0xd9, 0xde, 0x0b, 0x51, 0x07, 0xc4, 0x7b, -+ 0xe2, 0x2e, 0x36, 0x3a, 0xc2 -+}; -+static const u8 output62[] __initconst = { -+ 0xa0, 0x0c, 0xfc, 0xc1, 0xf6, 0xaf, 0xc2, 0xb8, -+ 0x5c, 0xef, 0x6e, 0xf3, 0xce, 0x15, 0x48, 0x05, -+ 0xb5, 0x78, 0x49, 0x51, 0x1f, 0x9d, 0xf4, 0xbf, -+ 0x2f, 0x53, 0xa2, 0xd1, 0x15, 0x20, 0x82, 0x6b, -+ 0xd2, 0x22, 0x6c, 0x4e, 0x14, 0x87, 0xe3, 0xd7, -+ 0x49, 0x45, 0x84, 0xdb, 0x5f, 0x68, 0x60, 0xc4, -+ 0xb3, 0xe6, 0x3f, 0xd1, 0xfc, 0xa5, 0x73, 0xf3, -+ 0xfc, 0xbb, 0xbe, 0xc8, 0x9d -+}; -+static const u8 key62[] __initconst = { -+ 0x6e, 0xc9, 0xaf, 0xce, 0x35, 0xb9, 0x86, 0xd1, -+ 0xce, 0x5f, 0xd9, 0xbb, 0xd5, 0x1f, 0x7c, 0xcd, -+ 0xfe, 0x19, 0xaa, 0x3d, 0xea, 0x64, 0xc1, 0x28, -+ 0x40, 0xba, 0xa1, 0x28, 0xcd, 0x40, 0xb6, 0xf2 -+}; -+enum { nonce62 = 0xa1c0c265f900cde8ULL }; -+ -+static const u8 input63[] __initconst = { -+ 0x7a, 0x70, 0x21, 0x2c, 0xef, 0xa6, 0x36, 0xd4, -+ 0xe0, 0xab, 0x8c, 0x25, 0x73, 0x34, 0xc8, 0x94, -+ 0x6c, 0x81, 0xcb, 0x19, 0x8d, 0x5a, 0x49, 0xaa, -+ 0x6f, 0xba, 0x83, 0x72, 0x02, 0x5e, 0xf5, 0x89, -+ 0xce, 0x79, 0x7e, 0x13, 0x3d, 0x5b, 0x98, 0x60, -+ 0x5d, 0xd9, 0xfb, 0x15, 0x93, 0x4c, 0xf3, 0x51, -+ 0x49, 0x55, 0xd1, 0x58, 0xdd, 0x7e, 0x6d, 0xfe, -+ 0xdd, 0x84, 0x23, 0x05, 0xba, 0xe9 -+}; -+static const u8 output63[] __initconst = { -+ 0x20, 0xb3, 0x5c, 0x03, 0x03, 0x78, 0x17, 0xfc, -+ 0x3b, 0x35, 0x30, 0x9a, 0x00, 0x18, 0xf5, 0xc5, -+ 0x06, 0x53, 0xf5, 0x04, 0x24, 0x9d, 0xd1, 0xb2, -+ 0xac, 0x5a, 0xb6, 0x2a, 0xa5, 0xda, 0x50, 0x00, -+ 0xec, 0xff, 0xa0, 0x7a, 0x14, 0x7b, 0xe4, 0x6b, -+ 0x63, 0xe8, 0x66, 0x86, 0x34, 0xfd, 0x74, 0x44, -+ 0xa2, 0x50, 0x97, 0x0d, 0xdc, 0xc3, 0x84, 0xf8, -+ 0x71, 0x02, 0x31, 0x95, 0xed, 0x54 -+}; -+static const u8 key63[] __initconst = { -+ 0x7d, 0x64, 0xb4, 0x12, 0x81, 0xe4, 0xe6, 0x8f, -+ 0xcc, 0xe7, 0xd1, 0x1f, 0x70, 0x20, 0xfd, 0xb8, -+ 0x3a, 0x7d, 0xa6, 0x53, 0x65, 0x30, 0x5d, 0xe3, -+ 0x1a, 0x44, 0xbe, 0x62, 0xed, 0x90, 0xc4, 0xd1 -+}; -+enum { nonce63 = 0xe8e849596c942276ULL }; -+ -+static const u8 input64[] __initconst = { -+ 0x84, 0xf8, 0xda, 0x87, 0x23, 0x39, 0x60, 0xcf, -+ 0xc5, 0x50, 0x7e, 0xc5, 0x47, 0x29, 0x7c, 0x05, -+ 0xc2, 0xb4, 0xf4, 0xb2, 0xec, 0x5d, 0x48, 0x36, -+ 0xbf, 0xfc, 0x06, 0x8c, 0xf2, 0x0e, 0x88, 0xe7, -+ 0xc9, 0xc5, 0xa4, 0xa2, 0x83, 0x20, 0xa1, 0x6f, -+ 0x37, 0xe5, 0x2d, 0xa1, 0x72, 0xa1, 0x19, 0xef, -+ 0x05, 0x42, 0x08, 0xf2, 0x57, 0x47, 0x31, 0x1e, -+ 0x17, 0x76, 0x13, 0xd3, 0xcc, 0x75, 0x2c -+}; -+static const u8 output64[] __initconst = { -+ 0xcb, 0xec, 0x90, 0x88, 0xeb, 0x31, 0x69, 0x20, -+ 0xa6, 0xdc, 0xff, 0x76, 0x98, 0xb0, 0x24, 0x49, -+ 0x7b, 0x20, 0xd9, 0xd1, 0x1b, 0xe3, 0x61, 0xdc, -+ 0xcf, 0x51, 0xf6, 0x70, 0x72, 0x33, 0x28, 0x94, -+ 0xac, 0x73, 0x18, 0xcf, 0x93, 0xfd, 0xca, 0x08, -+ 0x0d, 0xa2, 0xb9, 0x57, 0x1e, 0x51, 0xb6, 0x07, -+ 0x5c, 0xc1, 0x13, 0x64, 0x1d, 0x18, 0x6f, 0xe6, -+ 0x0b, 0xb7, 0x14, 0x03, 0x43, 0xb6, 0xaf -+}; -+static const u8 key64[] __initconst = { -+ 0xbf, 0x82, 0x65, 0xe4, 0x50, 0xf9, 0x5e, 0xea, -+ 0x28, 0x91, 0xd1, 0xd2, 0x17, 0x7c, 0x13, 0x7e, -+ 0xf5, 0xd5, 0x6b, 0x06, 0x1c, 0x20, 0xc2, 0x82, -+ 0xa1, 0x7a, 0xa2, 0x14, 0xa1, 0xb0, 0x54, 0x58 -+}; -+enum { nonce64 = 0xe57c5095aa5723c9ULL }; -+ -+static const u8 input65[] __initconst = { -+ 0x1c, 0xfb, 0xd3, 0x3f, 0x85, 0xd7, 0xba, 0x7b, -+ 0xae, 0xb1, 0xa5, 0xd2, 0xe5, 0x40, 0xce, 0x4d, -+ 0x3e, 0xab, 0x17, 0x9d, 0x7d, 0x9f, 0x03, 0x98, -+ 0x3f, 0x9f, 0xc8, 0xdd, 0x36, 0x17, 0x43, 0x5c, -+ 0x34, 0xd1, 0x23, 0xe0, 0x77, 0xbf, 0x35, 0x5d, -+ 0x8f, 0xb1, 0xcb, 0x82, 0xbb, 0x39, 0x69, 0xd8, -+ 0x90, 0x45, 0x37, 0xfd, 0x98, 0x25, 0xf7, 0x5b, -+ 0xce, 0x06, 0x43, 0xba, 0x61, 0xa8, 0x47, 0xb9 -+}; -+static const u8 output65[] __initconst = { -+ 0x73, 0xa5, 0x68, 0xab, 0x8b, 0xa5, 0xc3, 0x7e, -+ 0x74, 0xf8, 0x9d, 0xf5, 0x93, 0x6e, 0xf2, 0x71, -+ 0x6d, 0xde, 0x82, 0xc5, 0x40, 0xa0, 0x46, 0xb3, -+ 0x9a, 0x78, 0xa8, 0xf7, 0xdf, 0xb1, 0xc3, 0xdd, -+ 0x8d, 0x90, 0x00, 0x68, 0x21, 0x48, 0xe8, 0xba, -+ 0x56, 0x9f, 0x8f, 0xe7, 0xa4, 0x4d, 0x36, 0x55, -+ 0xd0, 0x34, 0x99, 0xa6, 0x1c, 0x4c, 0xc1, 0xe2, -+ 0x65, 0x98, 0x14, 0x8e, 0x6a, 0x05, 0xb1, 0x2b -+}; -+static const u8 key65[] __initconst = { -+ 0xbd, 0x5c, 0x8a, 0xb0, 0x11, 0x29, 0xf3, 0x00, -+ 0x7a, 0x78, 0x32, 0x63, 0x34, 0x00, 0xe6, 0x7d, -+ 0x30, 0x54, 0xde, 0x37, 0xda, 0xc2, 0xc4, 0x3d, -+ 0x92, 0x6b, 0x4c, 0xc2, 0x92, 0xe9, 0x9e, 0x2a -+}; -+enum { nonce65 = 0xf654a3031de746f2ULL }; -+ -+static const u8 input66[] __initconst = { -+ 0x4b, 0x27, 0x30, 0x8f, 0x28, 0xd8, 0x60, 0x46, -+ 0x39, 0x06, 0x49, 0xea, 0x1b, 0x71, 0x26, 0xe0, -+ 0x99, 0x2b, 0xd4, 0x8f, 0x64, 0x64, 0xcd, 0xac, -+ 0x1d, 0x78, 0x88, 0x90, 0xe1, 0x5c, 0x24, 0x4b, -+ 0xdc, 0x2d, 0xb7, 0xee, 0x3a, 0xe6, 0x86, 0x2c, -+ 0x21, 0xe4, 0x2b, 0xfc, 0xe8, 0x19, 0xca, 0x65, -+ 0xe7, 0xdd, 0x6f, 0x52, 0xb3, 0x11, 0xe1, 0xe2, -+ 0xbf, 0xe8, 0x70, 0xe3, 0x0d, 0x45, 0xb8, 0xa5, -+ 0x20, 0xb7, 0xb5, 0xaf, 0xff, 0x08, 0xcf, 0x23, -+ 0x65, 0xdf, 0x8d, 0xc3, 0x31, 0xf3, 0x1e, 0x6a, -+ 0x58, 0x8d, 0xcc, 0x45, 0x16, 0x86, 0x1f, 0x31, -+ 0x5c, 0x27, 0xcd, 0xc8, 0x6b, 0x19, 0x1e, 0xec, -+ 0x44, 0x75, 0x63, 0x97, 0xfd, 0x79, 0xf6, 0x62, -+ 0xc5, 0xba, 0x17, 0xc7, 0xab, 0x8f, 0xbb, 0xed, -+ 0x85, 0x2a, 0x98, 0x79, 0x21, 0xec, 0x6e, 0x4d, -+ 0xdc, 0xfa, 0x72, 0x52, 0xba, 0xc8, 0x4c -+}; -+static const u8 output66[] __initconst = { -+ 0x76, 0x5b, 0x2c, 0xa7, 0x62, 0xb9, 0x08, 0x4a, -+ 0xc6, 0x4a, 0x92, 0xc3, 0xbb, 0x10, 0xb3, 0xee, -+ 0xff, 0xb9, 0x07, 0xc7, 0x27, 0xcb, 0x1e, 0xcf, -+ 0x58, 0x6f, 0xa1, 0x64, 0xe8, 0xf1, 0x4e, 0xe1, -+ 0xef, 0x18, 0x96, 0xab, 0x97, 0x28, 0xd1, 0x7c, -+ 0x71, 0x6c, 0xd1, 0xe2, 0xfa, 0xd9, 0x75, 0xcb, -+ 0xeb, 0xea, 0x0c, 0x86, 0x82, 0xd8, 0xf4, 0xcc, -+ 0xea, 0xa3, 0x00, 0xfa, 0x82, 0xd2, 0xcd, 0xcb, -+ 0xdb, 0x63, 0x28, 0xe2, 0x82, 0xe9, 0x01, 0xed, -+ 0x31, 0xe6, 0x71, 0x45, 0x08, 0x89, 0x8a, 0x23, -+ 0xa8, 0xb5, 0xc2, 0xe2, 0x9f, 0xe9, 0xb8, 0x9a, -+ 0xc4, 0x79, 0x6d, 0x71, 0x52, 0x61, 0x74, 0x6c, -+ 0x1b, 0xd7, 0x65, 0x6d, 0x03, 0xc4, 0x1a, 0xc0, -+ 0x50, 0xba, 0xd6, 0xc9, 0x43, 0x50, 0xbe, 0x09, -+ 0x09, 0x8a, 0xdb, 0xaa, 0x76, 0x4e, 0x3b, 0x61, -+ 0x3c, 0x7c, 0x44, 0xe7, 0xdb, 0x10, 0xa7 -+}; -+static const u8 key66[] __initconst = { -+ 0x88, 0xdf, 0xca, 0x68, 0xaf, 0x4f, 0xb3, 0xfd, -+ 0x6e, 0xa7, 0x95, 0x35, 0x8a, 0xe8, 0x37, 0xe8, -+ 0xc8, 0x55, 0xa2, 0x2a, 0x6d, 0x77, 0xf8, 0x93, -+ 0x7a, 0x41, 0xf3, 0x7b, 0x95, 0xdf, 0x89, 0xf5 -+}; -+enum { nonce66 = 0x1024b4fdd415cf82ULL }; -+ -+static const u8 input67[] __initconst = { -+ 0xd4, 0x2e, 0xfa, 0x92, 0xe9, 0x29, 0x68, 0xb7, -+ 0x54, 0x2c, 0xf7, 0xa4, 0x2d, 0xb7, 0x50, 0xb5, -+ 0xc5, 0xb2, 0x9d, 0x17, 0x5e, 0x0a, 0xca, 0x37, -+ 0xbf, 0x60, 0xae, 0xd2, 0x98, 0xe9, 0xfa, 0x59, -+ 0x67, 0x62, 0xe6, 0x43, 0x0c, 0x77, 0x80, 0x82, -+ 0x33, 0x61, 0xa3, 0xff, 0xc1, 0xa0, 0x8f, 0x56, -+ 0xbc, 0xec, 0x65, 0x43, 0x88, 0xa5, 0xff, 0x51, -+ 0x64, 0x30, 0xee, 0x34, 0xb7, 0x5c, 0x28, 0x68, -+ 0xc3, 0x52, 0xd2, 0xac, 0x78, 0x2a, 0xa6, 0x10, -+ 0xb8, 0xb2, 0x4c, 0x80, 0x4f, 0x99, 0xb2, 0x36, -+ 0x94, 0x8f, 0x66, 0xcb, 0xa1, 0x91, 0xed, 0x06, -+ 0x42, 0x6d, 0xc1, 0xae, 0x55, 0x93, 0xdd, 0x93, -+ 0x9e, 0x88, 0x34, 0x7f, 0x98, 0xeb, 0xbe, 0x61, -+ 0xf9, 0xa9, 0x0f, 0xd9, 0xc4, 0x87, 0xd5, 0xef, -+ 0xcc, 0x71, 0x8c, 0x0e, 0xce, 0xad, 0x02, 0xcf, -+ 0xa2, 0x61, 0xdf, 0xb1, 0xfe, 0x3b, 0xdc, 0xc0, -+ 0x58, 0xb5, 0x71, 0xa1, 0x83, 0xc9, 0xb4, 0xaf, -+ 0x9d, 0x54, 0x12, 0xcd, 0xea, 0x06, 0xd6, 0x4e, -+ 0xe5, 0x27, 0x0c, 0xc3, 0xbb, 0xa8, 0x0a, 0x81, -+ 0x75, 0xc3, 0xc9, 0xd4, 0x35, 0x3e, 0x53, 0x9f, -+ 0xaa, 0x20, 0xc0, 0x68, 0x39, 0x2c, 0x96, 0x39, -+ 0x53, 0x81, 0xda, 0x07, 0x0f, 0x44, 0xa5, 0x47, -+ 0x0e, 0xb3, 0x87, 0x0d, 0x1b, 0xc1, 0xe5, 0x41, -+ 0x35, 0x12, 0x58, 0x96, 0x69, 0x8a, 0x1a, 0xa3, -+ 0x9d, 0x3d, 0xd4, 0xb1, 0x8e, 0x1f, 0x96, 0x87, -+ 0xda, 0xd3, 0x19, 0xe2, 0xb1, 0x3a, 0x19, 0x74, -+ 0xa0, 0x00, 0x9f, 0x4d, 0xbc, 0xcb, 0x0c, 0xe9, -+ 0xec, 0x10, 0xdf, 0x2a, 0x88, 0xdc, 0x30, 0x51, -+ 0x46, 0x56, 0x53, 0x98, 0x6a, 0x26, 0x14, 0x05, -+ 0x54, 0x81, 0x55, 0x0b, 0x3c, 0x85, 0xdd, 0x33, -+ 0x81, 0x11, 0x29, 0x82, 0x46, 0x35, 0xe1, 0xdb, -+ 0x59, 0x7b -+}; -+static const u8 output67[] __initconst = { -+ 0x64, 0x6c, 0xda, 0x7f, 0xd4, 0xa9, 0x2a, 0x5e, -+ 0x22, 0xae, 0x8d, 0x67, 0xdb, 0xee, 0xfd, 0xd0, -+ 0x44, 0x80, 0x17, 0xb2, 0xe3, 0x87, 0xad, 0x57, -+ 0x15, 0xcb, 0x88, 0x64, 0xc0, 0xf1, 0x49, 0x3d, -+ 0xfa, 0xbe, 0xa8, 0x9f, 0x12, 0xc3, 0x57, 0x56, -+ 0x70, 0xa5, 0xc5, 0x6b, 0xf1, 0xab, 0xd5, 0xde, -+ 0x77, 0x92, 0x6a, 0x56, 0x03, 0xf5, 0x21, 0x0d, -+ 0xb6, 0xc4, 0xcc, 0x62, 0x44, 0x3f, 0xb1, 0xc1, -+ 0x61, 0x41, 0x90, 0xb2, 0xd5, 0xb8, 0xf3, 0x57, -+ 0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 0x64, 0x7d, -+ 0x78, 0x40 -+}; -+static const u8 key67[] __initconst = { -+ 0xa9, 0x20, 0x75, 0x89, 0x7e, 0x37, 0x85, 0x48, -+ 0xa3, 0xfb, 0x7b, 0xe8, 0x30, 0xa7, 0xe3, 0x6e, -+ 0xa6, 0xc1, 0x71, 0x17, 0xc1, 0x6c, 0x9b, 0xc2, -+ 0xde, 0xf0, 0xa7, 0x19, 0xec, 0xce, 0xc6, 0x53 -+}; -+enum { nonce67 = 0x4adc4d1f968c8a10ULL }; -+ -+static const u8 input68[] __initconst = { -+ 0x99, 0xae, 0x72, 0xfb, 0x16, 0xe1, 0xf1, 0x59, -+ 0x43, 0x15, 0x4e, 0x33, 0xa0, 0x95, 0xe7, 0x6c, -+ 0x74, 0x24, 0x31, 0xca, 0x3b, 0x2e, 0xeb, 0xd7, -+ 0x11, 0xd8, 0xe0, 0x56, 0x92, 0x91, 0x61, 0x57, -+ 0xe2, 0x82, 0x9f, 0x8f, 0x37, 0xf5, 0x3d, 0x24, -+ 0x92, 0x9d, 0x87, 0x00, 0x8d, 0x89, 0xe0, 0x25, -+ 0x8b, 0xe4, 0x20, 0x5b, 0x8a, 0x26, 0x2c, 0x61, -+ 0x78, 0xb0, 0xa6, 0x3e, 0x82, 0x18, 0xcf, 0xdc, -+ 0x2d, 0x24, 0xdd, 0x81, 0x42, 0xc4, 0x95, 0xf0, -+ 0x48, 0x60, 0x71, 0xe3, 0xe3, 0xac, 0xec, 0xbe, -+ 0x98, 0x6b, 0x0c, 0xb5, 0x6a, 0xa9, 0xc8, 0x79, -+ 0x23, 0x2e, 0x38, 0x0b, 0x72, 0x88, 0x8c, 0xe7, -+ 0x71, 0x8b, 0x36, 0xe3, 0x58, 0x3d, 0x9c, 0xa0, -+ 0xa2, 0xea, 0xcf, 0x0c, 0x6a, 0x6c, 0x64, 0xdf, -+ 0x97, 0x21, 0x8f, 0x93, 0xfb, 0xba, 0xf3, 0x5a, -+ 0xd7, 0x8f, 0xa6, 0x37, 0x15, 0x50, 0x43, 0x02, -+ 0x46, 0x7f, 0x93, 0x46, 0x86, 0x31, 0xe2, 0xaa, -+ 0x24, 0xa8, 0x26, 0xae, 0xe6, 0xc0, 0x05, 0x73, -+ 0x0b, 0x4f, 0x7e, 0xed, 0x65, 0xeb, 0x56, 0x1e, -+ 0xb6, 0xb3, 0x0b, 0xc3, 0x0e, 0x31, 0x95, 0xa9, -+ 0x18, 0x4d, 0xaf, 0x38, 0xd7, 0xec, 0xc6, 0x44, -+ 0x72, 0x77, 0x4e, 0x25, 0x4b, 0x25, 0xdd, 0x1e, -+ 0x8c, 0xa2, 0xdf, 0xf6, 0x2a, 0x97, 0x1a, 0x88, -+ 0x2c, 0x8a, 0x5d, 0xfe, 0xe8, 0xfb, 0x35, 0xe8, -+ 0x0f, 0x2b, 0x7a, 0x18, 0x69, 0x43, 0x31, 0x1d, -+ 0x38, 0x6a, 0x62, 0x95, 0x0f, 0x20, 0x4b, 0xbb, -+ 0x97, 0x3c, 0xe0, 0x64, 0x2f, 0x52, 0xc9, 0x2d, -+ 0x4d, 0x9d, 0x54, 0x04, 0x3d, 0xc9, 0xea, 0xeb, -+ 0xd0, 0x86, 0x52, 0xff, 0x42, 0xe1, 0x0d, 0x7a, -+ 0xad, 0x88, 0xf9, 0x9b, 0x1e, 0x5e, 0x12, 0x27, -+ 0x95, 0x3e, 0x0c, 0x2c, 0x13, 0x00, 0x6f, 0x8e, -+ 0x93, 0x69, 0x0e, 0x01, 0x8c, 0xc1, 0xfd, 0xb3 -+}; -+static const u8 output68[] __initconst = { -+ 0x26, 0x3e, 0xf2, 0xb1, 0xf5, 0xef, 0x81, 0xa4, -+ 0xb7, 0x42, 0xd4, 0x26, 0x18, 0x4b, 0xdd, 0x6a, -+ 0x47, 0x15, 0xcb, 0x0e, 0x57, 0xdb, 0xa7, 0x29, -+ 0x7e, 0x7b, 0x3f, 0x47, 0x89, 0x57, 0xab, 0xea, -+ 0x14, 0x7b, 0xcf, 0x37, 0xdb, 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xbc, 0x7d, 0xa4, 0x26, 0x4b, 0x7b, 0xab, -+ 0xd6, 0x67, 0x22, 0xff, 0x03, 0x92, 0xb6, 0xd4, -+ 0x96, 0x94, 0x5a, 0xe5, 0x02, 0x35, 0x77, 0xfa, -+ 0x3f, 0x54, 0x1d, 0xdd, 0x35, 0x39, 0xfe, 0x03, -+ 0xdd, 0x8e, 0x3c, 0x8c, 0xc2, 0x69, 0x2a, 0xb1, -+ 0xb7, 0xb3, 0xa1, 0x89, 0x84, 0xea, 0x16, 0xe2 -+}; -+static const u8 key68[] __initconst = { -+ 0xd2, 0x49, 0x7f, 0xd7, 0x49, 0x66, 0x0d, 0xb3, -+ 0x5a, 0x7e, 0x3c, 0xfc, 0x37, 0x83, 0x0e, 0xf7, -+ 0x96, 0xd8, 0xd6, 0x33, 0x79, 0x2b, 0x84, 0x53, -+ 0x06, 0xbc, 0x6c, 0x0a, 0x55, 0x84, 0xfe, 0xab -+}; -+enum { nonce68 = 0x6a6df7ff0a20de06ULL }; -+ -+static const u8 input69[] __initconst = { -+ 0xf9, 0x18, 0x4c, 0xd2, 0x3f, 0xf7, 0x22, 0xd9, -+ 0x58, 0xb6, 0x3b, 0x38, 0x69, 0x79, 0xf4, 0x71, -+ 0x5f, 0x38, 0x52, 0x1f, 0x17, 0x6f, 0x6f, 0xd9, -+ 0x09, 0x2b, 0xfb, 0x67, 0xdc, 0xc9, 0xe8, 0x4a, -+ 0x70, 0x9f, 0x2e, 0x3c, 0x06, 0xe5, 0x12, 0x20, -+ 0x25, 0x29, 0xd0, 0xdc, 0x81, 0xc5, 0xc6, 0x0f, -+ 0xd2, 0xa8, 0x81, 0x15, 0x98, 0xb2, 0x71, 0x5a, -+ 0x9a, 0xe9, 0xfb, 0xaf, 0x0e, 0x5f, 0x8a, 0xf3, -+ 0x16, 0x4a, 0x47, 0xf2, 0x5c, 0xbf, 0xda, 0x52, -+ 0x9a, 0xa6, 0x36, 0xfd, 0xc6, 0xf7, 0x66, 0x00, -+ 0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49, 0x1c, 0x72, 0x18, 0x01, -+ 0x62, 0x92, 0x0f, 0x3e, 0xd1, 0x57, 0x5e, 0x20, -+ 0x7b, 0xfb, 0x4d, 0x3c, 0xc5, 0x35, 0x43, 0x2f, -+ 0xb0, 0xc5, 0x7c, 0xe4, 0xa2, 0x84, 0x13, 0x77 -+}; -+static const u8 output69[] __initconst = { -+ 0xbb, 0x4a, 0x7f, 0x7c, 0xd5, 0x2f, 0x89, 0x06, -+ 0xec, 0x20, 0xf1, 0x9a, 0x11, 0x09, 0x14, 0x2e, -+ 0x17, 0x50, 0xf9, 0xd5, 0xf5, 0x48, 0x7c, 0x7a, -+ 0x55, 0xc0, 0x57, 0x03, 0xe3, 0xc4, 0xb2, 0xb7, -+ 0x18, 0x47, 0x95, 0xde, 0xaf, 0x80, 0x06, 0x3c, -+ 0x5a, 0xf2, 0xc3, 0x53, 0xe3, 0x29, 0x92, 0xf8, -+ 0xff, 0x64, 0x85, 0xb9, 0xf7, 0xd3, 0x80, 0xd2, -+ 0x0c, 0x5d, 0x7b, 0x57, 0x0c, 0x51, 0x79, 0x86, -+ 0xf3, 0x20, 0xd2, 0xb8, 0x6e, 0x0c, 0x5a, 0xce, -+ 0xeb, 0x88, 0x02, 0x8b, 0x82, 0x1b, 0x7f, 0xf5, -+ 0xde, 0x7f, 0x48, 0x48, 0xdf, 0xa0, 0x55, 0xc6, -+ 0x0c, 0x22, 0xa1, 0x80, 0x8d, 0x3b, 0xcb, 0x40, -+ 0x2d, 0x3d, 0x0b, 0xf2, 0xe0, 0x22, 0x13, 0x99, -+ 0xe1, 0xa7, 0x27, 0x68, 0x31, 0xe1, 0x24, 0x5d, -+ 0xd2, 0xee, 0x16, 0xc1, 0xd7, 0xa8, 0x14, 0x19, -+ 0x23, 0x72, 0x67, 0x27, 0xdc, 0x5e, 0xb9, 0xc7, -+ 0xd8, 0xe3, 0x55, 0x50, 0x40, 0x98, 0x7b, 0xe7, -+ 0x34, 0x1c, 0x3b, 0x18, 0x14, 0xd8, 0x62, 0xc1, -+ 0x93, 0x84, 0xf3, 0x5b, 0xdd, 0x9e, 0x1f, 0x3b, -+ 0x0b, 0xbc, 0x4e, 0x5b, 0x79, 0xa3, 0xca, 0x74, -+ 0x2a, 0x98, 0xe8, 0x04, 0x39, 0xef, 0xc6, 0x76, -+ 0x6d, 0xee, 0x9f, 0x67, 0x5b, 0x59, 0x3a, 0xe5, -+ 0xf2, 0x3b, 0xca, 0x89, 0xe8, 0x9b, 0x03, 0x3d, -+ 0x11, 0xd2, 0x4a, 0x70, 0xaf, 0x88, 0xb0, 0x94, -+ 0x96, 0x26, 0xab, 0x3c, 0xc1, 0xb8, 0xe4, 0xe7, -+ 0x14, 0x61, 0x64, 0x3a, 0x61, 0x08, 0x0f, 0xa9, -+ 0xce, 0x64, 0xb2, 0x40, 0xf8, 0x20, 0x3a, 0xa9, -+ 0x31, 0xbd, 0x7e, 0x16, 0xca, 0xf5, 0x62, 0x0f, -+ 0x91, 0x9f, 0x8e, 0x1d, 0xa4, 0x77, 0xf3, 0x87, -+ 0x61, 0xe8, 0x14, 0xde, 0x18, 0x68, 0x4e, 0x9d, -+ 0x73, 0xcd, 0x8a, 0xe4, 0x80, 0x84, 0x23, 0xaa, -+ 0x9d, 0x64, 0x1c, 0x80, 0x41, 0xca, 0x82, 0x40, -+ 0x94, 0x55, 0xe3, 0x28, 0xa1, 0x97, 0x71, 0xba, -+ 0xf2, 0x2c, 0x39, 0x62, 0x29, 0x56, 0xd0, 0xff, -+ 0xb2, 0x82, 0x20, 0x59, 0x1f, 0xc3, 0x64, 0x57 -+}; -+static const u8 key69[] __initconst = { -+ 0x19, 0x09, 0xe9, 0x7c, 0xd9, 0x02, 0x4a, 0x0c, -+ 0x52, 0x25, 0xad, 0x5c, 0x2e, 0x8d, 0x86, 0x10, -+ 0x85, 0x2b, 0xba, 0xa4, 0x44, 0x5b, 0x39, 0x3e, -+ 0x18, 0xaa, 0xce, 0x0e, 0xe2, 0x69, 0x3c, 0xcf -+}; -+enum { nonce69 = 0xdb925a1948f0f060ULL }; -+ -+static const u8 input70[] __initconst = { -+ 0x10, 0xe7, 0x83, 0xcf, 0x42, 0x9f, 0xf2, 0x41, -+ 0xc7, 0xe4, 0xdb, 0xf9, 0xa3, 0x02, 0x1d, 0x8d, -+ 0x50, 0x81, 0x2c, 0x6b, 0x92, 0xe0, 0x4e, 0xea, -+ 0x26, 0x83, 0x2a, 0xd0, 0x31, 0xf1, 0x23, 0xf3, -+ 0x0e, 0x88, 0x14, 0x31, 0xf9, 0x01, 0x63, 0x59, -+ 0x21, 0xd1, 0x8b, 0xdd, 0x06, 0xd0, 0xc6, 0xab, -+ 0x91, 0x71, 0x82, 0x4d, 0xd4, 0x62, 0x37, 0x17, -+ 0xf9, 0x50, 0xf9, 0xb5, 0x74, 0xce, 0x39, 0x80, -+ 0x80, 0x78, 0xf8, 0xdc, 0x1c, 0xdb, 0x7c, 0x3d, -+ 0xd4, 0x86, 0x31, 0x00, 0x75, 0x7b, 0xd1, 0x42, -+ 0x9f, 0x1b, 0x97, 0x88, 0x0e, 0x14, 0x0e, 0x1e, -+ 0x7d, 0x7b, 0xc4, 0xd2, 0xf3, 0xc1, 0x6d, 0x17, -+ 0x5d, 0xc4, 0x75, 0x54, 0x0f, 0x38, 0x65, 0x89, -+ 0xd8, 0x7d, 0xab, 0xc9, 0xa7, 0x0a, 0x21, 0x0b, -+ 0x37, 0x12, 0x05, 0x07, 0xb5, 0x68, 0x32, 0x32, -+ 0xb9, 0xf8, 0x97, 0x17, 0x03, 0xed, 0x51, 0x8f, -+ 0x3d, 0x5a, 0xd0, 0x12, 0x01, 0x6e, 0x2e, 0x91, -+ 0x1c, 0xbe, 0x6b, 0xa3, 0xcc, 0x75, 0x62, 0x06, -+ 0x8e, 0x65, 0xbb, 0xe2, 0x29, 0x71, 0x4b, 0x89, -+ 0x6a, 0x9d, 0x85, 0x8c, 0x8c, 0xdf, 0x94, 0x95, -+ 0x23, 0x66, 0xf8, 0x92, 0xee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static const u8 output70[] __initconst = { -+ 0x0f, 0x93, 0x2a, 0x20, 0xb3, 0x87, 0x2d, 0xce, -+ 0xd1, 0x3b, 0x30, 0xfd, 0x06, 0x6d, 0x0a, 0xaa, -+ 0x3e, 0xc4, 0x29, 0x02, 0x8a, 0xde, 0xa6, 0x4b, -+ 0x45, 0x1b, 0x4f, 0x25, 0x59, 0xd5, 0x56, 0x6a, -+ 0x3b, 0x37, 0xbd, 0x3e, 0x47, 0x12, 0x2c, 0x4e, -+ 0x60, 0x5f, 0x05, 0x75, 0x61, 0x23, 0x05, 0x74, -+ 0xcb, 0xfc, 0x5a, 0xb3, 0xac, 0x5c, 0x3d, 0xab, -+ 0x52, 0x5f, 0x05, 0xbc, 0x57, 0xc0, 0x7e, 0xcf, -+ 0x34, 0x5d, 0x7f, 0x41, 0xa3, 0x17, 0x78, 0xd5, -+ 0x9f, 0xec, 0x0f, 0x1e, 0xf9, 0xfe, 0xa3, 0xbd, -+ 0x28, 0xb0, 0xba, 0x4d, 0x84, 0xdb, 0xae, 0x8f, -+ 0x1d, 0x98, 0xb7, 0xdc, 0xf9, 0xad, 0x55, 0x9c, -+ 0x89, 0xfe, 0x9b, 0x9c, 0xa9, 0x89, 0xf6, 0x97, -+ 0x9c, 0x3f, 0x09, 0x3e, 0xc6, 0x02, 0xc2, 0x55, -+ 0x58, 0x09, 0x54, 0x66, 0xe4, 0x36, 0x81, 0x35, -+ 0xca, 0x88, 0x17, 0x89, 0x80, 0x24, 0x2b, 0x21, -+ 0x89, 0xee, 0x45, 0x5a, 0xe7, 0x1f, 0xd5, 0xa5, -+ 0x16, 0xa4, 0xda, 0x70, 0x7e, 0xe9, 0x4f, 0x24, -+ 0x61, 0x97, 0xab, 0xa0, 0xe0, 0xe7, 0xb8, 0x5c, -+ 0x0f, 0x25, 0x17, 0x37, 0x75, 0x12, 0xb5, 0x40, -+ 0xde, 0x1c, 0x0d, 0x8a, 0x77, 0x62, 0x3c, 0x86, -+ 0xd9, 0x70, 0x2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+ 0x3b, 0x5b, 0x59, 0x36, 0x44, 0xd1, 0xba, 0x71, -+ 0x55, 0x87, 0x4d, 0x62, 0x3d, 0xc2, 0xfc, 0xaa, -+ 0x3f, 0x4e, 0x1a, 0xe4, 0xca, 0x09, 0xfc, 0x6a, -+ 0xb2, 0xd6, 0x5d, 0x79, 0xf9, 0x1a, 0x91, 0xa7 -+}; -+enum { nonce70 = 0x3fd6786dd147a85ULL }; -+ -+static const u8 input71[] __initconst = { -+ 0x18, 0x78, 0xd6, 0x79, 0xe4, 0x9a, 0x6c, 0x73, -+ 0x17, 0xd4, 0x05, 0x0f, 0x1e, 0x9f, 0xd9, 0x2b, -+ 0x86, 0x48, 0x7d, 0xf4, 0xd9, 0x1c, 0x76, 0xfc, -+ 0x8e, 0x22, 0x34, 0xe1, 0x48, 0x4a, 0x8d, 0x79, -+ 0xb7, 0xbb, 0x88, 0xab, 0x90, 0xde, 0xc5, 0xb4, -+ 0xb4, 0xe7, 0x85, 0x49, 0xda, 0x57, 0xeb, 0xc9, -+ 0xcd, 0x21, 0xfc, 0x45, 0x6e, 0x32, 0x67, 0xf2, -+ 0x4f, 0xa6, 0x54, 0xe5, 0x20, 0xed, 0xcf, 0xc6, -+ 0x62, 0x25, 0x8e, 0x00, 0xf8, 0x6b, 0xa2, 0x80, -+ 0xac, 0x88, 0xa6, 0x59, 0x27, 0x83, 0x95, 0x11, -+ 0x3f, 0x70, 0x5e, 0x3f, 0x11, 0xfb, 0x26, 0xbf, -+ 0xe1, 0x48, 0x75, 0xf9, 0x86, 0xbf, 0xa6, 0x5d, -+ 0x15, 0x61, 0x66, 0xbf, 0x78, 0x8f, 0x6b, 0x9b, -+ 0xda, 0x98, 0xb7, 0x19, 0xe2, 0xf2, 0xa3, 0x9c, -+ 0x7c, 0x6a, 0x9a, 0xd8, 0x3d, 0x4c, 0x2c, 0xe1, -+ 0x09, 0xb4, 0x28, 0x82, 0x4e, 0xab, 0x0c, 0x75, -+ 0x63, 0xeb, 0xbc, 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d5, -+ 0x31, 0xd7, 0xcf, 0xa0, 0x39, 0xc6, 0x2e, 0xfc, -+ 0xa6, 0xa3, 0xd3, 0x0f, 0xa4, 0x28, 0xac, 0xb2, -+ 0xf4, 0x48, 0x8d, 0x50, 0xa5, 0x1c, 0x44, 0x5d, -+ 0x6e, 0x38, 0xb7, 0x2b, 0x8a, 0x45, 0xa7, 0x3d -+}; -+static const u8 key71[] __initconst = { -+ 0x8b, 0x68, 0xc4, 0xb7, 0x0d, 0x81, 0xef, 0x52, -+ 0x1e, 0x05, 0x96, 0x72, 0x62, 0x89, 0x27, 0x83, -+ 0xd0, 0xc7, 0x33, 0x6d, 0xf2, 0xcc, 0x69, 0xf9, -+ 0x23, 0xae, 0x99, 0xb1, 0xd1, 0x05, 0x4e, 0x54 -+}; -+enum { nonce71 = 0x983f03656d64b5f6ULL }; -+ -+static const u8 input72[] __initconst = { -+ 0x6b, 0x09, 0xc9, 0x57, 0x3d, 0x79, 0x04, 0x8c, -+ 0x65, 0xad, 0x4a, 0x0f, 0xa1, 0x31, 0x3a, 0xdd, -+ 0x14, 0x8e, 0xe8, 0xfe, 0xbf, 0x42, 0x87, 0x98, -+ 0x2e, 0x8d, 0x83, 0xa3, 0xf8, 0x55, 0x3d, 0x84, -+ 0x1e, 0x0e, 0x05, 0x4a, 0x38, 0x9e, 0xe7, 0xfe, -+ 0xd0, 0x4d, 0x79, 0x74, 0x3a, 0x0b, 0x9b, 0xe1, -+ 0xfd, 0x51, 0x84, 0x4e, 0xb2, 0x25, 0xe4, 0x64, -+ 0x4c, 0xda, 0xcf, 0x46, 0xec, 0xba, 0x12, 0xeb, -+ 0x5a, 0x33, 0x09, 0x6e, 0x78, 0x77, 0x8f, 0x30, -+ 0xb1, 0x7d, 0x3f, 0x60, 0x8c, 0xf2, 0x1d, 0x8e, -+ 0xb4, 0x70, 0xa2, 0x90, 0x7c, 0x79, 0x1a, 0x2c, -+ 0xf6, 0x28, 0x79, 0x7c, 0x53, 0xc5, 0xfa,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xfc, 0x2a, -+ 0x29, 0xe6, 0xe3, 0x9d, 0xd0, 0xef, 0xc2, 0xd6, -+ 0x9c, 0x4a, 0x62, 0xac, 0xcb, 0xea, 0x8b, 0xc3, -+ 0x08, 0x6e, 0x49, 0x09, 0x26, 0x19, 0xc1, 0x30, -+ 0xcc, 0x27, 0xaa, 0xc6, 0x45, 0x88, 0xbd, 0xae, -+ 0xd6, 0x79, 0xff, 0x4e, 0xfc, 0x66, 0x4d, 0x02, -+ 0xa5, 0xee, 0x8e, 0xa5, 0xb6, 0x15, 0x72, 0x24, -+ 0xb1, 0xbf, 0xbf, 0x64, 0xcf, 0xcc, 0x93, 0xe9, -+ 0xb6, 0xfd, 0xb4, 0xb6, 0x21, 0xb5, 0x48, 0x08, -+ 0x0f, 0x11, 0x65, 0xe1, 0x47, 0xee, 0x93, 0x29, -+ 0xad -+}; -+static const u8 key72[] __initconst = { -+ 0xb9, 0xa2, 0xfc, 0x59, 0x06, 0x3f, 0x77, 0xa5, -+ 0x66, 0xd0, 0x2b, 0x22, 0x74, 0x22, 0x4c, 0x1e, -+ 0x6a, 0x39, 0xdf, 0xe1, 0x0d, 0x4c, 0x64, 0x99, -+ 0x54, 0x8a, 0xba, 0x1d, 0x2c, 0x21, 0x5f, 0xc3 -+}; -+enum { nonce72 = 0x3d069308fa3db04bULL }; -+ -+static const u8 input73[] __initconst = { -+ 0xe4, 0xdd, 0x36, 0xd4, 0xf5, 0x70, 0x51, 0x73, -+ 0x97, 0x1d, 0x45, 0x05, 0x92, 0xe7, 0xeb, 0xb7, -+ 0x09, 0x82, 0x6e, 0x25, 0x6c, 0x50, 0xf5, 0x40, -+ 0x19, 0xba, 0xbc, 0xf4, 0x39, 0x14, 0xc5, 0x15, -+ 0x83, 0x40, 0xbd, 0x26, 0xe0, 0xff, 0x3b, 0x22, -+ 0x7c, 0x7c, 0xd7, 0x0b, 0xe9, 0x25, 0x0c, 0x3d, -+ 0x92, 0x38, 0xbe, 0xe4, 0x22, 0x75, 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, 0x0a, 0xf4, -+ 0x4b, 0xf1, 0xec, 0x1a, 0xaf, 0x50, 0x5d, 0x16, -+ 0x13, 0x69, 0x2e, 0xbd, 0x0d, 0xe6, 0xf0, 0xb2, -+ 0xed, 0xb4, 0x4c, 0x59, 0x77, 0x37, 0x00, 0x0b, -+ 0xc7, 0xa7, 0x9e, 0x37, 0xf3, 0x60, 0x70, 0xef, -+ 0xf3, 0xc1, 0x74, 0x52, 0x87, 0xc6, 0xa1, 0x81, -+ 0xbd, 0x0a, 0x2c, 0x5d, 0x2c, 0x0c, 0x6a, 0x81, -+ 0xa1, 0xfe, 0x26, 0x78, 0x6c, 0x03, 0x06, 0x07, -+ 0x34, 0xaa, 0xd1, 0x1b, 0x40, 0x03, 0x39, 0x56, -+ 0xcf, 0x2a, 0x92, 0xc1, 0x4e, 0xdf, 0x29, 0x24, -+ 0x83, 0x22, 0x7a, 0xea, 0x67, 0x1e, 0xe7, 0x54, -+ 0x64, 0xd3, 0xbd, 0x3a, 0x5d, 0xae, 0xca, 0xf0, -+ 0x9c, 0xd6, 0x5a, 0x9a, 0x62, 0xc8, 0xc7, 0x83, -+ 0xf9, 0x89, 0xde, 0x2d, 0x53, 0x64, 0x61, 0xf7, -+ 0xa3, 0xa7, 0x31, 0x38, 0xc6, 0x22, 0x9c, 0xb4, -+ 0x87, 0xe0 -+}; -+static const u8 output73[] __initconst = { -+ 0x34, 0xed, 0x05, 0xb0, 0x14, 0xbc, 0x8c, 0xcc, -+ 0x95, 0xbd, 0x99, 0x0f, 0xb1, 0x98, 0x17, 0x10, -+ 0xae, 0xe0, 0x08, 0x53, 0xa3, 0x69, 0xd2, 0xed, -+ 0x66, 0xdb, 0x2a, 0x34, 0x8d, 0x0c, 0x6e, 0xce, -+ 0x63, 0x69, 0xc9, 0xe4, 0x57, 0xc3, 0x0c, 0x8b, -+ 0xa6, 0x2c, 0xa7, 0xd2, 0x08, 0xff, 0x4f, 0xec, -+ 0x61, 0x8c, 0xee, 0x0d, 0xf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, 0x4f, 0xaa, -+ 0xb6, 0x90, 0x0b, 0x1c, 0x2c, 0xd9, 0x9a, 0x10, -+ 0x18, 0xf9, 0x49, 0x41, 0x42, 0x1b, 0xb5, 0xe1, -+ 0x26, 0xac, 0x2d, 0x38, 0x00, 0x00, 0xe4, 0xb4, -+ 0x50, 0x6f, 0x14, 0x18, 0xd6, 0x3d, 0x00, 0x59, -+ 0x3c, 0x45, 0xf3, 0x42, 0x13, 0x44, 0xb8, 0x57, -+ 0xd4, 0x43, 0x5c, 0x8a, 0x2a, 0xb4, 0xfc, 0x0a, -+ 0x25, 0x5a, 0xdc, 0x8f, 0x11, 0x0b, 0x11, 0x44, -+ 0xc7, 0x0e, 0x54, 0x8b, 0x22, 0x01, 0x7e, 0x67, -+ 0x2e, 0x15, 0x3a, 0xb9, 0xee, 0x84, 0x10, 0xd4, -+ 0x80, 0x57, 0xd7, 0x75, 0xcf, 0x8b, 0xcb, 0x03, -+ 0xc9, 0x92, 0x2b, 0x69, 0xd8, 0x5a, 0x9b, 0x06, -+ 0x85, 0x47, 0xaa, 0x4c, 0x28, 0xde, 0x49, 0x58, -+ 0xe6, 0x11, 0x1e, 0x5e, 0x64, 0x8e, 0x3b, 0xe0, -+ 0x40, 0x2e, 0xac, 0x96, 0x97, 0x15, 0x37, 0x1e, -+ 0x30, 0xdd -+}; -+static const u8 key73[] __initconst = { -+ 0x96, 0x06, 0x1e, 0xc1, 0x6d, 0xba, 0x49, 0x5b, -+ 0x65, 0x80, 0x79, 0xdd, 0xf3, 0x67, 0xa8, 0x6e, -+ 0x2d, 0x9c, 0x54, 0x46, 0xd8, 0x4a, 0xeb, 0x7e, -+ 0x23, 0x86, 0x51, 0xd8, 0x49, 0x49, 0x56, 0xe0 -+}; -+enum { nonce73 = 0xbefb83cb67e11ffdULL }; -+ -+static const u8 input74[] __initconst = { -+ 0x47, 0x22, 0x70, 0xe5, 0x2f, 0x41, 0x18, 0x45, -+ 0x07, 0xd3, 0x6d, 0x32, 0x0d,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x3f, 0x9d, 0x03, 0x1f, 0xe1, -+ 0x49, 0x43, 0x3c, 0x83, 0x81, 0x37, 0xf8, 0xa2, -+ 0x0b, 0xf9, 0x61, 0x1c, 0xc1, 0xdb, 0x79, 0xbc, -+ 0x64, 0xce, 0x06, 0x4e, 0x87, 0x89, 0x62, 0x73, -+ 0x51, 0xbc, 0xa4, 0x32, 0xd4, 0x18, 0x62, 0xab, -+ 0x65, 0x7e, 0xad, 0x1e, 0x91, 0xa3, 0xfa, 0x2d, -+ 0x58, 0x9e, 0x2a, 0xe9, 0x74, 0x44, 0x64, 0x11, -+ 0xe6, 0xb6, 0xb3, 0x00, 0x7e, 0xa3, 0x16, 0xef, -+ 0x72 -+}; -+static const u8 output74[] __initconst = { -+ 0xf5, 0xca, 0x45, 0x65, 0x50, 0x35, 0x47, 0x67, -+ 0x6f, 0x4f, 0x67, 0xff, 0x34, 0xd9, 0xc3, 0x37, -+ 0x2a, 0x26, 0xb0, 0x4f, 0x08, 0x1e, 0x45, 0x13, -+ 0xc7, 0x2c, 0x14, 0x75, 0x33, 0xd8, 0x8e, 0x1e, -+ 0x1b, 0x11, 0x0d, 0x97, 0x04, 0x33, 0x8a, 0xe4, -+ 0xd8, 0x8d, 0x0e, 0x12, 0x8d, 0xdb, 0x6e, 0x02, -+ 0xfa, 0xe5, 0xbd, 0x3a, 0xb5, 0x28, 0x07, 0x7d, -+ 0x20, 0xf0, 0x12, 0x64, 0x83, 0x2f, 0x59, 0x79, -+ 0x17, 0x88, 0x3c, 0x2d, 0x08, 0x2f, 0x55, 0xda, -+ 0xcc, 0x02, 0x3a, 0x82, 0xcd, 0x03, 0x94, 0xdf, -+ 0xdf, 0xab, 0x8a, 0x13, 0xf5, 0xe6, 0x74, 0xdf, -+ 0x7b, 0xe2, 0xab, 0x34, 0xbc, 0x00, 0x85, 0xbf, -+ 0x5a, 0x48, 0xc8, 0xff, 0x8d, 0x6c, 0x27, 0x48, -+ 0x19, 0x2d, 0x08, 0xfa, 0x82,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-+ 0x43, 0x15, 0x83, 0x9b, 0xe7, 0xb1, 0xa6, 0x81, -+ 0xbb, 0xef, 0xf3, 0x8f, 0x0f, 0xd3, 0x79, 0xa2, -+ 0xe5, 0xaa, 0x42, 0xef, 0xa0, 0x13, 0x4e, 0x91, -+ 0x2d, 0xcb, 0x61, 0x7a, 0x9a, 0x33, 0x14, 0x50, -+ 0x77, 0x4a, 0xd0, 0x91, 0x48, 0xe0, 0x0c, 0xe0, -+ 0x11, 0xcb, 0xdf, 0xb0, 0xce, 0x06, 0xd2, 0x79, -+ 0x4d, 0x69, 0xb9, 0xc9, 0x36, 0x74, 0x8f, 0x81, -+ 0x72, 0x73, 0xf3, 0x17, 0xb7, 0x13, 0xcb, 0x5b, -+ 0xd2, 0x5c, 0x33, 0x61, 0xb7, 0x61, 0x79, 0xb0, -+ 0xc0, 0x4d, 0xa1, 0xc7, 0x5d, 0x98, 0xc9, 0xe1, -+ 0x98, 0xbd, 0x78, 0x5a, 0x2c, 0x64, 0x53, 0xaf, -+ 0xaf, 0x66, 0x51, 0x47, 0xe4, 0x48, 0x66, 0x8b, -+ 0x07, 0x52, 0xa3, 0x03, 0x93, 0x28, 0xad, 0xcc, -+ 0xa3, 0x86, 0xad, 0x63, 0x04, 0x35, 0x6c, 0x49, -+ 0xd5, 0x28, 0x0e, 0x00, 0x47, 0xf4, 0xd4, 0x32, -+ 0x27, 0x19, 0xb3, 0x29, 0xe7, 0xbc, 0xbb, 0xce, -+ 0x3e, 0x3e, 0xd5, 0x67, 0x20, 0xe4, 0x0b, 0x75, -+ 0x95, 0x24, 0xe0, 0x6c, 0xb6, 0x29, 0x0c, 0x14, -+ 0xfd -+}; -+static const u8 key74[] __initconst = { -+ 0xf0, 0x41, 0x5b, 0x00, 0x56, 0xc4, 0xac, 0xf6, -+ 0xa2, 0x4c, 0x33, 0x41, 0x16, 0x09, 0x1b, 0x8e, -+ 0x4d, 0xe8, 0x8c, 0xd9, 0x48, 0xab, 0x3e, 0x60, -+ 0xcb, 0x49, 0x3e, 0xaf, 0x2b, 0x8b, 0xc8, 0xf0 -+}; -+enum { nonce74 = 0xcbdb0ffd0e923384ULL }; -+ -+static const struct chacha20_testvec chacha20_testvecs[] __initconst = { -+ { input01, output01, key01, nonce01, sizeof(input01) }, -+ { input02, output02, key02, nonce02, sizeof(input02) }, -+ { input03, output03, key03, nonce03, sizeof(input03) }, -+ { input04, output04, key04, nonce04, sizeof(input04) }, -+ { input05, output05, key05, nonce05, sizeof(input05) }, -+ { input06, output06, key06, nonce06, sizeof(input06) }, -+ { input07, output07, key07, nonce07, sizeof(input07) }, -+ { input08, output08, key08, nonce08, sizeof(input08) }, -+ { input09, output09, key09, nonce09, sizeof(input09) }, -+ { input10, output10, key10, nonce10, sizeof(input10) }, -+ { input11, output11, key11, nonce11, sizeof(input11) }, -+ { input12, output12, key12, nonce12, sizeof(input12) }, -+ { input13, output13, key13, nonce13, sizeof(input13) }, -+ { input14, output14, key14, nonce14, sizeof(input14) }, -+ { input15, output15, key15, nonce15, sizeof(input15) }, -+ { input16, output16, key16, nonce16, sizeof(input16) }, -+ { input17, output17, key17, nonce17, sizeof(input17) }, -+ { input18, output18, key18, nonce18, sizeof(input18) }, -+ { input19, output19, key19, nonce19, sizeof(input19) }, -+ { input20, output20, key20, nonce20, sizeof(input20) }, -+ { input21, output21, key21, nonce21, sizeof(input21) }, -+ { input22, output22, key22, nonce22, sizeof(input22) }, -+ { input23, output23, key23, nonce23, sizeof(input23) }, -+ { input24, output24, key24, nonce24, sizeof(input24) }, -+ { input25, output25, key25, nonce25, sizeof(input25) }, -+ { input26, output26, key26, nonce26, sizeof(input26) }, -+ { input27, output27, key27, nonce27, sizeof(input27) }, -+ { input28, output28, key28, nonce28, sizeof(input28) }, -+ { input29, output29, key29, nonce29, sizeof(input29) }, -+ { input30, output30, key30, nonce30, sizeof(input30) }, -+ { input31, output31, key31, nonce31, sizeof(input31) }, -+ { input32, output32, key32, nonce32, sizeof(input32) }, -+ { input33, output33, key33, nonce33, sizeof(input33) }, -+ { input34, output34, key34, nonce34, sizeof(input34) }, -+ { input35, output35, key35, nonce35, sizeof(input35) }, -+ { input36, output36, key36, nonce36, sizeof(input36) }, -+ { input37, output37, key37, nonce37, sizeof(input37) }, -+ { input38, output38, key38, nonce38, sizeof(input38) }, -+ { input39, output39, key39, nonce39, sizeof(input39) }, -+ { input40, output40, key40, nonce40, sizeof(input40) }, -+ { input41, output41, key41, nonce41, sizeof(input41) }, -+ { input42, output42, key42, nonce42, sizeof(input42) }, -+ { input43, output43, key43, nonce43, sizeof(input43) }, -+ { input44, output44, key44, nonce44, sizeof(input44) }, -+ { input45, output45, key45, nonce45, sizeof(input45) }, -+ { input46, output46, key46, nonce46, sizeof(input46) }, -+ { input47, output47, key47, nonce47, sizeof(input47) }, -+ { input48, output48, key48, nonce48, sizeof(input48) }, -+ { input49, output49, key49, nonce49, sizeof(input49) }, -+ { input50, output50, key50, nonce50, sizeof(input50) }, -+ { input51, output51, key51, nonce51, sizeof(input51) }, -+ { input52, output52, key52, nonce52, sizeof(input52) }, -+ { input53, output53, key53, nonce53, sizeof(input53) }, -+ { input54, output54, key54, nonce54, sizeof(input54) }, -+ { input55, output55, key55, nonce55, sizeof(input55) }, -+ { input56, output56, key56, nonce56, sizeof(input56) }, -+ { input57, output57, key57, nonce57, sizeof(input57) }, -+ { input58, output58, key58, nonce58, sizeof(input58) }, -+ { input59, output59, key59, nonce59, sizeof(input59) }, -+ { input60, output60, key60, nonce60, sizeof(input60) }, -+ { input61, output61, key61, nonce61, sizeof(input61) }, -+ { input62, output62, key62, nonce62, sizeof(input62) }, -+ { input63, output63, key63, nonce63, sizeof(input63) }, -+ { input64, output64, key64, nonce64, sizeof(input64) }, -+ { input65, output65, key65, nonce65, sizeof(input65) }, -+ { input66, output66, key66, nonce66, sizeof(input66) }, -+ { input67, output67, key67, nonce67, sizeof(input67) }, -+ { input68, output68, key68, nonce68, sizeof(input68) }, -+ { input69, output69, key69, nonce69, sizeof(input69) }, -+ { input70, output70, key70, nonce70, sizeof(input70) }, -+ { input71, output71, key71, nonce71, sizeof(input71) }, -+ { input72, output72, key72, nonce72, sizeof(input72) }, -+ { input73, output73, key73, nonce73, sizeof(input73) }, -+ { input74, output74, key74, nonce74, sizeof(input74) } -+}; -+ -+static const struct hchacha20_testvec hchacha20_testvecs[] __initconst = {{ -+ .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, -+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, -+ 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, -+ .nonce = { 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x4a, -+ 0x00, 0x00, 0x00, 0x00, 0x31, 0x41, 0x59, 0x27 }, -+ .output = { 0x82, 0x41, 0x3b, 0x42, 0x27, 0xb2, 0x7b, 0xfe, -+ 0xd3, 0x0e, 0x42, 0x50, 0x8a, 0x87, 0x7d, 0x73, -+ 0xa0, 0xf9, 0xe4, 0xd5, 0x8a, 0x74, 0xa8, 0x53, -+ 0xc1, 0x2e, 0xc4, 0x13, 0x26, 0xd3, 0xec, 0xdc } -+}}; -+ -+static bool __init chacha20_selftest(void) -+{ -+ enum { -+ MAXIMUM_TEST_BUFFER_LEN = 1UL << 10, -+ OUTRAGEOUSLY_HUGE_BUFFER_LEN = PAGE_SIZE * 35 + 17 /* 143k */ -+ }; -+ size_t i, j, k; -+ u32 derived_key[CHACHA20_KEY_WORDS]; -+ u8 *offset_input = NULL, *computed_output = NULL, *massive_input = NULL; -+ u8 offset_key[CHACHA20_KEY_SIZE + 1] -+ __aligned(__alignof__(unsigned long)); -+ struct chacha20_ctx state; -+ bool success = true; -+ simd_context_t simd_context; -+ -+ offset_input = kmalloc(MAXIMUM_TEST_BUFFER_LEN + 1, GFP_KERNEL); -+ computed_output = kmalloc(MAXIMUM_TEST_BUFFER_LEN + 1, GFP_KERNEL); -+ massive_input = vzalloc(OUTRAGEOUSLY_HUGE_BUFFER_LEN); -+ if (!computed_output || !offset_input || !massive_input) { -+ pr_err("chacha20 self-test malloc: FAIL\n"); -+ success = false; -+ goto out; -+ } -+ -+ simd_get(&simd_context); -+ for (i = 0; i < ARRAY_SIZE(chacha20_testvecs); ++i) { -+ /* Boring case */ -+ memset(computed_output, 0, MAXIMUM_TEST_BUFFER_LEN + 1); -+ memset(&state, 0, sizeof(state)); -+ chacha20_init(&state, chacha20_testvecs[i].key, -+ chacha20_testvecs[i].nonce); -+ chacha20(&state, computed_output, chacha20_testvecs[i].input, -+ chacha20_testvecs[i].ilen, &simd_context); -+ if (memcmp(computed_output, chacha20_testvecs[i].output, -+ chacha20_testvecs[i].ilen)) { -+ pr_err("chacha20 self-test %zu: FAIL\n", i + 1); -+ success = false; -+ } -+ for (k = chacha20_testvecs[i].ilen; -+ k < MAXIMUM_TEST_BUFFER_LEN + 1; ++k) { -+ if (computed_output[k]) { -+ pr_err("chacha20 self-test %zu (zero check): FAIL\n", -+ i + 1); -+ success = false; -+ break; -+ } -+ } -+ -+ /* Unaligned case */ -+ memset(computed_output, 0, MAXIMUM_TEST_BUFFER_LEN + 1); -+ memset(&state, 0, sizeof(state)); -+ memcpy(offset_input + 1, chacha20_testvecs[i].input, -+ chacha20_testvecs[i].ilen); -+ memcpy(offset_key + 1, chacha20_testvecs[i].key, -+ CHACHA20_KEY_SIZE); -+ chacha20_init(&state, offset_key + 1, chacha20_testvecs[i].nonce); -+ chacha20(&state, computed_output + 1, offset_input + 1, -+ chacha20_testvecs[i].ilen, &simd_context); -+ if (memcmp(computed_output + 1, chacha20_testvecs[i].output, -+ chacha20_testvecs[i].ilen)) { -+ pr_err("chacha20 self-test %zu (unaligned): FAIL\n", -+ i + 1); -+ success = false; -+ } -+ if (computed_output[0]) { -+ pr_err("chacha20 self-test %zu (unaligned, zero check): FAIL\n", -+ i + 1); -+ success = false; -+ } -+ for (k = chacha20_testvecs[i].ilen + 1; -+ k < MAXIMUM_TEST_BUFFER_LEN + 1; ++k) { -+ if (computed_output[k]) { -+ pr_err("chacha20 self-test %zu (unaligned, zero check): FAIL\n", -+ i + 1); -+ success = false; -+ break; -+ } -+ } -+ -+ /* Chunked case */ -+ if (chacha20_testvecs[i].ilen <= CHACHA20_BLOCK_SIZE) -+ goto next_test; -+ memset(computed_output, 0, MAXIMUM_TEST_BUFFER_LEN + 1); -+ memset(&state, 0, sizeof(state)); -+ chacha20_init(&state, chacha20_testvecs[i].key, -+ chacha20_testvecs[i].nonce); -+ chacha20(&state, computed_output, chacha20_testvecs[i].input, -+ CHACHA20_BLOCK_SIZE, &simd_context); -+ chacha20(&state, computed_output + CHACHA20_BLOCK_SIZE, -+ chacha20_testvecs[i].input + CHACHA20_BLOCK_SIZE, -+ chacha20_testvecs[i].ilen - CHACHA20_BLOCK_SIZE, -+ &simd_context); -+ if (memcmp(computed_output, chacha20_testvecs[i].output, -+ chacha20_testvecs[i].ilen)) { -+ pr_err("chacha20 self-test %zu (chunked): FAIL\n", -+ i + 1); -+ success = false; -+ } -+ for (k = chacha20_testvecs[i].ilen; -+ k < MAXIMUM_TEST_BUFFER_LEN + 1; ++k) { -+ if (computed_output[k]) { -+ pr_err("chacha20 self-test %zu (chunked, zero check): FAIL\n", -+ i + 1); -+ success = false; -+ break; -+ } -+ } -+ -+next_test: -+ /* Sliding unaligned case */ -+ if (chacha20_testvecs[i].ilen > CHACHA20_BLOCK_SIZE + 1 || -+ !chacha20_testvecs[i].ilen) -+ continue; -+ for (j = 1; j < CHACHA20_BLOCK_SIZE; ++j) { -+ memset(computed_output, 0, MAXIMUM_TEST_BUFFER_LEN + 1); -+ memset(&state, 0, sizeof(state)); -+ memcpy(offset_input + j, chacha20_testvecs[i].input, -+ chacha20_testvecs[i].ilen); -+ chacha20_init(&state, chacha20_testvecs[i].key, -+ chacha20_testvecs[i].nonce); -+ chacha20(&state, computed_output + j, offset_input + j, -+ chacha20_testvecs[i].ilen, &simd_context); -+ if (memcmp(computed_output + j, -+ chacha20_testvecs[i].output, -+ chacha20_testvecs[i].ilen)) { -+ pr_err("chacha20 self-test %zu (unaligned, slide %zu): FAIL\n", -+ i + 1, j); -+ success = false; -+ } -+ for (k = j; k < j; ++k) { -+ if (computed_output[k]) { -+ pr_err("chacha20 self-test %zu (unaligned, slide %zu, zero check): FAIL\n", -+ i + 1, j); -+ success = false; -+ break; -+ } -+ } -+ for (k = chacha20_testvecs[i].ilen + j; -+ k < MAXIMUM_TEST_BUFFER_LEN + 1; ++k) { -+ if (computed_output[k]) { -+ pr_err("chacha20 self-test %zu (unaligned, slide %zu, zero check): FAIL\n", -+ i + 1, j); -+ success = false; -+ break; -+ } -+ } -+ } -+ } -+ for (i = 0; i < ARRAY_SIZE(hchacha20_testvecs); ++i) { -+ memset(&derived_key, 0, sizeof(derived_key)); -+ hchacha20(derived_key, hchacha20_testvecs[i].nonce, -+ hchacha20_testvecs[i].key, &simd_context); -+ cpu_to_le32_array(derived_key, ARRAY_SIZE(derived_key)); -+ if (memcmp(derived_key, hchacha20_testvecs[i].output, -+ CHACHA20_KEY_SIZE)) { -+ pr_err("hchacha20 self-test %zu: FAIL\n", i + 1); -+ success = false; -+ } -+ } -+ memset(&state, 0, sizeof(state)); -+ chacha20_init(&state, chacha20_testvecs[0].key, -+ chacha20_testvecs[0].nonce); -+ chacha20(&state, massive_input, massive_input, -+ OUTRAGEOUSLY_HUGE_BUFFER_LEN, &simd_context); -+ chacha20_init(&state, chacha20_testvecs[0].key, -+ chacha20_testvecs[0].nonce); -+ chacha20(&state, massive_input, massive_input, -+ OUTRAGEOUSLY_HUGE_BUFFER_LEN, DONT_USE_SIMD); -+ for (k = 0; k < OUTRAGEOUSLY_HUGE_BUFFER_LEN; ++k) { -+ if (massive_input[k]) { -+ pr_err("chacha20 self-test massive: FAIL\n"); -+ success = false; -+ break; -+ } -+ } -+ -+ simd_put(&simd_context); -+ -+out: -+ kfree(offset_input); -+ kfree(computed_output); -+ vfree(massive_input); -+ return success; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/selftest/chacha20poly1305.c 2019-08-20 20:26:42.406341426 +0000 -@@ -0,0 +1,9034 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+struct chacha20poly1305_testvec { -+ const u8 *input, *output, *assoc, *nonce, *key; -+ size_t ilen, alen, nlen; -+ bool failure; -+}; -+ -+/* The first of these are the ChaCha20-Poly1305 AEAD test vectors from RFC7539 -+ * 2.8.2. After they are generated by reference implementations. And the final -+ * marked ones are taken from wycheproof, but we only do these for the encrypt -+ * side, because mostly we're stressing the primitives rather than the actual -+ * chapoly construction. This also requires adding a 96-bit nonce construction, -+ * just for the purpose of the tests. -+ */ -+ -+static const u8 enc_input001[] __initconst = { -+ 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, -+ 0x2d, 0x44, 0x72, 0x61, 0x66, 0x74, 0x73, 0x20, -+ 0x61, 0x72, 0x65, 0x20, 0x64, 0x72, 0x61, 0x66, -+ 0x74, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, -+ 0x6e, 0x74, 0x73, 0x20, 0x76, 0x61, 0x6c, 0x69, -+ 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, -+ 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x20, -+ 0x6f, 0x66, 0x20, 0x73, 0x69, 0x78, 0x20, 0x6d, -+ 0x6f, 0x6e, 0x74, 0x68, 0x73, 0x20, 0x61, 0x6e, -+ 0x64, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, -+ 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, -+ 0x2c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, -+ 0x65, 0x64, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x6f, -+ 0x62, 0x73, 0x6f, 0x6c, 0x65, 0x74, 0x65, 0x64, -+ 0x20, 0x62, 0x79, 0x20, 0x6f, 0x74, 0x68, 0x65, -+ 0x72, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, -+ 0x6e, 0x74, 0x73, 0x20, 0x61, 0x74, 0x20, 0x61, -+ 0x6e, 0x79, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x2e, -+ 0x20, 0x49, 0x74, 0x20, 0x69, 0x73, 0x20, 0x69, -+ 0x6e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, -+ 0x69, 0x61, 0x74, 0x65, 0x20, 0x74, 0x6f, 0x20, -+ 0x75, 0x73, 0x65, 0x20, 0x49, 0x6e, 0x74, 0x65, -+ 0x72, 0x6e, 0x65, 0x74, 0x2d, 0x44, 0x72, 0x61, -+ 0x66, 0x74, 0x73, 0x20, 0x61, 0x73, 0x20, 0x72, -+ 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, -+ 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, -+ 0x6c, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x6f, 0x20, -+ 0x63, 0x69, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, -+ 0x6d, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, -+ 0x74, 0x68, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x20, -+ 0x2f, 0xe2, 0x80, 0x9c, 0x77, 0x6f, 0x72, 0x6b, -+ 0x20, 0x69, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x67, -+ 0x72, 0x65, 0x73, 0x73, 0x2e, 0x2f, 0xe2, 0x80, -+ 0x9d -+}; -+static const u8 enc_output001[] __initconst = { -+ 0x64, 0xa0, 0x86, 0x15, 0x75, 0x86, 0x1a, 0xf4, -+ 0x60, 0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0x4e, 0xea, -+ 0x1b, 0x42, 0x22, 0x73, 0xf5, 0x48, 0x27, 0x1a, -+ 0x0b, 0xb2, 0x31, 0x60, 0x53, 0xfa, 0x76, 0x99, -+ 0x19, 0x55, 0xeb, 0xd6, 0x31, 0x59, 0x43, 0x4e, -+ 0xce, 0xbb, 0x4e, 0x46, 0x6d, 0xae, 0x5a, 0x10, -+ 0x73, 0xa6, 0x72, 0x76, 0x27, 0x09, 0x7a, 0x10, -+ 0x49, 0xe6, 0x17, 0xd9, 0x1d, 0x36, 0x10, 0x94, -+ 0xfa, 0x68, 0xf0, 0xff, 0x77, 0x98, 0x71, 0x30, -+ 0x30, 0x5b, 0xea, 0xba, 0x2e, 0xda, 0x04, 0xdf, -+ 0x99, 0x7b, 0x71, 0x4d, 0x6c, 0x6f, 0x2c, 0x29, -+ 0xa6, 0xad, 0x5c, 0xb4, 0x02, 0x2b, 0x02, 0x70, -+ 0x9b, 0xee, 0xad, 0x9d, 0x67, 0x89, 0x0c, 0xbb, -+ 0x22, 0x39, 0x23, 0x36, 0xfe, 0xa1, 0x85, 0x1f, -+ 0x38 -+}; -+static const u8 enc_assoc001[] __initconst = { -+ 0xf3, 0x33, 0x88, 0x86, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x4e, 0x91 -+}; -+static const u8 enc_nonce001[] __initconst = { -+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 -+}; -+static const u8 enc_key001[] __initconst = { -+ 0x1c, 0x92, 0x40, 0xa5, 0xeb, 0x55, 0xd3, 0x8a, -+ 0xf3, 0x33, 0x88, 0x86, 0x04, 0xf6, 0xb5, 0xf0, -+ 0x47, 0x39, 0x17, 0xc1, 0x40, 0x2b, 0x80, 0x09, -+ 0x9d, 0xca, 0x5c, 0xbc, 0x20, 0x70, 0x75, 0xc0 -+}; -+ -+static const u8 enc_input002[] __initconst = { }; -+static const u8 enc_output002[] __initconst = { -+ 0xea, 0xe0, 0x1e, 0x9e, 0x2c, 0x91, 0xaa, 0xe1, -+ 0xdb, 0x5d, 0x99, 0x3f, 0x8a, 0xf7, 0x69, 0x92 -+}; -+static const u8 enc_assoc002[] __initconst = { }; -+static const u8 enc_nonce002[] __initconst = { -+ 0xca, 0xbf, 0x33, 0x71, 0x32, 0x45, 0x77, 0x8e -+}; -+static const u8 enc_key002[] __initconst = { -+ 0x4c, 0xf5, 0x96, 0x83, 0x38, 0xe6, 0xae, 0x7f, -+ 0x2d, 0x29, 0x25, 0x76, 0xd5, 0x75, 0x27, 0x86, -+ 0x91, 0x9a, 0x27, 0x7a, 0xfb, 0x46, 0xc5, 0xef, -+ 0x94, 0x81, 0x79, 0x57, 0x14, 0x59, 0x40, 0x68 -+}; -+ -+static const u8 enc_input003[] __initconst = { }; -+static const u8 enc_output003[] __initconst = { -+ 0xdd, 0x6b, 0x3b, 0x82, 0xce, 0x5a, 0xbd, 0xd6, -+ 0xa9, 0x35, 0x83, 0xd8, 0x8c, 0x3d, 0x85, 0x77 -+}; -+static const u8 enc_assoc003[] __initconst = { -+ 0x33, 0x10, 0x41, 0x12, 0x1f, 0xf3, 0xd2, 0x6b -+}; -+static const u8 enc_nonce003[] __initconst = { -+ 0x3d, 0x86, 0xb5, 0x6b, 0xc8, 0xa3, 0x1f, 0x1d -+}; -+static const u8 enc_key003[] __initconst = { -+ 0x2d, 0xb0, 0x5d, 0x40, 0xc8, 0xed, 0x44, 0x88, -+ 0x34, 0xd1, 0x13, 0xaf, 0x57, 0xa1, 0xeb, 0x3a, -+ 0x2a, 0x80, 0x51, 0x36, 0xec, 0x5b, 0xbc, 0x08, -+ 0x93, 0x84, 0x21, 0xb5, 0x13, 0x88, 0x3c, 0x0d -+}; -+ -+static const u8 enc_input004[] __initconst = { -+ 0xa4 -+}; -+static const u8 enc_output004[] __initconst = { -+ 0xb7, 0x1b, 0xb0, 0x73, 0x59, 0xb0, 0x84, 0xb2, -+ 0x6d, 0x8e, 0xab, 0x94, 0x31, 0xa1, 0xae, 0xac, -+ 0x89 -+}; -+static const u8 enc_assoc004[] __initconst = { -+ 0x6a, 0xe2, 0xad, 0x3f, 0x88, 0x39, 0x5a, 0x40 -+}; -+static const u8 enc_nonce004[] __initconst = { -+ 0xd2, 0x32, 0x1f, 0x29, 0x28, 0xc6, 0xc4, 0xc4 -+}; -+static const u8 enc_key004[] __initconst = { -+ 0x4b, 0x28, 0x4b, 0xa3, 0x7b, 0xbe, 0xe9, 0xf8, -+ 0x31, 0x80, 0x82, 0xd7, 0xd8, 0xe8, 0xb5, 0xa1, -+ 0xe2, 0x18, 0x18, 0x8a, 0x9c, 0xfa, 0xa3, 0x3d, -+ 0x25, 0x71, 0x3e, 0x40, 0xbc, 0x54, 0x7a, 0x3e -+}; -+ -+static const u8 enc_input005[] __initconst = { -+ 0x2d -+}; -+static const u8 enc_output005[] __initconst = { -+ 0xbf, 0xe1, 0x5b, 0x0b, 0xdb, 0x6b, 0xf5, 0x5e, -+ 0x6c, 0x5d, 0x84, 0x44, 0x39, 0x81, 0xc1, 0x9c, -+ 0xac -+}; -+static const u8 enc_assoc005[] __initconst = { }; -+static const u8 enc_nonce005[] __initconst = { -+ 0x20, 0x1c, 0xaa, 0x5f, 0x9c, 0xbf, 0x92, 0x30 -+}; -+static const u8 enc_key005[] __initconst = { -+ 0x66, 0xca, 0x9c, 0x23, 0x2a, 0x4b, 0x4b, 0x31, -+ 0x0e, 0x92, 0x89, 0x8b, 0xf4, 0x93, 0xc7, 0x87, -+ 0x98, 0xa3, 0xd8, 0x39, 0xf8, 0xf4, 0xa7, 0x01, -+ 0xc0, 0x2e, 0x0a, 0xa6, 0x7e, 0x5a, 0x78, 0x87 -+}; -+ -+static const u8 enc_input006[] __initconst = { -+ 0x33, 0x2f, 0x94, 0xc1, 0xa4, 0xef, 0xcc, 0x2a, -+ 0x5b, 0xa6, 0xe5, 0x8f, 0x1d, 0x40, 0xf0, 0x92, -+ 0x3c, 0xd9, 0x24, 0x11, 0xa9, 0x71, 0xf9, 0x37, -+ 0x14, 0x99, 0xfa, 0xbe, 0xe6, 0x80, 0xde, 0x50, -+ 0xc9, 0x96, 0xd4, 0xb0, 0xec, 0x9e, 0x17, 0xec, -+ 0xd2, 0x5e, 0x72, 0x99, 0xfc, 0x0a, 0xe1, 0xcb, -+ 0x48, 0xd2, 0x85, 0xdd, 0x2f, 0x90, 0xe0, 0x66, -+ 0x3b, 0xe6, 0x20, 0x74, 0xbe, 0x23, 0x8f, 0xcb, -+ 0xb4, 0xe4, 0xda, 0x48, 0x40, 0xa6, 0xd1, 0x1b, -+ 0xc7, 0x42, 0xce, 0x2f, 0x0c, 0xa6, 0x85, 0x6e, -+ 0x87, 0x37, 0x03, 0xb1, 0x7c, 0x25, 0x96, 0xa3, -+ 0x05, 0xd8, 0xb0, 0xf4, 0xed, 0xea, 0xc2, 0xf0, -+ 0x31, 0x98, 0x6c, 0xd1, 0x14, 0x25, 0xc0, 0xcb, -+ 0x01, 0x74, 0xd0, 0x82, 0xf4, 0x36, 0xf5, 0x41, -+ 0xd5, 0xdc, 0xca, 0xc5, 0xbb, 0x98, 0xfe, 0xfc, -+ 0x69, 0x21, 0x70, 0xd8, 0xa4, 0x4b, 0xc8, 0xde, -+ 0x8f -+}; -+static const u8 enc_output006[] __initconst = { -+ 0x8b, 0x06, 0xd3, 0x31, 0xb0, 0x93, 0x45, 0xb1, -+ 0x75, 0x6e, 0x26, 0xf9, 0x67, 0xbc, 0x90, 0x15, -+ 0x81, 0x2c, 0xb5, 0xf0, 0xc6, 0x2b, 0xc7, 0x8c, -+ 0x56, 0xd1, 0xbf, 0x69, 0x6c, 0x07, 0xa0, 0xda, -+ 0x65, 0x27, 0xc9, 0x90, 0x3d, 0xef, 0x4b, 0x11, -+ 0x0f, 0x19, 0x07, 0xfd, 0x29, 0x92, 0xd9, 0xc8, -+ 0xf7, 0x99, 0x2e, 0x4a, 0xd0, 0xb8, 0x2c, 0xdc, -+ 0x93, 0xf5, 0x9e, 0x33, 0x78, 0xd1, 0x37, 0xc3, -+ 0x66, 0xd7, 0x5e, 0xbc, 0x44, 0xbf, 0x53, 0xa5, -+ 0xbc, 0xc4, 0xcb, 0x7b, 0x3a, 0x8e, 0x7f, 0x02, -+ 0xbd, 0xbb, 0xe7, 0xca, 0xa6, 0x6c, 0x6b, 0x93, -+ 0x21, 0x93, 0x10, 0x61, 0xe7, 0x69, 0xd0, 0x78, -+ 0xf3, 0x07, 0x5a, 0x1a, 0x8f, 0x73, 0xaa, 0xb1, -+ 0x4e, 0xd3, 0xda, 0x4f, 0xf3, 0x32, 0xe1, 0x66, -+ 0x3e, 0x6c, 0xc6, 0x13, 0xba, 0x06, 0x5b, 0xfc, -+ 0x6a, 0xe5, 0x6f, 0x60, 0xfb, 0x07, 0x40, 0xb0, -+ 0x8c, 0x9d, 0x84, 0x43, 0x6b, 0xc1, 0xf7, 0x8d, -+ 0x8d, 0x31, 0xf7, 0x7a, 0x39, 0x4d, 0x8f, 0x9a, -+ 0xeb -+}; -+static const u8 enc_assoc006[] __initconst = { -+ 0x70, 0xd3, 0x33, 0xf3, 0x8b, 0x18, 0x0b -+}; -+static const u8 enc_nonce006[] __initconst = { -+ 0xdf, 0x51, 0x84, 0x82, 0x42, 0x0c, 0x75, 0x9c -+}; -+static const u8 enc_key006[] __initconst = { -+ 0x68, 0x7b, 0x8d, 0x8e, 0xe3, 0xc4, 0xdd, 0xae, -+ 0xdf, 0x72, 0x7f, 0x53, 0x72, 0x25, 0x1e, 0x78, -+ 0x91, 0xcb, 0x69, 0x76, 0x1f, 0x49, 0x93, 0xf9, -+ 0x6f, 0x21, 0xcc, 0x39, 0x9c, 0xad, 0xb1, 0x01 -+}; -+ -+static const u8 enc_input007[] __initconst = { -+ 0x9b, 0x18, 0xdb, 0xdd, 0x9a, 0x0f, 0x3e, 0xa5, -+ 0x15, 0x17, 0xde, 0xdf, 0x08, 0x9d, 0x65, 0x0a, -+ 0x67, 0x30, 0x12, 0xe2, 0x34, 0x77, 0x4b, 0xc1, -+ 0xd9, 0xc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b, 0xcc, 0x79, 0x3b, 0xec, 0x12, -+ 0x47, 0x52, 0xa7, 0xd6, 0x04, 0xe3, 0x52, 0xe6, -+ 0x93, 0x90, 0x91, 0x32, 0x73, 0x79, 0xb8, 0xd0, -+ 0x31, 0xde, 0x1f, 0x9f, 0x2f, 0x05, 0x38, 0x54, -+ 0x2f, 0x35, 0x04, 0x39, 0xe0, 0xa7, 0xba, 0xc6, -+ 0x52, 0xf6, 0x37, 0x65, 0x4c, 0x07, 0xa9, 0x7e, -+ 0xb3, 0x21, 0x6f, 0x74, 0x8c, 0xc9, 0xde, 0xdb, -+ 0x65, 0x1b, 0x9b, 0xaa, 0x60, 0xb1, 0x03, 0x30, -+ 0x6b, 0xb2, 0x03, 0xc4, 0x1c, 0x04, 0xf8, 0x0f, -+ 0x64, 0xaf, 0x46, 0xe4, 0x65, 0x99, 0x49, 0xe2, -+ 0xea, 0xce, 0x78, 0x00, 0xd8, 0x8b, 0xd5, 0x2e, -+ 0xcf, 0xfc, 0x40, 0x49, 0xe8, 0x58, 0xdc, 0x34, -+ 0x9c, 0x8c, 0x61, 0xbf, 0x0a, 0x8e, 0xec, 0x39, -+ 0xa9, 0x30, 0x05, 0x5a, 0xd2, 0x56, 0x01, 0xc7, -+ 0xda, 0x8f, 0x4e, 0xbb, 0x43, 0xa3, 0x3a, 0xf9, -+ 0x15, 0x2a, 0xd0, 0xa0, 0x7a, 0x87, 0x34, 0x82, -+ 0xfe, 0x8a, 0xd1, 0x2d, 0x5e, 0xc7, 0xbf, 0x04, -+ 0x53, 0x5f, 0x3b, 0x36, 0xd4, 0x25, 0x5c, 0x34, -+ 0x7a, 0x8d, 0xd5, 0x05, 0xce, 0x72, 0xca, 0xef, -+ 0x7a, 0x4b, 0xbc, 0xb0, 0x10, 0x5c, 0x96, 0x42, -+ 0x3a, 0x00, 0x98, 0xcd, 0x15, 0xe8, 0xb7, 0x53 -+}; -+static const u8 enc_assoc007[] __initconst = { }; -+static const u8 enc_nonce007[] __initconst = { -+ 0xde, 0x7b, 0xef, 0xc3, 0x65, 0x1b, 0x68, 0xb0 -+}; -+static const u8 enc_key007[] __initconst = { -+ 0x8d, 0xb8, 0x91, 0x48, 0xf0, 0xe7, 0x0a, 0xbd, -+ 0xf9, 0x3f, 0xcd, 0xd9, 0xa0, 0x1e, 0x42, 0x4c, -+ 0xe7, 0xde, 0x25, 0x3d, 0xa3, 0xd7, 0x05, 0x80, -+ 0x8d, 0xf2, 0x82, 0xac, 0x44, 0x16, 0x51, 0x01 -+}; -+ -+static const u8 enc_input008[] __initconst = { -+ 0xc3, 0x09, 0x94, 0x62, 0xe6, 0x46, 0x2e, 0x10, -+ 0xbe, 0x00, 0xe4, 0xfc, 0xf3, 0x40, 0xa3, 0xe2, -+ 0x0f, 0xc2, 0x8b, 0x28, 0xdc, 0xba, 0xb4, 0x3c, -+ 0xe4, 0x21, 0x58, 0x61, 0xcd, 0x8b, 0xcd, 0xfb, -+ 0xac, 0x94, 0xa1, 0x45, 0xf5, 0x1c, 0xe1, 0x12, -+ 0xe0, 0x3b, 0x67, 0x21, 0x54, 0x5e, 0x8c, 0xaa, -+ 0xcf, 0xdb, 0xb4, 0x51, 0xd4, 0x13, 0xda, 0xe6, -+ 0x83, 0x89, 0xb6, 0x92, 0xe9, 0x21, 0x76, 0xa4, -+ 0x93, 0x7d, 0x0e, 0xfd, 0x96, 0x36, 0x03, 0x91, -+ 0x43, 0x5c, 0x92, 0x49, 0x62, 0x61, 0x7b, 0xeb, -+ 0x43, 0x89, 0xb8, 0x12, 0x20, 0x43, 0xd4, 0x47, -+ 0x06, 0x84, 0xee, 0x47, 0xe9, 0x8a, 0x73, 0x15, -+ 0x0f, 0x72, 0xcf, 0xed, 0xce, 0x96, 0xb2, 0x7f, -+ 0x21, 0x45, 0x76, 0xeb, 0x26, 0x28, 0x83, 0x6a, -+ 0xad, 0xaa, 0xa6, 0x81, 0xd8, 0x55, 0xb1, 0xa3, -+ 0x85, 0xb3, 0x0c, 0xdf, 0xf1,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x68, 0x2b, 0x08, 0x30, -+ 0xf3, 0xf7, 0x30, 0x3c, 0x96, 0xe6, 0x6a, 0x20, -+ 0x97, 0xe7, 0x4d, 0x10, 0x5f, 0x47, 0x5f, 0x49, -+ 0x96, 0x09, 0xf0, 0x27, 0x91, 0xc8, 0xf8, 0x5a, -+ 0x2e, 0x79, 0xb5, 0xe2, 0xb8, 0xe8, 0xb9, 0x7b, -+ 0xd5, 0x10, 0xcb, 0xff, 0x5d, 0x14, 0x73, 0xf3 -+}; -+static const u8 enc_output008[] __initconst = { -+ 0x14, 0xf6, 0x41, 0x37, 0xa6, 0xd4, 0x27, 0xcd, -+ 0xdb, 0x06, 0x3e, 0x9a, 0x4e, 0xab, 0xd5, 0xb1, -+ 0x1e, 0x6b, 0xd2, 0xbc, 0x11, 0xf4, 0x28, 0x93, -+ 0x63, 0x54, 0xef, 0xbb, 0x5e, 0x1d, 0x3a, 0x1d, -+ 0x37, 0x3c, 0x0a, 0x6c, 0x1e, 0xc2, 0xd1, 0x2c, -+ 0xb5, 0xa3, 0xb5, 0x7b, 0xb8, 0x8f, 0x25, 0xa6, -+ 0x1b, 0x61, 0x1c, 0xec, 0x28, 0x58, 0x26, 0xa4, -+ 0xa8, 0x33, 0x28, 0x25, 0x5c, 0x45, 0x05, 0xe5, -+ 0x6c, 0x99, 0xe5, 0x45, 0xc4, 0xa2, 0x03, 0x84, -+ 0x03, 0x73, 0x1e, 0x8c, 0x49, 0xac, 0x20, 0xdd, -+ 0x8d, 0xb3, 0xc4, 0xf5, 0xe7, 0x4f, 0xf1, 0xed, -+ 0xa1, 0x98, 0xde, 0xa4, 0x96, 0xdd, 0x2f, 0xab, -+ 0xab, 0x97, 0xcf, 0x3e, 0xd2, 0x9e, 0xb8, 0x13, -+ 0x07, 0x28, 0x29, 0x19, 0xaf, 0xfd, 0xf2, 0x49, -+ 0x43, 0xea, 0x49, 0x26, 0x91, 0xc1, 0x07, 0xd6, -+ 0xbb, 0x81, 0x75, 0x35, 0x0d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0x96, 0xe8, -+ 0x35, 0x7f, 0xdc, 0x40, 0x2c, 0xe9, 0xbc, 0x8a, -+ 0x4f, 0x92, 0xec, 0x06, 0x2d, 0x50, 0xdf, 0x93, -+ 0x5d, 0x65, 0x5a, 0xa8, 0xfc, 0x20, 0x50, 0x14, -+ 0xa9, 0x8a, 0x7e, 0x1d, 0x08, 0x1f, 0xe2, 0x99, -+ 0xd0, 0xbe, 0xfb, 0x3a, 0x21, 0x9d, 0xad, 0x86, -+ 0x54, 0xfd, 0x0d, 0x98, 0x1c, 0x5a, 0x6f, 0x1f, -+ 0x9a, 0x40, 0xcd, 0xa2, 0xff, 0x6a, 0xf1, 0x54 -+}; -+static const u8 enc_assoc008[] __initconst = { }; -+static const u8 enc_nonce008[] __initconst = { -+ 0x0e, 0x0d, 0x57, 0xbb, 0x7b, 0x40, 0x54, 0x02 -+}; -+static const u8 enc_key008[] __initconst = { -+ 0xf2, 0xaa, 0x4f, 0x99, 0xfd, 0x3e, 0xa8, 0x53, -+ 0xc1, 0x44, 0xe9, 0x81, 0x18, 0xdc, 0xf5, 0xf0, -+ 0x3e, 0x44, 0x15, 0x59, 0xe0, 0xc5, 0x44, 0x86, -+ 0xc3, 0x91, 0xa8, 0x75, 0xc0, 0x12, 0x46, 0xba -+}; -+ -+static const u8 enc_input009[] __initconst = { -+ 0xe6, 0xc3, 0xdb, 0x63, 0x55, 0x15, 0xe3, 0x5b, -+ 0xb7, 0x4b, 0x27, 0x8b, 0x5a, 0xdd, 0xc2, 0xe8, -+ 0x3a, 0x6b, 0xd7, 0x81, 0x96, 0x35, 0x97, 0xca, -+ 0xd7, 0x68, 0xe8, 0xef, 0xce, 0xab, 0xda, 0x09, -+ 0x6e, 0xd6, 0x8e, 0xcb, 0x55, 0xb5, 0xe1, 0xe5, -+ 0x57, 0xfd, 0xc4, 0xe3, 0xe0, 0x18, 0x4f, 0x85, -+ 0xf5, 0x3f, 0x7e, 0x4b, 0x88, 0xc9, 0x52, 0x44, -+ 0x0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 0x6d, 0x11, 0xb8, 0xca, 0xe9, 0x6e, 0xff, -+ 0xf7, 0xa9, 0xd9, 0x70, 0x30, 0xfc, 0x53, 0xe2, -+ 0xd7, 0xa2, 0x4e, 0xc7, 0x91, 0xd9, 0x07, 0x06, -+ 0xaa, 0xdd, 0xb0, 0x59, 0x28, 0x1d, 0x00, 0x66, -+ 0xc5, 0x54, 0xc2, 0xfc, 0x06, 0xda, 0x05, 0x90, -+ 0x52, 0x1d, 0x37, 0x66, 0xee, 0xf0, 0xb2, 0x55, -+ 0x8a, 0x5d, 0xd2, 0x38, 0x86, 0x94, 0x9b, 0xfc, -+ 0x10, 0x4c, 0xa1, 0xb9, 0x64, 0x3e, 0x44, 0xb8, -+ 0x5f, 0xb0, 0x0c, 0xec, 0xe0, 0xc9, 0xe5, 0x62, -+ 0x75, 0x3f, 0x09, 0xd5, 0xf5, 0xd9, 0x26, 0xba, -+ 0x9e, 0xd2, 0xf4, 0xb9, 0x48, 0x0a, 0xbc, 0xa2, -+ 0xd6, 0x7c, 0x36, 0x11, 0x7d, 0x26, 0x81, 0x89, -+ 0xcf, 0xa4, 0xad, 0x73, 0x0e, 0xee, 0xcc, 0x06, -+ 0xa9, 0xdb, 0xb1, 0xfd, 0xfb, 0x09, 0x7f, 0x90, -+ 0x42, 0x37, 0x2f, 0xe1, 0x9c, 0x0f, 0x6f, 0xcf, -+ 0x43, 0xb5, 0xd9, 0x90, 0xe1, 0x85, 0xf5, 0xa8, -+ 0xae -+}; -+static const u8 enc_assoc009[] __initconst = { -+ 0x5a, 0x27, 0xff, 0xeb, 0xdf, 0x84, 0xb2, 0x9e, -+ 0xef -+}; -+static const u8 enc_nonce009[] __initconst = { -+ 0xef, 0x2d, 0x63, 0xee, 0x6b, 0x80, 0x8b, 0x78 -+}; -+static const u8 enc_key009[] __initconst = { -+ 0xea, 0xbc, 0x56, 0x99, 0xe3, 0x50, 0xff, 0xc5, -+ 0xcc, 0x1a, 0xd7, 0xc1, 0x57, 0x72, 0xea, 0x86, -+ 0x5b, 0x89, 0x88, 0x61, 0x3d, 0x2f, 0x9b, 0xb2, -+ 0xe7, 0x9c, 0xec, 0x74, 0x6e, 0x3e, 0xf4, 0x3b -+}; -+ -+static const u8 enc_input010[] __initconst = { -+ 0x42, 0x93, 0xe4, 0xeb, 0x97, 0xb0, 0x57, 0xbf, -+ 0x1a, 0x8b, 0x1f, 0xe4, 0x5f, 0x36, 0x20, 0x3c, -+ 0xef, 0x0a, 0xa9, 0x48, 0x5f, 0x5f, 0x37, 0x22, -+ 0x3a, 0xde, 0xe3, 0xae, 0xbe, 0xad, 0x07, 0xcc, -+ 0xb1, 0xf6, 0xf5, 0xf9, 0x56, 0xdd, 0xe7, 0x16, -+ 0x1e, 0x7f, 0xdf, 0x7a, 0x9e, 0x75, 0xb7, 0xc7, -+ 0xbe, 0xbe, 0x8a, 0x36, 0x04, 0xc0, 0x10, 0xf4, -+ 0x95, 0x20, 0x03, 0xec, 0xdc, 0x05, 0xa1, 0x7d, -+ 0xc4, 0xa9, 0x2c, 0x82, 0xd0, 0xbc, 0x8b, 0xc5, -+ 0xc7, 0x45, 0x50, 0xf6, 0xa2, 0x1a, 0xb5, 0x46, -+ 0x3b, 0x73, 0x02, 0xa6, 0x83, 0x4b, 0x73, 0x82, -+ 0x58, 0x5e, 0x3b, 0x65, 0x2f, 0x0e, 0xfd, 0x2b, -+ 0x59, 0x16, 0xce, 0xa1, 0x60, 0x9c, 0xe8, 0x3a, -+ 0x99, 0xed, 0x8d, 0x5a, 0xcf, 0xf6, 0x83, 0xaf, -+ 0xba, 0xd7, 0x73, 0x73, 0x40, 0x97, 0x3d, 0xca, -+ 0xef, 0x07, 0x57, 0xe6, 0xd9, 0x70, 0x0e, 0x95, -+ 0xae, 0xa6, 0x8d, 0x04, 0xcc, 0xee, 0xf7, 0x09, -+ 0x31, 0x77, 0x12, 0xa3, 0x23, 0x97, 0x62, 0xb3, -+ 0x7b, 0x32, 0xfb, 0x80, 0x14, 0x48, 0x81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x87, 0x52, 0xa2, 0x8f, 0x26, 0xd5, 0x4f -+}; -+static const u8 enc_output010[] __initconst = { -+ 0xe5, 0x26, 0xa4, 0x3d, 0xbd, 0x33, 0xd0, 0x4b, -+ 0x6f, 0x05, 0xa7, 0x6e, 0x12, 0x7a, 0xd2, 0x74, -+ 0xa6, 0xdd, 0xbd, 0x95, 0xeb, 0xf9, 0xa4, 0xf1, -+ 0x59, 0x93, 0x91, 0x70, 0xd9, 0xfe, 0x9a, 0xcd, -+ 0x53, 0x1f, 0x3a, 0xab, 0xa6, 0x7c, 0x9f, 0xa6, -+ 0x9e, 0xbd, 0x99, 0xd9, 0xb5, 0x97, 0x44, 0xd5, -+ 0x14, 0x48, 0x4d, 0x9d, 0xc0, 0xd0, 0x05, 0x96, -+ 0xeb, 0x4c, 0x78, 0x55, 0x09, 0x08, 0x01, 0x02, -+ 0x30, 0x90, 0x7b, 0x96, 0x7a, 0x7b, 0x5f, 0x30, -+ 0x41, 0x24, 0xce, 0x68, 0x61, 0x49, 0x86, 0x57, -+ 0x82, 0xdd, 0x53, 0x1c, 0x51, 0x28, 0x2b, 0x53, -+ 0x6e, 0x2d, 0xc2, 0x20, 0x4c, 0xdd, 0x8f, 0x65, -+ 0x10, 0x20, 0x50, 0xdd, 0x9d, 0x50, 0xe5, 0x71, -+ 0x40, 0x53, 0x69, 0xfc, 0x77, 0x48, 0x11, 0xb9, -+ 0xde, 0xa4, 0x8d, 0x58, 0xe4, 0xa6, 0x1a, 0x18, -+ 0x47, 0x81, 0x7e, 0xfc, 0xdd, 0xf6, 0xef, 0xce, -+ 0x2f, 0x43, 0x68, 0xd6, 0x06, 0xe2, 0x74, 0x6a, -+ 0xad, 0x90, 0xf5, 0x37, 0xf3, 0x3d, 0x82, 0x69, -+ 0x40, 0xe9, 0x6b, 0xa7, 0x3d, 0xa8, 0x1e, 0xd2, -+ 0x02, 0x7c, 0xb7, 0x9b, 0xe4, 0xda, 0x8f, 0x95, -+ 0x06, 0xc5, 0xdf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, 0x1f, 0xc3, 0xcc, 0x97, 0xc9, -+ 0x24, 0x9f, 0xf3, 0xaf, 0x43, 0x14, 0xd5, 0xa0 -+}; -+static const u8 enc_assoc010[] __initconst = { -+ 0xd2, 0xa1, 0x70, 0xdb, 0x7a, 0xf8, 0xfa, 0x27, -+ 0xba, 0x73, 0x0f, 0xbf, 0x3d, 0x1e, 0x82, 0xb2 -+}; -+static const u8 enc_nonce010[] __initconst = { -+ 0xdb, 0x92, 0x0f, 0x7f, 0x17, 0x54, 0x0c, 0x30 -+}; -+static const u8 enc_key010[] __initconst = { -+ 0x47, 0x11, 0xeb, 0x86, 0x2b, 0x2c, 0xab, 0x44, -+ 0x34, 0xda, 0x7f, 0x57, 0x03, 0x39, 0x0c, 0xaf, -+ 0x2c, 0x14, 0xfd, 0x65, 0x23, 0xe9, 0x8e, 0x74, -+ 0xd5, 0x08, 0x68, 0x08, 0xe7, 0xb4, 0x72, 0xd7 -+}; -+ -+static const u8 enc_input011[] __initconst = { -+ 0x7a, 0x57, 0xf2, 0xc7, 0x06, 0x3f, 0x50, 0x7b, -+ 0x36, 0x1a, 0x66, 0x5c, 0xb9, 0x0e, 0x5e, 0x3b, -+ 0x45, 0x60, 0xbe, 0x9a, 0x31, 0x9f, 0xff, 0x5d, -+ 0x66, 0x34, 0xb4, 0xdc, 0xfb, 0x9d, 0x8e, 0xee, -+ 0x6a, 0x33, 0xa4, 0x07, 0x3c, 0xf9, 0x4c, 0x30, -+ 0xa1, 0x24, 0x52, 0xf9, 0x50, 0x46, 0x88, 0x20, -+ 0x02, 0x32, 0x3a, 0x0e, 0x99, 0x63, 0xaf, 0x1f, -+ 0x15, 0x28, 0x2a, 0x05, 0xff, 0x57, 0x59, 0x5e, -+ 0x18, 0xa1, 0x1f, 0xd0, 0x92, 0x5c, 0x88, 0x66, -+ 0x1b, 0x00, 0x64, 0xa5, 0x93, 0x8d, 0x06, 0x46, -+ 0xb0, 0x64, 0x8b, 0x8b, 0xef, 0x99, 0x05, 0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x91, 0xd2, 0xd2, -+ 0xd4, 0x23, 0x78, 0x50, 0xb1, 0x5b, 0x85, 0x10, -+ 0x8d, 0xca, 0x5f, 0x0f, 0x71, 0xae, 0x72, 0x9a, -+ 0xf6, 0x25, 0x19, 0x60, 0x06, 0xf7, 0x10, 0x34, -+ 0x18, 0x0d, 0xc9, 0x9f, 0x7b, 0x0c, 0x9b, 0x8f, -+ 0x91, 0x1b, 0x9f, 0xcd, 0x10, 0xee, 0x75, 0xf9, -+ 0x97, 0x66, 0xfc, 0x4d, 0x33, 0x6e, 0x28, 0x2b, -+ 0x92, 0x85, 0x4f, 0xab, 0x43, 0x8d, 0x8f, 0x7d, -+ 0x86, 0xa7, 0xc7, 0xd8, 0xd3, 0x0b, 0x8b, 0x57, -+ 0xb6, 0x1d, 0x95, 0x0d, 0xe9, 0xbc, 0xd9, 0x03, -+ 0xd9, 0x10, 0x19, 0xc3, 0x46, 0x63, 0x55, 0x87, -+ 0x61, 0x79, 0x6c, 0x95, 0x0e, 0x9c, 0xdd, 0xca, -+ 0xc3, 0xf3, 0x64, 0xf0, 0x7d, 0x76, 0xb7, 0x53, -+ 0x67, 0x2b, 0x1e, 0x44, 0x56, 0x81, 0xea, 0x8f, -+ 0x5c, 0x42, 0x16, 0xb8, 0x28, 0xeb, 0x1b, 0x61, -+ 0x10, 0x1e, 0xbf, 0xec, 0xa8 -+}; -+static const u8 enc_output011[] __initconst = { -+ 0x6a, 0xfc, 0x4b, 0x25, 0xdf, 0xc0, 0xe4, 0xe8, -+ 0x17, 0x4d, 0x4c, 0xc9, 0x7e, 0xde, 0x3a, 0xcc, -+ 0x3c, 0xba, 0x6a, 0x77, 0x47, 0xdb, 0xe3, 0x74, -+ 0x7a, 0x4d, 0x5f, 0x8d, 0x37, 0x55, 0x80, 0x73, -+ 0x90, 0x66, 0x5d, 0x3a, 0x7d, 0x5d, 0x86, 0x5e, -+ 0x8d, 0xfd, 0x83, 0xff, 0x4e, 0x74, 0x6f, 0xf9, -+ 0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 0xd6, 0x31, 0xda, 0x5d, 0x42, 0x5e, 0xd7 -+}; -+static const u8 enc_nonce011[] __initconst = { -+ 0xfd, 0x87, 0xd4, 0xd8, 0x62, 0xfd, 0xec, 0xaa -+}; -+static const u8 enc_key011[] __initconst = { -+ 0x35, 0x4e, 0xb5, 0x70, 0x50, 0x42, 0x8a, 0x85, -+ 0xf2, 0xfb, 0xed, 0x7b, 0xd0, 0x9e, 0x97, 0xca, -+ 0xfa, 0x98, 0x66, 0x63, 0xee, 0x37, 0xcc, 0x52, -+ 0xfe, 0xd1, 0xdf, 0x95, 0x15, 0x34, 0x29, 0x38 -+}; -+ -+static const u8 enc_input012[] __initconst = { -+ 0x74, 0xa6, 0x3e, 0xe4, 0xb1, 0xcb, 0xaf, 0xb0, -+ 0x40, 0xe5, 0x0f, 0x9e, 0xf1, 0xf2, 0x89, 0xb5, -+ 0x42, 0x34, 0x8a, 0xa1, 0x03, 0xb7, 0xe9, 0x57, -+ 0x46, 0xbe, 0x20, 0xe4, 0x6e, 0xb0, 0xeb, 0xff, -+ 0xea, 0x07, 0x7e, 0xef, 0xe2, 0x55, 0x9f, 0xe5, -+ 0x78, 0x3a, 0xb7, 0x83, 0xc2, 0x18, 0x40, 0x7b, -+ 0xeb, 0xcd, 0x81, 0xfb, 0x90, 0x12, 0x9e, 0x46, -+ 0xa9, 0xd6, 0x4a, 0xba, 0xb0, 0x62, 0xdb, 0x6b, -+ 0x99, 0xc4, 0xdb, 0x54, 0x4b, 0xb8, 0xa5, 0x71, -+ 0xcb, 0xcd, 0x63, 0x32, 0x55, 0xfb, 0x31, 0xf0, -+ 0x38, 0xf5, 0xbe, 0x78, 0xe4, 0x45, 0xce, 0x1b, -+ 0x6a, 0x5b, 0x0e, 0xf4, 0x16, 0xe4, 0xb1, 0x3d, -+ 0xf6, 0x63, 0x7b, 0xa7, 0x0c, 0xde, 0x6f, 0x8f, -+ 0x74, 0xdf, 0xe0, 0x1e, 0x9d, 0xce, 0x8f, 0x24, -+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0x78, 0xec, 0x00 -+}; -+static const u8 enc_output012[] __initconst = { -+ 0x52, 0x34, 0xb3, 0x65, 0x3b, 0xb7, 0xe5, 0xd3, -+ 0xab, 0x49, 0x17, 0x60, 0xd2, 0x52, 0x56, 0xdf, -+ 0xdf, 0x34, 0x56, 0x82, 0xe2, 0xbe, 0xe5, 0xe1, -+ 0x28, 0xd1, 0x4e, 0x5f, 0x4f, 0x01, 0x7d, 0x3f, -+ 0x99, 0x6b, 0x30, 0x6e, 0x1a, 0x7c, 0x4c, 0x8e, -+ 0x62, 0x81, 0xae, 0x86, 0x3f, 0x6b, 0xd0, 0xb5, -+ 0xa9, 0xcf, 0x50, 0xf1, 0x02, 0x12, 0xa0, 0x0b, -+ 0x24, 0xe9, 0xe6, 0x72, 0x89, 0x2c, 0x52, 0x1b, -+ 0x34, 0x38, 0xf8, 0x75, 0x5f, 0xa0, 0x74, 0xe2, -+ 0x99, 0xdd, 0xa6, 0x4b, 0x14, 0x50, 0x4e, 0xf1, -+ 0xbe, 0xd6, 0x9e, 0xdb, 0xb2, 0x24, 0x27, 0x74, -+ 0x12, 0x4a, 0x78, 0x78, 0x17, 0xa5, 0x58, 0x8e, -+ 0x2f, 0xf9, 0xf4, 0x8d, 0xee, 0x03, 0x88, 0xae, -+ 0xb8, 0x29, 0xa1, 0x2f, 0x4b, 0xee, 0x92, 0xbd, -+ 0x87, 0xb3, 0xce, 0x34, 0x21, 0x57, 0x46, 0x04, -+ 0x49, 0x0c, 0x80, 0xf2, 0x01, 0x13, 0xa1, 0x55, -+ 0xb3, 0xff, 0x44, 0x30, 0x3c, 0x1c, 0xd0, 0xef, -+ 0xbc, 0x18, 0x74, 0x26, 0xad, 0x41, 0x5b, 0x5b, -+ 0x3e, 0x9a, 0x7a, 0x46, 0x4f, 0x16, 0xd6, 0x74, -+ 0x5a, 0xb7, 0x3a, 0x28, 0x31, 0xd8, 0xae, 0x26, -+ 0xac, 0x50, 0x53, 0x86, 0xf2, 0x56, 0xd7, 0x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a, 0x90, 0x60, 0x55, -+ 0xfe, 0x88, 0xa5, 0x8b, 0xb8, 0x33, 0x0c, 0x23, -+ 0x24, 0x0d, 0x15, 0x70, 0x37, 0x1e, 0x3d, 0xf6, -+ 0xd2, 0xea, 0x92, 0x10, 0xb2, 0xc4, 0x51, 0xac, -+ 0xf2, 0xac, 0xf3, 0x6b, 0x6c, 0xaa, 0xcf, 0x12, -+ 0xc5, 0x6c, 0x90, 0x50, 0xb5, 0x0c, 0xfc, 0x1a, -+ 0x15, 0x52, 0xe9, 0x26, 0xc6, 0x52, 0xa4, 0xe7, -+ 0x81, 0x69, 0xe1, 0xe7, 0x9e, 0x30, 0x01, 0xec, -+ 0x84, 0x89, 0xb2, 0x0d, 0x66, 0xdd, 0xce, 0x28, -+ 0x5c, 0xec, 0x98, 0x46, 0x68, 0x21, 0x9f, 0x88, -+ 0x3f, 0x1f, 0x42, 0x77, 0xce, 0xd0, 0x61, 0xd4, -+ 0x20, 0xa7, 0xff, 0x53, 0xad, 0x37, 0xd0, 0x17, -+ 0x35, 0xc9, 0xfc, 0xba, 0x0a, 0x78, 0x3f, 0xf2, -+ 0xcc, 0x86, 0x89, 0xe8, 0x4b, 0x3c, 0x48, 0x33, -+ 0x09, 0x7f, 0xc6, 0xc0, 0xdd, 0xb8, 0xfd, 0x7a, -+ 0x66, 0x66, 0x65, 0xeb, 0x47, 0xa7, 0x04, 0x28, -+ 0xa3, 0x19, 0x8e, 0xa9, 0xb1, 0x13, 0x67, 0x62, -+ 0x70, 0xcf, 0xd6 -+}; -+static const u8 enc_assoc012[] __initconst = { -+ 0xb1, 0x69, 0x83, 0x87, 0x30, 0xaa, 0x5d, 0xb8, -+ 0x77, 0xe8, 0x21, 0xff, 0x06, 0x59, 0x35, 0xce, -+ 0x75, 0xfe, 0x38, 0xef, 0xb8, 0x91, 0x43, 0x8c, -+ 0xcf, 0x70, 0xdd, 0x0a, 0x68, 0xbf, 0xd4, 0xbc, -+ 0x16, 0x76, 0x99, 0x36, 0x1e, 0x58, 0x79, 0x5e, -+ 0xd4, 0x29, 0xf7, 0x33, 0x93, 0x48, 0xdb, 0x5f, -+ 0x01, 0xae, 0x9c, 0xb6, 0xe4, 0x88, 0x6d, 0x2b, -+ 0x76, 0x75, 0xe0, 0xf3, 0x74, 0xe2, 0xc9 -+}; -+static const u8 enc_nonce012[] __initconst = { -+ 0x05, 0xa3, 0x93, 0xed, 0x30, 0xc5, 0xa2, 0x06 -+}; -+static const u8 enc_key012[] __initconst = { -+ 0xb3, 0x35, 0x50, 0x03, 0x54, 0x2e, 0x40, 0x5e, -+ 0x8f, 0x59, 0x8e, 0xc5, 0x90, 0xd5, 0x27, 0x2d, -+ 0xba, 0x29, 0x2e, 0xcb, 0x1b, 0x70, 0x44, 0x1e, -+ 0x65, 0x91, 0x6e, 0x2a, 0x79, 0x22, 0xda, 0x64 -+}; -+ -+/* wycheproof - rfc7539 */ -+static const u8 enc_input013[] __initconst = { -+ 0x4c, 0x61, 0x64, 0x69, 0x65, 0x73, 0x20, 0x61, -+ 0x6e, 0x64, 0x20, 0x47, 0x65, 0x6e, 0x74, 0x6c, -+ 0x65, 0x6d, 0x65, 0x6e, 0x20, 0x6f, 0x66, 0x20, -+ 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x61, 0x73, -+ 0x73, 0x20, 0x6f, 0x66, 0x20, 0x27, 0x39, 0x39, -+ 0x3a, 0x20, 0x49, 0x66, 0x20, 0x49, 0x20, 0x63, -+ 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6f, 0x66, 0x66, -+ 0x65, 0x72, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6f, -+ 0x6e, 0x6c, 0x79, 0x20, 0x6f, 0x6e, 0x65, 0x20, -+ 0x74, 0x69, 0x70, 0x20, 0x66, 0x6f, 0x72, 0x20, -+ 0x74, 0x68, 0x65, 0x20, 0x66, 0x75, 0x74, 0x75, -+ 0x72, 0x65, 0x2c, 0x20, 0x73, 0x75, 0x6e, 0x73, -+ 0x63, 0x72, 0x65, 0x65, 0x6e, 0x20, 0x77, 0x6f, -+ 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x69, -+ 0x74, 0x2e -+}; -+static const u8 enc_output013[] __initconst = { -+ 0xd3, 0x1a, 0x8d, 0x34, 0x64, 0x8e, 0x60, 0xdb, -+ 0x7b, 0x86, 0xaf, 0xbc, 0x53, 0xef, 0x7e, 0xc2, -+ 0xa4, 0xad, 0xed, 0x51, 0x29, 0x6e, 0x08, 0xfe, -+ 0xa9, 0xe2, 0xb5, 0xa7, 0x36, 0xee, 0x62, 0xd6, -+ 0x3d, 0xbe, 0xa4, 0x5e, 0x8c, 0xa9, 0x67, 0x12, -+ 0x82, 0xfa, 0xfb, 0x69, 0xda, 0x92, 0x72, 0x8b, -+ 0x1a, 0x71, 0xde, 0x0a, 0x9e, 0x06, 0x0b, 0x29, -+ 0x05, 0xd6, 0xa5, 0xb6, 0x7e, 0xcd, 0x3b, 0x36, -+ 0x92, 0xdd, 0xbd, 0x7f, 0x2d, 0x77, 0x8b, 0x8c, -+ 0x98, 0x03, 0xae, 0xe3, 0x28, 0x09, 0x1b, 0x58, -+ 0xfa, 0xb3, 0x24, 0xe4, 0xfa, 0xd6, 0x75, 0x94, -+ 0x55, 0x85, 0x80, 0x8b, 0x48, 0x31, 0xd7, 0xbc, -+ 0x3f, 0xf4, 0xde, 0xf0, 0x8e, 0x4b, 0x7a, 0x9d, -+ 0xe5, 0x76, 0xd2, 0x65, 0x86, 0xce, 0xc6, 0x4b, -+ 0x61, 0x16, 0x1a, 0xe1, 0x0b, 0x59, 0x4f, 0x09, -+ 0xe2, 0x6a, 0x7e, 0x90, 0x2e, 0xcb, 0xd0, 0x60, -+ 0x06, 0x91 -+}; -+static const u8 enc_assoc013[] __initconst = { -+ 0x50, 0x51, 0x52, 0x53, 0xc0, 0xc1, 0xc2, 0xc3, -+ 0xc4, 0xc5, 0xc6, 0xc7 -+}; -+static const u8 enc_nonce013[] __initconst = { -+ 0x07, 0x00, 0x00, 0x00, 0x40, 0x41, 0x42, 0x43, -+ 0x44, 0x45, 0x46, 0x47 -+}; -+static const u8 enc_key013[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input014[] __initconst = { }; -+static const u8 enc_output014[] __initconst = { -+ 0x76, 0xac, 0xb3, 0x42, 0xcf, 0x31, 0x66, 0xa5, -+ 0xb6, 0x3c, 0x0c, 0x0e, 0xa1, 0x38, 0x3c, 0x8d -+}; -+static const u8 enc_assoc014[] __initconst = { }; -+static const u8 enc_nonce014[] __initconst = { -+ 0x4d, 0xa5, 0xbf, 0x8d, 0xfd, 0x58, 0x52, 0xc1, -+ 0xea, 0x12, 0x37, 0x9d -+}; -+static const u8 enc_key014[] __initconst = { -+ 0x80, 0xba, 0x31, 0x92, 0xc8, 0x03, 0xce, 0x96, -+ 0x5e, 0xa3, 0x71, 0xd5, 0xff, 0x07, 0x3c, 0xf0, -+ 0xf4, 0x3b, 0x6a, 0x2a, 0xb5, 0x76, 0xb2, 0x08, -+ 0x42, 0x6e, 0x11, 0x40, 0x9c, 0x09, 0xb9, 0xb0 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input015[] __initconst = { }; -+static const u8 enc_output015[] __initconst = { -+ 0x90, 0x6f, 0xa6, 0x28, 0x4b, 0x52, 0xf8, 0x7b, -+ 0x73, 0x59, 0xcb, 0xaa, 0x75, 0x63, 0xc7, 0x09 -+}; -+static const u8 enc_assoc015[] __initconst = { -+ 0xbd, 0x50, 0x67, 0x64, 0xf2, 0xd2, 0xc4, 0x10 -+}; -+static const u8 enc_nonce015[] __initconst = { -+ 0xa9, 0x2e, 0xf0, 0xac, 0x99, 0x1d, 0xd5, 0x16, -+ 0xa3, 0xc6, 0xf6, 0x89 -+}; -+static const u8 enc_key015[] __initconst = { -+ 0x7a, 0x4c, 0xd7, 0x59, 0x17, 0x2e, 0x02, 0xeb, -+ 0x20, 0x4d, 0xb2, 0xc3, 0xf5, 0xc7, 0x46, 0x22, -+ 0x7d, 0xf5, 0x84, 0xfc, 0x13, 0x45, 0x19, 0x63, -+ 0x91, 0xdb, 0xb9, 0x57, 0x7a, 0x25, 0x07, 0x42 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input016[] __initconst = { -+ 0x2a -+}; -+static const u8 enc_output016[] __initconst = { -+ 0x3a, 0xca, 0xc2, 0x7d, 0xec, 0x09, 0x68, 0x80, -+ 0x1e, 0x9f, 0x6e, 0xde, 0xd6, 0x9d, 0x80, 0x75, -+ 0x22 -+}; -+static const u8 enc_assoc016[] __initconst = { }; -+static const u8 enc_nonce016[] __initconst = { -+ 0x99, 0xe2, 0x3e, 0xc4, 0x89, 0x85, 0xbc, 0xcd, -+ 0xee, 0xab, 0x60, 0xf1 -+}; -+static const u8 enc_key016[] __initconst = { -+ 0xcc, 0x56, 0xb6, 0x80, 0x55, 0x2e, 0xb7, 0x50, -+ 0x08, 0xf5, 0x48, 0x4b, 0x4c, 0xb8, 0x03, 0xfa, -+ 0x50, 0x63, 0xeb, 0xd6, 0xea, 0xb9, 0x1f, 0x6a, -+ 0xb6, 0xae, 0xf4, 0x91, 0x6a, 0x76, 0x62, 0x73 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input017[] __initconst = { -+ 0x51 -+}; -+static const u8 enc_output017[] __initconst = { -+ 0xc4, 0x16, 0x83, 0x10, 0xca, 0x45, 0xb1, 0xf7, -+ 0xc6, 0x6c, 0xad, 0x4e, 0x99, 0xe4, 0x3f, 0x72, -+ 0xb9 -+}; -+static const u8 enc_assoc017[] __initconst = { -+ 0x91, 0xca, 0x6c, 0x59, 0x2c, 0xbc, 0xca, 0x53 -+}; -+static const u8 enc_nonce017[] __initconst = { -+ 0xab, 0x0d, 0xca, 0x71, 0x6e, 0xe0, 0x51, 0xd2, -+ 0x78, 0x2f, 0x44, 0x03 -+}; -+static const u8 enc_key017[] __initconst = { -+ 0x46, 0xf0, 0x25, 0x49, 0x65, 0xf7, 0x69, 0xd5, -+ 0x2b, 0xdb, 0x4a, 0x70, 0xb4, 0x43, 0x19, 0x9f, -+ 0x8e, 0xf2, 0x07, 0x52, 0x0d, 0x12, 0x20, 0xc5, -+ 0x5e, 0x4b, 0x70, 0xf0, 0xfd, 0xa6, 0x20, 0xee -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input018[] __initconst = { -+ 0x5c, 0x60 -+}; -+static const u8 enc_output018[] __initconst = { -+ 0x4d, 0x13, 0x91, 0xe8, 0xb6, 0x1e, 0xfb, 0x39, -+ 0xc1, 0x22, 0x19, 0x54, 0x53, 0x07, 0x7b, 0x22, -+ 0xe5, 0xe2 -+}; -+static const u8 enc_assoc018[] __initconst = { }; -+static const u8 enc_nonce018[] __initconst = { -+ 0x46, 0x1a, 0xf1, 0x22, 0xe9, 0xf2, 0xe0, 0x34, -+ 0x7e, 0x03, 0xf2, 0xdb -+}; -+static const u8 enc_key018[] __initconst = { -+ 0x2f, 0x7f, 0x7e, 0x4f, 0x59, 0x2b, 0xb3, 0x89, -+ 0x19, 0x49, 0x89, 0x74, 0x35, 0x07, 0xbf, 0x3e, -+ 0xe9, 0xcb, 0xde, 0x17, 0x86, 0xb6, 0x69, 0x5f, -+ 0xe6, 0xc0, 0x25, 0xfd, 0x9b, 0xa4, 0xc1, 0x00 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input019[] __initconst = { -+ 0xdd, 0xf2 -+}; -+static const u8 enc_output019[] __initconst = { -+ 0xb6, 0x0d, 0xea, 0xd0, 0xfd, 0x46, 0x97, 0xec, -+ 0x2e, 0x55, 0x58, 0x23, 0x77, 0x19, 0xd0, 0x24, -+ 0x37, 0xa2 -+}; -+static const u8 enc_assoc019[] __initconst = { -+ 0x88, 0x36, 0x4f, 0xc8, 0x06, 0x05, 0x18, 0xbf -+}; -+static const u8 enc_nonce019[] __initconst = { -+ 0x61, 0x54, 0x6b, 0xa5, 0xf1, 0x72, 0x05, 0x90, -+ 0xb6, 0x04, 0x0a, 0xc6 -+}; -+static const u8 enc_key019[] __initconst = { -+ 0xc8, 0x83, 0x3d, 0xce, 0x5e, 0xa9, 0xf2, 0x48, -+ 0xaa, 0x20, 0x30, 0xea, 0xcf, 0xe7, 0x2b, 0xff, -+ 0xe6, 0x9a, 0x62, 0x0c, 0xaf, 0x79, 0x33, 0x44, -+ 0xe5, 0x71, 0x8f, 0xe0, 0xd7, 0xab, 0x1a, 0x58 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input020[] __initconst = { -+ 0xab, 0x85, 0xe9, 0xc1, 0x57, 0x17, 0x31 -+}; -+static const u8 enc_output020[] __initconst = { -+ 0x5d, 0xfe, 0x34, 0x40, 0xdb, 0xb3, 0xc3, 0xed, -+ 0x7a, 0x43, 0x4e, 0x26, 0x02, 0xd3, 0x94, 0x28, -+ 0x1e, 0x0a, 0xfa, 0x9f, 0xb7, 0xaa, 0x42 -+}; -+static const u8 enc_assoc020[] __initconst = { }; -+static const u8 enc_nonce020[] __initconst = { -+ 0x3c, 0x4e, 0x65, 0x4d, 0x66, 0x3f, 0xa4, 0x59, -+ 0x6d, 0xc5, 0x5b, 0xb7 -+}; -+static const u8 enc_key020[] __initconst = { -+ 0x55, 0x56, 0x81, 0x58, 0xd3, 0xa6, 0x48, 0x3f, -+ 0x1f, 0x70, 0x21, 0xea, 0xb6, 0x9b, 0x70, 0x3f, -+ 0x61, 0x42, 0x51, 0xca, 0xdc, 0x1a, 0xf5, 0xd3, -+ 0x4a, 0x37, 0x4f, 0xdb, 0xfc, 0x5a, 0xda, 0xc7 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input021[] __initconst = { -+ 0x4e, 0xe5, 0xcd, 0xa2, 0x0d, 0x42, 0x90 -+}; -+static const u8 enc_output021[] __initconst = { -+ 0x4b, 0xd4, 0x72, 0x12, 0x94, 0x1c, 0xe3, 0x18, -+ 0x5f, 0x14, 0x08, 0xee, 0x7f, 0xbf, 0x18, 0xf5, -+ 0xab, 0xad, 0x6e, 0x22, 0x53, 0xa1, 0xba -+}; -+static const u8 enc_assoc021[] __initconst = { -+ 0x84, 0xe4, 0x6b, 0xe8, 0xc0, 0x91, 0x90, 0x53 -+}; -+static const u8 enc_nonce021[] __initconst = { -+ 0x58, 0x38, 0x93, 0x75, 0xc6, 0x9e, 0xe3, 0x98, -+ 0xde, 0x94, 0x83, 0x96 -+}; -+static const u8 enc_key021[] __initconst = { -+ 0xe3, 0xc0, 0x9e, 0x7f, 0xab, 0x1a, 0xef, 0xb5, -+ 0x16, 0xda, 0x6a, 0x33, 0x02, 0x2a, 0x1d, 0xd4, -+ 0xeb, 0x27, 0x2c, 0x80, 0xd5, 0x40, 0xc5, 0xda, -+ 0x52, 0xa7, 0x30, 0xf3, 0x4d, 0x84, 0x0d, 0x7f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input022[] __initconst = { -+ 0xbe, 0x33, 0x08, 0xf7, 0x2a, 0x2c, 0x6a, 0xed -+}; -+static const u8 enc_output022[] __initconst = { -+ 0x8e, 0x94, 0x39, 0xa5, 0x6e, 0xee, 0xc8, 0x17, -+ 0xfb, 0xe8, 0xa6, 0xed, 0x8f, 0xab, 0xb1, 0x93, -+ 0x75, 0x39, 0xdd, 0x6c, 0x00, 0xe9, 0x00, 0x21 -+}; -+static const u8 enc_assoc022[] __initconst = { }; -+static const u8 enc_nonce022[] __initconst = { -+ 0x4f, 0x07, 0xaf, 0xed, 0xfd, 0xc3, 0xb6, 0xc2, -+ 0x36, 0x18, 0x23, 0xd3 -+}; -+static const u8 enc_key022[] __initconst = { -+ 0x51, 0xe4, 0xbf, 0x2b, 0xad, 0x92, 0xb7, 0xaf, -+ 0xf1, 0xa4, 0xbc, 0x05, 0x55, 0x0b, 0xa8, 0x1d, -+ 0xf4, 0xb9, 0x6f, 0xab, 0xf4, 0x1c, 0x12, 0xc7, -+ 0xb0, 0x0e, 0x60, 0xe4, 0x8d, 0xb7, 0xe1, 0x52 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input023[] __initconst = { -+ 0xa4, 0xc9, 0xc2, 0x80, 0x1b, 0x71, 0xf7, 0xdf -+}; -+static const u8 enc_output023[] __initconst = { -+ 0xb9, 0xb9, 0x10, 0x43, 0x3a, 0xf0, 0x52, 0xb0, -+ 0x45, 0x30, 0xf5, 0x1a, 0xee, 0xe0, 0x24, 0xe0, -+ 0xa4, 0x45, 0xa6, 0x32, 0x8f, 0xa6, 0x7a, 0x18 -+}; -+static const u8 enc_assoc023[] __initconst = { -+ 0x66, 0xc0, 0xae, 0x70, 0x07, 0x6c, 0xb1, 0x4d -+}; -+static const u8 enc_nonce023[] __initconst = { -+ 0xb4, 0xea, 0x66, 0x6e, 0xe1, 0x19, 0x56, 0x33, -+ 0x66, 0x48, 0x4a, 0x78 -+}; -+static const u8 enc_key023[] __initconst = { -+ 0x11, 0x31, 0xc1, 0x41, 0x85, 0x77, 0xa0, 0x54, -+ 0xde, 0x7a, 0x4a, 0xc5, 0x51, 0x95, 0x0f, 0x1a, -+ 0x05, 0x3f, 0x9a, 0xe4, 0x6e, 0x5b, 0x75, 0xfe, -+ 0x4a, 0xbd, 0x56, 0x08, 0xd7, 0xcd, 0xda, 0xdd -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input024[] __initconst = { -+ 0x42, 0xba, 0xae, 0x59, 0x78, 0xfe, 0xaf, 0x5c, -+ 0x36, 0x8d, 0x14, 0xe0 -+}; -+static const u8 enc_output024[] __initconst = { -+ 0xff, 0x7d, 0xc2, 0x03, 0xb2, 0x6c, 0x46, 0x7a, -+ 0x6b, 0x50, 0xdb, 0x33, 0x57, 0x8c, 0x0f, 0x27, -+ 0x58, 0xc2, 0xe1, 0x4e, 0x36, 0xd4, 0xfc, 0x10, -+ 0x6d, 0xcb, 0x29, 0xb4 -+}; -+static const u8 enc_assoc024[] __initconst = { }; -+static const u8 enc_nonce024[] __initconst = { -+ 0x9a, 0x59, 0xfc, 0xe2, 0x6d, 0xf0, 0x00, 0x5e, -+ 0x07, 0x53, 0x86, 0x56 -+}; -+static const u8 enc_key024[] __initconst = { -+ 0x99, 0xb6, 0x2b, 0xd5, 0xaf, 0xbe, 0x3f, 0xb0, -+ 0x15, 0xbd, 0xe9, 0x3f, 0x0a, 0xbf, 0x48, 0x39, -+ 0x57, 0xa1, 0xc3, 0xeb, 0x3c, 0xa5, 0x9c, 0xb5, -+ 0x0b, 0x39, 0xf7, 0xf8, 0xa9, 0xcc, 0x51, 0xbe -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input025[] __initconst = { -+ 0xfd, 0xc8, 0x5b, 0x94, 0xa4, 0xb2, 0xa6, 0xb7, -+ 0x59, 0xb1, 0xa0, 0xda -+}; -+static const u8 enc_output025[] __initconst = { -+ 0x9f, 0x88, 0x16, 0xde, 0x09, 0x94, 0xe9, 0x38, -+ 0xd9, 0xe5, 0x3f, 0x95, 0xd0, 0x86, 0xfc, 0x6c, -+ 0x9d, 0x8f, 0xa9, 0x15, 0xfd, 0x84, 0x23, 0xa7, -+ 0xcf, 0x05, 0x07, 0x2f -+}; -+static const u8 enc_assoc025[] __initconst = { -+ 0xa5, 0x06, 0xe1, 0xa5, 0xc6, 0x90, 0x93, 0xf9 -+}; -+static const u8 enc_nonce025[] __initconst = { -+ 0x58, 0xdb, 0xd4, 0xad, 0x2c, 0x4a, 0xd3, 0x5d, -+ 0xd9, 0x06, 0xe9, 0xce -+}; -+static const u8 enc_key025[] __initconst = { -+ 0x85, 0xf3, 0x5b, 0x62, 0x82, 0xcf, 0xf4, 0x40, -+ 0xbc, 0x10, 0x20, 0xc8, 0x13, 0x6f, 0xf2, 0x70, -+ 0x31, 0x11, 0x0f, 0xa6, 0x3e, 0xc1, 0x6f, 0x1e, -+ 0x82, 0x51, 0x18, 0xb0, 0x06, 0xb9, 0x12, 0x57 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input026[] __initconst = { -+ 0x51, 0xf8, 0xc1, 0xf7, 0x31, 0xea, 0x14, 0xac, -+ 0xdb, 0x21, 0x0a, 0x6d, 0x97, 0x3e, 0x07 -+}; -+static const u8 enc_output026[] __initconst = { -+ 0x0b, 0x29, 0x63, 0x8e, 0x1f, 0xbd, 0xd6, 0xdf, -+ 0x53, 0x97, 0x0b, 0xe2, 0x21, 0x00, 0x42, 0x2a, -+ 0x91, 0x34, 0x08, 0x7d, 0x67, 0xa4, 0x6e, 0x79, -+ 0x17, 0x8d, 0x0a, 0x93, 0xf5, 0xe1, 0xd2 -+}; -+static const u8 enc_assoc026[] __initconst = { }; -+static const u8 enc_nonce026[] __initconst = { -+ 0x68, 0xab, 0x7f, 0xdb, 0xf6, 0x19, 0x01, 0xda, -+ 0xd4, 0x61, 0xd2, 0x3c -+}; -+static const u8 enc_key026[] __initconst = { -+ 0x67, 0x11, 0x96, 0x27, 0xbd, 0x98, 0x8e, 0xda, -+ 0x90, 0x62, 0x19, 0xe0, 0x8c, 0x0d, 0x0d, 0x77, -+ 0x9a, 0x07, 0xd2, 0x08, 0xce, 0x8a, 0x4f, 0xe0, -+ 0x70, 0x9a, 0xf7, 0x55, 0xee, 0xec, 0x6d, 0xcb -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input027[] __initconst = { -+ 0x97, 0x46, 0x9d, 0xa6, 0x67, 0xd6, 0x11, 0x0f, -+ 0x9c, 0xbd, 0xa1, 0xd1, 0xa2, 0x06, 0x73 -+}; -+static const u8 enc_output027[] __initconst = { -+ 0x32, 0xdb, 0x66, 0xc4, 0xa3, 0x81, 0x9d, 0x81, -+ 0x55, 0x74, 0x55, 0xe5, 0x98, 0x0f, 0xed, 0xfe, -+ 0xae, 0x30, 0xde, 0xc9, 0x4e, 0x6a, 0xd3, 0xa9, -+ 0xee, 0xa0, 0x6a, 0x0d, 0x70, 0x39, 0x17 -+}; -+static const u8 enc_assoc027[] __initconst = { -+ 0x64, 0x53, 0xa5, 0x33, 0x84, 0x63, 0x22, 0x12 -+}; -+static const u8 enc_nonce027[] __initconst = { -+ 0xd9, 0x5b, 0x32, 0x43, 0xaf, 0xae, 0xf7, 0x14, -+ 0xc5, 0x03, 0x5b, 0x6a -+}; -+static const u8 enc_key027[] __initconst = { -+ 0xe6, 0xf1, 0x11, 0x8d, 0x41, 0xe4, 0xb4, 0x3f, -+ 0xb5, 0x82, 0x21, 0xb7, 0xed, 0x79, 0x67, 0x38, -+ 0x34, 0xe0, 0xd8, 0xac, 0x5c, 0x4f, 0xa6, 0x0b, -+ 0xbc, 0x8b, 0xc4, 0x89, 0x3a, 0x58, 0x89, 0x4d -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input028[] __initconst = { -+ 0x54, 0x9b, 0x36, 0x5a, 0xf9, 0x13, 0xf3, 0xb0, -+ 0x81, 0x13, 0x1c, 0xcb, 0x6b, 0x82, 0x55, 0x88 -+}; -+static const u8 enc_output028[] __initconst = { -+ 0xe9, 0x11, 0x0e, 0x9f, 0x56, 0xab, 0x3c, 0xa4, -+ 0x83, 0x50, 0x0c, 0xea, 0xba, 0xb6, 0x7a, 0x13, -+ 0x83, 0x6c, 0xca, 0xbf, 0x15, 0xa6, 0xa2, 0x2a, -+ 0x51, 0xc1, 0x07, 0x1c, 0xfa, 0x68, 0xfa, 0x0c -+}; -+static const u8 enc_assoc028[] __initconst = { }; -+static const u8 enc_nonce028[] __initconst = { -+ 0x2f, 0xcb, 0x1b, 0x38, 0xa9, 0x9e, 0x71, 0xb8, -+ 0x47, 0x40, 0xad, 0x9b -+}; -+static const u8 enc_key028[] __initconst = { -+ 0x59, 0xd4, 0xea, 0xfb, 0x4d, 0xe0, 0xcf, 0xc7, -+ 0xd3, 0xdb, 0x99, 0xa8, 0xf5, 0x4b, 0x15, 0xd7, -+ 0xb3, 0x9f, 0x0a, 0xcc, 0x8d, 0xa6, 0x97, 0x63, -+ 0xb0, 0x19, 0xc1, 0x69, 0x9f, 0x87, 0x67, 0x4a -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input029[] __initconst = { -+ 0x55, 0xa4, 0x65, 0x64, 0x4f, 0x5b, 0x65, 0x09, -+ 0x28, 0xcb, 0xee, 0x7c, 0x06, 0x32, 0x14, 0xd6 -+}; -+static const u8 enc_output029[] __initconst = { -+ 0xe4, 0xb1, 0x13, 0xcb, 0x77, 0x59, 0x45, 0xf3, -+ 0xd3, 0xa8, 0xae, 0x9e, 0xc1, 0x41, 0xc0, 0x0c, -+ 0x7c, 0x43, 0xf1, 0x6c, 0xe0, 0x96, 0xd0, 0xdc, -+ 0x27, 0xc9, 0x58, 0x49, 0xdc, 0x38, 0x3b, 0x7d -+}; -+static const u8 enc_assoc029[] __initconst = { -+ 0x03, 0x45, 0x85, 0x62, 0x1a, 0xf8, 0xd7, 0xff -+}; -+static const u8 enc_nonce029[] __initconst = { -+ 0x11, 0x8a, 0x69, 0x64, 0xc2, 0xd3, 0xe3, 0x80, -+ 0x07, 0x1f, 0x52, 0x66 -+}; -+static const u8 enc_key029[] __initconst = { -+ 0xb9, 0x07, 0xa4, 0x50, 0x75, 0x51, 0x3f, 0xe8, -+ 0xa8, 0x01, 0x9e, 0xde, 0xe3, 0xf2, 0x59, 0x14, -+ 0x87, 0xb2, 0xa0, 0x30, 0xb0, 0x3c, 0x6e, 0x1d, -+ 0x77, 0x1c, 0x86, 0x25, 0x71, 0xd2, 0xea, 0x1e -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input030[] __initconst = { -+ 0x3f, 0xf1, 0x51, 0x4b, 0x1c, 0x50, 0x39, 0x15, -+ 0x91, 0x8f, 0x0c, 0x0c, 0x31, 0x09, 0x4a, 0x6e, -+ 0x1f -+}; -+static const u8 enc_output030[] __initconst = { -+ 0x02, 0xcc, 0x3a, 0xcb, 0x5e, 0xe1, 0xfc, 0xdd, -+ 0x12, 0xa0, 0x3b, 0xb8, 0x57, 0x97, 0x64, 0x74, -+ 0xd3, 0xd8, 0x3b, 0x74, 0x63, 0xa2, 0xc3, 0x80, -+ 0x0f, 0xe9, 0x58, 0xc2, 0x8e, 0xaa, 0x29, 0x08, -+ 0x13 -+}; -+static const u8 enc_assoc030[] __initconst = { }; -+static const u8 enc_nonce030[] __initconst = { -+ 0x45, 0xaa, 0xa3, 0xe5, 0xd1, 0x6d, 0x2d, 0x42, -+ 0xdc, 0x03, 0x44, 0x5d -+}; -+static const u8 enc_key030[] __initconst = { -+ 0x3b, 0x24, 0x58, 0xd8, 0x17, 0x6e, 0x16, 0x21, -+ 0xc0, 0xcc, 0x24, 0xc0, 0xc0, 0xe2, 0x4c, 0x1e, -+ 0x80, 0xd7, 0x2f, 0x7e, 0xe9, 0x14, 0x9a, 0x4b, -+ 0x16, 0x61, 0x76, 0x62, 0x96, 0x16, 0xd0, 0x11 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input031[] __initconst = { -+ 0x63, 0x85, 0x8c, 0xa3, 0xe2, 0xce, 0x69, 0x88, -+ 0x7b, 0x57, 0x8a, 0x3c, 0x16, 0x7b, 0x42, 0x1c, -+ 0x9c -+}; -+static const u8 enc_output031[] __initconst = { -+ 0x35, 0x76, 0x64, 0x88, 0xd2, 0xbc, 0x7c, 0x2b, -+ 0x8d, 0x17, 0xcb, 0xbb, 0x9a, 0xbf, 0xad, 0x9e, -+ 0x6d, 0x1f, 0x39, 0x1e, 0x65, 0x7b, 0x27, 0x38, -+ 0xdd, 0xa0, 0x84, 0x48, 0xcb, 0xa2, 0x81, 0x1c, -+ 0xeb -+}; -+static const u8 enc_assoc031[] __initconst = { -+ 0x9a, 0xaf, 0x29, 0x9e, 0xee, 0xa7, 0x8f, 0x79 -+}; -+static const u8 enc_nonce031[] __initconst = { -+ 0xf0, 0x38, 0x4f, 0xb8, 0x76, 0x12, 0x14, 0x10, -+ 0x63, 0x3d, 0x99, 0x3d -+}; -+static const u8 enc_key031[] __initconst = { -+ 0xf6, 0x0c, 0x6a, 0x1b, 0x62, 0x57, 0x25, 0xf7, -+ 0x6c, 0x70, 0x37, 0xb4, 0x8f, 0xe3, 0x57, 0x7f, -+ 0xa7, 0xf7, 0xb8, 0x7b, 0x1b, 0xd5, 0xa9, 0x82, -+ 0x17, 0x6d, 0x18, 0x23, 0x06, 0xff, 0xb8, 0x70 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input032[] __initconst = { -+ 0x10, 0xf1, 0xec, 0xf9, 0xc6, 0x05, 0x84, 0x66, -+ 0x5d, 0x9a, 0xe5, 0xef, 0xe2, 0x79, 0xe7, 0xf7, -+ 0x37, 0x7e, 0xea, 0x69, 0x16, 0xd2, 0xb1, 0x11 -+}; -+static const u8 enc_output032[] __initconst = { -+ 0x42, 0xf2, 0x6c, 0x56, 0xcb, 0x4b, 0xe2, 0x1d, -+ 0x9d, 0x8d, 0x0c, 0x80, 0xfc, 0x99, 0xdd, 0xe0, -+ 0x0d, 0x75, 0xf3, 0x80, 0x74, 0xbf, 0xe7, 0x64, -+ 0x54, 0xaa, 0x7e, 0x13, 0xd4, 0x8f, 0xff, 0x7d, -+ 0x75, 0x57, 0x03, 0x94, 0x57, 0x04, 0x0a, 0x3a -+}; -+static const u8 enc_assoc032[] __initconst = { }; -+static const u8 enc_nonce032[] __initconst = { -+ 0xe6, 0xb1, 0xad, 0xf2, 0xfd, 0x58, 0xa8, 0x76, -+ 0x2c, 0x65, 0xf3, 0x1b -+}; -+static const u8 enc_key032[] __initconst = { -+ 0x02, 0x12, 0xa8, 0xde, 0x50, 0x07, 0xed, 0x87, -+ 0xb3, 0x3f, 0x1a, 0x70, 0x90, 0xb6, 0x11, 0x4f, -+ 0x9e, 0x08, 0xce, 0xfd, 0x96, 0x07, 0xf2, 0xc2, -+ 0x76, 0xbd, 0xcf, 0xdb, 0xc5, 0xce, 0x9c, 0xd7 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input033[] __initconst = { -+ 0x92, 0x22, 0xf9, 0x01, 0x8e, 0x54, 0xfd, 0x6d, -+ 0xe1, 0x20, 0x08, 0x06, 0xa9, 0xee, 0x8e, 0x4c, -+ 0xc9, 0x04, 0xd2, 0x9f, 0x25, 0xcb, 0xa1, 0x93 -+}; -+static const u8 enc_output033[] __initconst = { -+ 0x12, 0x30, 0x32, 0x43, 0x7b, 0x4b, 0xfd, 0x69, -+ 0x20, 0xe8, 0xf7, 0xe7, 0xe0, 0x08, 0x7a, 0xe4, -+ 0x88, 0x9e, 0xbe, 0x7a, 0x0a, 0xd0, 0xe9, 0x00, -+ 0x3c, 0xf6, 0x8f, 0x17, 0x95, 0x50, 0xda, 0x63, -+ 0xd3, 0xb9, 0x6c, 0x2d, 0x55, 0x41, 0x18, 0x65 -+}; -+static const u8 enc_assoc033[] __initconst = { -+ 0x3e, 0x8b, 0xc5, 0xad, 0xe1, 0x82, 0xff, 0x08 -+}; -+static const u8 enc_nonce033[] __initconst = { -+ 0x6b, 0x28, 0x2e, 0xbe, 0xcc, 0x54, 0x1b, 0xcd, -+ 0x78, 0x34, 0xed, 0x55 -+}; -+static const u8 enc_key033[] __initconst = { -+ 0xc5, 0xbc, 0x09, 0x56, 0x56, 0x46, 0xe7, 0xed, -+ 0xda, 0x95, 0x4f, 0x1f, 0x73, 0x92, 0x23, 0xda, -+ 0xda, 0x20, 0xb9, 0x5c, 0x44, 0xab, 0x03, 0x3d, -+ 0x0f, 0xae, 0x4b, 0x02, 0x83, 0xd1, 0x8b, 0xe3 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input034[] __initconst = { -+ 0xb0, 0x53, 0x99, 0x92, 0x86, 0xa2, 0x82, 0x4f, -+ 0x42, 0xcc, 0x8c, 0x20, 0x3a, 0xb2, 0x4e, 0x2c, -+ 0x97, 0xa6, 0x85, 0xad, 0xcc, 0x2a, 0xd3, 0x26, -+ 0x62, 0x55, 0x8e, 0x55, 0xa5, 0xc7, 0x29 -+}; -+static const u8 enc_output034[] __initconst = { -+ 0x45, 0xc7, 0xd6, 0xb5, 0x3a, 0xca, 0xd4, 0xab, -+ 0xb6, 0x88, 0x76, 0xa6, 0xe9, 0x6a, 0x48, 0xfb, -+ 0x59, 0x52, 0x4d, 0x2c, 0x92, 0xc9, 0xd8, 0xa1, -+ 0x89, 0xc9, 0xfd, 0x2d, 0xb9, 0x17, 0x46, 0x56, -+ 0x6d, 0x3c, 0xa1, 0x0e, 0x31, 0x1b, 0x69, 0x5f, -+ 0x3e, 0xae, 0x15, 0x51, 0x65, 0x24, 0x93 -+}; -+static const u8 enc_assoc034[] __initconst = { }; -+static const u8 enc_nonce034[] __initconst = { -+ 0x04, 0xa9, 0xbe, 0x03, 0x50, 0x8a, 0x5f, 0x31, -+ 0x37, 0x1a, 0x6f, 0xd2 -+}; -+static const u8 enc_key034[] __initconst = { -+ 0x2e, 0xb5, 0x1c, 0x46, 0x9a, 0xa8, 0xeb, 0x9e, -+ 0x6c, 0x54, 0xa8, 0x34, 0x9b, 0xae, 0x50, 0xa2, -+ 0x0f, 0x0e, 0x38, 0x27, 0x11, 0xbb, 0xa1, 0x15, -+ 0x2c, 0x42, 0x4f, 0x03, 0xb6, 0x67, 0x1d, 0x71 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input035[] __initconst = { -+ 0xf4, 0x52, 0x06, 0xab, 0xc2, 0x55, 0x52, 0xb2, -+ 0xab, 0xc9, 0xab, 0x7f, 0xa2, 0x43, 0x03, 0x5f, -+ 0xed, 0xaa, 0xdd, 0xc3, 0xb2, 0x29, 0x39, 0x56, -+ 0xf1, 0xea, 0x6e, 0x71, 0x56, 0xe7, 0xeb -+}; -+static const u8 enc_output035[] __initconst = { -+ 0x46, 0xa8, 0x0c, 0x41, 0x87, 0x02, 0x47, 0x20, -+ 0x08, 0x46, 0x27, 0x58, 0x00, 0x80, 0xdd, 0xe5, -+ 0xa3, 0xf4, 0xa1, 0x10, 0x93, 0xa7, 0x07, 0x6e, -+ 0xd6, 0xf3, 0xd3, 0x26, 0xbc, 0x7b, 0x70, 0x53, -+ 0x4d, 0x4a, 0xa2, 0x83, 0x5a, 0x52, 0xe7, 0x2d, -+ 0x14, 0xdf, 0x0e, 0x4f, 0x47, 0xf2, 0x5f -+}; -+static const u8 enc_assoc035[] __initconst = { -+ 0x37, 0x46, 0x18, 0xa0, 0x6e, 0xa9, 0x8a, 0x48 -+}; -+static const u8 enc_nonce035[] __initconst = { -+ 0x47, 0x0a, 0x33, 0x9e, 0xcb, 0x32, 0x19, 0xb8, -+ 0xb8, 0x1a, 0x1f, 0x8b -+}; -+static const u8 enc_key035[] __initconst = { -+ 0x7f, 0x5b, 0x74, 0xc0, 0x7e, 0xd1, 0xb4, 0x0f, -+ 0xd1, 0x43, 0x58, 0xfe, 0x2f, 0xf2, 0xa7, 0x40, -+ 0xc1, 0x16, 0xc7, 0x70, 0x65, 0x10, 0xe6, 0xa4, -+ 0x37, 0xf1, 0x9e, 0xa4, 0x99, 0x11, 0xce, 0xc4 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input036[] __initconst = { -+ 0xb9, 0xc5, 0x54, 0xcb, 0xc3, 0x6a, 0xc1, 0x8a, -+ 0xe8, 0x97, 0xdf, 0x7b, 0xee, 0xca, 0xc1, 0xdb, -+ 0xeb, 0x4e, 0xaf, 0xa1, 0x56, 0xbb, 0x60, 0xce, -+ 0x2e, 0x5d, 0x48, 0xf0, 0x57, 0x15, 0xe6, 0x78 -+}; -+static const u8 enc_output036[] __initconst = { -+ 0xea, 0x29, 0xaf, 0xa4, 0x9d, 0x36, 0xe8, 0x76, -+ 0x0f, 0x5f, 0xe1, 0x97, 0x23, 0xb9, 0x81, 0x1e, -+ 0xd5, 0xd5, 0x19, 0x93, 0x4a, 0x44, 0x0f, 0x50, -+ 0x81, 0xac, 0x43, 0x0b, 0x95, 0x3b, 0x0e, 0x21, -+ 0x22, 0x25, 0x41, 0xaf, 0x46, 0xb8, 0x65, 0x33, -+ 0xc6, 0xb6, 0x8d, 0x2f, 0xf1, 0x08, 0xa7, 0xea -+}; -+static const u8 enc_assoc036[] __initconst = { }; -+static const u8 enc_nonce036[] __initconst = { -+ 0x72, 0xcf, 0xd9, 0x0e, 0xf3, 0x02, 0x6c, 0xa2, -+ 0x2b, 0x7e, 0x6e, 0x6a -+}; -+static const u8 enc_key036[] __initconst = { -+ 0xe1, 0x73, 0x1d, 0x58, 0x54, 0xe1, 0xb7, 0x0c, -+ 0xb3, 0xff, 0xe8, 0xb7, 0x86, 0xa2, 0xb3, 0xeb, -+ 0xf0, 0x99, 0x43, 0x70, 0x95, 0x47, 0x57, 0xb9, -+ 0xdc, 0x8c, 0x7b, 0xc5, 0x35, 0x46, 0x34, 0xa3 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input037[] __initconst = { -+ 0x6b, 0x26, 0x04, 0x99, 0x6c, 0xd3, 0x0c, 0x14, -+ 0xa1, 0x3a, 0x52, 0x57, 0xed, 0x6c, 0xff, 0xd3, -+ 0xbc, 0x5e, 0x29, 0xd6, 0xb9, 0x7e, 0xb1, 0x79, -+ 0x9e, 0xb3, 0x35, 0xe2, 0x81, 0xea, 0x45, 0x1e -+}; -+static const u8 enc_output037[] __initconst = { -+ 0x6d, 0xad, 0x63, 0x78, 0x97, 0x54, 0x4d, 0x8b, -+ 0xf6, 0xbe, 0x95, 0x07, 0xed, 0x4d, 0x1b, 0xb2, -+ 0xe9, 0x54, 0xbc, 0x42, 0x7e, 0x5d, 0xe7, 0x29, -+ 0xda, 0xf5, 0x07, 0x62, 0x84, 0x6f, 0xf2, 0xf4, -+ 0x7b, 0x99, 0x7d, 0x93, 0xc9, 0x82, 0x18, 0x9d, -+ 0x70, 0x95, 0xdc, 0x79, 0x4c, 0x74, 0x62, 0x32 -+}; -+static const u8 enc_assoc037[] __initconst = { -+ 0x23, 0x33, 0xe5, 0xce, 0x0f, 0x93, 0xb0, 0x59 -+}; -+static const u8 enc_nonce037[] __initconst = { -+ 0x26, 0x28, 0x80, 0xd4, 0x75, 0xf3, 0xda, 0xc5, -+ 0x34, 0x0d, 0xd1, 0xb8 -+}; -+static const u8 enc_key037[] __initconst = { -+ 0x27, 0xd8, 0x60, 0x63, 0x1b, 0x04, 0x85, 0xa4, -+ 0x10, 0x70, 0x2f, 0xea, 0x61, 0xbc, 0x87, 0x3f, -+ 0x34, 0x42, 0x26, 0x0c, 0xad, 0xed, 0x4a, 0xbd, -+ 0xe2, 0x5b, 0x78, 0x6a, 0x2d, 0x97, 0xf1, 0x45 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input038[] __initconst = { -+ 0x97, 0x3d, 0x0c, 0x75, 0x38, 0x26, 0xba, 0xe4, -+ 0x66, 0xcf, 0x9a, 0xbb, 0x34, 0x93, 0x15, 0x2e, -+ 0x9d, 0xe7, 0x81, 0x9e, 0x2b, 0xd0, 0xc7, 0x11, -+ 0x71, 0x34, 0x6b, 0x4d, 0x2c, 0xeb, 0xf8, 0x04, -+ 0x1a, 0xa3, 0xce, 0xdc, 0x0d, 0xfd, 0x7b, 0x46, -+ 0x7e, 0x26, 0x22, 0x8b, 0xc8, 0x6c, 0x9a -+}; -+static const u8 enc_output038[] __initconst = { -+ 0xfb, 0xa7, 0x8a, 0xe4, 0xf9, 0xd8, 0x08, 0xa6, -+ 0x2e, 0x3d, 0xa4, 0x0b, 0xe2, 0xcb, 0x77, 0x00, -+ 0xc3, 0x61, 0x3d, 0x9e, 0xb2, 0xc5, 0x29, 0xc6, -+ 0x52, 0xe7, 0x6a, 0x43, 0x2c, 0x65, 0x8d, 0x27, -+ 0x09, 0x5f, 0x0e, 0xb8, 0xf9, 0x40, 0xc3, 0x24, -+ 0x98, 0x1e, 0xa9, 0x35, 0xe5, 0x07, 0xf9, 0x8f, -+ 0x04, 0x69, 0x56, 0xdb, 0x3a, 0x51, 0x29, 0x08, -+ 0xbd, 0x7a, 0xfc, 0x8f, 0x2a, 0xb0, 0xa9 -+}; -+static const u8 enc_assoc038[] __initconst = { }; -+static const u8 enc_nonce038[] __initconst = { -+ 0xe7, 0x4a, 0x51, 0x5e, 0x7e, 0x21, 0x02, 0xb9, -+ 0x0b, 0xef, 0x55, 0xd2 -+}; -+static const u8 enc_key038[] __initconst = { -+ 0xcf, 0x0d, 0x40, 0xa4, 0x64, 0x4e, 0x5f, 0x51, -+ 0x81, 0x51, 0x65, 0xd5, 0x30, 0x1b, 0x22, 0x63, -+ 0x1f, 0x45, 0x44, 0xc4, 0x9a, 0x18, 0x78, 0xe3, -+ 0xa0, 0xa5, 0xe8, 0xe1, 0xaa, 0xe0, 0xf2, 0x64 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input039[] __initconst = { -+ 0xa9, 0x89, 0x95, 0x50, 0x4d, 0xf1, 0x6f, 0x74, -+ 0x8b, 0xfb, 0x77, 0x85, 0xff, 0x91, 0xee, 0xb3, -+ 0xb6, 0x60, 0xea, 0x9e, 0xd3, 0x45, 0x0c, 0x3d, -+ 0x5e, 0x7b, 0x0e, 0x79, 0xef, 0x65, 0x36, 0x59, -+ 0xa9, 0x97, 0x8d, 0x75, 0x54, 0x2e, 0xf9, 0x1c, -+ 0x45, 0x67, 0x62, 0x21, 0x56, 0x40, 0xb9 -+}; -+static const u8 enc_output039[] __initconst = { -+ 0xa1, 0xff, 0xed, 0x80, 0x76, 0x18, 0x29, 0xec, -+ 0xce, 0x24, 0x2e, 0x0e, 0x88, 0xb1, 0x38, 0x04, -+ 0x90, 0x16, 0xbc, 0xa0, 0x18, 0xda, 0x2b, 0x6e, -+ 0x19, 0x98, 0x6b, 0x3e, 0x31, 0x8c, 0xae, 0x8d, -+ 0x80, 0x61, 0x98, 0xfb, 0x4c, 0x52, 0x7c, 0xc3, -+ 0x93, 0x50, 0xeb, 0xdd, 0xea, 0xc5, 0x73, 0xc4, -+ 0xcb, 0xf0, 0xbe, 0xfd, 0xa0, 0xb7, 0x02, 0x42, -+ 0xc6, 0x40, 0xd7, 0xcd, 0x02, 0xd7, 0xa3 -+}; -+static const u8 enc_assoc039[] __initconst = { -+ 0xb3, 0xe4, 0x06, 0x46, 0x83, 0xb0, 0x2d, 0x84 -+}; -+static const u8 enc_nonce039[] __initconst = { -+ 0xd4, 0xd8, 0x07, 0x34, 0x16, 0x83, 0x82, 0x5b, -+ 0x31, 0xcd, 0x4d, 0x95 -+}; -+static const u8 enc_key039[] __initconst = { -+ 0x6c, 0xbf, 0xd7, 0x1c, 0x64, 0x5d, 0x18, 0x4c, -+ 0xf5, 0xd2, 0x3c, 0x40, 0x2b, 0xdb, 0x0d, 0x25, -+ 0xec, 0x54, 0x89, 0x8c, 0x8a, 0x02, 0x73, 0xd4, -+ 0x2e, 0xb5, 0xbe, 0x10, 0x9f, 0xdc, 0xb2, 0xac -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input040[] __initconst = { -+ 0xd0, 0x96, 0x80, 0x31, 0x81, 0xbe, 0xef, 0x9e, -+ 0x00, 0x8f, 0xf8, 0x5d, 0x5d, 0xdc, 0x38, 0xdd, -+ 0xac, 0xf0, 0xf0, 0x9e, 0xe5, 0xf7, 0xe0, 0x7f, -+ 0x1e, 0x40, 0x79, 0xcb, 0x64, 0xd0, 0xdc, 0x8f, -+ 0x5e, 0x67, 0x11, 0xcd, 0x49, 0x21, 0xa7, 0x88, -+ 0x7d, 0xe7, 0x6e, 0x26, 0x78, 0xfd, 0xc6, 0x76, -+ 0x18, 0xf1, 0x18, 0x55, 0x86, 0xbf, 0xea, 0x9d, -+ 0x4c, 0x68, 0x5d, 0x50, 0xe4, 0xbb, 0x9a, 0x82 -+}; -+static const u8 enc_output040[] __initconst = { -+ 0x9a, 0x4e, 0xf2, 0x2b, 0x18, 0x16, 0x77, 0xb5, -+ 0x75, 0x5c, 0x08, 0xf7, 0x47, 0xc0, 0xf8, 0xd8, -+ 0xe8, 0xd4, 0xc1, 0x8a, 0x9c, 0xc2, 0x40, 0x5c, -+ 0x12, 0xbb, 0x51, 0xbb, 0x18, 0x72, 0xc8, 0xe8, -+ 0xb8, 0x77, 0x67, 0x8b, 0xec, 0x44, 0x2c, 0xfc, -+ 0xbb, 0x0f, 0xf4, 0x64, 0xa6, 0x4b, 0x74, 0x33, -+ 0x2c, 0xf0, 0x72, 0x89, 0x8c, 0x7e, 0x0e, 0xdd, -+ 0xf6, 0x23, 0x2e, 0xa6, 0xe2, 0x7e, 0xfe, 0x50, -+ 0x9f, 0xf3, 0x42, 0x7a, 0x0f, 0x32, 0xfa, 0x56, -+ 0x6d, 0x9c, 0xa0, 0xa7, 0x8a, 0xef, 0xc0, 0x13 -+}; -+static const u8 enc_assoc040[] __initconst = { }; -+static const u8 enc_nonce040[] __initconst = { -+ 0xd6, 0x10, 0x40, 0xa3, 0x13, 0xed, 0x49, 0x28, -+ 0x23, 0xcc, 0x06, 0x5b -+}; -+static const u8 enc_key040[] __initconst = { -+ 0x5b, 0x1d, 0x10, 0x35, 0xc0, 0xb1, 0x7e, 0xe0, -+ 0xb0, 0x44, 0x47, 0x67, 0xf8, 0x0a, 0x25, 0xb8, -+ 0xc1, 0xb7, 0x41, 0xf4, 0xb5, 0x0a, 0x4d, 0x30, -+ 0x52, 0x22, 0x6b, 0xaa, 0x1c, 0x6f, 0xb7, 0x01 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input041[] __initconst = { -+ 0x94, 0xee, 0x16, 0x6d, 0x6d, 0x6e, 0xcf, 0x88, -+ 0x32, 0x43, 0x71, 0x36, 0xb4, 0xae, 0x80, 0x5d, -+ 0x42, 0x88, 0x64, 0x35, 0x95, 0x86, 0xd9, 0x19, -+ 0x3a, 0x25, 0x01, 0x62, 0x93, 0xed, 0xba, 0x44, -+ 0x3c, 0x58, 0xe0, 0x7e, 0x7b, 0x71, 0x95, 0xec, -+ 0x5b, 0xd8, 0x45, 0x82, 0xa9, 0xd5, 0x6c, 0x8d, -+ 0x4a, 0x10, 0x8c, 0x7d, 0x7c, 0xe3, 0x4e, 0x6c, -+ 0x6f, 0x8e, 0xa1, 0xbe, 0xc0, 0x56, 0x73, 0x17 -+}; -+static const u8 enc_output041[] __initconst = { -+ 0x5f, 0xbb, 0xde, 0xcc, 0x34, 0xbe, 0x20, 0x16, -+ 0x14, 0xf6, 0x36, 0x03, 0x1e, 0xeb, 0x42, 0xf1, -+ 0xca, 0xce, 0x3c, 0x79, 0xa1, 0x2c, 0xff, 0xd8, -+ 0x71, 0xee, 0x8e, 0x73, 0x82, 0x0c, 0x82, 0x97, -+ 0x49, 0xf1, 0xab, 0xb4, 0x29, 0x43, 0x67, 0x84, -+ 0x9f, 0xb6, 0xc2, 0xaa, 0x56, 0xbd, 0xa8, 0xa3, -+ 0x07, 0x8f, 0x72, 0x3d, 0x7c, 0x1c, 0x85, 0x20, -+ 0x24, 0xb0, 0x17, 0xb5, 0x89, 0x73, 0xfb, 0x1e, -+ 0x09, 0x26, 0x3d, 0xa7, 0xb4, 0xcb, 0x92, 0x14, -+ 0x52, 0xf9, 0x7d, 0xca, 0x40, 0xf5, 0x80, 0xec -+}; -+static const u8 enc_assoc041[] __initconst = { -+ 0x71, 0x93, 0xf6, 0x23, 0x66, 0x33, 0x21, 0xa2 -+}; -+static const u8 enc_nonce041[] __initconst = { -+ 0xd3, 0x1c, 0x21, 0xab, 0xa1, 0x75, 0xb7, 0x0d, -+ 0xe4, 0xeb, 0xb1, 0x9c -+}; -+static const u8 enc_key041[] __initconst = { -+ 0x97, 0xd6, 0x35, 0xc4, 0xf4, 0x75, 0x74, 0xd9, -+ 0x99, 0x8a, 0x90, 0x87, 0x5d, 0xa1, 0xd3, 0xa2, -+ 0x84, 0xb7, 0x55, 0xb2, 0xd3, 0x92, 0x97, 0xa5, -+ 0x72, 0x52, 0x35, 0x19, 0x0e, 0x10, 0xa9, 0x7e -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input042[] __initconst = { -+ 0xb4, 0x29, 0xeb, 0x80, 0xfb, 0x8f, 0xe8, 0xba, -+ 0xed, 0xa0, 0xc8, 0x5b, 0x9c, 0x33, 0x34, 0x58, -+ 0xe7, 0xc2, 0x99, 0x2e, 0x55, 0x84, 0x75, 0x06, -+ 0x9d, 0x12, 0xd4, 0x5c, 0x22, 0x21, 0x75, 0x64, -+ 0x12, 0x15, 0x88, 0x03, 0x22, 0x97, 0xef, 0xf5, -+ 0x67, 0x83, 0x74, 0x2a, 0x5f, 0xc2, 0x2d, 0x74, -+ 0x10, 0xff, 0xb2, 0x9d, 0x66, 0x09, 0x86, 0x61, -+ 0xd7, 0x6f, 0x12, 0x6c, 0x3c, 0x27, 0x68, 0x9e, -+ 0x43, 0xb3, 0x72, 0x67, 0xca, 0xc5, 0xa3, 0xa6, -+ 0xd3, 0xab, 0x49, 0xe3, 0x91, 0xda, 0x29, 0xcd, -+ 0x30, 0x54, 0xa5, 0x69, 0x2e, 0x28, 0x07, 0xe4, -+ 0xc3, 0xea, 0x46, 0xc8, 0x76, 0x1d, 0x50, 0xf5, -+ 0x92 -+}; -+static const u8 enc_output042[] __initconst = { -+ 0xd0, 0x10, 0x2f, 0x6c, 0x25, 0x8b, 0xf4, 0x97, -+ 0x42, 0xce, 0xc3, 0x4c, 0xf2, 0xd0, 0xfe, 0xdf, -+ 0x23, 0xd1, 0x05, 0xfb, 0x4c, 0x84, 0xcf, 0x98, -+ 0x51, 0x5e, 0x1b, 0xc9, 0xa6, 0x4f, 0x8a, 0xd5, -+ 0xbe, 0x8f, 0x07, 0x21, 0xbd, 0xe5, 0x06, 0x45, -+ 0xd0, 0x00, 0x83, 0xc3, 0xa2, 0x63, 0xa3, 0x10, -+ 0x53, 0xb7, 0x60, 0x24, 0x5f, 0x52, 0xae, 0x28, -+ 0x66, 0xa5, 0xec, 0x83, 0xb1, 0x9f, 0x61, 0xbe, -+ 0x1d, 0x30, 0xd5, 0xc5, 0xd9, 0xfe, 0xcc, 0x4c, -+ 0xbb, 0xe0, 0x8f, 0xd3, 0x85, 0x81, 0x3a, 0x2a, -+ 0xa3, 0x9a, 0x00, 0xff, 0x9c, 0x10, 0xf7, 0xf2, -+ 0x37, 0x02, 0xad, 0xd1, 0xe4, 0xb2, 0xff, 0xa3, -+ 0x1c, 0x41, 0x86, 0x5f, 0xc7, 0x1d, 0xe1, 0x2b, -+ 0x19, 0x61, 0x21, 0x27, 0xce, 0x49, 0x99, 0x3b, -+ 0xb0 -+}; -+static const u8 enc_assoc042[] __initconst = { }; -+static const u8 enc_nonce042[] __initconst = { -+ 0x17, 0xc8, 0x6a, 0x8a, 0xbb, 0xb7, 0xe0, 0x03, -+ 0xac, 0xde, 0x27, 0x99 -+}; -+static const u8 enc_key042[] __initconst = { -+ 0xfe, 0x6e, 0x55, 0xbd, 0xae, 0xd1, 0xf7, 0x28, -+ 0x4c, 0xa5, 0xfc, 0x0f, 0x8c, 0x5f, 0x2b, 0x8d, -+ 0xf5, 0x6d, 0xc0, 0xf4, 0x9e, 0x8c, 0xa6, 0x6a, -+ 0x41, 0x99, 0x5e, 0x78, 0x33, 0x51, 0xf9, 0x01 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input043[] __initconst = { -+ 0xce, 0xb5, 0x34, 0xce, 0x50, 0xdc, 0x23, 0xff, -+ 0x63, 0x8a, 0xce, 0x3e, 0xf6, 0x3a, 0xb2, 0xcc, -+ 0x29, 0x73, 0xee, 0xad, 0xa8, 0x07, 0x85, 0xfc, -+ 0x16, 0x5d, 0x06, 0xc2, 0xf5, 0x10, 0x0f, 0xf5, -+ 0xe8, 0xab, 0x28, 0x82, 0xc4, 0x75, 0xaf, 0xcd, -+ 0x05, 0xcc, 0xd4, 0x9f, 0x2e, 0x7d, 0x8f, 0x55, -+ 0xef, 0x3a, 0x72, 0xe3, 0xdc, 0x51, 0xd6, 0x85, -+ 0x2b, 0x8e, 0x6b, 0x9e, 0x7a, 0xec, 0xe5, 0x7b, -+ 0xe6, 0x55, 0x6b, 0x0b, 0x6d, 0x94, 0x13, 0xe3, -+ 0x3f, 0xc5, 0xfc, 0x24, 0xa9, 0xa2, 0x05, 0xad, -+ 0x59, 0x57, 0x4b, 0xb3, 0x9d, 0x94, 0x4a, 0x92, -+ 0xdc, 0x47, 0x97, 0x0d, 0x84, 0xa6, 0xad, 0x31, -+ 0x76 -+}; -+static const u8 enc_output043[] __initconst = { -+ 0x75, 0x45, 0x39, 0x1b, 0x51, 0xde, 0x01, 0xd5, -+ 0xc5, 0x3d, 0xfa, 0xca, 0x77, 0x79, 0x09, 0x06, -+ 0x3e, 0x58, 0xed, 0xee, 0x4b, 0xb1, 0x22, 0x7e, -+ 0x71, 0x10, 0xac, 0x4d, 0x26, 0x20, 0xc2, 0xae, -+ 0xc2, 0xf8, 0x48, 0xf5, 0x6d, 0xee, 0xb0, 0x37, -+ 0xa8, 0xdc, 0xed, 0x75, 0xaf, 0xa8, 0xa6, 0xc8, -+ 0x90, 0xe2, 0xde, 0xe4, 0x2f, 0x95, 0x0b, 0xb3, -+ 0x3d, 0x9e, 0x24, 0x24, 0xd0, 0x8a, 0x50, 0x5d, -+ 0x89, 0x95, 0x63, 0x97, 0x3e, 0xd3, 0x88, 0x70, -+ 0xf3, 0xde, 0x6e, 0xe2, 0xad, 0xc7, 0xfe, 0x07, -+ 0x2c, 0x36, 0x6c, 0x14, 0xe2, 0xcf, 0x7c, 0xa6, -+ 0x2f, 0xb3, 0xd3, 0x6b, 0xee, 0x11, 0x68, 0x54, -+ 0x61, 0xb7, 0x0d, 0x44, 0xef, 0x8c, 0x66, 0xc5, -+ 0xc7, 0xbb, 0xf1, 0x0d, 0xca, 0xdd, 0x7f, 0xac, -+ 0xf6 -+}; -+static const u8 enc_assoc043[] __initconst = { -+ 0xa1, 0x1c, 0x40, 0xb6, 0x03, 0x76, 0x73, 0x30 -+}; -+static const u8 enc_nonce043[] __initconst = { -+ 0x46, 0x36, 0x2f, 0x45, 0xd6, 0x37, 0x9e, 0x63, -+ 0xe5, 0x22, 0x94, 0x60 -+}; -+static const u8 enc_key043[] __initconst = { -+ 0xaa, 0xbc, 0x06, 0x34, 0x74, 0xe6, 0x5c, 0x4c, -+ 0x3e, 0x9b, 0xdc, 0x48, 0x0d, 0xea, 0x97, 0xb4, -+ 0x51, 0x10, 0xc8, 0x61, 0x88, 0x46, 0xff, 0x6b, -+ 0x15, 0xbd, 0xd2, 0xa4, 0xa5, 0x68, 0x2c, 0x4e -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input044[] __initconst = { -+ 0xe5, 0xcc, 0xaa, 0x44, 0x1b, 0xc8, 0x14, 0x68, -+ 0x8f, 0x8f, 0x6e, 0x8f, 0x28, 0xb5, 0x00, 0xb2 -+}; -+static const u8 enc_output044[] __initconst = { -+ 0x7e, 0x72, 0xf5, 0xa1, 0x85, 0xaf, 0x16, 0xa6, -+ 0x11, 0x92, 0x1b, 0x43, 0x8f, 0x74, 0x9f, 0x0b, -+ 0x12, 0x42, 0xc6, 0x70, 0x73, 0x23, 0x34, 0x02, -+ 0x9a, 0xdf, 0xe1, 0xc5, 0x00, 0x16, 0x51, 0xe4 -+}; -+static const u8 enc_assoc044[] __initconst = { -+ 0x02 -+}; -+static const u8 enc_nonce044[] __initconst = { -+ 0x87, 0x34, 0x5f, 0x10, 0x55, 0xfd, 0x9e, 0x21, -+ 0x02, 0xd5, 0x06, 0x56 -+}; -+static const u8 enc_key044[] __initconst = { -+ 0x7d, 0x00, 0xb4, 0x80, 0x95, 0xad, 0xfa, 0x32, -+ 0x72, 0x05, 0x06, 0x07, 0xb2, 0x64, 0x18, 0x50, -+ 0x02, 0xba, 0x99, 0x95, 0x7c, 0x49, 0x8b, 0xe0, -+ 0x22, 0x77, 0x0f, 0x2c, 0xe2, 0xf3, 0x14, 0x3c -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input045[] __initconst = { -+ 0x02, 0xcd, 0xe1, 0x68, 0xfb, 0xa3, 0xf5, 0x44, -+ 0xbb, 0xd0, 0x33, 0x2f, 0x7a, 0xde, 0xad, 0xa8 -+}; -+static const u8 enc_output045[] __initconst = { -+ 0x85, 0xf2, 0x9a, 0x71, 0x95, 0x57, 0xcd, 0xd1, -+ 0x4d, 0x1f, 0x8f, 0xff, 0xab, 0x6d, 0x9e, 0x60, -+ 0x73, 0x2c, 0xa3, 0x2b, 0xec, 0xd5, 0x15, 0xa1, -+ 0xed, 0x35, 0x3f, 0x54, 0x2e, 0x99, 0x98, 0x58 -+}; -+static const u8 enc_assoc045[] __initconst = { -+ 0xb6, 0x48 -+}; -+static const u8 enc_nonce045[] __initconst = { -+ 0x87, 0xa3, 0x16, 0x3e, 0xc0, 0x59, 0x8a, 0xd9, -+ 0x5b, 0x3a, 0xa7, 0x13 -+}; -+static const u8 enc_key045[] __initconst = { -+ 0x64, 0x32, 0x71, 0x7f, 0x1d, 0xb8, 0x5e, 0x41, -+ 0xac, 0x78, 0x36, 0xbc, 0xe2, 0x51, 0x85, 0xa0, -+ 0x80, 0xd5, 0x76, 0x2b, 0x9e, 0x2b, 0x18, 0x44, -+ 0x4b, 0x6e, 0xc7, 0x2c, 0x3b, 0xd8, 0xe4, 0xdc -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input046[] __initconst = { -+ 0x16, 0xdd, 0xd2, 0x3f, 0xf5, 0x3f, 0x3d, 0x23, -+ 0xc0, 0x63, 0x34, 0x48, 0x70, 0x40, 0xeb, 0x47 -+}; -+static const u8 enc_output046[] __initconst = { -+ 0xc1, 0xb2, 0x95, 0x93, 0x6d, 0x56, 0xfa, 0xda, -+ 0xc0, 0x3e, 0x5f, 0x74, 0x2b, 0xff, 0x73, 0xa1, -+ 0x39, 0xc4, 0x57, 0xdb, 0xab, 0x66, 0x38, 0x2b, -+ 0xab, 0xb3, 0xb5, 0x58, 0x00, 0xcd, 0xa5, 0xb8 -+}; -+static const u8 enc_assoc046[] __initconst = { -+ 0xbd, 0x4c, 0xd0, 0x2f, 0xc7, 0x50, 0x2b, 0xbd, -+ 0xbd, 0xf6, 0xc9, 0xa3, 0xcb, 0xe8, 0xf0 -+}; -+static const u8 enc_nonce046[] __initconst = { -+ 0x6f, 0x57, 0x3a, 0xa8, 0x6b, 0xaa, 0x49, 0x2b, -+ 0xa4, 0x65, 0x96, 0xdf -+}; -+static const u8 enc_key046[] __initconst = { -+ 0x8e, 0x34, 0xcf, 0x73, 0xd2, 0x45, 0xa1, 0x08, -+ 0x2a, 0x92, 0x0b, 0x86, 0x36, 0x4e, 0xb8, 0x96, -+ 0xc4, 0x94, 0x64, 0x67, 0xbc, 0xb3, 0xd5, 0x89, -+ 0x29, 0xfc, 0xb3, 0x66, 0x90, 0xe6, 0x39, 0x4f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input047[] __initconst = { -+ 0x62, 0x3b, 0x78, 0x50, 0xc3, 0x21, 0xe2, 0xcf, -+ 0x0c, 0x6f, 0xbc, 0xc8, 0xdf, 0xd1, 0xaf, 0xf2 -+}; -+static const u8 enc_output047[] __initconst = { -+ 0xc8, 0x4c, 0x9b, 0xb7, 0xc6, 0x1c, 0x1b, 0xcb, -+ 0x17, 0x77, 0x2a, 0x1c, 0x50, 0x0c, 0x50, 0x95, -+ 0xdb, 0xad, 0xf7, 0xa5, 0x13, 0x8c, 0xa0, 0x34, -+ 0x59, 0xa2, 0xcd, 0x65, 0x83, 0x1e, 0x09, 0x2f -+}; -+static const u8 enc_assoc047[] __initconst = { -+ 0x89, 0xcc, 0xe9, 0xfb, 0x47, 0x44, 0x1d, 0x07, -+ 0xe0, 0x24, 0x5a, 0x66, 0xfe, 0x8b, 0x77, 0x8b -+}; -+static const u8 enc_nonce047[] __initconst = { -+ 0x1a, 0x65, 0x18, 0xf0, 0x2e, 0xde, 0x1d, 0xa6, -+ 0x80, 0x92, 0x66, 0xd9 -+}; -+static const u8 enc_key047[] __initconst = { -+ 0xcb, 0x55, 0x75, 0xf5, 0xc7, 0xc4, 0x5c, 0x91, -+ 0xcf, 0x32, 0x0b, 0x13, 0x9f, 0xb5, 0x94, 0x23, -+ 0x75, 0x60, 0xd0, 0xa3, 0xe6, 0xf8, 0x65, 0xa6, -+ 0x7d, 0x4f, 0x63, 0x3f, 0x2c, 0x08, 0xf0, 0x16 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input048[] __initconst = { -+ 0x87, 0xb3, 0xa4, 0xd7, 0xb2, 0x6d, 0x8d, 0x32, -+ 0x03, 0xa0, 0xde, 0x1d, 0x64, 0xef, 0x82, 0xe3 -+}; -+static const u8 enc_output048[] __initconst = { -+ 0x94, 0xbc, 0x80, 0x62, 0x1e, 0xd1, 0xe7, 0x1b, -+ 0x1f, 0xd2, 0xb5, 0xc3, 0xa1, 0x5e, 0x35, 0x68, -+ 0x33, 0x35, 0x11, 0x86, 0x17, 0x96, 0x97, 0x84, -+ 0x01, 0x59, 0x8b, 0x96, 0x37, 0x22, 0xf5, 0xb3 -+}; -+static const u8 enc_assoc048[] __initconst = { -+ 0xd1, 0x9f, 0x2d, 0x98, 0x90, 0x95, 0xf7, 0xab, -+ 0x03, 0xa5, 0xfd, 0xe8, 0x44, 0x16, 0xe0, 0x0c, -+ 0x0e -+}; -+static const u8 enc_nonce048[] __initconst = { -+ 0x56, 0x4d, 0xee, 0x49, 0xab, 0x00, 0xd2, 0x40, -+ 0xfc, 0x10, 0x68, 0xc3 -+}; -+static const u8 enc_key048[] __initconst = { -+ 0xa5, 0x56, 0x9e, 0x72, 0x9a, 0x69, 0xb2, 0x4b, -+ 0xa6, 0xe0, 0xff, 0x15, 0xc4, 0x62, 0x78, 0x97, -+ 0x43, 0x68, 0x24, 0xc9, 0x41, 0xe9, 0xd0, 0x0b, -+ 0x2e, 0x93, 0xfd, 0xdc, 0x4b, 0xa7, 0x76, 0x57 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input049[] __initconst = { -+ 0xe6, 0x01, 0xb3, 0x85, 0x57, 0x79, 0x7d, 0xa2, -+ 0xf8, 0xa4, 0x10, 0x6a, 0x08, 0x9d, 0x1d, 0xa6 -+}; -+static const u8 enc_output049[] __initconst = { -+ 0x29, 0x9b, 0x5d, 0x3f, 0x3d, 0x03, 0xc0, 0x87, -+ 0x20, 0x9a, 0x16, 0xe2, 0x85, 0x14, 0x31, 0x11, -+ 0x4b, 0x45, 0x4e, 0xd1, 0x98, 0xde, 0x11, 0x7e, -+ 0x83, 0xec, 0x49, 0xfa, 0x8d, 0x85, 0x08, 0xd6 -+}; -+static const u8 enc_assoc049[] __initconst = { -+ 0x5e, 0x64, 0x70, 0xfa, 0xcd, 0x99, 0xc1, 0xd8, -+ 0x1e, 0x37, 0xcd, 0x44, 0x01, 0x5f, 0xe1, 0x94, -+ 0x80, 0xa2, 0xa4, 0xd3, 0x35, 0x2a, 0x4f, 0xf5, -+ 0x60, 0xc0, 0x64, 0x0f, 0xdb, 0xda -+}; -+static const u8 enc_nonce049[] __initconst = { -+ 0xdf, 0x87, 0x13, 0xe8, 0x7e, 0xc3, 0xdb, 0xcf, -+ 0xad, 0x14, 0xd5, 0x3e -+}; -+static const u8 enc_key049[] __initconst = { -+ 0x56, 0x20, 0x74, 0x65, 0xb4, 0xe4, 0x8e, 0x6d, -+ 0x04, 0x63, 0x0f, 0x4a, 0x42, 0xf3, 0x5c, 0xfc, -+ 0x16, 0x3a, 0xb2, 0x89, 0xc2, 0x2a, 0x2b, 0x47, -+ 0x84, 0xf6, 0xf9, 0x29, 0x03, 0x30, 0xbe, 0xe0 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input050[] __initconst = { -+ 0xdc, 0x9e, 0x9e, 0xaf, 0x11, 0xe3, 0x14, 0x18, -+ 0x2d, 0xf6, 0xa4, 0xeb, 0xa1, 0x7a, 0xec, 0x9c -+}; -+static const u8 enc_output050[] __initconst = { -+ 0x60, 0x5b, 0xbf, 0x90, 0xae, 0xb9, 0x74, 0xf6, -+ 0x60, 0x2b, 0xc7, 0x78, 0x05, 0x6f, 0x0d, 0xca, -+ 0x38, 0xea, 0x23, 0xd9, 0x90, 0x54, 0xb4, 0x6b, -+ 0x42, 0xff, 0xe0, 0x04, 0x12, 0x9d, 0x22, 0x04 -+}; -+static const u8 enc_assoc050[] __initconst = { -+ 0xba, 0x44, 0x6f, 0x6f, 0x9a, 0x0c, 0xed, 0x22, -+ 0x45, 0x0f, 0xeb, 0x10, 0x73, 0x7d, 0x90, 0x07, -+ 0xfd, 0x69, 0xab, 0xc1, 0x9b, 0x1d, 0x4d, 0x90, -+ 0x49, 0xa5, 0x55, 0x1e, 0x86, 0xec, 0x2b, 0x37 -+}; -+static const u8 enc_nonce050[] __initconst = { -+ 0x8d, 0xf4, 0xb1, 0x5a, 0x88, 0x8c, 0x33, 0x28, -+ 0x6a, 0x7b, 0x76, 0x51 -+}; -+static const u8 enc_key050[] __initconst = { -+ 0x39, 0x37, 0x98, 0x6a, 0xf8, 0x6d, 0xaf, 0xc1, -+ 0xba, 0x0c, 0x46, 0x72, 0xd8, 0xab, 0xc4, 0x6c, -+ 0x20, 0x70, 0x62, 0x68, 0x2d, 0x9c, 0x26, 0x4a, -+ 0xb0, 0x6d, 0x6c, 0x58, 0x07, 0x20, 0x51, 0x30 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input051[] __initconst = { -+ 0x81, 0xce, 0x84, 0xed, 0xe9, 0xb3, 0x58, 0x59, -+ 0xcc, 0x8c, 0x49, 0xa8, 0xf6, 0xbe, 0x7d, 0xc6 -+}; -+static const u8 enc_output051[] __initconst = { -+ 0x7b, 0x7c, 0xe0, 0xd8, 0x24, 0x80, 0x9a, 0x70, -+ 0xde, 0x32, 0x56, 0x2c, 0xcf, 0x2c, 0x2b, 0xbd, -+ 0x15, 0xd4, 0x4a, 0x00, 0xce, 0x0d, 0x19, 0xb4, -+ 0x23, 0x1f, 0x92, 0x1e, 0x22, 0xbc, 0x0a, 0x43 -+}; -+static const u8 enc_assoc051[] __initconst = { -+ 0xd4, 0x1a, 0x82, 0x8d, 0x5e, 0x71, 0x82, 0x92, -+ 0x47, 0x02, 0x19, 0x05, 0x40, 0x2e, 0xa2, 0x57, -+ 0xdc, 0xcb, 0xc3, 0xb8, 0x0f, 0xcd, 0x56, 0x75, -+ 0x05, 0x6b, 0x68, 0xbb, 0x59, 0xe6, 0x2e, 0x88, -+ 0x73 -+}; -+static const u8 enc_nonce051[] __initconst = { -+ 0xbe, 0x40, 0xe5, 0xf1, 0xa1, 0x18, 0x17, 0xa0, -+ 0xa8, 0xfa, 0x89, 0x49 -+}; -+static const u8 enc_key051[] __initconst = { -+ 0x36, 0x37, 0x2a, 0xbc, 0xdb, 0x78, 0xe0, 0x27, -+ 0x96, 0x46, 0xac, 0x3d, 0x17, 0x6b, 0x96, 0x74, -+ 0xe9, 0x15, 0x4e, 0xec, 0xf0, 0xd5, 0x46, 0x9c, -+ 0x65, 0x1e, 0xc7, 0xe1, 0x6b, 0x4c, 0x11, 0x99 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input052[] __initconst = { -+ 0xa6, 0x67, 0x47, 0xc8, 0x9e, 0x85, 0x7a, 0xf3, -+ 0xa1, 0x8e, 0x2c, 0x79, 0x50, 0x00, 0x87, 0xed -+}; -+static const u8 enc_output052[] __initconst = { -+ 0xca, 0x82, 0xbf, 0xf3, 0xe2, 0xf3, 0x10, 0xcc, -+ 0xc9, 0x76, 0x67, 0x2c, 0x44, 0x15, 0xe6, 0x9b, -+ 0x57, 0x63, 0x8c, 0x62, 0xa5, 0xd8, 0x5d, 0xed, -+ 0x77, 0x4f, 0x91, 0x3c, 0x81, 0x3e, 0xa0, 0x32 -+}; -+static const u8 enc_assoc052[] __initconst = { -+ 0x3f, 0x2d, 0xd4, 0x9b, 0xbf, 0x09, 0xd6, 0x9a, -+ 0x78, 0xa3, 0xd8, 0x0e, 0xa2, 0x56, 0x66, 0x14, -+ 0xfc, 0x37, 0x94, 0x74, 0x19, 0x6c, 0x1a, 0xae, -+ 0x84, 0x58, 0x3d, 0xa7, 0x3d, 0x7f, 0xf8, 0x5c, -+ 0x6f, 0x42, 0xca, 0x42, 0x05, 0x6a, 0x97, 0x92, -+ 0xcc, 0x1b, 0x9f, 0xb3, 0xc7, 0xd2, 0x61 -+}; -+static const u8 enc_nonce052[] __initconst = { -+ 0x84, 0xc8, 0x7d, 0xae, 0x4e, 0xee, 0x27, 0x73, -+ 0x0e, 0xc3, 0x5d, 0x12 -+}; -+static const u8 enc_key052[] __initconst = { -+ 0x9f, 0x14, 0x79, 0xed, 0x09, 0x7d, 0x7f, 0xe5, -+ 0x29, 0xc1, 0x1f, 0x2f, 0x5a, 0xdd, 0x9a, 0xaf, -+ 0xf4, 0xa1, 0xca, 0x0b, 0x68, 0x99, 0x7a, 0x2c, -+ 0xb7, 0xf7, 0x97, 0x49, 0xbd, 0x90, 0xaa, 0xf4 -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input053[] __initconst = { -+ 0x25, 0x6d, 0x40, 0x88, 0x80, 0x94, 0x17, 0x83, -+ 0x55, 0xd3, 0x04, 0x84, 0x64, 0x43, 0xfe, 0xe8, -+ 0xdf, 0x99, 0x47, 0x03, 0x03, 0xfb, 0x3b, 0x7b, -+ 0x80, 0xe0, 0x30, 0xbe, 0xeb, 0xd3, 0x29, 0xbe -+}; -+static const u8 enc_output053[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0xe6, 0xd3, 0xd7, 0x32, 0x4a, 0x1c, 0xbb, 0xa7, -+ 0x77, 0xbb, 0xb0, 0xec, 0xdd, 0xa3, 0x78, 0x07 -+}; -+static const u8 enc_assoc053[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 enc_nonce053[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key053[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input054[] __initconst = { -+ 0x25, 0x6d, 0x40, 0x88, 0x80, 0x94, 0x17, 0x83, -+ 0x55, 0xd3, 0x04, 0x84, 0x64, 0x43, 0xfe, 0xe8, -+ 0xdf, 0x99, 0x47, 0x03, 0x03, 0xfb, 0x3b, 0x7b, -+ 0x80, 0xe0, 0x30, 0xbe, 0xeb, 0xd3, 0x29, 0xbe, -+ 0xe3, 0xbc, 0xdb, 0x5b, 0x1e, 0xde, 0xfc, 0xfe, -+ 0x8b, 0xcd, 0xa1, 0xb6, 0xa1, 0x5c, 0x8c, 0x2b, -+ 0x08, 0x69, 0xff, 0xd2, 0xec, 0x5e, 0x26, 0xe5, -+ 0x53, 0xb7, 0xb2, 0x27, 0xfe, 0x87, 0xfd, 0xbd -+}; -+static const u8 enc_output054[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x06, 0x2d, 0xe6, 0x79, 0x5f, 0x27, 0x4f, 0xd2, -+ 0xa3, 0x05, 0xd7, 0x69, 0x80, 0xbc, 0x9c, 0xce -+}; -+static const u8 enc_assoc054[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 enc_nonce054[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key054[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input055[] __initconst = { -+ 0x25, 0x6d, 0x40, 0x88, 0x80, 0x94, 0x17, 0x83, -+ 0x55, 0xd3, 0x04, 0x84, 0x64, 0x43, 0xfe, 0xe8, -+ 0xdf, 0x99, 0x47, 0x03, 0x03, 0xfb, 0x3b, 0x7b, -+ 0x80, 0xe0, 0x30, 0xbe, 0xeb, 0xd3, 0x29, 0xbe, -+ 0xe3, 0xbc, 0xdb, 0x5b, 0x1e, 0xde, 0xfc, 0xfe, -+ 0x8b, 0xcd, 0xa1, 0xb6, 0xa1, 0x5c, 0x8c, 0x2b, -+ 0x08, 0x69, 0xff, 0xd2, 0xec, 0x5e, 0x26, 0xe5, -+ 0x53, 0xb7, 0xb2, 0x27, 0xfe, 0x87, 0xfd, 0xbd, -+ 0x7a, 0xda, 0x44, 0x42, 0x42, 0x69, 0xbf, 0xfa, -+ 0x55, 0x27, 0xf2, 0x70, 0xac, 0xf6, 0x85, 0x02, -+ 0xb7, 0x4c, 0x5a, 0xe2, 0xe6, 0x0c, 0x05, 0x80, -+ 0x98, 0x1a, 0x49, 0x38, 0x45, 0x93, 0x92, 0xc4, -+ 0x9b, 0xb2, 0xf2, 0x84, 0xb6, 0x46, 0xef, 0xc7, -+ 0xf3, 0xf0, 0xb1, 0x36, 0x1d, 0xc3, 0x48, 0xed, -+ 0x77, 0xd3, 0x0b, 0xc5, 0x76, 0x92, 0xed, 0x38, -+ 0xfb, 0xac, 0x01, 0x88, 0x38, 0x04, 0x88, 0xc7 -+}; -+static const u8 enc_output055[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0xd8, 0xb4, 0x79, 0x02, 0xba, 0xae, 0xaf, 0xb3, -+ 0x42, 0x03, 0x05, 0x15, 0x29, 0xaf, 0x28, 0x2e -+}; -+static const u8 enc_assoc055[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 enc_nonce055[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key055[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input056[] __initconst = { -+ 0xda, 0x92, 0xbf, 0x77, 0x7f, 0x6b, 0xe8, 0x7c, -+ 0xaa, 0x2c, 0xfb, 0x7b, 0x9b, 0xbc, 0x01, 0x17, -+ 0x20, 0x66, 0xb8, 0xfc, 0xfc, 0x04, 0xc4, 0x84, -+ 0x7f, 0x1f, 0xcf, 0x41, 0x14, 0x2c, 0xd6, 0x41 -+}; -+static const u8 enc_output056[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xb3, 0x89, 0x1c, 0x84, 0x9c, 0xb5, 0x2c, 0x27, -+ 0x74, 0x7e, 0xdf, 0xcf, 0x31, 0x21, 0x3b, 0xb6 -+}; -+static const u8 enc_assoc056[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce056[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key056[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input057[] __initconst = { -+ 0xda, 0x92, 0xbf, 0x77, 0x7f, 0x6b, 0xe8, 0x7c, -+ 0xaa, 0x2c, 0xfb, 0x7b, 0x9b, 0xbc, 0x01, 0x17, -+ 0x20, 0x66, 0xb8, 0xfc, 0xfc, 0x04, 0xc4, 0x84, -+ 0x7f, 0x1f, 0xcf, 0x41, 0x14, 0x2c, 0xd6, 0x41, -+ 0x1c, 0x43, 0x24, 0xa4, 0xe1, 0x21, 0x03, 0x01, -+ 0x74, 0x32, 0x5e, 0x49, 0x5e, 0xa3, 0x73, 0xd4, -+ 0xf7, 0x96, 0x00, 0x2d, 0x13, 0xa1, 0xd9, 0x1a, -+ 0xac, 0x48, 0x4d, 0xd8, 0x01, 0x78, 0x02, 0x42 -+}; -+static const u8 enc_output057[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xf0, 0xc1, 0x2d, 0x26, 0xef, 0x03, 0x02, 0x9b, -+ 0x62, 0xc0, 0x08, 0xda, 0x27, 0xc5, 0xdc, 0x68 -+}; -+static const u8 enc_assoc057[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce057[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key057[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input058[] __initconst = { -+ 0xda, 0x92, 0xbf, 0x77, 0x7f, 0x6b, 0xe8, 0x7c, -+ 0xaa, 0x2c, 0xfb, 0x7b, 0x9b, 0xbc, 0x01, 0x17, -+ 0x20, 0x66, 0xb8, 0xfc, 0xfc, 0x04, 0xc4, 0x84, -+ 0x7f, 0x1f, 0xcf, 0x41, 0x14, 0x2c, 0xd6, 0x41, -+ 0x1c, 0x43, 0x24, 0xa4, 0xe1, 0x21, 0x03, 0x01, -+ 0x74, 0x32, 0x5e, 0x49, 0x5e, 0xa3, 0x73, 0xd4, -+ 0xf7, 0x96, 0x00, 0x2d, 0x13, 0xa1, 0xd9, 0x1a, -+ 0xac, 0x48, 0x4d, 0xd8, 0x01, 0x78, 0x02, 0x42, -+ 0x85, 0x25, 0xbb, 0xbd, 0xbd, 0x96, 0x40, 0x05, -+ 0xaa, 0xd8, 0x0d, 0x8f, 0x53, 0x09, 0x7a, 0xfd, -+ 0x48, 0xb3, 0xa5, 0x1d, 0x19, 0xf3, 0xfa, 0x7f, -+ 0x67, 0xe5, 0xb6, 0xc7, 0xba, 0x6c, 0x6d, 0x3b, -+ 0x64, 0x4d, 0x0d, 0x7b, 0x49, 0xb9, 0x10, 0x38, -+ 0x0c, 0x0f, 0x4e, 0xc9, 0xe2, 0x3c, 0xb7, 0x12, -+ 0x88, 0x2c, 0xf4, 0x3a, 0x89, 0x6d, 0x12, 0xc7, -+ 0x04, 0x53, 0xfe, 0x77, 0xc7, 0xfb, 0x77, 0x38 -+}; -+static const u8 enc_output058[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xee, 0x65, 0x78, 0x30, 0x01, 0xc2, 0x56, 0x91, -+ 0xfa, 0x28, 0xd0, 0xf5, 0xf1, 0xc1, 0xd7, 0x62 -+}; -+static const u8 enc_assoc058[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce058[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key058[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input059[] __initconst = { -+ 0x25, 0x6d, 0x40, 0x08, 0x80, 0x94, 0x17, 0x03, -+ 0x55, 0xd3, 0x04, 0x04, 0x64, 0x43, 0xfe, 0x68, -+ 0xdf, 0x99, 0x47, 0x83, 0x03, 0xfb, 0x3b, 0xfb, -+ 0x80, 0xe0, 0x30, 0x3e, 0xeb, 0xd3, 0x29, 0x3e -+}; -+static const u8 enc_output059[] __initconst = { -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x79, 0xba, 0x7a, 0x29, 0xf5, 0xa7, 0xbb, 0x75, -+ 0x79, 0x7a, 0xf8, 0x7a, 0x61, 0x01, 0x29, 0xa4 -+}; -+static const u8 enc_assoc059[] __initconst = { -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80 -+}; -+static const u8 enc_nonce059[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key059[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input060[] __initconst = { -+ 0x25, 0x6d, 0x40, 0x08, 0x80, 0x94, 0x17, 0x03, -+ 0x55, 0xd3, 0x04, 0x04, 0x64, 0x43, 0xfe, 0x68, -+ 0xdf, 0x99, 0x47, 0x83, 0x03, 0xfb, 0x3b, 0xfb, -+ 0x80, 0xe0, 0x30, 0x3e, 0xeb, 0xd3, 0x29, 0x3e, -+ 0xe3, 0xbc, 0xdb, 0xdb, 0x1e, 0xde, 0xfc, 0x7e, -+ 0x8b, 0xcd, 0xa1, 0x36, 0xa1, 0x5c, 0x8c, 0xab, -+ 0x08, 0x69, 0xff, 0x52, 0xec, 0x5e, 0x26, 0x65, -+ 0x53, 0xb7, 0xb2, 0xa7, 0xfe, 0x87, 0xfd, 0x3d -+}; -+static const u8 enc_output060[] __initconst = { -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x36, 0xb1, 0x74, 0x38, 0x19, 0xe1, 0xb9, 0xba, -+ 0x15, 0x51, 0xe8, 0xed, 0x92, 0x2a, 0x95, 0x9a -+}; -+static const u8 enc_assoc060[] __initconst = { -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80 -+}; -+static const u8 enc_nonce060[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key060[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input061[] __initconst = { -+ 0x25, 0x6d, 0x40, 0x08, 0x80, 0x94, 0x17, 0x03, -+ 0x55, 0xd3, 0x04, 0x04, 0x64, 0x43, 0xfe, 0x68, -+ 0xdf, 0x99, 0x47, 0x83, 0x03, 0xfb, 0x3b, 0xfb, -+ 0x80, 0xe0, 0x30, 0x3e, 0xeb, 0xd3, 0x29, 0x3e, -+ 0xe3, 0xbc, 0xdb, 0xdb, 0x1e, 0xde, 0xfc, 0x7e, -+ 0x8b, 0xcd, 0xa1, 0x36, 0xa1, 0x5c, 0x8c, 0xab, -+ 0x08, 0x69, 0xff, 0x52, 0xec, 0x5e, 0x26, 0x65, -+ 0x53, 0xb7, 0xb2, 0xa7, 0xfe, 0x87, 0xfd, 0x3d, -+ 0x7a, 0xda, 0x44, 0xc2, 0x42, 0x69, 0xbf, 0x7a, -+ 0x55, 0x27, 0xf2, 0xf0, 0xac, 0xf6, 0x85, 0x82, -+ 0xb7, 0x4c, 0x5a, 0x62, 0xe6, 0x0c, 0x05, 0x00, -+ 0x98, 0x1a, 0x49, 0xb8, 0x45, 0x93, 0x92, 0x44, -+ 0x9b, 0xb2, 0xf2, 0x04, 0xb6, 0x46, 0xef, 0x47, -+ 0xf3, 0xf0, 0xb1, 0xb6, 0x1d, 0xc3, 0x48, 0x6d, -+ 0x77, 0xd3, 0x0b, 0x45, 0x76, 0x92, 0xed, 0xb8, -+ 0xfb, 0xac, 0x01, 0x08, 0x38, 0x04, 0x88, 0x47 -+}; -+static const u8 enc_output061[] __initconst = { -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0xfe, 0xac, 0x49, 0x55, 0x55, 0x4e, 0x80, 0x6f, -+ 0x3a, 0x19, 0x02, 0xe2, 0x44, 0x32, 0xc0, 0x8a -+}; -+static const u8 enc_assoc061[] __initconst = { -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80 -+}; -+static const u8 enc_nonce061[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key061[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input062[] __initconst = { -+ 0xda, 0x92, 0xbf, 0xf7, 0x7f, 0x6b, 0xe8, 0xfc, -+ 0xaa, 0x2c, 0xfb, 0xfb, 0x9b, 0xbc, 0x01, 0x97, -+ 0x20, 0x66, 0xb8, 0x7c, 0xfc, 0x04, 0xc4, 0x04, -+ 0x7f, 0x1f, 0xcf, 0xc1, 0x14, 0x2c, 0xd6, 0xc1 -+}; -+static const u8 enc_output062[] __initconst = { -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0x20, 0xa3, 0x79, 0x8d, 0xf1, 0x29, 0x2c, 0x59, -+ 0x72, 0xbf, 0x97, 0x41, 0xae, 0xc3, 0x8a, 0x19 -+}; -+static const u8 enc_assoc062[] __initconst = { -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f -+}; -+static const u8 enc_nonce062[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key062[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input063[] __initconst = { -+ 0xda, 0x92, 0xbf, 0xf7, 0x7f, 0x6b, 0xe8, 0xfc, -+ 0xaa, 0x2c, 0xfb, 0xfb, 0x9b, 0xbc, 0x01, 0x97, -+ 0x20, 0x66, 0xb8, 0x7c, 0xfc, 0x04, 0xc4, 0x04, -+ 0x7f, 0x1f, 0xcf, 0xc1, 0x14, 0x2c, 0xd6, 0xc1, -+ 0x1c, 0x43, 0x24, 0x24, 0xe1, 0x21, 0x03, 0x81, -+ 0x74, 0x32, 0x5e, 0xc9, 0x5e, 0xa3, 0x73, 0x54, -+ 0xf7, 0x96, 0x00, 0xad, 0x13, 0xa1, 0xd9, 0x9a, -+ 0xac, 0x48, 0x4d, 0x58, 0x01, 0x78, 0x02, 0xc2 -+}; -+static const u8 enc_output063[] __initconst = { -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xc0, 0x3d, 0x9f, 0x67, 0x35, 0x4a, 0x97, 0xb2, -+ 0xf0, 0x74, 0xf7, 0x55, 0x15, 0x57, 0xe4, 0x9c -+}; -+static const u8 enc_assoc063[] __initconst = { -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f -+}; -+static const u8 enc_nonce063[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key063[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input064[] __initconst = { -+ 0xda, 0x92, 0xbf, 0xf7, 0x7f, 0x6b, 0xe8, 0xfc, -+ 0xaa, 0x2c, 0xfb, 0xfb, 0x9b, 0xbc, 0x01, 0x97, -+ 0x20, 0x66, 0xb8, 0x7c, 0xfc, 0x04, 0xc4, 0x04, -+ 0x7f, 0x1f, 0xcf, 0xc1, 0x14, 0x2c, 0xd6, 0xc1, -+ 0x1c, 0x43, 0x24, 0x24, 0xe1, 0x21, 0x03, 0x81, -+ 0x74, 0x32, 0x5e, 0xc9, 0x5e, 0xa3, 0x73, 0x54, -+ 0xf7, 0x96, 0x00, 0xad, 0x13, 0xa1, 0xd9, 0x9a, -+ 0xac, 0x48, 0x4d, 0x58, 0x01, 0x78, 0x02, 0xc2, -+ 0x85, 0x25, 0xbb, 0x3d, 0xbd, 0x96, 0x40, 0x85, -+ 0xaa, 0xd8, 0x0d, 0x0f, 0x53, 0x09, 0x7a, 0x7d, -+ 0x48, 0xb3, 0xa5, 0x9d, 0x19, 0xf3, 0xfa, 0xff, -+ 0x67, 0xe5, 0xb6, 0x47, 0xba, 0x6c, 0x6d, 0xbb, -+ 0x64, 0x4d, 0x0d, 0xfb, 0x49, 0xb9, 0x10, 0xb8, -+ 0x0c, 0x0f, 0x4e, 0x49, 0xe2, 0x3c, 0xb7, 0x92, -+ 0x88, 0x2c, 0xf4, 0xba, 0x89, 0x6d, 0x12, 0x47, -+ 0x04, 0x53, 0xfe, 0xf7, 0xc7, 0xfb, 0x77, 0xb8 -+}; -+static const u8 enc_output064[] __initconst = { -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xc8, 0x6d, 0xa8, 0xdd, 0x65, 0x22, 0x86, 0xd5, -+ 0x02, 0x13, 0xd3, 0x28, 0xd6, 0x3e, 0x40, 0x06 -+}; -+static const u8 enc_assoc064[] __initconst = { -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f -+}; -+static const u8 enc_nonce064[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key064[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input065[] __initconst = { -+ 0x5a, 0x92, 0xbf, 0x77, 0xff, 0x6b, 0xe8, 0x7c, -+ 0x2a, 0x2c, 0xfb, 0x7b, 0x1b, 0xbc, 0x01, 0x17, -+ 0xa0, 0x66, 0xb8, 0xfc, 0x7c, 0x04, 0xc4, 0x84, -+ 0xff, 0x1f, 0xcf, 0x41, 0x94, 0x2c, 0xd6, 0x41 -+}; -+static const u8 enc_output065[] __initconst = { -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0xbe, 0xde, 0x90, 0x83, 0xce, 0xb3, 0x6d, 0xdf, -+ 0xe5, 0xfa, 0x81, 0x1f, 0x95, 0x47, 0x1c, 0x67 -+}; -+static const u8 enc_assoc065[] __initconst = { -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce065[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key065[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input066[] __initconst = { -+ 0x5a, 0x92, 0xbf, 0x77, 0xff, 0x6b, 0xe8, 0x7c, -+ 0x2a, 0x2c, 0xfb, 0x7b, 0x1b, 0xbc, 0x01, 0x17, -+ 0xa0, 0x66, 0xb8, 0xfc, 0x7c, 0x04, 0xc4, 0x84, -+ 0xff, 0x1f, 0xcf, 0x41, 0x94, 0x2c, 0xd6, 0x41, -+ 0x9c, 0x43, 0x24, 0xa4, 0x61, 0x21, 0x03, 0x01, -+ 0xf4, 0x32, 0x5e, 0x49, 0xde, 0xa3, 0x73, 0xd4, -+ 0x77, 0x96, 0x00, 0x2d, 0x93, 0xa1, 0xd9, 0x1a, -+ 0x2c, 0x48, 0x4d, 0xd8, 0x81, 0x78, 0x02, 0x42 -+}; -+static const u8 enc_output066[] __initconst = { -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x30, 0x08, 0x74, 0xbb, 0x06, 0x92, 0xb6, 0x89, -+ 0xde, 0xad, 0x9a, 0xe1, 0x5b, 0x06, 0x73, 0x90 -+}; -+static const u8 enc_assoc066[] __initconst = { -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce066[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key066[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input067[] __initconst = { -+ 0x5a, 0x92, 0xbf, 0x77, 0xff, 0x6b, 0xe8, 0x7c, -+ 0x2a, 0x2c, 0xfb, 0x7b, 0x1b, 0xbc, 0x01, 0x17, -+ 0xa0, 0x66, 0xb8, 0xfc, 0x7c, 0x04, 0xc4, 0x84, -+ 0xff, 0x1f, 0xcf, 0x41, 0x94, 0x2c, 0xd6, 0x41, -+ 0x9c, 0x43, 0x24, 0xa4, 0x61, 0x21, 0x03, 0x01, -+ 0xf4, 0x32, 0x5e, 0x49, 0xde, 0xa3, 0x73, 0xd4, -+ 0x77, 0x96, 0x00, 0x2d, 0x93, 0xa1, 0xd9, 0x1a, -+ 0x2c, 0x48, 0x4d, 0xd8, 0x81, 0x78, 0x02, 0x42, -+ 0x05, 0x25, 0xbb, 0xbd, 0x3d, 0x96, 0x40, 0x05, -+ 0x2a, 0xd8, 0x0d, 0x8f, 0xd3, 0x09, 0x7a, 0xfd, -+ 0xc8, 0xb3, 0xa5, 0x1d, 0x99, 0xf3, 0xfa, 0x7f, -+ 0xe7, 0xe5, 0xb6, 0xc7, 0x3a, 0x6c, 0x6d, 0x3b, -+ 0xe4, 0x4d, 0x0d, 0x7b, 0xc9, 0xb9, 0x10, 0x38, -+ 0x8c, 0x0f, 0x4e, 0xc9, 0x62, 0x3c, 0xb7, 0x12, -+ 0x08, 0x2c, 0xf4, 0x3a, 0x09, 0x6d, 0x12, 0xc7, -+ 0x84, 0x53, 0xfe, 0x77, 0x47, 0xfb, 0x77, 0x38 -+}; -+static const u8 enc_output067[] __initconst = { -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x99, 0xca, 0xd8, 0x5f, 0x45, 0xca, 0x40, 0x94, -+ 0x2d, 0x0d, 0x4d, 0x5e, 0x95, 0x0a, 0xde, 0x22 -+}; -+static const u8 enc_assoc067[] __initconst = { -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, -+ 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce067[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key067[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input068[] __initconst = { -+ 0x25, 0x6d, 0x40, 0x88, 0x7f, 0x6b, 0xe8, 0x7c, -+ 0x55, 0xd3, 0x04, 0x84, 0x9b, 0xbc, 0x01, 0x17, -+ 0xdf, 0x99, 0x47, 0x03, 0xfc, 0x04, 0xc4, 0x84, -+ 0x80, 0xe0, 0x30, 0xbe, 0x14, 0x2c, 0xd6, 0x41 -+}; -+static const u8 enc_output068[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x8b, 0xbe, 0x14, 0x52, 0x72, 0xe7, 0xc2, 0xd9, -+ 0xa1, 0x89, 0x1a, 0x3a, 0xb0, 0x98, 0x3d, 0x9d -+}; -+static const u8 enc_assoc068[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce068[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key068[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input069[] __initconst = { -+ 0x25, 0x6d, 0x40, 0x88, 0x7f, 0x6b, 0xe8, 0x7c, -+ 0x55, 0xd3, 0x04, 0x84, 0x9b, 0xbc, 0x01, 0x17, -+ 0xdf, 0x99, 0x47, 0x03, 0xfc, 0x04, 0xc4, 0x84, -+ 0x80, 0xe0, 0x30, 0xbe, 0x14, 0x2c, 0xd6, 0x41, -+ 0xe3, 0xbc, 0xdb, 0x5b, 0xe1, 0x21, 0x03, 0x01, -+ 0x8b, 0xcd, 0xa1, 0xb6, 0x5e, 0xa3, 0x73, 0xd4, -+ 0x08, 0x69, 0xff, 0xd2, 0x13, 0xa1, 0xd9, 0x1a, -+ 0x53, 0xb7, 0xb2, 0x27, 0x01, 0x78, 0x02, 0x42 -+}; -+static const u8 enc_output069[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x3b, 0x41, 0x86, 0x19, 0x13, 0xa8, 0xf6, 0xde, -+ 0x7f, 0x61, 0xe2, 0x25, 0x63, 0x1b, 0xc3, 0x82 -+}; -+static const u8 enc_assoc069[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce069[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key069[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input070[] __initconst = { -+ 0x25, 0x6d, 0x40, 0x88, 0x7f, 0x6b, 0xe8, 0x7c, -+ 0x55, 0xd3, 0x04, 0x84, 0x9b, 0xbc, 0x01, 0x17, -+ 0xdf, 0x99, 0x47, 0x03, 0xfc, 0x04, 0xc4, 0x84, -+ 0x80, 0xe0, 0x30, 0xbe, 0x14, 0x2c, 0xd6, 0x41, -+ 0xe3, 0xbc, 0xdb, 0x5b, 0xe1, 0x21, 0x03, 0x01, -+ 0x8b, 0xcd, 0xa1, 0xb6, 0x5e, 0xa3, 0x73, 0xd4, -+ 0x08, 0x69, 0xff, 0xd2, 0x13, 0xa1, 0xd9, 0x1a, -+ 0x53, 0xb7, 0xb2, 0x27, 0x01, 0x78, 0x02, 0x42, -+ 0x7a, 0xda, 0x44, 0x42, 0xbd, 0x96, 0x40, 0x05, -+ 0x55, 0x27, 0xf2, 0x70, 0x53, 0x09, 0x7a, 0xfd, -+ 0xb7, 0x4c, 0x5a, 0xe2, 0x19, 0xf3, 0xfa, 0x7f, -+ 0x98, 0x1a, 0x49, 0x38, 0xba, 0x6c, 0x6d, 0x3b, -+ 0x9b, 0xb2, 0xf2, 0x84, 0x49, 0xb9, 0x10, 0x38, -+ 0xf3, 0xf0, 0xb1, 0x36, 0xe2, 0x3c, 0xb7, 0x12, -+ 0x77, 0xd3, 0x0b, 0xc5, 0x89, 0x6d, 0x12, 0xc7, -+ 0xfb, 0xac, 0x01, 0x88, 0xc7, 0xfb, 0x77, 0x38 -+}; -+static const u8 enc_output070[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x84, 0x28, 0xbc, 0xf0, 0x23, 0xec, 0x6b, 0xf3, -+ 0x1f, 0xd9, 0xef, 0xb2, 0x03, 0xff, 0x08, 0x71 -+}; -+static const u8 enc_assoc070[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce070[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key070[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input071[] __initconst = { -+ 0xda, 0x92, 0xbf, 0x77, 0x80, 0x94, 0x17, 0x83, -+ 0xaa, 0x2c, 0xfb, 0x7b, 0x64, 0x43, 0xfe, 0xe8, -+ 0x20, 0x66, 0xb8, 0xfc, 0x03, 0xfb, 0x3b, 0x7b, -+ 0x7f, 0x1f, 0xcf, 0x41, 0xeb, 0xd3, 0x29, 0xbe -+}; -+static const u8 enc_output071[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0x13, 0x9f, 0xdf, 0x64, 0x74, 0xea, 0x24, 0xf5, -+ 0x49, 0xb0, 0x75, 0x82, 0x5f, 0x2c, 0x76, 0x20 -+}; -+static const u8 enc_assoc071[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 enc_nonce071[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key071[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input072[] __initconst = { -+ 0xda, 0x92, 0xbf, 0x77, 0x80, 0x94, 0x17, 0x83, -+ 0xaa, 0x2c, 0xfb, 0x7b, 0x64, 0x43, 0xfe, 0xe8, -+ 0x20, 0x66, 0xb8, 0xfc, 0x03, 0xfb, 0x3b, 0x7b, -+ 0x7f, 0x1f, 0xcf, 0x41, 0xeb, 0xd3, 0x29, 0xbe, -+ 0x1c, 0x43, 0x24, 0xa4, 0x1e, 0xde, 0xfc, 0xfe, -+ 0x74, 0x32, 0x5e, 0x49, 0xa1, 0x5c, 0x8c, 0x2b, -+ 0xf7, 0x96, 0x00, 0x2d, 0xec, 0x5e, 0x26, 0xe5, -+ 0xac, 0x48, 0x4d, 0xd8, 0xfe, 0x87, 0xfd, 0xbd -+}; -+static const u8 enc_output072[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xbb, 0xad, 0x8d, 0x86, 0x3b, 0x83, 0x5a, 0x8e, -+ 0x86, 0x64, 0xfd, 0x1d, 0x45, 0x66, 0xb6, 0xb4 -+}; -+static const u8 enc_assoc072[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 enc_nonce072[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key072[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - misc */ -+static const u8 enc_input073[] __initconst = { -+ 0xda, 0x92, 0xbf, 0x77, 0x80, 0x94, 0x17, 0x83, -+ 0xaa, 0x2c, 0xfb, 0x7b, 0x64, 0x43, 0xfe, 0xe8, -+ 0x20, 0x66, 0xb8, 0xfc, 0x03, 0xfb, 0x3b, 0x7b, -+ 0x7f, 0x1f, 0xcf, 0x41, 0xeb, 0xd3, 0x29, 0xbe, -+ 0x1c, 0x43, 0x24, 0xa4, 0x1e, 0xde, 0xfc, 0xfe, -+ 0x74, 0x32, 0x5e, 0x49, 0xa1, 0x5c, 0x8c, 0x2b, -+ 0xf7, 0x96, 0x00, 0x2d, 0xec, 0x5e, 0x26, 0xe5, -+ 0xac, 0x48, 0x4d, 0xd8, 0xfe, 0x87, 0xfd, 0xbd, -+ 0x85, 0x25, 0xbb, 0xbd, 0x42, 0x69, 0xbf, 0xfa, -+ 0xaa, 0xd8, 0x0d, 0x8f, 0xac, 0xf6, 0x85, 0x02, -+ 0x48, 0xb3, 0xa5, 0x1d, 0xe6, 0x0c, 0x05, 0x80, -+ 0x67, 0xe5, 0xb6, 0xc7, 0x45, 0x93, 0x92, 0xc4, -+ 0x64, 0x4d, 0x0d, 0x7b, 0xb6, 0x46, 0xef, 0xc7, -+ 0x0c, 0x0f, 0x4e, 0xc9, 0x1d, 0xc3, 0x48, 0xed, -+ 0x88, 0x2c, 0xf4, 0x3a, 0x76, 0x92, 0xed, 0x38, -+ 0x04, 0x53, 0xfe, 0x77, 0x38, 0x04, 0x88, 0xc7 -+}; -+static const u8 enc_output073[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0x42, 0xf2, 0x35, 0x42, 0x97, 0x84, 0x9a, 0x51, -+ 0x1d, 0x53, 0xe5, 0x57, 0x17, 0x72, 0xf7, 0x1f -+}; -+static const u8 enc_assoc073[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 enc_nonce073[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0xee, 0x32, 0x00 -+}; -+static const u8 enc_key073[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - checking for int overflows */ -+static const u8 enc_input074[] __initconst = { -+ 0xd4, 0x50, 0x0b, 0xf0, 0x09, 0x49, 0x35, 0x51, -+ 0xc3, 0x80, 0xad, 0xf5, 0x2c, 0x57, 0x3a, 0x69, -+ 0xdf, 0x7e, 0x8b, 0x76, 0x24, 0x63, 0x33, 0x0f, -+ 0xac, 0xc1, 0x6a, 0x57, 0x26, 0xbe, 0x71, 0x90, -+ 0xc6, 0x3c, 0x5a, 0x1c, 0x92, 0x65, 0x84, 0xa0, -+ 0x96, 0x75, 0x68, 0x28, 0xdc, 0xdc, 0x64, 0xac, -+ 0xdf, 0x96, 0x3d, 0x93, 0x1b, 0xf1, 0xda, 0xe2, -+ 0x38, 0xf3, 0xf1, 0x57, 0x22, 0x4a, 0xc4, 0xb5, -+ 0x42, 0xd7, 0x85, 0xb0, 0xdd, 0x84, 0xdb, 0x6b, -+ 0xe3, 0xbc, 0x5a, 0x36, 0x63, 0xe8, 0x41, 0x49, -+ 0xff, 0xbe, 0xd0, 0x9e, 0x54, 0xf7, 0x8f, 0x16, -+ 0xa8, 0x22, 0x3b, 0x24, 0xcb, 0x01, 0x9f, 0x58, -+ 0xb2, 0x1b, 0x0e, 0x55, 0x1e, 0x7a, 0xa0, 0x73, -+ 0x27, 0x62, 0x95, 0x51, 0x37, 0x6c, 0xcb, 0xc3, -+ 0x93, 0x76, 0x71, 0xa0, 0x62, 0x9b, 0xd9, 0x5c, -+ 0x99, 0x15, 0xc7, 0x85, 0x55, 0x77, 0x1e, 0x7a -+}; -+static const u8 enc_output074[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x0b, 0x30, 0x0d, 0x8d, 0xa5, 0x6c, 0x21, 0x85, -+ 0x75, 0x52, 0x79, 0x55, 0x3c, 0x4c, 0x82, 0xca -+}; -+static const u8 enc_assoc074[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce074[] __initconst = { -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x00, 0x02, 0x50, 0x6e -+}; -+static const u8 enc_key074[] __initconst = { -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30 -+}; -+ -+/* wycheproof - checking for int overflows */ -+static const u8 enc_input075[] __initconst = { -+ 0x7d, 0xe8, 0x7f, 0x67, 0x29, 0x94, 0x52, 0x75, -+ 0xd0, 0x65, 0x5d, 0xa4, 0xc7, 0xfd, 0xe4, 0x56, -+ 0x9e, 0x16, 0xf1, 0x11, 0xb5, 0xeb, 0x26, 0xc2, -+ 0x2d, 0x85, 0x9e, 0x3f, 0xf8, 0x22, 0xec, 0xed, -+ 0x3a, 0x6d, 0xd9, 0xa6, 0x0f, 0x22, 0x95, 0x7f, -+ 0x7b, 0x7c, 0x85, 0x7e, 0x88, 0x22, 0xeb, 0x9f, -+ 0xe0, 0xb8, 0xd7, 0x02, 0x21, 0x41, 0xf2, 0xd0, -+ 0xb4, 0x8f, 0x4b, 0x56, 0x12, 0xd3, 0x22, 0xa8, -+ 0x8d, 0xd0, 0xfe, 0x0b, 0x4d, 0x91, 0x79, 0x32, -+ 0x4f, 0x7c, 0x6c, 0x9e, 0x99, 0x0e, 0xfb, 0xd8, -+ 0x0e, 0x5e, 0xd6, 0x77, 0x58, 0x26, 0x49, 0x8b, -+ 0x1e, 0xfe, 0x0f, 0x71, 0xa0, 0xf3, 0xec, 0x5b, -+ 0x29, 0xcb, 0x28, 0xc2, 0x54, 0x0a, 0x7d, 0xcd, -+ 0x51, 0xb7, 0xda, 0xae, 0xe0, 0xff, 0x4a, 0x7f, -+ 0x3a, 0xc1, 0xee, 0x54, 0xc2, 0x9e, 0xe4, 0xc1, -+ 0x70, 0xde, 0x40, 0x8f, 0x66, 0x69, 0x21, 0x94 -+}; -+static const u8 enc_output075[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xc5, 0x78, 0xe2, 0xaa, 0x44, 0xd3, 0x09, 0xb7, -+ 0xb6, 0xa5, 0x19, 0x3b, 0xdc, 0x61, 0x18, 0xf5 -+}; -+static const u8 enc_assoc075[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce075[] __initconst = { -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x00, 0x03, 0x18, 0xa5 -+}; -+static const u8 enc_key075[] __initconst = { -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30 -+}; -+ -+/* wycheproof - checking for int overflows */ -+static const u8 enc_input076[] __initconst = { -+ 0x1b, 0x99, 0x6f, 0x9a, 0x3c, 0xcc, 0x67, 0x85, -+ 0xde, 0x22, 0xff, 0x5b, 0x8a, 0xdd, 0x95, 0x02, -+ 0xce, 0x03, 0xa0, 0xfa, 0xf5, 0x99, 0x2a, 0x09, -+ 0x52, 0x2c, 0xdd, 0x12, 0x06, 0xd2, 0x20, 0xb8, -+ 0xf8, 0xbd, 0x07, 0xd1, 0xf1, 0xf5, 0xa1, 0xbd, -+ 0x9a, 0x71, 0xd1, 0x1c, 0x7f, 0x57, 0x9b, 0x85, -+ 0x58, 0x18, 0xc0, 0x8d, 0x4d, 0xe0, 0x36, 0x39, -+ 0x31, 0x83, 0xb7, 0xf5, 0x90, 0xb3, 0x35, 0xae, -+ 0xd8, 0xde, 0x5b, 0x57, 0xb1, 0x3c, 0x5f, 0xed, -+ 0xe2, 0x44, 0x1c, 0x3e, 0x18, 0x4a, 0xa9, 0xd4, -+ 0x6e, 0x61, 0x59, 0x85, 0x06, 0xb3, 0xe1, 0x1c, -+ 0x43, 0xc6, 0x2c, 0xbc, 0xac, 0xec, 0xed, 0x33, -+ 0x19, 0x08, 0x75, 0xb0, 0x12, 0x21, 0x8b, 0x19, -+ 0x30, 0xfb, 0x7c, 0x38, 0xec, 0x45, 0xac, 0x11, -+ 0xc3, 0x53, 0xd0, 0xcf, 0x93, 0x8d, 0xcc, 0xb9, -+ 0xef, 0xad, 0x8f, 0xed, 0xbe, 0x46, 0xda, 0xa5 -+}; -+static const u8 enc_output076[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x4b, 0x0b, 0xda, 0x8a, 0xd0, 0x43, 0x83, 0x0d, -+ 0x83, 0x19, 0xab, 0x82, 0xc5, 0x0c, 0x76, 0x63 -+}; -+static const u8 enc_assoc076[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce076[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xb4, 0xf0 -+}; -+static const u8 enc_key076[] __initconst = { -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30 -+}; -+ -+/* wycheproof - checking for int overflows */ -+static const u8 enc_input077[] __initconst = { -+ 0x86, 0xcb, 0xac, 0xae, 0x4d, 0x3f, 0x74, 0xae, -+ 0x01, 0x21, 0x3e, 0x05, 0x51, 0xcc, 0x15, 0x16, -+ 0x0e, 0xa1, 0xbe, 0x84, 0x08, 0xe3, 0xd5, 0xd7, -+ 0x4f, 0x01, 0x46, 0x49, 0x95, 0xa6, 0x9e, 0x61, -+ 0x76, 0xcb, 0x9e, 0x02, 0xb2, 0x24, 0x7e, 0xd2, -+ 0x99, 0x89, 0x2f, 0x91, 0x82, 0xa4, 0x5c, 0xaf, -+ 0x4c, 0x69, 0x40, 0x56, 0x11, 0x76, 0x6e, 0xdf, -+ 0xaf, 0xdc, 0x28, 0x55, 0x19, 0xea, 0x30, 0x48, -+ 0x0c, 0x44, 0xf0, 0x5e, 0x78, 0x1e, 0xac, 0xf8, -+ 0xfc, 0xec, 0xc7, 0x09, 0x0a, 0xbb, 0x28, 0xfa, -+ 0x5f, 0xd5, 0x85, 0xac, 0x8c, 0xda, 0x7e, 0x87, -+ 0x72, 0xe5, 0x94, 0xe4, 0xce, 0x6c, 0x88, 0x32, -+ 0x81, 0x93, 0x2e, 0x0f, 0x89, 0xf8, 0x77, 0xa1, -+ 0xf0, 0x4d, 0x9c, 0x32, 0xb0, 0x6c, 0xf9, 0x0b, -+ 0x0e, 0x76, 0x2b, 0x43, 0x0c, 0x4d, 0x51, 0x7c, -+ 0x97, 0x10, 0x70, 0x68, 0xf4, 0x98, 0xef, 0x7f -+}; -+static const u8 enc_output077[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x4b, 0xc9, 0x8f, 0x72, 0xc4, 0x94, 0xc2, 0xa4, -+ 0x3c, 0x2b, 0x15, 0xa1, 0x04, 0x3f, 0x1c, 0xfa -+}; -+static const u8 enc_assoc077[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce077[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xfb, 0x66 -+}; -+static const u8 enc_key077[] __initconst = { -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30 -+}; -+ -+/* wycheproof - checking for int overflows */ -+static const u8 enc_input078[] __initconst = { -+ 0xfa, 0xb1, 0xcd, 0xdf, 0x4f, 0xe1, 0x98, 0xef, -+ 0x63, 0xad, 0xd8, 0x81, 0xd6, 0xea, 0xd6, 0xc5, -+ 0x76, 0x37, 0xbb, 0xe9, 0x20, 0x18, 0xca, 0x7c, -+ 0x0b, 0x96, 0xfb, 0xa0, 0x87, 0x1e, 0x93, 0x2d, -+ 0xb1, 0xfb, 0xf9, 0x07, 0x61, 0xbe, 0x25, 0xdf, -+ 0x8d, 0xfa, 0xf9, 0x31, 0xce, 0x57, 0x57, 0xe6, -+ 0x17, 0xb3, 0xd7, 0xa9, 0xf0, 0xbf, 0x0f, 0xfe, -+ 0x5d, 0x59, 0x1a, 0x33, 0xc1, 0x43, 0xb8, 0xf5, -+ 0x3f, 0xd0, 0xb5, 0xa1, 0x96, 0x09, 0xfd, 0x62, -+ 0xe5, 0xc2, 0x51, 0xa4, 0x28, 0x1a, 0x20, 0x0c, -+ 0xfd, 0xc3, 0x4f, 0x28, 0x17, 0x10, 0x40, 0x6f, -+ 0x4e, 0x37, 0x62, 0x54, 0x46, 0xff, 0x6e, 0xf2, -+ 0x24, 0x91, 0x3d, 0xeb, 0x0d, 0x89, 0xaf, 0x33, -+ 0x71, 0x28, 0xe3, 0xd1, 0x55, 0xd1, 0x6d, 0x3e, -+ 0xc3, 0x24, 0x60, 0x41, 0x43, 0x21, 0x43, 0xe9, -+ 0xab, 0x3a, 0x6d, 0x2c, 0xcc, 0x2f, 0x4d, 0x62 -+}; -+static const u8 enc_output078[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xf7, 0xe9, 0xe1, 0x51, 0xb0, 0x25, 0x33, 0xc7, -+ 0x46, 0x58, 0xbf, 0xc7, 0x73, 0x7c, 0x68, 0x0d -+}; -+static const u8 enc_assoc078[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce078[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xbb, 0x90 -+}; -+static const u8 enc_key078[] __initconst = { -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30 -+}; -+ -+/* wycheproof - checking for int overflows */ -+static const u8 enc_input079[] __initconst = { -+ 0x22, 0x72, 0x02, 0xbe, 0x7f, 0x35, 0x15, 0xe9, -+ 0xd1, 0xc0, 0x2e, 0xea, 0x2f, 0x19, 0x50, 0xb6, -+ 0x48, 0x1b, 0x04, 0x8a, 0x4c, 0x91, 0x50, 0x6c, -+ 0xb4, 0x0d, 0x50, 0x4e, 0x6c, 0x94, 0x9f, 0x82, -+ 0xd1, 0x97, 0xc2, 0x5a, 0xd1, 0x7d, 0xc7, 0x21, -+ 0x65, 0x11, 0x25, 0x78, 0x2a, 0xc7, 0xa7, 0x12, -+ 0x47, 0xfe, 0xae, 0xf3, 0x2f, 0x1f, 0x25, 0x0c, -+ 0xe4, 0xbb, 0x8f, 0x79, 0xac, 0xaa, 0x17, 0x9d, -+ 0x45, 0xa7, 0xb0, 0x54, 0x5f, 0x09, 0x24, 0x32, -+ 0x5e, 0xfa, 0x87, 0xd5, 0xe4, 0x41, 0xd2, 0x84, -+ 0x78, 0xc6, 0x1f, 0x22, 0x23, 0xee, 0x67, 0xc3, -+ 0xb4, 0x1f, 0x43, 0x94, 0x53, 0x5e, 0x2a, 0x24, -+ 0x36, 0x9a, 0x2e, 0x16, 0x61, 0x3c, 0x45, 0x94, -+ 0x90, 0xc1, 0x4f, 0xb1, 0xd7, 0x55, 0xfe, 0x53, -+ 0xfb, 0xe1, 0xee, 0x45, 0xb1, 0xb2, 0x1f, 0x71, -+ 0x62, 0xe2, 0xfc, 0xaa, 0x74, 0x2a, 0xbe, 0xfd -+}; -+static const u8 enc_output079[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x79, 0x5b, 0xcf, 0xf6, 0x47, 0xc5, 0x53, 0xc2, -+ 0xe4, 0xeb, 0x6e, 0x0e, 0xaf, 0xd9, 0xe0, 0x4e -+}; -+static const u8 enc_assoc079[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce079[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x48, 0x4a -+}; -+static const u8 enc_key079[] __initconst = { -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30 -+}; -+ -+/* wycheproof - checking for int overflows */ -+static const u8 enc_input080[] __initconst = { -+ 0xfa, 0xe5, 0x83, 0x45, 0xc1, 0x6c, 0xb0, 0xf5, -+ 0xcc, 0x53, 0x7f, 0x2b, 0x1b, 0x34, 0x69, 0xc9, -+ 0x69, 0x46, 0x3b, 0x3e, 0xa7, 0x1b, 0xcf, 0x6b, -+ 0x98, 0xd6, 0x69, 0xa8, 0xe6, 0x0e, 0x04, 0xfc, -+ 0x08, 0xd5, 0xfd, 0x06, 0x9c, 0x36, 0x26, 0x38, -+ 0xe3, 0x40, 0x0e, 0xf4, 0xcb, 0x24, 0x2e, 0x27, -+ 0xe2, 0x24, 0x5e, 0x68, 0xcb, 0x9e, 0xc5, 0x83, -+ 0xda, 0x53, 0x40, 0xb1, 0x2e, 0xdf, 0x42, 0x3b, -+ 0x73, 0x26, 0xad, 0x20, 0xfe, 0xeb, 0x57, 0xda, -+ 0xca, 0x2e, 0x04, 0x67, 0xa3, 0x28, 0x99, 0xb4, -+ 0x2d, 0xf8, 0xe5, 0x6d, 0x84, 0xe0, 0x06, 0xbc, -+ 0x8a, 0x7a, 0xcc, 0x73, 0x1e, 0x7c, 0x1f, 0x6b, -+ 0xec, 0xb5, 0x71, 0x9f, 0x70, 0x77, 0xf0, 0xd4, -+ 0xf4, 0xc6, 0x1a, 0xb1, 0x1e, 0xba, 0xc1, 0x00, -+ 0x18, 0x01, 0xce, 0x33, 0xc4, 0xe4, 0xa7, 0x7d, -+ 0x83, 0x1d, 0x3c, 0xe3, 0x4e, 0x84, 0x10, 0xe1 -+}; -+static const u8 enc_output080[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x19, 0x46, 0xd6, 0x53, 0x96, 0x0f, 0x94, 0x7a, -+ 0x74, 0xd3, 0xe8, 0x09, 0x3c, 0xf4, 0x85, 0x02 -+}; -+static const u8 enc_assoc080[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce080[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x2f, 0x40 -+}; -+static const u8 enc_key080[] __initconst = { -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30 -+}; -+ -+/* wycheproof - checking for int overflows */ -+static const u8 enc_input081[] __initconst = { -+ 0xeb, 0xb2, 0x16, 0xdd, 0xd7, 0xca, 0x70, 0x92, -+ 0x15, 0xf5, 0x03, 0xdf, 0x9c, 0xe6, 0x3c, 0x5c, -+ 0xd2, 0x19, 0x4e, 0x7d, 0x90, 0x99, 0xe8, 0xa9, -+ 0x0b, 0x2a, 0xfa, 0xad, 0x5e, 0xba, 0x35, 0x06, -+ 0x99, 0x25, 0xa6, 0x03, 0xfd, 0xbc, 0x34, 0x1a, -+ 0xae, 0xd4, 0x15, 0x05, 0xb1, 0x09, 0x41, 0xfa, -+ 0x38, 0x56, 0xa7, 0xe2, 0x47, 0xb1, 0x04, 0x07, -+ 0x09, 0x74, 0x6c, 0xfc, 0x20, 0x96, 0xca, 0xa6, -+ 0x31, 0xb2, 0xff, 0xf4, 0x1c, 0x25, 0x05, 0x06, -+ 0xd8, 0x89, 0xc1, 0xc9, 0x06, 0x71, 0xad, 0xe8, -+ 0x53, 0xee, 0x63, 0x94, 0xc1, 0x91, 0x92, 0xa5, -+ 0xcf, 0x37, 0x10, 0xd1, 0x07, 0x30, 0x99, 0xe5, -+ 0xbc, 0x94, 0x65, 0x82, 0xfc, 0x0f, 0xab, 0x9f, -+ 0x54, 0x3c, 0x71, 0x6a, 0xe2, 0x48, 0x6a, 0x86, -+ 0x83, 0xfd, 0xca, 0x39, 0xd2, 0xe1, 0x4f, 0x23, -+ 0xd0, 0x0a, 0x58, 0x26, 0x64, 0xf4, 0xec, 0xb1 -+}; -+static const u8 enc_output081[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x36, 0xc3, 0x00, 0x29, 0x85, 0xdd, 0x21, 0xba, -+ 0xf8, 0x95, 0xd6, 0x33, 0x57, 0x3f, 0x12, 0xc0 -+}; -+static const u8 enc_assoc081[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce081[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x93, 0x35 -+}; -+static const u8 enc_key081[] __initconst = { -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, -+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30 -+}; -+ -+/* wycheproof - checking for int overflows */ -+static const u8 enc_input082[] __initconst = { -+ 0x40, 0x8a, 0xe6, 0xef, 0x1c, 0x7e, 0xf0, 0xfb, -+ 0x2c, 0x2d, 0x61, 0x08, 0x16, 0xfc, 0x78, 0x49, -+ 0xef, 0xa5, 0x8f, 0x78, 0x27, 0x3f, 0x5f, 0x16, -+ 0x6e, 0xa6, 0x5f, 0x81, 0xb5, 0x75, 0x74, 0x7d, -+ 0x03, 0x5b, 0x30, 0x40, 0xfe, 0xde, 0x1e, 0xb9, -+ 0x45, 0x97, 0x88, 0x66, 0x97, 0x88, 0x40, 0x8e, -+ 0x00, 0x41, 0x3b, 0x3e, 0x37, 0x6d, 0x15, 0x2d, -+ 0x20, 0x4a, 0xa2, 0xb7, 0xa8, 0x35, 0x58, 0xfc, -+ 0xd4, 0x8a, 0x0e, 0xf7, 0xa2, 0x6b, 0x1c, 0xd6, -+ 0xd3, 0x5d, 0x23, 0xb3, 0xf5, 0xdf, 0xe0, 0xca, -+ 0x77, 0xa4, 0xce, 0x32, 0xb9, 0x4a, 0xbf, 0x83, -+ 0xda, 0x2a, 0xef, 0xca, 0xf0, 0x68, 0x38, 0x08, -+ 0x79, 0xe8, 0x9f, 0xb0, 0xa3, 0x82, 0x95, 0x95, -+ 0xcf, 0x44, 0xc3, 0x85, 0x2a, 0xe2, 0xcc, 0x66, -+ 0x2b, 0x68, 0x9f, 0x93, 0x55, 0xd9, 0xc1, 0x83, -+ 0x80, 0x1f, 0x6a, 0xcc, 0x31, 0x3f, 0x89, 0x07 -+}; -+static const u8 enc_output082[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x65, 0x14, 0x51, 0x8e, 0x0a, 0x26, 0x41, 0x42, -+ 0xe0, 0xb7, 0x35, 0x1f, 0x96, 0x7f, 0xc2, 0xae -+}; -+static const u8 enc_assoc082[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce082[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xf7, 0xd5 -+}; -+static const u8 enc_key082[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - checking for int overflows */ -+static const u8 enc_input083[] __initconst = { -+ 0x0a, 0x0a, 0x24, 0x49, 0x9b, 0xca, 0xde, 0x58, -+ 0xcf, 0x15, 0x76, 0xc3, 0x12, 0xac, 0xa9, 0x84, -+ 0x71, 0x8c, 0xb4, 0xcc, 0x7e, 0x01, 0x53, 0xf5, -+ 0xa9, 0x01, 0x58, 0x10, 0x85, 0x96, 0x44, 0xdf, -+ 0xc0, 0x21, 0x17, 0x4e, 0x0b, 0x06, 0x0a, 0x39, -+ 0x74, 0x48, 0xde, 0x8b, 0x48, 0x4a, 0x86, 0x03, -+ 0xbe, 0x68, 0x0a, 0x69, 0x34, 0xc0, 0x90, 0x6f, -+ 0x30, 0xdd, 0x17, 0xea, 0xe2, 0xd4, 0xc5, 0xfa, -+ 0xa7, 0x77, 0xf8, 0xca, 0x53, 0x37, 0x0e, 0x08, -+ 0x33, 0x1b, 0x88, 0xc3, 0x42, 0xba, 0xc9, 0x59, -+ 0x78, 0x7b, 0xbb, 0x33, 0x93, 0x0e, 0x3b, 0x56, -+ 0xbe, 0x86, 0xda, 0x7f, 0x2a, 0x6e, 0xb1, 0xf9, -+ 0x40, 0x89, 0xd1, 0xd1, 0x81, 0x07, 0x4d, 0x43, -+ 0x02, 0xf8, 0xe0, 0x55, 0x2d, 0x0d, 0xe1, 0xfa, -+ 0xb3, 0x06, 0xa2, 0x1b, 0x42, 0xd4, 0xc3, 0xba, -+ 0x6e, 0x6f, 0x0c, 0xbc, 0xc8, 0x1e, 0x87, 0x7a -+}; -+static const u8 enc_output083[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x4c, 0x19, 0x4d, 0xa6, 0xa9, 0x9f, 0xd6, 0x5b, -+ 0x40, 0xe9, 0xca, 0xd7, 0x98, 0xf4, 0x4b, 0x19 -+}; -+static const u8 enc_assoc083[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce083[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0xfc, 0xe4 -+}; -+static const u8 enc_key083[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - checking for int overflows */ -+static const u8 enc_input084[] __initconst = { -+ 0x4a, 0x0a, 0xaf, 0xf8, 0x49, 0x47, 0x29, 0x18, -+ 0x86, 0x91, 0x70, 0x13, 0x40, 0xf3, 0xce, 0x2b, -+ 0x8a, 0x78, 0xee, 0xd3, 0xa0, 0xf0, 0x65, 0x99, -+ 0x4b, 0x72, 0x48, 0x4e, 0x79, 0x91, 0xd2, 0x5c, -+ 0x29, 0xaa, 0x07, 0x5e, 0xb1, 0xfc, 0x16, 0xde, -+ 0x93, 0xfe, 0x06, 0x90, 0x58, 0x11, 0x2a, 0xb2, -+ 0x84, 0xa3, 0xed, 0x18, 0x78, 0x03, 0x26, 0xd1, -+ 0x25, 0x8a, 0x47, 0x22, 0x2f, 0xa6, 0x33, 0xd8, -+ 0xb2, 0x9f, 0x3b, 0xd9, 0x15, 0x0b, 0x23, 0x9b, -+ 0x15, 0x46, 0xc2, 0xbb, 0x9b, 0x9f, 0x41, 0x0f, -+ 0xeb, 0xea, 0xd3, 0x96, 0x00, 0x0e, 0xe4, 0x77, -+ 0x70, 0x15, 0x32, 0xc3, 0xd0, 0xf5, 0xfb, 0xf8, -+ 0x95, 0xd2, 0x80, 0x19, 0x6d, 0x2f, 0x73, 0x7c, -+ 0x5e, 0x9f, 0xec, 0x50, 0xd9, 0x2b, 0xb0, 0xdf, -+ 0x5d, 0x7e, 0x51, 0x3b, 0xe5, 0xb8, 0xea, 0x97, -+ 0x13, 0x10, 0xd5, 0xbf, 0x16, 0xba, 0x7a, 0xee -+}; -+static const u8 enc_output084[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xc8, 0xae, 0x77, 0x88, 0xcd, 0x28, 0x74, 0xab, -+ 0xc1, 0x38, 0x54, 0x1e, 0x11, 0xfd, 0x05, 0x87 -+}; -+static const u8 enc_assoc084[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce084[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x84, 0x86, 0xa8 -+}; -+static const u8 enc_key084[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - checking for int overflows */ -+static const u8 enc_input085[] __initconst = { -+ 0xff, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0x78, 0x3d, 0x35, 0xf6, 0x13, 0xe6, 0xd9, 0x09, -+ 0x3d, 0x38, 0xe9, 0x75, 0xc3, 0x8f, 0xe3, 0xb8, -+ 0x9f, 0x7a, 0xed, 0x35, 0xcb, 0x5a, 0x2f, 0xca, -+ 0xa0, 0x34, 0x6e, 0xfb, 0x93, 0x65, 0x54, 0x64, -+ 0x9c, 0xf6, 0x37, 0x81, 0x71, 0xea, 0xe4, 0x39, -+ 0x6e, 0xa1, 0x5d, 0xc2, 0x40, 0xd1, 0xab, 0xf4, -+ 0x47, 0x2d, 0x90, 0x96, 0x52, 0x4f, 0xa1, 0xb2, -+ 0xb0, 0x23, 0xb8, 0xb2, 0x88, 0x22, 0x27, 0x73, -+ 0xd4, 0xd2, 0x06, 0x61, 0x6f, 0x92, 0x93, 0xf6, -+ 0x5b, 0x45, 0xdb, 0xbc, 0x74, 0xe7, 0xc2, 0xed, -+ 0xfb, 0xcb, 0xbf, 0x1c, 0xfb, 0x67, 0x9b, 0xb7, -+ 0x39, 0xa5, 0x86, 0x2d, 0xe2, 0xbc, 0xb9, 0x37, -+ 0xf7, 0x4d, 0x5b, 0xf8, 0x67, 0x1c, 0x5a, 0x8a, -+ 0x50, 0x92, 0xf6, 0x1d, 0x54, 0xc9, 0xaa, 0x5b -+}; -+static const u8 enc_output085[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x93, 0x3a, 0x51, 0x63, 0xc7, 0xf6, 0x23, 0x68, -+ 0x32, 0x7b, 0x3f, 0xbc, 0x10, 0x36, 0xc9, 0x43 -+}; -+static const u8 enc_assoc085[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce085[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key085[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - special case tag */ -+static const u8 enc_input086[] __initconst = { -+ 0x9a, 0x49, 0xc4, 0x0f, 0x8b, 0x48, 0xd7, 0xc6, -+ 0x6d, 0x1d, 0xb4, 0xe5, 0x3f, 0x20, 0xf2, 0xdd, -+ 0x4a, 0xaa, 0x24, 0x1d, 0xda, 0xb2, 0x6b, 0x5b, -+ 0xc0, 0xe2, 0x18, 0xb7, 0x2c, 0x33, 0x90, 0xf2, -+ 0xdf, 0x3e, 0xbd, 0x01, 0x76, 0x70, 0x44, 0x19, -+ 0x97, 0x2b, 0xcd, 0xbc, 0x6b, 0xbc, 0xb3, 0xe4, -+ 0xe7, 0x4a, 0x71, 0x52, 0x8e, 0xf5, 0x12, 0x63, -+ 0xce, 0x24, 0xe0, 0xd5, 0x75, 0xe0, 0xe4, 0x4d -+}; -+static const u8 enc_output086[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f -+}; -+static const u8 enc_assoc086[] __initconst = { -+ 0x85, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xa6, 0x90, 0x2f, 0xcb, 0xc8, 0x83, 0xbb, 0xc1, -+ 0x80, 0xb2, 0x56, 0xae, 0x34, 0xad, 0x7f, 0x00 -+}; -+static const u8 enc_nonce086[] __initconst = { -+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0x0a, 0x0b -+}; -+static const u8 enc_key086[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - special case tag */ -+static const u8 enc_input087[] __initconst = { -+ 0x9a, 0x49, 0xc4, 0x0f, 0x8b, 0x48, 0xd7, 0xc6, -+ 0x6d, 0x1d, 0xb4, 0xe5, 0x3f, 0x20, 0xf2, 0xdd, -+ 0x4a, 0xaa, 0x24, 0x1d, 0xda, 0xb2, 0x6b, 0x5b, -+ 0xc0, 0xe2, 0x18, 0xb7, 0x2c, 0x33, 0x90, 0xf2, -+ 0xdf, 0x3e, 0xbd, 0x01, 0x76, 0x70, 0x44, 0x19, -+ 0x97, 0x2b, 0xcd, 0xbc, 0x6b, 0xbc, 0xb3, 0xe4, -+ 0xe7, 0x4a, 0x71, 0x52, 0x8e, 0xf5, 0x12, 0x63, -+ 0xce, 0x24, 0xe0, 0xd5, 0x75, 0xe0, 0xe4, 0x4d -+}; -+static const u8 enc_output087[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 enc_assoc087[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x24, 0x7e, 0x50, 0x64, 0x2a, 0x1c, 0x0a, 0x2f, -+ 0x8f, 0x77, 0x21, 0x96, 0x09, 0xdb, 0xa9, 0x58 -+}; -+static const u8 enc_nonce087[] __initconst = { -+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0x0a, 0x0b -+}; -+static const u8 enc_key087[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - special case tag */ -+static const u8 enc_input088[] __initconst = { -+ 0x9a, 0x49, 0xc4, 0x0f, 0x8b, 0x48, 0xd7, 0xc6, -+ 0x6d, 0x1d, 0xb4, 0xe5, 0x3f, 0x20, 0xf2, 0xdd, -+ 0x4a, 0xaa, 0x24, 0x1d, 0xda, 0xb2, 0x6b, 0x5b, -+ 0xc0, 0xe2, 0x18, 0xb7, 0x2c, 0x33, 0x90, 0xf2, -+ 0xdf, 0x3e, 0xbd, 0x01, 0x76, 0x70, 0x44, 0x19, -+ 0x97, 0x2b, 0xcd, 0xbc, 0x6b, 0xbc, 0xb3, 0xe4, -+ 0xe7, 0x4a, 0x71, 0x52, 0x8e, 0xf5, 0x12, 0x63, -+ 0xce, 0x24, 0xe0, 0xd5, 0x75, 0xe0, 0xe4, 0x4d -+}; -+static const u8 enc_output088[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_assoc088[] __initconst = { -+ 0x7c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xd9, 0xe7, 0x2c, 0x06, 0x4a, 0xc8, 0x96, 0x1f, -+ 0x3f, 0xa5, 0x85, 0xe0, 0xe2, 0xab, 0xd6, 0x00 -+}; -+static const u8 enc_nonce088[] __initconst = { -+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0x0a, 0x0b -+}; -+static const u8 enc_key088[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - special case tag */ -+static const u8 enc_input089[] __initconst = { -+ 0x9a, 0x49, 0xc4, 0x0f, 0x8b, 0x48, 0xd7, 0xc6, -+ 0x6d, 0x1d, 0xb4, 0xe5, 0x3f, 0x20, 0xf2, 0xdd, -+ 0x4a, 0xaa, 0x24, 0x1d, 0xda, 0xb2, 0x6b, 0x5b, -+ 0xc0, 0xe2, 0x18, 0xb7, 0x2c, 0x33, 0x90, 0xf2, -+ 0xdf, 0x3e, 0xbd, 0x01, 0x76, 0x70, 0x44, 0x19, -+ 0x97, 0x2b, 0xcd, 0xbc, 0x6b, 0xbc, 0xb3, 0xe4, -+ 0xe7, 0x4a, 0x71, 0x52, 0x8e, 0xf5, 0x12, 0x63, -+ 0xce, 0x24, 0xe0, 0xd5, 0x75, 0xe0, 0xe4, 0x4d -+}; -+static const u8 enc_output089[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80 -+}; -+static const u8 enc_assoc089[] __initconst = { -+ 0x65, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x95, 0xaf, 0x0f, 0x4d, 0x0b, 0x68, 0x6e, 0xae, -+ 0xcc, 0xca, 0x43, 0x07, 0xd5, 0x96, 0xf5, 0x02 -+}; -+static const u8 enc_nonce089[] __initconst = { -+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0x0a, 0x0b -+}; -+static const u8 enc_key089[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - special case tag */ -+static const u8 enc_input090[] __initconst = { -+ 0x9a, 0x49, 0xc4, 0x0f, 0x8b, 0x48, 0xd7, 0xc6, -+ 0x6d, 0x1d, 0xb4, 0xe5, 0x3f, 0x20, 0xf2, 0xdd, -+ 0x4a, 0xaa, 0x24, 0x1d, 0xda, 0xb2, 0x6b, 0x5b, -+ 0xc0, 0xe2, 0x18, 0xb7, 0x2c, 0x33, 0x90, 0xf2, -+ 0xdf, 0x3e, 0xbd, 0x01, 0x76, 0x70, 0x44, 0x19, -+ 0x97, 0x2b, 0xcd, 0xbc, 0x6b, 0xbc, 0xb3, 0xe4, -+ 0xe7, 0x4a, 0x71, 0x52, 0x8e, 0xf5, 0x12, 0x63, -+ 0xce, 0x24, 0xe0, 0xd5, 0x75, 0xe0, 0xe4, 0x4d -+}; -+static const u8 enc_output090[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f -+}; -+static const u8 enc_assoc090[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x85, 0x40, 0xb4, 0x64, 0x35, 0x77, 0x07, 0xbe, -+ 0x3a, 0x39, 0xd5, 0x5c, 0x34, 0xf8, 0xbc, 0xb3 -+}; -+static const u8 enc_nonce090[] __initconst = { -+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0x0a, 0x0b -+}; -+static const u8 enc_key090[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - special case tag */ -+static const u8 enc_input091[] __initconst = { -+ 0x9a, 0x49, 0xc4, 0x0f, 0x8b, 0x48, 0xd7, 0xc6, -+ 0x6d, 0x1d, 0xb4, 0xe5, 0x3f, 0x20, 0xf2, 0xdd, -+ 0x4a, 0xaa, 0x24, 0x1d, 0xda, 0xb2, 0x6b, 0x5b, -+ 0xc0, 0xe2, 0x18, 0xb7, 0x2c, 0x33, 0x90, 0xf2, -+ 0xdf, 0x3e, 0xbd, 0x01, 0x76, 0x70, 0x44, 0x19, -+ 0x97, 0x2b, 0xcd, 0xbc, 0x6b, 0xbc, 0xb3, 0xe4, -+ 0xe7, 0x4a, 0x71, 0x52, 0x8e, 0xf5, 0x12, 0x63, -+ 0xce, 0x24, 0xe0, 0xd5, 0x75, 0xe0, 0xe4, 0x4d -+}; -+static const u8 enc_output091[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -+ 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 -+}; -+static const u8 enc_assoc091[] __initconst = { -+ 0x4f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x66, 0x23, 0xd9, 0x90, 0xb8, 0x98, 0xd8, 0x30, -+ 0xd2, 0x12, 0xaf, 0x23, 0x83, 0x33, 0x07, 0x01 -+}; -+static const u8 enc_nonce091[] __initconst = { -+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0x0a, 0x0b -+}; -+static const u8 enc_key091[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - special case tag */ -+static const u8 enc_input092[] __initconst = { -+ 0x9a, 0x49, 0xc4, 0x0f, 0x8b, 0x48, 0xd7, 0xc6, -+ 0x6d, 0x1d, 0xb4, 0xe5, 0x3f, 0x20, 0xf2, 0xdd, -+ 0x4a, 0xaa, 0x24, 0x1d, 0xda, 0xb2, 0x6b, 0x5b, -+ 0xc0, 0xe2, 0x18, 0xb7, 0x2c, 0x33, 0x90, 0xf2, -+ 0xdf, 0x3e, 0xbd, 0x01, 0x76, 0x70, 0x44, 0x19, -+ 0x97, 0x2b, 0xcd, 0xbc, 0x6b, 0xbc, 0xb3, 0xe4, -+ 0xe7, 0x4a, 0x71, 0x52, 0x8e, 0xf5, 0x12, 0x63, -+ 0xce, 0x24, 0xe0, 0xd5, 0x75, 0xe0, 0xe4, 0x4d -+}; -+static const u8 enc_output092[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 enc_assoc092[] __initconst = { -+ 0x83, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x5f, 0x16, 0xd0, 0x9f, 0x17, 0x78, 0x72, 0x11, -+ 0xb7, 0xd4, 0x84, 0xe0, 0x24, 0xf8, 0x97, 0x01 -+}; -+static const u8 enc_nonce092[] __initconst = { -+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0x0a, 0x0b -+}; -+static const u8 enc_key092[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input093[] __initconst = { -+ 0x00, 0x52, 0x35, 0xd2, 0xa9, 0x19, 0xf2, 0x8d, -+ 0x3d, 0xb7, 0x66, 0x4a, 0x34, 0xae, 0x6b, 0x44, -+ 0x4d, 0x3d, 0x35, 0xf6, 0x13, 0xe6, 0xd9, 0x09, -+ 0x3d, 0x38, 0xe9, 0x75, 0xc3, 0x8f, 0xe3, 0xb8, -+ 0x5b, 0x8b, 0x94, 0x50, 0x9e, 0x2b, 0x74, 0xa3, -+ 0x6d, 0x34, 0x6e, 0x33, 0xd5, 0x72, 0x65, 0x9b, -+ 0xa9, 0xf6, 0x37, 0x81, 0x71, 0xea, 0xe4, 0x39, -+ 0x6e, 0xa1, 0x5d, 0xc2, 0x40, 0xd1, 0xab, 0xf4, -+ 0x83, 0xdc, 0xe9, 0xf3, 0x07, 0x3e, 0xfa, 0xdb, -+ 0x7d, 0x23, 0xb8, 0x7a, 0xce, 0x35, 0x16, 0x8c -+}; -+static const u8 enc_output093[] __initconst = { -+ 0x00, 0x39, 0xe2, 0xfd, 0x2f, 0xd3, 0x12, 0x14, -+ 0x9e, 0x98, 0x98, 0x80, 0x88, 0x48, 0x13, 0xe7, -+ 0xca, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x3b, 0x0e, 0x86, 0x9a, 0xaa, 0x8e, 0xa4, 0x96, -+ 0x32, 0xff, 0xff, 0x37, 0xb9, 0xe8, 0xce, 0x00, -+ 0xca, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x3b, 0x0e, 0x86, 0x9a, 0xaa, 0x8e, 0xa4, 0x96, -+ 0x32, 0xff, 0xff, 0x37, 0xb9, 0xe8, 0xce, 0x00, -+ 0xa5, 0x19, 0xac, 0x1a, 0x35, 0xb4, 0xa5, 0x77, -+ 0x87, 0x51, 0x0a, 0xf7, 0x8d, 0x8d, 0x20, 0x0a -+}; -+static const u8 enc_assoc093[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce093[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key093[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input094[] __initconst = { -+ 0xd3, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0xe5, 0xda, 0x78, 0x76, 0x6f, 0xa1, 0x92, 0x90, -+ 0xc0, 0x31, 0xf7, 0x52, 0x08, 0x50, 0x67, 0x45, -+ 0xae, 0x7a, 0xed, 0x35, 0xcb, 0x5a, 0x2f, 0xca, -+ 0xa0, 0x34, 0x6e, 0xfb, 0x93, 0x65, 0x54, 0x64, -+ 0x49, 0x6d, 0xde, 0xb0, 0x55, 0x09, 0xc6, 0xef, -+ 0xff, 0xab, 0x75, 0xeb, 0x2d, 0xf4, 0xab, 0x09, -+ 0x76, 0x2d, 0x90, 0x96, 0x52, 0x4f, 0xa1, 0xb2, -+ 0xb0, 0x23, 0xb8, 0xb2, 0x88, 0x22, 0x27, 0x73, -+ 0x01, 0x49, 0xef, 0x50, 0x4b, 0x71, 0xb1, 0x20, -+ 0xca, 0x4f, 0xf3, 0x95, 0x19, 0xc2, 0xc2, 0x10 -+}; -+static const u8 enc_output094[] __initconst = { -+ 0xd3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x62, 0x18, 0xb2, 0x7f, 0x83, 0xb8, 0xb4, 0x66, -+ 0x02, 0xf6, 0xe1, 0xd8, 0x34, 0x20, 0x7b, 0x02, -+ 0xce, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x2a, 0x64, 0x16, 0xce, 0xdb, 0x1c, 0xdd, 0x29, -+ 0x6e, 0xf5, 0xd7, 0xd6, 0x92, 0xda, 0xff, 0x02, -+ 0xce, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x2a, 0x64, 0x16, 0xce, 0xdb, 0x1c, 0xdd, 0x29, -+ 0x6e, 0xf5, 0xd7, 0xd6, 0x92, 0xda, 0xff, 0x02, -+ 0x30, 0x2f, 0xe8, 0x2a, 0xb0, 0xa0, 0x9a, 0xf6, -+ 0x44, 0x00, 0xd0, 0x15, 0xae, 0x83, 0xd9, 0xcc -+}; -+static const u8 enc_assoc094[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce094[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key094[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input095[] __initconst = { -+ 0xe9, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0x6d, 0xf1, 0x39, 0x4e, 0xdc, 0x53, 0x9b, 0x5b, -+ 0x3a, 0x09, 0x57, 0xbe, 0x0f, 0xb8, 0x59, 0x46, -+ 0x80, 0x7a, 0xed, 0x35, 0xcb, 0x5a, 0x2f, 0xca, -+ 0xa0, 0x34, 0x6e, 0xfb, 0x93, 0x65, 0x54, 0x64, -+ 0xd1, 0x76, 0x9f, 0xe8, 0x06, 0xbb, 0xfe, 0xb6, -+ 0xf5, 0x90, 0x95, 0x0f, 0x2e, 0xac, 0x9e, 0x0a, -+ 0x58, 0x2d, 0x90, 0x96, 0x52, 0x4f, 0xa1, 0xb2, -+ 0xb0, 0x23, 0xb8, 0xb2, 0x88, 0x22, 0x27, 0x73, -+ 0x99, 0x52, 0xae, 0x08, 0x18, 0xc3, 0x89, 0x79, -+ 0xc0, 0x74, 0x13, 0x71, 0x1a, 0x9a, 0xf7, 0x13 -+}; -+static const u8 enc_output095[] __initconst = { -+ 0xe9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xea, 0x33, 0xf3, 0x47, 0x30, 0x4a, 0xbd, 0xad, -+ 0xf8, 0xce, 0x41, 0x34, 0x33, 0xc8, 0x45, 0x01, -+ 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xb2, 0x7f, 0x57, 0x96, 0x88, 0xae, 0xe5, 0x70, -+ 0x64, 0xce, 0x37, 0x32, 0x91, 0x82, 0xca, 0x01, -+ 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xb2, 0x7f, 0x57, 0x96, 0x88, 0xae, 0xe5, 0x70, -+ 0x64, 0xce, 0x37, 0x32, 0x91, 0x82, 0xca, 0x01, -+ 0x98, 0xa7, 0xe8, 0x36, 0xe0, 0xee, 0x4d, 0x02, -+ 0x35, 0x00, 0xd0, 0x55, 0x7e, 0xc2, 0xcb, 0xe0 -+}; -+static const u8 enc_assoc095[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce095[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key095[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input096[] __initconst = { -+ 0xff, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0x64, 0xf9, 0x0f, 0x5b, 0x26, 0x92, 0xb8, 0x60, -+ 0xd4, 0x59, 0x6f, 0xf4, 0xb3, 0x40, 0x2c, 0x5c, -+ 0x00, 0xb9, 0xbb, 0x53, 0x70, 0x7a, 0xa6, 0x67, -+ 0xd3, 0x56, 0xfe, 0x50, 0xc7, 0x19, 0x96, 0x94, -+ 0x03, 0x35, 0x61, 0xe7, 0xca, 0xca, 0x6d, 0x94, -+ 0x1d, 0xc3, 0xcd, 0x69, 0x14, 0xad, 0x69, 0x04 -+}; -+static const u8 enc_output096[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xe3, 0x3b, 0xc5, 0x52, 0xca, 0x8b, 0x9e, 0x96, -+ 0x16, 0x9e, 0x79, 0x7e, 0x8f, 0x30, 0x30, 0x1b, -+ 0x60, 0x3c, 0xa9, 0x99, 0x44, 0xdf, 0x76, 0x52, -+ 0x8c, 0x9d, 0x6f, 0x54, 0xab, 0x83, 0x3d, 0x0f, -+ 0x60, 0x3c, 0xa9, 0x99, 0x44, 0xdf, 0x76, 0x52, -+ 0x8c, 0x9d, 0x6f, 0x54, 0xab, 0x83, 0x3d, 0x0f, -+ 0x6a, 0xb8, 0xdc, 0xe2, 0xc5, 0x9d, 0xa4, 0x73, -+ 0x71, 0x30, 0xb0, 0x25, 0x2f, 0x68, 0xa8, 0xd8 -+}; -+static const u8 enc_assoc096[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce096[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key096[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input097[] __initconst = { -+ 0x68, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0xb0, 0x8f, 0x25, 0x67, 0x5b, 0x9b, 0xcb, 0xf6, -+ 0xe3, 0x84, 0x07, 0xde, 0x2e, 0xc7, 0x5a, 0x47, -+ 0x9f, 0x7a, 0xed, 0x35, 0xcb, 0x5a, 0x2f, 0xca, -+ 0xa0, 0x34, 0x6e, 0xfb, 0x93, 0x65, 0x54, 0x64, -+ 0x2d, 0x2a, 0xf7, 0xcd, 0x6b, 0x08, 0x05, 0x01, -+ 0xd3, 0x1b, 0xa5, 0x4f, 0xb2, 0xeb, 0x75, 0x96, -+ 0x47, 0x2d, 0x90, 0x96, 0x52, 0x4f, 0xa1, 0xb2, -+ 0xb0, 0x23, 0xb8, 0xb2, 0x88, 0x22, 0x27, 0x73, -+ 0x65, 0x0e, 0xc6, 0x2d, 0x75, 0x70, 0x72, 0xce, -+ 0xe6, 0xff, 0x23, 0x31, 0x86, 0xdd, 0x1c, 0x8f -+}; -+static const u8 enc_output097[] __initconst = { -+ 0x68, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x37, 0x4d, 0xef, 0x6e, 0xb7, 0x82, 0xed, 0x00, -+ 0x21, 0x43, 0x11, 0x54, 0x12, 0xb7, 0x46, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x4e, 0x23, 0x3f, 0xb3, 0xe5, 0x1d, 0x1e, 0xc7, -+ 0x42, 0x45, 0x07, 0x72, 0x0d, 0xc5, 0x21, 0x9d, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x4e, 0x23, 0x3f, 0xb3, 0xe5, 0x1d, 0x1e, 0xc7, -+ 0x42, 0x45, 0x07, 0x72, 0x0d, 0xc5, 0x21, 0x9d, -+ 0x04, 0x4d, 0xea, 0x60, 0x88, 0x80, 0x41, 0x2b, -+ 0xfd, 0xff, 0xcf, 0x35, 0x57, 0x9e, 0x9b, 0x26 -+}; -+static const u8 enc_assoc097[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce097[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key097[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input098[] __initconst = { -+ 0x6d, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0xa1, 0x61, 0xb5, 0xab, 0x04, 0x09, 0x00, 0x62, -+ 0x9e, 0xfe, 0xff, 0x78, 0xd7, 0xd8, 0x6b, 0x45, -+ 0x9f, 0x7a, 0xed, 0x35, 0xcb, 0x5a, 0x2f, 0xca, -+ 0xa0, 0x34, 0x6e, 0xfb, 0x93, 0x65, 0x54, 0x64, -+ 0xc6, 0xf8, 0x07, 0x8c, 0xc8, 0xef, 0x12, 0xa0, -+ 0xff, 0x65, 0x7d, 0x6d, 0x08, 0xdb, 0x10, 0xb8, -+ 0x47, 0x2d, 0x90, 0x96, 0x52, 0x4f, 0xa1, 0xb2, -+ 0xb0, 0x23, 0xb8, 0xb2, 0x88, 0x22, 0x27, 0x73, -+ 0x8e, 0xdc, 0x36, 0x6c, 0xd6, 0x97, 0x65, 0x6f, -+ 0xca, 0x81, 0xfb, 0x13, 0x3c, 0xed, 0x79, 0xa1 -+}; -+static const u8 enc_output098[] __initconst = { -+ 0x6d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x26, 0xa3, 0x7f, 0xa2, 0xe8, 0x10, 0x26, 0x94, -+ 0x5c, 0x39, 0xe9, 0xf2, 0xeb, 0xa8, 0x77, 0x02, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xa5, 0xf1, 0xcf, 0xf2, 0x46, 0xfa, 0x09, 0x66, -+ 0x6e, 0x3b, 0xdf, 0x50, 0xb7, 0xf5, 0x44, 0xb3, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xa5, 0xf1, 0xcf, 0xf2, 0x46, 0xfa, 0x09, 0x66, -+ 0x6e, 0x3b, 0xdf, 0x50, 0xb7, 0xf5, 0x44, 0xb3, -+ 0x1e, 0x6b, 0xea, 0x63, 0x14, 0x54, 0x2e, 0x2e, -+ 0xf9, 0xff, 0xcf, 0x45, 0x0b, 0x2e, 0x98, 0x2b -+}; -+static const u8 enc_assoc098[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce098[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key098[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input099[] __initconst = { -+ 0xff, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0xfc, 0x01, 0xb8, 0x91, 0xe5, 0xf0, 0xf9, 0x12, -+ 0x8d, 0x7d, 0x1c, 0x57, 0x91, 0x92, 0xb6, 0x98, -+ 0x63, 0x41, 0x44, 0x15, 0xb6, 0x99, 0x68, 0x95, -+ 0x9a, 0x72, 0x91, 0xb7, 0xa5, 0xaf, 0x13, 0x48, -+ 0x60, 0xcd, 0x9e, 0xa1, 0x0c, 0x29, 0xa3, 0x66, -+ 0x54, 0xe7, 0xa2, 0x8e, 0x76, 0x1b, 0xec, 0xd8 -+}; -+static const u8 enc_output099[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x7b, 0xc3, 0x72, 0x98, 0x09, 0xe9, 0xdf, 0xe4, -+ 0x4f, 0xba, 0x0a, 0xdd, 0xad, 0xe2, 0xaa, 0xdf, -+ 0x03, 0xc4, 0x56, 0xdf, 0x82, 0x3c, 0xb8, 0xa0, -+ 0xc5, 0xb9, 0x00, 0xb3, 0xc9, 0x35, 0xb8, 0xd3, -+ 0x03, 0xc4, 0x56, 0xdf, 0x82, 0x3c, 0xb8, 0xa0, -+ 0xc5, 0xb9, 0x00, 0xb3, 0xc9, 0x35, 0xb8, 0xd3, -+ 0xed, 0x20, 0x17, 0xc8, 0xdb, 0xa4, 0x77, 0x56, -+ 0x29, 0x04, 0x9d, 0x78, 0x6e, 0x3b, 0xce, 0xb1 -+}; -+static const u8 enc_assoc099[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce099[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key099[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input100[] __initconst = { -+ 0xff, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0x6b, 0x6d, 0xc9, 0xd2, 0x1a, 0x81, 0x9e, 0x70, -+ 0xb5, 0x77, 0xf4, 0x41, 0x37, 0xd3, 0xd6, 0xbd, -+ 0x13, 0x35, 0xf5, 0xeb, 0x44, 0x49, 0x40, 0x77, -+ 0xb2, 0x64, 0x49, 0xa5, 0x4b, 0x6c, 0x7c, 0x75, -+ 0x10, 0xb9, 0x2f, 0x5f, 0xfe, 0xf9, 0x8b, 0x84, -+ 0x7c, 0xf1, 0x7a, 0x9c, 0x98, 0xd8, 0x83, 0xe5 -+}; -+static const u8 enc_output100[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xec, 0xaf, 0x03, 0xdb, 0xf6, 0x98, 0xb8, 0x86, -+ 0x77, 0xb0, 0xe2, 0xcb, 0x0b, 0xa3, 0xca, 0xfa, -+ 0x73, 0xb0, 0xe7, 0x21, 0x70, 0xec, 0x90, 0x42, -+ 0xed, 0xaf, 0xd8, 0xa1, 0x27, 0xf6, 0xd7, 0xee, -+ 0x73, 0xb0, 0xe7, 0x21, 0x70, 0xec, 0x90, 0x42, -+ 0xed, 0xaf, 0xd8, 0xa1, 0x27, 0xf6, 0xd7, 0xee, -+ 0x07, 0x3f, 0x17, 0xcb, 0x67, 0x78, 0x64, 0x59, -+ 0x25, 0x04, 0x9d, 0x88, 0x22, 0xcb, 0xca, 0xb6 -+}; -+static const u8 enc_assoc100[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce100[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key100[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input101[] __initconst = { -+ 0xff, 0xcb, 0x2b, 0x11, 0x06, 0xf8, 0x23, 0x4c, -+ 0x5e, 0x99, 0xd4, 0xdb, 0x4c, 0x70, 0x48, 0xde, -+ 0x32, 0x3d, 0x35, 0xf6, 0x13, 0xe6, 0xd9, 0x09, -+ 0x3d, 0x38, 0xe9, 0x75, 0xc3, 0x8f, 0xe3, 0xb8, -+ 0x16, 0xe9, 0x88, 0x4a, 0x11, 0x4f, 0x0e, 0x92, -+ 0x66, 0xce, 0xa3, 0x88, 0x5f, 0xe3, 0x6b, 0x9f, -+ 0xd6, 0xf6, 0x37, 0x81, 0x71, 0xea, 0xe4, 0x39, -+ 0x6e, 0xa1, 0x5d, 0xc2, 0x40, 0xd1, 0xab, 0xf4, -+ 0xce, 0xbe, 0xf5, 0xe9, 0x88, 0x5a, 0x80, 0xea, -+ 0x76, 0xd9, 0x75, 0xc1, 0x44, 0xa4, 0x18, 0x88 -+}; -+static const u8 enc_output101[] __initconst = { -+ 0xff, 0xa0, 0xfc, 0x3e, 0x80, 0x32, 0xc3, 0xd5, -+ 0xfd, 0xb6, 0x2a, 0x11, 0xf0, 0x96, 0x30, 0x7d, -+ 0xb5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x76, 0x6c, 0x9a, 0x80, 0x25, 0xea, 0xde, 0xa7, -+ 0x39, 0x05, 0x32, 0x8c, 0x33, 0x79, 0xc0, 0x04, -+ 0xb5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x76, 0x6c, 0x9a, 0x80, 0x25, 0xea, 0xde, 0xa7, -+ 0x39, 0x05, 0x32, 0x8c, 0x33, 0x79, 0xc0, 0x04, -+ 0x8b, 0x9b, 0xb4, 0xb4, 0x86, 0x12, 0x89, 0x65, -+ 0x8c, 0x69, 0x6a, 0x83, 0x40, 0x15, 0x04, 0x05 -+}; -+static const u8 enc_assoc101[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce101[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key101[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input102[] __initconst = { -+ 0x6f, 0x9e, 0x70, 0xed, 0x3b, 0x8b, 0xac, 0xa0, -+ 0x26, 0xe4, 0x6a, 0x5a, 0x09, 0x43, 0x15, 0x8d, -+ 0x21, 0x3d, 0x35, 0xf6, 0x13, 0xe6, 0xd9, 0x09, -+ 0x3d, 0x38, 0xe9, 0x75, 0xc3, 0x8f, 0xe3, 0xb8, -+ 0x0c, 0x61, 0x2c, 0x5e, 0x8d, 0x89, 0xa8, 0x73, -+ 0xdb, 0xca, 0xad, 0x5b, 0x73, 0x46, 0x42, 0x9b, -+ 0xc5, 0xf6, 0x37, 0x81, 0x71, 0xea, 0xe4, 0x39, -+ 0x6e, 0xa1, 0x5d, 0xc2, 0x40, 0xd1, 0xab, 0xf4, -+ 0xd4, 0x36, 0x51, 0xfd, 0x14, 0x9c, 0x26, 0x0b, -+ 0xcb, 0xdd, 0x7b, 0x12, 0x68, 0x01, 0x31, 0x8c -+}; -+static const u8 enc_output102[] __initconst = { -+ 0x6f, 0xf5, 0xa7, 0xc2, 0xbd, 0x41, 0x4c, 0x39, -+ 0x85, 0xcb, 0x94, 0x90, 0xb5, 0xa5, 0x6d, 0x2e, -+ 0xa6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x6c, 0xe4, 0x3e, 0x94, 0xb9, 0x2c, 0x78, 0x46, -+ 0x84, 0x01, 0x3c, 0x5f, 0x1f, 0xdc, 0xe9, 0x00, -+ 0xa6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x6c, 0xe4, 0x3e, 0x94, 0xb9, 0x2c, 0x78, 0x46, -+ 0x84, 0x01, 0x3c, 0x5f, 0x1f, 0xdc, 0xe9, 0x00, -+ 0x8b, 0x3b, 0xbd, 0x51, 0x64, 0x44, 0x59, 0x56, -+ 0x8d, 0x81, 0xca, 0x1f, 0xa7, 0x2c, 0xe4, 0x04 -+}; -+static const u8 enc_assoc102[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce102[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key102[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input103[] __initconst = { -+ 0x41, 0x2b, 0x08, 0x0a, 0x3e, 0x19, 0xc1, 0x0d, -+ 0x44, 0xa1, 0xaf, 0x1e, 0xab, 0xde, 0xb4, 0xce, -+ 0x35, 0x3d, 0x35, 0xf6, 0x13, 0xe6, 0xd9, 0x09, -+ 0x3d, 0x38, 0xe9, 0x75, 0xc3, 0x8f, 0xe3, 0xb8, -+ 0x6b, 0x83, 0x94, 0x33, 0x09, 0x21, 0x48, 0x6c, -+ 0xa1, 0x1d, 0x29, 0x1c, 0x3e, 0x97, 0xee, 0x9a, -+ 0xd1, 0xf6, 0x37, 0x81, 0x71, 0xea, 0xe4, 0x39, -+ 0x6e, 0xa1, 0x5d, 0xc2, 0x40, 0xd1, 0xab, 0xf4, -+ 0xb3, 0xd4, 0xe9, 0x90, 0x90, 0x34, 0xc6, 0x14, -+ 0xb1, 0x0a, 0xff, 0x55, 0x25, 0xd0, 0x9d, 0x8d -+}; -+static const u8 enc_output103[] __initconst = { -+ 0x41, 0x40, 0xdf, 0x25, 0xb8, 0xd3, 0x21, 0x94, -+ 0xe7, 0x8e, 0x51, 0xd4, 0x17, 0x38, 0xcc, 0x6d, -+ 0xb2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x0b, 0x06, 0x86, 0xf9, 0x3d, 0x84, 0x98, 0x59, -+ 0xfe, 0xd6, 0xb8, 0x18, 0x52, 0x0d, 0x45, 0x01, -+ 0xb2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x0b, 0x06, 0x86, 0xf9, 0x3d, 0x84, 0x98, 0x59, -+ 0xfe, 0xd6, 0xb8, 0x18, 0x52, 0x0d, 0x45, 0x01, -+ 0x86, 0xfb, 0xab, 0x2b, 0x4a, 0x94, 0xf4, 0x7a, -+ 0xa5, 0x6f, 0x0a, 0xea, 0x65, 0xd1, 0x10, 0x08 -+}; -+static const u8 enc_assoc103[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce103[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key103[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input104[] __initconst = { -+ 0xb2, 0x47, 0xa7, 0x47, 0x23, 0x49, 0x1a, 0xac, -+ 0xac, 0xaa, 0xd7, 0x09, 0xc9, 0x1e, 0x93, 0x2b, -+ 0x31, 0x3d, 0x35, 0xf6, 0x13, 0xe6, 0xd9, 0x09, -+ 0x3d, 0x38, 0xe9, 0x75, 0xc3, 0x8f, 0xe3, 0xb8, -+ 0x9a, 0xde, 0x04, 0xe7, 0x5b, 0xb7, 0x01, 0xd9, -+ 0x66, 0x06, 0x01, 0xb3, 0x47, 0x65, 0xde, 0x98, -+ 0xd5, 0xf6, 0x37, 0x81, 0x71, 0xea, 0xe4, 0x39, -+ 0x6e, 0xa1, 0x5d, 0xc2, 0x40, 0xd1, 0xab, 0xf4, -+ 0x42, 0x89, 0x79, 0x44, 0xc2, 0xa2, 0x8f, 0xa1, -+ 0x76, 0x11, 0xd7, 0xfa, 0x5c, 0x22, 0xad, 0x8f -+}; -+static const u8 enc_output104[] __initconst = { -+ 0xb2, 0x2c, 0x70, 0x68, 0xa5, 0x83, 0xfa, 0x35, -+ 0x0f, 0x85, 0x29, 0xc3, 0x75, 0xf8, 0xeb, 0x88, -+ 0xb6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xfa, 0x5b, 0x16, 0x2d, 0x6f, 0x12, 0xd1, 0xec, -+ 0x39, 0xcd, 0x90, 0xb7, 0x2b, 0xff, 0x75, 0x03, -+ 0xb6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xfa, 0x5b, 0x16, 0x2d, 0x6f, 0x12, 0xd1, 0xec, -+ 0x39, 0xcd, 0x90, 0xb7, 0x2b, 0xff, 0x75, 0x03, -+ 0xa0, 0x19, 0xac, 0x2e, 0xd6, 0x67, 0xe1, 0x7d, -+ 0xa1, 0x6f, 0x0a, 0xfa, 0x19, 0x61, 0x0d, 0x0d -+}; -+static const u8 enc_assoc104[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce104[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key104[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input105[] __initconst = { -+ 0x74, 0x0f, 0x9e, 0x49, 0xf6, 0x10, 0xef, 0xa5, -+ 0x85, 0xb6, 0x59, 0xca, 0x6e, 0xd8, 0xb4, 0x99, -+ 0x2d, 0x3d, 0x35, 0xf6, 0x13, 0xe6, 0xd9, 0x09, -+ 0x3d, 0x38, 0xe9, 0x75, 0xc3, 0x8f, 0xe3, 0xb8, -+ 0x41, 0x2d, 0x96, 0xaf, 0xbe, 0x80, 0xec, 0x3e, -+ 0x79, 0xd4, 0x51, 0xb0, 0x0a, 0x2d, 0xb2, 0x9a, -+ 0xc9, 0xf6, 0x37, 0x81, 0x71, 0xea, 0xe4, 0x39, -+ 0x6e, 0xa1, 0x5d, 0xc2, 0x40, 0xd1, 0xab, 0xf4, -+ 0x99, 0x7a, 0xeb, 0x0c, 0x27, 0x95, 0x62, 0x46, -+ 0x69, 0xc3, 0x87, 0xf9, 0x11, 0x6a, 0xc1, 0x8d -+}; -+static const u8 enc_output105[] __initconst = { -+ 0x74, 0x64, 0x49, 0x66, 0x70, 0xda, 0x0f, 0x3c, -+ 0x26, 0x99, 0xa7, 0x00, 0xd2, 0x3e, 0xcc, 0x3a, -+ 0xaa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x21, 0xa8, 0x84, 0x65, 0x8a, 0x25, 0x3c, 0x0b, -+ 0x26, 0x1f, 0xc0, 0xb4, 0x66, 0xb7, 0x19, 0x01, -+ 0xaa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x21, 0xa8, 0x84, 0x65, 0x8a, 0x25, 0x3c, 0x0b, -+ 0x26, 0x1f, 0xc0, 0xb4, 0x66, 0xb7, 0x19, 0x01, -+ 0x73, 0x6e, 0x18, 0x18, 0x16, 0x96, 0xa5, 0x88, -+ 0x9c, 0x31, 0x59, 0xfa, 0xab, 0xab, 0x20, 0xfd -+}; -+static const u8 enc_assoc105[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce105[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key105[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input106[] __initconst = { -+ 0xad, 0xba, 0x5d, 0x10, 0x5b, 0xc8, 0xaa, 0x06, -+ 0x2c, 0x23, 0x36, 0xcb, 0x88, 0x9d, 0xdb, 0xd5, -+ 0x37, 0x3d, 0x35, 0xf6, 0x13, 0xe6, 0xd9, 0x09, -+ 0x3d, 0x38, 0xe9, 0x75, 0xc3, 0x8f, 0xe3, 0xb8, -+ 0x17, 0x7c, 0x5f, 0xfe, 0x28, 0x75, 0xf4, 0x68, -+ 0xf6, 0xc2, 0x96, 0x57, 0x48, 0xf3, 0x59, 0x9a, -+ 0xd3, 0xf6, 0x37, 0x81, 0x71, 0xea, 0xe4, 0x39, -+ 0x6e, 0xa1, 0x5d, 0xc2, 0x40, 0xd1, 0xab, 0xf4, -+ 0xcf, 0x2b, 0x22, 0x5d, 0xb1, 0x60, 0x7a, 0x10, -+ 0xe6, 0xd5, 0x40, 0x1e, 0x53, 0xb4, 0x2a, 0x8d -+}; -+static const u8 enc_output106[] __initconst = { -+ 0xad, 0xd1, 0x8a, 0x3f, 0xdd, 0x02, 0x4a, 0x9f, -+ 0x8f, 0x0c, 0xc8, 0x01, 0x34, 0x7b, 0xa3, 0x76, -+ 0xb0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x77, 0xf9, 0x4d, 0x34, 0x1c, 0xd0, 0x24, 0x5d, -+ 0xa9, 0x09, 0x07, 0x53, 0x24, 0x69, 0xf2, 0x01, -+ 0xb0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x77, 0xf9, 0x4d, 0x34, 0x1c, 0xd0, 0x24, 0x5d, -+ 0xa9, 0x09, 0x07, 0x53, 0x24, 0x69, 0xf2, 0x01, -+ 0xba, 0xd5, 0x8f, 0x10, 0xa9, 0x1e, 0x6a, 0x88, -+ 0x9a, 0xba, 0x32, 0xfd, 0x17, 0xd8, 0x33, 0x1a -+}; -+static const u8 enc_assoc106[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce106[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key106[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input107[] __initconst = { -+ 0xfe, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0xc0, 0x01, 0xed, 0xc5, 0xda, 0x44, 0x2e, 0x71, -+ 0x9b, 0xce, 0x9a, 0xbe, 0x27, 0x3a, 0xf1, 0x44, -+ 0xb4, 0x7a, 0xed, 0x35, 0xcb, 0x5a, 0x2f, 0xca, -+ 0xa0, 0x34, 0x6e, 0xfb, 0x93, 0x65, 0x54, 0x64, -+ 0x48, 0x02, 0x5f, 0x41, 0xfa, 0x4e, 0x33, 0x6c, -+ 0x78, 0x69, 0x57, 0xa2, 0xa7, 0xc4, 0x93, 0x0a, -+ 0x6c, 0x2d, 0x90, 0x96, 0x52, 0x4f, 0xa1, 0xb2, -+ 0xb0, 0x23, 0xb8, 0xb2, 0x88, 0x22, 0x27, 0x73, -+ 0x00, 0x26, 0x6e, 0xa1, 0xe4, 0x36, 0x44, 0xa3, -+ 0x4d, 0x8d, 0xd1, 0xdc, 0x93, 0xf2, 0xfa, 0x13 -+}; -+static const u8 enc_output107[] __initconst = { -+ 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x47, 0xc3, 0x27, 0xcc, 0x36, 0x5d, 0x08, 0x87, -+ 0x59, 0x09, 0x8c, 0x34, 0x1b, 0x4a, 0xed, 0x03, -+ 0xd4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x2b, 0x0b, 0x97, 0x3f, 0x74, 0x5b, 0x28, 0xaa, -+ 0xe9, 0x37, 0xf5, 0x9f, 0x18, 0xea, 0xc7, 0x01, -+ 0xd4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x2b, 0x0b, 0x97, 0x3f, 0x74, 0x5b, 0x28, 0xaa, -+ 0xe9, 0x37, 0xf5, 0x9f, 0x18, 0xea, 0xc7, 0x01, -+ 0xd6, 0x8c, 0xe1, 0x74, 0x07, 0x9a, 0xdd, 0x02, -+ 0x8d, 0xd0, 0x5c, 0xf8, 0x14, 0x63, 0x04, 0x88 -+}; -+static const u8 enc_assoc107[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce107[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key107[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input108[] __initconst = { -+ 0xb5, 0x13, 0xb0, 0x6a, 0xb9, 0xac, 0x14, 0x43, -+ 0x5a, 0xcb, 0x8a, 0xa3, 0xa3, 0x7a, 0xfd, 0xb6, -+ 0x54, 0x3d, 0x35, 0xf6, 0x13, 0xe6, 0xd9, 0x09, -+ 0x3d, 0x38, 0xe9, 0x75, 0xc3, 0x8f, 0xe3, 0xb8, -+ 0x61, 0x95, 0x01, 0x93, 0xb1, 0xbf, 0x03, 0x11, -+ 0xff, 0x11, 0x79, 0x89, 0xae, 0xd9, 0xa9, 0x99, -+ 0xb0, 0xf6, 0x37, 0x81, 0x71, 0xea, 0xe4, 0x39, -+ 0x6e, 0xa1, 0x5d, 0xc2, 0x40, 0xd1, 0xab, 0xf4, -+ 0xb9, 0xc2, 0x7c, 0x30, 0x28, 0xaa, 0x8d, 0x69, -+ 0xef, 0x06, 0xaf, 0xc0, 0xb5, 0x9e, 0xda, 0x8e -+}; -+static const u8 enc_output108[] __initconst = { -+ 0xb5, 0x78, 0x67, 0x45, 0x3f, 0x66, 0xf4, 0xda, -+ 0xf9, 0xe4, 0x74, 0x69, 0x1f, 0x9c, 0x85, 0x15, -+ 0xd3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x01, 0x10, 0x13, 0x59, 0x85, 0x1a, 0xd3, 0x24, -+ 0xa0, 0xda, 0xe8, 0x8d, 0xc2, 0x43, 0x02, 0x02, -+ 0xd3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x01, 0x10, 0x13, 0x59, 0x85, 0x1a, 0xd3, 0x24, -+ 0xa0, 0xda, 0xe8, 0x8d, 0xc2, 0x43, 0x02, 0x02, -+ 0xaa, 0x48, 0xa3, 0x88, 0x7d, 0x4b, 0x05, 0x96, -+ 0x99, 0xc2, 0xfd, 0xf9, 0xc6, 0x78, 0x7e, 0x0a -+}; -+static const u8 enc_assoc108[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce108[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key108[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input109[] __initconst = { -+ 0xff, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0xd4, 0xf1, 0x09, 0xe8, 0x14, 0xce, 0xa8, 0x5a, -+ 0x08, 0xc0, 0x11, 0xd8, 0x50, 0xdd, 0x1d, 0xcb, -+ 0xcf, 0x7a, 0xed, 0x35, 0xcb, 0x5a, 0x2f, 0xca, -+ 0xa0, 0x34, 0x6e, 0xfb, 0x93, 0x65, 0x54, 0x64, -+ 0x53, 0x40, 0xb8, 0x5a, 0x9a, 0xa0, 0x82, 0x96, -+ 0xb7, 0x7a, 0x5f, 0xc3, 0x96, 0x1f, 0x66, 0x0f, -+ 0x17, 0x2d, 0x90, 0x96, 0x52, 0x4f, 0xa1, 0xb2, -+ 0xb0, 0x23, 0xb8, 0xb2, 0x88, 0x22, 0x27, 0x73, -+ 0x1b, 0x64, 0x89, 0xba, 0x84, 0xd8, 0xf5, 0x59, -+ 0x82, 0x9e, 0xd9, 0xbd, 0xa2, 0x29, 0x0f, 0x16 -+}; -+static const u8 enc_output109[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x53, 0x33, 0xc3, 0xe1, 0xf8, 0xd7, 0x8e, 0xac, -+ 0xca, 0x07, 0x07, 0x52, 0x6c, 0xad, 0x01, 0x8c, -+ 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x30, 0x49, 0x70, 0x24, 0x14, 0xb5, 0x99, 0x50, -+ 0x26, 0x24, 0xfd, 0xfe, 0x29, 0x31, 0x32, 0x04, -+ 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x30, 0x49, 0x70, 0x24, 0x14, 0xb5, 0x99, 0x50, -+ 0x26, 0x24, 0xfd, 0xfe, 0x29, 0x31, 0x32, 0x04, -+ 0xb9, 0x36, 0xa8, 0x17, 0xf2, 0x21, 0x1a, 0xf1, -+ 0x29, 0xe2, 0xcf, 0x16, 0x0f, 0xd4, 0x2b, 0xcb -+}; -+static const u8 enc_assoc109[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce109[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key109[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input110[] __initconst = { -+ 0xff, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0xdf, 0x4c, 0x62, 0x03, 0x2d, 0x41, 0x19, 0xb5, -+ 0x88, 0x47, 0x7e, 0x99, 0x92, 0x5a, 0x56, 0xd9, -+ 0xd6, 0x7a, 0xed, 0x35, 0xcb, 0x5a, 0x2f, 0xca, -+ 0xa0, 0x34, 0x6e, 0xfb, 0x93, 0x65, 0x54, 0x64, -+ 0xfa, 0x84, 0xf0, 0x64, 0x55, 0x36, 0x42, 0x1b, -+ 0x2b, 0xb9, 0x24, 0x6e, 0xc2, 0x19, 0xed, 0x0b, -+ 0x0e, 0x2d, 0x90, 0x96, 0x52, 0x4f, 0xa1, 0xb2, -+ 0xb0, 0x23, 0xb8, 0xb2, 0x88, 0x22, 0x27, 0x73, -+ 0xb2, 0xa0, 0xc1, 0x84, 0x4b, 0x4e, 0x35, 0xd4, -+ 0x1e, 0x5d, 0xa2, 0x10, 0xf6, 0x2f, 0x84, 0x12 -+}; -+static const u8 enc_output110[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x58, 0x8e, 0xa8, 0x0a, 0xc1, 0x58, 0x3f, 0x43, -+ 0x4a, 0x80, 0x68, 0x13, 0xae, 0x2a, 0x4a, 0x9e, -+ 0xb6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x99, 0x8d, 0x38, 0x1a, 0xdb, 0x23, 0x59, 0xdd, -+ 0xba, 0xe7, 0x86, 0x53, 0x7d, 0x37, 0xb9, 0x00, -+ 0xb6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x99, 0x8d, 0x38, 0x1a, 0xdb, 0x23, 0x59, 0xdd, -+ 0xba, 0xe7, 0x86, 0x53, 0x7d, 0x37, 0xb9, 0x00, -+ 0x9f, 0x7a, 0xc4, 0x35, 0x1f, 0x6b, 0x91, 0xe6, -+ 0x30, 0x97, 0xa7, 0x13, 0x11, 0x5d, 0x05, 0xbe -+}; -+static const u8 enc_assoc110[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce110[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key110[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input111[] __initconst = { -+ 0xff, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0x13, 0xf8, 0x0a, 0x00, 0x6d, 0xc1, 0xbb, 0xda, -+ 0xd6, 0x39, 0xa9, 0x2f, 0xc7, 0xec, 0xa6, 0x55, -+ 0xf7, 0x7a, 0xed, 0x35, 0xcb, 0x5a, 0x2f, 0xca, -+ 0xa0, 0x34, 0x6e, 0xfb, 0x93, 0x65, 0x54, 0x64, -+ 0x63, 0x48, 0xb8, 0xfd, 0x29, 0xbf, 0x96, 0xd5, -+ 0x63, 0xa5, 0x17, 0xe2, 0x7d, 0x7b, 0xfc, 0x0f, -+ 0x2f, 0x2d, 0x90, 0x96, 0x52, 0x4f, 0xa1, 0xb2, -+ 0xb0, 0x23, 0xb8, 0xb2, 0x88, 0x22, 0x27, 0x73, -+ 0x2b, 0x6c, 0x89, 0x1d, 0x37, 0xc7, 0xe1, 0x1a, -+ 0x56, 0x41, 0x91, 0x9c, 0x49, 0x4d, 0x95, 0x16 -+}; -+static const u8 enc_output111[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x94, 0x3a, 0xc0, 0x09, 0x81, 0xd8, 0x9d, 0x2c, -+ 0x14, 0xfe, 0xbf, 0xa5, 0xfb, 0x9c, 0xba, 0x12, -+ 0x97, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x41, 0x70, 0x83, 0xa7, 0xaa, 0x8d, 0x13, -+ 0xf2, 0xfb, 0xb5, 0xdf, 0xc2, 0x55, 0xa8, 0x04, -+ 0x97, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x41, 0x70, 0x83, 0xa7, 0xaa, 0x8d, 0x13, -+ 0xf2, 0xfb, 0xb5, 0xdf, 0xc2, 0x55, 0xa8, 0x04, -+ 0x9a, 0x18, 0xa8, 0x28, 0x07, 0x02, 0x69, 0xf4, -+ 0x47, 0x00, 0xd0, 0x09, 0xe7, 0x17, 0x1c, 0xc9 -+}; -+static const u8 enc_assoc111[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce111[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key111[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input112[] __initconst = { -+ 0xff, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0x82, 0xe5, 0x9b, 0x45, 0x82, 0x91, 0x50, 0x38, -+ 0xf9, 0x33, 0x81, 0x1e, 0x65, 0x2d, 0xc6, 0x6a, -+ 0xfc, 0x7a, 0xed, 0x35, 0xcb, 0x5a, 0x2f, 0xca, -+ 0xa0, 0x34, 0x6e, 0xfb, 0x93, 0x65, 0x54, 0x64, -+ 0xb6, 0x71, 0xc8, 0xca, 0xc2, 0x70, 0xc2, 0x65, -+ 0xa0, 0xac, 0x2f, 0x53, 0x57, 0x99, 0x88, 0x0a, -+ 0x24, 0x2d, 0x90, 0x96, 0x52, 0x4f, 0xa1, 0xb2, -+ 0xb0, 0x23, 0xb8, 0xb2, 0x88, 0x22, 0x27, 0x73, -+ 0xfe, 0x55, 0xf9, 0x2a, 0xdc, 0x08, 0xb5, 0xaa, -+ 0x95, 0x48, 0xa9, 0x2d, 0x63, 0xaf, 0xe1, 0x13 -+}; -+static const u8 enc_output112[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x05, 0x27, 0x51, 0x4c, 0x6e, 0x88, 0x76, 0xce, -+ 0x3b, 0xf4, 0x97, 0x94, 0x59, 0x5d, 0xda, 0x2d, -+ 0x9c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xd5, 0x78, 0x00, 0xb4, 0x4c, 0x65, 0xd9, 0xa3, -+ 0x31, 0xf2, 0x8d, 0x6e, 0xe8, 0xb7, 0xdc, 0x01, -+ 0x9c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xd5, 0x78, 0x00, 0xb4, 0x4c, 0x65, 0xd9, 0xa3, -+ 0x31, 0xf2, 0x8d, 0x6e, 0xe8, 0xb7, 0xdc, 0x01, -+ 0xb4, 0x36, 0xa8, 0x2b, 0x93, 0xd5, 0x55, 0xf7, -+ 0x43, 0x00, 0xd0, 0x19, 0x9b, 0xa7, 0x18, 0xce -+}; -+static const u8 enc_assoc112[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce112[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key112[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input113[] __initconst = { -+ 0xff, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0xf1, 0xd1, 0x28, 0x87, 0xb7, 0x21, 0x69, 0x86, -+ 0xa1, 0x2d, 0x79, 0x09, 0x8b, 0x6d, 0xe6, 0x0f, -+ 0xc0, 0x7a, 0xed, 0x35, 0xcb, 0x5a, 0x2f, 0xca, -+ 0xa0, 0x34, 0x6e, 0xfb, 0x93, 0x65, 0x54, 0x64, -+ 0xa7, 0xc7, 0x58, 0x99, 0xf3, 0xe6, 0x0a, 0xf1, -+ 0xfc, 0xb6, 0xc7, 0x30, 0x7d, 0x87, 0x59, 0x0f, -+ 0x18, 0x2d, 0x90, 0x96, 0x52, 0x4f, 0xa1, 0xb2, -+ 0xb0, 0x23, 0xb8, 0xb2, 0x88, 0x22, 0x27, 0x73, -+ 0xef, 0xe3, 0x69, 0x79, 0xed, 0x9e, 0x7d, 0x3e, -+ 0xc9, 0x52, 0x41, 0x4e, 0x49, 0xb1, 0x30, 0x16 -+}; -+static const u8 enc_output113[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x76, 0x13, 0xe2, 0x8e, 0x5b, 0x38, 0x4f, 0x70, -+ 0x63, 0xea, 0x6f, 0x83, 0xb7, 0x1d, 0xfa, 0x48, -+ 0xa0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xc4, 0xce, 0x90, 0xe7, 0x7d, 0xf3, 0x11, 0x37, -+ 0x6d, 0xe8, 0x65, 0x0d, 0xc2, 0xa9, 0x0d, 0x04, -+ 0xa0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xc4, 0xce, 0x90, 0xe7, 0x7d, 0xf3, 0x11, 0x37, -+ 0x6d, 0xe8, 0x65, 0x0d, 0xc2, 0xa9, 0x0d, 0x04, -+ 0xce, 0x54, 0xa8, 0x2e, 0x1f, 0xa9, 0x42, 0xfa, -+ 0x3f, 0x00, 0xd0, 0x29, 0x4f, 0x37, 0x15, 0xd3 -+}; -+static const u8 enc_assoc113[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce113[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key113[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input114[] __initconst = { -+ 0xcb, 0xf1, 0xda, 0x9e, 0x0b, 0xa9, 0x37, 0x73, -+ 0x74, 0xe6, 0x9e, 0x1c, 0x0e, 0x60, 0x0c, 0xfc, -+ 0x34, 0x3d, 0x35, 0xf6, 0x13, 0xe6, 0xd9, 0x09, -+ 0x3d, 0x38, 0xe9, 0x75, 0xc3, 0x8f, 0xe3, 0xb8, -+ 0xbe, 0x3f, 0xa6, 0x6b, 0x6c, 0xe7, 0x80, 0x8a, -+ 0xa3, 0xe4, 0x59, 0x49, 0xf9, 0x44, 0x64, 0x9f, -+ 0xd0, 0xf6, 0x37, 0x81, 0x71, 0xea, 0xe4, 0x39, -+ 0x6e, 0xa1, 0x5d, 0xc2, 0x40, 0xd1, 0xab, 0xf4, -+ 0x66, 0x68, 0xdb, 0xc8, 0xf5, 0xf2, 0x0e, 0xf2, -+ 0xb3, 0xf3, 0x8f, 0x00, 0xe2, 0x03, 0x17, 0x88 -+}; -+static const u8 enc_output114[] __initconst = { -+ 0xcb, 0x9a, 0x0d, 0xb1, 0x8d, 0x63, 0xd7, 0xea, -+ 0xd7, 0xc9, 0x60, 0xd6, 0xb2, 0x86, 0x74, 0x5f, -+ 0xb3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xde, 0xba, 0xb4, 0xa1, 0x58, 0x42, 0x50, 0xbf, -+ 0xfc, 0x2f, 0xc8, 0x4d, 0x95, 0xde, 0xcf, 0x04, -+ 0xb3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xde, 0xba, 0xb4, 0xa1, 0x58, 0x42, 0x50, 0xbf, -+ 0xfc, 0x2f, 0xc8, 0x4d, 0x95, 0xde, 0xcf, 0x04, -+ 0x23, 0x83, 0xab, 0x0b, 0x79, 0x92, 0x05, 0x69, -+ 0x9b, 0x51, 0x0a, 0xa7, 0x09, 0xbf, 0x31, 0xf1 -+}; -+static const u8 enc_assoc114[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce114[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key114[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input115[] __initconst = { -+ 0x8f, 0x27, 0x86, 0x94, 0xc4, 0xe9, 0xda, 0xeb, -+ 0xd5, 0x8d, 0x3e, 0x5b, 0x96, 0x6e, 0x8b, 0x68, -+ 0x42, 0x3d, 0x35, 0xf6, 0x13, 0xe6, 0xd9, 0x09, -+ 0x3d, 0x38, 0xe9, 0x75, 0xc3, 0x8f, 0xe3, 0xb8, -+ 0x06, 0x53, 0xe7, 0xa3, 0x31, 0x71, 0x88, 0x33, -+ 0xac, 0xc3, 0xb9, 0xad, 0xff, 0x1c, 0x31, 0x98, -+ 0xa6, 0xf6, 0x37, 0x81, 0x71, 0xea, 0xe4, 0x39, -+ 0x6e, 0xa1, 0x5d, 0xc2, 0x40, 0xd1, 0xab, 0xf4, -+ 0xde, 0x04, 0x9a, 0x00, 0xa8, 0x64, 0x06, 0x4b, -+ 0xbc, 0xd4, 0x6f, 0xe4, 0xe4, 0x5b, 0x42, 0x8f -+}; -+static const u8 enc_output115[] __initconst = { -+ 0x8f, 0x4c, 0x51, 0xbb, 0x42, 0x23, 0x3a, 0x72, -+ 0x76, 0xa2, 0xc0, 0x91, 0x2a, 0x88, 0xf3, 0xcb, -+ 0xc5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x66, 0xd6, 0xf5, 0x69, 0x05, 0xd4, 0x58, 0x06, -+ 0xf3, 0x08, 0x28, 0xa9, 0x93, 0x86, 0x9a, 0x03, -+ 0xc5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x66, 0xd6, 0xf5, 0x69, 0x05, 0xd4, 0x58, 0x06, -+ 0xf3, 0x08, 0x28, 0xa9, 0x93, 0x86, 0x9a, 0x03, -+ 0x8b, 0xfb, 0xab, 0x17, 0xa9, 0xe0, 0xb8, 0x74, -+ 0x8b, 0x51, 0x0a, 0xe7, 0xd9, 0xfd, 0x23, 0x05 -+}; -+static const u8 enc_assoc115[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce115[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key115[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input116[] __initconst = { -+ 0xd5, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0x9a, 0x22, 0xd7, 0x0a, 0x48, 0xe2, 0x4f, 0xdd, -+ 0xcd, 0xd4, 0x41, 0x9d, 0xe6, 0x4c, 0x8f, 0x44, -+ 0xfc, 0x7a, 0xed, 0x35, 0xcb, 0x5a, 0x2f, 0xca, -+ 0xa0, 0x34, 0x6e, 0xfb, 0x93, 0x65, 0x54, 0x64, -+ 0x77, 0xb5, 0xc9, 0x07, 0xd9, 0xc9, 0xe1, 0xea, -+ 0x51, 0x85, 0x1a, 0x20, 0x4a, 0xad, 0x9f, 0x0a, -+ 0x24, 0x2d, 0x90, 0x96, 0x52, 0x4f, 0xa1, 0xb2, -+ 0xb0, 0x23, 0xb8, 0xb2, 0x88, 0x22, 0x27, 0x73, -+ 0x3f, 0x91, 0xf8, 0xe7, 0xc7, 0xb1, 0x96, 0x25, -+ 0x64, 0x61, 0x9c, 0x5e, 0x7e, 0x9b, 0xf6, 0x13 -+}; -+static const u8 enc_output116[] __initconst = { -+ 0xd5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x1d, 0xe0, 0x1d, 0x03, 0xa4, 0xfb, 0x69, 0x2b, -+ 0x0f, 0x13, 0x57, 0x17, 0xda, 0x3c, 0x93, 0x03, -+ 0x9c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x14, 0xbc, 0x01, 0x79, 0x57, 0xdc, 0xfa, 0x2c, -+ 0xc0, 0xdb, 0xb8, 0x1d, 0xf5, 0x83, 0xcb, 0x01, -+ 0x9c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x14, 0xbc, 0x01, 0x79, 0x57, 0xdc, 0xfa, 0x2c, -+ 0xc0, 0xdb, 0xb8, 0x1d, 0xf5, 0x83, 0xcb, 0x01, -+ 0x49, 0xbc, 0x6e, 0x9f, 0xc5, 0x1c, 0x4d, 0x50, -+ 0x30, 0x36, 0x64, 0x4d, 0x84, 0x27, 0x73, 0xd2 -+}; -+static const u8 enc_assoc116[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce116[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key116[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input117[] __initconst = { -+ 0xdb, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0x75, 0xd5, 0x64, 0x3a, 0xa5, 0xaf, 0x93, 0x4d, -+ 0x8c, 0xce, 0x39, 0x2c, 0xc3, 0xee, 0xdb, 0x47, -+ 0xc0, 0x7a, 0xed, 0x35, 0xcb, 0x5a, 0x2f, 0xca, -+ 0xa0, 0x34, 0x6e, 0xfb, 0x93, 0x65, 0x54, 0x64, -+ 0x60, 0x1b, 0x5a, 0xd2, 0x06, 0x7f, 0x28, 0x06, -+ 0x6a, 0x8f, 0x32, 0x81, 0x71, 0x5b, 0xa8, 0x08, -+ 0x18, 0x2d, 0x90, 0x96, 0x52, 0x4f, 0xa1, 0xb2, -+ 0xb0, 0x23, 0xb8, 0xb2, 0x88, 0x22, 0x27, 0x73, -+ 0x28, 0x3f, 0x6b, 0x32, 0x18, 0x07, 0x5f, 0xc9, -+ 0x5f, 0x6b, 0xb4, 0xff, 0x45, 0x6d, 0xc1, 0x11 -+}; -+static const u8 enc_output117[] __initconst = { -+ 0xdb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xf2, 0x17, 0xae, 0x33, 0x49, 0xb6, 0xb5, 0xbb, -+ 0x4e, 0x09, 0x2f, 0xa6, 0xff, 0x9e, 0xc7, 0x00, -+ 0xa0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x03, 0x12, 0x92, 0xac, 0x88, 0x6a, 0x33, 0xc0, -+ 0xfb, 0xd1, 0x90, 0xbc, 0xce, 0x75, 0xfc, 0x03, -+ 0xa0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x03, 0x12, 0x92, 0xac, 0x88, 0x6a, 0x33, 0xc0, -+ 0xfb, 0xd1, 0x90, 0xbc, 0xce, 0x75, 0xfc, 0x03, -+ 0x63, 0xda, 0x6e, 0xa2, 0x51, 0xf0, 0x39, 0x53, -+ 0x2c, 0x36, 0x64, 0x5d, 0x38, 0xb7, 0x6f, 0xd7 -+}; -+static const u8 enc_assoc117[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce117[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key117[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+/* wycheproof - edge case intermediate sums in poly1305 */ -+static const u8 enc_input118[] __initconst = { -+ 0x93, 0x94, 0x28, 0xd0, 0x79, 0x35, 0x1f, 0x66, -+ 0x5c, 0xd0, 0x01, 0x35, 0x43, 0x19, 0x87, 0x5c, -+ 0x62, 0x48, 0x39, 0x60, 0x42, 0x16, 0xe4, 0x03, -+ 0xeb, 0xcc, 0x6a, 0xf5, 0x59, 0xec, 0x8b, 0x43, -+ 0x97, 0x7a, 0xed, 0x35, 0xcb, 0x5a, 0x2f, 0xca, -+ 0xa0, 0x34, 0x6e, 0xfb, 0x93, 0x65, 0x54, 0x64, -+ 0xd8, 0xc8, 0xc3, 0xfa, 0x1a, 0x9e, 0x47, 0x4a, -+ 0xbe, 0x52, 0xd0, 0x2c, 0x81, 0x87, 0xe9, 0x0f, -+ 0x4f, 0x2d, 0x90, 0x96, 0x52, 0x4f, 0xa1, 0xb2, -+ 0xb0, 0x23, 0xb8, 0xb2, 0x88, 0x22, 0x27, 0x73, -+ 0x90, 0xec, 0xf2, 0x1a, 0x04, 0xe6, 0x30, 0x85, -+ 0x8b, 0xb6, 0x56, 0x52, 0xb5, 0xb1, 0x80, 0x16 -+}; -+static const u8 enc_output118[] __initconst = { -+ 0x93, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xe5, 0x8a, 0xf3, 0x69, 0xae, 0x0f, 0xc2, 0xf5, -+ 0x29, 0x0b, 0x7c, 0x7f, 0x65, 0x9c, 0x97, 0x04, -+ 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xbb, 0xc1, 0x0b, 0x84, 0x94, 0x8b, 0x5c, 0x8c, -+ 0x2f, 0x0c, 0x72, 0x11, 0x3e, 0xa9, 0xbd, 0x04, -+ 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xbb, 0xc1, 0x0b, 0x84, 0x94, 0x8b, 0x5c, 0x8c, -+ 0x2f, 0x0c, 0x72, 0x11, 0x3e, 0xa9, 0xbd, 0x04, -+ 0x73, 0xeb, 0x27, 0x24, 0xb5, 0xc4, 0x05, 0xf0, -+ 0x4d, 0x00, 0xd0, 0xf1, 0x58, 0x40, 0xa1, 0xc1 -+}; -+static const u8 enc_assoc118[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 enc_nonce118[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x4c, 0x2d, 0x52 -+}; -+static const u8 enc_key118[] __initconst = { -+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f -+}; -+ -+static const struct chacha20poly1305_testvec -+chacha20poly1305_enc_vectors[] __initconst = { -+ { enc_input001, enc_output001, enc_assoc001, enc_nonce001, enc_key001, -+ sizeof(enc_input001), sizeof(enc_assoc001), sizeof(enc_nonce001) }, -+ { enc_input002, enc_output002, enc_assoc002, enc_nonce002, enc_key002, -+ sizeof(enc_input002), sizeof(enc_assoc002), sizeof(enc_nonce002) }, -+ { enc_input003, enc_output003, enc_assoc003, enc_nonce003, enc_key003, -+ sizeof(enc_input003), sizeof(enc_assoc003), sizeof(enc_nonce003) }, -+ { enc_input004, enc_output004, enc_assoc004, enc_nonce004, enc_key004, -+ sizeof(enc_input004), sizeof(enc_assoc004), sizeof(enc_nonce004) }, -+ { enc_input005, enc_output005, enc_assoc005, enc_nonce005, enc_key005, -+ sizeof(enc_input005), sizeof(enc_assoc005), sizeof(enc_nonce005) }, -+ { enc_input006, enc_output006, enc_assoc006, enc_nonce006, enc_key006, -+ sizeof(enc_input006), sizeof(enc_assoc006), sizeof(enc_nonce006) }, -+ { enc_input007, enc_output007, enc_assoc007, enc_nonce007, enc_key007, -+ sizeof(enc_input007), sizeof(enc_assoc007), sizeof(enc_nonce007) }, -+ { enc_input008, enc_output008, enc_assoc008, enc_nonce008, enc_key008, -+ sizeof(enc_input008), sizeof(enc_assoc008), sizeof(enc_nonce008) }, -+ { enc_input009, enc_output009, enc_assoc009, enc_nonce009, enc_key009, -+ sizeof(enc_input009), sizeof(enc_assoc009), sizeof(enc_nonce009) }, -+ { enc_input010, enc_output010, enc_assoc010, enc_nonce010, enc_key010, -+ sizeof(enc_input010), sizeof(enc_assoc010), sizeof(enc_nonce010) }, -+ { enc_input011, enc_output011, enc_assoc011, enc_nonce011, enc_key011, -+ sizeof(enc_input011), sizeof(enc_assoc011), sizeof(enc_nonce011) }, -+ { enc_input012, enc_output012, enc_assoc012, enc_nonce012, enc_key012, -+ sizeof(enc_input012), sizeof(enc_assoc012), sizeof(enc_nonce012) }, -+ { enc_input013, enc_output013, enc_assoc013, enc_nonce013, enc_key013, -+ sizeof(enc_input013), sizeof(enc_assoc013), sizeof(enc_nonce013) }, -+ { enc_input014, enc_output014, enc_assoc014, enc_nonce014, enc_key014, -+ sizeof(enc_input014), sizeof(enc_assoc014), sizeof(enc_nonce014) }, -+ { enc_input015, enc_output015, enc_assoc015, enc_nonce015, enc_key015, -+ sizeof(enc_input015), sizeof(enc_assoc015), sizeof(enc_nonce015) }, -+ { enc_input016, enc_output016, enc_assoc016, enc_nonce016, enc_key016, -+ sizeof(enc_input016), sizeof(enc_assoc016), sizeof(enc_nonce016) }, -+ { enc_input017, enc_output017, enc_assoc017, enc_nonce017, enc_key017, -+ sizeof(enc_input017), sizeof(enc_assoc017), sizeof(enc_nonce017) }, -+ { enc_input018, enc_output018, enc_assoc018, enc_nonce018, enc_key018, -+ sizeof(enc_input018), sizeof(enc_assoc018), sizeof(enc_nonce018) }, -+ { enc_input019, enc_output019, enc_assoc019, enc_nonce019, enc_key019, -+ sizeof(enc_input019), sizeof(enc_assoc019), sizeof(enc_nonce019) }, -+ { enc_input020, enc_output020, enc_assoc020, enc_nonce020, enc_key020, -+ sizeof(enc_input020), sizeof(enc_assoc020), sizeof(enc_nonce020) }, -+ { enc_input021, enc_output021, enc_assoc021, enc_nonce021, enc_key021, -+ sizeof(enc_input021), sizeof(enc_assoc021), sizeof(enc_nonce021) }, -+ { enc_input022, enc_output022, enc_assoc022, enc_nonce022, enc_key022, -+ sizeof(enc_input022), sizeof(enc_assoc022), sizeof(enc_nonce022) }, -+ { enc_input023, enc_output023, enc_assoc023, enc_nonce023, enc_key023, -+ sizeof(enc_input023), sizeof(enc_assoc023), sizeof(enc_nonce023) }, -+ { enc_input024, enc_output024, enc_assoc024, enc_nonce024, enc_key024, -+ sizeof(enc_input024), sizeof(enc_assoc024), sizeof(enc_nonce024) }, -+ { enc_input025, enc_output025, enc_assoc025, enc_nonce025, enc_key025, -+ sizeof(enc_input025), sizeof(enc_assoc025), sizeof(enc_nonce025) }, -+ { enc_input026, enc_output026, enc_assoc026, enc_nonce026, enc_key026, -+ sizeof(enc_input026), sizeof(enc_assoc026), sizeof(enc_nonce026) }, -+ { enc_input027, enc_output027, enc_assoc027, enc_nonce027, enc_key027, -+ sizeof(enc_input027), sizeof(enc_assoc027), sizeof(enc_nonce027) }, -+ { enc_input028, enc_output028, enc_assoc028, enc_nonce028, enc_key028, -+ sizeof(enc_input028), sizeof(enc_assoc028), sizeof(enc_nonce028) }, -+ { enc_input029, enc_output029, enc_assoc029, enc_nonce029, enc_key029, -+ sizeof(enc_input029), sizeof(enc_assoc029), sizeof(enc_nonce029) }, -+ { enc_input030, enc_output030, enc_assoc030, enc_nonce030, enc_key030, -+ sizeof(enc_input030), sizeof(enc_assoc030), sizeof(enc_nonce030) }, -+ { enc_input031, enc_output031, enc_assoc031, enc_nonce031, enc_key031, -+ sizeof(enc_input031), sizeof(enc_assoc031), sizeof(enc_nonce031) }, -+ { enc_input032, enc_output032, enc_assoc032, enc_nonce032, enc_key032, -+ sizeof(enc_input032), sizeof(enc_assoc032), sizeof(enc_nonce032) }, -+ { enc_input033, enc_output033, enc_assoc033, enc_nonce033, enc_key033, -+ sizeof(enc_input033), sizeof(enc_assoc033), sizeof(enc_nonce033) }, -+ { enc_input034, enc_output034, enc_assoc034, enc_nonce034, enc_key034, -+ sizeof(enc_input034), sizeof(enc_assoc034), sizeof(enc_nonce034) }, -+ { enc_input035, enc_output035, enc_assoc035, enc_nonce035, enc_key035, -+ sizeof(enc_input035), sizeof(enc_assoc035), sizeof(enc_nonce035) }, -+ { enc_input036, enc_output036, enc_assoc036, enc_nonce036, enc_key036, -+ sizeof(enc_input036), sizeof(enc_assoc036), sizeof(enc_nonce036) }, -+ { enc_input037, enc_output037, enc_assoc037, enc_nonce037, enc_key037, -+ sizeof(enc_input037), sizeof(enc_assoc037), sizeof(enc_nonce037) }, -+ { enc_input038, enc_output038, enc_assoc038, enc_nonce038, enc_key038, -+ sizeof(enc_input038), sizeof(enc_assoc038), sizeof(enc_nonce038) }, -+ { enc_input039, enc_output039, enc_assoc039, enc_nonce039, enc_key039, -+ sizeof(enc_input039), sizeof(enc_assoc039), sizeof(enc_nonce039) }, -+ { enc_input040, enc_output040, enc_assoc040, enc_nonce040, enc_key040, -+ sizeof(enc_input040), sizeof(enc_assoc040), sizeof(enc_nonce040) }, -+ { enc_input041, enc_output041, enc_assoc041, enc_nonce041, enc_key041, -+ sizeof(enc_input041), sizeof(enc_assoc041), sizeof(enc_nonce041) }, -+ { enc_input042, enc_output042, enc_assoc042, enc_nonce042, enc_key042, -+ sizeof(enc_input042), sizeof(enc_assoc042), sizeof(enc_nonce042) }, -+ { enc_input043, enc_output043, enc_assoc043, enc_nonce043, enc_key043, -+ sizeof(enc_input043), sizeof(enc_assoc043), sizeof(enc_nonce043) }, -+ { enc_input044, enc_output044, enc_assoc044, enc_nonce044, enc_key044, -+ sizeof(enc_input044), sizeof(enc_assoc044), sizeof(enc_nonce044) }, -+ { enc_input045, enc_output045, enc_assoc045, enc_nonce045, enc_key045, -+ sizeof(enc_input045), sizeof(enc_assoc045), sizeof(enc_nonce045) }, -+ { enc_input046, enc_output046, enc_assoc046, enc_nonce046, enc_key046, -+ sizeof(enc_input046), sizeof(enc_assoc046), sizeof(enc_nonce046) }, -+ { enc_input047, enc_output047, enc_assoc047, enc_nonce047, enc_key047, -+ sizeof(enc_input047), sizeof(enc_assoc047), sizeof(enc_nonce047) }, -+ { enc_input048, enc_output048, enc_assoc048, enc_nonce048, enc_key048, -+ sizeof(enc_input048), sizeof(enc_assoc048), sizeof(enc_nonce048) }, -+ { enc_input049, enc_output049, enc_assoc049, enc_nonce049, enc_key049, -+ sizeof(enc_input049), sizeof(enc_assoc049), sizeof(enc_nonce049) }, -+ { enc_input050, enc_output050, enc_assoc050, enc_nonce050, enc_key050, -+ sizeof(enc_input050), sizeof(enc_assoc050), sizeof(enc_nonce050) }, -+ { enc_input051, enc_output051, enc_assoc051, enc_nonce051, enc_key051, -+ sizeof(enc_input051), sizeof(enc_assoc051), sizeof(enc_nonce051) }, -+ { enc_input052, enc_output052, enc_assoc052, enc_nonce052, enc_key052, -+ sizeof(enc_input052), sizeof(enc_assoc052), sizeof(enc_nonce052) }, -+ { enc_input053, enc_output053, enc_assoc053, enc_nonce053, enc_key053, -+ sizeof(enc_input053), sizeof(enc_assoc053), sizeof(enc_nonce053) }, -+ { enc_input054, enc_output054, enc_assoc054, enc_nonce054, enc_key054, -+ sizeof(enc_input054), sizeof(enc_assoc054), sizeof(enc_nonce054) }, -+ { enc_input055, enc_output055, enc_assoc055, enc_nonce055, enc_key055, -+ sizeof(enc_input055), sizeof(enc_assoc055), sizeof(enc_nonce055) }, -+ { enc_input056, enc_output056, enc_assoc056, enc_nonce056, enc_key056, -+ sizeof(enc_input056), sizeof(enc_assoc056), sizeof(enc_nonce056) }, -+ { enc_input057, enc_output057, enc_assoc057, enc_nonce057, enc_key057, -+ sizeof(enc_input057), sizeof(enc_assoc057), sizeof(enc_nonce057) }, -+ { enc_input058, enc_output058, enc_assoc058, enc_nonce058, enc_key058, -+ sizeof(enc_input058), sizeof(enc_assoc058), sizeof(enc_nonce058) }, -+ { enc_input059, enc_output059, enc_assoc059, enc_nonce059, enc_key059, -+ sizeof(enc_input059), sizeof(enc_assoc059), sizeof(enc_nonce059) }, -+ { enc_input060, enc_output060, enc_assoc060, enc_nonce060, enc_key060, -+ sizeof(enc_input060), sizeof(enc_assoc060), sizeof(enc_nonce060) }, -+ { enc_input061, enc_output061, enc_assoc061, enc_nonce061, enc_key061, -+ sizeof(enc_input061), sizeof(enc_assoc061), sizeof(enc_nonce061) }, -+ { enc_input062, enc_output062, enc_assoc062, enc_nonce062, enc_key062, -+ sizeof(enc_input062), sizeof(enc_assoc062), sizeof(enc_nonce062) }, -+ { enc_input063, enc_output063, enc_assoc063, enc_nonce063, enc_key063, -+ sizeof(enc_input063), sizeof(enc_assoc063), sizeof(enc_nonce063) }, -+ { enc_input064, enc_output064, enc_assoc064, enc_nonce064, enc_key064, -+ sizeof(enc_input064), sizeof(enc_assoc064), sizeof(enc_nonce064) }, -+ { enc_input065, enc_output065, enc_assoc065, enc_nonce065, enc_key065, -+ sizeof(enc_input065), sizeof(enc_assoc065), sizeof(enc_nonce065) }, -+ { enc_input066, enc_output066, enc_assoc066, enc_nonce066, enc_key066, -+ sizeof(enc_input066), sizeof(enc_assoc066), sizeof(enc_nonce066) }, -+ { enc_input067, enc_output067, enc_assoc067, enc_nonce067, enc_key067, -+ sizeof(enc_input067), sizeof(enc_assoc067), sizeof(enc_nonce067) }, -+ { enc_input068, enc_output068, enc_assoc068, enc_nonce068, enc_key068, -+ sizeof(enc_input068), sizeof(enc_assoc068), sizeof(enc_nonce068) }, -+ { enc_input069, enc_output069, enc_assoc069, enc_nonce069, enc_key069, -+ sizeof(enc_input069), sizeof(enc_assoc069), sizeof(enc_nonce069) }, -+ { enc_input070, enc_output070, enc_assoc070, enc_nonce070, enc_key070, -+ sizeof(enc_input070), sizeof(enc_assoc070), sizeof(enc_nonce070) }, -+ { enc_input071, enc_output071, enc_assoc071, enc_nonce071, enc_key071, -+ sizeof(enc_input071), sizeof(enc_assoc071), sizeof(enc_nonce071) }, -+ { enc_input072, enc_output072, enc_assoc072, enc_nonce072, enc_key072, -+ sizeof(enc_input072), sizeof(enc_assoc072), sizeof(enc_nonce072) }, -+ { enc_input073, enc_output073, enc_assoc073, enc_nonce073, enc_key073, -+ sizeof(enc_input073), sizeof(enc_assoc073), sizeof(enc_nonce073) }, -+ { enc_input074, enc_output074, enc_assoc074, enc_nonce074, enc_key074, -+ sizeof(enc_input074), sizeof(enc_assoc074), sizeof(enc_nonce074) }, -+ { enc_input075, enc_output075, enc_assoc075, enc_nonce075, enc_key075, -+ sizeof(enc_input075), sizeof(enc_assoc075), sizeof(enc_nonce075) }, -+ { enc_input076, enc_output076, enc_assoc076, enc_nonce076, enc_key076, -+ sizeof(enc_input076), sizeof(enc_assoc076), sizeof(enc_nonce076) }, -+ { enc_input077, enc_output077, enc_assoc077, enc_nonce077, enc_key077, -+ sizeof(enc_input077), sizeof(enc_assoc077), sizeof(enc_nonce077) }, -+ { enc_input078, enc_output078, enc_assoc078, enc_nonce078, enc_key078, -+ sizeof(enc_input078), sizeof(enc_assoc078), sizeof(enc_nonce078) }, -+ { enc_input079, enc_output079, enc_assoc079, enc_nonce079, enc_key079, -+ sizeof(enc_input079), sizeof(enc_assoc079), sizeof(enc_nonce079) }, -+ { enc_input080, enc_output080, enc_assoc080, enc_nonce080, enc_key080, -+ sizeof(enc_input080), sizeof(enc_assoc080), sizeof(enc_nonce080) }, -+ { enc_input081, enc_output081, enc_assoc081, enc_nonce081, enc_key081, -+ sizeof(enc_input081), sizeof(enc_assoc081), sizeof(enc_nonce081) }, -+ { enc_input082, enc_output082, enc_assoc082, enc_nonce082, enc_key082, -+ sizeof(enc_input082), sizeof(enc_assoc082), sizeof(enc_nonce082) }, -+ { enc_input083, enc_output083, enc_assoc083, enc_nonce083, enc_key083, -+ sizeof(enc_input083), sizeof(enc_assoc083), sizeof(enc_nonce083) }, -+ { enc_input084, enc_output084, enc_assoc084, enc_nonce084, enc_key084, -+ sizeof(enc_input084), sizeof(enc_assoc084), sizeof(enc_nonce084) }, -+ { enc_input085, enc_output085, enc_assoc085, enc_nonce085, enc_key085, -+ sizeof(enc_input085), sizeof(enc_assoc085), sizeof(enc_nonce085) }, -+ { enc_input086, enc_output086, enc_assoc086, enc_nonce086, enc_key086, -+ sizeof(enc_input086), sizeof(enc_assoc086), sizeof(enc_nonce086) }, -+ { enc_input087, enc_output087, enc_assoc087, enc_nonce087, enc_key087, -+ sizeof(enc_input087), sizeof(enc_assoc087), sizeof(enc_nonce087) }, -+ { enc_input088, enc_output088, enc_assoc088, enc_nonce088, enc_key088, -+ sizeof(enc_input088), sizeof(enc_assoc088), sizeof(enc_nonce088) }, -+ { enc_input089, enc_output089, enc_assoc089, enc_nonce089, enc_key089, -+ sizeof(enc_input089), sizeof(enc_assoc089), sizeof(enc_nonce089) }, -+ { enc_input090, enc_output090, enc_assoc090, enc_nonce090, enc_key090, -+ sizeof(enc_input090), sizeof(enc_assoc090), sizeof(enc_nonce090) }, -+ { enc_input091, enc_output091, enc_assoc091, enc_nonce091, enc_key091, -+ sizeof(enc_input091), sizeof(enc_assoc091), sizeof(enc_nonce091) }, -+ { enc_input092, enc_output092, enc_assoc092, enc_nonce092, enc_key092, -+ sizeof(enc_input092), sizeof(enc_assoc092), sizeof(enc_nonce092) }, -+ { enc_input093, enc_output093, enc_assoc093, enc_nonce093, enc_key093, -+ sizeof(enc_input093), sizeof(enc_assoc093), sizeof(enc_nonce093) }, -+ { enc_input094, enc_output094, enc_assoc094, enc_nonce094, enc_key094, -+ sizeof(enc_input094), sizeof(enc_assoc094), sizeof(enc_nonce094) }, -+ { enc_input095, enc_output095, enc_assoc095, enc_nonce095, enc_key095, -+ sizeof(enc_input095), sizeof(enc_assoc095), sizeof(enc_nonce095) }, -+ { enc_input096, enc_output096, enc_assoc096, enc_nonce096, enc_key096, -+ sizeof(enc_input096), sizeof(enc_assoc096), sizeof(enc_nonce096) }, -+ { enc_input097, enc_output097, enc_assoc097, enc_nonce097, enc_key097, -+ sizeof(enc_input097), sizeof(enc_assoc097), sizeof(enc_nonce097) }, -+ { enc_input098, enc_output098, enc_assoc098, enc_nonce098, enc_key098, -+ sizeof(enc_input098), sizeof(enc_assoc098), sizeof(enc_nonce098) }, -+ { enc_input099, enc_output099, enc_assoc099, enc_nonce099, enc_key099, -+ sizeof(enc_input099), sizeof(enc_assoc099), sizeof(enc_nonce099) }, -+ { enc_input100, enc_output100, enc_assoc100, enc_nonce100, enc_key100, -+ sizeof(enc_input100), sizeof(enc_assoc100), sizeof(enc_nonce100) }, -+ { enc_input101, enc_output101, enc_assoc101, enc_nonce101, enc_key101, -+ sizeof(enc_input101), sizeof(enc_assoc101), sizeof(enc_nonce101) }, -+ { enc_input102, enc_output102, enc_assoc102, enc_nonce102, enc_key102, -+ sizeof(enc_input102), sizeof(enc_assoc102), sizeof(enc_nonce102) }, -+ { enc_input103, enc_output103, enc_assoc103, enc_nonce103, enc_key103, -+ sizeof(enc_input103), sizeof(enc_assoc103), sizeof(enc_nonce103) }, -+ { enc_input104, enc_output104, enc_assoc104, enc_nonce104, enc_key104, -+ sizeof(enc_input104), sizeof(enc_assoc104), sizeof(enc_nonce104) }, -+ { enc_input105, enc_output105, enc_assoc105, enc_nonce105, enc_key105, -+ sizeof(enc_input105), sizeof(enc_assoc105), sizeof(enc_nonce105) }, -+ { enc_input106, enc_output106, enc_assoc106, enc_nonce106, enc_key106, -+ sizeof(enc_input106), sizeof(enc_assoc106), sizeof(enc_nonce106) }, -+ { enc_input107, enc_output107, enc_assoc107, enc_nonce107, enc_key107, -+ sizeof(enc_input107), sizeof(enc_assoc107), sizeof(enc_nonce107) }, -+ { enc_input108, enc_output108, enc_assoc108, enc_nonce108, enc_key108, -+ sizeof(enc_input108), sizeof(enc_assoc108), sizeof(enc_nonce108) }, -+ { enc_input109, enc_output109, enc_assoc109, enc_nonce109, enc_key109, -+ sizeof(enc_input109), sizeof(enc_assoc109), sizeof(enc_nonce109) }, -+ { enc_input110, enc_output110, enc_assoc110, enc_nonce110, enc_key110, -+ sizeof(enc_input110), sizeof(enc_assoc110), sizeof(enc_nonce110) }, -+ { enc_input111, enc_output111, enc_assoc111, enc_nonce111, enc_key111, -+ sizeof(enc_input111), sizeof(enc_assoc111), sizeof(enc_nonce111) }, -+ { enc_input112, enc_output112, enc_assoc112, enc_nonce112, enc_key112, -+ sizeof(enc_input112), sizeof(enc_assoc112), sizeof(enc_nonce112) }, -+ { enc_input113, enc_output113, enc_assoc113, enc_nonce113, enc_key113, -+ sizeof(enc_input113), sizeof(enc_assoc113), sizeof(enc_nonce113) }, -+ { enc_input114, enc_output114, enc_assoc114, enc_nonce114, enc_key114, -+ sizeof(enc_input114), sizeof(enc_assoc114), sizeof(enc_nonce114) }, -+ { enc_input115, enc_output115, enc_assoc115, enc_nonce115, enc_key115, -+ sizeof(enc_input115), sizeof(enc_assoc115), sizeof(enc_nonce115) }, -+ { enc_input116, enc_output116, enc_assoc116, enc_nonce116, enc_key116, -+ sizeof(enc_input116), sizeof(enc_assoc116), sizeof(enc_nonce116) }, -+ { enc_input117, enc_output117, enc_assoc117, enc_nonce117, enc_key117, -+ sizeof(enc_input117), sizeof(enc_assoc117), sizeof(enc_nonce117) }, -+ { enc_input118, enc_output118, enc_assoc118, enc_nonce118, enc_key118, -+ sizeof(enc_input118), sizeof(enc_assoc118), sizeof(enc_nonce118) } -+}; -+ -+static const u8 dec_input001[]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71, 0x8c, 0xbc, 0x54, 0x6a, -+ 0x0d, 0x07, 0x2b, 0x04, 0xb3, 0x56, 0x4e, 0xea, -+ 0x1b, 0x42, 0x22, 0x73, 0xf5, 0x48, 0x27, 0x1a, -+ 0x0b, 0xb2, 0x31, 0x60, 0x53, 0xfa, 0x76, 0x99, -+ 0x19, 0x55, 0xeb, 0xd6, 0x31, 0x59, 0x43, 0x4e, -+ 0xce, 0xbb, 0x4e, 0x46, 0x6d, 0xae, 0x5a, 0x10, -+ 0x73, 0xa6, 0x72, 0x76, 0x27, 0x09, 0x7a, 0x10, -+ 0x49, 0xe6, 0x17, 0xd9, 0x1d, 0x36, 0x10, 0x94, -+ 0xfa, 0x68, 0xf0, 0xff, 0x77, 0x98, 0x71, 0x30, -+ 0x30, 0x5b, 0xea, 0xba, 0x2e, 0xda, 0x04, 0xdf, -+ 0x99, 0x7b, 0x71, 0x4d, 0x6c, 0x6f, 0x2c, 0x29, -+ 0xa6, 0xad, 0x5c, 0xb4, 0x02, 0x2b, 0x02, 0x70, -+ 0x9b, 0xee, 0xad, 0x9d, 0x67, 0x89, 0x0c, 0xbb, -+ 0x22, 0x39, 0x23, 0x36, 0xfe, 0xa1, 0x85, 0x1f, -+ 0x38 -+}; -+static const u8 dec_output001[] __initconst = { -+ 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, -+ 0x2d, 0x44, 0x72, 0x61, 0x66, 0x74, 0x73, 0x20, -+ 0x61, 0x72, 0x65, 0x20, 0x64, 0x72, 0x61, 0x66, -+ 0x74, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, -+ 0x6e, 0x74, 0x73, 0x20, 0x76, 0x61, 0x6c, 0x69, -+ 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, -+ 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x20, -+ 0x6f, 0x66, 0x20, 0x73, 0x69, 0x78, 0x20, 0x6d, -+ 0x6f, 0x6e, 0x74, 0x68, 0x73, 0x20, 0x61, 0x6e, -+ 0x64, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, -+ 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, -+ 0x2c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, -+ 0x65, 0x64, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x6f, -+ 0x62, 0x73, 0x6f, 0x6c, 0x65, 0x74, 0x65, 0x64, -+ 0x20, 0x62, 0x79, 0x20, 0x6f, 0x74, 0x68, 0x65, -+ 0x72, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, -+ 0x6e, 0x74, 0x73, 0x20, 0x61, 0x74, 0x20, 0x61, -+ 0x6e, 0x79, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x2e, -+ 0x20, 0x49, 0x74, 0x20, 0x69, 0x73, 0x20, 0x69, -+ 0x6e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, -+ 0x69, 0x61, 0x74, 0x65, 0x20, 0x74, 0x6f, 0x20, -+ 0x75, 0x73, 0x65, 0x20, 0x49, 0x6e, 0x74, 0x65, -+ 0x72, 0x6e, 0x65, 0x74, 0x2d, 0x44, 0x72, 0x61, -+ 0x66, 0x74, 0x73, 0x20, 0x61, 0x73, 0x20, 0x72, -+ 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, -+ 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, -+ 0x6c, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x6f, 0x20, -+ 0x63, 0x69, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, -+ 0x6d, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, -+ 0x74, 0x68, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x20, -+ 0x2f, 0xe2, 0x80, 0x9c, 0x77, 0x6f, 0x72, 0x6b, -+ 0x20, 0x69, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x67, -+ 0x72, 0x65, 0x73, 0x73, 0x2e, 0x2f, 0xe2, 0x80, -+ 0x9d -+}; -+static const u8 dec_assoc001[] __initconst = { -+ 0xf3, 0x33, 0x88, 0x86, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x4e, 0x91 -+}; -+static const u8 dec_nonce001[] __initconst = { -+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 -+}; -+static const u8 dec_key001[] __initconst = { -+ 0x1c, 0x92, 0x40, 0xa5, 0xeb, 0x55, 0xd3, 0x8a, -+ 0xf3, 0x33, 0x88, 0x86, 0x04, 0xf6, 0xb5, 0xf0, -+ 0x47, 0x39, 0x17, 0xc1, 0x40, 0x2b, 0x80, 0x09, -+ 0x9d, 0xca, 0x5c, 0xbc, 0x20, 0x70, 0x75, 0xc0 -+}; -+ -+static const u8 dec_input002[] __initconst = { -+ 0xea, 0xe0, 0x1e, 0x9e, 0x2c, 0x91, 0xaa, 0xe1, -+ 0xdb, 0x5d, 0x99, 0x3f, 0x8a, 0xf7, 0x69, 0x92 -+}; -+static const u8 dec_output002[] __initconst = { }; -+static const u8 dec_assoc002[] __initconst = { }; -+static const u8 dec_nonce002[] __initconst = { -+ 0xca, 0xbf, 0x33, 0x71, 0x32, 0x45, 0x77, 0x8e -+}; -+static const u8 dec_key002[] __initconst = { -+ 0x4c, 0xf5, 0x96, 0x83, 0x38, 0xe6, 0xae, 0x7f, -+ 0x2d, 0x29, 0x25, 0x76, 0xd5, 0x75, 0x27, 0x86, -+ 0x91, 0x9a, 0x27, 0x7a, 0xfb, 0x46, 0xc5, 0xef, -+ 0x94, 0x81, 0x79, 0x57, 0x14, 0x59, 0x40, 0x68 -+}; -+ -+static const u8 dec_input003[] __initconst = { -+ 0xdd, 0x6b, 0x3b, 0x82, 0xce, 0x5a, 0xbd, 0xd6, -+ 0xa9, 0x35, 0x83, 0xd8, 0x8c, 0x3d, 0x85, 0x77 -+}; -+static const u8 dec_output003[] __initconst = { }; -+static const u8 dec_assoc003[] __initconst = { -+ 0x33, 0x10, 0x41, 0x12, 0x1f, 0xf3, 0xd2, 0x6b -+}; -+static const u8 dec_nonce003[] __initconst = { -+ 0x3d, 0x86, 0xb5, 0x6b, 0xc8, 0xa3, 0x1f, 0x1d -+}; -+static const u8 dec_key003[] __initconst = { -+ 0x2d, 0xb0, 0x5d, 0x40, 0xc8, 0xed, 0x44, 0x88, -+ 0x34, 0xd1, 0x13, 0xaf, 0x57, 0xa1, 0xeb, 0x3a, -+ 0x2a, 0x80, 0x51, 0x36, 0xec, 0x5b, 0xbc, 0x08, -+ 0x93, 0x84, 0x21, 0xb5, 0x13, 0x88, 0x3c, 0x0d -+}; -+ -+static const u8 dec_input004[] __initconst = { -+ 0xb7, 0x1b, 0xb0, 0x73, 0x59, 0xb0, 0x84, 0xb2, -+ 0x6d, 0x8e, 0xab, 0x94, 0x31, 0xa1, 0xae, 0xac, -+ 0x89 -+}; -+static const u8 dec_output004[] __initconst = { -+ 0xa4 -+}; -+static const u8 dec_assoc004[] __initconst = { -+ 0x6a, 0xe2, 0xad, 0x3f, 0x88, 0x39, 0x5a, 0x40 -+}; -+static const u8 dec_nonce004[] __initconst = { -+ 0xd2, 0x32, 0x1f, 0x29, 0x28, 0xc6, 0xc4, 0xc4 -+}; -+static const u8 dec_key004[] __initconst = { -+ 0x4b, 0x28, 0x4b, 0xa3, 0x7b, 0xbe, 0xe9, 0xf8, -+ 0x31, 0x80, 0x82, 0xd7, 0xd8, 0xe8, 0xb5, 0xa1, -+ 0xe2, 0x18, 0x18, 0x8a, 0x9c, 0xfa, 0xa3, 0x3d, -+ 0x25, 0x71, 0x3e, 0x40, 0xbc, 0x54, 0x7a, 0x3e -+}; -+ -+static const u8 dec_input005[] __initconst = { -+ 0xbf, 0xe1, 0x5b, 0x0b, 0xdb, 0x6b, 0xf5, 0x5e, -+ 0x6c, 0x5d, 0x84, 0x44, 0x39, 0x81, 0xc1, 0x9c, -+ 0xac -+}; -+static const u8 dec_output005[] __initconst = { -+ 0x2d -+}; -+static const u8 dec_assoc005[] __initconst = { }; -+static const u8 dec_nonce005[] __initconst = { -+ 0x20, 0x1c, 0xaa, 0x5f, 0x9c, 0xbf, 0x92, 0x30 -+}; -+static const u8 dec_key005[] __initconst = { -+ 0x66, 0xca, 0x9c, 0x23, 0x2a, 0x4b, 0x4b, 0x31, -+ 0x0e, 0x92, 0x89, 0x8b, 0xf4, 0x93, 0xc7, 0x87, -+ 0x98, 0xa3, 0xd8, 0x39, 0xf8, 0xf4, 0xa7, 0x01, -+ 0xc0, 0x2e, 0x0a, 0xa6, 0x7e, 0x5a, 0x78, 0x87 -+}; -+ -+static const u8 dec_input006[] __initconst = { -+ 0x8b, 0x06, 0xd3, 0x31, 0xb0, 0x93, 0x45, 0xb1, -+ 0x75, 0x6e, 0x26, 0xf9, 0x67, 0xbc, 0x90, 0x15, -+ 0x81, 0x2c, 0xb5, 0xf0, 0xc6, 0x2b, 0xc7, 0x8c, -+ 0x56, 0xd1, 0xbf, 0x69, 0x6c, 0x07, 0xa0, 0xda, -+ 0x65, 0x27, 0xc9, 0x90, 0x3d, 0xef, 0x4b, 0x11, -+ 0x0f, 0x19, 0x07, 0xfd, 0x29, 0x92, 0xd9, 0xc8, -+ 0xf7, 0x99, 0x2e, 0x4a, 0xd0, 0xb8, 0x2c, 0xdc, -+ 0x93, 0xf5, 0x9e, 0x33, 0x78, 0xd1, 0x37, 0xc3, -+ 0x66, 0xd7, 0x5e, 0xbc, 0x44, 0xbf, 0x53, 0xa5, -+ 0xbc, 0xc4, 0xcb, 0x7b, 0x3a, 0x8e, 0x7f, 0x02, -+ 0xbd, 0xbb, 0xe7, 0xca, 0xa6, 0x6c, 0x6b, 0x93, -+ 0x21, 0x93, 0x10, 0x61, 0xe7, 0x69, 0xd0, 0x78, -+ 0xf3, 0x07, 0x5a, 0x1a, 0x8f, 0x73, 0xaa, 0xb1, -+ 0x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0xde, -+ 0x8f -+}; -+static const u8 dec_assoc006[] __initconst = { -+ 0x70, 0xd3, 0x33, 0xf3, 0x8b, 0x18, 0x0b -+}; -+static const u8 dec_nonce006[] __initconst = { -+ 0xdf, 0x51, 0x84, 0x82, 0x42, 0x0c, 0x75, 0x9c -+}; -+static const u8 dec_key006[] __initconst = { -+ 0x68, 0x7b, 0x8d, 0x8e, 0xe3, 0xc4, 0xdd, 0xae, -+ 0xdf, 0x72, 0x7f, 0x53, 0x72, 0x25, 0x1e, 0x78, -+ 0x91, 0xcb, 0x69, 0x76, 0x1f, 0x49, 0x93, 0xf9, -+ 0x6f, 0x21, 0xcc, 0x39, 0x9c, 0xad, 0xb1, 0x01 -+}; -+ -+static const u8 dec_input007[] __initconst = { -+ 0x85, 0x04, 0xc2, 0xed, 0x8d, 0xfd, 0x97, 0x5c, -+ 0xd2, 0xb7, 0xe2, 0xc1, 0x6b, 0xa3, 0xba, 0xf8, -+ 0xc9, 0x50, 0xc3, 0xc6, 0xa5, 0xe3, 0xa4, 0x7c, -+ 0xc3, 0x23, 0x49, 0x5e, 0xa9, 0xb9, 0x32, 0xeb, -+ 0x8a, 0x7c, 0xca, 0xe5, 0xec, 0xfb, 0x7c, 0xc0, -+ 0xcb, 0x7d, 0xdc, 0x2c, 0x9d, 0x92, 0x55, 0x21, -+ 0x0a, 0xc8, 0x43, 0x63, 0x59, 0x0a, 0x31, 0x70, -+ 0x82, 0x67, 0x41, 0x03, 0xf8, 0xdf, 0xf2, 0xac, -+ 0xa7, 0x02, 0xd4, 0xd5, 0x8a, 0x2d, 0xc8, 0x99, -+ 0x19, 0x66, 0xd0, 0xf6, 0x88, 0x2c, 0x77, 0xd9, -+ 0xd4, 0x0d, 0x6c, 0xbd, 0x98, 0xde, 0xe7, 0x7f, -+ 0xad, 0x7e, 0x8a, 0xfb, 0xe9, 0x4b, 0xe5, 0xf7, -+ 0xe5, 0x50, 0xa0, 0x90, 0x3f, 0xd6, 0x22, 0x53, -+ 0xe3, 0xfe, 0x1b, 0xcc, 0x79, 0x3b, 0xec, 0x12, -+ 0x47, 0x52, 0xa7, 0xd6, 0x04, 0xe3, 0x52, 0xe6, -+ 0x93, 0x90, 0x91, 0x32, 0x73, 0x79, 0xb8, 0xd0, -+ 0x31, 0xde, 0x1f, 0x9f, 0x2f, 0x05, 0x38, 0x54, -+ 0x2f, 0x35, 0x04, 0x39, 0xe0, 0xa7, 0xba, 0xc6, -+ 0x52, 0xf6, 0x37, 0x65, 0x4c, 0x07, 0xa9, 0x7e, -+ 0xb3, 0x21, 0x6f, 0x74, 0x8c, 0xc9, 0xde, 0xdb, -+ 0x65, 0x1b, 0x9b, 0xaa, 0x60, 0xb1, 0x03, 0x30, -+ 0x6b, 0xb2, 0x03, 0xc4, 0x1c, 0x04, 0xf8, 0x0f, -+ 0x64, 0xaf, 0x46, 0xe4, 0x65, 0x99, 0x49, 0xe2, -+ 0xea, 0xce, 0x78, 0x00, 0xd8, 0x8b, 0xd5, 0x2e, -+ 0xcf, 0xfc, 0x40, 0x49, 0xe8, 0x58, 0xdc, 0x34, -+ 0x9c, 0x8c, 0x61, 0xbf, 0x0a, 0x8e, 0xec, 0x39, -+ 0xa9, 0x30, 0x05, 0x5a, 0xd2, 0x56, 0x01, 0xc7, -+ 0xda, 0x8f, 0x4e, 0xbb, 0x43, 0xa3, 0x3a, 0xf9, -+ 0x15, 0x2a, 0xd0, 0xa0, 0x7a, 0x87, 0x34, 0x82, -+ 0xfe, 0x8a, 0xd1, 0x2d, 0x5e, 0xc7, 0xbf, 0x04, -+ 0x53, 0x5f, 0x3b, 0x36, 0xd4, 0x25, 0x5c, 0x34, -+ 0x7a, 0x8d, 0xd5, 0x05, 0xce, 0x72, 0xca, 0xef, -+ 0x7a, 0x4b, 0xbc, 0xb0, 0x10, 0x5c, 0x96, 0x42, -+ 0x3a, 0x00, 0x98, 0xcd, 0x15, 0xe8, 0xb7, 0x53 -+}; -+static const u8 dec_output007[] __initconst = { -+ 0x9b, 0x18, 0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x7b, 0xcf, 0x3c, -+ 0x7b, 0x3e, 0x0e, 0x22, 0x78, 0x0c, 0x29, 0xbf, -+ 0xe4, 0xf4, 0x57, 0xb3, 0xcb, 0x49, 0xa0, 0xfc, -+ 0x1e, 0x05, 0x4e, 0x16, 0xbc, 0xd5, 0xa8, 0xa3, -+ 0xee, 0x05, 0x35, 0xc6, 0x7c, 0xab, 0x60, 0x14, -+ 0x55, 0x1a, 0x8e, 0xc5, 0x88, 0x5d, 0xd5, 0x81, -+ 0xc2, 0x81, 0xa5, 0xc4, 0x60, 0xdb, 0xaf, 0x77, -+ 0x91, 0xe1, 0xce, 0xa2, 0x7e, 0x7f, 0x42, 0xe3, -+ 0xb0, 0x13, 0x1c, 0x1f, 0x25, 0x60, 0x21, 0xe2, -+ 0x40, 0x5f, 0x99, 0xb7, 0x73, 0xec, 0x9b, 0x2b, -+ 0xf0, 0x65, 0x11, 0xc8, 0xd0, 0x0a, 0x9f, 0xd3 -+}; -+static const u8 dec_assoc007[] __initconst = { }; -+static const u8 dec_nonce007[] __initconst = { -+ 0xde, 0x7b, 0xef, 0xc3, 0x65, 0x1b, 0x68, 0xb0 -+}; -+static const u8 dec_key007[] __initconst = { -+ 0x8d, 0xb8, 0x91, 0x48, 0xf0, 0xe7, 0x0a, 0xbd, -+ 0xf9, 0x3f, 0xcd, 0xd9, 0xa0, 0x1e, 0x42, 0x4c, -+ 0xe7, 0xde, 0x25, 0x3d, 0xa3, 0xd7, 0x05, 0x80, -+ 0x8d, 0xf2, 0x82, 0xac, 0x44, 0x16, 0x51, 0x01 -+}; -+ -+static const u8 dec_input008[] __initconst = { -+ 0x14, 0xf6, 0x41, 0x37, 0xa6, 0xd4, 0x27, 0xcd, -+ 0xdb, 0x06, 0x3e, 0x9a, 0x4e, 0xab, 0xd5, 0xb1, -+ 0x1e, 0x6b, 0xd2, 0xbc, 0x11, 0xf4, 0x28, 0x93, -+ 0x63, 0x54, 0xef, 0xbb, 0x5e, 0x1d, 0x3a, 0x1d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d, -+ 0x71, 0x52, 0xa7, 0xb8, 0xc0, 0xa5, 0xc6, 0xa2, -+ 0x73, 0xda, 0xf4, 0x4b, 0x74, 0x5b, 0x00, 0x3d, -+ 0x99, 0xd7, 0x96, 0xba, 0xe6, 0xe1, 0xa6, 0x96, -+ 0x38, 0xad, 0xb3, 0xc0, 0xd2, 0xba, 0x91, 0x6b, -+ 0xf9, 0x19, 0xdd, 0x3b, 0xbe, 0xbe, 0x9c, 0x20, -+ 0x50, 0xba, 0xa1, 0xd0, 0xce, 0x11, 0xbd, 0x95, -+ 0xd8, 0xd1, 0xdd, 0x33, 0x85, 0x74, 0xdc, 0xdb, -+ 0x66, 0x76, 0x44, 0xdc, 0x03, 0x74, 0x48, 0x35, -+ 0x98, 0xb1, 0x18, 0x47, 0x94, 0x7d, 0xff, 0x62, -+ 0xe4, 0x58, 0x78, 0xab, 0xed, 0x95, 0x36, 0xd9, -+ 0x84, 0x91, 0x82, 0x64, 0x41, 0xbb, 0x58, 0xe6, -+ 0x1c, 0x20, 0x6d, 0x15, 0x6b, 0x13, 0x96, 0xe8, -+ 0x35, 0x7f, 0xdc, 0x40, 0x2c, 0xe9, 0xbc, 0x8a, -+ 0x4f, 0x92, 0xec, 0x06, 0x2d, 0x50, 0xdf, 0x93, -+ 0x5d, 0x65, 0x5a, 0xa8, 0xfc, 0x20, 0x50, 0x14, -+ 0xa9, 0x8a, 0x7e, 0x1d, 0x08, 0x1f, 0xe2, 0x99, -+ 0xd0, 0xbe, 0xfb, 0x3a, 0x21, 0x9d, 0xad, 0x86, -+ 0x54, 0xfd, 0x0d, 0x98, 0x1c, 0x5a, 0x6f, 0x1f, -+ 0x9a, 0x40, 0xcd, 0xa2, 0xff, 0x6a, 0xf1, 0x54 -+}; -+static const u8 dec_output008[] __initconst = { -+ 0xc3, 0x09, 0x94, 0x62, 0xe6, 0x46, 0x2e, 0x10, -+ 0xbe, 0x00, 0xe4, 0xfc, 0xf3, 0x40, 0xa3, 0xe2, -+ 0x0f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0xa8, 0x23, 0x22, 0xf6, 0x6b, -+ 0x77, 0xc4, 0xfe, 0x40, 0x07, 0x3b, 0xb6, 0xf6, -+ 0x8e, 0x5f, 0xd4, 0xb9, 0xb7, 0x0f, 0x21, 0x04, -+ 0xef, 0x83, 0x63, 0x91, 0x69, 0x40, 0xa3, 0x48, -+ 0x5c, 0xd2, 0x60, 0xf9, 0x4f, 0x6c, 0x47, 0x8b, -+ 0x3b, 0xb1, 0x9f, 0x8e, 0xee, 0x16, 0x8a, 0x13, -+ 0xfc, 0x46, 0x17, 0xc3, 0xc3, 0x32, 0x56, 0xf8, -+ 0x3c, 0x85, 0x3a, 0xb6, 0x3e, 0xaa, 0x89, 0x4f, -+ 0xb3, 0xdf, 0x38, 0xfd, 0xf1, 0xe4, 0x3a, 0xc0, -+ 0xe6, 0x58, 0xb5, 0x8f, 0xc5, 0x29, 0xa2, 0x92, -+ 0x4a, 0xb6, 0xa0, 0x34, 0x7f, 0xab, 0xb5, 0x8a, -+ 0x90, 0xa1, 0xdb, 0x4d, 0xca, 0xb6, 0x2c, 0x41, -+ 0x3c, 0xf7, 0x2b, 0x21, 0xc3, 0xfd, 0xf4, 0x17, -+ 0x5c, 0xb5, 0x33, 0x17, 0x68, 0x2b, 0x08, 0x30, -+ 0xf3, 0xf7, 0x30, 0x3c, 0x96, 0xe6, 0x6a, 0x20, -+ 0x97, 0xe7, 0x4d, 0x10, 0x5f, 0x47, 0x5f, 0x49, -+ 0x96, 0x09, 0xf0, 0x27, 0x91, 0xc8, 0xf8, 0x5a, -+ 0x2e, 0x79, 0xb5, 0xe2, 0xb8, 0xe8, 0xb9, 0x7b, -+ 0xd5, 0x10, 0xcb, 0xff, 0x5d, 0x14, 0x73, 0xf3 -+}; -+static const u8 dec_assoc008[] __initconst = { }; -+static const u8 dec_nonce008[] __initconst = { -+ 0x0e, 0x0d, 0x57, 0xbb, 0x7b, 0x40, 0x54, 0x02 -+}; -+static const u8 dec_key008[] __initconst = { -+ 0xf2, 0xa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2, 0x73, 0xe7, 0xe2, 0xd7, 0xe4, 0x4f, -+ 0x4b, 0x08, 0x6e, 0xb1, 0x12, 0x22, 0x10, 0x9d, -+ 0xac, 0x51, 0x1e, 0x17, 0xd9, 0x8a, 0x0b, 0x42, -+ 0x88, 0x16, 0x81, 0x37, 0x7c, 0x6a, 0xf7, 0xef, -+ 0x2d, 0xe3, 0xd9, 0xf8, 0x5f, 0xe0, 0x53, 0x27, -+ 0x74, 0xb9, 0xe2, 0xd6, 0x1c, 0x80, 0x2c, 0x52, -+ 0x65 -+}; -+static const u8 dec_assoc009[] __initconst = { -+ 0x5a, 0x27, 0xff, 0xeb, 0xdf, 0x84, 0xb2, 0x9e, -+ 0xef -+}; -+static const u8 dec_nonce009[] __initconst = { -+ 0xef, 0x2d, 0x63, 0xee, 0x6b, 0x80, 0x8b, 0x78 -+}; -+static const u8 dec_key009[] __initconst = { -+ 0xea, 0xbc, 0x56, 0x99, 0xe3, 0x50, 0xff, 0xc5, -+ 0xcc, 0x1a, 0xd7, 0xc1, 0x57, 0x72, 0xea, 0x86, -+ 0x5b, 0x89, 0x88, 0x61, 0x3d, 0x2f, 0x9b, 0xb2, -+ 0xe7, 0x9c, 0xec, 0x74, 0x6e, 0x3e, 0xf4, 0x3b -+}; -+ -+static const u8 dec_input010[] __initconst = { -+ 0xe5, 0x26, 0xa4, 0x3d, 0xbd, 0x33, 0xd0, 0x4b, -+ 0x6f, 0x05, 0xa7, 0x6e, 0x12, 0x7a, 0xd2, 0x74, -+ 0xa6, 0xdd, 0xbd, 0x95, 0xeb, 0xf9, 0xa4, 0xf1, -+ 0x59, 0x93, 0x91, 0x70, 0xd9, 0xfe, 0x9a, 0xcd, -+ 0x53, 0x1f, 0x3a, 0xab, 0xa6, 0x7c, 0x9f, 0xa6, -+ 0x9e, 0xbd, 0x99, 0xd9, 0xb5, 0x97, 0x44, 0xd5, -+ 0x14, 0x48, 0x4d, 0x9d, 0xc0, 0xd0, 0x05, 0x96, -+ 0xeb, 0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f5, -+ 0x67, 0xa3, 0xe4, 0x11, 0xe0, 0x59, 0xb3, 0xca, -+ 0x87, 0xa0, 0xae, 0xc9, 0xa6, 0x62, 0x1b, 0x6e, -+ 0x4d, 0x02, 0x6b, 0x07, 0x9d, 0xfd, 0xd0, 0x92, -+ 0x06, 0xe1, 0xb2, 0x9a, 0x4a, 0x1f, 0x1f, 0x13, -+ 0x49, 0x99, 0x97, 0x08, 0xde, 0x7f, 0x98, 0xaf, -+ 0x51, 0x98, 0xee, 0x2c, 0xcb, 0xf0, 0x0b, 0xc6, -+ 0xb6, 0xb7, 0x2d, 0x9a, 0xb1, 0xac, 0xa6, 0xe3, -+ 0x15, 0x77, 0x9d, 0x6b, 0x1a, 0xe4, 0xfc, 0x8b, -+ 0xf2, 0x17, 0x59, 0x08, 0x04, 0x58, 0x81, 0x9d, -+ 0x1b, 0x1b, 0x69, 0x55, 0xc2, 0xb4, 0x3c, 0x1f, -+ 0x50, 0xf1, 0x7f, 0x77, 0x90, 0x4c, 0x66, 0x40, -+ 0x5a, 0xc0, 0x33, 0x1f, 0xcb, 0x05, 0x6d, 0x5c, -+ 0x06, 0x87, 0x52, 0xa2, 0x8f, 0x26, 0xd5, 0x4f -+}; -+static const u8 dec_assoc010[] __initconst = { -+ 0xd2, 0xa1, 0x70, 0xdb, 0x7a, 0xf8, 0xfa, 0x27, -+ 0xba, 0x73, 0x0f, 0xbf, 0x3d, 0x1e, 0x82, 0xb2 -+}; -+static const u8 dec_nonce010[] __initconst = { -+ 0xdb, 0x92, 0x0f, 0x7f, 0x17, 0x54, 0x0c, 0x30 -+}; -+static const u8 dec_key010[] __initconst = { -+ 0x47, 0x11, 0xeb, 0x86, 0x2b, 0x2c, 0xab, 0x44, -+ 0x34, 0xda, 0x7f, 0x57, 0x03, 0x39, 0x0c, 0xaf, -+ 0x2c, 0x14, 0xfd, 0x65, 0x23, 0xe9, 0x8e, 0x74, -+ 0xd5, 0x08, 0x68, 0x08, 0xe7, 0xb4, 0x72, 0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 0x21, 0x65, 0x4d, 0xf5, 0x82, -+ 0xf7, 0xd8, 0x42, 0xce, 0x6f, 0x3d, 0x36, 0x47, -+ 0xf1, 0x05, 0x16, 0xe8, 0x1b, 0x6a, 0x8f, 0x93, -+ 0xf2, 0x8f, 0x37, 0x40, 0x12, 0x28, 0xa3, 0xe6, -+ 0xb9, 0x17, 0x4a, 0x1f, 0xb1, 0xd1, 0x66, 0x69, -+ 0x86, 0xc4, 0xfc, 0x97, 0xae, 0x3f, 0x8f, 0x1e, -+ 0x2b, 0xdf, 0xcd, 0xf9, 0x3c -+}; -+static const u8 dec_output011[] __initconst = { -+ 0x7a, 0x57, 0xf2, 0xc7, 0x06, 0x3f, 0x50, 0x7b, -+ 0x36, 0x1a, 0x66, 0x5c, 0xb9, 0x0e, 0x5e, 0x3b, -+ 0x45, 0x60, 0xbe, 0x9a, 0x31, 0x9f, 0xff, 0x5d, -+ 0x66, 0x34, 0xb4, 0xdc, 0xfb, 0x9d, 0x8e, 0xee, -+ 0x6a, 0x33, 0xa4, 0x07, 0x3c, 0xf9, 0x4c, 0x30, -+ 0xa1, 0x24, 0x52, 0xf9, 0x50, 0x46, 0x88, 0x20, -+ 0x02, 0x32, 0x3a, 0x0e, 0x99, 0x63, 0xaf, 0x1f, -+ 0x15, 0x28, 0x2a, 0x05, 0xff, 0x57, 0x59, 0x5e, -+ 0x18, 0xa1, 0x1f, 0xd0, 0x92, 0x5c, 0x88, 0x66, -+ 0x1b, 0x00, 0x64, 0xa5, 0x93, 0x8d, 0x06, 0x46, -+ 0xb0, 0x64, 0x8b, 0x8b, 0xef, 0x99, 0x05, 0x35, -+ 0x85, 0xb3, 0xf3, 0x33, 0xbb, 0xec, 0x66, 0xb6, -+ 0x3d, 0x57, 0x42, 0xe3, 0xb4, 0xc6, 0xaa, 0xb0, -+ 0x41, 0x2a, 0xb9, 0x59, 0xa9, 0xf6, 0x3e, 0x15, -+ 0x26, 0x12, 0x03, 0x21, 0x4c, 0x74, 0x43, 0x13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, 0x9b, 0x8f, -+ 0x91, 0x1b, 0x9f, 0xcd, 0x10, 0xee, 0x75, 0xf9, -+ 0x97, 0x66, 0xfc, 0x4d, 0x33, 0x6e, 0x28, 0x2b, -+ 0x92, 0x85, 0x4f, 0xab, 0x43, 0x8d, 0x8f, 0x7d, -+ 0x86, 0xa7, 0xc7, 0xd8, 0xd3, 0x0b, 0x8b, 0x57, -+ 0xb6, 0x1d, 0x95, 0x0d, 0xe9, 0xbc, 0xd9, 0x03, -+ 0xd9, 0x10, 0x19, 0xc3, 0x46, 0x63, 0x55, 0x87, -+ 0x61, 0x79, 0x6c, 0x95, 0x0e, 0x9c, 0xdd, 0xca, -+ 0xc3, 0xf3, 0x64, 0xf0, 0x7d, 0x76, 0xb7, 0x53, -+ 0x67, 0x2b, 0x1e, 0x44, 0x56, 0x81, 0xea, 0x8f, -+ 0x5c, 0x42, 0x16, 0xb8, 0x28, 0xeb, 0x1b, 0x61, -+ 0x10, 0x1e, 0xbf, 0xec, 0xa8 -+}; -+static const u8 dec_assoc011[] __initconst = { -+ 0xd6, 0x31, 0xda, 0x5d, 0x42, 0x5e, 0xd7 -+}; -+static const u8 dec_nonce011[] __initconst = { -+ 0xfd, 0x87, 0xd4, 0xd8, 0x62, 0xfd, 0xec, 0xaa -+}; -+static const u8 dec_key011[] __initconst = { -+ 0x35, 0x4e, 0xb5, 0x70, 0x50, 0x42, 0x8a, 0x85, -+ 0xf2, 0xfb, 0xed, 0x7b, 0xd0, 0x9e, 0x97, 0xca, -+ 0xfa, 0x98, 0x66, 0x63, 0xee, 0x37, 0xcc, 0x52, -+ 0xfe, 0xd1, 0xdf, 0x95, 0x15, 0x34, 0x29, 0x38 -+}; -+ -+static const u8 dec_input012[] __initconst = { -+ 0x52, 0x34, 0xb3, 0x65, 0x3b, 0xb7, 0xe5, 0xd3, -+ 0xab, 0x49, 0x17, 0x60, 0xd2, 0x52, 0x56, 0xdf, -+ 0xdf, 0x34, 0x56, 0x82, 0xe2, 0xbe, 0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xac, 0xf3, 0x6b, 0x6c, 0xaa, 0xcf, 0x12, -+ 0xc5, 0x6c, 0x90, 0x50, 0xb5, 0x0c, 0xfc, 0x1a, -+ 0x15, 0x52, 0xe9, 0x26, 0xc6, 0x52, 0xa4, 0xe7, -+ 0x81, 0x69, 0xe1, 0xe7, 0x9e, 0x30, 0x01, 0xec, -+ 0x84, 0x89, 0xb2, 0x0d, 0x66, 0xdd, 0xce, 0x28, -+ 0x5c, 0xec, 0x98, 0x46, 0x68, 0x21, 0x9f, 0x88, -+ 0x3f, 0x1f, 0x42, 0x77, 0xce, 0xd0, 0x61, 0xd4, -+ 0x20, 0xa7, 0xff, 0x53, 0xad, 0x37, 0xd0, 0x17, -+ 0x35, 0xc9, 0xfc, 0xba, 0x0a, 0x78, 0x3f, 0xf2, -+ 0xcc, 0x86, 0x89, 0xe8, 0x4b, 0x3c, 0x48, 0x33, -+ 0x09, 0x7f, 0xc6, 0xc0, 0xdd, 0xb8, 0xfd, 0x7a, -+ 0x66, 0x66, 0x65, 0xeb, 0x47, 0xa7, 0x04, 0x28, -+ 0xa3, 0x19, 0x8e, 0xa9, 0xb1, 0x13, 0x67, 0x62, -+ 0x70, 0xcf, 0xd6 -+}; -+static const u8 dec_output012[] __initconst = { -+ 0x74, 0xa6, 0x3e, 0xe4, 0xb1, 0xcb, 0xaf, 0xb0, -+ 0x40, 0xe5, 0x0f, 0x9e, 0xf1, 0xf2, 0x89, 0xb5, -+ 0x42, 0x34, 0x8a, 0xa1, 0x03, 0xb7, 0xe9, 0x57, -+ 0x46, 0xbe, 0x20, 0xe4, 0x6e, 0xb0, 0xeb, 0xff, -+ 0xea, 0x07, 0x7e, 0xef, 0xe2, 0x55, 0x9f, 0xe5, -+ 0x78, 0x3a, 0xb7, 0x83, 0xc2, 0x18, 0x40, 0x7b, -+ 0xeb, 0xcd, 0x81, 0xfb, 0x90, 0x12, 0x9e, 0x46, -+ 0xa9, 0xd6, 0x4a, 0xba, 0xb0, 0x62, 0xdb, 0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, 0x6b, -+ 0x64, 0x33, 0x52, 0xba, 0x64, 0x78, 0x8f, 0xa4, -+ 0xaf, 0x7a, 0x61, 0x8d, 0xbc, 0xc5, 0x73, 0xe9, -+ 0x6b, 0x58, 0x97, 0x4b, 0xbf, 0x63, 0x22, 0xd3, -+ 0x37, 0x02, 0x54, 0xc5, 0xb9, 0x16, 0x4a, 0xf0, -+ 0x19, 0xd8, 0x94, 0x57, 0xb8, 0x8a, 0xb3, 0x16, -+ 0x3b, 0xd0, 0x84, 0x8e, 0x67, 0xa6, 0xa3, 0x7d, -+ 0x78, 0xec, 0x00 -+}; -+static const u8 dec_assoc012[] __initconst = { -+ 0xb1, 0x69, 0x83, 0x87, 0x30, 0xaa, 0x5d, 0xb8, -+ 0x77, 0xe8, 0x21, 0xff, 0x06, 0x59, 0x35, 0xce, -+ 0x75, 0xfe, 0x38, 0xef, 0xb8, 0x91, 0x43, 0x8c, -+ 0xcf, 0x70, 0xdd, 0x0a, 0x68, 0xbf, 0xd4, 0xbc, -+ 0x16, 0x76, 0x99, 0x36, 0x1e, 0x58, 0x79, 0x5e, -+ 0xd4, 0x29, 0xf7, 0x33, 0x93, 0x48, 0xdb, 0x5f, -+ 0x01, 0xae, 0x9c, 0xb6, 0xe4, 0x88, 0x6d, 0x2b, -+ 0x76, 0x75, 0xe0, 0xf3, 0x74, 0xe2, 0xc9 -+}; -+static const u8 dec_nonce012[] __initconst = { -+ 0x05, 0xa3, 0x93, 0xed, 0x30, 0xc5, 0xa2, 0x06 -+}; -+static const u8 dec_key012[] __initconst = { -+ 0xb3, 0x35, 0x50, 0x03, 0x54, 0x2e, 0x40, 0x5e, -+ 0x8f, 0x59, 0x8e, 0xc5, 0x90, 0xd5, 0x27, 0x2d, -+ 0xba, 0x29, 0x2e, 0xcb, 0x1b, 0x70, 0x44, 0x1e, -+ 0x65, 0x91, 0x6e, 0x2a, 0x79, 0x22, 0xda, 0x64 -+}; -+ -+static const u8 dec_input013[] __initconst = { -+ 0x52, 0x34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0x33, 0x0c, 0x23, -+ 0x24, 0x0d, 0x15, 0x70, 0x37, 0x1e, 0x3d, 0xf6, -+ 0xd2, 0xea, 0x92, 0x10, 0xb2, 0xc4, 0x51, 0xac, -+ 0xf2, 0xac, 0xf3, 0x6b, 0x6c, 0xaa, 0xcf, 0x12, -+ 0xc5, 0x6c, 0x90, 0x50, 0xb5, 0x0c, 0xfc, 0x1a, -+ 0x15, 0x52, 0xe9, 0x26, 0xc6, 0x52, 0xa4, 0xe7, -+ 0x81, 0x69, 0xe1, 0xe7, 0x9e, 0x30, 0x01, 0xec, -+ 0x84, 0x89, 0xb2, 0x0d, 0x66, 0xdd, 0xce, 0x28, -+ 0x5c, 0xec, 0x98, 0x46, 0x68, 0x21, 0x9f, 0x88, -+ 0x3f, 0x1f, 0x42, 0x77, 0xce, 0xd0, 0x61, 0xd4, -+ 0x20, 0xa7, 0xff, 0x53, 0xad, 0x37, 0xd0, 0x17, -+ 0x35, 0xc9, 0xfc, 0xba, 0x0a, 0x78, 0x3f, 0xf2, -+ 0xcc, 0x86, 0x89, 0xe8, 0x4b, 0x3c, 0x48, 0x33, -+ 0x09, 0x7f, 0xc6, 0xc0, 0xdd, 0xb8, 0xfd, 0x7a, -+ 0x66, 0x66, 0x65, 0xeb, 0x47, 0xa7, 0x04, 0x28, -+ 0xa3, 0x19, 0x8e, 0xa9, 0xb1, 0x13, 0x67, 0x62, -+ 0x70, 0xcf, 0xd7 -+}; -+static const u8 dec_output013[] __initconst = { -+ 0x74, 0xa6, 0x3e, 0xe4, 0xb1, 0xcb, 0xaf, 0xb0, -+ 0x40, 0xe5, 0x0f, 0x9e, 0xf1, 0xf2, 0x89, 0xb5, -+ 0x42, 0x34, 0x8a, 0xa1, 0x03, 0xb7, 0xe9, 0x57, -+ 0x46, 0xbe, 0x20, 0xe4, 0x6e, 0xb0, 0xeb, 0xff, -+ 0xea, 0x07, 0x7e, 0xef, 0xe2, 0x55, 0x9f, 0xe5, -+ 0x78, 0x3a, 0xb7,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0xdd, 0x03, 0x65, 0xbd, 0x9b, -+ 0x01, 0xda, 0x9c, 0xb9, 0x7e, 0x3f, 0x6a, 0xc4, -+ 0x7b, 0xea, 0xd4, 0x3c, 0xb9, 0xfb, 0x5c, 0x6b, -+ 0x64, 0x33, 0x52, 0xba, 0x64, 0x78, 0x8f, 0xa4, -+ 0xaf, 0x7a, 0x61, 0x8d, 0xbc, 0xc5, 0x73, 0xe9, -+ 0x6b, 0x58, 0x97, 0x4b, 0xbf, 0x63, 0x22, 0xd3, -+ 0x37, 0x02, 0x54, 0xc5, 0xb9, 0x16, 0x4a, 0xf0, -+ 0x19, 0xd8, 0x94, 0x57, 0xb8, 0x8a, 0xb3, 0x16, -+ 0x3b, 0xd0, 0x84, 0x8e, 0x67, 0xa6, 0xa3, 0x7d, -+ 0x78, 0xec, 0x00 -+}; -+static const u8 dec_assoc013[] __initconst = { -+ 0xb1, 0x69, 0x83, 0x87, 0x30, 0xaa, 0x5d, 0xb8, -+ 0x77, 0xe8, 0x21, 0xff, 0x06, 0x59, 0x35, 0xce, -+ 0x75, 0xfe, 0x38, 0xef, 0xb8, 0x91, 0x43, 0x8c, -+ 0xcf, 0x70, 0xdd, 0x0a, 0x68, 0xbf, 0xd4, 0xbc, -+ 0x16, 0x76, 0x99, 0x36, 0x1e, 0x58, 0x79, 0x5e, -+ 0xd4, 0x29, 0xf7, 0x33, 0x93, 0x48, 0xdb, 0x5f, -+ 0x01, 0xae, 0x9c, 0xb6, 0xe4, 0x88, 0x6d, 0x2b, -+ 0x76, 0x75, 0xe0, 0xf3, 0x74, 0xe2, 0xc9 -+}; -+static const u8 dec_nonce013[] __initconst = { -+ 0x05, 0xa3, 0x93, 0xed, 0x30, 0xc5, 0xa2, 0x06 -+}; -+static const u8 dec_key013[] __initconst = { -+ 0xb3, 0x35, 0x50, 0x03, 0x54, 0x2e, 0x40, 0x5e, -+ 0x8f, 0x59, 0x8e, 0xc5, 0x90, 0xd5, 0x27, 0x2d, -+ 0xba, 0x29, 0x2e, 0xcb, 0x1b, 0x70, 0x44, 0x1e, -+ 0x65, 0x91, 0x6e, 0x2a, 0x79, 0x22, 0xda, 0x64 -+}; -+ -+static const struct chacha20poly1305_testvec -+chacha20poly1305_dec_vectors[] __initconst = { -+ { dec_input001, dec_output001, dec_assoc001, dec_nonce001, dec_key001, -+ sizeof(dec_input001), sizeof(dec_assoc001), sizeof(dec_nonce001) }, -+ { dec_input002, dec_output002, dec_assoc002, dec_nonce002, dec_key002, -+ sizeof(dec_input002), sizeof(dec_assoc002), sizeof(dec_nonce002) }, -+ { dec_input003, dec_output003, dec_assoc003, dec_nonce003, dec_key003, -+ sizeof(dec_input003), sizeof(dec_assoc003), sizeof(dec_nonce003) }, -+ { dec_input004, dec_output004, dec_assoc004, dec_nonce004, dec_key004, -+ sizeof(dec_input004), sizeof(dec_assoc004), sizeof(dec_nonce004) }, -+ { dec_input005, dec_output005, dec_assoc005, dec_nonce005, dec_key005, -+ sizeof(dec_input005), sizeof(dec_assoc005), sizeof(dec_nonce005) }, -+ { dec_input006, dec_output006, dec_assoc006, dec_nonce006, dec_key006, -+ sizeof(dec_input006), sizeof(dec_assoc006), sizeof(dec_nonce006) }, -+ { dec_input007, dec_output007, dec_assoc007, dec_nonce007, dec_key007, -+ sizeof(dec_input007), sizeof(dec_assoc007), sizeof(dec_nonce007) }, -+ { dec_input008, dec_output008, dec_assoc008, dec_nonce008, dec_key008, -+ sizeof(dec_input008), sizeof(dec_assoc008), sizeof(dec_nonce008) }, -+ { dec_input009, dec_output009, dec_assoc009, dec_nonce009, dec_key009, -+ sizeof(dec_input009), sizeof(dec_assoc009), sizeof(dec_nonce009) }, -+ { dec_input010, dec_output010, dec_assoc010, dec_nonce010, dec_key010, -+ sizeof(dec_input010), sizeof(dec_assoc010), sizeof(dec_nonce010) }, -+ { dec_input011, dec_output011, dec_assoc011, dec_nonce011, dec_key011, -+ sizeof(dec_input011), sizeof(dec_assoc011), sizeof(dec_nonce011) }, -+ { dec_input012, dec_output012, dec_assoc012, dec_nonce012, dec_key012, -+ sizeof(dec_input012), sizeof(dec_assoc012), sizeof(dec_nonce012) }, -+ { dec_input013, dec_output013, dec_assoc013, dec_nonce013, dec_key013, -+ sizeof(dec_input013), sizeof(dec_assoc013), sizeof(dec_nonce013), -+ true } -+}; -+ -+static const u8 xenc_input001[] __initconst = { -+ 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, -+ 0x2d, 0x44, 0x72, 0x61, 0x66, 0x74, 0x73, 0x20, -+ 0x61, 0x72, 0x65, 0x20, 0x64, 0x72, 0x61, 0x66, -+ 0x74, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, -+ 0x6e, 0x74, 0x73, 0x20, 0x76, 0x61, 0x6c, 0x69, -+ 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, -+ 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x20, -+ 0x6f, 0x66, 0x20, 0x73, 0x69, 0x78, 0x20, 0x6d, -+ 0x6f, 0x6e, 0x74, 0x68, 0x73, 0x20, 0x61, 0x6e, -+ 0x64, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, -+ 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, -+ 0x2c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, -+ 0x65, 0x64, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x6f, -+ 0x62, 0x73, 0x6f, 0x6c, 0x65, 0x74, 0x65, 0x64, -+ 0x20, 0x62, 0x79, 0x20, 0x6f, 0x74, 0x68, 0x65, -+ 0x72, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, -+ 0x6e, 0x74, 0x73, 0x20, 0x61, 0x74, 0x20, 0x61, -+ 0x6e, 0x79, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x2e, -+ 0x20, 0x49, 0x74, 0x20, 0x69, 0x73, 0x20, 0x69, -+ 0x6e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, -+ 0x69, 0x61, 0x74, 0x65, 0x20, 0x74, 0x6f, 0x20, -+ 0x75, 0x73, 0x65, 0x20, 0x49, 0x6e, 0x74, 0x65, -+ 0x72, 0x6e, 0x65, 0x74, 0x2d, 0x44, 0x72, 0x61, -+ 0x66, 0x74, 0x73, 0x20, 0x61, 0x73, 0x20, 0x72, -+ 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, -+ 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, -+ 0x6c, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x6f, 0x20, -+ 0x63, 0x69, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, -+ 0x6d, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, -+ 0x74, 0x68, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x20, -+ 0x2f, 0xe2, 0x80, 0x9c, 0x77, 0x6f, 0x72, 0x6b, -+ 0x20, 0x69, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x67, -+ 0x72, 0x65, 0x73, 0x73, 0x2e, 0x2f, 0xe2, 0x80, -+ 0x9d -+}; -+static const u8 xenc_output001[] __initconst = { -+ 0x1a, 0x6e, 0x3a, 0xd9, 0xfd, 0x41, 0x3f, 0x77, -+ 0x54, 0x72, 0x0a, 0x70, 0x9a, 0xa0, 0x29, 0x92, -+ 0x2e, 0xed, 0x93, 0xcf, 0x0f, 0x71, 0x88, 0x18, -+ 0x7a, 0x9d, 0x2d, 0x24, 0xe0, 0xf5, 0xea, 0x3d, -+ 0x55, 0x64, 0xd7, 0xad, 0x2a, 0x1a, 0x1f, 0x7e, -+ 0x86, 0x6d, 0xb0, 0xce, 0x80, 0x41, 0x72, 0x86, -+ 0x26, 0xee, 0x84, 0xd7, 0xef, 0x82, 0x9e, 0xe2, -+ 0x60, 0x9d, 0x5a, 0xfc, 0xf0, 0x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3b, 0xbd, 0x92, 0x01, 0xdb, 0x71, 0x69, -+ 0xf3, 0x58, 0x99, 0xbc, 0xd1, 0xcb, 0x4a, 0x05, -+ 0xe2, 0x58, 0x9c, 0x25, 0x17, 0xcd, 0xdc, 0x83, -+ 0xb7, 0xff, 0xfb, 0x09, 0x61, 0xad, 0xbf, 0x13, -+ 0x5b, 0x5e, 0xed, 0x46, 0x82, 0x6f, 0x22, 0xd8, -+ 0x93, 0xa6, 0x85, 0x5b, 0x40, 0x39, 0x5c, 0xc5, -+ 0x9c -+}; -+static const u8 xenc_assoc001[] __initconst = { -+ 0xf3, 0x33, 0x88, 0x86, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x4e, 0x91 -+}; -+static const u8 xenc_nonce001[] __initconst = { -+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, -+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 -+}; -+static const u8 xenc_key001[] __initconst = { -+ 0x1c, 0x92, 0x40, 0xa5, 0xeb, 0x55, 0xd3, 0x8a, -+ 0xf3, 0x33, 0x88, 0x86, 0x04, 0xf6, 0xb5, 0xf0, -+ 0x47, 0x39, 0x17, 0xc1, 0x40, 0x2b, 0x80, 0x09, -+ 0x9d, 0xca, 0x5c, 0xbc, 0x20, 0x70, 0x75, 0xc0 -+}; -+ -+static const struct chacha20poly1305_testvec -+xchacha20poly1305_enc_vectors[] __initconst = { -+ { xenc_input001, xenc_output001, xenc_assoc001, xenc_nonce001, xenc_key001, -+ sizeof(xenc_input001), sizeof(xenc_assoc001), sizeof(xenc_nonce001) } -+}; -+ -+static const u8 xdec_input001[] __initconst = { -+ 0x1a, 0x6e, 0x3a, 0xd9, 0xfd, 0x41, 0x3f, 0x77, -+ 0x54, 0x72, 0x0a, 0x70, 0x9a, 0xa0, 0x29, 0x92, -+ 0x2e, 0xed, 0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-+ 0xd6, 0x6d, 0xa2, 0x8f, 0x97, 0x4c, 0xa8, 0x0b, -+ 0xcf, 0x8d, 0x43, 0x2b, 0x9c, 0x9b, 0xc5, 0x58, -+ 0xa5, 0xb6, 0x95, 0x9a, 0xbf, 0x81, 0xc6, 0x54, -+ 0xc9, 0x66, 0x0c, 0xe5, 0x4f, 0x6a, 0x53, 0xa1, -+ 0xe5, 0x0c, 0xba, 0x31, 0xde, 0x34, 0x64, 0x73, -+ 0x8a, 0x3b, 0xbd, 0x92, 0x01, 0xdb, 0x71, 0x69, -+ 0xf3, 0x58, 0x99, 0xbc, 0xd1, 0xcb, 0x4a, 0x05, -+ 0xe2, 0x58, 0x9c, 0x25, 0x17, 0xcd, 0xdc, 0x83, -+ 0xb7, 0xff, 0xfb, 0x09, 0x61, 0xad, 0xbf, 0x13, -+ 0x5b, 0x5e, 0xed, 0x46, 0x82, 0x6f, 0x22, 0xd8, -+ 0x93, 0xa6, 0x85, 0x5b, 0x40, 0x39, 0x5c, 0xc5, -+ 0x9c -+}; -+static const u8 xdec_output001[] __initconst = { -+ 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, -+ 0x2d, 0x44, 0x72, 0x61, 0x66, 0x74, 0x73, 0x20, -+ 0x61, 0x72, 0x65, 0x20, 0x64, 0x72, 0x61, 0x66, -+ 0x74, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, -+ 0x6e, 0x74, 0x73, 0x20, 0x76, 0x61, 0x6c, 0x69, -+ 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, -+ 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x20, -+ 0x6f, 0x66, 0x20, 0x73, 0x69, 0x78, 0x20, 0x6d, -+ 0x6f, 0x6e, 0x74, 0x68, 0x73, 0x20, 0x61, 0x6e, -+ 0x64, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, -+ 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, -+ 0x2c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, -+ 0x65, 0x64, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x6f, -+ 0x62, 0x73, 0x6f, 0x6c, 0x65, 0x74, 0x65, 0x64, -+ 0x20, 0x62, 0x79, 0x20, 0x6f, 0x74, 0x68, 0x65, -+ 0x72, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, -+ 0x6e, 0x74, 0x73, 0x20, 0x61, 0x74, 0x20, 0x61, -+ 0x6e, 0x79, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x2e, -+ 0x20, 0x49, 0x74, 0x20, 0x69, 0x73, 0x20, 0x69, -+ 0x6e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, -+ 0x69, 0x61, 0x74, 0x65, 0x20, 0x74, 0x6f, 0x20, -+ 0x75, 0x73, 0x65, 0x20, 0x49, 0x6e, 0x74, 0x65, -+ 0x72, 0x6e, 0x65, 0x74, 0x2d, 0x44, 0x72, 0x61, -+ 0x66, 0x74, 0x73, 0x20, 0x61, 0x73, 0x20, 0x72, -+ 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, -+ 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, -+ 0x6c, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x6f, 0x20, -+ 0x63, 0x69, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, -+ 0x6d, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, -+ 0x74, 0x68, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x20, -+ 0x2f, 0xe2, 0x80, 0x9c, 0x77, 0x6f, 0x72, 0x6b, -+ 0x20, 0x69, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x67, -+ 0x72, 0x65, 0x73, 0x73, 0x2e, 0x2f, 0xe2, 0x80, -+ 0x9d -+}; -+static const u8 xdec_assoc001[] __initconst = { -+ 0xf3, 0x33, 0x88, 0x86, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x4e, 0x91 -+}; -+static const u8 xdec_nonce001[] __initconst = { -+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, -+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 -+}; -+static const u8 xdec_key001[] __initconst = { -+ 0x1c, 0x92, 0x40, 0xa5, 0xeb, 0x55, 0xd3, 0x8a, -+ 0xf3, 0x33, 0x88, 0x86, 0x04, 0xf6, 0xb5, 0xf0, -+ 0x47, 0x39, 0x17, 0xc1, 0x40, 0x2b, 0x80, 0x09, -+ 0x9d, 0xca, 0x5c, 0xbc, 0x20, 0x70, 0x75, 0xc0 -+}; -+ -+static const struct chacha20poly1305_testvec -+xchacha20poly1305_dec_vectors[] __initconst = { -+ { xdec_input001, xdec_output001, xdec_assoc001, xdec_nonce001, xdec_key001, -+ sizeof(xdec_input001), sizeof(xdec_assoc001), sizeof(xdec_nonce001) } -+}; -+ -+static void __init -+chacha20poly1305_selftest_encrypt_bignonce(u8 *dst, const u8 *src, -+ const size_t src_len, const u8 *ad, -+ const size_t ad_len, -+ const u8 nonce[12], -+ const u8 key[CHACHA20POLY1305_KEY_SIZE]) -+{ -+ simd_context_t simd_context; -+ struct poly1305_ctx poly1305_state; -+ struct chacha20_ctx chacha20_state; -+ union { -+ u8 block0[POLY1305_KEY_SIZE]; -+ __le64 lens[2]; -+ } b = {{ 0 }}; -+ -+ simd_get(&simd_context); -+ chacha20_init(&chacha20_state, key, 0); -+ chacha20_state.counter[1] = get_unaligned_le32(nonce + 0); -+ chacha20_state.counter[2] = get_unaligned_le32(nonce + 4); -+ chacha20_state.counter[3] = get_unaligned_le32(nonce + 8); -+ chacha20(&chacha20_state, b.block0, b.block0, sizeof(b.block0), -+ &simd_context); -+ poly1305_init(&poly1305_state, b.block0); -+ poly1305_update(&poly1305_state, ad, ad_len, &simd_context); -+ poly1305_update(&poly1305_state, pad0, (0x10 - ad_len) & 0xf, -+ &simd_context); -+ chacha20(&chacha20_state, dst, src, src_len, &simd_context); -+ poly1305_update(&poly1305_state, dst, src_len, &simd_context); -+ poly1305_update(&poly1305_state, pad0, (0x10 - src_len) & 0xf, -+ &simd_context); -+ b.lens[0] = cpu_to_le64(ad_len); -+ b.lens[1] = cpu_to_le64(src_len); -+ poly1305_update(&poly1305_state, (u8 *)b.lens, sizeof(b.lens), -+ &simd_context); -+ poly1305_final(&poly1305_state, dst + src_len, &simd_context); -+ simd_put(&simd_context); -+ memzero_explicit(&chacha20_state, sizeof(chacha20_state)); -+ memzero_explicit(&b, sizeof(b)); -+} -+ -+static void __init -+chacha20poly1305_selftest_encrypt(u8 *dst, const u8 *src, const size_t src_len, -+ const u8 *ad, const size_t ad_len, -+ const u8 *nonce, const size_t nonce_len, -+ const u8 key[CHACHA20POLY1305_KEY_SIZE]) -+{ -+ if (nonce_len == 8) -+ chacha20poly1305_encrypt(dst, src, src_len, ad, ad_len, -+ get_unaligned_le64(nonce), key); -+ else if (nonce_len == 12) -+ chacha20poly1305_selftest_encrypt_bignonce(dst, src, src_len, -+ ad, ad_len, nonce, -+ key); -+ else -+ BUG(); -+} -+ -+static bool __init -+decryption_success(bool func_ret, bool expect_failure, int memcmp_result) -+{ -+ if (expect_failure) -+ return !func_ret; -+ return func_ret && !memcmp_result; -+} -+ -+static bool __init chacha20poly1305_selftest(void) -+{ -+ enum { MAXIMUM_TEST_BUFFER_LEN = 1UL << 12 }; -+ size_t i; -+ u8 *computed_output = NULL, *heap_src = NULL; -+ bool success = true, ret; -+ simd_context_t simd_context; -+ struct scatterlist sg_src, sg_dst; -+ -+ heap_src = kmalloc(MAXIMUM_TEST_BUFFER_LEN, GFP_KERNEL); -+ computed_output = kmalloc(MAXIMUM_TEST_BUFFER_LEN, GFP_KERNEL); -+ if (!heap_src || !computed_output) { -+ pr_err("chacha20poly1305 self-test malloc: FAIL\n"); -+ success = false; -+ goto out; -+ } -+ -+ for (i = 0; i < ARRAY_SIZE(chacha20poly1305_enc_vectors); ++i) { -+ memset(computed_output, 0, MAXIMUM_TEST_BUFFER_LEN); -+ chacha20poly1305_selftest_encrypt(computed_output, -+ chacha20poly1305_enc_vectors[i].input, -+ chacha20poly1305_enc_vectors[i].ilen, -+ chacha20poly1305_enc_vectors[i].assoc, -+ chacha20poly1305_enc_vectors[i].alen, -+ chacha20poly1305_enc_vectors[i].nonce, -+ chacha20poly1305_enc_vectors[i].nlen, -+ chacha20poly1305_enc_vectors[i].key); -+ if (memcmp(computed_output, -+ chacha20poly1305_enc_vectors[i].output, -+ chacha20poly1305_enc_vectors[i].ilen + -+ POLY1305_MAC_SIZE)) { -+ pr_err("chacha20poly1305 encryption self-test %zu: FAIL\n", -+ i + 1); -+ success = false; -+ } -+ } -+ simd_get(&simd_context); -+ for (i = 0; i < ARRAY_SIZE(chacha20poly1305_enc_vectors); ++i) { -+ if (chacha20poly1305_enc_vectors[i].nlen != 8) -+ continue; -+ memset(computed_output, 0, MAXIMUM_TEST_BUFFER_LEN); -+ memcpy(heap_src, chacha20poly1305_enc_vectors[i].input, -+ chacha20poly1305_enc_vectors[i].ilen); -+ sg_init_one(&sg_src, heap_src, -+ chacha20poly1305_enc_vectors[i].ilen); -+ sg_init_one(&sg_dst, computed_output, -+ chacha20poly1305_enc_vectors[i].ilen + -+ POLY1305_MAC_SIZE); -+ ret = chacha20poly1305_encrypt_sg(&sg_dst, &sg_src, -+ chacha20poly1305_enc_vectors[i].ilen, -+ chacha20poly1305_enc_vectors[i].assoc, -+ chacha20poly1305_enc_vectors[i].alen, -+ get_unaligned_le64(chacha20poly1305_enc_vectors[i].nonce), -+ chacha20poly1305_enc_vectors[i].key, -+ &simd_context); -+ if (!ret || memcmp(computed_output, -+ chacha20poly1305_enc_vectors[i].output, -+ chacha20poly1305_enc_vectors[i].ilen + -+ POLY1305_MAC_SIZE)) { -+ pr_err("chacha20poly1305 sg encryption self-test %zu: FAIL\n", -+ i + 1); -+ success = false; -+ } -+ } -+ simd_put(&simd_context); -+ for (i = 0; i < ARRAY_SIZE(chacha20poly1305_dec_vectors); ++i) { -+ memset(computed_output, 0, MAXIMUM_TEST_BUFFER_LEN); -+ ret = chacha20poly1305_decrypt(computed_output, -+ chacha20poly1305_dec_vectors[i].input, -+ chacha20poly1305_dec_vectors[i].ilen, -+ chacha20poly1305_dec_vectors[i].assoc, -+ chacha20poly1305_dec_vectors[i].alen, -+ get_unaligned_le64(chacha20poly1305_dec_vectors[i].nonce), -+ chacha20poly1305_dec_vectors[i].key); -+ if (!decryption_success(ret, -+ chacha20poly1305_dec_vectors[i].failure, -+ memcmp(computed_output, -+ chacha20poly1305_dec_vectors[i].output, -+ chacha20poly1305_dec_vectors[i].ilen - -+ POLY1305_MAC_SIZE))) { -+ pr_err("chacha20poly1305 decryption self-test %zu: FAIL\n", -+ i + 1); -+ success = false; -+ } -+ } -+ simd_get(&simd_context); -+ for (i = 0; i < ARRAY_SIZE(chacha20poly1305_dec_vectors); ++i) { -+ memset(computed_output, 0, MAXIMUM_TEST_BUFFER_LEN); -+ memcpy(heap_src, chacha20poly1305_dec_vectors[i].input, -+ chacha20poly1305_dec_vectors[i].ilen); -+ sg_init_one(&sg_src, heap_src, -+ chacha20poly1305_dec_vectors[i].ilen); -+ sg_init_one(&sg_dst, computed_output, -+ chacha20poly1305_dec_vectors[i].ilen - -+ POLY1305_MAC_SIZE); -+ ret = chacha20poly1305_decrypt_sg(&sg_dst, &sg_src, -+ chacha20poly1305_dec_vectors[i].ilen, -+ chacha20poly1305_dec_vectors[i].assoc, -+ chacha20poly1305_dec_vectors[i].alen, -+ get_unaligned_le64(chacha20poly1305_dec_vectors[i].nonce), -+ chacha20poly1305_dec_vectors[i].key, &simd_context); -+ if (!decryption_success(ret, -+ chacha20poly1305_dec_vectors[i].failure, -+ memcmp(computed_output, chacha20poly1305_dec_vectors[i].output, -+ chacha20poly1305_dec_vectors[i].ilen - -+ POLY1305_MAC_SIZE))) { -+ pr_err("chacha20poly1305 sg decryption self-test %zu: FAIL\n", -+ i + 1); -+ success = false; -+ } -+ } -+ simd_put(&simd_context); -+ for (i = 0; i < ARRAY_SIZE(xchacha20poly1305_enc_vectors); ++i) { -+ memset(computed_output, 0, MAXIMUM_TEST_BUFFER_LEN); -+ xchacha20poly1305_encrypt(computed_output, -+ xchacha20poly1305_enc_vectors[i].input, -+ xchacha20poly1305_enc_vectors[i].ilen, -+ xchacha20poly1305_enc_vectors[i].assoc, -+ xchacha20poly1305_enc_vectors[i].alen, -+ xchacha20poly1305_enc_vectors[i].nonce, -+ xchacha20poly1305_enc_vectors[i].key); -+ if (memcmp(computed_output, -+ xchacha20poly1305_enc_vectors[i].output, -+ xchacha20poly1305_enc_vectors[i].ilen + -+ POLY1305_MAC_SIZE)) { -+ pr_err("xchacha20poly1305 encryption self-test %zu: FAIL\n", -+ i + 1); -+ success = false; -+ } -+ } -+ for (i = 0; i < ARRAY_SIZE(xchacha20poly1305_dec_vectors); ++i) { -+ memset(computed_output, 0, MAXIMUM_TEST_BUFFER_LEN); -+ ret = xchacha20poly1305_decrypt(computed_output, -+ xchacha20poly1305_dec_vectors[i].input, -+ xchacha20poly1305_dec_vectors[i].ilen, -+ xchacha20poly1305_dec_vectors[i].assoc, -+ xchacha20poly1305_dec_vectors[i].alen, -+ xchacha20poly1305_dec_vectors[i].nonce, -+ xchacha20poly1305_dec_vectors[i].key); -+ if (!decryption_success(ret, -+ xchacha20poly1305_dec_vectors[i].failure, -+ memcmp(computed_output, -+ xchacha20poly1305_dec_vectors[i].output, -+ xchacha20poly1305_dec_vectors[i].ilen - -+ POLY1305_MAC_SIZE))) { -+ pr_err("xchacha20poly1305 decryption self-test %zu: FAIL\n", -+ i + 1); -+ success = false; -+ } -+ } -+ -+out: -+ kfree(heap_src); -+ kfree(computed_output); -+ return success; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/selftest/curve25519.c 2019-08-20 20:26:42.406341426 +0000 -@@ -0,0 +1,1315 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+struct curve25519_test_vector { -+ u8 private[CURVE25519_KEY_SIZE]; -+ u8 public[CURVE25519_KEY_SIZE]; -+ u8 result[CURVE25519_KEY_SIZE]; -+ bool valid; -+}; -+static const struct curve25519_test_vector curve25519_test_vectors[] __initconst = { -+ { -+ .private = { 0x77, 0x07, 0x6d, 0x0a, 0x73, 0x18, 0xa5, 0x7d, -+ 0x3c, 0x16, 0xc1, 0x72, 0x51, 0xb2, 0x66, 0x45, -+ 0xdf, 0x4c, 0x2f, 0x87, 0xeb, 0xc0, 0x99, 0x2a, -+ 0xb1, 0x77, 0xfb, 0xa5, 0x1d, 0xb9, 0x2c, 0x2a }, -+ .public = { 0xde, 0x9e, 0xdb, 0x7d, 0x7b, 0x7d, 0xc1, 0xb4, -+ 0xd3, 0x5b, 0x61, 0xc2, 0xec, 0xe4, 0x35, 0x37, -+ 0x3f, 0x83, 0x43, 0xc8, 0x5b, 0x78, 0x67, 0x4d, -+ 0xad, 0xfc, 0x7e, 0x14, 0x6f, 0x88, 0x2b, 0x4f }, -+ .result = { 0x4a, 0x5d, 0x9d, 0x5b, 0xa4, 0xce, 0x2d, 0xe1, -+ 0x72, 0x8e, 0x3b, 0xf4, 0x80, 0x35, 0x0f, 0x25, -+ 0xe0, 0x7e, 0x21, 0xc9, 0x47, 0xd1, 0x9e, 0x33, -+ 0x76, 0xf0, 0x9b, 0x3c, 0x1e, 0x16, 0x17, 0x42 }, -+ .valid = true -+ }, -+ { -+ .private = { 0x5d, 0xab, 0x08, 0x7e, 0x62, 0x4a, 0x8a, 0x4b, -+ 0x79, 0xe1, 0x7f, 0x8b, 0x83, 0x80, 0x0e, 0xe6, -+ 0x6f, 0x3b, 0xb1, 0x29, 0x26, 0x18, 0xb6, 0xfd, -+ 0x1c, 0x2f, 0x8b, 0x27, 0xff, 0x88, 0xe0, 0xeb }, -+ .public = { 0x85, 0x20, 0xf0, 0x09, 0x89, 0x30, 0xa7, 0x54, -+ 0x74, 0x8b, 0x7d, 0xdc, 0xb4, 0x3e, 0xf7, 0x5a, -+ 0x0d, 0xbf, 0x3a, 0x0d, 0x26, 0x38, 0x1a, 0xf4, -+ 0xeb, 0xa4, 0xa9, 0x8e, 0xaa, 0x9b, 0x4e, 0x6a }, -+ .result = { 0x4a, 0x5d, 0x9d, 0x5b, 0xa4, 0xce, 0x2d, 0xe1, -+ 0x72, 0x8e, 0x3b, 0xf4, 0x80, 0x35, 0x0f, 0x25, -+ 0xe0, 0x7e, 0x21, 0xc9, 0x47, 0xd1, 0x9e, 0x33, -+ 0x76, 0xf0, 0x9b, 0x3c, 0x1e, 0x16, 0x17, 0x42 }, -+ .valid = true -+ }, -+ { -+ .private = { 1 }, -+ .public = { 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .result = { 0x3c, 0x77, 0x77, 0xca, 0xf9, 0x97, 0xb2, 0x64, -+ 0x41, 0x60, 0x77, 0x66, 0x5b, 0x4e, 0x22, 0x9d, -+ 0x0b, 0x95, 0x48, 0xdc, 0x0c, 0xd8, 0x19, 0x98, -+ 0xdd, 0xcd, 0xc5, 0xc8, 0x53, 0x3c, 0x79, 0x7f }, -+ .valid = true -+ }, -+ { -+ .private = { 1 }, -+ .public = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, -+ .result = { 0xb3, 0x2d, 0x13, 0x62, 0xc2, 0x48, 0xd6, 0x2f, -+ 0xe6, 0x26, 0x19, 0xcf, 0xf0, 0x4d, 0xd4, 0x3d, -+ 0xb7, 0x3f, 0xfc, 0x1b, 0x63, 0x08, 0xed, 0xe3, -+ 0x0b, 0x78, 0xd8, 0x73, 0x80, 0xf1, 0xe8, 0x34 }, -+ .valid = true -+ }, -+ { -+ .private = { 0xa5, 0x46, 0xe3, 0x6b, 0xf0, 0x52, 0x7c, 0x9d, -+ 0x3b, 0x16, 0x15, 0x4b, 0x82, 0x46, 0x5e, 0xdd, -+ 0x62, 0x14, 0x4c, 0x0a, 0xc1, 0xfc, 0x5a, 0x18, -+ 0x50, 0x6a, 0x22, 0x44, 0xba, 0x44, 0x9a, 0xc4 }, -+ .public = { 0xe6, 0xdb, 0x68, 0x67, 0x58, 0x30, 0x30, 0xdb, -+ 0x35, 0x94, 0xc1, 0xa4, 0x24, 0xb1, 0x5f, 0x7c, -+ 0x72, 0x66, 0x24, 0xec, 0x26, 0xb3, 0x35, 0x3b, -+ 0x10, 0xa9, 0x03, 0xa6, 0xd0, 0xab, 0x1c, 0x4c }, -+ .result = { 0xc3, 0xda, 0x55, 0x37, 0x9d, 0xe9, 0xc6, 0x90, -+ 0x8e, 0x94, 0xea, 0x4d, 0xf2, 0x8d, 0x08, 0x4f, -+ 0x32, 0xec, 0xcf, 0x03, 0x49, 0x1c, 0x71, 0xf7, -+ 0x54, 0xb4, 0x07, 0x55, 0x77, 0xa2, 0x85, 0x52 }, -+ .valid = true -+ }, -+ { -+ .private = { 1, 2, 3, 4 }, -+ .public = { 0 }, -+ .result = { 0 }, -+ .valid = false -+ }, -+ { -+ .private = { 2, 4, 6, 8 }, -+ .public = { 0xe0, 0xeb, 0x7a, 0x7c, 0x3b, 0x41, 0xb8, 0xae, -+ 0x16, 0x56, 0xe3, 0xfa, 0xf1, 0x9f, 0xc4, 0x6a, -+ 0xda, 0x09, 0x8d, 0xeb, 0x9c, 0x32, 0xb1, 0xfd, -+ 0x86, 0x62, 0x05, 0x16, 0x5f, 0x49, 0xb8 }, -+ .result = { 0 }, -+ .valid = false -+ }, -+ { -+ .private = { 0xff, 0xff, 0xff, 0xff, 0x0a, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, -+ .public = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0x0a, 0x00, 0xfb, 0x9f }, -+ .result = { 0x77, 0x52, 0xb6, 0x18, 0xc1, 0x2d, 0x48, 0xd2, -+ 0xc6, 0x93, 0x46, 0x83, 0x81, 0x7c, 0xc6, 0x57, -+ 0xf3, 0x31, 0x03, 0x19, 0x49, 0x48, 0x20, 0x05, -+ 0x42, 0x2b, 0x4e, 0xae, 0x8d, 0x1d, 0x43, 0x23 }, -+ .valid = true -+ }, -+ { -+ .private = { 0x8e, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .public = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8e, 0x06 }, -+ .result = { 0x5a, 0xdf, 0xaa, 0x25, 0x86, 0x8e, 0x32, 0x3d, -+ 0xae, 0x49, 0x62, 0xc1, 0x01, 0x5c, 0xb3, 0x12, -+ 0xe1, 0xc5, 0xc7, 0x9e, 0x95, 0x3f, 0x03, 0x99, -+ 0xb0, 0xba, 0x16, 0x22, 0xf3, 0xb6, 0xf7, 0x0c }, -+ .valid = true -+ }, -+ /* wycheproof - normal case */ -+ { -+ .private = { 0x48, 0x52, 0x83, 0x4d, 0x9d, 0x6b, 0x77, 0xda, -+ 0xde, 0xab, 0xaa, 0xf2, 0xe1, 0x1d, 0xca, 0x66, -+ 0xd1, 0x9f, 0xe7, 0x49, 0x93, 0xa7, 0xbe, 0xc3, -+ 0x6c, 0x6e, 0x16, 0xa0, 0x98, 0x3f, 0xea, 0xba }, -+ .public = { 0x9c, 0x64, 0x7d, 0x9a, 0xe5, 0x89, 0xb9, 0xf5, -+ 0x8f, 0xdc, 0x3c, 0xa4, 0x94, 0x7e, 0xfb, 0xc9, -+ 0x15, 0xc4, 0xb2, 0xe0, 0x8e, 0x74, 0x4a, 0x0e, -+ 0xdf, 0x46, 0x9d, 0xac, 0x59, 0xc8, 0xf8, 0x5a }, -+ .result = { 0x87, 0xb7, 0xf2, 0x12, 0xb6, 0x27, 0xf7, 0xa5, -+ 0x4c, 0xa5, 0xe0, 0xbc, 0xda, 0xdd, 0xd5, 0x38, -+ 0x9d, 0x9d, 0xe6, 0x15, 0x6c, 0xdb, 0xcf, 0x8e, -+ 0xbe, 0x14, 0xff, 0xbc, 0xfb, 0x43, 0x65, 0x51 }, -+ .valid = true -+ }, -+ /* wycheproof - public key on twist */ -+ { -+ .private = { 0x58, 0x8c, 0x06, 0x1a, 0x50, 0x80, 0x4a, 0xc4, -+ 0x88, 0xad, 0x77, 0x4a, 0xc7, 0x16, 0xc3, 0xf5, -+ 0xba, 0x71, 0x4b, 0x27, 0x12, 0xe0, 0x48, 0x49, -+ 0x13, 0x79, 0xa5, 0x00, 0x21, 0x19, 0x98, 0xa8 }, -+ .public = { 0x63, 0xaa, 0x40, 0xc6, 0xe3, 0x83, 0x46, 0xc5, -+ 0xca, 0xf2, 0x3a, 0x6d, 0xf0, 0xa5, 0xe6, 0xc8, -+ 0x08, 0x89, 0xa0, 0x86, 0x47, 0xe5, 0x51, 0xb3, -+ 0x56, 0x34, 0x49, 0xbe, 0xfc, 0xfc, 0x97, 0x33 }, -+ .result = { 0xb1, 0xa7, 0x07, 0x51, 0x94, 0x95, 0xff, 0xff, -+ 0xb2, 0x98, 0xff, 0x94, 0x17, 0x16, 0xb0, 0x6d, -+ 0xfa, 0xb8, 0x7c, 0xf8, 0xd9, 0x11, 0x23, 0xfe, -+ 0x2b, 0xe9, 0xa2, 0x33, 0xdd, 0xa2, 0x22, 0x12 }, -+ .valid = true -+ }, -+ /* wycheproof - public key on twist */ -+ { -+ .private = { 0xb0, 0x5b, 0xfd, 0x32, 0xe5, 0x53, 0x25, 0xd9, -+ 0xfd, 0x64, 0x8c, 0xb3, 0x02, 0x84, 0x80, 0x39, -+ 0x00, 0x0b, 0x39, 0x0e, 0x44, 0xd5, 0x21, 0xe5, -+ 0x8a, 0xab, 0x3b, 0x29, 0xa6, 0x96, 0x0b, 0xa8 }, -+ .public = { 0x0f, 0x83, 0xc3, 0x6f, 0xde, 0xd9, 0xd3, 0x2f, -+ 0xad, 0xf4, 0xef, 0xa3, 0xae, 0x93, 0xa9, 0x0b, -+ 0xb5, 0xcf, 0xa6, 0x68, 0x93, 0xbc, 0x41, 0x2c, -+ 0x43, 0xfa, 0x72, 0x87, 0xdb, 0xb9, 0x97, 0x79 }, -+ .result = { 0x67, 0xdd, 0x4a, 0x6e, 0x16, 0x55, 0x33, 0x53, -+ 0x4c, 0x0e, 0x3f, 0x17, 0x2e, 0x4a, 0xb8, 0x57, -+ 0x6b, 0xca, 0x92, 0x3a, 0x5f, 0x07, 0xb2, 0xc0, -+ 0x69, 0xb4, 0xc3, 0x10, 0xff, 0x2e, 0x93, 0x5b }, -+ .valid = true -+ }, -+ /* wycheproof - public key on twist */ -+ { -+ .private = { 0x70, 0xe3, 0x4b, 0xcb, 0xe1, 0xf4, 0x7f, 0xbc, -+ 0x0f, 0xdd, 0xfd, 0x7c, 0x1e, 0x1a, 0xa5, 0x3d, -+ 0x57, 0xbf, 0xe0, 0xf6, 0x6d, 0x24, 0x30, 0x67, -+ 0xb4, 0x24, 0xbb, 0x62, 0x10, 0xbe, 0xd1, 0x9c }, -+ .public = { 0x0b, 0x82, 0x11, 0xa2, 0xb6, 0x04, 0x90, 0x97, -+ 0xf6, 0x87, 0x1c, 0x6c, 0x05, 0x2d, 0x3c, 0x5f, -+ 0xc1, 0xba, 0x17, 0xda, 0x9e, 0x32, 0xae, 0x45, -+ 0x84, 0x03, 0xb0, 0x5b, 0xb2, 0x83, 0x09, 0x2a }, -+ .result = { 0x4a, 0x06, 0x38, 0xcf, 0xaa, 0x9e, 0xf1, 0x93, -+ 0x3b, 0x47, 0xf8, 0x93, 0x92, 0x96, 0xa6, 0xb2, -+ 0x5b, 0xe5, 0x41, 0xef, 0x7f, 0x70, 0xe8, 0x44, -+ 0xc0, 0xbc, 0xc0, 0x0b, 0x13, 0x4d, 0xe6, 0x4a }, -+ .valid = true -+ }, -+ /* wycheproof - public key on twist */ -+ { -+ .private = { 0x68, 0xc1, 0xf3, 0xa6, 0x53, 0xa4, 0xcd, 0xb1, -+ 0xd3, 0x7b, 0xba, 0x94, 0x73, 0x8f, 0x8b, 0x95, -+ 0x7a, 0x57, 0xbe, 0xb2, 0x4d, 0x64, 0x6e, 0x99, -+ 0x4d, 0xc2, 0x9a, 0x27, 0x6a, 0xad, 0x45, 0x8d }, -+ .public = { 0x34, 0x3a, 0xc2, 0x0a, 0x3b, 0x9c, 0x6a, 0x27, -+ 0xb1, 0x00, 0x81, 0x76, 0x50, 0x9a, 0xd3, 0x07, -+ 0x35, 0x85, 0x6e, 0xc1, 0xc8, 0xd8, 0xfc, 0xae, -+ 0x13, 0x91, 0x2d, 0x08, 0xd1, 0x52, 0xf4, 0x6c }, -+ .result = { 0x39, 0x94, 0x91, 0xfc, 0xe8, 0xdf, 0xab, 0x73, -+ 0xb4, 0xf9, 0xf6, 0x11, 0xde, 0x8e, 0xa0, 0xb2, -+ 0x7b, 0x28, 0xf8, 0x59, 0x94, 0x25, 0x0b, 0x0f, -+ 0x47, 0x5d, 0x58, 0x5d, 0x04, 0x2a, 0xc2, 0x07 }, -+ .valid = true -+ }, -+ /* wycheproof - public key on twist */ -+ { -+ .private = { 0xd8, 0x77, 0xb2, 0x6d, 0x06, 0xdf, 0xf9, 0xd9, -+ 0xf7, 0xfd, 0x4c, 0x5b, 0x37, 0x69, 0xf8, 0xcd, -+ 0xd5, 0xb3, 0x05, 0x16, 0xa5, 0xab, 0x80, 0x6b, -+ 0xe3, 0x24, 0xff, 0x3e, 0xb6, 0x9e, 0xa0, 0xb2 }, -+ .public = { 0xfa, 0x69, 0x5f, 0xc7, 0xbe, 0x8d, 0x1b, 0xe5, -+ 0xbf, 0x70, 0x48, 0x98, 0xf3, 0x88, 0xc4, 0x52, -+ 0xba, 0xfd, 0xd3, 0xb8, 0xea, 0xe8, 0x05, 0xf8, -+ 0x68, 0x1a, 0x8d, 0x15, 0xc2, 0xd4, 0xe1, 0x42 }, -+ .result = { 0x2c, 0x4f, 0xe1, 0x1d, 0x49, 0x0a, 0x53, 0x86, -+ 0x17, 0x76, 0xb1, 0x3b, 0x43, 0x54, 0xab, 0xd4, -+ 0xcf, 0x5a, 0x97, 0x69, 0x9d, 0xb6, 0xe6, 0xc6, -+ 0x8c, 0x16, 0x26, 0xd0, 0x76, 0x62, 0xf7, 0x58 }, -+ .valid = true -+ }, -+ /* wycheproof - public key = 0 */ -+ { -+ .private = { 0x20, 0x74, 0x94, 0x03, 0x8f, 0x2b, 0xb8, 0x11, -+ 0xd4, 0x78, 0x05, 0xbc, 0xdf, 0x04, 0xa2, 0xac, -+ 0x58, 0x5a, 0xda, 0x7f, 0x2f, 0x23, 0x38, 0x9b, -+ 0xfd, 0x46, 0x58, 0xf9, 0xdd, 0xd4, 0xde, 0xbc }, -+ .public = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = false -+ }, -+ /* wycheproof - public key = 1 */ -+ { -+ .private = { 0x20, 0x2e, 0x89, 0x72, 0xb6, 0x1c, 0x7e, 0x61, -+ 0x93, 0x0e, 0xb9, 0x45, 0x0b, 0x50, 0x70, 0xea, -+ 0xe1, 0xc6, 0x70, 0x47, 0x56, 0x85, 0x54, 0x1f, -+ 0x04, 0x76, 0x21, 0x7e, 0x48, 0x18, 0xcf, 0xab }, -+ .public = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = false -+ }, -+ /* wycheproof - edge case on twist */ -+ { -+ .private = { 0x38, 0xdd, 0xe9, 0xf3, 0xe7, 0xb7, 0x99, 0x04, -+ 0x5f, 0x9a, 0xc3, 0x79, 0x3d, 0x4a, 0x92, 0x77, -+ 0xda, 0xde, 0xad, 0xc4, 0x1b, 0xec, 0x02, 0x90, -+ 0xf8, 0x1f, 0x74, 0x4f, 0x73, 0x77, 0x5f, 0x84 }, -+ .public = { 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .result = { 0x9a, 0x2c, 0xfe, 0x84, 0xff, 0x9c, 0x4a, 0x97, -+ 0x39, 0x62, 0x5c, 0xae, 0x4a, 0x3b, 0x82, 0xa9, -+ 0x06, 0x87, 0x7a, 0x44, 0x19, 0x46, 0xf8, 0xd7, -+ 0xb3, 0xd7, 0x95, 0xfe, 0x8f, 0x5d, 0x16, 0x39 }, -+ .valid = true -+ }, -+ /* wycheproof - edge case on twist */ -+ { -+ .private = { 0x98, 0x57, 0xa9, 0x14, 0xe3, 0xc2, 0x90, 0x36, -+ 0xfd, 0x9a, 0x44, 0x2b, 0xa5, 0x26, 0xb5, 0xcd, -+ 0xcd, 0xf2, 0x82, 0x16, 0x15, 0x3e, 0x63, 0x6c, -+ 0x10, 0x67, 0x7a, 0xca, 0xb6, 0xbd, 0x6a, 0xa5 }, -+ .public = { 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .result = { 0x4d, 0xa4, 0xe0, 0xaa, 0x07, 0x2c, 0x23, 0x2e, -+ 0xe2, 0xf0, 0xfa, 0x4e, 0x51, 0x9a, 0xe5, 0x0b, -+ 0x52, 0xc1, 0xed, 0xd0, 0x8a, 0x53, 0x4d, 0x4e, -+ 0xf3, 0x46, 0xc2, 0xe1, 0x06, 0xd2, 0x1d, 0x60 }, -+ .valid = true -+ }, -+ /* wycheproof - edge case on twist */ -+ { -+ .private = { 0x48, 0xe2, 0x13, 0x0d, 0x72, 0x33, 0x05, 0xed, -+ 0x05, 0xe6, 0xe5, 0x89, 0x4d, 0x39, 0x8a, 0x5e, -+ 0x33, 0x36, 0x7a, 0x8c, 0x6a, 0xac, 0x8f, 0xcd, -+ 0xf0, 0xa8, 0x8e, 0x4b, 0x42, 0x82, 0x0d, 0xb7 }, -+ .public = { 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xf8, 0xff, -+ 0xff, 0x1f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, -+ 0x00, 0xf0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00 }, -+ .result = { 0x9e, 0xd1, 0x0c, 0x53, 0x74, 0x7f, 0x64, 0x7f, -+ 0x82, 0xf4, 0x51, 0x25, 0xd3, 0xde, 0x15, 0xa1, -+ 0xe6, 0xb8, 0x24, 0x49, 0x6a, 0xb4, 0x04, 0x10, -+ 0xff, 0xcc, 0x3c, 0xfe, 0x95, 0x76, 0x0f, 0x3b }, -+ .valid = true -+ }, -+ /* wycheproof - edge case on twist */ -+ { -+ .private = { 0x28, 0xf4, 0x10, 0x11, 0x69, 0x18, 0x51, 0xb3, -+ 0xa6, 0x2b, 0x64, 0x15, 0x53, 0xb3, 0x0d, 0x0d, -+ 0xfd, 0xdc, 0xb8, 0xff, 0xfc, 0xf5, 0x37, 0x00, -+ 0xa7, 0xbe, 0x2f, 0x6a, 0x87, 0x2e, 0x9f, 0xb0 }, -+ .public = { 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x07, 0x00, -+ 0x00, 0xe0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0xf8, 0xff, -+ 0xff, 0x0f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x7f }, -+ .result = { 0xcf, 0x72, 0xb4, 0xaa, 0x6a, 0xa1, 0xc9, 0xf8, -+ 0x94, 0xf4, 0x16, 0x5b, 0x86, 0x10, 0x9a, 0xa4, -+ 0x68, 0x51, 0x76, 0x48, 0xe1, 0xf0, 0xcc, 0x70, -+ 0xe1, 0xab, 0x08, 0x46, 0x01, 0x76, 0x50, 0x6b }, -+ .valid = true -+ }, -+ /* wycheproof - edge case on twist */ -+ { -+ .private = { 0x18, 0xa9, 0x3b, 0x64, 0x99, 0xb9, 0xf6, 0xb3, -+ 0x22, 0x5c, 0xa0, 0x2f, 0xef, 0x41, 0x0e, 0x0a, -+ 0xde, 0xc2, 0x35, 0x32, 0x32, 0x1d, 0x2d, 0x8e, -+ 0xf1, 0xa6, 0xd6, 0x02, 0xa8, 0xc6, 0x5b, 0x83 }, -+ .public = { 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, -+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x7f }, -+ .result = { 0x5d, 0x50, 0xb6, 0x28, 0x36, 0xbb, 0x69, 0x57, -+ 0x94, 0x10, 0x38, 0x6c, 0xf7, 0xbb, 0x81, 0x1c, -+ 0x14, 0xbf, 0x85, 0xb1, 0xc7, 0xb1, 0x7e, 0x59, -+ 0x24, 0xc7, 0xff, 0xea, 0x91, 0xef, 0x9e, 0x12 }, -+ .valid = true -+ }, -+ /* wycheproof - edge case on twist */ -+ { -+ .private = { 0xc0, 0x1d, 0x13, 0x05, 0xa1, 0x33, 0x8a, 0x1f, -+ 0xca, 0xc2, 0xba, 0x7e, 0x2e, 0x03, 0x2b, 0x42, -+ 0x7e, 0x0b, 0x04, 0x90, 0x31, 0x65, 0xac, 0xa9, -+ 0x57, 0xd8, 0xd0, 0x55, 0x3d, 0x87, 0x17, 0xb0 }, -+ .public = { 0xea, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f }, -+ .result = { 0x19, 0x23, 0x0e, 0xb1, 0x48, 0xd5, 0xd6, 0x7c, -+ 0x3c, 0x22, 0xab, 0x1d, 0xae, 0xff, 0x80, 0xa5, -+ 0x7e, 0xae, 0x42, 0x65, 0xce, 0x28, 0x72, 0x65, -+ 0x7b, 0x2c, 0x80, 0x99, 0xfc, 0x69, 0x8e, 0x50 }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for public key */ -+ { -+ .private = { 0x38, 0x6f, 0x7f, 0x16, 0xc5, 0x07, 0x31, 0xd6, -+ 0x4f, 0x82, 0xe6, 0xa1, 0x70, 0xb1, 0x42, 0xa4, -+ 0xe3, 0x4f, 0x31, 0xfd, 0x77, 0x68, 0xfc, 0xb8, -+ 0x90, 0x29, 0x25, 0xe7, 0xd1, 0xe2, 0x1a, 0xbe }, -+ .public = { 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .result = { 0x0f, 0xca, 0xb5, 0xd8, 0x42, 0xa0, 0x78, 0xd7, -+ 0xa7, 0x1f, 0xc5, 0x9b, 0x57, 0xbf, 0xb4, 0xca, -+ 0x0b, 0xe6, 0x87, 0x3b, 0x49, 0xdc, 0xdb, 0x9f, -+ 0x44, 0xe1, 0x4a, 0xe8, 0xfb, 0xdf, 0xa5, 0x42 }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for public key */ -+ { -+ .private = { 0xe0, 0x23, 0xa2, 0x89, 0xbd, 0x5e, 0x90, 0xfa, -+ 0x28, 0x04, 0xdd, 0xc0, 0x19, 0xa0, 0x5e, 0xf3, -+ 0xe7, 0x9d, 0x43, 0x4b, 0xb6, 0xea, 0x2f, 0x52, -+ 0x2e, 0xcb, 0x64, 0x3a, 0x75, 0x29, 0x6e, 0x95 }, -+ .public = { 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }, -+ .result = { 0x54, 0xce, 0x8f, 0x22, 0x75, 0xc0, 0x77, 0xe3, -+ 0xb1, 0x30, 0x6a, 0x39, 0x39, 0xc5, 0xe0, 0x3e, -+ 0xef, 0x6b, 0xbb, 0x88, 0x06, 0x05, 0x44, 0x75, -+ 0x8d, 0x9f, 0xef, 0x59, 0xb0, 0xbc, 0x3e, 0x4f }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for public key */ -+ { -+ .private = { 0x68, 0xf0, 0x10, 0xd6, 0x2e, 0xe8, 0xd9, 0x26, -+ 0x05, 0x3a, 0x36, 0x1c, 0x3a, 0x75, 0xc6, 0xea, -+ 0x4e, 0xbd, 0xc8, 0x60, 0x6a, 0xb2, 0x85, 0x00, -+ 0x3a, 0x6f, 0x8f, 0x40, 0x76, 0xb0, 0x1e, 0x83 }, -+ .public = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03 }, -+ .result = { 0xf1, 0x36, 0x77, 0x5c, 0x5b, 0xeb, 0x0a, 0xf8, -+ 0x11, 0x0a, 0xf1, 0x0b, 0x20, 0x37, 0x23, 0x32, -+ 0x04, 0x3c, 0xab, 0x75, 0x24, 0x19, 0x67, 0x87, -+ 0x75, 0xa2, 0x23, 0xdf, 0x57, 0xc9, 0xd3, 0x0d }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for public key */ -+ { -+ .private = { 0x58, 0xeb, 0xcb, 0x35, 0xb0, 0xf8, 0x84, 0x5c, -+ 0xaf, 0x1e, 0xc6, 0x30, 0xf9, 0x65, 0x76, 0xb6, -+ 0x2c, 0x4b, 0x7b, 0x6c, 0x36, 0xb2, 0x9d, 0xeb, -+ 0x2c, 0xb0, 0x08, 0x46, 0x51, 0x75, 0x5c, 0x96 }, -+ .public = { 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xfb, 0xff, -+ 0xff, 0xdf, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, -+ 0xfe, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xf7, 0xff, -+ 0xff, 0xf7, 0xff, 0xff, 0xbf, 0xff, 0xff, 0x3f }, -+ .result = { 0xbf, 0x9a, 0xff, 0xd0, 0x6b, 0x84, 0x40, 0x85, -+ 0x58, 0x64, 0x60, 0x96, 0x2e, 0xf2, 0x14, 0x6f, -+ 0xf3, 0xd4, 0x53, 0x3d, 0x94, 0x44, 0xaa, 0xb0, -+ 0x06, 0xeb, 0x88, 0xcc, 0x30, 0x54, 0x40, 0x7d }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for public key */ -+ { -+ .private = { 0x18, 0x8c, 0x4b, 0xc5, 0xb9, 0xc4, 0x4b, 0x38, -+ 0xbb, 0x65, 0x8b, 0x9b, 0x2a, 0xe8, 0x2d, 0x5b, -+ 0x01, 0x01, 0x5e, 0x09, 0x31, 0x84, 0xb1, 0x7c, -+ 0xb7, 0x86, 0x35, 0x03, 0xa7, 0x83, 0xe1, 0xbb }, -+ .public = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f }, -+ .result = { 0xd4, 0x80, 0xde, 0x04, 0xf6, 0x99, 0xcb, 0x3b, -+ 0xe0, 0x68, 0x4a, 0x9c, 0xc2, 0xe3, 0x12, 0x81, -+ 0xea, 0x0b, 0xc5, 0xa9, 0xdc, 0xc1, 0x57, 0xd3, -+ 0xd2, 0x01, 0x58, 0xd4, 0x6c, 0xa5, 0x24, 0x6d }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for public key */ -+ { -+ .private = { 0xe0, 0x6c, 0x11, 0xbb, 0x2e, 0x13, 0xce, 0x3d, -+ 0xc7, 0x67, 0x3f, 0x67, 0xf5, 0x48, 0x22, 0x42, -+ 0x90, 0x94, 0x23, 0xa9, 0xae, 0x95, 0xee, 0x98, -+ 0x6a, 0x98, 0x8d, 0x98, 0xfa, 0xee, 0x23, 0xa2 }, -+ .public = { 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0x7f, -+ 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0x7f }, -+ .result = { 0x4c, 0x44, 0x01, 0xcc, 0xe6, 0xb5, 0x1e, 0x4c, -+ 0xb1, 0x8f, 0x27, 0x90, 0x24, 0x6c, 0x9b, 0xf9, -+ 0x14, 0xdb, 0x66, 0x77, 0x50, 0xa1, 0xcb, 0x89, -+ 0x06, 0x90, 0x92, 0xaf, 0x07, 0x29, 0x22, 0x76 }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for public key */ -+ { -+ .private = { 0xc0, 0x65, 0x8c, 0x46, 0xdd, 0xe1, 0x81, 0x29, -+ 0x29, 0x38, 0x77, 0x53, 0x5b, 0x11, 0x62, 0xb6, -+ 0xf9, 0xf5, 0x41, 0x4a, 0x23, 0xcf, 0x4d, 0x2c, -+ 0xbc, 0x14, 0x0a, 0x4d, 0x99, 0xda, 0x2b, 0x8f }, -+ .public = { 0xeb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f }, -+ .result = { 0x57, 0x8b, 0xa8, 0xcc, 0x2d, 0xbd, 0xc5, 0x75, -+ 0xaf, 0xcf, 0x9d, 0xf2, 0xb3, 0xee, 0x61, 0x89, -+ 0xf5, 0x33, 0x7d, 0x68, 0x54, 0xc7, 0x9b, 0x4c, -+ 0xe1, 0x65, 0xea, 0x12, 0x29, 0x3b, 0x3a, 0x0f }, -+ .valid = true -+ }, -+ /* wycheproof - public key with low order */ -+ { -+ .private = { 0x10, 0x25, 0x5c, 0x92, 0x30, 0xa9, 0x7a, 0x30, -+ 0xa4, 0x58, 0xca, 0x28, 0x4a, 0x62, 0x96, 0x69, -+ 0x29, 0x3a, 0x31, 0x89, 0x0c, 0xda, 0x9d, 0x14, -+ 0x7f, 0xeb, 0xc7, 0xd1, 0xe2, 0x2d, 0x6b, 0xb1 }, -+ .public = { 0xe0, 0xeb, 0x7a, 0x7c, 0x3b, 0x41, 0xb8, 0xae, -+ 0x16, 0x56, 0xe3, 0xfa, 0xf1, 0x9f, 0xc4, 0x6a, -+ 0xda, 0x09, 0x8d, 0xeb, 0x9c, 0x32, 0xb1, 0xfd, -+ 0x86, 0x62, 0x05, 0x16, 0x5f, 0x49, 0xb8, 0x00 }, -+ .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = false -+ }, -+ /* wycheproof - public key with low order */ -+ { -+ .private = { 0x78, 0xf1, 0xe8, 0xed, 0xf1, 0x44, 0x81, 0xb3, -+ 0x89, 0x44, 0x8d, 0xac, 0x8f, 0x59, 0xc7, 0x0b, -+ 0x03, 0x8e, 0x7c, 0xf9, 0x2e, 0xf2, 0xc7, 0xef, -+ 0xf5, 0x7a, 0x72, 0x46, 0x6e, 0x11, 0x52, 0x96 }, -+ .public = { 0x5f, 0x9c, 0x95, 0xbc, 0xa3, 0x50, 0x8c, 0x24, -+ 0xb1, 0xd0, 0xb1, 0x55, 0x9c, 0x83, 0xef, 0x5b, -+ 0x04, 0x44, 0x5c, 0xc4, 0x58, 0x1c, 0x8e, 0x86, -+ 0xd8, 0x22, 0x4e, 0xdd, 0xd0, 0x9f, 0x11, 0x57 }, -+ .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = false -+ }, -+ /* wycheproof - public key with low order */ -+ { -+ .private = { 0xa0, 0xa0, 0x5a, 0x3e, 0x8f, 0x9f, 0x44, 0x20, -+ 0x4d, 0x5f, 0x80, 0x59, 0xa9, 0x4a, 0xc7, 0xdf, -+ 0xc3, 0x9a, 0x49, 0xac, 0x01, 0x6d, 0xd7, 0x43, -+ 0xdb, 0xfa, 0x43, 0xc5, 0xd6, 0x71, 0xfd, 0x88 }, -+ .public = { 0xec, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f }, -+ .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = false -+ }, -+ /* wycheproof - public key with low order */ -+ { -+ .private = { 0xd0, 0xdb, 0xb3, 0xed, 0x19, 0x06, 0x66, 0x3f, -+ 0x15, 0x42, 0x0a, 0xf3, 0x1f, 0x4e, 0xaf, 0x65, -+ 0x09, 0xd9, 0xa9, 0x94, 0x97, 0x23, 0x50, 0x06, -+ 0x05, 0xad, 0x7c, 0x1c, 0x6e, 0x74, 0x50, 0xa9 }, -+ .public = { 0xed, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f }, -+ .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = false -+ }, -+ /* wycheproof - public key with low order */ -+ { -+ .private = { 0xc0, 0xb1, 0xd0, 0xeb, 0x22, 0xb2, 0x44, 0xfe, -+ 0x32, 0x91, 0x14, 0x00, 0x72, 0xcd, 0xd9, 0xd9, -+ 0x89, 0xb5, 0xf0, 0xec, 0xd9, 0x6c, 0x10, 0x0f, -+ 0xeb, 0x5b, 0xca, 0x24, 0x1c, 0x1d, 0x9f, 0x8f }, -+ .public = { 0xee, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f }, -+ .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = false -+ }, -+ /* wycheproof - public key with low order */ -+ { -+ .private = { 0x48, 0x0b, 0xf4, 0x5f, 0x59, 0x49, 0x42, 0xa8, -+ 0xbc, 0x0f, 0x33, 0x53, 0xc6, 0xe8, 0xb8, 0x85, -+ 0x3d, 0x77, 0xf3, 0x51, 0xf1, 0xc2, 0xca, 0x6c, -+ 0x2d, 0x1a, 0xbf, 0x8a, 0x00, 0xb4, 0x22, 0x9c }, -+ .public = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }, -+ .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = false -+ }, -+ /* wycheproof - public key with low order */ -+ { -+ .private = { 0x30, 0xf9, 0x93, 0xfc, 0xf8, 0x51, 0x4f, 0xc8, -+ 0x9b, 0xd8, 0xdb, 0x14, 0xcd, 0x43, 0xba, 0x0d, -+ 0x4b, 0x25, 0x30, 0xe7, 0x3c, 0x42, 0x76, 0xa0, -+ 0x5e, 0x1b, 0x14, 0x5d, 0x42, 0x0c, 0xed, 0xb4 }, -+ .public = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }, -+ .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = false -+ }, -+ /* wycheproof - public key with low order */ -+ { -+ .private = { 0xc0, 0x49, 0x74, 0xb7, 0x58, 0x38, 0x0e, 0x2a, -+ 0x5b, 0x5d, 0xf6, 0xeb, 0x09, 0xbb, 0x2f, 0x6b, -+ 0x34, 0x34, 0xf9, 0x82, 0x72, 0x2a, 0x8e, 0x67, -+ 0x6d, 0x3d, 0xa2, 0x51, 0xd1, 0xb3, 0xde, 0x83 }, -+ .public = { 0xe0, 0xeb, 0x7a, 0x7c, 0x3b, 0x41, 0xb8, 0xae, -+ 0x16, 0x56, 0xe3, 0xfa, 0xf1, 0x9f, 0xc4, 0x6a, -+ 0xda, 0x09, 0x8d, 0xeb, 0x9c, 0x32, 0xb1, 0xfd, -+ 0x86, 0x62, 0x05, 0x16, 0x5f, 0x49, 0xb8, 0x80 }, -+ .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = false -+ }, -+ /* wycheproof - public key with low order */ -+ { -+ .private = { 0x50, 0x2a, 0x31, 0x37, 0x3d, 0xb3, 0x24, 0x46, -+ 0x84, 0x2f, 0xe5, 0xad, 0xd3, 0xe0, 0x24, 0x02, -+ 0x2e, 0xa5, 0x4f, 0x27, 0x41, 0x82, 0xaf, 0xc3, -+ 0xd9, 0xf1, 0xbb, 0x3d, 0x39, 0x53, 0x4e, 0xb5 }, -+ .public = { 0x5f, 0x9c, 0x95, 0xbc, 0xa3, 0x50, 0x8c, 0x24, -+ 0xb1, 0xd0, 0xb1, 0x55, 0x9c, 0x83, 0xef, 0x5b, -+ 0x04, 0x44, 0x5c, 0xc4, 0x58, 0x1c, 0x8e, 0x86, -+ 0xd8, 0x22, 0x4e, 0xdd, 0xd0, 0x9f, 0x11, 0xd7 }, -+ .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = false -+ }, -+ /* wycheproof - public key with low order */ -+ { -+ .private = { 0x90, 0xfa, 0x64, 0x17, 0xb0, 0xe3, 0x70, 0x30, -+ 0xfd, 0x6e, 0x43, 0xef, 0xf2, 0xab, 0xae, 0xf1, -+ 0x4c, 0x67, 0x93, 0x11, 0x7a, 0x03, 0x9c, 0xf6, -+ 0x21, 0x31, 0x8b, 0xa9, 0x0f, 0x4e, 0x98, 0xbe }, -+ .public = { 0xec, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, -+ .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = false -+ }, -+ /* wycheproof - public key with low order */ -+ { -+ .private = { 0x78, 0xad, 0x3f, 0x26, 0x02, 0x7f, 0x1c, 0x9f, -+ 0xdd, 0x97, 0x5a, 0x16, 0x13, 0xb9, 0x47, 0x77, -+ 0x9b, 0xad, 0x2c, 0xf2, 0xb7, 0x41, 0xad, 0xe0, -+ 0x18, 0x40, 0x88, 0x5a, 0x30, 0xbb, 0x97, 0x9c }, -+ .public = { 0xed, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, -+ .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = false -+ }, -+ /* wycheproof - public key with low order */ -+ { -+ .private = { 0x98, 0xe2, 0x3d, 0xe7, 0xb1, 0xe0, 0x92, 0x6e, -+ 0xd9, 0xc8, 0x7e, 0x7b, 0x14, 0xba, 0xf5, 0x5f, -+ 0x49, 0x7a, 0x1d, 0x70, 0x96, 0xf9, 0x39, 0x77, -+ 0x68, 0x0e, 0x44, 0xdc, 0x1c, 0x7b, 0x7b, 0x8b }, -+ .public = { 0xee, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, -+ .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = false -+ }, -+ /* wycheproof - public key >= p */ -+ { -+ .private = { 0xf0, 0x1e, 0x48, 0xda, 0xfa, 0xc9, 0xd7, 0xbc, -+ 0xf5, 0x89, 0xcb, 0xc3, 0x82, 0xc8, 0x78, 0xd1, -+ 0x8b, 0xda, 0x35, 0x50, 0x58, 0x9f, 0xfb, 0x5d, -+ 0x50, 0xb5, 0x23, 0xbe, 0xbe, 0x32, 0x9d, 0xae }, -+ .public = { 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f }, -+ .result = { 0xbd, 0x36, 0xa0, 0x79, 0x0e, 0xb8, 0x83, 0x09, -+ 0x8c, 0x98, 0x8b, 0x21, 0x78, 0x67, 0x73, 0xde, -+ 0x0b, 0x3a, 0x4d, 0xf1, 0x62, 0x28, 0x2c, 0xf1, -+ 0x10, 0xde, 0x18, 0xdd, 0x48, 0x4c, 0xe7, 0x4b }, -+ .valid = true -+ }, -+ /* wycheproof - public key >= p */ -+ { -+ .private = { 0x28, 0x87, 0x96, 0xbc, 0x5a, 0xff, 0x4b, 0x81, -+ 0xa3, 0x75, 0x01, 0x75, 0x7b, 0xc0, 0x75, 0x3a, -+ 0x3c, 0x21, 0x96, 0x47, 0x90, 0xd3, 0x86, 0x99, -+ 0x30, 0x8d, 0xeb, 0xc1, 0x7a, 0x6e, 0xaf, 0x8d }, -+ .public = { 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f }, -+ .result = { 0xb4, 0xe0, 0xdd, 0x76, 0xda, 0x7b, 0x07, 0x17, -+ 0x28, 0xb6, 0x1f, 0x85, 0x67, 0x71, 0xaa, 0x35, -+ 0x6e, 0x57, 0xed, 0xa7, 0x8a, 0x5b, 0x16, 0x55, -+ 0xcc, 0x38, 0x20, 0xfb, 0x5f, 0x85, 0x4c, 0x5c }, -+ .valid = true -+ }, -+ /* wycheproof - public key >= p */ -+ { -+ .private = { 0x98, 0xdf, 0x84, 0x5f, 0x66, 0x51, 0xbf, 0x11, -+ 0x38, 0x22, 0x1f, 0x11, 0x90, 0x41, 0xf7, 0x2b, -+ 0x6d, 0xbc, 0x3c, 0x4a, 0xce, 0x71, 0x43, 0xd9, -+ 0x9f, 0xd5, 0x5a, 0xd8, 0x67, 0x48, 0x0d, 0xa8 }, -+ .public = { 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f }, -+ .result = { 0x6f, 0xdf, 0x6c, 0x37, 0x61, 0x1d, 0xbd, 0x53, -+ 0x04, 0xdc, 0x0f, 0x2e, 0xb7, 0xc9, 0x51, 0x7e, -+ 0xb3, 0xc5, 0x0e, 0x12, 0xfd, 0x05, 0x0a, 0xc6, -+ 0xde, 0xc2, 0x70, 0x71, 0xd4, 0xbf, 0xc0, 0x34 }, -+ .valid = true -+ }, -+ /* wycheproof - public key >= p */ -+ { -+ .private = { 0xf0, 0x94, 0x98, 0xe4, 0x6f, 0x02, 0xf8, 0x78, -+ 0x82, 0x9e, 0x78, 0xb8, 0x03, 0xd3, 0x16, 0xa2, -+ 0xed, 0x69, 0x5d, 0x04, 0x98, 0xa0, 0x8a, 0xbd, -+ 0xf8, 0x27, 0x69, 0x30, 0xe2, 0x4e, 0xdc, 0xb0 }, -+ .public = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f }, -+ .result = { 0x4c, 0x8f, 0xc4, 0xb1, 0xc6, 0xab, 0x88, 0xfb, -+ 0x21, 0xf1, 0x8f, 0x6d, 0x4c, 0x81, 0x02, 0x40, -+ 0xd4, 0xe9, 0x46, 0x51, 0xba, 0x44, 0xf7, 0xa2, -+ 0xc8, 0x63, 0xce, 0xc7, 0xdc, 0x56, 0x60, 0x2d }, -+ .valid = true -+ }, -+ /* wycheproof - public key >= p */ -+ { -+ .private = { 0x18, 0x13, 0xc1, 0x0a, 0x5c, 0x7f, 0x21, 0xf9, -+ 0x6e, 0x17, 0xf2, 0x88, 0xc0, 0xcc, 0x37, 0x60, -+ 0x7c, 0x04, 0xc5, 0xf5, 0xae, 0xa2, 0xdb, 0x13, -+ 0x4f, 0x9e, 0x2f, 0xfc, 0x66, 0xbd, 0x9d, 0xb8 }, -+ .public = { 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }, -+ .result = { 0x1c, 0xd0, 0xb2, 0x82, 0x67, 0xdc, 0x54, 0x1c, -+ 0x64, 0x2d, 0x6d, 0x7d, 0xca, 0x44, 0xa8, 0xb3, -+ 0x8a, 0x63, 0x73, 0x6e, 0xef, 0x5c, 0x4e, 0x65, -+ 0x01, 0xff, 0xbb, 0xb1, 0x78, 0x0c, 0x03, 0x3c }, -+ .valid = true -+ }, -+ /* wycheproof - public key >= p */ -+ { -+ .private = { 0x78, 0x57, 0xfb, 0x80, 0x86, 0x53, 0x64, 0x5a, -+ 0x0b, 0xeb, 0x13, 0x8a, 0x64, 0xf5, 0xf4, 0xd7, -+ 0x33, 0xa4, 0x5e, 0xa8, 0x4c, 0x3c, 0xda, 0x11, -+ 0xa9, 0xc0, 0x6f, 0x7e, 0x71, 0x39, 0x14, 0x9e }, -+ .public = { 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }, -+ .result = { 0x87, 0x55, 0xbe, 0x01, 0xc6, 0x0a, 0x7e, 0x82, -+ 0x5c, 0xff, 0x3e, 0x0e, 0x78, 0xcb, 0x3a, 0xa4, -+ 0x33, 0x38, 0x61, 0x51, 0x6a, 0xa5, 0x9b, 0x1c, -+ 0x51, 0xa8, 0xb2, 0xa5, 0x43, 0xdf, 0xa8, 0x22 }, -+ .valid = true -+ }, -+ /* wycheproof - public key >= p */ -+ { -+ .private = { 0xe0, 0x3a, 0xa8, 0x42, 0xe2, 0xab, 0xc5, 0x6e, -+ 0x81, 0xe8, 0x7b, 0x8b, 0x9f, 0x41, 0x7b, 0x2a, -+ 0x1e, 0x59, 0x13, 0xc7, 0x23, 0xee, 0xd2, 0x8d, -+ 0x75, 0x2f, 0x8d, 0x47, 0xa5, 0x9f, 0x49, 0x8f }, -+ .public = { 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }, -+ .result = { 0x54, 0xc9, 0xa1, 0xed, 0x95, 0xe5, 0x46, 0xd2, -+ 0x78, 0x22, 0xa3, 0x60, 0x93, 0x1d, 0xda, 0x60, -+ 0xa1, 0xdf, 0x04, 0x9d, 0xa6, 0xf9, 0x04, 0x25, -+ 0x3c, 0x06, 0x12, 0xbb, 0xdc, 0x08, 0x74, 0x76 }, -+ .valid = true -+ }, -+ /* wycheproof - public key >= p */ -+ { -+ .private = { 0xf8, 0xf7, 0x07, 0xb7, 0x99, 0x9b, 0x18, 0xcb, -+ 0x0d, 0x6b, 0x96, 0x12, 0x4f, 0x20, 0x45, 0x97, -+ 0x2c, 0xa2, 0x74, 0xbf, 0xc1, 0x54, 0xad, 0x0c, -+ 0x87, 0x03, 0x8c, 0x24, 0xc6, 0xd0, 0xd4, 0xb2 }, -+ .public = { 0xda, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, -+ .result = { 0xcc, 0x1f, 0x40, 0xd7, 0x43, 0xcd, 0xc2, 0x23, -+ 0x0e, 0x10, 0x43, 0xda, 0xba, 0x8b, 0x75, 0xe8, -+ 0x10, 0xf1, 0xfb, 0xab, 0x7f, 0x25, 0x52, 0x69, -+ 0xbd, 0x9e, 0xbb, 0x29, 0xe6, 0xbf, 0x49, 0x4f }, -+ .valid = true -+ }, -+ /* wycheproof - public key >= p */ -+ { -+ .private = { 0xa0, 0x34, 0xf6, 0x84, 0xfa, 0x63, 0x1e, 0x1a, -+ 0x34, 0x81, 0x18, 0xc1, 0xce, 0x4c, 0x98, 0x23, -+ 0x1f, 0x2d, 0x9e, 0xec, 0x9b, 0xa5, 0x36, 0x5b, -+ 0x4a, 0x05, 0xd6, 0x9a, 0x78, 0x5b, 0x07, 0x96 }, -+ .public = { 0xdb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, -+ .result = { 0x54, 0x99, 0x8e, 0xe4, 0x3a, 0x5b, 0x00, 0x7b, -+ 0xf4, 0x99, 0xf0, 0x78, 0xe7, 0x36, 0x52, 0x44, -+ 0x00, 0xa8, 0xb5, 0xc7, 0xe9, 0xb9, 0xb4, 0x37, -+ 0x71, 0x74, 0x8c, 0x7c, 0xdf, 0x88, 0x04, 0x12 }, -+ .valid = true -+ }, -+ /* wycheproof - public key >= p */ -+ { -+ .private = { 0x30, 0xb6, 0xc6, 0xa0, 0xf2, 0xff, 0xa6, 0x80, -+ 0x76, 0x8f, 0x99, 0x2b, 0xa8, 0x9e, 0x15, 0x2d, -+ 0x5b, 0xc9, 0x89, 0x3d, 0x38, 0xc9, 0x11, 0x9b, -+ 0xe4, 0xf7, 0x67, 0xbf, 0xab, 0x6e, 0x0c, 0xa5 }, -+ .public = { 0xdc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, -+ .result = { 0xea, 0xd9, 0xb3, 0x8e, 0xfd, 0xd7, 0x23, 0x63, -+ 0x79, 0x34, 0xe5, 0x5a, 0xb7, 0x17, 0xa7, 0xae, -+ 0x09, 0xeb, 0x86, 0xa2, 0x1d, 0xc3, 0x6a, 0x3f, -+ 0xee, 0xb8, 0x8b, 0x75, 0x9e, 0x39, 0x1e, 0x09 }, -+ .valid = true -+ }, -+ /* wycheproof - public key >= p */ -+ { -+ .private = { 0x90, 0x1b, 0x9d, 0xcf, 0x88, 0x1e, 0x01, 0xe0, -+ 0x27, 0x57, 0x50, 0x35, 0xd4, 0x0b, 0x43, 0xbd, -+ 0xc1, 0xc5, 0x24, 0x2e, 0x03, 0x08, 0x47, 0x49, -+ 0x5b, 0x0c, 0x72, 0x86, 0x46, 0x9b, 0x65, 0x91 }, -+ .public = { 0xea, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, -+ .result = { 0x60, 0x2f, 0xf4, 0x07, 0x89, 0xb5, 0x4b, 0x41, -+ 0x80, 0x59, 0x15, 0xfe, 0x2a, 0x62, 0x21, 0xf0, -+ 0x7a, 0x50, 0xff, 0xc2, 0xc3, 0xfc, 0x94, 0xcf, -+ 0x61, 0xf1, 0x3d, 0x79, 0x04, 0xe8, 0x8e, 0x0e }, -+ .valid = true -+ }, -+ /* wycheproof - public key >= p */ -+ { -+ .private = { 0x80, 0x46, 0x67, 0x7c, 0x28, 0xfd, 0x82, 0xc9, -+ 0xa1, 0xbd, 0xb7, 0x1a, 0x1a, 0x1a, 0x34, 0xfa, -+ 0xba, 0x12, 0x25, 0xe2, 0x50, 0x7f, 0xe3, 0xf5, -+ 0x4d, 0x10, 0xbd, 0x5b, 0x0d, 0x86, 0x5f, 0x8e }, -+ .public = { 0xeb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, -+ .result = { 0xe0, 0x0a, 0xe8, 0xb1, 0x43, 0x47, 0x12, 0x47, -+ 0xba, 0x24, 0xf1, 0x2c, 0x88, 0x55, 0x36, 0xc3, -+ 0xcb, 0x98, 0x1b, 0x58, 0xe1, 0xe5, 0x6b, 0x2b, -+ 0xaf, 0x35, 0xc1, 0x2a, 0xe1, 0xf7, 0x9c, 0x26 }, -+ .valid = true -+ }, -+ /* wycheproof - public key >= p */ -+ { -+ .private = { 0x60, 0x2f, 0x7e, 0x2f, 0x68, 0xa8, 0x46, 0xb8, -+ 0x2c, 0xc2, 0x69, 0xb1, 0xd4, 0x8e, 0x93, 0x98, -+ 0x86, 0xae, 0x54, 0xfd, 0x63, 0x6c, 0x1f, 0xe0, -+ 0x74, 0xd7, 0x10, 0x12, 0x7d, 0x47, 0x24, 0x91 }, -+ .public = { 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, -+ .result = { 0x98, 0xcb, 0x9b, 0x50, 0xdd, 0x3f, 0xc2, 0xb0, -+ 0xd4, 0xf2, 0xd2, 0xbf, 0x7c, 0x5c, 0xfd, 0xd1, -+ 0x0c, 0x8f, 0xcd, 0x31, 0xfc, 0x40, 0xaf, 0x1a, -+ 0xd4, 0x4f, 0x47, 0xc1, 0x31, 0x37, 0x63, 0x62 }, -+ .valid = true -+ }, -+ /* wycheproof - public key >= p */ -+ { -+ .private = { 0x60, 0x88, 0x7b, 0x3d, 0xc7, 0x24, 0x43, 0x02, -+ 0x6e, 0xbe, 0xdb, 0xbb, 0xb7, 0x06, 0x65, 0xf4, -+ 0x2b, 0x87, 0xad, 0xd1, 0x44, 0x0e, 0x77, 0x68, -+ 0xfb, 0xd7, 0xe8, 0xe2, 0xce, 0x5f, 0x63, 0x9d }, -+ .public = { 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, -+ .result = { 0x38, 0xd6, 0x30, 0x4c, 0x4a, 0x7e, 0x6d, 0x9f, -+ 0x79, 0x59, 0x33, 0x4f, 0xb5, 0x24, 0x5b, 0xd2, -+ 0xc7, 0x54, 0x52, 0x5d, 0x4c, 0x91, 0xdb, 0x95, -+ 0x02, 0x06, 0x92, 0x62, 0x34, 0xc1, 0xf6, 0x33 }, -+ .valid = true -+ }, -+ /* wycheproof - public key >= p */ -+ { -+ .private = { 0x78, 0xd3, 0x1d, 0xfa, 0x85, 0x44, 0x97, 0xd7, -+ 0x2d, 0x8d, 0xef, 0x8a, 0x1b, 0x7f, 0xb0, 0x06, -+ 0xce, 0xc2, 0xd8, 0xc4, 0x92, 0x46, 0x47, 0xc9, -+ 0x38, 0x14, 0xae, 0x56, 0xfa, 0xed, 0xa4, 0x95 }, -+ .public = { 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, -+ .result = { 0x78, 0x6c, 0xd5, 0x49, 0x96, 0xf0, 0x14, 0xa5, -+ 0xa0, 0x31, 0xec, 0x14, 0xdb, 0x81, 0x2e, 0xd0, -+ 0x83, 0x55, 0x06, 0x1f, 0xdb, 0x5d, 0xe6, 0x80, -+ 0xa8, 0x00, 0xac, 0x52, 0x1f, 0x31, 0x8e, 0x23 }, -+ .valid = true -+ }, -+ /* wycheproof - public key >= p */ -+ { -+ .private = { 0xc0, 0x4c, 0x5b, 0xae, 0xfa, 0x83, 0x02, 0xdd, -+ 0xde, 0xd6, 0xa4, 0xbb, 0x95, 0x77, 0x61, 0xb4, -+ 0xeb, 0x97, 0xae, 0xfa, 0x4f, 0xc3, 0xb8, 0x04, -+ 0x30, 0x85, 0xf9, 0x6a, 0x56, 0x59, 0xb3, 0xa5 }, -+ .public = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, -+ .result = { 0x29, 0xae, 0x8b, 0xc7, 0x3e, 0x9b, 0x10, 0xa0, -+ 0x8b, 0x4f, 0x68, 0x1c, 0x43, 0xc3, 0xe0, 0xac, -+ 0x1a, 0x17, 0x1d, 0x31, 0xb3, 0x8f, 0x1a, 0x48, -+ 0xef, 0xba, 0x29, 0xae, 0x63, 0x9e, 0xa1, 0x34 }, -+ .valid = true -+ }, -+ /* wycheproof - RFC 7748 */ -+ { -+ .private = { 0xa0, 0x46, 0xe3, 0x6b, 0xf0, 0x52, 0x7c, 0x9d, -+ 0x3b, 0x16, 0x15, 0x4b, 0x82, 0x46, 0x5e, 0xdd, -+ 0x62, 0x14, 0x4c, 0x0a, 0xc1, 0xfc, 0x5a, 0x18, -+ 0x50, 0x6a, 0x22, 0x44, 0xba, 0x44, 0x9a, 0x44 }, -+ .public = { 0xe6, 0xdb, 0x68, 0x67, 0x58, 0x30, 0x30, 0xdb, -+ 0x35, 0x94, 0xc1, 0xa4, 0x24, 0xb1, 0x5f, 0x7c, -+ 0x72, 0x66, 0x24, 0xec, 0x26, 0xb3, 0x35, 0x3b, -+ 0x10, 0xa9, 0x03, 0xa6, 0xd0, 0xab, 0x1c, 0x4c }, -+ .result = { 0xc3, 0xda, 0x55, 0x37, 0x9d, 0xe9, 0xc6, 0x90, -+ 0x8e, 0x94, 0xea, 0x4d, 0xf2, 0x8d, 0x08, 0x4f, -+ 0x32, 0xec, 0xcf, 0x03, 0x49, 0x1c, 0x71, 0xf7, -+ 0x54, 0xb4, 0x07, 0x55, 0x77, 0xa2, 0x85, 0x52 }, -+ .valid = true -+ }, -+ /* wycheproof - RFC 7748 */ -+ { -+ .private = { 0x48, 0x66, 0xe9, 0xd4, 0xd1, 0xb4, 0x67, 0x3c, -+ 0x5a, 0xd2, 0x26, 0x91, 0x95, 0x7d, 0x6a, 0xf5, -+ 0xc1, 0x1b, 0x64, 0x21, 0xe0, 0xea, 0x01, 0xd4, -+ 0x2c, 0xa4, 0x16, 0x9e, 0x79, 0x18, 0xba, 0x4d }, -+ .public = { 0xe5, 0x21, 0x0f, 0x12, 0x78, 0x68, 0x11, 0xd3, -+ 0xf4, 0xb7, 0x95, 0x9d, 0x05, 0x38, 0xae, 0x2c, -+ 0x31, 0xdb, 0xe7, 0x10, 0x6f, 0xc0, 0x3c, 0x3e, -+ 0xfc, 0x4c, 0xd5, 0x49, 0xc7, 0x15, 0xa4, 0x13 }, -+ .result = { 0x95, 0xcb, 0xde, 0x94, 0x76, 0xe8, 0x90, 0x7d, -+ 0x7a, 0xad, 0xe4, 0x5c, 0xb4, 0xb8, 0x73, 0xf8, -+ 0x8b, 0x59, 0x5a, 0x68, 0x79, 0x9f, 0xa1, 0x52, -+ 0xe6, 0xf8, 0xf7, 0x64, 0x7a, 0xac, 0x79, 0x57 }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for shared secret */ -+ { -+ .private = { 0xa0, 0xa4, 0xf1, 0x30, 0xb9, 0x8a, 0x5b, 0xe4, -+ 0xb1, 0xce, 0xdb, 0x7c, 0xb8, 0x55, 0x84, 0xa3, -+ 0x52, 0x0e, 0x14, 0x2d, 0x47, 0x4d, 0xc9, 0xcc, -+ 0xb9, 0x09, 0xa0, 0x73, 0xa9, 0x76, 0xbf, 0x63 }, -+ .public = { 0x0a, 0xb4, 0xe7, 0x63, 0x80, 0xd8, 0x4d, 0xde, -+ 0x4f, 0x68, 0x33, 0xc5, 0x8f, 0x2a, 0x9f, 0xb8, -+ 0xf8, 0x3b, 0xb0, 0x16, 0x9b, 0x17, 0x2b, 0xe4, -+ 0xb6, 0xe0, 0x59, 0x28, 0x87, 0x74, 0x1a, 0x36 }, -+ .result = { 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for shared secret */ -+ { -+ .private = { 0xa0, 0xa4, 0xf1, 0x30, 0xb9, 0x8a, 0x5b, 0xe4, -+ 0xb1, 0xce, 0xdb, 0x7c, 0xb8, 0x55, 0x84, 0xa3, -+ 0x52, 0x0e, 0x14, 0x2d, 0x47, 0x4d, 0xc9, 0xcc, -+ 0xb9, 0x09, 0xa0, 0x73, 0xa9, 0x76, 0xbf, 0x63 }, -+ .public = { 0x89, 0xe1, 0x0d, 0x57, 0x01, 0xb4, 0x33, 0x7d, -+ 0x2d, 0x03, 0x21, 0x81, 0x53, 0x8b, 0x10, 0x64, -+ 0xbd, 0x40, 0x84, 0x40, 0x1c, 0xec, 0xa1, 0xfd, -+ 0x12, 0x66, 0x3a, 0x19, 0x59, 0x38, 0x80, 0x00 }, -+ .result = { 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for shared secret */ -+ { -+ .private = { 0xa0, 0xa4, 0xf1, 0x30, 0xb9, 0x8a, 0x5b, 0xe4, -+ 0xb1, 0xce, 0xdb, 0x7c, 0xb8, 0x55, 0x84, 0xa3, -+ 0x52, 0x0e, 0x14, 0x2d, 0x47, 0x4d, 0xc9, 0xcc, -+ 0xb9, 0x09, 0xa0, 0x73, 0xa9, 0x76, 0xbf, 0x63 }, -+ .public = { 0x2b, 0x55, 0xd3, 0xaa, 0x4a, 0x8f, 0x80, 0xc8, -+ 0xc0, 0xb2, 0xae, 0x5f, 0x93, 0x3e, 0x85, 0xaf, -+ 0x49, 0xbe, 0xac, 0x36, 0xc2, 0xfa, 0x73, 0x94, -+ 0xba, 0xb7, 0x6c, 0x89, 0x33, 0xf8, 0xf8, 0x1d }, -+ .result = { 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for shared secret */ -+ { -+ .private = { 0xa0, 0xa4, 0xf1, 0x30, 0xb9, 0x8a, 0x5b, 0xe4, -+ 0xb1, 0xce, 0xdb, 0x7c, 0xb8, 0x55, 0x84, 0xa3, -+ 0x52, 0x0e, 0x14, 0x2d, 0x47, 0x4d, 0xc9, 0xcc, -+ 0xb9, 0x09, 0xa0, 0x73, 0xa9, 0x76, 0xbf, 0x63 }, -+ .public = { 0x63, 0xe5, 0xb1, 0xfe, 0x96, 0x01, 0xfe, 0x84, -+ 0x38, 0x5d, 0x88, 0x66, 0xb0, 0x42, 0x12, 0x62, -+ 0xf7, 0x8f, 0xbf, 0xa5, 0xaf, 0xf9, 0x58, 0x5e, -+ 0x62, 0x66, 0x79, 0xb1, 0x85, 0x47, 0xd9, 0x59 }, -+ .result = { 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for shared secret */ -+ { -+ .private = { 0xa0, 0xa4, 0xf1, 0x30, 0xb9, 0x8a, 0x5b, 0xe4, -+ 0xb1, 0xce, 0xdb, 0x7c, 0xb8, 0x55, 0x84, 0xa3, -+ 0x52, 0x0e, 0x14, 0x2d, 0x47, 0x4d, 0xc9, 0xcc, -+ 0xb9, 0x09, 0xa0, 0x73, 0xa9, 0x76, 0xbf, 0x63 }, -+ .public = { 0xe4, 0x28, 0xf3, 0xda, 0xc1, 0x78, 0x09, 0xf8, -+ 0x27, 0xa5, 0x22, 0xce, 0x32, 0x35, 0x50, 0x58, -+ 0xd0, 0x73, 0x69, 0x36, 0x4a, 0xa7, 0x89, 0x02, -+ 0xee, 0x10, 0x13, 0x9b, 0x9f, 0x9d, 0xd6, 0x53 }, -+ .result = { 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for shared secret */ -+ { -+ .private = { 0xa0, 0xa4, 0xf1, 0x30, 0xb9, 0x8a, 0x5b, 0xe4, -+ 0xb1, 0xce, 0xdb, 0x7c, 0xb8, 0x55, 0x84, 0xa3, -+ 0x52, 0x0e, 0x14, 0x2d, 0x47, 0x4d, 0xc9, 0xcc, -+ 0xb9, 0x09, 0xa0, 0x73, 0xa9, 0x76, 0xbf, 0x63 }, -+ .public = { 0xb3, 0xb5, 0x0e, 0x3e, 0xd3, 0xa4, 0x07, 0xb9, -+ 0x5d, 0xe9, 0x42, 0xef, 0x74, 0x57, 0x5b, 0x5a, -+ 0xb8, 0xa1, 0x0c, 0x09, 0xee, 0x10, 0x35, 0x44, -+ 0xd6, 0x0b, 0xdf, 0xed, 0x81, 0x38, 0xab, 0x2b }, -+ .result = { 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for shared secret */ -+ { -+ .private = { 0xa0, 0xa4, 0xf1, 0x30, 0xb9, 0x8a, 0x5b, 0xe4, -+ 0xb1, 0xce, 0xdb, 0x7c, 0xb8, 0x55, 0x84, 0xa3, -+ 0x52, 0x0e, 0x14, 0x2d, 0x47, 0x4d, 0xc9, 0xcc, -+ 0xb9, 0x09, 0xa0, 0x73, 0xa9, 0x76, 0xbf, 0x63 }, -+ .public = { 0x21, 0x3f, 0xff, 0xe9, 0x3d, 0x5e, 0xa8, 0xcd, -+ 0x24, 0x2e, 0x46, 0x28, 0x44, 0x02, 0x99, 0x22, -+ 0xc4, 0x3c, 0x77, 0xc9, 0xe3, 0xe4, 0x2f, 0x56, -+ 0x2f, 0x48, 0x5d, 0x24, 0xc5, 0x01, 0xa2, 0x0b }, -+ .result = { 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for shared secret */ -+ { -+ .private = { 0xa0, 0xa4, 0xf1, 0x30, 0xb9, 0x8a, 0x5b, 0xe4, -+ 0xb1, 0xce, 0xdb, 0x7c, 0xb8, 0x55, 0x84, 0xa3, -+ 0x52, 0x0e, 0x14, 0x2d, 0x47, 0x4d, 0xc9, 0xcc, -+ 0xb9, 0x09, 0xa0, 0x73, 0xa9, 0x76, 0xbf, 0x63 }, -+ .public = { 0x91, 0xb2, 0x32, 0xa1, 0x78, 0xb3, 0xcd, 0x53, -+ 0x09, 0x32, 0x44, 0x1e, 0x61, 0x39, 0x41, 0x8f, -+ 0x72, 0x17, 0x22, 0x92, 0xf1, 0xda, 0x4c, 0x18, -+ 0x34, 0xfc, 0x5e, 0xbf, 0xef, 0xb5, 0x1e, 0x3f }, -+ .result = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03 }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for shared secret */ -+ { -+ .private = { 0xa0, 0xa4, 0xf1, 0x30, 0xb9, 0x8a, 0x5b, 0xe4, -+ 0xb1, 0xce, 0xdb, 0x7c, 0xb8, 0x55, 0x84, 0xa3, -+ 0x52, 0x0e, 0x14, 0x2d, 0x47, 0x4d, 0xc9, 0xcc, -+ 0xb9, 0x09, 0xa0, 0x73, 0xa9, 0x76, 0xbf, 0x63 }, -+ .public = { 0x04, 0x5c, 0x6e, 0x11, 0xc5, 0xd3, 0x32, 0x55, -+ 0x6c, 0x78, 0x22, 0xfe, 0x94, 0xeb, 0xf8, 0x9b, -+ 0x56, 0xa3, 0x87, 0x8d, 0xc2, 0x7c, 0xa0, 0x79, -+ 0x10, 0x30, 0x58, 0x84, 0x9f, 0xab, 0xcb, 0x4f }, -+ .result = { 0xe5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for shared secret */ -+ { -+ .private = { 0xa0, 0xa4, 0xf1, 0x30, 0xb9, 0x8a, 0x5b, 0xe4, -+ 0xb1, 0xce, 0xdb, 0x7c, 0xb8, 0x55, 0x84, 0xa3, -+ 0x52, 0x0e, 0x14, 0x2d, 0x47, 0x4d, 0xc9, 0xcc, -+ 0xb9, 0x09, 0xa0, 0x73, 0xa9, 0x76, 0xbf, 0x63 }, -+ .public = { 0x1c, 0xa2, 0x19, 0x0b, 0x71, 0x16, 0x35, 0x39, -+ 0x06, 0x3c, 0x35, 0x77, 0x3b, 0xda, 0x0c, 0x9c, -+ 0x92, 0x8e, 0x91, 0x36, 0xf0, 0x62, 0x0a, 0xeb, -+ 0x09, 0x3f, 0x09, 0x91, 0x97, 0xb7, 0xf7, 0x4e }, -+ .result = { 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for shared secret */ -+ { -+ .private = { 0xa0, 0xa4, 0xf1, 0x30, 0xb9, 0x8a, 0x5b, 0xe4, -+ 0xb1, 0xce, 0xdb, 0x7c, 0xb8, 0x55, 0x84, 0xa3, -+ 0x52, 0x0e, 0x14, 0x2d, 0x47, 0x4d, 0xc9, 0xcc, -+ 0xb9, 0x09, 0xa0, 0x73, 0xa9, 0x76, 0xbf, 0x63 }, -+ .public = { 0xf7, 0x6e, 0x90, 0x10, 0xac, 0x33, 0xc5, 0x04, -+ 0x3b, 0x2d, 0x3b, 0x76, 0xa8, 0x42, 0x17, 0x10, -+ 0x00, 0xc4, 0x91, 0x62, 0x22, 0xe9, 0xe8, 0x58, -+ 0x97, 0xa0, 0xae, 0xc7, 0xf6, 0x35, 0x0b, 0x3c }, -+ .result = { 0xdd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for shared secret */ -+ { -+ .private = { 0xa0, 0xa4, 0xf1, 0x30, 0xb9, 0x8a, 0x5b, 0xe4, -+ 0xb1, 0xce, 0xdb, 0x7c, 0xb8, 0x55, 0x84, 0xa3, -+ 0x52, 0x0e, 0x14, 0x2d, 0x47, 0x4d, 0xc9, 0xcc, -+ 0xb9, 0x09, 0xa0, 0x73, 0xa9, 0x76, 0xbf, 0x63 }, -+ .public = { 0xbb, 0x72, 0x68, 0x8d, 0x8f, 0x8a, 0xa7, 0xa3, -+ 0x9c, 0xd6, 0x06, 0x0c, 0xd5, 0xc8, 0x09, 0x3c, -+ 0xde, 0xc6, 0xfe, 0x34, 0x19, 0x37, 0xc3, 0x88, -+ 0x6a, 0x99, 0x34, 0x6c, 0xd0, 0x7f, 0xaa, 0x55 }, -+ .result = { 0xdb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for shared secret */ -+ { -+ .private = { 0xa0, 0xa4, 0xf1, 0x30, 0xb9, 0x8a, 0x5b, 0xe4, -+ 0xb1, 0xce, 0xdb, 0x7c, 0xb8, 0x55, 0x84, 0xa3, -+ 0x52, 0x0e, 0x14, 0x2d, 0x47, 0x4d, 0xc9, 0xcc, -+ 0xb9, 0x09, 0xa0, 0x73, 0xa9, 0x76, 0xbf, 0x63 }, -+ .public = { 0x88, 0xfd, 0xde, 0xa1, 0x93, 0x39, 0x1c, 0x6a, -+ 0x59, 0x33, 0xef, 0x9b, 0x71, 0x90, 0x15, 0x49, -+ 0x44, 0x72, 0x05, 0xaa, 0xe9, 0xda, 0x92, 0x8a, -+ 0x6b, 0x91, 0xa3, 0x52, 0xba, 0x10, 0xf4, 0x1f }, -+ .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }, -+ .valid = true -+ }, -+ /* wycheproof - edge case for shared secret */ -+ { -+ .private = { 0xa0, 0xa4, 0xf1, 0x30, 0xb9, 0x8a, 0x5b, 0xe4, -+ 0xb1, 0xce, 0xdb, 0x7c, 0xb8, 0x55, 0x84, 0xa3, -+ 0x52, 0x0e, 0x14, 0x2d, 0x47, 0x4d, 0xc9, 0xcc, -+ 0xb9, 0x09, 0xa0, 0x73, 0xa9, 0x76, 0xbf, 0x63 }, -+ .public = { 0x30, 0x3b, 0x39, 0x2f, 0x15, 0x31, 0x16, 0xca, -+ 0xd9, 0xcc, 0x68, 0x2a, 0x00, 0xcc, 0xc4, 0x4c, -+ 0x95, 0xff, 0x0d, 0x3b, 0xbe, 0x56, 0x8b, 0xeb, -+ 0x6c, 0x4e, 0x73, 0x9b, 0xaf, 0xdc, 0x2c, 0x68 }, -+ .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00 }, -+ .valid = true -+ }, -+ /* wycheproof - checking for overflow */ -+ { -+ .private = { 0xc8, 0x17, 0x24, 0x70, 0x40, 0x00, 0xb2, 0x6d, -+ 0x31, 0x70, 0x3c, 0xc9, 0x7e, 0x3a, 0x37, 0x8d, -+ 0x56, 0xfa, 0xd8, 0x21, 0x93, 0x61, 0xc8, 0x8c, -+ 0xca, 0x8b, 0xd7, 0xc5, 0x71, 0x9b, 0x12, 0xb2 }, -+ .public = { 0xfd, 0x30, 0x0a, 0xeb, 0x40, 0xe1, 0xfa, 0x58, -+ 0x25, 0x18, 0x41, 0x2b, 0x49, 0xb2, 0x08, 0xa7, -+ 0x84, 0x2b, 0x1e, 0x1f, 0x05, 0x6a, 0x04, 0x01, -+ 0x78, 0xea, 0x41, 0x41, 0x53, 0x4f, 0x65, 0x2d }, -+ .result = { 0xb7, 0x34, 0x10, 0x5d, 0xc2, 0x57, 0x58, 0x5d, -+ 0x73, 0xb5, 0x66, 0xcc, 0xb7, 0x6f, 0x06, 0x27, -+ 0x95, 0xcc, 0xbe, 0xc8, 0x91, 0x28, 0xe5, 0x2b, -+ 0x02, 0xf3, 0xe5, 0x96, 0x39, 0xf1, 0x3c, 0x46 }, -+ .valid = true -+ }, -+ /* wycheproof - checking for overflow */ -+ { -+ .private = { 0xc8, 0x17, 0x24, 0x70, 0x40, 0x00, 0xb2, 0x6d, -+ 0x31, 0x70, 0x3c, 0xc9, 0x7e, 0x3a, 0x37, 0x8d, -+ 0x56, 0xfa, 0xd8, 0x21, 0x93, 0x61, 0xc8, 0x8c, -+ 0xca, 0x8b, 0xd7, 0xc5, 0x71, 0x9b, 0x12, 0xb2 }, -+ .public = { 0xc8, 0xef, 0x79, 0xb5, 0x14, 0xd7, 0x68, 0x26, -+ 0x77, 0xbc, 0x79, 0x31, 0xe0, 0x6e, 0xe5, 0xc2, -+ 0x7c, 0x9b, 0x39, 0x2b, 0x4a, 0xe9, 0x48, 0x44, -+ 0x73, 0xf5, 0x54, 0xe6, 0x67, 0x8e, 0xcc, 0x2e }, -+ .result = { 0x64, 0x7a, 0x46, 0xb6, 0xfc, 0x3f, 0x40, 0xd6, -+ 0x21, 0x41, 0xee, 0x3c, 0xee, 0x70, 0x6b, 0x4d, -+ 0x7a, 0x92, 0x71, 0x59, 0x3a, 0x7b, 0x14, 0x3e, -+ 0x8e, 0x2e, 0x22, 0x79, 0x88, 0x3e, 0x45, 0x50 }, -+ .valid = true -+ }, -+ /* wycheproof - checking for overflow */ -+ { -+ .private = { 0xc8, 0x17, 0x24, 0x70, 0x40, 0x00, 0xb2, 0x6d, -+ 0x31, 0x70, 0x3c, 0xc9, 0x7e, 0x3a, 0x37, 0x8d, -+ 0x56, 0xfa, 0xd8, 0x21, 0x93, 0x61, 0xc8, 0x8c, -+ 0xca, 0x8b, 0xd7, 0xc5, 0x71, 0x9b, 0x12, 0xb2 }, -+ .public = { 0x64, 0xae, 0xac, 0x25, 0x04, 0x14, 0x48, 0x61, -+ 0x53, 0x2b, 0x7b, 0xbc, 0xb6, 0xc8, 0x7d, 0x67, -+ 0xdd, 0x4c, 0x1f, 0x07, 0xeb, 0xc2, 0xe0, 0x6e, -+ 0xff, 0xb9, 0x5a, 0xec, 0xc6, 0x17, 0x0b, 0x2c }, -+ .result = { 0x4f, 0xf0, 0x3d, 0x5f, 0xb4, 0x3c, 0xd8, 0x65, -+ 0x7a, 0x3c, 0xf3, 0x7c, 0x13, 0x8c, 0xad, 0xce, -+ 0xcc, 0xe5, 0x09, 0xe4, 0xeb, 0xa0, 0x89, 0xd0, -+ 0xef, 0x40, 0xb4, 0xe4, 0xfb, 0x94, 0x61, 0x55 }, -+ .valid = true -+ }, -+ /* wycheproof - checking for overflow */ -+ { -+ .private = { 0xc8, 0x17, 0x24, 0x70, 0x40, 0x00, 0xb2, 0x6d, -+ 0x31, 0x70, 0x3c, 0xc9, 0x7e, 0x3a, 0x37, 0x8d, -+ 0x56, 0xfa, 0xd8, 0x21, 0x93, 0x61, 0xc8, 0x8c, -+ 0xca, 0x8b, 0xd7, 0xc5, 0x71, 0x9b, 0x12, 0xb2 }, -+ .public = { 0xbf, 0x68, 0xe3, 0x5e, 0x9b, 0xdb, 0x7e, 0xee, -+ 0x1b, 0x50, 0x57, 0x02, 0x21, 0x86, 0x0f, 0x5d, -+ 0xcd, 0xad, 0x8a, 0xcb, 0xab, 0x03, 0x1b, 0x14, -+ 0x97, 0x4c, 0xc4, 0x90, 0x13, 0xc4, 0x98, 0x31 }, -+ .result = { 0x21, 0xce, 0xe5, 0x2e, 0xfd, 0xbc, 0x81, 0x2e, -+ 0x1d, 0x02, 0x1a, 0x4a, 0xf1, 0xe1, 0xd8, 0xbc, -+ 0x4d, 0xb3, 0xc4, 0x00, 0xe4, 0xd2, 0xa2, 0xc5, -+ 0x6a, 0x39, 0x26, 0xdb, 0x4d, 0x99, 0xc6, 0x5b }, -+ .valid = true -+ }, -+ /* wycheproof - checking for overflow */ -+ { -+ .private = { 0xc8, 0x17, 0x24, 0x70, 0x40, 0x00, 0xb2, 0x6d, -+ 0x31, 0x70, 0x3c, 0xc9, 0x7e, 0x3a, 0x37, 0x8d, -+ 0x56, 0xfa, 0xd8, 0x21, 0x93, 0x61, 0xc8, 0x8c, -+ 0xca, 0x8b, 0xd7, 0xc5, 0x71, 0x9b, 0x12, 0xb2 }, -+ .public = { 0x53, 0x47, 0xc4, 0x91, 0x33, 0x1a, 0x64, 0xb4, -+ 0x3d, 0xdc, 0x68, 0x30, 0x34, 0xe6, 0x77, 0xf5, -+ 0x3d, 0xc3, 0x2b, 0x52, 0xa5, 0x2a, 0x57, 0x7c, -+ 0x15, 0xa8, 0x3b, 0xf2, 0x98, 0xe9, 0x9f, 0x19 }, -+ .result = { 0x18, 0xcb, 0x89, 0xe4, 0xe2, 0x0c, 0x0c, 0x2b, -+ 0xd3, 0x24, 0x30, 0x52, 0x45, 0x26, 0x6c, 0x93, -+ 0x27, 0x69, 0x0b, 0xbe, 0x79, 0xac, 0xb8, 0x8f, -+ 0x5b, 0x8f, 0xb3, 0xf7, 0x4e, 0xca, 0x3e, 0x52 }, -+ .valid = true -+ }, -+ /* wycheproof - private key == -1 (mod order) */ -+ { -+ .private = { 0xa0, 0x23, 0xcd, 0xd0, 0x83, 0xef, 0x5b, 0xb8, -+ 0x2f, 0x10, 0xd6, 0x2e, 0x59, 0xe1, 0x5a, 0x68, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50 }, -+ .public = { 0x25, 0x8e, 0x04, 0x52, 0x3b, 0x8d, 0x25, 0x3e, -+ 0xe6, 0x57, 0x19, 0xfc, 0x69, 0x06, 0xc6, 0x57, -+ 0x19, 0x2d, 0x80, 0x71, 0x7e, 0xdc, 0x82, 0x8f, -+ 0xa0, 0xaf, 0x21, 0x68, 0x6e, 0x2f, 0xaa, 0x75 }, -+ .result = { 0x25, 0x8e, 0x04, 0x52, 0x3b, 0x8d, 0x25, 0x3e, -+ 0xe6, 0x57, 0x19, 0xfc, 0x69, 0x06, 0xc6, 0x57, -+ 0x19, 0x2d, 0x80, 0x71, 0x7e, 0xdc, 0x82, 0x8f, -+ 0xa0, 0xaf, 0x21, 0x68, 0x6e, 0x2f, 0xaa, 0x75 }, -+ .valid = true -+ }, -+ /* wycheproof - private key == 1 (mod order) on twist */ -+ { -+ .private = { 0x58, 0x08, 0x3d, 0xd2, 0x61, 0xad, 0x91, 0xef, -+ 0xf9, 0x52, 0x32, 0x2e, 0xc8, 0x24, 0xc6, 0x82, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5f }, -+ .public = { 0x2e, 0xae, 0x5e, 0xc3, 0xdd, 0x49, 0x4e, 0x9f, -+ 0x2d, 0x37, 0xd2, 0x58, 0xf8, 0x73, 0xa8, 0xe6, -+ 0xe9, 0xd0, 0xdb, 0xd1, 0xe3, 0x83, 0xef, 0x64, -+ 0xd9, 0x8b, 0xb9, 0x1b, 0x3e, 0x0b, 0xe0, 0x35 }, -+ .result = { 0x2e, 0xae, 0x5e, 0xc3, 0xdd, 0x49, 0x4e, 0x9f, -+ 0x2d, 0x37, 0xd2, 0x58, 0xf8, 0x73, 0xa8, 0xe6, -+ 0xe9, 0xd0, 0xdb, 0xd1, 0xe3, 0x83, 0xef, 0x64, -+ 0xd9, 0x8b, 0xb9, 0x1b, 0x3e, 0x0b, 0xe0, 0x35 }, -+ .valid = true -+ } -+}; -+ -+static bool __init curve25519_selftest(void) -+{ -+ bool success = true, ret, ret2; -+ size_t i = 0, j; -+ u8 in[CURVE25519_KEY_SIZE]; -+ u8 out[CURVE25519_KEY_SIZE], out2[CURVE25519_KEY_SIZE]; -+ -+ for (i = 0; i < ARRAY_SIZE(curve25519_test_vectors); ++i) { -+ memset(out, 0, CURVE25519_KEY_SIZE); -+ ret = curve25519(out, curve25519_test_vectors[i].private, -+ curve25519_test_vectors[i].public); -+ if (ret != curve25519_test_vectors[i].valid || -+ memcmp(out, curve25519_test_vectors[i].result, -+ CURVE25519_KEY_SIZE)) { -+ pr_err("curve25519 self-test %zu: FAIL\n", i + 1); -+ success = false; -+ } -+ } -+ -+ for (i = 0; i < 5; ++i) { -+ get_random_bytes(in, sizeof(in)); -+ ret = curve25519_generate_public(out, in); -+ ret2 = curve25519(out2, in, (u8[CURVE25519_KEY_SIZE]){ 9 }); -+ if (ret != ret2 || memcmp(out, out2, CURVE25519_KEY_SIZE)) { -+ pr_err("curve25519 basepoint self-test %zu: FAIL: input - 0x", -+ i + 1); -+ for (j = CURVE25519_KEY_SIZE; j-- > 0;) -+ printk(KERN_CONT "%02x", in[j]); -+ printk(KERN_CONT "\n"); -+ success = false; -+ } -+ } -+ -+ return success; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/selftest/poly1305.c 2019-08-20 20:26:42.407341426 +0000 -@@ -0,0 +1,1107 @@ -+// SPDX-License-Identifier: GPL-2.0 OR MIT -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+struct poly1305_testvec { -+ const u8 *input, *output, *key; -+ size_t ilen; -+}; -+ -+/* RFC7539 */ -+static const u8 input01[] __initconst = { -+ 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x67, 0x72, -+ 0x61, 0x70, 0x68, 0x69, 0x63, 0x20, 0x46, 0x6f, -+ 0x72, 0x75, 0x6d, 0x20, 0x52, 0x65, 0x73, 0x65, -+ 0x61, 0x72, 0x63, 0x68, 0x20, 0x47, 0x72, 0x6f, -+ 0x75, 0x70 -+}; -+static const u8 output01[] __initconst = { -+ 0xa8, 0x06, 0x1d, 0xc1, 0x30, 0x51, 0x36, 0xc6, -+ 0xc2, 0x2b, 0x8b, 0xaf, 0x0c, 0x01, 0x27, 0xa9 -+}; -+static const u8 key01[] __initconst = { -+ 0x85, 0xd6, 0xbe, 0x78, 0x57, 0x55, 0x6d, 0x33, -+ 0x7f, 0x44, 0x52, 0xfe, 0x42, 0xd5, 0x06, 0xa8, -+ 0x01, 0x03, 0x80, 0x8a, 0xfb, 0x0d, 0xb2, 0xfd, -+ 0x4a, 0xbf, 0xf6, 0xaf, 0x41, 0x49, 0xf5, 0x1b -+}; -+ -+/* "The Poly1305-AES message-authentication code" */ -+static const u8 input02[] __initconst = { -+ 0xf3, 0xf6 -+}; -+static const u8 output02[] __initconst = { -+ 0xf4, 0xc6, 0x33, 0xc3, 0x04, 0x4f, 0xc1, 0x45, -+ 0xf8, 0x4f, 0x33, 0x5c, 0xb8, 0x19, 0x53, 0xde -+}; -+static const u8 key02[] __initconst = { -+ 0x85, 0x1f, 0xc4, 0x0c, 0x34, 0x67, 0xac, 0x0b, -+ 0xe0, 0x5c, 0xc2, 0x04, 0x04, 0xf3, 0xf7, 0x00, -+ 0x58, 0x0b, 0x3b, 0x0f, 0x94, 0x47, 0xbb, 0x1e, -+ 0x69, 0xd0, 0x95, 0xb5, 0x92, 0x8b, 0x6d, 0xbc -+}; -+ -+static const u8 input03[] __initconst = { }; -+static const u8 output03[] __initconst = { -+ 0xdd, 0x3f, 0xab, 0x22, 0x51, 0xf1, 0x1a, 0xc7, -+ 0x59, 0xf0, 0x88, 0x71, 0x29, 0xcc, 0x2e, 0xe7 -+}; -+static const u8 key03[] __initconst = { -+ 0xa0, 0xf3, 0x08, 0x00, 0x00, 0xf4, 0x64, 0x00, -+ 0xd0, 0xc7, 0xe9, 0x07, 0x6c, 0x83, 0x44, 0x03, -+ 0xdd, 0x3f, 0xab, 0x22, 0x51, 0xf1, 0x1a, 0xc7, -+ 0x59, 0xf0, 0x88, 0x71, 0x29, 0xcc, 0x2e, 0xe7 -+}; -+ -+static const u8 input04[] __initconst = { -+ 0x66, 0x3c, 0xea, 0x19, 0x0f, 0xfb, 0x83, 0xd8, -+ 0x95, 0x93, 0xf3, 0xf4, 0x76, 0xb6, 0xbc, 0x24, -+ 0xd7, 0xe6, 0x79, 0x10, 0x7e, 0xa2, 0x6a, 0xdb, -+ 0x8c, 0xaf, 0x66, 0x52, 0xd0, 0x65, 0x61, 0x36 -+}; -+static const u8 output04[] __initconst = { -+ 0x0e, 0xe1, 0xc1, 0x6b, 0xb7, 0x3f, 0x0f, 0x4f, -+ 0xd1, 0x98, 0x81, 0x75, 0x3c, 0x01, 0xcd, 0xbe -+}; -+static const u8 key04[] __initconst = { -+ 0x48, 0x44, 0x3d, 0x0b, 0xb0, 0xd2, 0x11, 0x09, -+ 0xc8, 0x9a, 0x10, 0x0b, 0x5c, 0xe2, 0xc2, 0x08, -+ 0x83, 0x14, 0x9c, 0x69, 0xb5, 0x61, 0xdd, 0x88, -+ 0x29, 0x8a, 0x17, 0x98, 0xb1, 0x07, 0x16, 0xef -+}; -+ -+static const u8 input05[] __initconst = { -+ 0xab, 0x08, 0x12, 0x72, 0x4a, 0x7f, 0x1e, 0x34, -+ 0x27, 0x42, 0xcb, 0xed, 0x37, 0x4d, 0x94, 0xd1, -+ 0x36, 0xc6, 0xb8, 0x79, 0x5d, 0x45, 0xb3, 0x81, -+ 0x98, 0x30, 0xf2, 0xc0, 0x44, 0x91, 0xfa, 0xf0, -+ 0x99, 0x0c, 0x62, 0xe4, 0x8b, 0x80, 0x18, 0xb2, -+ 0xc3, 0xe4, 0xa0, 0xfa, 0x31, 0x34, 0xcb, 0x67, -+ 0xfa, 0x83, 0xe1, 0x58, 0xc9, 0x94, 0xd9, 0x61, -+ 0xc4, 0xcb, 0x21, 0x09, 0x5c, 0x1b, 0xf9 -+}; -+static const u8 output05[] __initconst = { -+ 0x51, 0x54, 0xad, 0x0d, 0x2c, 0xb2, 0x6e, 0x01, -+ 0x27, 0x4f, 0xc5, 0x11, 0x48, 0x49, 0x1f, 0x1b -+}; -+static const u8 key05[] __initconst = { -+ 0x12, 0x97, 0x6a, 0x08, 0xc4, 0x42, 0x6d, 0x0c, -+ 0xe8, 0xa8, 0x24, 0x07, 0xc4, 0xf4, 0x82, 0x07, -+ 0x80, 0xf8, 0xc2, 0x0a, 0xa7, 0x12, 0x02, 0xd1, -+ 0xe2, 0x91, 0x79, 0xcb, 0xcb, 0x55, 0x5a, 0x57 -+}; -+ -+/* self-generated vectors exercise "significant" lengths, such that they -+ * are handled by different code paths */ -+static const u8 input06[] __initconst = { -+ 0xab, 0x08, 0x12, 0x72, 0x4a, 0x7f, 0x1e, 0x34, -+ 0x27, 0x42, 0xcb, 0xed, 0x37, 0x4d, 0x94, 0xd1, -+ 0x36, 0xc6, 0xb8, 0x79, 0x5d, 0x45, 0xb3, 0x81, -+ 0x98, 0x30, 0xf2, 0xc0, 0x44, 0x91, 0xfa, 0xf0, -+ 0x99, 0x0c, 0x62, 0xe4, 0x8b, 0x80, 0x18, 0xb2, -+ 0xc3, 0xe4, 0xa0, 0xfa, 0x31, 0x34, 0xcb, 0x67, -+ 0xfa, 0x83, 0xe1, 0x58, 0xc9, 0x94, 0xd9, 0x61, -+ 0xc4, 0xcb, 0x21, 0x09, 0x5c, 0x1b, 0xf9, 0xaf -+}; -+static const u8 output06[] __initconst = { -+ 0x81, 0x20, 0x59, 0xa5, 0xda, 0x19, 0x86, 0x37, -+ 0xca, 0xc7, 0xc4, 0xa6, 0x31, 0xbe, 0xe4, 0x66 -+}; -+static const u8 key06[] __initconst = { -+ 0x12, 0x97, 0x6a, 0x08, 0xc4, 0x42, 0x6d, 0x0c, -+ 0xe8, 0xa8, 0x24, 0x07, 0xc4, 0xf4, 0x82, 0x07, -+ 0x80, 0xf8, 0xc2, 0x0a, 0xa7, 0x12, 0x02, 0xd1, -+ 0xe2, 0x91, 0x79, 0xcb, 0xcb, 0x55, 0x5a, 0x57 -+}; -+ -+static const u8 input07[] __initconst = { -+ 0xab, 0x08, 0x12, 0x72, 0x4a, 0x7f, 0x1e, 0x34, -+ 0x27, 0x42, 0xcb, 0xed, 0x37, 0x4d, 0x94, 0xd1, -+ 0x36, 0xc6, 0xb8, 0x79, 0x5d, 0x45, 0xb3, 0x81, -+ 0x98, 0x30, 0xf2, 0xc0, 0x44, 0x91, 0xfa, 0xf0, -+ 0x99, 0x0c, 0x62, 0xe4, 0x8b, 0x80, 0x18, 0xb2, -+ 0xc3, 0xe4, 0xa0, 0xfa, 0x31, 0x34, 0xcb, 0x67 -+}; -+static const u8 output07[] __initconst = { -+ 0x5b, 0x88, 0xd7, 0xf6, 0x22, 0x8b, 0x11, 0xe2, -+ 0xe2, 0x85, 0x79, 0xa5, 0xc0, 0xc1, 0xf7, 0x61 -+}; -+static const u8 key07[] __initconst = { -+ 0x12, 0x97, 0x6a, 0x08, 0xc4, 0x42, 0x6d, 0x0c, -+ 0xe8, 0xa8, 0x24, 0x07, 0xc4, 0xf4, 0x82, 0x07, -+ 0x80, 0xf8, 0xc2, 0x0a, 0xa7, 0x12, 0x02, 0xd1, -+ 0xe2, 0x91, 0x79, 0xcb, 0xcb, 0x55, 0x5a, 0x57 -+}; -+ -+static const u8 input08[] __initconst = { -+ 0xab, 0x08, 0x12, 0x72, 0x4a, 0x7f, 0x1e, 0x34, -+ 0x27, 0x42, 0xcb, 0xed, 0x37, 0x4d, 0x94, 0xd1, -+ 0x36, 0xc6, 0xb8, 0x79, 0x5d, 0x45, 0xb3, 0x81, -+ 0x98, 0x30, 0xf2, 0xc0, 0x44, 0x91, 0xfa, 0xf0, -+ 0x99, 0x0c, 0x62, 0xe4, 0x8b, 0x80, 0x18, 0xb2, -+ 0xc3, 0xe4, 0xa0, 0xfa, 0x31, 0x34, 0xcb, 0x67, -+ 0xfa, 0x83, 0xe1, 0x58, 0xc9, 0x94, 0xd9, 0x61, -+ 0xc4, 0xcb, 0x21, 0x09, 0x5c, 0x1b, 0xf9, 0xaf, -+ 0x66, 0x3c, 0xea, 0x19, 0x0f, 0xfb, 0x83, 0xd8, -+ 0x95, 0x93, 0xf3, 0xf4, 0x76, 0xb6, 0xbc, 0x24, -+ 0xd7, 0xe6, 0x79, 0x10, 0x7e, 0xa2, 0x6a, 0xdb, -+ 0x8c, 0xaf, 0x66, 0x52, 0xd0, 0x65, 0x61, 0x36 -+}; -+static const u8 output08[] __initconst = { -+ 0xbb, 0xb6, 0x13, 0xb2, 0xb6, 0xd7, 0x53, 0xba, -+ 0x07, 0x39, 0x5b, 0x91, 0x6a, 0xae, 0xce, 0x15 -+}; -+static const u8 key08[] __initconst = { -+ 0x12, 0x97, 0x6a, 0x08, 0xc4, 0x42, 0x6d, 0x0c, -+ 0xe8, 0xa8, 0x24, 0x07, 0xc4, 0xf4, 0x82, 0x07, -+ 0x80, 0xf8, 0xc2, 0x0a, 0xa7, 0x12, 0x02, 0xd1, -+ 0xe2, 0x91, 0x79, 0xcb, 0xcb, 0x55, 0x5a, 0x57 -+}; -+ -+static const u8 input09[] __initconst = { -+ 0xab, 0x08, 0x12, 0x72, 0x4a, 0x7f, 0x1e, 0x34, -+ 0x27, 0x42, 0xcb, 0xed, 0x37, 0x4d, 0x94, 0xd1, -+ 0x36, 0xc6, 0xb8, 0x79, 0x5d, 0x45, 0xb3, 0x81, -+ 0x98, 0x30, 0xf2, 0xc0, 0x44, 0x91, 0xfa, 0xf0, -+ 0x99, 0x0c, 0x62, 0xe4, 0x8b, 0x80, 0x18, 0xb2, -+ 0xc3, 0xe4, 0xa0, 0xfa, 0x31, 0x34, 0xcb, 0x67, -+ 0xfa, 0x83, 0xe1, 0x58, 0xc9, 0x94, 0xd9, 0x61, -+ 0xc4, 0xcb, 0x21, 0x09, 0x5c, 0x1b, 0xf9, 0xaf, -+ 0x48, 0x44, 0x3d, 0x0b, 0xb0, 0xd2, 0x11, 0x09, -+ 0xc8, 0x9a, 0x10, 0x0b, 0x5c, 0xe2, 0xc2, 0x08, -+ 0x83, 0x14, 0x9c, 0x69, 0xb5, 0x61, 0xdd, 0x88, -+ 0x29, 0x8a, 0x17, 0x98, 0xb1, 0x07, 0x16, 0xef, -+ 0x66, 0x3c, 0xea, 0x19, 0x0f, 0xfb, 0x83, 0xd8, -+ 0x95, 0x93, 0xf3, 0xf4, 0x76, 0xb6, 0xbc, 0x24 -+}; -+static const u8 output09[] __initconst = { -+ 0xc7, 0x94, 0xd7, 0x05, 0x7d, 0x17, 0x78, 0xc4, -+ 0xbb, 0xee, 0x0a, 0x39, 0xb3, 0xd9, 0x73, 0x42 -+}; -+static const u8 key09[] __initconst = { -+ 0x12, 0x97, 0x6a, 0x08, 0xc4, 0x42, 0x6d, 0x0c, -+ 0xe8, 0xa8, 0x24, 0x07, 0xc4, 0xf4, 0x82, 0x07, -+ 0x80, 0xf8, 0xc2, 0x0a, 0xa7, 0x12, 0x02, 0xd1, -+ 0xe2, 0x91, 0x79, 0xcb, 0xcb, 0x55, 0x5a, 0x57 -+}; -+ -+static const u8 input10[] __initconst = { -+ 0xab, 0x08, 0x12, 0x72, 0x4a, 0x7f, 0x1e, 0x34, -+ 0x27, 0x42, 0xcb, 0xed, 0x37, 0x4d, 0x94, 0xd1, -+ 0x36, 0xc6, 0xb8, 0x79, 0x5d, 0x45, 0xb3, 0x81, -+ 0x98, 0x30, 0xf2, 0xc0, 0x44, 0x91, 0xfa, 0xf0, -+ 0x99, 0x0c, 0x62, 0xe4, 0x8b, 0x80, 0x18, 0xb2, -+ 0xc3, 0xe4, 0xa0, 0xfa, 0x31, 0x34, 0xcb, 0x67, -+ 0xfa, 0x83, 0xe1, 0x58, 0xc9, 0x94, 0xd9, 0x61, -+ 0xc4, 0xcb, 0x21, 0x09, 0x5c, 0x1b, 0xf9, 0xaf, -+ 0x48, 0x44, 0x3d, 0x0b, 0xb0, 0xd2, 0x11, 0x09, -+ 0xc8, 0x9a, 0x10, 0x0b, 0x5c, 0xe2, 0xc2, 0x08, -+ 0x83, 0x14, 0x9c, 0x69, 0xb5, 0x61, 0xdd, 0x88, -+ 0x29, 0x8a, 0x17, 0x98, 0xb1, 0x07, 0x16, 0xef, -+ 0x66, 0x3c, 0xea, 0x19, 0x0f, 0xfb, 0x83, 0xd8, -+ 0x95, 0x93, 0xf3, 0xf4, 0x76, 0xb6, 0xbc, 0x24, -+ 0xd7, 0xe6, 0x79, 0x10, 0x7e, 0xa2, 0x6a, 0xdb, -+ 0x8c, 0xaf, 0x66, 0x52, 0xd0, 0x65, 0x61, 0x36 -+}; -+static const u8 output10[] __initconst = { -+ 0xff, 0xbc, 0xb9, 0xb3, 0x71, 0x42, 0x31, 0x52, -+ 0xd7, 0xfc, 0xa5, 0xad, 0x04, 0x2f, 0xba, 0xa9 -+}; -+static const u8 key10[] __initconst = { -+ 0x12, 0x97, 0x6a, 0x08, 0xc4, 0x42, 0x6d, 0x0c, -+ 0xe8, 0xa8, 0x24, 0x07, 0xc4, 0xf4, 0x82, 0x07, -+ 0x80, 0xf8, 0xc2, 0x0a, 0xa7, 0x12, 0x02, 0xd1, -+ 0xe2, 0x91, 0x79, 0xcb, 0xcb, 0x55, 0x5a, 0x57 -+}; -+ -+static const u8 input11[] __initconst = { -+ 0xab, 0x08, 0x12, 0x72, 0x4a, 0x7f, 0x1e, 0x34, -+ 0x27, 0x42, 0xcb, 0xed, 0x37, 0x4d, 0x94, 0xd1, -+ 0x36, 0xc6, 0xb8, 0x79, 0x5d, 0x45, 0xb3, 0x81, -+ 0x98, 0x30, 0xf2, 0xc0, 0x44, 0x91, 0xfa, 0xf0, -+ 0x99, 0x0c, 0x62, 0xe4, 0x8b, 0x80, 0x18, 0xb2, -+ 0xc3, 0xe4, 0xa0, 0xfa, 0x31, 0x34, 0xcb, 0x67, -+ 0xfa, 0x83, 0xe1, 0x58, 0xc9, 0x94, 0xd9, 0x61, -+ 0xc4, 0xcb, 0x21, 0x09, 0x5c, 0x1b, 0xf9, 0xaf, -+ 0x48, 0x44, 0x3d, 0x0b, 0xb0, 0xd2, 0x11, 0x09, -+ 0xc8, 0x9a, 0x10, 0x0b, 0x5c, 0xe2, 0xc2, 0x08, -+ 0x83, 0x14, 0x9c, 0x69, 0xb5, 0x61, 0xdd, 0x88, -+ 0x29, 0x8a, 0x17, 0x98, 0xb1, 0x07, 0x16, 0xef, -+ 0x66, 0x3c, 0xea, 0x19, 0x0f, 0xfb, 0x83, 0xd8, -+ 0x95, 0x93, 0xf3, 0xf4, 0x76, 0xb6, 0xbc, 0x24, -+ 0xd7, 0xe6, 0x79, 0x10, 0x7e, 0xa2, 0x6a, 0xdb, -+ 0x8c, 0xaf, 0x66, 0x52, 0xd0, 0x65, 0x61, 0x36, -+ 0x81, 0x20, 0x59, 0xa5, 0xda, 0x19, 0x86, 0x37, -+ 0xca, 0xc7, 0xc4, 0xa6, 0x31, 0xbe, 0xe4, 0x66 -+}; -+static const u8 output11[] __initconst = { -+ 0x06, 0x9e, 0xd6, 0xb8, 0xef, 0x0f, 0x20, 0x7b, -+ 0x3e, 0x24, 0x3b, 0xb1, 0x01, 0x9f, 0xe6, 0x32 -+}; -+static const u8 key11[] __initconst = { -+ 0x12, 0x97, 0x6a, 0x08, 0xc4, 0x42, 0x6d, 0x0c, -+ 0xe8, 0xa8, 0x24, 0x07, 0xc4, 0xf4, 0x82, 0x07, -+ 0x80, 0xf8, 0xc2, 0x0a, 0xa7, 0x12, 0x02, 0xd1, -+ 0xe2, 0x91, 0x79, 0xcb, 0xcb, 0x55, 0x5a, 0x57 -+}; -+ -+static const u8 input12[] __initconst = { -+ 0xab, 0x08, 0x12, 0x72, 0x4a, 0x7f, 0x1e, 0x34, -+ 0x27, 0x42, 0xcb, 0xed, 0x37, 0x4d, 0x94, 0xd1, -+ 0x36, 0xc6, 0xb8, 0x79, 0x5d, 0x45, 0xb3, 0x81, -+ 0x98, 0x30, 0xf2, 0xc0, 0x44, 0x91, 0xfa, 0xf0, -+ 0x99, 0x0c, 0x62, 0xe4, 0x8b, 0x80, 0x18, 0xb2, -+ 0xc3, 0xe4, 0xa0, 0xfa, 0x31, 0x34, 0xcb, 0x67, -+ 0xfa, 0x83, 0xe1, 0x58, 0xc9, 0x94, 0xd9, 0x61, -+ 0xc4, 0xcb, 0x21, 0x09, 0x5c, 0x1b, 0xf9, 0xaf, -+ 0x48, 0x44, 0x3d, 0x0b, 0xb0, 0xd2, 0x11, 0x09, -+ 0xc8, 0x9a, 0x10, 0x0b, 0x5c, 0xe2, 0xc2, 0x08, -+ 0x83, 0x14, 0x9c, 0x69, 0xb5, 0x61, 0xdd, 0x88, -+ 0x29, 0x8a, 0x17, 0x98, 0xb1, 0x07, 0x16, 0xef, -+ 0x66, 0x3c, 0xea, 0x19, 0x0f, 0xfb, 0x83, 0xd8, -+ 0x95, 0x93, 0xf3, 0xf4, 0x76, 0xb6, 0xbc, 0x24, -+ 0xd7, 0xe6, 0x79, 0x10, 0x7e, 0xa2, 0x6a, 0xdb, -+ 0x8c, 0xaf, 0x66, 0x52, 0xd0, 0x65, 0x61, 0x36, -+ 0x81, 0x20, 0x59, 0xa5, 0xda, 0x19, 0x86, 0x37, -+ 0xca, 0xc7, 0xc4, 0xa6, 0x31, 0xbe, 0xe4, 0x66, -+ 0x5b, 0x88, 0xd7, 0xf6, 0x22, 0x8b, 0x11, 0xe2, -+ 0xe2, 0x85, 0x79, 0xa5, 0xc0, 0xc1, 0xf7, 0x61 -+}; -+static const u8 output12[] __initconst = { -+ 0xcc, 0xa3, 0x39, 0xd9, 0xa4, 0x5f, 0xa2, 0x36, -+ 0x8c, 0x2c, 0x68, 0xb3, 0xa4, 0x17, 0x91, 0x33 -+}; -+static const u8 key12[] __initconst = { -+ 0x12, 0x97, 0x6a, 0x08, 0xc4, 0x42, 0x6d, 0x0c, -+ 0xe8, 0xa8, 0x24, 0x07, 0xc4, 0xf4, 0x82, 0x07, -+ 0x80, 0xf8, 0xc2, 0x0a, 0xa7, 0x12, 0x02, 0xd1, -+ 0xe2, 0x91, 0x79, 0xcb, 0xcb, 0x55, 0x5a, 0x57 -+}; -+ -+static const u8 input13[] __initconst = { -+ 0xab, 0x08, 0x12, 0x72, 0x4a, 0x7f, 0x1e, 0x34, -+ 0x27, 0x42, 0xcb, 0xed, 0x37, 0x4d, 0x94, 0xd1, -+ 0x36, 0xc6, 0xb8, 0x79, 0x5d, 0x45, 0xb3, 0x81, -+ 0x98, 0x30, 0xf2, 0xc0, 0x44, 0x91, 0xfa, 0xf0, -+ 0x99, 0x0c, 0x62, 0xe4, 0x8b, 0x80, 0x18, 0xb2, -+ 0xc3, 0xe4, 0xa0, 0xfa, 0x31, 0x34, 0xcb, 0x67, -+ 0xfa, 0x83, 0xe1, 0x58, 0xc9, 0x94, 0xd9, 0x61, -+ 0xc4, 0xcb, 0x21, 0x09, 0x5c, 0x1b, 0xf9, 0xaf, -+ 0x48, 0x44, 0x3d, 0x0b, 0xb0, 0xd2, 0x11, 0x09, -+ 0xc8, 0x9a, 0x10, 0x0b, 0x5c, 0xe2, 0xc2, 0x08, -+ 0x83, 0x14, 0x9c, 0x69, 0xb5, 0x61, 0xdd, 0x88, -+ 0x29, 0x8a, 0x17, 0x98, 0xb1, 0x07, 0x16, 0xef, -+ 0x66, 0x3c, 0xea, 0x19, 0x0f, 0xfb, 0x83, 0xd8, -+ 0x95, 0x93, 0xf3, 0xf4, 0x76, 0xb6, 0xbc, 0x24, -+ 0xd7, 0xe6, 0x79, 0x10, 0x7e, 0xa2, 0x6a, 0xdb, -+ 0x8c, 0xaf, 0x66, 0x52, 0xd0, 0x65, 0x61, 0x36, -+ 0x81, 0x20, 0x59, 0xa5, 0xda, 0x19, 0x86, 0x37, -+ 0xca, 0xc7, 0xc4, 0xa6, 0x31, 0xbe, 0xe4, 0x66, -+ 0x5b, 0x88, 0xd7, 0xf6, 0x22, 0x8b, 0x11, 0xe2, -+ 0xe2, 0x85, 0x79, 0xa5, 0xc0, 0xc1, 0xf7, 0x61, -+ 0xab, 0x08, 0x12, 0x72, 0x4a, 0x7f, 0x1e, 0x34, -+ 0x27, 0x42, 0xcb, 0xed, 0x37, 0x4d, 0x94, 0xd1, -+ 0x36, 0xc6, 0xb8, 0x79, 0x5d, 0x45, 0xb3, 0x81, -+ 0x98, 0x30, 0xf2, 0xc0, 0x44, 0x91, 0xfa, 0xf0, -+ 0x99, 0x0c, 0x62, 0xe4, 0x8b, 0x80, 0x18, 0xb2, -+ 0xc3, 0xe4, 0xa0, 0xfa, 0x31, 0x34, 0xcb, 0x67, -+ 0xfa, 0x83, 0xe1, 0x58, 0xc9, 0x94, 0xd9, 0x61, -+ 0xc4, 0xcb, 0x21, 0x09, 0x5c, 0x1b, 0xf9, 0xaf, -+ 0x48, 0x44, 0x3d, 0x0b, 0xb0, 0xd2, 0x11, 0x09, -+ 0xc8, 0x9a, 0x10, 0x0b, 0x5c, 0xe2, 0xc2, 0x08, -+ 0x83, 0x14, 0x9c, 0x69, 0xb5, 0x61, 0xdd, 0x88, -+ 0x29, 0x8a, 0x17, 0x98, 0xb1, 0x07, 0x16, 0xef, -+ 0x66, 0x3c, 0xea, 0x19, 0x0f, 0xfb, 0x83, 0xd8, -+ 0x95, 0x93, 0xf3, 0xf4, 0x76, 0xb6, 0xbc, 0x24, -+ 0xd7, 0xe6, 0x79, 0x10, 0x7e, 0xa2, 0x6a, 0xdb, -+ 0x8c, 0xaf, 0x66, 0x52, 0xd0, 0x65, 0x61, 0x36 -+}; -+static const u8 output13[] __initconst = { -+ 0x53, 0xf6, 0xe8, 0x28, 0xa2, 0xf0, 0xfe, 0x0e, -+ 0xe8, 0x15, 0xbf, 0x0b, 0xd5, 0x84, 0x1a, 0x34 -+}; -+static const u8 key13[] __initconst = { -+ 0x12, 0x97, 0x6a, 0x08, 0xc4, 0x42, 0x6d, 0x0c, -+ 0xe8, 0xa8, 0x24, 0x07, 0xc4, 0xf4, 0x82, 0x07, -+ 0x80, 0xf8, 0xc2, 0x0a, 0xa7, 0x12, 0x02, 0xd1, -+ 0xe2, 0x91, 0x79, 0xcb, 0xcb, 0x55, 0x5a, 0x57 -+}; -+ -+static const u8 input14[] __initconst = { -+ 0xab, 0x08, 0x12, 0x72, 0x4a, 0x7f, 0x1e, 0x34, -+ 0x27, 0x42, 0xcb, 0xed, 0x37, 0x4d, 0x94, 0xd1, -+ 0x36, 0xc6, 0xb8, 0x79, 0x5d, 0x45, 0xb3, 0x81, -+ 0x98, 0x30, 0xf2, 0xc0, 0x44, 0x91, 0xfa, 0xf0, -+ 0x99, 0x0c, 0x62, 0xe4, 0x8b, 0x80, 0x18, 0xb2, -+ 0xc3, 0xe4, 0xa0, 0xfa, 0x31, 0x34, 0xcb, 0x67, -+ 0xfa, 0x83, 0xe1, 0x58, 0xc9, 0x94, 0xd9, 0x61, -+ 0xc4, 0xcb, 0x21, 0x09, 0x5c, 0x1b, 0xf9, 0xaf, -+ 0x48, 0x44, 0x3d, 0x0b, 0xb0, 0xd2, 0x11, 0x09, -+ 0xc8, 0x9a, 0x10, 0x0b, 0x5c, 0xe2, 0xc2, 0x08, -+ 0x83, 0x14, 0x9c, 0x69, 0xb5, 0x61, 0xdd, 0x88, -+ 0x29, 0x8a, 0x17, 0x98, 0xb1, 0x07, 0x16, 0xef, -+ 0x66, 0x3c, 0xea, 0x19, 0x0f, 0xfb, 0x83, 0xd8, -+ 0x95, 0x93, 0xf3, 0xf4, 0x76, 0xb6, 0xbc, 0x24, -+ 0xd7, 0xe6, 0x79, 0x10, 0x7e, 0xa2, 0x6a, 0xdb, -+ 0x8c, 0xaf, 0x66, 0x52, 0xd0, 0x65, 0x61, 0x36, -+ 0x81, 0x20, 0x59, 0xa5, 0xda, 0x19, 0x86, 0x37, -+ 0xca, 0xc7, 0xc4, 0xa6, 0x31, 0xbe, 0xe4, 0x66, -+ 0x5b, 0x88, 0xd7, 0xf6, 0x22, 0x8b, 0x11, 0xe2, -+ 0xe2, 0x85, 0x79, 0xa5, 0xc0, 0xc1, 0xf7, 0x61, -+ 0xab, 0x08, 0x12, 0x72, 0x4a, 0x7f, 0x1e, 0x34, -+ 0x27, 0x42, 0xcb, 0xed, 0x37, 0x4d, 0x94, 0xd1, -+ 0x36, 0xc6, 0xb8, 0x79, 0x5d, 0x45, 0xb3, 0x81, -+ 0x98, 0x30, 0xf2, 0xc0, 0x44, 0x91, 0xfa, 0xf0, -+ 0x99, 0x0c, 0x62, 0xe4, 0x8b, 0x80, 0x18, 0xb2, -+ 0xc3, 0xe4, 0xa0, 0xfa, 0x31, 0x34, 0xcb, 0x67, -+ 0xfa, 0x83, 0xe1, 0x58, 0xc9, 0x94, 0xd9, 0x61, -+ 0xc4, 0xcb, 0x21, 0x09, 0x5c, 0x1b, 0xf9, 0xaf, -+ 0x48, 0x44, 0x3d, 0x0b, 0xb0, 0xd2, 0x11, 0x09, -+ 0xc8, 0x9a, 0x10, 0x0b, 0x5c, 0xe2, 0xc2, 0x08, -+ 0x83, 0x14, 0x9c, 0x69, 0xb5, 0x61, 0xdd, 0x88, -+ 0x29, 0x8a, 0x17, 0x98, 0xb1, 0x07, 0x16, 0xef, -+ 0x66, 0x3c, 0xea, 0x19, 0x0f, 0xfb, 0x83, 0xd8, -+ 0x95, 0x93, 0xf3, 0xf4, 0x76, 0xb6, 0xbc, 0x24, -+ 0xd7, 0xe6, 0x79, 0x10, 0x7e, 0xa2, 0x6a, 0xdb, -+ 0x8c, 0xaf, 0x66, 0x52, 0xd0, 0x65, 0x61, 0x36, -+ 0x81, 0x20, 0x59, 0xa5, 0xda, 0x19, 0x86, 0x37, -+ 0xca, 0xc7, 0xc4, 0xa6, 0x31, 0xbe, 0xe4, 0x66, -+ 0x5b, 0x88, 0xd7, 0xf6, 0x22, 0x8b, 0x11, 0xe2, -+ 0xe2, 0x85, 0x79, 0xa5, 0xc0, 0xc1, 0xf7, 0x61 -+}; -+static const u8 output14[] __initconst = { -+ 0xb8, 0x46, 0xd4, 0x4e, 0x9b, 0xbd, 0x53, 0xce, -+ 0xdf, 0xfb, 0xfb, 0xb6, 0xb7, 0xfa, 0x49, 0x33 -+}; -+static const u8 key14[] __initconst = { -+ 0x12, 0x97, 0x6a, 0x08, 0xc4, 0x42, 0x6d, 0x0c, -+ 0xe8, 0xa8, 0x24, 0x07, 0xc4, 0xf4, 0x82, 0x07, -+ 0x80, 0xf8, 0xc2, 0x0a, 0xa7, 0x12, 0x02, 0xd1, -+ 0xe2, 0x91, 0x79, 0xcb, 0xcb, 0x55, 0x5a, 0x57 -+}; -+ -+/* 4th power of the key spills to 131th bit in SIMD key setup */ -+static const u8 input15[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 output15[] __initconst = { -+ 0x07, 0x14, 0x5a, 0x4c, 0x02, 0xfe, 0x5f, 0xa3, -+ 0x20, 0x36, 0xde, 0x68, 0xfa, 0xbe, 0x90, 0x66 -+}; -+static const u8 key15[] __initconst = { -+ 0xad, 0x62, 0x81, 0x07, 0xe8, 0x35, 0x1d, 0x0f, -+ 0x2c, 0x23, 0x1a, 0x05, 0xdc, 0x4a, 0x41, 0x06, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+ -+/* OpenSSL's poly1305_ieee754.c failed this in final stage */ -+static const u8 input16[] __initconst = { -+ 0x84, 0x23, 0x64, 0xe1, 0x56, 0x33, 0x6c, 0x09, -+ 0x98, 0xb9, 0x33, 0x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fa, 0x33, 0xd6, 0xb8, 0x28, 0x25, 0xff, 0xf4, -+ 0x4c, 0x9a, 0x70, 0xea, 0x54, 0xce, 0x47, 0xf0, -+ 0x7d, 0xf6, 0x98, 0xe6, 0xb0, 0x33, 0x23, 0xb5, -+ 0x30, 0x79, 0x36, 0x4a, 0x5f, 0xc3, 0xe9, 0xdd, -+ 0x03, 0x43, 0x92, 0xbd, 0xde, 0x86, 0xdc, 0xcd, -+ 0xda, 0x94, 0x32, 0x1c, 0x5e, 0x44, 0x06, 0x04, -+ 0x89, 0x33, 0x6c, 0xb6, 0x5b, 0xf3, 0x98, 0x9c, -+ 0x36, 0xf7, 0x28, 0x2c, 0x2f, 0x5d, 0x2b, 0x88, -+ 0x2c, 0x17, 0x1e, 0x74 -+}; -+static const u8 output16[] __initconst = { -+ 0xf2, 0x48, 0x31, 0x2e, 0x57, 0x8d, 0x9d, 0x58, -+ 0xf8, 0xb7, 0xbb, 0x4d, 0x19, 0x10, 0x54, 0x31 -+}; -+static const u8 key16[] __initconst = { -+ 0x95, 0xd5, 0xc0, 0x05, 0x50, 0x3e, 0x51, 0x0d, -+ 0x8c, 0xd0, 0xaa, 0x07, 0x2c, 0x4a, 0x4d, 0x06, -+ 0x6e, 0xab, 0xc5, 0x2d, 0x11, 0x65, 0x3d, 0xf4, -+ 0x7f, 0xbf, 0x63, 0xab, 0x19, 0x8b, 0xcc, 0x26 -+}; -+ -+/* AVX2 in OpenSSL's poly1305-x86.pl failed this with 176+32 split */ -+static const u8 input17[] __initconst = { -+ 0x24, 0x8a, 0xc3, 0x10, 0x85, 0xb6, 0xc2, 0xad, -+ 0xaa, 0xa3, 0x82, 0x59, 0xa0, 0xd7, 0x19, 0x2c, -+ 0x5c, 0x35, 0xd1, 0xbb, 0x4e, 0xf3, 0x9a, 0xd9, -+ 0x4c, 0x38, 0xd1, 0xc8, 0x24, 0x79, 0xe2, 0xdd, -+ 0x21, 0x59, 0xa0, 0x77, 0x02, 0x4b, 0x05, 0x89, -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0xbc, 0x93, 0x9b, 0xc5, 0x28, 0x14, 0x80, 0xfa, -+ 0x99, 0xc6, 0xd6, 0x8c, 0x25, 0x8e, 0xc4, 0x2f -+}; -+static const u8 key17[] __initconst = { -+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+ -+/* test vectors from Google */ -+static const u8 input18[] __initconst = { }; -+static const u8 output18[] __initconst = { -+ 0x47, 0x10, 0x13, 0x0e, 0x9f, 0x6f, 0xea, 0x8d, -+ 0x72, 0x29, 0x38, 0x50, 0xa6, 0x67, 0xd8, 0x6c -+}; -+static const u8 key18[] __initconst = { -+ 0xc8, 0xaf, 0xaa, 0xc3, 0x31, 0xee, 0x37, 0x2c, -+ 0xd6, 0x08, 0x2d, 0xe1, 0x34, 0x94, 0x3b, 0x17, -+ 0x47, 0x10, 0x13, 0x0e, 0x9f, 0x6f, 0xea, 0x8d, -+ 0x72, 0x29, 0x38, 0x50, 0xa6, 0x67, 0xd8, 0x6c -+}; -+ -+static const u8 input19[] __initconst = { -+ 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, -+ 0x72, 0x6c, 0x64, 0x21 -+}; -+static const u8 output19[] __initconst = { -+ 0xa6, 0xf7, 0x45, 0x00, 0x8f, 0x81, 0xc9, 0x16, -+ 0xa2, 0x0d, 0xcc, 0x74, 0xee, 0xf2, 0xb2, 0xf0 -+}; -+static const u8 key19[] __initconst = { -+ 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, -+ 0x33, 0x32, 0x2d, 0x62, 0x79, 0x74, 0x65, 0x20, -+ 0x6b, 0x65, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x20, -+ 0x50, 0x6f, 0x6c, 0x79, 0x31, 0x33, 0x30, 0x35 -+}; -+ -+static const u8 input20[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 output20[] __initconst = { -+ 0x49, 0xec, 0x78, 0x09, 0x0e, 0x48, 0x1e, 0xc6, -+ 0xc2, 0x6b, 0x33, 0xb9, 0x1c, 0xcc, 0x03, 0x07 -+}; -+static const u8 key20[] __initconst = { -+ 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, -+ 0x33, 0x32, 0x2d, 0x62, 0x79, 0x74, 0x65, 0x20, -+ 0x6b, 0x65, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x20, -+ 0x50, 0x6f, 0x6c, 0x79, 0x31, 0x33, 0x30, 0x35 -+}; -+ -+static const u8 input21[] __initconst = { -+ 0x89, 0xda, 0xb8, 0x0b, 0x77, 0x17, 0xc1, 0xdb, -+ 0x5d, 0xb4, 0x37, 0x86, 0x0a, 0x3f, 0x70, 0x21, -+ 0x8e, 0x93, 0xe1, 0xb8, 0xf4, 0x61, 0xfb, 0x67, -+ 0x7f, 0x16, 0xf3, 0x5f, 0x6f, 0x87, 0xe2, 0xa9, -+ 0x1c, 0x99, 0xbc, 0x3a, 0x47, 0xac, 0xe4, 0x76, -+ 0x40, 0xcc, 0x95, 0xc3, 0x45, 0xbe, 0x5e, 0xcc, -+ 0xa5, 0xa3, 0x52, 0x3c, 0x35, 0xcc, 0x01, 0x89, -+ 0x3a, 0xf0, 0xb6, 0x4a, 0x62, 0x03, 0x34, 0x27, -+ 0x03, 0x72, 0xec, 0x12, 0x48, 0x2d, 0x1b, 0x1e, -+ 0x36, 0x35, 0x61, 0x69, 0x8a, 0x57, 0x8b, 0x35, -+ 0x98, 0x03, 0x49, 0x5b, 0xb4, 0xe2, 0xef, 0x19, -+ 0x30, 0xb1, 0x7a, 0x51, 0x90, 0xb5, 0x80, 0xf1, -+ 0x41, 0x30, 0x0d, 0xf3, 0x0a, 0xdb, 0xec, 0xa2, -+ 0x8f, 0x64, 0x27, 0xa8, 0xbc, 0x1a, 0x99, 0x9f, -+ 0xd5, 0x1c, 0x55, 0x4a, 0x01, 0x7d, 0x09, 0x5d, -+ 0x8c, 0x3e, 0x31, 0x27, 0xda, 0xf9, 0xf5, 0x95 -+}; -+static const u8 output21[] __initconst = { -+ 0xc8, 0x5d, 0x15, 0xed, 0x44, 0xc3, 0x78, 0xd6, -+ 0xb0, 0x0e, 0x23, 0x06, 0x4c, 0x7b, 0xcd, 0x51 -+}; -+static const u8 key21[] __initconst = { -+ 0x2d, 0x77, 0x3b, 0xe3, 0x7a, 0xdb, 0x1e, 0x4d, -+ 0x68, 0x3b, 0xf0, 0x07, 0x5e, 0x79, 0xc4, 0xee, -+ 0x03, 0x79, 0x18, 0x53, 0x5a, 0x7f, 0x99, 0xcc, -+ 0xb7, 0x04, 0x0f, 0xb5, 0xf5, 0xf4, 0x3a, 0xea -+}; -+ -+static const u8 input22[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, -+ 0x17, 0x03, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, -+ 0x06, 0xdb, 0x1f, 0x1f, 0x36, 0x8d, 0x69, 0x6a, -+ 0x81, 0x0a, 0x34, 0x9c, 0x0c, 0x71, 0x4c, 0x9a, -+ 0x5e, 0x78, 0x50, 0xc2, 0x40, 0x7d, 0x72, 0x1a, -+ 0xcd, 0xed, 0x95, 0xe0, 0x18, 0xd7, 0xa8, 0x52, -+ 0x66, 0xa6, 0xe1, 0x28, 0x9c, 0xdb, 0x4a, 0xeb, -+ 0x18, 0xda, 0x5a, 0xc8, 0xa2, 0xb0, 0x02, 0x6d, -+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0xc1, 0xf2, 0x6c, 0x53, -+ 0x1c, 0xf9, 0xf9, 0x02, 0x03, 0xbc, 0x4c, 0xc1, -+ 0x9f, 0x59, 0x27, 0xd8, 0x34, 0xb0, 0xa4, 0x71, -+ 0x16, 0xd3, 0x88, 0x4b, 0xbb, 0x16, 0x4b, 0x8e, -+ 0xc8, 0x83, 0xd1, 0xac, 0x83, 0x2e, 0x56, 0xb3, -+ 0x91, 0x8a, 0x98, 0x60, 0x1a, 0x08, 0xd1, 0x71, -+ 0x88, 0x15, 0x41, 0xd5, 0x94, 0xdb, 0x39, 0x9c, -+ 0x6a, 0xe6, 0x15, 0x12, 0x21, 0x74, 0x5a, 0xec, -+ 0x81, 0x4c, 0x45, 0xb0, 0xb0, 0x5b, 0x56, 0x54, -+ 0x36, 0xfd, 0x6f, 0x13, 0x7a, 0xa1, 0x0a, 0x0c, -+ 0x0b, 0x64, 0x37, 0x61, 0xdb, 0xd6, 0xf9, 0xa9, -+ 0xdc, 0xb9, 0x9b, 0x1a, 0x6e, 0x69, 0x08, 0x54, -+ 0xce, 0x07, 0x69, 0xcd, 0xe3, 0x97, 0x61, 0xd8, -+ 0x2f, 0xcd, 0xec, 0x15, 0xf0, 0xd9, 0x2d, 0x7d, -+ 0x8e, 0x94, 0xad, 0xe8, 0xeb, 0x83, 0xfb, 0xe0 -+}; -+static const u8 output22[] __initconst = { -+ 0x26, 0x37, 0x40, 0x8f, 0xe1, 0x30, 0x86, 0xea, -+ 0x73, 0xf9, 0x71, 0xe3, 0x42, 0x5e, 0x28, 0x20 -+}; -+static const u8 key22[] __initconst = { -+ 0x99, 0xe5, 0x82, 0x2d, 0xd4, 0x17, 0x3c, 0x99, -+ 0x5e, 0x3d, 0xae, 0x0d, 0xde, 0xfb, 0x97, 0x74, -+ 0x3f, 0xde, 0x3b, 0x08, 0x01, 0x34, 0xb3, 0x9f, -+ 0x76, 0xe9, 0xbf, 0x8d, 0x0e, 0x88, 0xd5, 0x46 -+}; -+ -+/* test vectors from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xcc, 0xcc, 0xcc, -+ 0xcc, 0xcc, 0xff, 0xff, 0xff, 0xf5, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0xff, 0xff, 0xff, 0xe7, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x71, 0x92, 0x05, 0xa8, 0x52, 0x1d, -+ 0xfc -+}; -+static const u8 output23[] __initconst = { -+ 0x85, 0x59, 0xb8, 0x76, 0xec, 0xee, 0xd6, 0x6e, -+ 0xb3, 0x77, 0x98, 0xc0, 0x45, 0x7b, 0xaf, 0xf9 -+}; -+static const u8 key23[] __initconst = { -+ 0x7f, 0x1b, 0x02, 0x64, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc -+}; -+ -+static const u8 input24[] __initconst = { -+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, -+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, -+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, -+ 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x64 -+}; -+static const u8 output24[] __initconst = { -+ 0x00, 0xbd, 0x12, 0x58, 0x97, 0x8e, 0x20, 0x54, -+ 0x44, 0xc9, 0xaa, 0xaa, 0x82, 0x00, 0x6f, 0xed -+}; -+static const u8 key24[] __initconst = { -+ 0xe0, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, -+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa -+}; -+ -+static const u8 input25[] __initconst = { -+ 0x02, 0xfc -+}; -+static const u8 output25[] __initconst = { -+ 0x06, 0x12, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, -+ 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c -+}; -+static const u8 key25[] __initconst = { -+ 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, -+ 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, -+ 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, -+ 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c -+}; -+ -+static const u8 input26[] __initconst = { -+ 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, -+ 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, -+ 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, -+ 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0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+ 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, -+ 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, -+ 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, -+ 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, -+ 0x7b, 0x6e, 0x7b, 0x00, 0x13, 0x00, 0x00, 0x00, -+ 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x20, 0x00, 0xef, 0xff, 0x00, -+ 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, -+ 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x64, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, -+ 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x20, 0x00, 0xef, 0xff, 0x00, 0x09, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x7a, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, -+ 0x00, 0x09, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc -+}; -+static const u8 output26[] __initconst = { -+ 0x33, 0x20, 0x5b, 0xbf, 0x9e, 0x9f, 0x8f, 0x72, -+ 0x12, 0xab, 0x9e, 0x2a, 0xb9, 0xb7, 0xe4, 0xa5 -+}; -+static const u8 key26[] __initconst = { -+ 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7b, 0x7b -+}; -+ -+static const u8 input27[] __initconst = { -+ 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, -+ 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, -+ 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, -+ 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, -+ 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, -+ 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, -+ 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, -+ 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, -+ 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, -+ 0x77, 0x77, 0x77, 0x77, 0xff, 0xff, 0xff, 0xe9, -+ 0xe9, 0xac, 0xac, 0xac, 0xac, 0xac, 0xac, 0xac, -+ 0xac, 0xac, 0xac, 0xac, 0x00, 0x00, 0xac, 0xac, -+ 0xec, 0x01, 0x00, 0xac, 0xac, 0xac, 0x2c, 0xac, -+ 0xa2, 0xac, 0xac, 0xac, 0xac, 0xac, 0xac, 0xac, -+ 0xac, 0xac, 0xac, 0xac, 0x64, 0xf2 -+}; -+static const u8 output27[] __initconst = { -+ 0x02, 0xee, 0x7c, 0x8c, 0x54, 0x6d, 0xde, 0xb1, -+ 0xa4, 0x67, 0xe4, 0xc3, 0x98, 0x11, 0x58, 0xb9 -+}; -+static const u8 key27[] __initconst = { -+ 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x7f, -+ 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0xcf, 0x77, 0x77, 0x77, 0x77, 0x77, -+ 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77 -+}; -+ -+/* nacl */ -+static const u8 input28[] __initconst = { -+ 0x8e, 0x99, 0x3b, 0x9f, 0x48, 0x68, 0x12, 0x73, -+ 0xc2, 0x96, 0x50, 0xba, 0x32, 0xfc, 0x76, 0xce, -+ 0x48, 0x33, 0x2e, 0xa7, 0x16, 0x4d, 0x96, 0xa4, -+ 0x47, 0x6f, 0xb8, 0xc5, 0x31, 0xa1, 0x18, 0x6a, -+ 0xc0, 0xdf, 0xc1, 0x7c, 0x98, 0xdc, 0xe8, 0x7b, -+ 0x4d, 0xa7, 0xf0, 0x11, 0xec, 0x48, 0xc9, 0x72, -+ 0x71, 0xd2, 0xc2, 0x0f, 0x9b, 0x92, 0x8f, 0xe2, -+ 0x27, 0x0d, 0x6f, 0xb8, 0x63, 0xd5, 0x17, 0x38, -+ 0xb4, 0x8e, 0xee, 0xe3, 0x14, 0xa7, 0xcc, 0x8a, -+ 0xb9, 0x32, 0x16, 0x45, 0x48, 0xe5, 0x26, 0xae, -+ 0x90, 0x22, 0x43, 0x68, 0x51, 0x7a, 0xcf, 0xea, -+ 0xbd, 0x6b, 0xb3, 0x73, 0x2b, 0xc0, 0xe9, 0xda, -+ 0x99, 0x83, 0x2b, 0x61, 0xca, 0x01, 0xb6, 0xde, -+ 0x56, 0x24, 0x4a, 0x9e, 0x88, 0xd5, 0xf9, 0xb3, -+ 0x79, 0x73, 0xf6, 0x22, 0xa4, 0x3d, 0x14, 0xa6, -+ 0x59, 0x9b, 0x1f, 0x65, 0x4c, 0xb4, 0x5a, 0x74, -+ 0xe3, 0x55, 0xa5 -+}; -+static const u8 output28[] __initconst = { -+ 0xf3, 0xff, 0xc7, 0x70, 0x3f, 0x94, 0x00, 0xe5, -+ 0x2a, 0x7d, 0xfb, 0x4b, 0x3d, 0x33, 0x05, 0xd9 -+}; -+static const u8 key28[] __initconst = { -+ 0xee, 0xa6, 0xa7, 0x25, 0x1c, 0x1e, 0x72, 0x91, -+ 0x6d, 0x11, 0xc2, 0xcb, 0x21, 0x4d, 0x3c, 0x25, -+ 0x25, 0x39, 0x12, 0x1d, 0x8e, 0x23, 0x4e, 0x65, -+ 0x2d, 0x65, 0x1f, 0xa4, 0xc8, 0xcf, 0xf8, 0x80 -+}; -+ -+/* wrap 2^130-5 */ -+static const u8 input29[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 output29[] __initconst = { -+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 key29[] __initconst = { -+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+ -+/* wrap 2^128 */ -+static const u8 input30[] __initconst = { -+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 output30[] __initconst = { -+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 key30[] __initconst = { -+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+ -+/* limb carry */ -+static const u8 input31[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 output31[] __initconst = { -+ 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 key31[] __initconst = { -+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+ -+/* 2^130-5 */ -+static const u8 input32[] __initconst = { -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xfb, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, -+ 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, -+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 -+}; -+static const u8 output32[] __initconst = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 key32[] __initconst = { -+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+ -+/* 2^130-6 */ -+static const u8 input33[] __initconst = { -+ 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 output33[] __initconst = { -+ 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -+}; -+static const u8 key33[] __initconst = { -+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+ -+/* 5*H+L reduction intermediate */ -+static const u8 input34[] __initconst = { -+ 0xe3, 0x35, 0x94, 0xd7, 0x50, 0x5e, 0x43, 0xb9, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x33, 0x94, 0xd7, 0x50, 0x5e, 0x43, 0x79, 0xcd, -+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 output34[] __initconst = { -+ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 key34[] __initconst = { -+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+ -+/* 5*H+L reduction final */ -+static const u8 input35[] __initconst = { -+ 0xe3, 0x35, 0x94, 0xd7, 0x50, 0x5e, 0x43, 0xb9, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x33, 0x94, 0xd7, 0x50, 0x5e, 0x43, 0x79, 0xcd, -+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 output35[] __initconst = { -+ 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+static const u8 key35[] __initconst = { -+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -+}; -+ -+static const struct poly1305_testvec poly1305_testvecs[] __initconst = { -+ { input01, output01, key01, sizeof(input01) }, -+ { input02, output02, key02, sizeof(input02) }, -+ { input03, output03, key03, sizeof(input03) }, -+ { input04, output04, key04, sizeof(input04) }, -+ { input05, output05, key05, sizeof(input05) }, -+ { input06, output06, key06, sizeof(input06) }, -+ { input07, output07, key07, sizeof(input07) }, -+ { input08, output08, key08, sizeof(input08) }, -+ { input09, output09, key09, sizeof(input09) }, -+ { input10, output10, key10, sizeof(input10) }, -+ { input11, output11, key11, sizeof(input11) }, -+ { input12, output12, key12, sizeof(input12) }, -+ { input13, output13, key13, sizeof(input13) }, -+ { input14, output14, key14, sizeof(input14) }, -+ { input15, output15, key15, sizeof(input15) }, -+ { input16, output16, key16, sizeof(input16) }, -+ { input17, output17, key17, sizeof(input17) }, -+ { input18, output18, key18, sizeof(input18) }, -+ { input19, output19, key19, sizeof(input19) }, -+ { input20, output20, key20, sizeof(input20) }, -+ { input21, output21, key21, sizeof(input21) }, -+ { input22, output22, key22, sizeof(input22) }, -+ { input23, output23, key23, sizeof(input23) }, -+ { input24, output24, key24, sizeof(input24) }, -+ { input25, output25, key25, sizeof(input25) }, -+ { input26, output26, key26, sizeof(input26) }, -+ { input27, output27, key27, sizeof(input27) }, -+ { input28, output28, key28, sizeof(input28) }, -+ { input29, output29, key29, sizeof(input29) }, -+ { input30, output30, key30, sizeof(input30) }, -+ { input31, output31, key31, sizeof(input31) }, -+ { input32, output32, key32, sizeof(input32) }, -+ { input33, output33, key33, sizeof(input33) }, -+ { input34, output34, key34, sizeof(input34) }, -+ { input35, output35, key35, sizeof(input35) } -+}; -+ -+static bool __init poly1305_selftest(void) -+{ -+ simd_context_t simd_context; -+ bool success = true; -+ size_t i, j; -+ -+ simd_get(&simd_context); -+ for (i = 0; i < ARRAY_SIZE(poly1305_testvecs); ++i) { -+ struct poly1305_ctx poly1305; -+ u8 out[POLY1305_MAC_SIZE]; -+ -+ memset(out, 0, sizeof(out)); -+ memset(&poly1305, 0, sizeof(poly1305)); -+ poly1305_init(&poly1305, poly1305_testvecs[i].key); -+ poly1305_update(&poly1305, poly1305_testvecs[i].input, -+ poly1305_testvecs[i].ilen, &simd_context); -+ poly1305_final(&poly1305, out, &simd_context); -+ if (memcmp(out, poly1305_testvecs[i].output, -+ POLY1305_MAC_SIZE)) { -+ pr_err("poly1305 self-test %zu: FAIL\n", i + 1); -+ success = false; -+ } -+ simd_relax(&simd_context); -+ -+ if (poly1305_testvecs[i].ilen <= 1) -+ continue; -+ -+ for (j = 1; j < poly1305_testvecs[i].ilen - 1; ++j) { -+ memset(out, 0, sizeof(out)); -+ memset(&poly1305, 0, sizeof(poly1305)); -+ poly1305_init(&poly1305, poly1305_testvecs[i].key); -+ poly1305_update(&poly1305, poly1305_testvecs[i].input, -+ j, &simd_context); -+ poly1305_update(&poly1305, -+ poly1305_testvecs[i].input + j, -+ poly1305_testvecs[i].ilen - j, -+ &simd_context); -+ poly1305_final(&poly1305, out, &simd_context); -+ if (memcmp(out, poly1305_testvecs[i].output, -+ POLY1305_MAC_SIZE)) { -+ pr_err("poly1305 self-test %zu (split %zu): FAIL\n", -+ i + 1, j); -+ success = false; -+ } -+ -+ memset(out, 0, sizeof(out)); -+ memset(&poly1305, 0, sizeof(poly1305)); -+ poly1305_init(&poly1305, poly1305_testvecs[i].key); -+ poly1305_update(&poly1305, poly1305_testvecs[i].input, -+ j, &simd_context); -+ poly1305_update(&poly1305, -+ poly1305_testvecs[i].input + j, -+ poly1305_testvecs[i].ilen - j, -+ DONT_USE_SIMD); -+ poly1305_final(&poly1305, out, &simd_context); -+ if (memcmp(out, poly1305_testvecs[i].output, -+ POLY1305_MAC_SIZE)) { -+ pr_err("poly1305 self-test %zu (split %zu, mixed simd): FAIL\n", -+ i + 1, j); -+ success = false; -+ } -+ simd_relax(&simd_context); -+ } -+ } -+ simd_put(&simd_context); -+ -+ return success; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/device.c 2019-08-20 20:26:42.407341426 +0000 -@@ -0,0 +1,470 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include "queueing.h" -+#include "socket.h" -+#include "timers.h" -+#include "device.h" -+#include "ratelimiter.h" -+#include "peer.h" -+#include "messages.h" -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+static LIST_HEAD(device_list); -+ -+static int wg_open(struct net_device *dev) -+{ -+ struct in_device *dev_v4 = __in_dev_get_rtnl(dev); -+#ifndef COMPAT_CANNOT_USE_IN6_DEV_GET -+ struct inet6_dev *dev_v6 = __in6_dev_get(dev); -+#endif -+ struct wg_device *wg = netdev_priv(dev); -+ struct wg_peer *peer; -+ int ret; -+ -+ if (dev_v4) { -+ /* At some point we might put this check near the ip_rt_send_ -+ * redirect call of ip_forward in net/ipv4/ip_forward.c, similar -+ * to the current secpath check. -+ */ -+ IN_DEV_CONF_SET(dev_v4, SEND_REDIRECTS, false); -+ IPV4_DEVCONF_ALL(dev_net(dev), SEND_REDIRECTS) = false; -+ } -+#ifndef COMPAT_CANNOT_USE_IN6_DEV_GET -+ if (dev_v6) -+#ifndef COMPAT_CANNOT_USE_DEV_CNF -+ dev_v6->cnf.addr_gen_mode = IN6_ADDR_GEN_MODE_NONE; -+#else -+ dev_v6->addr_gen_mode = IN6_ADDR_GEN_MODE_NONE; -+#endif -+#endif -+ -+ ret = wg_socket_init(wg, wg->incoming_port); -+ if (ret < 0) -+ return ret; -+ mutex_lock(&wg->device_update_lock); -+ list_for_each_entry(peer, &wg->peer_list, peer_list) { -+ wg_packet_send_staged_packets(peer); -+ if (peer->persistent_keepalive_interval) -+ wg_packet_send_keepalive(peer); -+ } -+ mutex_unlock(&wg->device_update_lock); -+ return 0; -+} -+ -+#ifdef CONFIG_PM_SLEEP -+static int wg_pm_notification(struct notifier_block *nb, unsigned long action, -+ void *data) -+{ -+ struct wg_device *wg; -+ struct wg_peer *peer; -+ -+ /* If the machine is constantly suspending and resuming, as part of -+ * its normal operation rather than as a somewhat rare event, then we -+ * don't actually want to clear keys. -+ */ -+ if (IS_ENABLED(CONFIG_PM_AUTOSLEEP) || IS_ENABLED(CONFIG_ANDROID)) -+ return 0; -+ -+ if (action != PM_HIBERNATION_PREPARE && action != PM_SUSPEND_PREPARE) -+ return 0; -+ -+ rtnl_lock(); -+ list_for_each_entry(wg, &device_list, device_list) { -+ mutex_lock(&wg->device_update_lock); -+ list_for_each_entry(peer, &wg->peer_list, peer_list) { -+ del_timer(&peer->timer_zero_key_material); -+ wg_noise_handshake_clear(&peer->handshake); -+ wg_noise_keypairs_clear(&peer->keypairs); -+ } -+ mutex_unlock(&wg->device_update_lock); -+ } -+ rtnl_unlock(); -+ rcu_barrier(); -+ return 0; -+} -+ -+static struct notifier_block pm_notifier = { .notifier_call = wg_pm_notification }; -+#endif -+ -+static int wg_stop(struct net_device *dev) -+{ -+ struct wg_device *wg = netdev_priv(dev); -+ struct wg_peer *peer; -+ -+ mutex_lock(&wg->device_update_lock); -+ list_for_each_entry(peer, &wg->peer_list, peer_list) { -+ wg_packet_purge_staged_packets(peer); -+ wg_timers_stop(peer); -+ wg_noise_handshake_clear(&peer->handshake); -+ wg_noise_keypairs_clear(&peer->keypairs); -+ wg_noise_reset_last_sent_handshake(&peer->last_sent_handshake); -+ } -+ mutex_unlock(&wg->device_update_lock); -+ skb_queue_purge(&wg->incoming_handshakes); -+ wg_socket_reinit(wg, NULL, NULL); -+ return 0; -+} -+ -+static netdev_tx_t wg_xmit(struct sk_buff *skb, struct net_device *dev) -+{ -+ struct wg_device *wg = netdev_priv(dev); -+ struct sk_buff_head packets; -+ struct wg_peer *peer; -+ struct sk_buff *next; -+ sa_family_t family; -+ u32 mtu; -+ int ret; -+ -+ if (unlikely(wg_skb_examine_untrusted_ip_hdr(skb) != skb->protocol)) { -+ ret = -EPROTONOSUPPORT; -+ net_dbg_ratelimited("%s: Invalid IP packet\n", dev->name); -+ goto err; -+ } -+ -+ peer = wg_allowedips_lookup_dst(&wg->peer_allowedips, skb); -+ if (unlikely(!peer)) { -+ ret = -ENOKEY; -+ if (skb->protocol == htons(ETH_P_IP)) -+ net_dbg_ratelimited("%s: No peer has allowed IPs matching %pI4\n", -+ dev->name, &ip_hdr(skb)->daddr); -+ else if (skb->protocol == htons(ETH_P_IPV6)) -+ net_dbg_ratelimited("%s: No peer has allowed IPs matching %pI6\n", -+ dev->name, &ipv6_hdr(skb)->daddr); -+ goto err; -+ } -+ -+ family = READ_ONCE(peer->endpoint.addr.sa_family); -+ if (unlikely(family != AF_INET && family != AF_INET6)) { -+ ret = -EDESTADDRREQ; -+ net_dbg_ratelimited("%s: No valid endpoint has been configured or discovered for peer %llu\n", -+ dev->name, peer->internal_id); -+ goto err_peer; -+ } -+ -+ mtu = skb_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu; -+ -+ __skb_queue_head_init(&packets); -+ if (!skb_is_gso(skb)) { -+ skb_mark_not_on_list(skb); -+ } else { -+ struct sk_buff *segs = skb_gso_segment(skb, 0); -+ -+ if (unlikely(IS_ERR(segs))) { -+ ret = PTR_ERR(segs); -+ goto err_peer; -+ } -+ dev_kfree_skb(skb); -+ skb = segs; -+ } -+ do { -+ next = skb->next; -+ skb_mark_not_on_list(skb); -+ -+ skb = skb_share_check(skb, GFP_ATOMIC); -+ if (unlikely(!skb)) -+ continue; -+ -+ /* We only need to keep the original dst around for icmp, -+ * so at this point we're in a position to drop it. -+ */ -+ skb_dst_drop(skb); -+ -+ PACKET_CB(skb)->mtu = mtu; -+ -+ __skb_queue_tail(&packets, skb); -+ } while ((skb = next) != NULL); -+ -+ spin_lock_bh(&peer->staged_packet_queue.lock); -+ /* If the queue is getting too big, we start removing the oldest packets -+ * until it's small again. We do this before adding the new packet, so -+ * we don't remove GSO segments that are in excess. -+ */ -+ while (skb_queue_len(&peer->staged_packet_queue) > MAX_STAGED_PACKETS) { -+ dev_kfree_skb(__skb_dequeue(&peer->staged_packet_queue)); -+ ++dev->stats.tx_dropped; -+ } -+ skb_queue_splice_tail(&packets, &peer->staged_packet_queue); -+ spin_unlock_bh(&peer->staged_packet_queue.lock); -+ -+ wg_packet_send_staged_packets(peer); -+ -+ wg_peer_put(peer); -+ return NETDEV_TX_OK; -+ -+err_peer: -+ wg_peer_put(peer); -+err: -+ ++dev->stats.tx_errors; -+ if (skb->protocol == htons(ETH_P_IP)) -+ icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0); -+ else if (skb->protocol == htons(ETH_P_IPV6)) -+ icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0); -+ kfree_skb(skb); -+ return ret; -+} -+ -+static const struct net_device_ops netdev_ops = { -+ .ndo_open = wg_open, -+ .ndo_stop = wg_stop, -+ .ndo_start_xmit = wg_xmit, -+ .ndo_get_stats64 = ip_tunnel_get_stats64 -+}; -+ -+static void wg_destruct(struct net_device *dev) -+{ -+ struct wg_device *wg = netdev_priv(dev); -+ -+ rtnl_lock(); -+ list_del(&wg->device_list); -+ rtnl_unlock(); -+ mutex_lock(&wg->device_update_lock); -+ wg->incoming_port = 0; -+ wg_socket_reinit(wg, NULL, NULL); -+ /* The final references are cleared in the below calls to destroy_workqueue. */ -+ wg_peer_remove_all(wg); -+ destroy_workqueue(wg->handshake_receive_wq); -+ destroy_workqueue(wg->handshake_send_wq); -+ destroy_workqueue(wg->packet_crypt_wq); -+ wg_packet_queue_free(&wg->decrypt_queue, true); -+ wg_packet_queue_free(&wg->encrypt_queue, true); -+ rcu_barrier(); /* Wait for all the peers to be actually freed. */ -+ wg_ratelimiter_uninit(); -+ memzero_explicit(&wg->static_identity, sizeof(wg->static_identity)); -+ skb_queue_purge(&wg->incoming_handshakes); -+ free_percpu(dev->tstats); -+ free_percpu(wg->incoming_handshakes_worker); -+ if (wg->have_creating_net_ref) -+ put_net(wg->creating_net); -+ kvfree(wg->index_hashtable); -+ kvfree(wg->peer_hashtable); -+ mutex_unlock(&wg->device_update_lock); -+ -+ pr_debug("%s: Interface deleted\n", dev->name); -+ free_netdev(dev); -+} -+ -+static const struct device_type device_type = { .name = KBUILD_MODNAME }; -+ -+static void wg_setup(struct net_device *dev) -+{ -+ struct wg_device *wg = netdev_priv(dev); -+ enum { WG_NETDEV_FEATURES = NETIF_F_HW_CSUM | NETIF_F_RXCSUM | -+ NETIF_F_SG | NETIF_F_GSO | -+ NETIF_F_GSO_SOFTWARE | NETIF_F_HIGHDMA }; -+ -+ dev->netdev_ops = &netdev_ops; -+ dev->hard_header_len = 0; -+ dev->addr_len = 0; -+ dev->needed_headroom = DATA_PACKET_HEAD_ROOM; -+ dev->needed_tailroom = noise_encrypted_len(MESSAGE_PADDING_MULTIPLE); -+ dev->type = ARPHRD_NONE; -+ dev->flags = IFF_POINTOPOINT | IFF_NOARP; -+#ifndef COMPAT_CANNOT_USE_IFF_NO_QUEUE -+ dev->priv_flags |= IFF_NO_QUEUE; -+#else -+ dev->tx_queue_len = 0; -+#endif -+ dev->features |= NETIF_F_LLTX; -+ dev->features |= WG_NETDEV_FEATURES; -+ dev->hw_features |= WG_NETDEV_FEATURES; -+ dev->hw_enc_features |= WG_NETDEV_FEATURES; -+ dev->mtu = ETH_DATA_LEN - MESSAGE_MINIMUM_LENGTH - -+ sizeof(struct udphdr) - -+ max(sizeof(struct ipv6hdr), sizeof(struct iphdr)); -+ -+ SET_NETDEV_DEVTYPE(dev, &device_type); -+ -+ /* We need to keep the dst around in case of icmp replies. */ -+ netif_keep_dst(dev); -+ -+ memset(wg, 0, sizeof(*wg)); -+ wg->dev = dev; -+} -+ -+static int wg_newlink(struct net *src_net, struct net_device *dev, -+ struct nlattr *tb[], struct nlattr *data[], -+ struct netlink_ext_ack *extack) -+{ -+ struct wg_device *wg = netdev_priv(dev); -+ int ret = -ENOMEM; -+ -+ wg->creating_net = src_net; -+ init_rwsem(&wg->static_identity.lock); -+ mutex_init(&wg->socket_update_lock); -+ mutex_init(&wg->device_update_lock); -+ skb_queue_head_init(&wg->incoming_handshakes); -+ wg_allowedips_init(&wg->peer_allowedips); -+ wg_cookie_checker_init(&wg->cookie_checker, wg); -+ INIT_LIST_HEAD(&wg->peer_list); -+ wg->device_update_gen = 1; -+ -+ wg->peer_hashtable = wg_pubkey_hashtable_alloc(); -+ if (!wg->peer_hashtable) -+ return ret; -+ -+ wg->index_hashtable = wg_index_hashtable_alloc(); -+ if (!wg->index_hashtable) -+ goto err_free_peer_hashtable; -+ -+ dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats); -+ if (!dev->tstats) -+ goto err_free_index_hashtable; -+ -+ wg->incoming_handshakes_worker = -+ wg_packet_percpu_multicore_worker_alloc( -+ wg_packet_handshake_receive_worker, wg); -+ if (!wg->incoming_handshakes_worker) -+ goto err_free_tstats; -+ -+ wg->handshake_receive_wq = alloc_workqueue("wg-kex-%s", -+ WQ_CPU_INTENSIVE | WQ_FREEZABLE, 0, dev->name); -+ if (!wg->handshake_receive_wq) -+ goto err_free_incoming_handshakes; -+ -+ wg->handshake_send_wq = alloc_workqueue("wg-kex-%s", -+ WQ_UNBOUND | WQ_FREEZABLE, 0, dev->name); -+ if (!wg->handshake_send_wq) -+ goto err_destroy_handshake_receive; -+ -+ wg->packet_crypt_wq = alloc_workqueue("wg-crypt-%s", -+ WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM, 0, dev->name); -+ if (!wg->packet_crypt_wq) -+ goto err_destroy_handshake_send; -+ -+ ret = wg_packet_queue_init(&wg->encrypt_queue, wg_packet_encrypt_worker, -+ true, MAX_QUEUED_PACKETS); -+ if (ret < 0) -+ goto err_destroy_packet_crypt; -+ -+ ret = wg_packet_queue_init(&wg->decrypt_queue, wg_packet_decrypt_worker, -+ true, MAX_QUEUED_PACKETS); -+ if (ret < 0) -+ goto err_free_encrypt_queue; -+ -+ ret = wg_ratelimiter_init(); -+ if (ret < 0) -+ goto err_free_decrypt_queue; -+ -+ ret = register_netdevice(dev); -+ if (ret < 0) -+ goto err_uninit_ratelimiter; -+ -+ list_add(&wg->device_list, &device_list); -+ -+ /* We wait until the end to assign priv_destructor, so that -+ * register_netdevice doesn't call it for us if it fails. -+ */ -+ dev->priv_destructor = wg_destruct; -+ -+ pr_debug("%s: Interface created\n", dev->name); -+ return ret; -+ -+err_uninit_ratelimiter: -+ wg_ratelimiter_uninit(); -+err_free_decrypt_queue: -+ wg_packet_queue_free(&wg->decrypt_queue, true); -+err_free_encrypt_queue: -+ wg_packet_queue_free(&wg->encrypt_queue, true); -+err_destroy_packet_crypt: -+ destroy_workqueue(wg->packet_crypt_wq); -+err_destroy_handshake_send: -+ destroy_workqueue(wg->handshake_send_wq); -+err_destroy_handshake_receive: -+ destroy_workqueue(wg->handshake_receive_wq); -+err_free_incoming_handshakes: -+ free_percpu(wg->incoming_handshakes_worker); -+err_free_tstats: -+ free_percpu(dev->tstats); -+err_free_index_hashtable: -+ kvfree(wg->index_hashtable); -+err_free_peer_hashtable: -+ kvfree(wg->peer_hashtable); -+ return ret; -+} -+ -+static struct rtnl_link_ops link_ops __read_mostly = { -+ .kind = KBUILD_MODNAME, -+ .priv_size = sizeof(struct wg_device), -+ .setup = wg_setup, -+ .newlink = wg_newlink, -+}; -+ -+static int wg_netdevice_notification(struct notifier_block *nb, -+ unsigned long action, void *data) -+{ -+ struct net_device *dev = ((struct netdev_notifier_info *)data)->dev; -+ struct wg_device *wg = netdev_priv(dev); -+ -+ ASSERT_RTNL(); -+ -+ if (action != NETDEV_REGISTER || dev->netdev_ops != &netdev_ops) -+ return 0; -+ -+ if (dev_net(dev) == wg->creating_net && wg->have_creating_net_ref) { -+ put_net(wg->creating_net); -+ wg->have_creating_net_ref = false; -+ } else if (dev_net(dev) != wg->creating_net && -+ !wg->have_creating_net_ref) { -+ wg->have_creating_net_ref = true; -+ get_net(wg->creating_net); -+ } -+ return 0; -+} -+ -+static struct notifier_block netdevice_notifier = { -+ .notifier_call = wg_netdevice_notification -+}; -+ -+int __init wg_device_init(void) -+{ -+ int ret; -+ -+#ifdef CONFIG_PM_SLEEP -+ ret = register_pm_notifier(&pm_notifier); -+ if (ret) -+ return ret; -+#endif -+ -+ ret = register_netdevice_notifier(&netdevice_notifier); -+ if (ret) -+ goto error_pm; -+ -+ ret = rtnl_link_register(&link_ops); -+ if (ret) -+ goto error_netdevice; -+ -+ return 0; -+ -+error_netdevice: -+ unregister_netdevice_notifier(&netdevice_notifier); -+error_pm: -+#ifdef CONFIG_PM_SLEEP -+ unregister_pm_notifier(&pm_notifier); -+#endif -+ return ret; -+} -+ -+void wg_device_uninit(void) -+{ -+ rtnl_link_unregister(&link_ops); -+ unregister_netdevice_notifier(&netdevice_notifier); -+#ifdef CONFIG_PM_SLEEP -+ unregister_pm_notifier(&pm_notifier); -+#endif -+ rcu_barrier(); -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/main.c 2019-08-20 20:26:42.407341426 +0000 -@@ -0,0 +1,69 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include "version.h" -+#include "device.h" -+#include "noise.h" -+#include "queueing.h" -+#include "ratelimiter.h" -+#include "netlink.h" -+#include "uapi/wireguard.h" -+#include "crypto/zinc.h" -+ -+#include -+#include -+#include -+#include -+#include -+ -+static int __init mod_init(void) -+{ -+ int ret; -+ -+ if ((ret = chacha20_mod_init()) || (ret = poly1305_mod_init()) || -+ (ret = chacha20poly1305_mod_init()) || (ret = blake2s_mod_init()) || -+ (ret = curve25519_mod_init())) -+ return ret; -+ -+#ifdef DEBUG -+ if (!wg_allowedips_selftest() || !wg_packet_counter_selftest() || -+ !wg_ratelimiter_selftest()) -+ return -ENOTRECOVERABLE; -+#endif -+ wg_noise_init(); -+ -+ ret = wg_device_init(); -+ if (ret < 0) -+ goto err_device; -+ -+ ret = wg_genetlink_init(); -+ if (ret < 0) -+ goto err_netlink; -+ -+ pr_info("WireGuard " WIREGUARD_VERSION " loaded. See www.wireguard.com for information.\n"); -+ pr_info("Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved.\n"); -+ -+ return 0; -+ -+err_netlink: -+ wg_device_uninit(); -+err_device: -+ return ret; -+} -+ -+static void __exit mod_exit(void) -+{ -+ wg_genetlink_uninit(); -+ wg_device_uninit(); -+} -+ -+module_init(mod_init); -+module_exit(mod_exit); -+MODULE_LICENSE("GPL v2"); -+MODULE_DESCRIPTION("WireGuard secure network tunnel"); -+MODULE_AUTHOR("Jason A. Donenfeld "); -+MODULE_VERSION(WIREGUARD_VERSION); -+MODULE_ALIAS_RTNL_LINK(KBUILD_MODNAME); -+MODULE_ALIAS_GENL_FAMILY(WG_GENL_NAME); ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/netlink.c 2019-08-20 20:26:42.408341426 +0000 -@@ -0,0 +1,667 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include "netlink.h" -+#include "device.h" -+#include "peer.h" -+#include "socket.h" -+#include "queueing.h" -+#include "messages.h" -+#include "uapi/wireguard.h" -+#include -+#include -+#include -+#include -+ -+static struct genl_family genl_family; -+ -+static const struct nla_policy device_policy[WGDEVICE_A_MAX + 1] = { -+ [WGDEVICE_A_IFINDEX] = { .type = NLA_U32 }, -+ [WGDEVICE_A_IFNAME] = { .type = NLA_NUL_STRING, .len = IFNAMSIZ - 1 }, -+ [WGDEVICE_A_PRIVATE_KEY] = { .type = NLA_EXACT_LEN, .len = NOISE_PUBLIC_KEY_LEN }, -+ [WGDEVICE_A_PUBLIC_KEY] = { .type = NLA_EXACT_LEN, .len = NOISE_PUBLIC_KEY_LEN }, -+ [WGDEVICE_A_FLAGS] = { .type = NLA_U32 }, -+ [WGDEVICE_A_LISTEN_PORT] = { .type = NLA_U16 }, -+ [WGDEVICE_A_FWMARK] = { .type = NLA_U32 }, -+ [WGDEVICE_A_PEERS] = { .type = NLA_NESTED } -+}; -+ -+static const struct nla_policy peer_policy[WGPEER_A_MAX + 1] = { -+ [WGPEER_A_PUBLIC_KEY] = { .type = NLA_EXACT_LEN, .len = NOISE_PUBLIC_KEY_LEN }, -+ [WGPEER_A_PRESHARED_KEY] = { .type = NLA_EXACT_LEN, .len = NOISE_SYMMETRIC_KEY_LEN }, -+ [WGPEER_A_FLAGS] = { .type = NLA_U32 }, -+ [WGPEER_A_ENDPOINT] = { .type = NLA_MIN_LEN, .len = sizeof(struct sockaddr) }, -+ [WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL] = { .type = NLA_U16 }, -+ [WGPEER_A_LAST_HANDSHAKE_TIME] = { .type = NLA_EXACT_LEN, .len = sizeof(struct __kernel_timespec) }, -+ [WGPEER_A_RX_BYTES] = { .type = NLA_U64 }, -+ [WGPEER_A_TX_BYTES] = { .type = NLA_U64 }, -+ [WGPEER_A_ALLOWEDIPS] = { .type = NLA_NESTED }, -+ [WGPEER_A_PROTOCOL_VERSION] = { .type = NLA_U32 } -+}; -+ -+static const struct nla_policy allowedip_policy[WGALLOWEDIP_A_MAX + 1] = { -+ [WGALLOWEDIP_A_FAMILY] = { .type = NLA_U16 }, -+ [WGALLOWEDIP_A_IPADDR] = { .type = NLA_MIN_LEN, .len = sizeof(struct in_addr) }, -+ [WGALLOWEDIP_A_CIDR_MASK] = { .type = NLA_U8 } -+}; -+ -+static struct wg_device *lookup_interface(struct nlattr **attrs, -+ struct sk_buff *skb) -+{ -+ struct net_device *dev = NULL; -+ -+ if (!attrs[WGDEVICE_A_IFINDEX] == !attrs[WGDEVICE_A_IFNAME]) -+ return ERR_PTR(-EBADR); -+ if (attrs[WGDEVICE_A_IFINDEX]) -+ dev = dev_get_by_index(sock_net(skb->sk), -+ nla_get_u32(attrs[WGDEVICE_A_IFINDEX])); -+ else if (attrs[WGDEVICE_A_IFNAME]) -+ dev = dev_get_by_name(sock_net(skb->sk), -+ nla_data(attrs[WGDEVICE_A_IFNAME])); -+ if (!dev) -+ return ERR_PTR(-ENODEV); -+ if (!dev->rtnl_link_ops || !dev->rtnl_link_ops->kind || -+ strcmp(dev->rtnl_link_ops->kind, KBUILD_MODNAME)) { -+ dev_put(dev); -+ return ERR_PTR(-EOPNOTSUPP); -+ } -+ return netdev_priv(dev); -+} -+ -+static int get_allowedips(struct sk_buff *skb, const u8 *ip, u8 cidr, -+ int family) -+{ -+ struct nlattr *allowedip_nest; -+ -+ allowedip_nest = nla_nest_start(skb, 0); -+ if (!allowedip_nest) -+ return -EMSGSIZE; -+ -+ if (nla_put_u8(skb, WGALLOWEDIP_A_CIDR_MASK, cidr) || -+ nla_put_u16(skb, WGALLOWEDIP_A_FAMILY, family) || -+ nla_put(skb, WGALLOWEDIP_A_IPADDR, family == AF_INET6 ? -+ sizeof(struct in6_addr) : sizeof(struct in_addr), ip)) { -+ nla_nest_cancel(skb, allowedip_nest); -+ return -EMSGSIZE; -+ } -+ -+ nla_nest_end(skb, allowedip_nest); -+ return 0; -+} -+ -+struct dump_ctx { -+ struct wg_device *wg; -+ struct wg_peer *next_peer; -+ struct allowedips_node *next_allowedip; -+ u64 allowedips_seq; -+}; -+ -+#define DUMP_CTX(cb) ((struct dump_ctx *)(cb)->args) -+ -+static int -+get_peer(struct wg_peer *peer, struct sk_buff *skb, struct dump_ctx *ctx) -+{ -+ -+ struct nlattr *allowedips_nest, *peer_nest = nla_nest_start(skb, 0); -+ struct allowedips_node *allowedips_node = ctx->next_allowedip; -+ bool fail; -+ -+ if (!peer_nest) -+ return -EMSGSIZE; -+ -+ down_read(&peer->handshake.lock); -+ fail = nla_put(skb, WGPEER_A_PUBLIC_KEY, NOISE_PUBLIC_KEY_LEN, -+ peer->handshake.remote_static); -+ up_read(&peer->handshake.lock); -+ if (fail) -+ goto err; -+ -+ if (!allowedips_node) { -+ const struct __kernel_timespec last_handshake = { -+ .tv_sec = peer->walltime_last_handshake.tv_sec, -+ .tv_nsec = peer->walltime_last_handshake.tv_nsec -+ }; -+ -+ down_read(&peer->handshake.lock); -+ fail = nla_put(skb, WGPEER_A_PRESHARED_KEY, -+ NOISE_SYMMETRIC_KEY_LEN, -+ peer->handshake.preshared_key); -+ up_read(&peer->handshake.lock); -+ if (fail) -+ goto err; -+ -+ if (nla_put(skb, WGPEER_A_LAST_HANDSHAKE_TIME, -+ sizeof(last_handshake), &last_handshake) || -+ nla_put_u16(skb, WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL, -+ peer->persistent_keepalive_interval) || -+ nla_put_u64_64bit(skb, WGPEER_A_TX_BYTES, peer->tx_bytes, -+ WGPEER_A_UNSPEC) || -+ nla_put_u64_64bit(skb, WGPEER_A_RX_BYTES, peer->rx_bytes, -+ WGPEER_A_UNSPEC) || -+ nla_put_u32(skb, WGPEER_A_PROTOCOL_VERSION, 1)) -+ goto err; -+ -+ read_lock_bh(&peer->endpoint_lock); -+ if (peer->endpoint.addr.sa_family == AF_INET) -+ fail = nla_put(skb, WGPEER_A_ENDPOINT, -+ sizeof(peer->endpoint.addr4), -+ &peer->endpoint.addr4); -+ else if (peer->endpoint.addr.sa_family == AF_INET6) -+ fail = nla_put(skb, WGPEER_A_ENDPOINT, -+ sizeof(peer->endpoint.addr6), -+ &peer->endpoint.addr6); -+ read_unlock_bh(&peer->endpoint_lock); -+ if (fail) -+ goto err; -+ allowedips_node = -+ list_first_entry_or_null(&peer->allowedips_list, -+ struct allowedips_node, peer_list); -+ } -+ if (!allowedips_node) -+ goto no_allowedips; -+ if (!ctx->allowedips_seq) -+ ctx->allowedips_seq = peer->device->peer_allowedips.seq; -+ else if (ctx->allowedips_seq != peer->device->peer_allowedips.seq) -+ goto no_allowedips; -+ -+ allowedips_nest = nla_nest_start(skb, WGPEER_A_ALLOWEDIPS); -+ if (!allowedips_nest) -+ goto err; -+ -+ list_for_each_entry_from(allowedips_node, &peer->allowedips_list, -+ peer_list) { -+ u8 cidr, ip[16] __aligned(__alignof(u64)); -+ int family; -+ -+ family = wg_allowedips_read_node(allowedips_node, ip, &cidr); -+ if (get_allowedips(skb, ip, cidr, family)) { -+ nla_nest_end(skb, allowedips_nest); -+ nla_nest_end(skb, peer_nest); -+ ctx->next_allowedip = allowedips_node; -+ return -EMSGSIZE; -+ } -+ } -+ nla_nest_end(skb, allowedips_nest); -+no_allowedips: -+ nla_nest_end(skb, peer_nest); -+ ctx->next_allowedip = NULL; -+ ctx->allowedips_seq = 0; -+ return 0; -+err: -+ nla_nest_cancel(skb, peer_nest); -+ return -EMSGSIZE; -+} -+ -+static int wg_get_device_start(struct netlink_callback *cb) -+{ -+ struct nlattr **attrs = genl_family_attrbuf(&genl_family); -+ struct wg_device *wg; -+ int ret; -+ -+ ret = nlmsg_parse(cb->nlh, GENL_HDRLEN + genl_family.hdrsize, attrs, -+ genl_family.maxattr, device_policy, NULL); -+ if (ret < 0) -+ return ret; -+ wg = lookup_interface(attrs, cb->skb); -+ if (IS_ERR(wg)) -+ return PTR_ERR(wg); -+ DUMP_CTX(cb)->wg = wg; -+ return 0; -+} -+ -+static int wg_get_device_dump(struct sk_buff *skb, struct netlink_callback *cb) -+{ -+ struct wg_peer *peer, *next_peer_cursor; -+ struct dump_ctx *ctx = DUMP_CTX(cb); -+ struct wg_device *wg = ctx->wg; -+ struct nlattr *peers_nest; -+ int ret = -EMSGSIZE; -+ bool done = true; -+ void *hdr; -+ -+ rtnl_lock(); -+ mutex_lock(&wg->device_update_lock); -+ cb->seq = wg->device_update_gen; -+ next_peer_cursor = ctx->next_peer; -+ -+ hdr = genlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, -+ &genl_family, NLM_F_MULTI, WG_CMD_GET_DEVICE); -+ if (!hdr) -+ goto out; -+ genl_dump_check_consistent(cb, hdr); -+ -+ if (!ctx->next_peer) { -+ if (nla_put_u16(skb, WGDEVICE_A_LISTEN_PORT, -+ wg->incoming_port) || -+ nla_put_u32(skb, WGDEVICE_A_FWMARK, wg->fwmark) || -+ nla_put_u32(skb, WGDEVICE_A_IFINDEX, wg->dev->ifindex) || -+ nla_put_string(skb, WGDEVICE_A_IFNAME, wg->dev->name)) -+ goto out; -+ -+ down_read(&wg->static_identity.lock); -+ if (wg->static_identity.has_identity) { -+ if (nla_put(skb, WGDEVICE_A_PRIVATE_KEY, -+ NOISE_PUBLIC_KEY_LEN, -+ wg->static_identity.static_private) || -+ nla_put(skb, WGDEVICE_A_PUBLIC_KEY, -+ NOISE_PUBLIC_KEY_LEN, -+ wg->static_identity.static_public)) { -+ up_read(&wg->static_identity.lock); -+ goto out; -+ } -+ } -+ up_read(&wg->static_identity.lock); -+ } -+ -+ peers_nest = nla_nest_start(skb, WGDEVICE_A_PEERS); -+ if (!peers_nest) -+ goto out; -+ ret = 0; -+ /* If the last cursor was removed via list_del_init in peer_remove, then -+ * we just treat this the same as there being no more peers left. The -+ * reason is that seq_nr should indicate to userspace that this isn't a -+ * coherent dump anyway, so they'll try again. -+ */ -+ if (list_empty(&wg->peer_list) || -+ (ctx->next_peer && list_empty(&ctx->next_peer->peer_list))) { -+ nla_nest_cancel(skb, peers_nest); -+ goto out; -+ } -+ lockdep_assert_held(&wg->device_update_lock); -+ peer = list_prepare_entry(ctx->next_peer, &wg->peer_list, peer_list); -+ list_for_each_entry_continue(peer, &wg->peer_list, peer_list) { -+ if (get_peer(peer, skb, ctx)) { -+ done = false; -+ break; -+ } -+ next_peer_cursor = peer; -+ } -+ nla_nest_end(skb, peers_nest); -+ -+out: -+ if (!ret && !done && next_peer_cursor) -+ wg_peer_get(next_peer_cursor); -+ wg_peer_put(ctx->next_peer); -+ mutex_unlock(&wg->device_update_lock); -+ rtnl_unlock(); -+ -+ if (ret) { -+ genlmsg_cancel(skb, hdr); -+ return ret; -+ } -+ genlmsg_end(skb, hdr); -+ if (done) { -+ ctx->next_peer = NULL; -+ return 0; -+ } -+ ctx->next_peer = next_peer_cursor; -+ return skb->len; -+ -+ /* At this point, we can't really deal ourselves with safely zeroing out -+ * the private key material after usage. This will need an additional API -+ * in the kernel for marking skbs as zero_on_free. -+ */ -+} -+ -+static int wg_get_device_done(struct netlink_callback *cb) -+{ -+ struct dump_ctx *ctx = DUMP_CTX(cb); -+ -+ if (ctx->wg) -+ dev_put(ctx->wg->dev); -+ wg_peer_put(ctx->next_peer); -+ return 0; -+} -+ -+static int set_port(struct wg_device *wg, u16 port) -+{ -+ struct wg_peer *peer; -+ -+ if (wg->incoming_port == port) -+ return 0; -+ list_for_each_entry(peer, &wg->peer_list, peer_list) -+ wg_socket_clear_peer_endpoint_src(peer); -+ if (!netif_running(wg->dev)) { -+ wg->incoming_port = port; -+ return 0; -+ } -+ return wg_socket_init(wg, port); -+} -+ -+static int set_allowedip(struct wg_peer *peer, struct nlattr **attrs) -+{ -+ int ret = -EINVAL; -+ u16 family; -+ u8 cidr; -+ -+ if (!attrs[WGALLOWEDIP_A_FAMILY] || !attrs[WGALLOWEDIP_A_IPADDR] || -+ !attrs[WGALLOWEDIP_A_CIDR_MASK]) -+ return ret; -+ family = nla_get_u16(attrs[WGALLOWEDIP_A_FAMILY]); -+ cidr = nla_get_u8(attrs[WGALLOWEDIP_A_CIDR_MASK]); -+ -+ if (family == AF_INET && cidr <= 32 && -+ nla_len(attrs[WGALLOWEDIP_A_IPADDR]) == sizeof(struct in_addr)) -+ ret = wg_allowedips_insert_v4( -+ &peer->device->peer_allowedips, -+ nla_data(attrs[WGALLOWEDIP_A_IPADDR]), cidr, peer, -+ &peer->device->device_update_lock); -+ else if (family == AF_INET6 && cidr <= 128 && -+ nla_len(attrs[WGALLOWEDIP_A_IPADDR]) == sizeof(struct in6_addr)) -+ ret = wg_allowedips_insert_v6( -+ &peer->device->peer_allowedips, -+ nla_data(attrs[WGALLOWEDIP_A_IPADDR]), cidr, peer, -+ &peer->device->device_update_lock); -+ -+ return ret; -+} -+ -+static int set_peer(struct wg_device *wg, struct nlattr **attrs) -+{ -+ u8 *public_key = NULL, *preshared_key = NULL; -+ struct wg_peer *peer = NULL; -+ u32 flags = 0; -+ int ret; -+ -+ ret = -EINVAL; -+ if (attrs[WGPEER_A_PUBLIC_KEY] && -+ nla_len(attrs[WGPEER_A_PUBLIC_KEY]) == NOISE_PUBLIC_KEY_LEN) -+ public_key = nla_data(attrs[WGPEER_A_PUBLIC_KEY]); -+ else -+ goto out; -+ if (attrs[WGPEER_A_PRESHARED_KEY] && -+ nla_len(attrs[WGPEER_A_PRESHARED_KEY]) == NOISE_SYMMETRIC_KEY_LEN) -+ preshared_key = nla_data(attrs[WGPEER_A_PRESHARED_KEY]); -+ -+ if (attrs[WGPEER_A_FLAGS]) -+ flags = nla_get_u32(attrs[WGPEER_A_FLAGS]); -+ ret = -EOPNOTSUPP; -+ if (flags & ~__WGPEER_F_ALL) -+ goto out; -+ -+ ret = -EPFNOSUPPORT; -+ if (attrs[WGPEER_A_PROTOCOL_VERSION]) { -+ if (nla_get_u32(attrs[WGPEER_A_PROTOCOL_VERSION]) != 1) -+ goto out; -+ } -+ -+ peer = wg_pubkey_hashtable_lookup(wg->peer_hashtable, -+ nla_data(attrs[WGPEER_A_PUBLIC_KEY])); -+ if (!peer) { /* Peer doesn't exist yet. Add a new one. */ -+ ret = -ENODEV; -+ if (flags & WGPEER_F_REMOVE_ME) -+ goto out; /* Tried to remove a non-existing peer. */ -+ -+ /* The peer is new, so there aren't allowed IPs to remove. */ -+ flags &= ~WGPEER_F_REPLACE_ALLOWEDIPS; -+ -+ down_read(&wg->static_identity.lock); -+ if (wg->static_identity.has_identity && -+ !memcmp(nla_data(attrs[WGPEER_A_PUBLIC_KEY]), -+ wg->static_identity.static_public, -+ NOISE_PUBLIC_KEY_LEN)) { -+ /* We silently ignore peers that have the same public -+ * key as the device. The reason we do it silently is -+ * that we'd like for people to be able to reuse the -+ * same set of API calls across peers. -+ */ -+ up_read(&wg->static_identity.lock); -+ ret = 0; -+ goto out; -+ } -+ up_read(&wg->static_identity.lock); -+ -+ peer = wg_peer_create(wg, public_key, preshared_key); -+ if (IS_ERR(peer)) { -+ /* Similar to the above, if the key is invalid, we skip -+ * it without fanfare, so that services don't need to -+ * worry about doing key validation themselves. -+ */ -+ ret = PTR_ERR(peer) == -EKEYREJECTED ? 0 : PTR_ERR(peer); -+ peer = NULL; -+ goto out; -+ } -+ /* Take additional reference, as though we've just been -+ * looked up. -+ */ -+ wg_peer_get(peer); -+ } -+ -+ ret = 0; -+ if (flags & WGPEER_F_REMOVE_ME) { -+ wg_peer_remove(peer); -+ goto out; -+ } -+ -+ if (preshared_key) { -+ down_write(&peer->handshake.lock); -+ memcpy(&peer->handshake.preshared_key, preshared_key, -+ NOISE_SYMMETRIC_KEY_LEN); -+ up_write(&peer->handshake.lock); -+ } -+ -+ if (attrs[WGPEER_A_ENDPOINT]) { -+ struct sockaddr *addr = nla_data(attrs[WGPEER_A_ENDPOINT]); -+ size_t len = nla_len(attrs[WGPEER_A_ENDPOINT]); -+ -+ if ((len == sizeof(struct sockaddr_in) && -+ addr->sa_family == AF_INET) || -+ (len == sizeof(struct sockaddr_in6) && -+ addr->sa_family == AF_INET6)) { -+ struct endpoint endpoint = { { { 0 } } }; -+ -+ memcpy(&endpoint.addr, addr, len); -+ wg_socket_set_peer_endpoint(peer, &endpoint); -+ } -+ } -+ -+ if (flags & WGPEER_F_REPLACE_ALLOWEDIPS) -+ wg_allowedips_remove_by_peer(&wg->peer_allowedips, peer, -+ &wg->device_update_lock); -+ -+ if (attrs[WGPEER_A_ALLOWEDIPS]) { -+ struct nlattr *attr, *allowedip[WGALLOWEDIP_A_MAX + 1]; -+ int rem; -+ -+ nla_for_each_nested(attr, attrs[WGPEER_A_ALLOWEDIPS], rem) { -+ ret = nla_parse_nested(allowedip, WGALLOWEDIP_A_MAX, -+ attr, allowedip_policy, NULL); -+ if (ret < 0) -+ goto out; -+ ret = set_allowedip(peer, allowedip); -+ if (ret < 0) -+ goto out; -+ } -+ } -+ -+ if (attrs[WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL]) { -+ const u16 persistent_keepalive_interval = nla_get_u16( -+ attrs[WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL]); -+ const bool send_keepalive = -+ !peer->persistent_keepalive_interval && -+ persistent_keepalive_interval && -+ netif_running(wg->dev); -+ -+ peer->persistent_keepalive_interval = persistent_keepalive_interval; -+ if (send_keepalive) -+ wg_packet_send_keepalive(peer); -+ } -+ -+ if (netif_running(wg->dev)) -+ wg_packet_send_staged_packets(peer); -+ -+out: -+ wg_peer_put(peer); -+ if (attrs[WGPEER_A_PRESHARED_KEY]) -+ memzero_explicit(nla_data(attrs[WGPEER_A_PRESHARED_KEY]), -+ nla_len(attrs[WGPEER_A_PRESHARED_KEY])); -+ return ret; -+} -+ -+static int wg_set_device(struct sk_buff *skb, struct genl_info *info) -+{ -+ struct wg_device *wg = lookup_interface(info->attrs, skb); -+ u32 flags = 0; -+ int ret; -+ -+ if (IS_ERR(wg)) { -+ ret = PTR_ERR(wg); -+ goto out_nodev; -+ } -+ -+ rtnl_lock(); -+ mutex_lock(&wg->device_update_lock); -+ -+ if (info->attrs[WGDEVICE_A_FLAGS]) -+ flags = nla_get_u32(info->attrs[WGDEVICE_A_FLAGS]); -+ ret = -EOPNOTSUPP; -+ if (flags & ~__WGDEVICE_F_ALL) -+ goto out; -+ -+ ret = -EPERM; -+ if ((info->attrs[WGDEVICE_A_LISTEN_PORT] || -+ info->attrs[WGDEVICE_A_FWMARK]) && -+ !ns_capable(wg->creating_net->user_ns, CAP_NET_ADMIN)) -+ goto out; -+ -+ ++wg->device_update_gen; -+ -+ if (info->attrs[WGDEVICE_A_FWMARK]) { -+ struct wg_peer *peer; -+ -+ wg->fwmark = nla_get_u32(info->attrs[WGDEVICE_A_FWMARK]); -+ list_for_each_entry(peer, &wg->peer_list, peer_list) -+ wg_socket_clear_peer_endpoint_src(peer); -+ } -+ -+ if (info->attrs[WGDEVICE_A_LISTEN_PORT]) { -+ ret = set_port(wg, -+ nla_get_u16(info->attrs[WGDEVICE_A_LISTEN_PORT])); -+ if (ret) -+ goto out; -+ } -+ -+ if (flags & WGDEVICE_F_REPLACE_PEERS) -+ wg_peer_remove_all(wg); -+ -+ if (info->attrs[WGDEVICE_A_PRIVATE_KEY] && -+ nla_len(info->attrs[WGDEVICE_A_PRIVATE_KEY]) == -+ NOISE_PUBLIC_KEY_LEN) { -+ u8 *private_key = nla_data(info->attrs[WGDEVICE_A_PRIVATE_KEY]); -+ u8 public_key[NOISE_PUBLIC_KEY_LEN]; -+ struct wg_peer *peer, *temp; -+ -+ if (!crypto_memneq(wg->static_identity.static_private, -+ private_key, NOISE_PUBLIC_KEY_LEN)) -+ goto skip_set_private_key; -+ -+ /* We remove before setting, to prevent race, which means doing -+ * two 25519-genpub ops. -+ */ -+ if (curve25519_generate_public(public_key, private_key)) { -+ peer = wg_pubkey_hashtable_lookup(wg->peer_hashtable, -+ public_key); -+ if (peer) { -+ wg_peer_put(peer); -+ wg_peer_remove(peer); -+ } -+ } -+ -+ down_write(&wg->static_identity.lock); -+ wg_noise_set_static_identity_private_key(&wg->static_identity, -+ private_key); -+ list_for_each_entry_safe(peer, temp, &wg->peer_list, -+ peer_list) { -+ if (wg_noise_precompute_static_static(peer)) -+ wg_noise_expire_current_peer_keypairs(peer); -+ else -+ wg_peer_remove(peer); -+ } -+ wg_cookie_checker_precompute_device_keys(&wg->cookie_checker); -+ up_write(&wg->static_identity.lock); -+ } -+skip_set_private_key: -+ -+ if (info->attrs[WGDEVICE_A_PEERS]) { -+ struct nlattr *attr, *peer[WGPEER_A_MAX + 1]; -+ int rem; -+ -+ nla_for_each_nested(attr, info->attrs[WGDEVICE_A_PEERS], rem) { -+ ret = nla_parse_nested(peer, WGPEER_A_MAX, attr, -+ peer_policy, NULL); -+ if (ret < 0) -+ goto out; -+ ret = set_peer(wg, peer); -+ if (ret < 0) -+ goto out; -+ } -+ } -+ ret = 0; -+ -+out: -+ mutex_unlock(&wg->device_update_lock); -+ rtnl_unlock(); -+ dev_put(wg->dev); -+out_nodev: -+ if (info->attrs[WGDEVICE_A_PRIVATE_KEY]) -+ memzero_explicit(nla_data(info->attrs[WGDEVICE_A_PRIVATE_KEY]), -+ nla_len(info->attrs[WGDEVICE_A_PRIVATE_KEY])); -+ return ret; -+} -+ -+#ifndef COMPAT_CANNOT_USE_CONST_GENL_OPS -+static const -+#else -+static -+#endif -+struct genl_ops genl_ops[] = { -+ { -+ .cmd = WG_CMD_GET_DEVICE, -+#ifndef COMPAT_CANNOT_USE_NETLINK_START -+ .start = wg_get_device_start, -+#endif -+ .dumpit = wg_get_device_dump, -+ .done = wg_get_device_done, -+#ifdef COMPAT_CANNOT_INDIVIDUAL_NETLINK_OPS_POLICY -+ .policy = device_policy, -+#endif -+ .flags = GENL_UNS_ADMIN_PERM -+ }, { -+ .cmd = WG_CMD_SET_DEVICE, -+ .doit = wg_set_device, -+#ifdef COMPAT_CANNOT_INDIVIDUAL_NETLINK_OPS_POLICY -+ .policy = device_policy, -+#endif -+ .flags = GENL_UNS_ADMIN_PERM -+ } -+}; -+ -+static struct genl_family genl_family -+#ifndef COMPAT_CANNOT_USE_GENL_NOPS -+__ro_after_init = { -+ .ops = genl_ops, -+ .n_ops = ARRAY_SIZE(genl_ops), -+#else -+= { -+#endif -+ .name = WG_GENL_NAME, -+ .version = WG_GENL_VERSION, -+ .maxattr = WGDEVICE_A_MAX, -+ .module = THIS_MODULE, -+#ifndef COMPAT_CANNOT_INDIVIDUAL_NETLINK_OPS_POLICY -+ .policy = device_policy, -+#endif -+ .netnsok = true -+}; -+ -+int __init wg_genetlink_init(void) -+{ -+ return genl_register_family(&genl_family); -+} -+ -+void __exit wg_genetlink_uninit(void) -+{ -+ genl_unregister_family(&genl_family); -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/noise.c 2019-08-20 20:26:42.408341426 +0000 -@@ -0,0 +1,826 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include "noise.h" -+#include "device.h" -+#include "peer.h" -+#include "messages.h" -+#include "queueing.h" -+#include "peerlookup.h" -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+/* This implements Noise_IKpsk2: -+ * -+ * <- s -+ * ****** -+ * -> e, es, s, ss, {t} -+ * <- e, ee, se, psk, {} -+ */ -+ -+static const u8 handshake_name[37] = "Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s"; -+static const u8 identifier_name[34] = "WireGuard v1 zx2c4 Jason@zx2c4.com"; -+static u8 handshake_init_hash[NOISE_HASH_LEN] __ro_after_init; -+static u8 handshake_init_chaining_key[NOISE_HASH_LEN] __ro_after_init; -+static atomic64_t keypair_counter = ATOMIC64_INIT(0); -+ -+void __init wg_noise_init(void) -+{ -+ struct blake2s_state blake; -+ -+ blake2s(handshake_init_chaining_key, handshake_name, NULL, -+ NOISE_HASH_LEN, sizeof(handshake_name), 0); -+ blake2s_init(&blake, NOISE_HASH_LEN); -+ blake2s_update(&blake, handshake_init_chaining_key, NOISE_HASH_LEN); -+ blake2s_update(&blake, identifier_name, sizeof(identifier_name)); -+ blake2s_final(&blake, handshake_init_hash); -+} -+ -+/* Must hold peer->handshake.static_identity->lock */ -+bool wg_noise_precompute_static_static(struct wg_peer *peer) -+{ -+ bool ret = true; -+ -+ down_write(&peer->handshake.lock); -+ if (peer->handshake.static_identity->has_identity) -+ ret = curve25519( -+ peer->handshake.precomputed_static_static, -+ peer->handshake.static_identity->static_private, -+ peer->handshake.remote_static); -+ else -+ memset(peer->handshake.precomputed_static_static, 0, -+ NOISE_PUBLIC_KEY_LEN); -+ up_write(&peer->handshake.lock); -+ return ret; -+} -+ -+bool wg_noise_handshake_init(struct noise_handshake *handshake, -+ struct noise_static_identity *static_identity, -+ const u8 peer_public_key[NOISE_PUBLIC_KEY_LEN], -+ const u8 peer_preshared_key[NOISE_SYMMETRIC_KEY_LEN], -+ struct wg_peer *peer) -+{ -+ memset(handshake, 0, sizeof(*handshake)); -+ init_rwsem(&handshake->lock); -+ handshake->entry.type = INDEX_HASHTABLE_HANDSHAKE; -+ handshake->entry.peer = peer; -+ memcpy(handshake->remote_static, peer_public_key, NOISE_PUBLIC_KEY_LEN); -+ if (peer_preshared_key) -+ memcpy(handshake->preshared_key, peer_preshared_key, -+ NOISE_SYMMETRIC_KEY_LEN); -+ handshake->static_identity = static_identity; -+ handshake->state = HANDSHAKE_ZEROED; -+ return wg_noise_precompute_static_static(peer); -+} -+ -+static void handshake_zero(struct noise_handshake *handshake) -+{ -+ memset(&handshake->ephemeral_private, 0, NOISE_PUBLIC_KEY_LEN); -+ memset(&handshake->remote_ephemeral, 0, NOISE_PUBLIC_KEY_LEN); -+ memset(&handshake->hash, 0, NOISE_HASH_LEN); -+ memset(&handshake->chaining_key, 0, NOISE_HASH_LEN); -+ handshake->remote_index = 0; -+ handshake->state = HANDSHAKE_ZEROED; -+} -+ -+void wg_noise_handshake_clear(struct noise_handshake *handshake) -+{ -+ wg_index_hashtable_remove( -+ handshake->entry.peer->device->index_hashtable, -+ &handshake->entry); -+ down_write(&handshake->lock); -+ handshake_zero(handshake); -+ up_write(&handshake->lock); -+ wg_index_hashtable_remove( -+ handshake->entry.peer->device->index_hashtable, -+ &handshake->entry); -+} -+ -+static struct noise_keypair *keypair_create(struct wg_peer *peer) -+{ -+ struct noise_keypair *keypair = kzalloc(sizeof(*keypair), GFP_KERNEL); -+ -+ if (unlikely(!keypair)) -+ return NULL; -+ keypair->internal_id = atomic64_inc_return(&keypair_counter); -+ keypair->entry.type = INDEX_HASHTABLE_KEYPAIR; -+ keypair->entry.peer = peer; -+ kref_init(&keypair->refcount); -+ return keypair; -+} -+ -+static void keypair_free_rcu(struct rcu_head *rcu) -+{ -+ kzfree(container_of(rcu, struct noise_keypair, rcu)); -+} -+ -+static void keypair_free_kref(struct kref *kref) -+{ -+ struct noise_keypair *keypair = -+ container_of(kref, struct noise_keypair, refcount); -+ -+ net_dbg_ratelimited("%s: Keypair %llu destroyed for peer %llu\n", -+ keypair->entry.peer->device->dev->name, -+ keypair->internal_id, -+ keypair->entry.peer->internal_id); -+ wg_index_hashtable_remove(keypair->entry.peer->device->index_hashtable, -+ &keypair->entry); -+ call_rcu(&keypair->rcu, keypair_free_rcu); -+} -+ -+void wg_noise_keypair_put(struct noise_keypair *keypair, bool unreference_now) -+{ -+ if (unlikely(!keypair)) -+ return; -+ if (unlikely(unreference_now)) -+ wg_index_hashtable_remove( -+ keypair->entry.peer->device->index_hashtable, -+ &keypair->entry); -+ kref_put(&keypair->refcount, keypair_free_kref); -+} -+ -+struct noise_keypair *wg_noise_keypair_get(struct noise_keypair *keypair) -+{ -+ RCU_LOCKDEP_WARN(!rcu_read_lock_bh_held(), -+ "Taking noise keypair reference without holding the RCU BH read lock"); -+ if (unlikely(!keypair || !kref_get_unless_zero(&keypair->refcount))) -+ return NULL; -+ return keypair; -+} -+ -+void wg_noise_keypairs_clear(struct noise_keypairs *keypairs) -+{ -+ struct noise_keypair *old; -+ -+ spin_lock_bh(&keypairs->keypair_update_lock); -+ -+ /* We zero the next_keypair before zeroing the others, so that -+ * wg_noise_received_with_keypair returns early before subsequent ones -+ * are zeroed. -+ */ -+ old = rcu_dereference_protected(keypairs->next_keypair, -+ lockdep_is_held(&keypairs->keypair_update_lock)); -+ RCU_INIT_POINTER(keypairs->next_keypair, NULL); -+ wg_noise_keypair_put(old, true); -+ -+ old = rcu_dereference_protected(keypairs->previous_keypair, -+ lockdep_is_held(&keypairs->keypair_update_lock)); -+ RCU_INIT_POINTER(keypairs->previous_keypair, NULL); -+ wg_noise_keypair_put(old, true); -+ -+ old = rcu_dereference_protected(keypairs->current_keypair, -+ lockdep_is_held(&keypairs->keypair_update_lock)); -+ RCU_INIT_POINTER(keypairs->current_keypair, NULL); -+ wg_noise_keypair_put(old, true); -+ -+ spin_unlock_bh(&keypairs->keypair_update_lock); -+} -+ -+void wg_noise_expire_current_peer_keypairs(struct wg_peer *peer) -+{ -+ struct noise_keypair *keypair; -+ -+ wg_noise_handshake_clear(&peer->handshake); -+ wg_noise_reset_last_sent_handshake(&peer->last_sent_handshake); -+ -+ spin_lock_bh(&peer->keypairs.keypair_update_lock); -+ keypair = rcu_dereference_protected(peer->keypairs.next_keypair, -+ lockdep_is_held(&peer->keypairs.keypair_update_lock)); -+ if (keypair) -+ keypair->sending.is_valid = false; -+ keypair = rcu_dereference_protected(peer->keypairs.current_keypair, -+ lockdep_is_held(&peer->keypairs.keypair_update_lock)); -+ if (keypair) -+ keypair->sending.is_valid = false; -+ spin_unlock_bh(&peer->keypairs.keypair_update_lock); -+} -+ -+static void add_new_keypair(struct noise_keypairs *keypairs, -+ struct noise_keypair *new_keypair) -+{ -+ struct noise_keypair *previous_keypair, *next_keypair, *current_keypair; -+ -+ spin_lock_bh(&keypairs->keypair_update_lock); -+ previous_keypair = rcu_dereference_protected(keypairs->previous_keypair, -+ lockdep_is_held(&keypairs->keypair_update_lock)); -+ next_keypair = rcu_dereference_protected(keypairs->next_keypair, -+ lockdep_is_held(&keypairs->keypair_update_lock)); -+ current_keypair = rcu_dereference_protected(keypairs->current_keypair, -+ lockdep_is_held(&keypairs->keypair_update_lock)); -+ if (new_keypair->i_am_the_initiator) { -+ /* If we're the initiator, it means we've sent a handshake, and -+ * received a confirmation response, which means this new -+ * keypair can now be used. -+ */ -+ if (next_keypair) { -+ /* If there already was a next keypair pending, we -+ * demote it to be the previous keypair, and free the -+ * existing current. Note that this means KCI can result -+ * in this transition. It would perhaps be more sound to -+ * always just get rid of the unused next keypair -+ * instead of putting it in the previous slot, but this -+ * might be a bit less robust. Something to think about -+ * for the future. -+ */ -+ RCU_INIT_POINTER(keypairs->next_keypair, NULL); -+ rcu_assign_pointer(keypairs->previous_keypair, -+ next_keypair); -+ wg_noise_keypair_put(current_keypair, true); -+ } else /* If there wasn't an existing next keypair, we replace -+ * the previous with the current one. -+ */ -+ rcu_assign_pointer(keypairs->previous_keypair, -+ current_keypair); -+ /* At this point we can get rid of the old previous keypair, and -+ * set up the new keypair. -+ */ -+ wg_noise_keypair_put(previous_keypair, true); -+ rcu_assign_pointer(keypairs->current_keypair, new_keypair); -+ } else { -+ /* If we're the responder, it means we can't use the new keypair -+ * until we receive confirmation via the first data packet, so -+ * we get rid of the existing previous one, the possibly -+ * existing next one, and slide in the new next one. -+ */ -+ rcu_assign_pointer(keypairs->next_keypair, new_keypair); -+ wg_noise_keypair_put(next_keypair, true); -+ RCU_INIT_POINTER(keypairs->previous_keypair, NULL); -+ wg_noise_keypair_put(previous_keypair, true); -+ } -+ spin_unlock_bh(&keypairs->keypair_update_lock); -+} -+ -+bool wg_noise_received_with_keypair(struct noise_keypairs *keypairs, -+ struct noise_keypair *received_keypair) -+{ -+ struct noise_keypair *old_keypair; -+ bool key_is_new; -+ -+ /* We first check without taking the spinlock. */ -+ key_is_new = received_keypair == -+ rcu_access_pointer(keypairs->next_keypair); -+ if (likely(!key_is_new)) -+ return false; -+ -+ spin_lock_bh(&keypairs->keypair_update_lock); -+ /* After locking, we double check that things didn't change from -+ * beneath us. -+ */ -+ if (unlikely(received_keypair != -+ rcu_dereference_protected(keypairs->next_keypair, -+ lockdep_is_held(&keypairs->keypair_update_lock)))) { -+ spin_unlock_bh(&keypairs->keypair_update_lock); -+ return false; -+ } -+ -+ /* When we've finally received the confirmation, we slide the next -+ * into the current, the current into the previous, and get rid of -+ * the old previous. -+ */ -+ old_keypair = rcu_dereference_protected(keypairs->previous_keypair, -+ lockdep_is_held(&keypairs->keypair_update_lock)); -+ rcu_assign_pointer(keypairs->previous_keypair, -+ rcu_dereference_protected(keypairs->current_keypair, -+ lockdep_is_held(&keypairs->keypair_update_lock))); -+ wg_noise_keypair_put(old_keypair, true); -+ rcu_assign_pointer(keypairs->current_keypair, received_keypair); -+ RCU_INIT_POINTER(keypairs->next_keypair, NULL); -+ -+ spin_unlock_bh(&keypairs->keypair_update_lock); -+ return true; -+} -+ -+/* Must hold static_identity->lock */ -+void wg_noise_set_static_identity_private_key( -+ struct noise_static_identity *static_identity, -+ const u8 private_key[NOISE_PUBLIC_KEY_LEN]) -+{ -+ memcpy(static_identity->static_private, private_key, -+ NOISE_PUBLIC_KEY_LEN); -+ curve25519_clamp_secret(static_identity->static_private); -+ static_identity->has_identity = curve25519_generate_public( -+ static_identity->static_public, private_key); -+} -+ -+/* This is Hugo Krawczyk's HKDF: -+ * - https://eprint.iacr.org/2010/264.pdf -+ * - https://tools.ietf.org/html/rfc5869 -+ */ -+static void kdf(u8 *first_dst, u8 *second_dst, u8 *third_dst, const u8 *data, -+ size_t first_len, size_t second_len, size_t third_len, -+ size_t data_len, const u8 chaining_key[NOISE_HASH_LEN]) -+{ -+ u8 output[BLAKE2S_HASH_SIZE + 1]; -+ u8 secret[BLAKE2S_HASH_SIZE]; -+ -+ WARN_ON(IS_ENABLED(DEBUG) && -+ (first_len > BLAKE2S_HASH_SIZE || -+ second_len > BLAKE2S_HASH_SIZE || -+ third_len > BLAKE2S_HASH_SIZE || -+ ((second_len || second_dst || third_len || third_dst) && -+ (!first_len || !first_dst)) || -+ ((third_len || third_dst) && (!second_len || !second_dst)))); -+ -+ /* Extract entropy from data into secret */ -+ blake2s_hmac(secret, data, chaining_key, BLAKE2S_HASH_SIZE, data_len, -+ NOISE_HASH_LEN); -+ -+ if (!first_dst || !first_len) -+ goto out; -+ -+ /* Expand first key: key = secret, data = 0x1 */ -+ output[0] = 1; -+ blake2s_hmac(output, output, secret, BLAKE2S_HASH_SIZE, 1, -+ BLAKE2S_HASH_SIZE); -+ memcpy(first_dst, output, first_len); -+ -+ if (!second_dst || !second_len) -+ goto out; -+ -+ /* Expand second key: key = secret, data = first-key || 0x2 */ -+ output[BLAKE2S_HASH_SIZE] = 2; -+ blake2s_hmac(output, output, secret, BLAKE2S_HASH_SIZE, -+ BLAKE2S_HASH_SIZE + 1, BLAKE2S_HASH_SIZE); -+ memcpy(second_dst, output, second_len); -+ -+ if (!third_dst || !third_len) -+ goto out; -+ -+ /* Expand third key: key = secret, data = second-key || 0x3 */ -+ output[BLAKE2S_HASH_SIZE] = 3; -+ blake2s_hmac(output, output, secret, BLAKE2S_HASH_SIZE, -+ BLAKE2S_HASH_SIZE + 1, BLAKE2S_HASH_SIZE); -+ memcpy(third_dst, output, third_len); -+ -+out: -+ /* Clear sensitive data from stack */ -+ memzero_explicit(secret, BLAKE2S_HASH_SIZE); -+ memzero_explicit(output, BLAKE2S_HASH_SIZE + 1); -+} -+ -+static void symmetric_key_init(struct noise_symmetric_key *key) -+{ -+ spin_lock_init(&key->counter.receive.lock); -+ atomic64_set(&key->counter.counter, 0); -+ memset(key->counter.receive.backtrack, 0, -+ sizeof(key->counter.receive.backtrack)); -+ key->birthdate = ktime_get_coarse_boottime_ns(); -+ key->is_valid = true; -+} -+ -+static void derive_keys(struct noise_symmetric_key *first_dst, -+ struct noise_symmetric_key *second_dst, -+ const u8 chaining_key[NOISE_HASH_LEN]) -+{ -+ kdf(first_dst->key, second_dst->key, NULL, NULL, -+ NOISE_SYMMETRIC_KEY_LEN, NOISE_SYMMETRIC_KEY_LEN, 0, 0, -+ chaining_key); -+ symmetric_key_init(first_dst); -+ symmetric_key_init(second_dst); -+} -+ -+static bool __must_check mix_dh(u8 chaining_key[NOISE_HASH_LEN], -+ u8 key[NOISE_SYMMETRIC_KEY_LEN], -+ const u8 private[NOISE_PUBLIC_KEY_LEN], -+ const u8 public[NOISE_PUBLIC_KEY_LEN]) -+{ -+ u8 dh_calculation[NOISE_PUBLIC_KEY_LEN]; -+ -+ if (unlikely(!curve25519(dh_calculation, private, public))) -+ return false; -+ kdf(chaining_key, key, NULL, dh_calculation, NOISE_HASH_LEN, -+ NOISE_SYMMETRIC_KEY_LEN, 0, NOISE_PUBLIC_KEY_LEN, chaining_key); -+ memzero_explicit(dh_calculation, NOISE_PUBLIC_KEY_LEN); -+ return true; -+} -+ -+static void mix_hash(u8 hash[NOISE_HASH_LEN], const u8 *src, size_t src_len) -+{ -+ struct blake2s_state blake; -+ -+ blake2s_init(&blake, NOISE_HASH_LEN); -+ blake2s_update(&blake, hash, NOISE_HASH_LEN); -+ blake2s_update(&blake, src, src_len); -+ blake2s_final(&blake, hash); -+} -+ -+static void mix_psk(u8 chaining_key[NOISE_HASH_LEN], u8 hash[NOISE_HASH_LEN], -+ u8 key[NOISE_SYMMETRIC_KEY_LEN], -+ const u8 psk[NOISE_SYMMETRIC_KEY_LEN]) -+{ -+ u8 temp_hash[NOISE_HASH_LEN]; -+ -+ kdf(chaining_key, temp_hash, key, psk, NOISE_HASH_LEN, NOISE_HASH_LEN, -+ NOISE_SYMMETRIC_KEY_LEN, NOISE_SYMMETRIC_KEY_LEN, chaining_key); -+ mix_hash(hash, temp_hash, NOISE_HASH_LEN); -+ memzero_explicit(temp_hash, NOISE_HASH_LEN); -+} -+ -+static void handshake_init(u8 chaining_key[NOISE_HASH_LEN], -+ u8 hash[NOISE_HASH_LEN], -+ const u8 remote_static[NOISE_PUBLIC_KEY_LEN]) -+{ -+ memcpy(hash, handshake_init_hash, NOISE_HASH_LEN); -+ memcpy(chaining_key, handshake_init_chaining_key, NOISE_HASH_LEN); -+ mix_hash(hash, remote_static, NOISE_PUBLIC_KEY_LEN); -+} -+ -+static void message_encrypt(u8 *dst_ciphertext, const u8 *src_plaintext, -+ size_t src_len, u8 key[NOISE_SYMMETRIC_KEY_LEN], -+ u8 hash[NOISE_HASH_LEN]) -+{ -+ chacha20poly1305_encrypt(dst_ciphertext, src_plaintext, src_len, hash, -+ NOISE_HASH_LEN, -+ 0 /* Always zero for Noise_IK */, key); -+ mix_hash(hash, dst_ciphertext, noise_encrypted_len(src_len)); -+} -+ -+static bool message_decrypt(u8 *dst_plaintext, const u8 *src_ciphertext, -+ size_t src_len, u8 key[NOISE_SYMMETRIC_KEY_LEN], -+ u8 hash[NOISE_HASH_LEN]) -+{ -+ if (!chacha20poly1305_decrypt(dst_plaintext, src_ciphertext, src_len, -+ hash, NOISE_HASH_LEN, -+ 0 /* Always zero for Noise_IK */, key)) -+ return false; -+ mix_hash(hash, src_ciphertext, src_len); -+ return true; -+} -+ -+static void message_ephemeral(u8 ephemeral_dst[NOISE_PUBLIC_KEY_LEN], -+ const u8 ephemeral_src[NOISE_PUBLIC_KEY_LEN], -+ u8 chaining_key[NOISE_HASH_LEN], -+ u8 hash[NOISE_HASH_LEN]) -+{ -+ if (ephemeral_dst != ephemeral_src) -+ memcpy(ephemeral_dst, ephemeral_src, NOISE_PUBLIC_KEY_LEN); -+ mix_hash(hash, ephemeral_src, NOISE_PUBLIC_KEY_LEN); -+ kdf(chaining_key, NULL, NULL, ephemeral_src, NOISE_HASH_LEN, 0, 0, -+ NOISE_PUBLIC_KEY_LEN, chaining_key); -+} -+ -+static void tai64n_now(u8 output[NOISE_TIMESTAMP_LEN]) -+{ -+ struct timespec64 now; -+ -+ ktime_get_real_ts64(&now); -+ -+ /* In order to prevent some sort of infoleak from precise timers, we -+ * round down the nanoseconds part to the closest rounded-down power of -+ * two to the maximum initiations per second allowed anyway by the -+ * implementation. -+ */ -+ now.tv_nsec = ALIGN_DOWN(now.tv_nsec, -+ rounddown_pow_of_two(NSEC_PER_SEC / INITIATIONS_PER_SECOND)); -+ -+ /* https://cr.yp.to/libtai/tai64.html */ -+ *(__be64 *)output = cpu_to_be64(0x400000000000000aULL + now.tv_sec); -+ *(__be32 *)(output + sizeof(__be64)) = cpu_to_be32(now.tv_nsec); -+} -+ -+bool -+wg_noise_handshake_create_initiation(struct message_handshake_initiation *dst, -+ struct noise_handshake *handshake) -+{ -+ u8 timestamp[NOISE_TIMESTAMP_LEN]; -+ u8 key[NOISE_SYMMETRIC_KEY_LEN]; -+ bool ret = false; -+ -+ /* We need to wait for crng _before_ taking any locks, since -+ * curve25519_generate_secret uses get_random_bytes_wait. -+ */ -+ wait_for_random_bytes(); -+ -+ down_read(&handshake->static_identity->lock); -+ down_write(&handshake->lock); -+ -+ if (unlikely(!handshake->static_identity->has_identity)) -+ goto out; -+ -+ dst->header.type = cpu_to_le32(MESSAGE_HANDSHAKE_INITIATION); -+ -+ handshake_init(handshake->chaining_key, handshake->hash, -+ handshake->remote_static); -+ -+ /* e */ -+ curve25519_generate_secret(handshake->ephemeral_private); -+ if (!curve25519_generate_public(dst->unencrypted_ephemeral, -+ handshake->ephemeral_private)) -+ goto out; -+ message_ephemeral(dst->unencrypted_ephemeral, -+ dst->unencrypted_ephemeral, handshake->chaining_key, -+ handshake->hash); -+ -+ /* es */ -+ if (!mix_dh(handshake->chaining_key, key, handshake->ephemeral_private, -+ handshake->remote_static)) -+ goto out; -+ -+ /* s */ -+ message_encrypt(dst->encrypted_static, -+ handshake->static_identity->static_public, -+ NOISE_PUBLIC_KEY_LEN, key, handshake->hash); -+ -+ /* ss */ -+ kdf(handshake->chaining_key, key, NULL, -+ handshake->precomputed_static_static, NOISE_HASH_LEN, -+ NOISE_SYMMETRIC_KEY_LEN, 0, NOISE_PUBLIC_KEY_LEN, -+ handshake->chaining_key); -+ -+ /* {t} */ -+ tai64n_now(timestamp); -+ message_encrypt(dst->encrypted_timestamp, timestamp, -+ NOISE_TIMESTAMP_LEN, key, handshake->hash); -+ -+ dst->sender_index = wg_index_hashtable_insert( -+ handshake->entry.peer->device->index_hashtable, -+ &handshake->entry); -+ -+ handshake->state = HANDSHAKE_CREATED_INITIATION; -+ ret = true; -+ -+out: -+ up_write(&handshake->lock); -+ up_read(&handshake->static_identity->lock); -+ memzero_explicit(key, NOISE_SYMMETRIC_KEY_LEN); -+ return ret; -+} -+ -+struct wg_peer * -+wg_noise_handshake_consume_initiation(struct message_handshake_initiation *src, -+ struct wg_device *wg) -+{ -+ struct wg_peer *peer = NULL, *ret_peer = NULL; -+ struct noise_handshake *handshake; -+ bool replay_attack, flood_attack; -+ u8 key[NOISE_SYMMETRIC_KEY_LEN]; -+ u8 chaining_key[NOISE_HASH_LEN]; -+ u8 hash[NOISE_HASH_LEN]; -+ u8 s[NOISE_PUBLIC_KEY_LEN]; -+ u8 e[NOISE_PUBLIC_KEY_LEN]; -+ u8 t[NOISE_TIMESTAMP_LEN]; -+ -+ down_read(&wg->static_identity.lock); -+ if (unlikely(!wg->static_identity.has_identity)) -+ goto out; -+ -+ handshake_init(chaining_key, hash, wg->static_identity.static_public); -+ -+ /* e */ -+ message_ephemeral(e, src->unencrypted_ephemeral, chaining_key, hash); -+ -+ /* es */ -+ if (!mix_dh(chaining_key, key, wg->static_identity.static_private, e)) -+ goto out; -+ -+ /* s */ -+ if (!message_decrypt(s, src->encrypted_static, -+ sizeof(src->encrypted_static), key, hash)) -+ goto out; -+ -+ /* Lookup which peer we're actually talking to */ -+ peer = wg_pubkey_hashtable_lookup(wg->peer_hashtable, s); -+ if (!peer) -+ goto out; -+ handshake = &peer->handshake; -+ -+ /* ss */ -+ kdf(chaining_key, key, NULL, handshake->precomputed_static_static, -+ NOISE_HASH_LEN, NOISE_SYMMETRIC_KEY_LEN, 0, NOISE_PUBLIC_KEY_LEN, -+ chaining_key); -+ -+ /* {t} */ -+ if (!message_decrypt(t, src->encrypted_timestamp, -+ sizeof(src->encrypted_timestamp), key, hash)) -+ goto out; -+ -+ down_read(&handshake->lock); -+ replay_attack = memcmp(t, handshake->latest_timestamp, -+ NOISE_TIMESTAMP_LEN) <= 0; -+ flood_attack = (s64)handshake->last_initiation_consumption + -+ NSEC_PER_SEC / INITIATIONS_PER_SECOND > -+ (s64)ktime_get_coarse_boottime_ns(); -+ up_read(&handshake->lock); -+ if (replay_attack || flood_attack) -+ goto out; -+ -+ /* Success! Copy everything to peer */ -+ down_write(&handshake->lock); -+ memcpy(handshake->remote_ephemeral, e, NOISE_PUBLIC_KEY_LEN); -+ memcpy(handshake->latest_timestamp, t, NOISE_TIMESTAMP_LEN); -+ memcpy(handshake->hash, hash, NOISE_HASH_LEN); -+ memcpy(handshake->chaining_key, chaining_key, NOISE_HASH_LEN); -+ handshake->remote_index = src->sender_index; -+ handshake->last_initiation_consumption = ktime_get_coarse_boottime_ns(); -+ handshake->state = HANDSHAKE_CONSUMED_INITIATION; -+ up_write(&handshake->lock); -+ ret_peer = peer; -+ -+out: -+ memzero_explicit(key, NOISE_SYMMETRIC_KEY_LEN); -+ memzero_explicit(hash, NOISE_HASH_LEN); -+ memzero_explicit(chaining_key, NOISE_HASH_LEN); -+ up_read(&wg->static_identity.lock); -+ if (!ret_peer) -+ wg_peer_put(peer); -+ return ret_peer; -+} -+ -+bool wg_noise_handshake_create_response(struct message_handshake_response *dst, -+ struct noise_handshake *handshake) -+{ -+ u8 key[NOISE_SYMMETRIC_KEY_LEN]; -+ bool ret = false; -+ -+ /* We need to wait for crng _before_ taking any locks, since -+ * curve25519_generate_secret uses get_random_bytes_wait. -+ */ -+ wait_for_random_bytes(); -+ -+ down_read(&handshake->static_identity->lock); -+ down_write(&handshake->lock); -+ -+ if (handshake->state != HANDSHAKE_CONSUMED_INITIATION) -+ goto out; -+ -+ dst->header.type = cpu_to_le32(MESSAGE_HANDSHAKE_RESPONSE); -+ dst->receiver_index = handshake->remote_index; -+ -+ /* e */ -+ curve25519_generate_secret(handshake->ephemeral_private); -+ if (!curve25519_generate_public(dst->unencrypted_ephemeral, -+ handshake->ephemeral_private)) -+ goto out; -+ message_ephemeral(dst->unencrypted_ephemeral, -+ dst->unencrypted_ephemeral, handshake->chaining_key, -+ handshake->hash); -+ -+ /* ee */ -+ if (!mix_dh(handshake->chaining_key, NULL, handshake->ephemeral_private, -+ handshake->remote_ephemeral)) -+ goto out; -+ -+ /* se */ -+ if (!mix_dh(handshake->chaining_key, NULL, handshake->ephemeral_private, -+ handshake->remote_static)) -+ goto out; -+ -+ /* psk */ -+ mix_psk(handshake->chaining_key, handshake->hash, key, -+ handshake->preshared_key); -+ -+ /* {} */ -+ message_encrypt(dst->encrypted_nothing, NULL, 0, key, handshake->hash); -+ -+ dst->sender_index = wg_index_hashtable_insert( -+ handshake->entry.peer->device->index_hashtable, -+ &handshake->entry); -+ -+ handshake->state = HANDSHAKE_CREATED_RESPONSE; -+ ret = true; -+ -+out: -+ up_write(&handshake->lock); -+ up_read(&handshake->static_identity->lock); -+ memzero_explicit(key, NOISE_SYMMETRIC_KEY_LEN); -+ return ret; -+} -+ -+struct wg_peer * -+wg_noise_handshake_consume_response(struct message_handshake_response *src, -+ struct wg_device *wg) -+{ -+ enum noise_handshake_state state = HANDSHAKE_ZEROED; -+ struct wg_peer *peer = NULL, *ret_peer = NULL; -+ struct noise_handshake *handshake; -+ u8 key[NOISE_SYMMETRIC_KEY_LEN]; -+ u8 hash[NOISE_HASH_LEN]; -+ u8 chaining_key[NOISE_HASH_LEN]; -+ u8 e[NOISE_PUBLIC_KEY_LEN]; -+ u8 ephemeral_private[NOISE_PUBLIC_KEY_LEN]; -+ u8 static_private[NOISE_PUBLIC_KEY_LEN]; -+ -+ down_read(&wg->static_identity.lock); -+ -+ if (unlikely(!wg->static_identity.has_identity)) -+ goto out; -+ -+ handshake = (struct noise_handshake *)wg_index_hashtable_lookup( -+ wg->index_hashtable, INDEX_HASHTABLE_HANDSHAKE, -+ src->receiver_index, &peer); -+ if (unlikely(!handshake)) -+ goto out; -+ -+ down_read(&handshake->lock); -+ state = handshake->state; -+ memcpy(hash, handshake->hash, NOISE_HASH_LEN); -+ memcpy(chaining_key, handshake->chaining_key, NOISE_HASH_LEN); -+ memcpy(ephemeral_private, handshake->ephemeral_private, -+ NOISE_PUBLIC_KEY_LEN); -+ up_read(&handshake->lock); -+ -+ if (state != HANDSHAKE_CREATED_INITIATION) -+ goto fail; -+ -+ /* e */ -+ message_ephemeral(e, src->unencrypted_ephemeral, chaining_key, hash); -+ -+ /* ee */ -+ if (!mix_dh(chaining_key, NULL, ephemeral_private, e)) -+ goto fail; -+ -+ /* se */ -+ if (!mix_dh(chaining_key, NULL, wg->static_identity.static_private, e)) -+ goto fail; -+ -+ /* psk */ -+ mix_psk(chaining_key, hash, key, handshake->preshared_key); -+ -+ /* {} */ -+ if (!message_decrypt(NULL, src->encrypted_nothing, -+ sizeof(src->encrypted_nothing), key, hash)) -+ goto fail; -+ -+ /* Success! Copy everything to peer */ -+ down_write(&handshake->lock); -+ /* It's important to check that the state is still the same, while we -+ * have an exclusive lock. -+ */ -+ if (handshake->state != state) { -+ up_write(&handshake->lock); -+ goto fail; -+ } -+ memcpy(handshake->remote_ephemeral, e, NOISE_PUBLIC_KEY_LEN); -+ memcpy(handshake->hash, hash, NOISE_HASH_LEN); -+ memcpy(handshake->chaining_key, chaining_key, NOISE_HASH_LEN); -+ handshake->remote_index = src->sender_index; -+ handshake->state = HANDSHAKE_CONSUMED_RESPONSE; -+ up_write(&handshake->lock); -+ ret_peer = peer; -+ goto out; -+ -+fail: -+ wg_peer_put(peer); -+out: -+ memzero_explicit(key, NOISE_SYMMETRIC_KEY_LEN); -+ memzero_explicit(hash, NOISE_HASH_LEN); -+ memzero_explicit(chaining_key, NOISE_HASH_LEN); -+ memzero_explicit(ephemeral_private, NOISE_PUBLIC_KEY_LEN); -+ memzero_explicit(static_private, NOISE_PUBLIC_KEY_LEN); -+ up_read(&wg->static_identity.lock); -+ return ret_peer; -+} -+ -+bool wg_noise_handshake_begin_session(struct noise_handshake *handshake, -+ struct noise_keypairs *keypairs) -+{ -+ struct noise_keypair *new_keypair; -+ bool ret = false; -+ -+ down_write(&handshake->lock); -+ if (handshake->state != HANDSHAKE_CREATED_RESPONSE && -+ handshake->state != HANDSHAKE_CONSUMED_RESPONSE) -+ goto out; -+ -+ new_keypair = keypair_create(handshake->entry.peer); -+ if (!new_keypair) -+ goto out; -+ new_keypair->i_am_the_initiator = handshake->state == -+ HANDSHAKE_CONSUMED_RESPONSE; -+ new_keypair->remote_index = handshake->remote_index; -+ -+ if (new_keypair->i_am_the_initiator) -+ derive_keys(&new_keypair->sending, &new_keypair->receiving, -+ handshake->chaining_key); -+ else -+ derive_keys(&new_keypair->receiving, &new_keypair->sending, -+ handshake->chaining_key); -+ -+ handshake_zero(handshake); -+ rcu_read_lock_bh(); -+ if (likely(!READ_ONCE(container_of(handshake, struct wg_peer, -+ handshake)->is_dead))) { -+ add_new_keypair(keypairs, new_keypair); -+ net_dbg_ratelimited("%s: Keypair %llu created for peer %llu\n", -+ handshake->entry.peer->device->dev->name, -+ new_keypair->internal_id, -+ handshake->entry.peer->internal_id); -+ ret = wg_index_hashtable_replace( -+ handshake->entry.peer->device->index_hashtable, -+ &handshake->entry, &new_keypair->entry); -+ } else { -+ kzfree(new_keypair); -+ } -+ rcu_read_unlock_bh(); -+ -+out: -+ up_write(&handshake->lock); -+ return ret; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/peer.c 2019-08-20 20:26:42.408341426 +0000 -@@ -0,0 +1,240 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include "peer.h" -+#include "device.h" -+#include "queueing.h" -+#include "timers.h" -+#include "peerlookup.h" -+#include "noise.h" -+ -+#include -+#include -+#include -+#include -+ -+static atomic64_t peer_counter = ATOMIC64_INIT(0); -+ -+struct wg_peer *wg_peer_create(struct wg_device *wg, -+ const u8 public_key[NOISE_PUBLIC_KEY_LEN], -+ const u8 preshared_key[NOISE_SYMMETRIC_KEY_LEN]) -+{ -+ struct wg_peer *peer; -+ int ret = -ENOMEM; -+ -+ lockdep_assert_held(&wg->device_update_lock); -+ -+ if (wg->num_peers >= MAX_PEERS_PER_DEVICE) -+ return ERR_PTR(ret); -+ -+ peer = kzalloc(sizeof(*peer), GFP_KERNEL); -+ if (unlikely(!peer)) -+ return ERR_PTR(ret); -+ peer->device = wg; -+ -+ if (!wg_noise_handshake_init(&peer->handshake, &wg->static_identity, -+ public_key, preshared_key, peer)) { -+ ret = -EKEYREJECTED; -+ goto err_1; -+ } -+ if (dst_cache_init(&peer->endpoint_cache, GFP_KERNEL)) -+ goto err_1; -+ if (wg_packet_queue_init(&peer->tx_queue, wg_packet_tx_worker, false, -+ MAX_QUEUED_PACKETS)) -+ goto err_2; -+ if (wg_packet_queue_init(&peer->rx_queue, NULL, false, -+ MAX_QUEUED_PACKETS)) -+ goto err_3; -+ -+ peer->internal_id = atomic64_inc_return(&peer_counter); -+ peer->serial_work_cpu = nr_cpumask_bits; -+ wg_cookie_init(&peer->latest_cookie); -+ wg_timers_init(peer); -+ wg_cookie_checker_precompute_peer_keys(peer); -+ spin_lock_init(&peer->keypairs.keypair_update_lock); -+ INIT_WORK(&peer->transmit_handshake_work, -+ wg_packet_handshake_send_worker); -+ rwlock_init(&peer->endpoint_lock); -+ kref_init(&peer->refcount); -+ skb_queue_head_init(&peer->staged_packet_queue); -+ wg_noise_reset_last_sent_handshake(&peer->last_sent_handshake); -+ set_bit(NAPI_STATE_NO_BUSY_POLL, &peer->napi.state); -+ netif_napi_add(wg->dev, &peer->napi, wg_packet_rx_poll, -+ NAPI_POLL_WEIGHT); -+ napi_enable(&peer->napi); -+ list_add_tail(&peer->peer_list, &wg->peer_list); -+ INIT_LIST_HEAD(&peer->allowedips_list); -+ wg_pubkey_hashtable_add(wg->peer_hashtable, peer); -+ ++wg->num_peers; -+ pr_debug("%s: Peer %llu created\n", wg->dev->name, peer->internal_id); -+ return peer; -+ -+err_3: -+ wg_packet_queue_free(&peer->tx_queue, false); -+err_2: -+ dst_cache_destroy(&peer->endpoint_cache); -+err_1: -+ kfree(peer); -+ return ERR_PTR(ret); -+} -+ -+struct wg_peer *wg_peer_get_maybe_zero(struct wg_peer *peer) -+{ -+ RCU_LOCKDEP_WARN(!rcu_read_lock_bh_held(), -+ "Taking peer reference without holding the RCU read lock"); -+ if (unlikely(!peer || !kref_get_unless_zero(&peer->refcount))) -+ return NULL; -+ return peer; -+} -+ -+static void peer_make_dead(struct wg_peer *peer) -+{ -+ /* Remove from configuration-time lookup structures. */ -+ list_del_init(&peer->peer_list); -+ wg_allowedips_remove_by_peer(&peer->device->peer_allowedips, peer, -+ &peer->device->device_update_lock); -+ wg_pubkey_hashtable_remove(peer->device->peer_hashtable, peer); -+ -+ /* Mark as dead, so that we don't allow jumping contexts after. */ -+ WRITE_ONCE(peer->is_dead, true); -+ -+ /* The caller must now synchronize_rcu() for this to take effect. */ -+} -+ -+static void peer_remove_after_dead(struct wg_peer *peer) -+{ -+ WARN_ON(!peer->is_dead); -+ -+ /* No more keypairs can be created for this peer, since is_dead protects -+ * add_new_keypair, so we can now destroy existing ones. -+ */ -+ wg_noise_keypairs_clear(&peer->keypairs); -+ -+ /* Destroy all ongoing timers that were in-flight at the beginning of -+ * this function. -+ */ -+ wg_timers_stop(peer); -+ -+ /* The transition between packet encryption/decryption queues isn't -+ * guarded by is_dead, but each reference's life is strictly bounded by -+ * two generations: once for parallel crypto and once for serial -+ * ingestion, so we can simply flush twice, and be sure that we no -+ * longer have references inside these queues. -+ */ -+ -+ /* a) For encrypt/decrypt. */ -+ flush_workqueue(peer->device->packet_crypt_wq); -+ /* b.1) For send (but not receive, since that's napi). */ -+ flush_workqueue(peer->device->packet_crypt_wq); -+ /* b.2.1) For receive (but not send, since that's wq). */ -+ napi_disable(&peer->napi); -+ /* b.2.1) It's now safe to remove the napi struct, which must be done -+ * here from process context. -+ */ -+ netif_napi_del(&peer->napi); -+ -+ /* Ensure any workstructs we own (like transmit_handshake_work or -+ * clear_peer_work) no longer are in use. -+ */ -+ flush_workqueue(peer->device->handshake_send_wq); -+ -+ /* After the above flushes, a peer might still be active in a few -+ * different contexts: 1) from xmit(), before hitting is_dead and -+ * returning, 2) from wg_packet_consume_data(), before hitting is_dead -+ * and returning, 3) from wg_receive_handshake_packet() after a point -+ * where it has processed an incoming handshake packet, but where -+ * all calls to pass it off to timers fails because of is_dead. We won't -+ * have new references in (1) eventually, because we're removed from -+ * allowedips; we won't have new references in (2) eventually, because -+ * wg_index_hashtable_lookup will always return NULL, since we removed -+ * all existing keypairs and no more can be created; we won't have new -+ * references in (3) eventually, because we're removed from the pubkey -+ * hash table, which allows for a maximum of one handshake response, -+ * via the still-uncleared index hashtable entry, but not more than one, -+ * and in wg_cookie_message_consume, the lookup eventually gets a peer -+ * with a refcount of zero, so no new reference is taken. -+ */ -+ -+ --peer->device->num_peers; -+ wg_peer_put(peer); -+} -+ -+/* We have a separate "remove" function make sure that all active places where -+ * a peer is currently operating will eventually come to an end and not pass -+ * their reference onto another context. -+ */ -+void wg_peer_remove(struct wg_peer *peer) -+{ -+ if (unlikely(!peer)) -+ return; -+ lockdep_assert_held(&peer->device->device_update_lock); -+ -+ peer_make_dead(peer); -+ synchronize_rcu(); -+ peer_remove_after_dead(peer); -+} -+ -+void wg_peer_remove_all(struct wg_device *wg) -+{ -+ struct wg_peer *peer, *temp; -+ LIST_HEAD(dead_peers); -+ -+ lockdep_assert_held(&wg->device_update_lock); -+ -+ /* Avoid having to traverse individually for each one. */ -+ wg_allowedips_free(&wg->peer_allowedips, &wg->device_update_lock); -+ -+ list_for_each_entry_safe(peer, temp, &wg->peer_list, peer_list) { -+ peer_make_dead(peer); -+ list_add_tail(&peer->peer_list, &dead_peers); -+ } -+ synchronize_rcu(); -+ list_for_each_entry_safe(peer, temp, &dead_peers, peer_list) -+ peer_remove_after_dead(peer); -+} -+ -+static void rcu_release(struct rcu_head *rcu) -+{ -+ struct wg_peer *peer = container_of(rcu, struct wg_peer, rcu); -+ -+ dst_cache_destroy(&peer->endpoint_cache); -+ wg_packet_queue_free(&peer->rx_queue, false); -+ wg_packet_queue_free(&peer->tx_queue, false); -+ -+ /* The final zeroing takes care of clearing any remaining handshake key -+ * material and other potentially sensitive information. -+ */ -+ kzfree(peer); -+} -+ -+static void kref_release(struct kref *refcount) -+{ -+ struct wg_peer *peer = container_of(refcount, struct wg_peer, refcount); -+ -+ pr_debug("%s: Peer %llu (%pISpfsc) destroyed\n", -+ peer->device->dev->name, peer->internal_id, -+ &peer->endpoint.addr); -+ -+ /* Remove ourself from dynamic runtime lookup structures, now that the -+ * last reference is gone. -+ */ -+ wg_index_hashtable_remove(peer->device->index_hashtable, -+ &peer->handshake.entry); -+ -+ /* Remove any lingering packets that didn't have a chance to be -+ * transmitted. -+ */ -+ wg_packet_purge_staged_packets(peer); -+ -+ /* Free the memory used. */ -+ call_rcu(&peer->rcu, rcu_release); -+} -+ -+void wg_peer_put(struct wg_peer *peer) -+{ -+ if (unlikely(!peer)) -+ return; -+ kref_put(&peer->refcount, kref_release); -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/peerlookup.c 2019-08-20 20:26:42.408341426 +0000 -@@ -0,0 +1,221 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include "peerlookup.h" -+#include "peer.h" -+#include "noise.h" -+ -+static struct hlist_head *pubkey_bucket(struct pubkey_hashtable *table, -+ const u8 pubkey[NOISE_PUBLIC_KEY_LEN]) -+{ -+ /* siphash gives us a secure 64bit number based on a random key. Since -+ * the bits are uniformly distributed, we can then mask off to get the -+ * bits we need. -+ */ -+ const u64 hash = siphash(pubkey, NOISE_PUBLIC_KEY_LEN, &table->key); -+ -+ return &table->hashtable[hash & (HASH_SIZE(table->hashtable) - 1)]; -+} -+ -+struct pubkey_hashtable *wg_pubkey_hashtable_alloc(void) -+{ -+ struct pubkey_hashtable *table = kvmalloc(sizeof(*table), GFP_KERNEL); -+ -+ if (!table) -+ return NULL; -+ -+ get_random_bytes(&table->key, sizeof(table->key)); -+ hash_init(table->hashtable); -+ mutex_init(&table->lock); -+ return table; -+} -+ -+void wg_pubkey_hashtable_add(struct pubkey_hashtable *table, -+ struct wg_peer *peer) -+{ -+ mutex_lock(&table->lock); -+ hlist_add_head_rcu(&peer->pubkey_hash, -+ pubkey_bucket(table, peer->handshake.remote_static)); -+ mutex_unlock(&table->lock); -+} -+ -+void wg_pubkey_hashtable_remove(struct pubkey_hashtable *table, -+ struct wg_peer *peer) -+{ -+ mutex_lock(&table->lock); -+ hlist_del_init_rcu(&peer->pubkey_hash); -+ mutex_unlock(&table->lock); -+} -+ -+/* Returns a strong reference to a peer */ -+struct wg_peer * -+wg_pubkey_hashtable_lookup(struct pubkey_hashtable *table, -+ const u8 pubkey[NOISE_PUBLIC_KEY_LEN]) -+{ -+ struct wg_peer *iter_peer, *peer = NULL; -+ -+ rcu_read_lock_bh(); -+ hlist_for_each_entry_rcu_bh(iter_peer, pubkey_bucket(table, pubkey), -+ pubkey_hash) { -+ if (!memcmp(pubkey, iter_peer->handshake.remote_static, -+ NOISE_PUBLIC_KEY_LEN)) { -+ peer = iter_peer; -+ break; -+ } -+ } -+ peer = wg_peer_get_maybe_zero(peer); -+ rcu_read_unlock_bh(); -+ return peer; -+} -+ -+static struct hlist_head *index_bucket(struct index_hashtable *table, -+ const __le32 index) -+{ -+ /* Since the indices are random and thus all bits are uniformly -+ * distributed, we can find its bucket simply by masking. -+ */ -+ return &table->hashtable[(__force u32)index & -+ (HASH_SIZE(table->hashtable) - 1)]; -+} -+ -+struct index_hashtable *wg_index_hashtable_alloc(void) -+{ -+ struct index_hashtable *table = kvmalloc(sizeof(*table), GFP_KERNEL); -+ -+ if (!table) -+ return NULL; -+ -+ hash_init(table->hashtable); -+ spin_lock_init(&table->lock); -+ return table; -+} -+ -+/* At the moment, we limit ourselves to 2^20 total peers, which generally might -+ * amount to 2^20*3 items in this hashtable. The algorithm below works by -+ * picking a random number and testing it. We can see that these limits mean we -+ * usually succeed pretty quickly: -+ * -+ * >>> def calculation(tries, size): -+ * ... return (size / 2**32)**(tries - 1) * (1 - (size / 2**32)) -+ * ... -+ * >>> calculation(1, 2**20 * 3) -+ * 0.999267578125 -+ * >>> calculation(2, 2**20 * 3) -+ * 0.0007318854331970215 -+ * >>> calculation(3, 2**20 * 3) -+ * 5.360489012673497e-07 -+ * >>> calculation(4, 2**20 * 3) -+ * 3.9261394135792216e-10 -+ * -+ * At the moment, we don't do any masking, so this algorithm isn't exactly -+ * constant time in either the random guessing or in the hash list lookup. We -+ * could require a minimum of 3 tries, which would successfully mask the -+ * guessing. this would not, however, help with the growing hash lengths, which -+ * is another thing to consider moving forward. -+ */ -+ -+__le32 wg_index_hashtable_insert(struct index_hashtable *table, -+ struct index_hashtable_entry *entry) -+{ -+ struct index_hashtable_entry *existing_entry; -+ -+ spin_lock_bh(&table->lock); -+ hlist_del_init_rcu(&entry->index_hash); -+ spin_unlock_bh(&table->lock); -+ -+ rcu_read_lock_bh(); -+ -+search_unused_slot: -+ /* First we try to find an unused slot, randomly, while unlocked. */ -+ entry->index = (__force __le32)get_random_u32(); -+ hlist_for_each_entry_rcu_bh(existing_entry, -+ index_bucket(table, entry->index), -+ index_hash) { -+ if (existing_entry->index == entry->index) -+ /* If it's already in use, we continue searching. */ -+ goto search_unused_slot; -+ } -+ -+ /* Once we've found an unused slot, we lock it, and then double-check -+ * that nobody else stole it from us. -+ */ -+ spin_lock_bh(&table->lock); -+ hlist_for_each_entry_rcu_bh(existing_entry, -+ index_bucket(table, entry->index), -+ index_hash) { -+ if (existing_entry->index == entry->index) { -+ spin_unlock_bh(&table->lock); -+ /* If it was stolen, we start over. */ -+ goto search_unused_slot; -+ } -+ } -+ /* Otherwise, we know we have it exclusively (since we're locked), -+ * so we insert. -+ */ -+ hlist_add_head_rcu(&entry->index_hash, -+ index_bucket(table, entry->index)); -+ spin_unlock_bh(&table->lock); -+ -+ rcu_read_unlock_bh(); -+ -+ return entry->index; -+} -+ -+bool wg_index_hashtable_replace(struct index_hashtable *table, -+ struct index_hashtable_entry *old, -+ struct index_hashtable_entry *new) -+{ -+ if (unlikely(hlist_unhashed(&old->index_hash))) -+ return false; -+ spin_lock_bh(&table->lock); -+ new->index = old->index; -+ hlist_replace_rcu(&old->index_hash, &new->index_hash); -+ -+ /* Calling init here NULLs out index_hash, and in fact after this -+ * function returns, it's theoretically possible for this to get -+ * reinserted elsewhere. That means the RCU lookup below might either -+ * terminate early or jump between buckets, in which case the packet -+ * simply gets dropped, which isn't terrible. -+ */ -+ INIT_HLIST_NODE(&old->index_hash); -+ spin_unlock_bh(&table->lock); -+ return true; -+} -+ -+void wg_index_hashtable_remove(struct index_hashtable *table, -+ struct index_hashtable_entry *entry) -+{ -+ spin_lock_bh(&table->lock); -+ hlist_del_init_rcu(&entry->index_hash); -+ spin_unlock_bh(&table->lock); -+} -+ -+/* Returns a strong reference to a entry->peer */ -+struct index_hashtable_entry * -+wg_index_hashtable_lookup(struct index_hashtable *table, -+ const enum index_hashtable_type type_mask, -+ const __le32 index, struct wg_peer **peer) -+{ -+ struct index_hashtable_entry *iter_entry, *entry = NULL; -+ -+ rcu_read_lock_bh(); -+ hlist_for_each_entry_rcu_bh(iter_entry, index_bucket(table, index), -+ index_hash) { -+ if (iter_entry->index == index) { -+ if (likely(iter_entry->type & type_mask)) -+ entry = iter_entry; -+ break; -+ } -+ } -+ if (likely(entry)) { -+ entry->peer = wg_peer_get_maybe_zero(entry->peer); -+ if (likely(entry->peer)) -+ *peer = entry->peer; -+ else -+ entry = NULL; -+ } -+ rcu_read_unlock_bh(); -+ return entry; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/queueing.c 2019-08-20 20:26:42.408341426 +0000 -@@ -0,0 +1,53 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include "queueing.h" -+ -+struct multicore_worker __percpu * -+wg_packet_percpu_multicore_worker_alloc(work_func_t function, void *ptr) -+{ -+ int cpu; -+ struct multicore_worker __percpu *worker = -+ alloc_percpu(struct multicore_worker); -+ -+ if (!worker) -+ return NULL; -+ -+ for_each_possible_cpu(cpu) { -+ per_cpu_ptr(worker, cpu)->ptr = ptr; -+ INIT_WORK(&per_cpu_ptr(worker, cpu)->work, function); -+ } -+ return worker; -+} -+ -+int wg_packet_queue_init(struct crypt_queue *queue, work_func_t function, -+ bool multicore, unsigned int len) -+{ -+ int ret; -+ -+ memset(queue, 0, sizeof(*queue)); -+ ret = ptr_ring_init(&queue->ring, len, GFP_KERNEL); -+ if (ret) -+ return ret; -+ if (function) { -+ if (multicore) { -+ queue->worker = wg_packet_percpu_multicore_worker_alloc( -+ function, queue); -+ if (!queue->worker) -+ return -ENOMEM; -+ } else { -+ INIT_WORK(&queue->work, function); -+ } -+ } -+ return 0; -+} -+ -+void wg_packet_queue_free(struct crypt_queue *queue, bool multicore) -+{ -+ if (multicore) -+ free_percpu(queue->worker); -+ WARN_ON(!__ptr_ring_empty(&queue->ring)); -+ ptr_ring_cleanup(&queue->ring, NULL); -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/ratelimiter.c 2019-08-20 20:26:42.409341426 +0000 -@@ -0,0 +1,235 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifdef COMPAT_CANNOT_DEPRECIATE_BH_RCU -+/* We normally alias all non-_bh functions to the _bh ones in the compat layer, -+ * but that's not appropriate here, where we actually do want non-_bh ones. -+ */ -+#undef synchronize_rcu -+#define synchronize_rcu old_synchronize_rcu -+#undef call_rcu -+#define call_rcu old_call_rcu -+#undef rcu_barrier -+#define rcu_barrier old_rcu_barrier -+#endif -+ -+#include "ratelimiter.h" -+#include -+#include -+#include -+#include -+ -+static struct kmem_cache *entry_cache; -+static hsiphash_key_t key; -+static spinlock_t table_lock = __SPIN_LOCK_UNLOCKED("ratelimiter_table_lock"); -+static DEFINE_MUTEX(init_lock); -+static u64 init_refcnt; /* Protected by init_lock, hence not atomic. */ -+static atomic_t total_entries = ATOMIC_INIT(0); -+static unsigned int max_entries, table_size; -+static void wg_ratelimiter_gc_entries(struct work_struct *); -+static DECLARE_DEFERRABLE_WORK(gc_work, wg_ratelimiter_gc_entries); -+static struct hlist_head *table_v4; -+#if IS_ENABLED(CONFIG_IPV6) -+static struct hlist_head *table_v6; -+#endif -+ -+struct ratelimiter_entry { -+ u64 last_time_ns, tokens, ip; -+ void *net; -+ spinlock_t lock; -+ struct hlist_node hash; -+ struct rcu_head rcu; -+}; -+ -+enum { -+ PACKETS_PER_SECOND = 20, -+ PACKETS_BURSTABLE = 5, -+ PACKET_COST = NSEC_PER_SEC / PACKETS_PER_SECOND, -+ TOKEN_MAX = PACKET_COST * PACKETS_BURSTABLE -+}; -+ -+static void entry_free(struct rcu_head *rcu) -+{ -+ kmem_cache_free(entry_cache, -+ container_of(rcu, struct ratelimiter_entry, rcu)); -+ atomic_dec(&total_entries); -+} -+ -+static void entry_uninit(struct ratelimiter_entry *entry) -+{ -+ hlist_del_rcu(&entry->hash); -+ call_rcu(&entry->rcu, entry_free); -+} -+ -+/* Calling this function with a NULL work uninits all entries. */ -+static void wg_ratelimiter_gc_entries(struct work_struct *work) -+{ -+ const u64 now = ktime_get_coarse_boottime_ns(); -+ struct ratelimiter_entry *entry; -+ struct hlist_node *temp; -+ unsigned int i; -+ -+ for (i = 0; i < table_size; ++i) { -+ spin_lock(&table_lock); -+ hlist_for_each_entry_safe(entry, temp, &table_v4[i], hash) { -+ if (unlikely(!work) || -+ now - entry->last_time_ns > NSEC_PER_SEC) -+ entry_uninit(entry); -+ } -+#if IS_ENABLED(CONFIG_IPV6) -+ hlist_for_each_entry_safe(entry, temp, &table_v6[i], hash) { -+ if (unlikely(!work) || -+ now - entry->last_time_ns > NSEC_PER_SEC) -+ entry_uninit(entry); -+ } -+#endif -+ spin_unlock(&table_lock); -+ if (likely(work)) -+ cond_resched(); -+ } -+ if (likely(work)) -+ queue_delayed_work(system_power_efficient_wq, &gc_work, HZ); -+} -+ -+bool wg_ratelimiter_allow(struct sk_buff *skb, struct net *net) -+{ -+ /* We only take the bottom half of the net pointer, so that we can hash -+ * 3 words in the end. This way, siphash's len param fits into the final -+ * u32, and we don't incur an extra round. -+ */ -+ const u32 net_word = (unsigned long)net; -+ struct ratelimiter_entry *entry; -+ struct hlist_head *bucket; -+ u64 ip; -+ -+ if (skb->protocol == htons(ETH_P_IP)) { -+ ip = (u64 __force)ip_hdr(skb)->saddr; -+ bucket = &table_v4[hsiphash_2u32(net_word, ip, &key) & -+ (table_size - 1)]; -+ } -+#if IS_ENABLED(CONFIG_IPV6) -+ else if (skb->protocol == htons(ETH_P_IPV6)) { -+ /* Only use 64 bits, so as to ratelimit the whole /64. */ -+ memcpy(&ip, &ipv6_hdr(skb)->saddr, sizeof(ip)); -+ bucket = &table_v6[hsiphash_3u32(net_word, ip >> 32, ip, &key) & -+ (table_size - 1)]; -+ } -+#endif -+ else -+ return false; -+ rcu_read_lock(); -+ hlist_for_each_entry_rcu(entry, bucket, hash) { -+ if (entry->net == net && entry->ip == ip) { -+ u64 now, tokens; -+ bool ret; -+ /* Quasi-inspired by nft_limit.c, but this is actually a -+ * slightly different algorithm. Namely, we incorporate -+ * the burst as part of the maximum tokens, rather than -+ * as part of the rate. -+ */ -+ spin_lock(&entry->lock); -+ now = ktime_get_coarse_boottime_ns(); -+ tokens = min_t(u64, TOKEN_MAX, -+ entry->tokens + now - -+ entry->last_time_ns); -+ entry->last_time_ns = now; -+ ret = tokens >= PACKET_COST; -+ entry->tokens = ret ? tokens - PACKET_COST : tokens; -+ spin_unlock(&entry->lock); -+ rcu_read_unlock(); -+ return ret; -+ } -+ } -+ rcu_read_unlock(); -+ -+ if (atomic_inc_return(&total_entries) > max_entries) -+ goto err_oom; -+ -+ entry = kmem_cache_alloc(entry_cache, GFP_KERNEL); -+ if (unlikely(!entry)) -+ goto err_oom; -+ -+ entry->net = net; -+ entry->ip = ip; -+ INIT_HLIST_NODE(&entry->hash); -+ spin_lock_init(&entry->lock); -+ entry->last_time_ns = ktime_get_coarse_boottime_ns(); -+ entry->tokens = TOKEN_MAX - PACKET_COST; -+ spin_lock(&table_lock); -+ hlist_add_head_rcu(&entry->hash, bucket); -+ spin_unlock(&table_lock); -+ return true; -+ -+err_oom: -+ atomic_dec(&total_entries); -+ return false; -+} -+ -+int wg_ratelimiter_init(void) -+{ -+ mutex_lock(&init_lock); -+ if (++init_refcnt != 1) -+ goto out; -+ -+ entry_cache = KMEM_CACHE(ratelimiter_entry, 0); -+ if (!entry_cache) -+ goto err; -+ -+ /* xt_hashlimit.c uses a slightly different algorithm for ratelimiting, -+ * but what it shares in common is that it uses a massive hashtable. So, -+ * we borrow their wisdom about good table sizes on different systems -+ * dependent on RAM. This calculation here comes from there. -+ */ -+ table_size = (totalram_pages() > (1U << 30) / PAGE_SIZE) ? 8192 : -+ max_t(unsigned long, 16, roundup_pow_of_two( -+ (totalram_pages() << PAGE_SHIFT) / -+ (1U << 14) / sizeof(struct hlist_head))); -+ max_entries = table_size * 8; -+ -+ table_v4 = kvzalloc(table_size * sizeof(*table_v4), GFP_KERNEL); -+ if (unlikely(!table_v4)) -+ goto err_kmemcache; -+ -+#if IS_ENABLED(CONFIG_IPV6) -+ table_v6 = kvzalloc(table_size * sizeof(*table_v6), GFP_KERNEL); -+ if (unlikely(!table_v6)) { -+ kvfree(table_v4); -+ goto err_kmemcache; -+ } -+#endif -+ -+ queue_delayed_work(system_power_efficient_wq, &gc_work, HZ); -+ get_random_bytes(&key, sizeof(key)); -+out: -+ mutex_unlock(&init_lock); -+ return 0; -+ -+err_kmemcache: -+ kmem_cache_destroy(entry_cache); -+err: -+ --init_refcnt; -+ mutex_unlock(&init_lock); -+ return -ENOMEM; -+} -+ -+void wg_ratelimiter_uninit(void) -+{ -+ mutex_lock(&init_lock); -+ if (!init_refcnt || --init_refcnt) -+ goto out; -+ -+ cancel_delayed_work_sync(&gc_work); -+ wg_ratelimiter_gc_entries(NULL); -+ rcu_barrier(); -+ kvfree(table_v4); -+#if IS_ENABLED(CONFIG_IPV6) -+ kvfree(table_v6); -+#endif -+ kmem_cache_destroy(entry_cache); -+out: -+ mutex_unlock(&init_lock); -+} -+ -+#include "selftest/ratelimiter.c" ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/receive.c 2019-08-20 20:26:42.409341426 +0000 -@@ -0,0 +1,605 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include "queueing.h" -+#include "device.h" -+#include "peer.h" -+#include "timers.h" -+#include "messages.h" -+#include "cookie.h" -+#include "socket.h" -+ -+#include -+#include -+#include -+#include -+#include -+ -+/* Must be called with bh disabled. */ -+static void update_rx_stats(struct wg_peer *peer, size_t len) -+{ -+ struct pcpu_sw_netstats *tstats = -+ get_cpu_ptr(peer->device->dev->tstats); -+ -+ u64_stats_update_begin(&tstats->syncp); -+ ++tstats->rx_packets; -+ tstats->rx_bytes += len; -+ peer->rx_bytes += len; -+ u64_stats_update_end(&tstats->syncp); -+ put_cpu_ptr(tstats); -+} -+ -+#define SKB_TYPE_LE32(skb) (((struct message_header *)(skb)->data)->type) -+ -+static size_t validate_header_len(struct sk_buff *skb) -+{ -+ if (unlikely(skb->len < sizeof(struct message_header))) -+ return 0; -+ if (SKB_TYPE_LE32(skb) == cpu_to_le32(MESSAGE_DATA) && -+ skb->len >= MESSAGE_MINIMUM_LENGTH) -+ return sizeof(struct message_data); -+ if (SKB_TYPE_LE32(skb) == cpu_to_le32(MESSAGE_HANDSHAKE_INITIATION) && -+ skb->len == sizeof(struct message_handshake_initiation)) -+ return sizeof(struct message_handshake_initiation); -+ if (SKB_TYPE_LE32(skb) == cpu_to_le32(MESSAGE_HANDSHAKE_RESPONSE) && -+ skb->len == sizeof(struct message_handshake_response)) -+ return sizeof(struct message_handshake_response); -+ if (SKB_TYPE_LE32(skb) == cpu_to_le32(MESSAGE_HANDSHAKE_COOKIE) && -+ skb->len == sizeof(struct message_handshake_cookie)) -+ return sizeof(struct message_handshake_cookie); -+ return 0; -+} -+ -+static int prepare_skb_header(struct sk_buff *skb, struct wg_device *wg) -+{ -+ size_t data_offset, data_len, header_len; -+ struct udphdr *udp; -+ -+ if (unlikely(wg_skb_examine_untrusted_ip_hdr(skb) != skb->protocol || -+ skb_transport_header(skb) < skb->head || -+ (skb_transport_header(skb) + sizeof(struct udphdr)) > -+ skb_tail_pointer(skb))) -+ return -EINVAL; /* Bogus IP header */ -+ udp = udp_hdr(skb); -+ data_offset = (u8 *)udp - skb->data; -+ if (unlikely(data_offset > U16_MAX || -+ data_offset + sizeof(struct udphdr) > skb->len)) -+ /* Packet has offset at impossible location or isn't big enough -+ * to have UDP fields. -+ */ -+ return -EINVAL; -+ data_len = ntohs(udp->len); -+ if (unlikely(data_len < sizeof(struct udphdr) || -+ data_len > skb->len - data_offset)) -+ /* UDP packet is reporting too small of a size or lying about -+ * its size. -+ */ -+ return -EINVAL; -+ data_len -= sizeof(struct udphdr); -+ data_offset = (u8 *)udp + sizeof(struct udphdr) - skb->data; -+ if (unlikely(!pskb_may_pull(skb, -+ data_offset + sizeof(struct message_header)) || -+ pskb_trim(skb, data_len + data_offset) < 0)) -+ return -EINVAL; -+ skb_pull(skb, data_offset); -+ if (unlikely(skb->len != data_len)) -+ /* Final len does not agree with calculated len */ -+ return -EINVAL; -+ header_len = validate_header_len(skb); -+ if (unlikely(!header_len)) -+ return -EINVAL; -+ __skb_push(skb, data_offset); -+ if (unlikely(!pskb_may_pull(skb, data_offset + header_len))) -+ return -EINVAL; -+ __skb_pull(skb, data_offset); -+ return 0; -+} -+ -+static void wg_receive_handshake_packet(struct wg_device *wg, -+ struct sk_buff *skb) -+{ -+ enum cookie_mac_state mac_state; -+ struct wg_peer *peer = NULL; -+ /* This is global, so that our load calculation applies to the whole -+ * system. We don't care about races with it at all. -+ */ -+ static u64 last_under_load; -+ bool packet_needs_cookie; -+ bool under_load; -+ -+ if (SKB_TYPE_LE32(skb) == cpu_to_le32(MESSAGE_HANDSHAKE_COOKIE)) { -+ net_dbg_skb_ratelimited("%s: Receiving cookie response from %pISpfsc\n", -+ wg->dev->name, skb); -+ wg_cookie_message_consume( -+ (struct message_handshake_cookie *)skb->data, wg); -+ return; -+ } -+ -+ under_load = skb_queue_len(&wg->incoming_handshakes) >= -+ MAX_QUEUED_INCOMING_HANDSHAKES / 8; -+ if (under_load) -+ last_under_load = ktime_get_coarse_boottime_ns(); -+ else if (last_under_load) -+ under_load = !wg_birthdate_has_expired(last_under_load, 1); -+ mac_state = wg_cookie_validate_packet(&wg->cookie_checker, skb, -+ under_load); -+ if ((under_load && mac_state == VALID_MAC_WITH_COOKIE) || -+ (!under_load && mac_state == VALID_MAC_BUT_NO_COOKIE)) { -+ packet_needs_cookie = false; -+ } else if (under_load && mac_state == VALID_MAC_BUT_NO_COOKIE) { -+ packet_needs_cookie = true; -+ } else { -+ net_dbg_skb_ratelimited("%s: Invalid MAC of handshake, dropping packet from %pISpfsc\n", -+ wg->dev->name, skb); -+ return; -+ } -+ -+ switch (SKB_TYPE_LE32(skb)) { -+ case cpu_to_le32(MESSAGE_HANDSHAKE_INITIATION): { -+ struct message_handshake_initiation *message = -+ (struct message_handshake_initiation *)skb->data; -+ -+ if (packet_needs_cookie) { -+ wg_packet_send_handshake_cookie(wg, skb, -+ message->sender_index); -+ return; -+ } -+ peer = wg_noise_handshake_consume_initiation(message, wg); -+ if (unlikely(!peer)) { -+ net_dbg_skb_ratelimited("%s: Invalid handshake initiation from %pISpfsc\n", -+ wg->dev->name, skb); -+ return; -+ } -+ wg_socket_set_peer_endpoint_from_skb(peer, skb); -+ net_dbg_ratelimited("%s: Receiving handshake initiation from peer %llu (%pISpfsc)\n", -+ wg->dev->name, peer->internal_id, -+ &peer->endpoint.addr); -+ wg_packet_send_handshake_response(peer); -+ break; -+ } -+ case cpu_to_le32(MESSAGE_HANDSHAKE_RESPONSE): { -+ struct message_handshake_response *message = -+ (struct message_handshake_response *)skb->data; -+ -+ if (packet_needs_cookie) { -+ wg_packet_send_handshake_cookie(wg, skb, -+ message->sender_index); -+ return; -+ } -+ peer = wg_noise_handshake_consume_response(message, wg); -+ if (unlikely(!peer)) { -+ net_dbg_skb_ratelimited("%s: Invalid handshake response from %pISpfsc\n", -+ wg->dev->name, skb); -+ return; -+ } -+ wg_socket_set_peer_endpoint_from_skb(peer, skb); -+ net_dbg_ratelimited("%s: Receiving handshake response from peer %llu (%pISpfsc)\n", -+ wg->dev->name, peer->internal_id, -+ &peer->endpoint.addr); -+ if (wg_noise_handshake_begin_session(&peer->handshake, -+ &peer->keypairs)) { -+ wg_timers_session_derived(peer); -+ wg_timers_handshake_complete(peer); -+ /* Calling this function will either send any existing -+ * packets in the queue and not send a keepalive, which -+ * is the best case, Or, if there's nothing in the -+ * queue, it will send a keepalive, in order to give -+ * immediate confirmation of the session. -+ */ -+ wg_packet_send_keepalive(peer); -+ } -+ break; -+ } -+ } -+ -+ if (unlikely(!peer)) { -+ WARN(1, "Somehow a wrong type of packet wound up in the handshake queue!\n"); -+ return; -+ } -+ -+ local_bh_disable(); -+ update_rx_stats(peer, skb->len); -+ local_bh_enable(); -+ -+ wg_timers_any_authenticated_packet_received(peer); -+ wg_timers_any_authenticated_packet_traversal(peer); -+ wg_peer_put(peer); -+} -+ -+void wg_packet_handshake_receive_worker(struct work_struct *work) -+{ -+ struct wg_device *wg = container_of(work, struct multicore_worker, -+ work)->ptr; -+ struct sk_buff *skb; -+ -+ while ((skb = skb_dequeue(&wg->incoming_handshakes)) != NULL) { -+ wg_receive_handshake_packet(wg, skb); -+ dev_kfree_skb(skb); -+ cond_resched(); -+ } -+} -+ -+static void keep_key_fresh(struct wg_peer *peer) -+{ -+ struct noise_keypair *keypair; -+ bool send = false; -+ -+ if (peer->sent_lastminute_handshake) -+ return; -+ -+ rcu_read_lock_bh(); -+ keypair = rcu_dereference_bh(peer->keypairs.current_keypair); -+ if (likely(keypair && READ_ONCE(keypair->sending.is_valid)) && -+ keypair->i_am_the_initiator && -+ unlikely(wg_birthdate_has_expired(keypair->sending.birthdate, -+ REJECT_AFTER_TIME - KEEPALIVE_TIMEOUT - REKEY_TIMEOUT))) -+ send = true; -+ rcu_read_unlock_bh(); -+ -+ if (send) { -+ peer->sent_lastminute_handshake = true; -+ wg_packet_send_queued_handshake_initiation(peer, false); -+ } -+} -+ -+static bool decrypt_packet(struct sk_buff *skb, struct noise_symmetric_key *key, -+ simd_context_t *simd_context) -+{ -+ struct scatterlist sg[MAX_SKB_FRAGS + 8]; -+ struct sk_buff *trailer; -+ unsigned int offset; -+ int num_frags; -+ -+ if (unlikely(!key)) -+ return false; -+ -+ if (unlikely(!READ_ONCE(key->is_valid) || -+ wg_birthdate_has_expired(key->birthdate, REJECT_AFTER_TIME) || -+ key->counter.receive.counter >= REJECT_AFTER_MESSAGES)) { -+ WRITE_ONCE(key->is_valid, false); -+ return false; -+ } -+ -+ PACKET_CB(skb)->nonce = -+ le64_to_cpu(((struct message_data *)skb->data)->counter); -+ -+ /* We ensure that the network header is part of the packet before we -+ * call skb_cow_data, so that there's no chance that data is removed -+ * from the skb, so that later we can extract the original endpoint. -+ */ -+ offset = skb->data - skb_network_header(skb); -+ skb_push(skb, offset); -+ num_frags = skb_cow_data(skb, 0, &trailer); -+ offset += sizeof(struct message_data); -+ skb_pull(skb, offset); -+ if (unlikely(num_frags < 0 || num_frags > ARRAY_SIZE(sg))) -+ return false; -+ -+ sg_init_table(sg, num_frags); -+ if (skb_to_sgvec(skb, sg, 0, skb->len) <= 0) -+ return false; -+ -+ if (!chacha20poly1305_decrypt_sg(sg, sg, skb->len, NULL, 0, -+ PACKET_CB(skb)->nonce, key->key, -+ simd_context)) -+ return false; -+ -+ /* Another ugly situation of pushing and pulling the header so as to -+ * keep endpoint information intact. -+ */ -+ skb_push(skb, offset); -+ if (pskb_trim(skb, skb->len - noise_encrypted_len(0))) -+ return false; -+ skb_pull(skb, offset); -+ -+ return true; -+} -+ -+/* This is RFC6479, a replay detection bitmap algorithm that avoids bitshifts */ -+static bool counter_validate(union noise_counter *counter, u64 their_counter) -+{ -+ unsigned long index, index_current, top, i; -+ bool ret = false; -+ -+ spin_lock_bh(&counter->receive.lock); -+ -+ if (unlikely(counter->receive.counter >= REJECT_AFTER_MESSAGES + 1 || -+ their_counter >= REJECT_AFTER_MESSAGES)) -+ goto out; -+ -+ ++their_counter; -+ -+ if (unlikely((COUNTER_WINDOW_SIZE + their_counter) < -+ counter->receive.counter)) -+ goto out; -+ -+ index = their_counter >> ilog2(BITS_PER_LONG); -+ -+ if (likely(their_counter > counter->receive.counter)) { -+ index_current = counter->receive.counter >> ilog2(BITS_PER_LONG); -+ top = min_t(unsigned long, index - index_current, -+ COUNTER_BITS_TOTAL / BITS_PER_LONG); -+ for (i = 1; i <= top; ++i) -+ counter->receive.backtrack[(i + index_current) & -+ ((COUNTER_BITS_TOTAL / BITS_PER_LONG) - 1)] = 0; -+ counter->receive.counter = their_counter; -+ } -+ -+ index &= (COUNTER_BITS_TOTAL / BITS_PER_LONG) - 1; -+ ret = !test_and_set_bit(their_counter & (BITS_PER_LONG - 1), -+ &counter->receive.backtrack[index]); -+ -+out: -+ spin_unlock_bh(&counter->receive.lock); -+ return ret; -+} -+ -+#include "selftest/counter.c" -+ -+static void wg_packet_consume_data_done(struct wg_peer *peer, -+ struct sk_buff *skb, -+ struct endpoint *endpoint) -+{ -+ struct net_device *dev = peer->device->dev; -+ unsigned int len, len_before_trim; -+ struct wg_peer *routed_peer; -+ -+ wg_socket_set_peer_endpoint(peer, endpoint); -+ -+ if (unlikely(wg_noise_received_with_keypair(&peer->keypairs, -+ PACKET_CB(skb)->keypair))) { -+ wg_timers_handshake_complete(peer); -+ wg_packet_send_staged_packets(peer); -+ } -+ -+ keep_key_fresh(peer); -+ -+ wg_timers_any_authenticated_packet_received(peer); -+ wg_timers_any_authenticated_packet_traversal(peer); -+ -+ /* A packet with length 0 is a keepalive packet */ -+ if (unlikely(!skb->len)) { -+ update_rx_stats(peer, message_data_len(0)); -+ net_dbg_ratelimited("%s: Receiving keepalive packet from peer %llu (%pISpfsc)\n", -+ dev->name, peer->internal_id, -+ &peer->endpoint.addr); -+ goto packet_processed; -+ } -+ -+ wg_timers_data_received(peer); -+ -+ if (unlikely(skb_network_header(skb) < skb->head)) -+ goto dishonest_packet_size; -+ if (unlikely(!(pskb_network_may_pull(skb, sizeof(struct iphdr)) && -+ (ip_hdr(skb)->version == 4 || -+ (ip_hdr(skb)->version == 6 && -+ pskb_network_may_pull(skb, sizeof(struct ipv6hdr))))))) -+ goto dishonest_packet_type; -+ -+ skb->dev = dev; -+ /* We've already verified the Poly1305 auth tag, which means this packet -+ * was not modified in transit. We can therefore tell the networking -+ * stack that all checksums of every layer of encapsulation have already -+ * been checked "by the hardware" and therefore is unneccessary to check -+ * again in software. -+ */ -+ skb->ip_summed = CHECKSUM_UNNECESSARY; -+#ifndef COMPAT_CANNOT_USE_CSUM_LEVEL -+ skb->csum_level = ~0; /* All levels */ -+#endif -+ skb->protocol = wg_skb_examine_untrusted_ip_hdr(skb); -+ if (skb->protocol == htons(ETH_P_IP)) { -+ len = ntohs(ip_hdr(skb)->tot_len); -+ if (unlikely(len < sizeof(struct iphdr))) -+ goto dishonest_packet_size; -+ if (INET_ECN_is_ce(PACKET_CB(skb)->ds)) -+ IP_ECN_set_ce(ip_hdr(skb)); -+ } else if (skb->protocol == htons(ETH_P_IPV6)) { -+ len = ntohs(ipv6_hdr(skb)->payload_len) + -+ sizeof(struct ipv6hdr); -+ if (INET_ECN_is_ce(PACKET_CB(skb)->ds)) -+ IP6_ECN_set_ce(skb, ipv6_hdr(skb)); -+ } else { -+ goto dishonest_packet_type; -+ } -+ -+ if (unlikely(len > skb->len)) -+ goto dishonest_packet_size; -+ len_before_trim = skb->len; -+ if (unlikely(pskb_trim(skb, len))) -+ goto packet_processed; -+ -+ routed_peer = wg_allowedips_lookup_src(&peer->device->peer_allowedips, -+ skb); -+ wg_peer_put(routed_peer); /* We don't need the extra reference. */ -+ -+ if (unlikely(routed_peer != peer)) -+ goto dishonest_packet_peer; -+ -+ if (unlikely(napi_gro_receive(&peer->napi, skb) == GRO_DROP)) { -+ ++dev->stats.rx_dropped; -+ net_dbg_ratelimited("%s: Failed to give packet to userspace from peer %llu (%pISpfsc)\n", -+ dev->name, peer->internal_id, -+ &peer->endpoint.addr); -+ } else { -+ update_rx_stats(peer, message_data_len(len_before_trim)); -+ } -+ return; -+ -+dishonest_packet_peer: -+ net_dbg_skb_ratelimited("%s: Packet has unallowed src IP (%pISc) from peer %llu (%pISpfsc)\n", -+ dev->name, skb, peer->internal_id, -+ &peer->endpoint.addr); -+ ++dev->stats.rx_errors; -+ ++dev->stats.rx_frame_errors; -+ goto packet_processed; -+dishonest_packet_type: -+ net_dbg_ratelimited("%s: Packet is neither ipv4 nor ipv6 from peer %llu (%pISpfsc)\n", -+ dev->name, peer->internal_id, &peer->endpoint.addr); -+ ++dev->stats.rx_errors; -+ ++dev->stats.rx_frame_errors; -+ goto packet_processed; -+dishonest_packet_size: -+ net_dbg_ratelimited("%s: Packet has incorrect size from peer %llu (%pISpfsc)\n", -+ dev->name, peer->internal_id, &peer->endpoint.addr); -+ ++dev->stats.rx_errors; -+ ++dev->stats.rx_length_errors; -+ goto packet_processed; -+packet_processed: -+ dev_kfree_skb(skb); -+} -+ -+int wg_packet_rx_poll(struct napi_struct *napi, int budget) -+{ -+ struct wg_peer *peer = container_of(napi, struct wg_peer, napi); -+ struct crypt_queue *queue = &peer->rx_queue; -+ struct noise_keypair *keypair; -+ struct endpoint endpoint; -+ enum packet_state state; -+ struct sk_buff *skb; -+ int work_done = 0; -+ bool free; -+ -+ if (unlikely(budget <= 0)) -+ return 0; -+ -+ while ((skb = __ptr_ring_peek(&queue->ring)) != NULL && -+ (state = atomic_read_acquire(&PACKET_CB(skb)->state)) != -+ PACKET_STATE_UNCRYPTED) { -+ __ptr_ring_discard_one(&queue->ring); -+ peer = PACKET_PEER(skb); -+ keypair = PACKET_CB(skb)->keypair; -+ free = true; -+ -+ if (unlikely(state != PACKET_STATE_CRYPTED)) -+ goto next; -+ -+ if (unlikely(!counter_validate(&keypair->receiving.counter, -+ PACKET_CB(skb)->nonce))) { -+ net_dbg_ratelimited("%s: Packet has invalid nonce %llu (max %llu)\n", -+ peer->device->dev->name, -+ PACKET_CB(skb)->nonce, -+ keypair->receiving.counter.receive.counter); -+ goto next; -+ } -+ -+ if (unlikely(wg_socket_endpoint_from_skb(&endpoint, skb))) -+ goto next; -+ -+ wg_reset_packet(skb); -+ wg_packet_consume_data_done(peer, skb, &endpoint); -+ free = false; -+ -+next: -+ wg_noise_keypair_put(keypair, false); -+ wg_peer_put(peer); -+ if (unlikely(free)) -+ dev_kfree_skb(skb); -+ -+ if (++work_done >= budget) -+ break; -+ } -+ -+ if (work_done < budget) -+ napi_complete_done(napi, work_done); -+ -+ return work_done; -+} -+ -+void wg_packet_decrypt_worker(struct work_struct *work) -+{ -+ struct crypt_queue *queue = container_of(work, struct multicore_worker, -+ work)->ptr; -+ simd_context_t simd_context; -+ struct sk_buff *skb; -+ -+ simd_get(&simd_context); -+ while ((skb = ptr_ring_consume_bh(&queue->ring)) != NULL) { -+ enum packet_state state = likely(decrypt_packet(skb, -+ &PACKET_CB(skb)->keypair->receiving, -+ &simd_context)) ? -+ PACKET_STATE_CRYPTED : PACKET_STATE_DEAD; -+ wg_queue_enqueue_per_peer_napi(skb, state); -+ simd_relax(&simd_context); -+ } -+ -+ simd_put(&simd_context); -+} -+ -+static void wg_packet_consume_data(struct wg_device *wg, struct sk_buff *skb) -+{ -+ __le32 idx = ((struct message_data *)skb->data)->key_idx; -+ struct wg_peer *peer = NULL; -+ int ret; -+ -+ rcu_read_lock_bh(); -+ PACKET_CB(skb)->keypair = -+ (struct noise_keypair *)wg_index_hashtable_lookup( -+ wg->index_hashtable, INDEX_HASHTABLE_KEYPAIR, idx, -+ &peer); -+ if (unlikely(!wg_noise_keypair_get(PACKET_CB(skb)->keypair))) -+ goto err_keypair; -+ -+ if (unlikely(READ_ONCE(peer->is_dead))) -+ goto err; -+ -+ ret = wg_queue_enqueue_per_device_and_peer(&wg->decrypt_queue, -+ &peer->rx_queue, skb, -+ wg->packet_crypt_wq, -+ &wg->decrypt_queue.last_cpu); -+ if (unlikely(ret == -EPIPE)) -+ wg_queue_enqueue_per_peer_napi(skb, PACKET_STATE_DEAD); -+ if (likely(!ret || ret == -EPIPE)) { -+ rcu_read_unlock_bh(); -+ return; -+ } -+err: -+ wg_noise_keypair_put(PACKET_CB(skb)->keypair, false); -+err_keypair: -+ rcu_read_unlock_bh(); -+ wg_peer_put(peer); -+ dev_kfree_skb(skb); -+} -+ -+void wg_packet_receive(struct wg_device *wg, struct sk_buff *skb) -+{ -+ if (unlikely(prepare_skb_header(skb, wg) < 0)) -+ goto err; -+ switch (SKB_TYPE_LE32(skb)) { -+ case cpu_to_le32(MESSAGE_HANDSHAKE_INITIATION): -+ case cpu_to_le32(MESSAGE_HANDSHAKE_RESPONSE): -+ case cpu_to_le32(MESSAGE_HANDSHAKE_COOKIE): { -+ int cpu; -+ -+ if (skb_queue_len(&wg->incoming_handshakes) > -+ MAX_QUEUED_INCOMING_HANDSHAKES || -+ unlikely(!rng_is_initialized())) { -+ net_dbg_skb_ratelimited("%s: Dropping handshake packet from %pISpfsc\n", -+ wg->dev->name, skb); -+ goto err; -+ } -+ skb_queue_tail(&wg->incoming_handshakes, skb); -+ /* Queues up a call to packet_process_queued_handshake_ -+ * packets(skb): -+ */ -+ cpu = wg_cpumask_next_online(&wg->incoming_handshake_cpu); -+ queue_work_on(cpu, wg->handshake_receive_wq, -+ &per_cpu_ptr(wg->incoming_handshakes_worker, cpu)->work); -+ break; -+ } -+ case cpu_to_le32(MESSAGE_DATA): -+ PACKET_CB(skb)->ds = ip_tunnel_get_dsfield(ip_hdr(skb), skb); -+ wg_packet_consume_data(wg, skb); -+ break; -+ default: -+ net_dbg_skb_ratelimited("%s: Invalid packet from %pISpfsc\n", -+ wg->dev->name, skb); -+ goto err; -+ } -+ return; -+ -+err: -+ dev_kfree_skb(skb); -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/selftest/allowedips.c 2019-08-20 20:26:42.409341426 +0000 -@@ -0,0 +1,682 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ * -+ * This contains some basic static unit tests for the allowedips data structure. -+ * It also has two additional modes that are disabled and meant to be used by -+ * folks directly playing with this file. If you define the macro -+ * DEBUG_PRINT_TRIE_GRAPHVIZ to be 1, then every time there's a full tree in -+ * memory, it will be printed out as KERN_DEBUG in a format that can be passed -+ * to graphviz (the dot command) to visualize it. If you define the macro -+ * DEBUG_RANDOM_TRIE to be 1, then there will be an extremely costly set of -+ * randomized tests done against a trivial implementation, which may take -+ * upwards of a half-hour to complete. There's no set of users who should be -+ * enabling these, and the only developers that should go anywhere near these -+ * nobs are the ones who are reading this comment. -+ */ -+ -+#ifdef DEBUG -+ -+#include -+ -+static __init void swap_endian_and_apply_cidr(u8 *dst, const u8 *src, u8 bits, -+ u8 cidr) -+{ -+ swap_endian(dst, src, bits); -+ memset(dst + (cidr + 7) / 8, 0, bits / 8 - (cidr + 7) / 8); -+ if (cidr) -+ dst[(cidr + 7) / 8 - 1] &= ~0U << ((8 - (cidr % 8)) % 8); -+} -+ -+static __init void print_node(struct allowedips_node *node, u8 bits) -+{ -+ char *fmt_connection = KERN_DEBUG "\t\"%p/%d\" -> \"%p/%d\";\n"; -+ char *fmt_declaration = KERN_DEBUG -+ "\t\"%p/%d\"[style=%s, color=\"#%06x\"];\n"; -+ char *style = "dotted"; -+ u8 ip1[16], ip2[16]; -+ u32 color = 0; -+ -+ if (bits == 32) { -+ fmt_connection = KERN_DEBUG "\t\"%pI4/%d\" -> \"%pI4/%d\";\n"; -+ fmt_declaration = KERN_DEBUG -+ "\t\"%pI4/%d\"[style=%s, color=\"#%06x\"];\n"; -+ } else if (bits == 128) { -+ fmt_connection = KERN_DEBUG "\t\"%pI6/%d\" -> \"%pI6/%d\";\n"; -+ fmt_declaration = KERN_DEBUG -+ "\t\"%pI6/%d\"[style=%s, color=\"#%06x\"];\n"; -+ } -+ if (node->peer) { -+ hsiphash_key_t key = { { 0 } }; -+ -+ memcpy(&key, &node->peer, sizeof(node->peer)); -+ color = hsiphash_1u32(0xdeadbeef, &key) % 200 << 16 | -+ hsiphash_1u32(0xbabecafe, &key) % 200 << 8 | -+ hsiphash_1u32(0xabad1dea, &key) % 200; -+ style = "bold"; -+ } -+ swap_endian_and_apply_cidr(ip1, node->bits, bits, node->cidr); -+ printk(fmt_declaration, ip1, node->cidr, style, color); -+ if (node->bit[0]) { -+ swap_endian_and_apply_cidr(ip2, -+ rcu_dereference_raw(node->bit[0])->bits, bits, -+ node->cidr); -+ printk(fmt_connection, ip1, node->cidr, ip2, -+ rcu_dereference_raw(node->bit[0])->cidr); -+ print_node(rcu_dereference_raw(node->bit[0]), bits); -+ } -+ if (node->bit[1]) { -+ swap_endian_and_apply_cidr(ip2, -+ rcu_dereference_raw(node->bit[1])->bits, -+ bits, node->cidr); -+ printk(fmt_connection, ip1, node->cidr, ip2, -+ rcu_dereference_raw(node->bit[1])->cidr); -+ print_node(rcu_dereference_raw(node->bit[1]), bits); -+ } -+} -+ -+static __init void print_tree(struct allowedips_node __rcu *top, u8 bits) -+{ -+ printk(KERN_DEBUG "digraph trie {\n"); -+ print_node(rcu_dereference_raw(top), bits); -+ printk(KERN_DEBUG "}\n"); -+} -+ -+enum { -+ NUM_PEERS = 2000, -+ NUM_RAND_ROUTES = 400, -+ NUM_MUTATED_ROUTES = 100, -+ NUM_QUERIES = NUM_RAND_ROUTES * NUM_MUTATED_ROUTES * 30 -+}; -+ -+struct horrible_allowedips { -+ struct hlist_head head; -+}; -+ -+struct horrible_allowedips_node { -+ struct hlist_node table; -+ union nf_inet_addr ip; -+ union nf_inet_addr mask; -+ u8 ip_version; -+ void *value; -+}; -+ -+static __init void horrible_allowedips_init(struct horrible_allowedips *table) -+{ -+ INIT_HLIST_HEAD(&table->head); -+} -+ -+static __init void horrible_allowedips_free(struct horrible_allowedips *table) -+{ -+ struct horrible_allowedips_node *node; -+ struct hlist_node *h; -+ -+ hlist_for_each_entry_safe(node, h, &table->head, table) { -+ hlist_del(&node->table); -+ kfree(node); -+ } -+} -+ -+static __init inline union nf_inet_addr horrible_cidr_to_mask(u8 cidr) -+{ -+ union nf_inet_addr mask; -+ -+ memset(&mask, 0x00, 128 / 8); -+ memset(&mask, 0xff, cidr / 8); -+ if (cidr % 32) -+ mask.all[cidr / 32] = (__force u32)htonl( -+ (0xFFFFFFFFUL << (32 - (cidr % 32))) & 0xFFFFFFFFUL); -+ return mask; -+} -+ -+static __init inline u8 horrible_mask_to_cidr(union nf_inet_addr subnet) -+{ -+ return hweight32(subnet.all[0]) + hweight32(subnet.all[1]) + -+ hweight32(subnet.all[2]) + hweight32(subnet.all[3]); -+} -+ -+static __init inline void -+horrible_mask_self(struct horrible_allowedips_node *node) -+{ -+ if (node->ip_version == 4) { -+ node->ip.ip &= node->mask.ip; -+ } else if (node->ip_version == 6) { -+ node->ip.ip6[0] &= node->mask.ip6[0]; -+ node->ip.ip6[1] &= node->mask.ip6[1]; -+ node->ip.ip6[2] &= node->mask.ip6[2]; -+ node->ip.ip6[3] &= node->mask.ip6[3]; -+ } -+} -+ -+static __init inline bool -+horrible_match_v4(const struct horrible_allowedips_node *node, -+ struct in_addr *ip) -+{ -+ return (ip->s_addr & node->mask.ip) == node->ip.ip; -+} -+ -+static __init inline bool -+horrible_match_v6(const struct horrible_allowedips_node *node, -+ struct in6_addr *ip) -+{ -+ return (ip->in6_u.u6_addr32[0] & node->mask.ip6[0]) == -+ node->ip.ip6[0] && -+ (ip->in6_u.u6_addr32[1] & node->mask.ip6[1]) == -+ node->ip.ip6[1] && -+ (ip->in6_u.u6_addr32[2] & node->mask.ip6[2]) == -+ node->ip.ip6[2] && -+ (ip->in6_u.u6_addr32[3] & node->mask.ip6[3]) == node->ip.ip6[3]; -+} -+ -+static __init void -+horrible_insert_ordered(struct horrible_allowedips *table, -+ struct horrible_allowedips_node *node) -+{ -+ struct horrible_allowedips_node *other = NULL, *where = NULL; -+ u8 my_cidr = horrible_mask_to_cidr(node->mask); -+ -+ hlist_for_each_entry(other, &table->head, table) { -+ if (!memcmp(&other->mask, &node->mask, -+ sizeof(union nf_inet_addr)) && -+ !memcmp(&other->ip, &node->ip, -+ sizeof(union nf_inet_addr)) && -+ other->ip_version == node->ip_version) { -+ other->value = node->value; -+ kfree(node); -+ return; -+ } -+ where = other; -+ if (horrible_mask_to_cidr(other->mask) <= my_cidr) -+ break; -+ } -+ if (!other && !where) -+ hlist_add_head(&node->table, &table->head); -+ else if (!other) -+ hlist_add_behind(&node->table, &where->table); -+ else -+ hlist_add_before(&node->table, &where->table); -+} -+ -+static __init int -+horrible_allowedips_insert_v4(struct horrible_allowedips *table, -+ struct in_addr *ip, u8 cidr, void *value) -+{ -+ struct horrible_allowedips_node *node = kzalloc(sizeof(*node), -+ GFP_KERNEL); -+ -+ if (unlikely(!node)) -+ return -ENOMEM; -+ node->ip.in = *ip; -+ node->mask = horrible_cidr_to_mask(cidr); -+ node->ip_version = 4; -+ node->value = value; -+ horrible_mask_self(node); -+ horrible_insert_ordered(table, node); -+ return 0; -+} -+ -+static __init int -+horrible_allowedips_insert_v6(struct horrible_allowedips *table, -+ struct in6_addr *ip, u8 cidr, void *value) -+{ -+ struct horrible_allowedips_node *node = kzalloc(sizeof(*node), -+ GFP_KERNEL); -+ -+ if (unlikely(!node)) -+ return -ENOMEM; -+ node->ip.in6 = *ip; -+ node->mask = horrible_cidr_to_mask(cidr); -+ node->ip_version = 6; -+ node->value = value; -+ horrible_mask_self(node); -+ horrible_insert_ordered(table, node); -+ return 0; -+} -+ -+static __init void * -+horrible_allowedips_lookup_v4(struct horrible_allowedips *table, -+ struct in_addr *ip) -+{ -+ struct horrible_allowedips_node *node; -+ void *ret = NULL; -+ -+ hlist_for_each_entry(node, &table->head, table) { -+ if (node->ip_version != 4) -+ continue; -+ if (horrible_match_v4(node, ip)) { -+ ret = node->value; -+ break; -+ } -+ } -+ return ret; -+} -+ -+static __init void * -+horrible_allowedips_lookup_v6(struct horrible_allowedips *table, -+ struct in6_addr *ip) -+{ -+ struct horrible_allowedips_node *node; -+ void *ret = NULL; -+ -+ hlist_for_each_entry(node, &table->head, table) { -+ if (node->ip_version != 6) -+ continue; -+ if (horrible_match_v6(node, ip)) { -+ ret = node->value; -+ break; -+ } -+ } -+ return ret; -+} -+ -+static __init bool randomized_test(void) -+{ -+ unsigned int i, j, k, mutate_amount, cidr; -+ u8 ip[16], mutate_mask[16], mutated[16]; -+ struct wg_peer **peers, *peer; -+ struct horrible_allowedips h; -+ DEFINE_MUTEX(mutex); -+ struct allowedips t; -+ bool ret = false; -+ -+ mutex_init(&mutex); -+ -+ wg_allowedips_init(&t); -+ horrible_allowedips_init(&h); -+ -+ peers = kcalloc(NUM_PEERS, sizeof(*peers), GFP_KERNEL); -+ if (unlikely(!peers)) { -+ pr_err("allowedips random self-test malloc: FAIL\n"); -+ goto free; -+ } -+ for (i = 0; i < NUM_PEERS; ++i) { -+ peers[i] = kzalloc(sizeof(*peers[i]), GFP_KERNEL); -+ if (unlikely(!peers[i])) { -+ pr_err("allowedips random self-test malloc: FAIL\n"); -+ goto free; -+ } -+ kref_init(&peers[i]->refcount); -+ } -+ -+ mutex_lock(&mutex); -+ -+ for (i = 0; i < NUM_RAND_ROUTES; ++i) { -+ prandom_bytes(ip, 4); -+ cidr = prandom_u32_max(32) + 1; -+ peer = peers[prandom_u32_max(NUM_PEERS)]; -+ if (wg_allowedips_insert_v4(&t, (struct in_addr *)ip, cidr, -+ peer, &mutex) < 0) { -+ pr_err("allowedips random self-test malloc: FAIL\n"); -+ goto free; -+ } -+ if (horrible_allowedips_insert_v4(&h, (struct in_addr *)ip, -+ cidr, peer) < 0) { -+ pr_err("allowedips random self-test malloc: FAIL\n"); -+ goto free; -+ } -+ for (j = 0; j < NUM_MUTATED_ROUTES; ++j) { -+ memcpy(mutated, ip, 4); -+ prandom_bytes(mutate_mask, 4); -+ mutate_amount = prandom_u32_max(32); -+ for (k = 0; k < mutate_amount / 8; ++k) -+ mutate_mask[k] = 0xff; -+ mutate_mask[k] = 0xff -+ << ((8 - (mutate_amount % 8)) % 8); -+ for (; k < 4; ++k) -+ mutate_mask[k] = 0; -+ for (k = 0; k < 4; ++k) -+ mutated[k] = (mutated[k] & mutate_mask[k]) | -+ (~mutate_mask[k] & -+ prandom_u32_max(256)); -+ cidr = prandom_u32_max(32) + 1; -+ peer = peers[prandom_u32_max(NUM_PEERS)]; -+ if (wg_allowedips_insert_v4(&t, -+ (struct in_addr *)mutated, -+ cidr, peer, &mutex) < 0) { -+ pr_err("allowedips random malloc: FAIL\n"); -+ goto free; -+ } -+ if (horrible_allowedips_insert_v4(&h, -+ (struct in_addr *)mutated, cidr, peer)) { -+ pr_err("allowedips random self-test malloc: FAIL\n"); -+ goto free; -+ } -+ } -+ } -+ -+ for (i = 0; i < NUM_RAND_ROUTES; ++i) { -+ prandom_bytes(ip, 16); -+ cidr = prandom_u32_max(128) + 1; -+ peer = peers[prandom_u32_max(NUM_PEERS)]; -+ if (wg_allowedips_insert_v6(&t, (struct in6_addr *)ip, cidr, -+ peer, &mutex) < 0) { -+ pr_err("allowedips random self-test malloc: FAIL\n"); -+ goto free; -+ } -+ if (horrible_allowedips_insert_v6(&h, (struct in6_addr *)ip, -+ cidr, peer) < 0) { -+ pr_err("allowedips random self-test malloc: FAIL\n"); -+ goto free; -+ } -+ for (j = 0; j < NUM_MUTATED_ROUTES; ++j) { -+ memcpy(mutated, ip, 16); -+ prandom_bytes(mutate_mask, 16); -+ mutate_amount = prandom_u32_max(128); -+ for (k = 0; k < mutate_amount / 8; ++k) -+ mutate_mask[k] = 0xff; -+ mutate_mask[k] = 0xff -+ << ((8 - (mutate_amount % 8)) % 8); -+ for (; k < 4; ++k) -+ mutate_mask[k] = 0; -+ for (k = 0; k < 4; ++k) -+ mutated[k] = (mutated[k] & mutate_mask[k]) | -+ (~mutate_mask[k] & -+ prandom_u32_max(256)); -+ cidr = prandom_u32_max(128) + 1; -+ peer = peers[prandom_u32_max(NUM_PEERS)]; -+ if (wg_allowedips_insert_v6(&t, -+ (struct in6_addr *)mutated, -+ cidr, peer, &mutex) < 0) { -+ pr_err("allowedips random self-test malloc: FAIL\n"); -+ goto free; -+ } -+ if (horrible_allowedips_insert_v6( -+ &h, (struct in6_addr *)mutated, cidr, -+ peer)) { -+ pr_err("allowedips random self-test malloc: FAIL\n"); -+ goto free; -+ } -+ } -+ } -+ -+ mutex_unlock(&mutex); -+ -+ if (IS_ENABLED(DEBUG_PRINT_TRIE_GRAPHVIZ)) { -+ print_tree(t.root4, 32); -+ print_tree(t.root6, 128); -+ } -+ -+ for (i = 0; i < NUM_QUERIES; ++i) { -+ prandom_bytes(ip, 4); -+ if (lookup(t.root4, 32, ip) != -+ horrible_allowedips_lookup_v4(&h, (struct in_addr *)ip)) { -+ pr_err("allowedips random self-test: FAIL\n"); -+ goto free; -+ } -+ } -+ -+ for (i = 0; i < NUM_QUERIES; ++i) { -+ prandom_bytes(ip, 16); -+ if (lookup(t.root6, 128, ip) != -+ horrible_allowedips_lookup_v6(&h, (struct in6_addr *)ip)) { -+ pr_err("allowedips random self-test: FAIL\n"); -+ goto free; -+ } -+ } -+ ret = true; -+ -+free: -+ mutex_lock(&mutex); -+ wg_allowedips_free(&t, &mutex); -+ mutex_unlock(&mutex); -+ horrible_allowedips_free(&h); -+ if (peers) { -+ for (i = 0; i < NUM_PEERS; ++i) -+ kfree(peers[i]); -+ } -+ kfree(peers); -+ return ret; -+} -+ -+static __init inline struct in_addr *ip4(u8 a, u8 b, u8 c, u8 d) -+{ -+ static struct in_addr ip; -+ u8 *split = (u8 *)&ip; -+ -+ split[0] = a; -+ split[1] = b; -+ split[2] = c; -+ split[3] = d; -+ return &ip; -+} -+ -+static __init inline struct in6_addr *ip6(u32 a, u32 b, u32 c, u32 d) -+{ -+ static struct in6_addr ip; -+ __be32 *split = (__be32 *)&ip; -+ -+ split[0] = cpu_to_be32(a); -+ split[1] = cpu_to_be32(b); -+ split[2] = cpu_to_be32(c); -+ split[3] = cpu_to_be32(d); -+ return &ip; -+} -+ -+static __init struct wg_peer *init_peer(void) -+{ -+ struct wg_peer *peer = kzalloc(sizeof(*peer), GFP_KERNEL); -+ -+ if (!peer) -+ return NULL; -+ kref_init(&peer->refcount); -+ INIT_LIST_HEAD(&peer->allowedips_list); -+ return peer; -+} -+ -+#define insert(version, mem, ipa, ipb, ipc, ipd, cidr) \ -+ wg_allowedips_insert_v##version(&t, ip##version(ipa, ipb, ipc, ipd), \ -+ cidr, mem, &mutex) -+ -+#define maybe_fail() do { \ -+ ++i; \ -+ if (!_s) { \ -+ pr_info("allowedips self-test %zu: FAIL\n", i); \ -+ success = false; \ -+ } \ -+ } while (0) -+ -+#define test(version, mem, ipa, ipb, ipc, ipd) do { \ -+ bool _s = lookup(t.root##version, (version) == 4 ? 32 : 128, \ -+ ip##version(ipa, ipb, ipc, ipd)) == (mem); \ -+ maybe_fail(); \ -+ } while (0) -+ -+#define test_negative(version, mem, ipa, ipb, ipc, ipd) do { \ -+ bool _s = lookup(t.root##version, (version) == 4 ? 32 : 128, \ -+ ip##version(ipa, ipb, ipc, ipd)) != (mem); \ -+ maybe_fail(); \ -+ } while (0) -+ -+#define test_boolean(cond) do { \ -+ bool _s = (cond); \ -+ maybe_fail(); \ -+ } while (0) -+ -+bool __init wg_allowedips_selftest(void) -+{ -+ bool found_a = false, found_b = false, found_c = false, found_d = false, -+ found_e = false, found_other = false; -+ struct wg_peer *a = init_peer(), *b = init_peer(), *c = init_peer(), -+ *d = init_peer(), *e = init_peer(), *f = init_peer(), -+ *g = init_peer(), *h = init_peer(); -+ struct allowedips_node *iter_node; -+ bool success = false; -+ struct allowedips t; -+ DEFINE_MUTEX(mutex); -+ struct in6_addr ip; -+ size_t i = 0, count = 0; -+ __be64 part; -+ -+ mutex_init(&mutex); -+ mutex_lock(&mutex); -+ wg_allowedips_init(&t); -+ -+ if (!a || !b || !c || !d || !e || !f || !g || !h) { -+ pr_err("allowedips self-test malloc: FAIL\n"); -+ goto free; -+ } -+ -+ insert(4, a, 192, 168, 4, 0, 24); -+ insert(4, b, 192, 168, 4, 4, 32); -+ insert(4, c, 192, 168, 0, 0, 16); -+ insert(4, d, 192, 95, 5, 64, 27); -+ /* replaces previous entry, and maskself is required */ -+ insert(4, c, 192, 95, 5, 65, 27); -+ insert(6, d, 0x26075300, 0x60006b00, 0, 0xc05f0543, 128); -+ insert(6, c, 0x26075300, 0x60006b00, 0, 0, 64); -+ insert(4, e, 0, 0, 0, 0, 0); -+ insert(6, e, 0, 0, 0, 0, 0); -+ /* replaces previous entry */ -+ insert(6, f, 0, 0, 0, 0, 0); -+ insert(6, g, 0x24046800, 0, 0, 0, 32); -+ /* maskself is required */ -+ insert(6, h, 0x24046800, 0x40040800, 0xdeadbeef, 0xdeadbeef, 64); -+ insert(6, a, 0x24046800, 0x40040800, 0xdeadbeef, 0xdeadbeef, 128); -+ insert(6, c, 0x24446800, 0x40e40800, 0xdeaebeef, 0xdefbeef, 128); -+ insert(6, b, 0x24446800, 0xf0e40800, 0xeeaebeef, 0, 98); -+ insert(4, g, 64, 15, 112, 0, 20); -+ /* maskself is required */ -+ insert(4, h, 64, 15, 123, 211, 25); -+ insert(4, a, 10, 0, 0, 0, 25); -+ insert(4, b, 10, 0, 0, 128, 25); -+ insert(4, a, 10, 1, 0, 0, 30); -+ insert(4, b, 10, 1, 0, 4, 30); -+ insert(4, c, 10, 1, 0, 8, 29); -+ insert(4, d, 10, 1, 0, 16, 29); -+ -+ if (IS_ENABLED(DEBUG_PRINT_TRIE_GRAPHVIZ)) { -+ print_tree(t.root4, 32); -+ print_tree(t.root6, 128); -+ } -+ -+ success = true; -+ -+ test(4, a, 192, 168, 4, 20); -+ test(4, a, 192, 168, 4, 0); -+ test(4, b, 192, 168, 4, 4); -+ test(4, c, 192, 168, 200, 182); -+ test(4, c, 192, 95, 5, 68); -+ test(4, e, 192, 95, 5, 96); -+ test(6, d, 0x26075300, 0x60006b00, 0, 0xc05f0543); -+ test(6, c, 0x26075300, 0x60006b00, 0, 0xc02e01ee); -+ test(6, f, 0x26075300, 0x60006b01, 0, 0); -+ test(6, g, 0x24046800, 0x40040806, 0, 0x1006); -+ test(6, g, 0x24046800, 0x40040806, 0x1234, 0x5678); -+ test(6, f, 0x240467ff, 0x40040806, 0x1234, 0x5678); -+ test(6, f, 0x24046801, 0x40040806, 0x1234, 0x5678); -+ test(6, h, 0x24046800, 0x40040800, 0x1234, 0x5678); -+ test(6, h, 0x24046800, 0x40040800, 0, 0); -+ test(6, h, 0x24046800, 0x40040800, 0x10101010, 0x10101010); -+ test(6, a, 0x24046800, 0x40040800, 0xdeadbeef, 0xdeadbeef); -+ test(4, g, 64, 15, 116, 26); -+ test(4, g, 64, 15, 127, 3); -+ test(4, g, 64, 15, 123, 1); -+ test(4, h, 64, 15, 123, 128); -+ test(4, h, 64, 15, 123, 129); -+ test(4, a, 10, 0, 0, 52); -+ test(4, b, 10, 0, 0, 220); -+ test(4, a, 10, 1, 0, 2); -+ test(4, b, 10, 1, 0, 6); -+ test(4, c, 10, 1, 0, 10); -+ test(4, d, 10, 1, 0, 20); -+ -+ insert(4, a, 1, 0, 0, 0, 32); -+ insert(4, a, 64, 0, 0, 0, 32); -+ insert(4, a, 128, 0, 0, 0, 32); -+ insert(4, a, 192, 0, 0, 0, 32); -+ insert(4, a, 255, 0, 0, 0, 32); -+ wg_allowedips_remove_by_peer(&t, a, &mutex); -+ test_negative(4, a, 1, 0, 0, 0); -+ test_negative(4, a, 64, 0, 0, 0); -+ test_negative(4, a, 128, 0, 0, 0); -+ test_negative(4, a, 192, 0, 0, 0); -+ test_negative(4, a, 255, 0, 0, 0); -+ -+ wg_allowedips_free(&t, &mutex); -+ wg_allowedips_init(&t); -+ insert(4, a, 192, 168, 0, 0, 16); -+ insert(4, a, 192, 168, 0, 0, 24); -+ wg_allowedips_remove_by_peer(&t, a, &mutex); -+ test_negative(4, a, 192, 168, 0, 1); -+ -+ /* These will hit the WARN_ON(len >= 128) in free_node if something -+ * goes wrong. -+ */ -+ for (i = 0; i < 128; ++i) { -+ part = cpu_to_be64(~(1LLU << (i % 64))); -+ memset(&ip, 0xff, 16); -+ memcpy((u8 *)&ip + (i < 64) * 8, &part, 8); -+ wg_allowedips_insert_v6(&t, &ip, 128, a, &mutex); -+ } -+ -+ wg_allowedips_free(&t, &mutex); -+ -+ wg_allowedips_init(&t); -+ insert(4, a, 192, 95, 5, 93, 27); -+ insert(6, a, 0x26075300, 0x60006b00, 0, 0xc05f0543, 128); -+ insert(4, a, 10, 1, 0, 20, 29); -+ insert(6, a, 0x26075300, 0x6d8a6bf8, 0xdab1f1df, 0xc05f1523, 83); -+ insert(6, a, 0x26075300, 0x6d8a6bf8, 0xdab1f1df, 0xc05f1523, 21); -+ list_for_each_entry(iter_node, &a->allowedips_list, peer_list) { -+ u8 cidr, ip[16] __aligned(__alignof(u64)); -+ int family = wg_allowedips_read_node(iter_node, ip, &cidr); -+ -+ count++; -+ -+ if (cidr == 27 && family == AF_INET && -+ !memcmp(ip, ip4(192, 95, 5, 64), sizeof(struct in_addr))) -+ found_a = true; -+ else if (cidr == 128 && family == AF_INET6 && -+ !memcmp(ip, ip6(0x26075300, 0x60006b00, 0, 0xc05f0543), -+ sizeof(struct in6_addr))) -+ found_b = true; -+ else if (cidr == 29 && family == AF_INET && -+ !memcmp(ip, ip4(10, 1, 0, 16), sizeof(struct in_addr))) -+ found_c = true; -+ else if (cidr == 83 && family == AF_INET6 && -+ !memcmp(ip, ip6(0x26075300, 0x6d8a6bf8, 0xdab1e000, 0), -+ sizeof(struct in6_addr))) -+ found_d = true; -+ else if (cidr == 21 && family == AF_INET6 && -+ !memcmp(ip, ip6(0x26075000, 0, 0, 0), -+ sizeof(struct in6_addr))) -+ found_e = true; -+ else -+ found_other = true; -+ } -+ test_boolean(count == 5); -+ test_boolean(found_a); -+ test_boolean(found_b); -+ test_boolean(found_c); -+ test_boolean(found_d); -+ test_boolean(found_e); -+ test_boolean(!found_other); -+ -+ if (IS_ENABLED(DEBUG_RANDOM_TRIE) && success) -+ success = randomized_test(); -+ -+ if (success) -+ pr_info("allowedips self-tests: pass\n"); -+ -+free: -+ wg_allowedips_free(&t, &mutex); -+ kfree(a); -+ kfree(b); -+ kfree(c); -+ kfree(d); -+ kfree(e); -+ kfree(f); -+ kfree(g); -+ kfree(h); -+ mutex_unlock(&mutex); -+ -+ return success; -+} -+ -+#undef test_negative -+#undef test -+#undef remove -+#undef insert -+#undef init_peer -+ -+#endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/selftest/counter.c 2019-08-20 20:26:42.409341426 +0000 -@@ -0,0 +1,104 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifdef DEBUG -+bool __init wg_packet_counter_selftest(void) -+{ -+ unsigned int test_num = 0, i; -+ union noise_counter counter; -+ bool success = true; -+ -+#define T_INIT do { \ -+ memset(&counter, 0, sizeof(union noise_counter)); \ -+ spin_lock_init(&counter.receive.lock); \ -+ } while (0) -+#define T_LIM (COUNTER_WINDOW_SIZE + 1) -+#define T(n, v) do { \ -+ ++test_num; \ -+ if (counter_validate(&counter, n) != (v)) { \ -+ pr_err("nonce counter self-test %u: FAIL\n", \ -+ test_num); \ -+ success = false; \ -+ } \ -+ } while (0) -+ -+ T_INIT; -+ /* 1 */ T(0, true); -+ /* 2 */ T(1, true); -+ /* 3 */ T(1, false); -+ /* 4 */ T(9, true); -+ /* 5 */ T(8, true); -+ /* 6 */ T(7, true); -+ /* 7 */ T(7, false); -+ /* 8 */ T(T_LIM, true); -+ /* 9 */ T(T_LIM - 1, true); -+ /* 10 */ T(T_LIM - 1, false); -+ /* 11 */ T(T_LIM - 2, true); -+ /* 12 */ T(2, true); -+ /* 13 */ T(2, false); -+ /* 14 */ T(T_LIM + 16, true); -+ /* 15 */ T(3, false); -+ /* 16 */ T(T_LIM + 16, false); -+ /* 17 */ T(T_LIM * 4, true); -+ /* 18 */ T(T_LIM * 4 - (T_LIM - 1), true); -+ /* 19 */ T(10, false); -+ /* 20 */ T(T_LIM * 4 - T_LIM, false); -+ /* 21 */ T(T_LIM * 4 - (T_LIM + 1), false); -+ /* 22 */ T(T_LIM * 4 - (T_LIM - 2), true); -+ /* 23 */ T(T_LIM * 4 + 1 - T_LIM, false); -+ /* 24 */ T(0, false); -+ /* 25 */ T(REJECT_AFTER_MESSAGES, false); -+ /* 26 */ T(REJECT_AFTER_MESSAGES - 1, true); -+ /* 27 */ T(REJECT_AFTER_MESSAGES, false); -+ /* 28 */ T(REJECT_AFTER_MESSAGES - 1, false); -+ /* 29 */ T(REJECT_AFTER_MESSAGES - 2, true); -+ /* 30 */ T(REJECT_AFTER_MESSAGES + 1, false); -+ /* 31 */ T(REJECT_AFTER_MESSAGES + 2, false); -+ /* 32 */ T(REJECT_AFTER_MESSAGES - 2, false); -+ /* 33 */ T(REJECT_AFTER_MESSAGES - 3, true); -+ /* 34 */ T(0, false); -+ -+ T_INIT; -+ for (i = 1; i <= COUNTER_WINDOW_SIZE; ++i) -+ T(i, true); -+ T(0, true); -+ T(0, false); -+ -+ T_INIT; -+ for (i = 2; i <= COUNTER_WINDOW_SIZE + 1; ++i) -+ T(i, true); -+ T(1, true); -+ T(0, false); -+ -+ T_INIT; -+ for (i = COUNTER_WINDOW_SIZE + 1; i-- > 0;) -+ T(i, true); -+ -+ T_INIT; -+ for (i = COUNTER_WINDOW_SIZE + 2; i-- > 1;) -+ T(i, true); -+ T(0, false); -+ -+ T_INIT; -+ for (i = COUNTER_WINDOW_SIZE + 1; i-- > 1;) -+ T(i, true); -+ T(COUNTER_WINDOW_SIZE + 1, true); -+ T(0, false); -+ -+ T_INIT; -+ for (i = COUNTER_WINDOW_SIZE + 1; i-- > 1;) -+ T(i, true); -+ T(0, true); -+ T(COUNTER_WINDOW_SIZE + 1, true); -+ -+#undef T -+#undef T_LIM -+#undef T_INIT -+ -+ if (success) -+ pr_info("nonce counter self-tests: pass\n"); -+ return success; -+} -+#endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/selftest/ratelimiter.c 2019-08-20 20:26:42.410341426 +0000 -@@ -0,0 +1,226 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifdef DEBUG -+ -+#include -+ -+static const struct { -+ bool result; -+ unsigned int msec_to_sleep_before; -+} expected_results[] __initconst = { -+ [0 ... PACKETS_BURSTABLE - 1] = { true, 0 }, -+ [PACKETS_BURSTABLE] = { false, 0 }, -+ [PACKETS_BURSTABLE + 1] = { true, MSEC_PER_SEC / PACKETS_PER_SECOND }, -+ [PACKETS_BURSTABLE + 2] = { false, 0 }, -+ [PACKETS_BURSTABLE + 3] = { true, (MSEC_PER_SEC / PACKETS_PER_SECOND) * 2 }, -+ [PACKETS_BURSTABLE + 4] = { true, 0 }, -+ [PACKETS_BURSTABLE + 5] = { false, 0 } -+}; -+ -+static __init unsigned int maximum_jiffies_at_index(int index) -+{ -+ unsigned int total_msecs = 2 * MSEC_PER_SEC / PACKETS_PER_SECOND / 3; -+ int i; -+ -+ for (i = 0; i <= index; ++i) -+ total_msecs += expected_results[i].msec_to_sleep_before; -+ return msecs_to_jiffies(total_msecs); -+} -+ -+static __init int timings_test(struct sk_buff *skb4, struct iphdr *hdr4, -+ struct sk_buff *skb6, struct ipv6hdr *hdr6, -+ int *test) -+{ -+ unsigned long loop_start_time; -+ int i; -+ -+ wg_ratelimiter_gc_entries(NULL); -+ rcu_barrier(); -+ loop_start_time = jiffies; -+ -+ for (i = 0; i < ARRAY_SIZE(expected_results); ++i) { -+ if (expected_results[i].msec_to_sleep_before) -+ msleep(expected_results[i].msec_to_sleep_before); -+ -+ if (time_is_before_jiffies(loop_start_time + -+ maximum_jiffies_at_index(i))) -+ return -ETIMEDOUT; -+ if (wg_ratelimiter_allow(skb4, &init_net) != -+ expected_results[i].result) -+ return -EXFULL; -+ ++(*test); -+ -+ hdr4->saddr = htonl(ntohl(hdr4->saddr) + i + 1); -+ if (time_is_before_jiffies(loop_start_time + -+ maximum_jiffies_at_index(i))) -+ return -ETIMEDOUT; -+ if (!wg_ratelimiter_allow(skb4, &init_net)) -+ return -EXFULL; -+ ++(*test); -+ -+ hdr4->saddr = htonl(ntohl(hdr4->saddr) - i - 1); -+ -+#if IS_ENABLED(CONFIG_IPV6) -+ hdr6->saddr.in6_u.u6_addr32[2] = htonl(i); -+ hdr6->saddr.in6_u.u6_addr32[3] = htonl(i); -+ if (time_is_before_jiffies(loop_start_time + -+ maximum_jiffies_at_index(i))) -+ return -ETIMEDOUT; -+ if (wg_ratelimiter_allow(skb6, &init_net) != -+ expected_results[i].result) -+ return -EXFULL; -+ ++(*test); -+ -+ hdr6->saddr.in6_u.u6_addr32[0] = -+ htonl(ntohl(hdr6->saddr.in6_u.u6_addr32[0]) + i + 1); -+ if (time_is_before_jiffies(loop_start_time + -+ maximum_jiffies_at_index(i))) -+ return -ETIMEDOUT; -+ if (!wg_ratelimiter_allow(skb6, &init_net)) -+ return -EXFULL; -+ ++(*test); -+ -+ hdr6->saddr.in6_u.u6_addr32[0] = -+ htonl(ntohl(hdr6->saddr.in6_u.u6_addr32[0]) - i - 1); -+ -+ if (time_is_before_jiffies(loop_start_time + -+ maximum_jiffies_at_index(i))) -+ return -ETIMEDOUT; -+#endif -+ } -+ return 0; -+} -+ -+static __init int capacity_test(struct sk_buff *skb4, struct iphdr *hdr4, -+ int *test) -+{ -+ int i; -+ -+ wg_ratelimiter_gc_entries(NULL); -+ rcu_barrier(); -+ -+ if (atomic_read(&total_entries)) -+ return -EXFULL; -+ ++(*test); -+ -+ for (i = 0; i <= max_entries; ++i) { -+ hdr4->saddr = htonl(i); -+ if (wg_ratelimiter_allow(skb4, &init_net) != (i != max_entries)) -+ return -EXFULL; -+ ++(*test); -+ } -+ return 0; -+} -+ -+bool __init wg_ratelimiter_selftest(void) -+{ -+ enum { TRIALS_BEFORE_GIVING_UP = 5000 }; -+ bool success = false; -+ int test = 0, trials; -+ struct sk_buff *skb4, *skb6; -+ struct iphdr *hdr4; -+ struct ipv6hdr *hdr6; -+ -+ if (IS_ENABLED(CONFIG_KASAN) || IS_ENABLED(CONFIG_UBSAN)) -+ return true; -+ -+ BUILD_BUG_ON(MSEC_PER_SEC % PACKETS_PER_SECOND != 0); -+ -+ if (wg_ratelimiter_init()) -+ goto out; -+ ++test; -+ if (wg_ratelimiter_init()) { -+ wg_ratelimiter_uninit(); -+ goto out; -+ } -+ ++test; -+ if (wg_ratelimiter_init()) { -+ wg_ratelimiter_uninit(); -+ wg_ratelimiter_uninit(); -+ goto out; -+ } -+ ++test; -+ -+ skb4 = alloc_skb(sizeof(struct iphdr), GFP_KERNEL); -+ if (unlikely(!skb4)) -+ goto err_nofree; -+ skb4->protocol = htons(ETH_P_IP); -+ hdr4 = (struct iphdr *)skb_put(skb4, sizeof(*hdr4)); -+ hdr4->saddr = htonl(8182); -+ skb_reset_network_header(skb4); -+ ++test; -+ -+#if IS_ENABLED(CONFIG_IPV6) -+ skb6 = alloc_skb(sizeof(struct ipv6hdr), GFP_KERNEL); -+ if (unlikely(!skb6)) { -+ kfree_skb(skb4); -+ goto err_nofree; -+ } -+ skb6->protocol = htons(ETH_P_IPV6); -+ hdr6 = (struct ipv6hdr *)skb_put(skb6, sizeof(*hdr6)); -+ hdr6->saddr.in6_u.u6_addr32[0] = htonl(1212); -+ hdr6->saddr.in6_u.u6_addr32[1] = htonl(289188); -+ skb_reset_network_header(skb6); -+ ++test; -+#endif -+ -+ for (trials = TRIALS_BEFORE_GIVING_UP;;) { -+ int test_count = 0, ret; -+ -+ ret = timings_test(skb4, hdr4, skb6, hdr6, &test_count); -+ if (ret == -ETIMEDOUT) { -+ if (!trials--) { -+ test += test_count; -+ goto err; -+ } -+ msleep(500); -+ continue; -+ } else if (ret < 0) { -+ test += test_count; -+ goto err; -+ } else { -+ test += test_count; -+ break; -+ } -+ } -+ -+ for (trials = TRIALS_BEFORE_GIVING_UP;;) { -+ int test_count = 0; -+ -+ if (capacity_test(skb4, hdr4, &test_count) < 0) { -+ if (!trials--) { -+ test += test_count; -+ goto err; -+ } -+ msleep(50); -+ continue; -+ } -+ test += test_count; -+ break; -+ } -+ -+ success = true; -+ -+err: -+ kfree_skb(skb4); -+#if IS_ENABLED(CONFIG_IPV6) -+ kfree_skb(skb6); -+#endif -+err_nofree: -+ wg_ratelimiter_uninit(); -+ wg_ratelimiter_uninit(); -+ wg_ratelimiter_uninit(); -+ /* Uninit one extra time to check underflow detection. */ -+ wg_ratelimiter_uninit(); -+out: -+ if (success) -+ pr_info("ratelimiter self-tests: pass\n"); -+ else -+ pr_err("ratelimiter self-test %d: FAIL\n", test); -+ -+ return success; -+} -+#endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/send.c 2019-08-20 20:26:42.410341426 +0000 -@@ -0,0 +1,431 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include "queueing.h" -+#include "timers.h" -+#include "device.h" -+#include "peer.h" -+#include "socket.h" -+#include "messages.h" -+#include "cookie.h" -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+static void wg_packet_send_handshake_initiation(struct wg_peer *peer) -+{ -+ struct message_handshake_initiation packet; -+ -+ if (!wg_birthdate_has_expired(atomic64_read(&peer->last_sent_handshake), -+ REKEY_TIMEOUT)) -+ return; /* This function is rate limited. */ -+ -+ atomic64_set(&peer->last_sent_handshake, ktime_get_coarse_boottime_ns()); -+ net_dbg_ratelimited("%s: Sending handshake initiation to peer %llu (%pISpfsc)\n", -+ peer->device->dev->name, peer->internal_id, -+ &peer->endpoint.addr); -+ -+ if (wg_noise_handshake_create_initiation(&packet, &peer->handshake)) { -+ wg_cookie_add_mac_to_packet(&packet, sizeof(packet), peer); -+ wg_timers_any_authenticated_packet_traversal(peer); -+ wg_timers_any_authenticated_packet_sent(peer); -+ atomic64_set(&peer->last_sent_handshake, -+ ktime_get_coarse_boottime_ns()); -+ wg_socket_send_buffer_to_peer(peer, &packet, sizeof(packet), -+ HANDSHAKE_DSCP); -+ wg_timers_handshake_initiated(peer); -+ } -+} -+ -+void wg_packet_handshake_send_worker(struct work_struct *work) -+{ -+ struct wg_peer *peer = container_of(work, struct wg_peer, -+ transmit_handshake_work); -+ -+ wg_packet_send_handshake_initiation(peer); -+ wg_peer_put(peer); -+} -+ -+void wg_packet_send_queued_handshake_initiation(struct wg_peer *peer, -+ bool is_retry) -+{ -+ if (!is_retry) -+ peer->timer_handshake_attempts = 0; -+ -+ rcu_read_lock_bh(); -+ /* We check last_sent_handshake here in addition to the actual function -+ * we're queueing up, so that we don't queue things if not strictly -+ * necessary: -+ */ -+ if (!wg_birthdate_has_expired(atomic64_read(&peer->last_sent_handshake), -+ REKEY_TIMEOUT) || -+ unlikely(READ_ONCE(peer->is_dead))) -+ goto out; -+ -+ wg_peer_get(peer); -+ /* Queues up calling packet_send_queued_handshakes(peer), where we do a -+ * peer_put(peer) after: -+ */ -+ if (!queue_work(peer->device->handshake_send_wq, -+ &peer->transmit_handshake_work)) -+ /* If the work was already queued, we want to drop the -+ * extra reference: -+ */ -+ wg_peer_put(peer); -+out: -+ rcu_read_unlock_bh(); -+} -+ -+void wg_packet_send_handshake_response(struct wg_peer *peer) -+{ -+ struct message_handshake_response packet; -+ -+ atomic64_set(&peer->last_sent_handshake, ktime_get_coarse_boottime_ns()); -+ net_dbg_ratelimited("%s: Sending handshake response to peer %llu (%pISpfsc)\n", -+ peer->device->dev->name, peer->internal_id, -+ &peer->endpoint.addr); -+ -+ if (wg_noise_handshake_create_response(&packet, &peer->handshake)) { -+ wg_cookie_add_mac_to_packet(&packet, sizeof(packet), peer); -+ if (wg_noise_handshake_begin_session(&peer->handshake, -+ &peer->keypairs)) { -+ wg_timers_session_derived(peer); -+ wg_timers_any_authenticated_packet_traversal(peer); -+ wg_timers_any_authenticated_packet_sent(peer); -+ atomic64_set(&peer->last_sent_handshake, -+ ktime_get_coarse_boottime_ns()); -+ wg_socket_send_buffer_to_peer(peer, &packet, -+ sizeof(packet), -+ HANDSHAKE_DSCP); -+ } -+ } -+} -+ -+void wg_packet_send_handshake_cookie(struct wg_device *wg, -+ struct sk_buff *initiating_skb, -+ __le32 sender_index) -+{ -+ struct message_handshake_cookie packet; -+ -+ net_dbg_skb_ratelimited("%s: Sending cookie response for denied handshake message for %pISpfsc\n", -+ wg->dev->name, initiating_skb); -+ wg_cookie_message_create(&packet, initiating_skb, sender_index, -+ &wg->cookie_checker); -+ wg_socket_send_buffer_as_reply_to_skb(wg, initiating_skb, &packet, -+ sizeof(packet)); -+} -+ -+static void keep_key_fresh(struct wg_peer *peer) -+{ -+ struct noise_keypair *keypair; -+ bool send = false; -+ -+ rcu_read_lock_bh(); -+ keypair = rcu_dereference_bh(peer->keypairs.current_keypair); -+ if (likely(keypair && READ_ONCE(keypair->sending.is_valid)) && -+ (unlikely(atomic64_read(&keypair->sending.counter.counter) > -+ REKEY_AFTER_MESSAGES) || -+ (keypair->i_am_the_initiator && -+ unlikely(wg_birthdate_has_expired(keypair->sending.birthdate, -+ REKEY_AFTER_TIME))))) -+ send = true; -+ rcu_read_unlock_bh(); -+ -+ if (send) -+ wg_packet_send_queued_handshake_initiation(peer, false); -+} -+ -+static unsigned int calculate_skb_padding(struct sk_buff *skb) -+{ -+ /* We do this modulo business with the MTU, just in case the networking -+ * layer gives us a packet that's bigger than the MTU. In that case, we -+ * wouldn't want the final subtraction to overflow in the case of the -+ * padded_size being clamped. -+ */ -+ unsigned int last_unit = skb->len % PACKET_CB(skb)->mtu; -+ unsigned int padded_size = ALIGN(last_unit, MESSAGE_PADDING_MULTIPLE); -+ -+ if (padded_size > PACKET_CB(skb)->mtu) -+ padded_size = PACKET_CB(skb)->mtu; -+ return padded_size - last_unit; -+} -+ -+static bool encrypt_packet(struct sk_buff *skb, struct noise_keypair *keypair, -+ simd_context_t *simd_context) -+{ -+ unsigned int padding_len, plaintext_len, trailer_len; -+ struct scatterlist sg[MAX_SKB_FRAGS + 8]; -+ struct message_data *header; -+ struct sk_buff *trailer; -+ int num_frags; -+ -+ /* Calculate lengths. */ -+ padding_len = calculate_skb_padding(skb); -+ trailer_len = padding_len + noise_encrypted_len(0); -+ plaintext_len = skb->len + padding_len; -+ -+ /* Expand data section to have room for padding and auth tag. */ -+ num_frags = skb_cow_data(skb, trailer_len, &trailer); -+ if (unlikely(num_frags < 0 || num_frags > ARRAY_SIZE(sg))) -+ return false; -+ -+ /* Set the padding to zeros, and make sure it and the auth tag are part -+ * of the skb. -+ */ -+ memset(skb_tail_pointer(trailer), 0, padding_len); -+ -+ /* Expand head section to have room for our header and the network -+ * stack's headers. -+ */ -+ if (unlikely(skb_cow_head(skb, DATA_PACKET_HEAD_ROOM) < 0)) -+ return false; -+ -+ /* Finalize checksum calculation for the inner packet, if required. */ -+ if (unlikely(skb->ip_summed == CHECKSUM_PARTIAL && -+ skb_checksum_help(skb))) -+ return false; -+ -+ /* Only after checksumming can we safely add on the padding at the end -+ * and the header. -+ */ -+ skb_set_inner_network_header(skb, 0); -+ header = (struct message_data *)skb_push(skb, sizeof(*header)); -+ header->header.type = cpu_to_le32(MESSAGE_DATA); -+ header->key_idx = keypair->remote_index; -+ header->counter = cpu_to_le64(PACKET_CB(skb)->nonce); -+ pskb_put(skb, trailer, trailer_len); -+ -+ /* Now we can encrypt the scattergather segments */ -+ sg_init_table(sg, num_frags); -+ if (skb_to_sgvec(skb, sg, sizeof(struct message_data), -+ noise_encrypted_len(plaintext_len)) <= 0) -+ return false; -+ return chacha20poly1305_encrypt_sg(sg, sg, plaintext_len, NULL, 0, -+ PACKET_CB(skb)->nonce, -+ keypair->sending.key, simd_context); -+} -+ -+void wg_packet_send_keepalive(struct wg_peer *peer) -+{ -+ struct sk_buff *skb; -+ -+ if (skb_queue_empty(&peer->staged_packet_queue)) { -+ skb = alloc_skb(DATA_PACKET_HEAD_ROOM + MESSAGE_MINIMUM_LENGTH, -+ GFP_ATOMIC); -+ if (unlikely(!skb)) -+ return; -+ skb_reserve(skb, DATA_PACKET_HEAD_ROOM); -+ skb->dev = peer->device->dev; -+ PACKET_CB(skb)->mtu = skb->dev->mtu; -+ skb_queue_tail(&peer->staged_packet_queue, skb); -+ net_dbg_ratelimited("%s: Sending keepalive packet to peer %llu (%pISpfsc)\n", -+ peer->device->dev->name, peer->internal_id, -+ &peer->endpoint.addr); -+ } -+ -+ wg_packet_send_staged_packets(peer); -+} -+ -+#define skb_walk_null_queue_safe(first, skb, next) \ -+ for (skb = first, next = skb->next; skb; \ -+ skb = next, next = skb ? skb->next : NULL) -+static void skb_free_null_queue(struct sk_buff *first) -+{ -+ struct sk_buff *skb, *next; -+ -+ skb_walk_null_queue_safe(first, skb, next) -+ dev_kfree_skb(skb); -+} -+ -+static void wg_packet_create_data_done(struct sk_buff *first, -+ struct wg_peer *peer) -+{ -+ struct sk_buff *skb, *next; -+ bool is_keepalive, data_sent = false; -+ -+ wg_timers_any_authenticated_packet_traversal(peer); -+ wg_timers_any_authenticated_packet_sent(peer); -+ skb_walk_null_queue_safe(first, skb, next) { -+ is_keepalive = skb->len == message_data_len(0); -+ if (likely(!wg_socket_send_skb_to_peer(peer, skb, -+ PACKET_CB(skb)->ds) && !is_keepalive)) -+ data_sent = true; -+ } -+ -+ if (likely(data_sent)) -+ wg_timers_data_sent(peer); -+ -+ keep_key_fresh(peer); -+} -+ -+void wg_packet_tx_worker(struct work_struct *work) -+{ -+ struct crypt_queue *queue = container_of(work, struct crypt_queue, -+ work); -+ struct noise_keypair *keypair; -+ enum packet_state state; -+ struct sk_buff *first; -+ struct wg_peer *peer; -+ -+ while ((first = __ptr_ring_peek(&queue->ring)) != NULL && -+ (state = atomic_read_acquire(&PACKET_CB(first)->state)) != -+ PACKET_STATE_UNCRYPTED) { -+ __ptr_ring_discard_one(&queue->ring); -+ peer = PACKET_PEER(first); -+ keypair = PACKET_CB(first)->keypair; -+ -+ if (likely(state == PACKET_STATE_CRYPTED)) -+ wg_packet_create_data_done(first, peer); -+ else -+ skb_free_null_queue(first); -+ -+ wg_noise_keypair_put(keypair, false); -+ wg_peer_put(peer); -+ } -+} -+ -+void wg_packet_encrypt_worker(struct work_struct *work) -+{ -+ struct crypt_queue *queue = container_of(work, struct multicore_worker, -+ work)->ptr; -+ struct sk_buff *first, *skb, *next; -+ simd_context_t simd_context; -+ -+ simd_get(&simd_context); -+ while ((first = ptr_ring_consume_bh(&queue->ring)) != NULL) { -+ enum packet_state state = PACKET_STATE_CRYPTED; -+ -+ skb_walk_null_queue_safe(first, skb, next) { -+ if (likely(encrypt_packet(skb, -+ PACKET_CB(first)->keypair, -+ &simd_context))) { -+ wg_reset_packet(skb); -+ } else { -+ state = PACKET_STATE_DEAD; -+ break; -+ } -+ } -+ wg_queue_enqueue_per_peer(&PACKET_PEER(first)->tx_queue, first, -+ state); -+ -+ simd_relax(&simd_context); -+ } -+ simd_put(&simd_context); -+} -+ -+static void wg_packet_create_data(struct sk_buff *first) -+{ -+ struct wg_peer *peer = PACKET_PEER(first); -+ struct wg_device *wg = peer->device; -+ int ret = -EINVAL; -+ -+ rcu_read_lock_bh(); -+ if (unlikely(READ_ONCE(peer->is_dead))) -+ goto err; -+ -+ ret = wg_queue_enqueue_per_device_and_peer(&wg->encrypt_queue, -+ &peer->tx_queue, first, -+ wg->packet_crypt_wq, -+ &wg->encrypt_queue.last_cpu); -+ if (unlikely(ret == -EPIPE)) -+ wg_queue_enqueue_per_peer(&peer->tx_queue, first, -+ PACKET_STATE_DEAD); -+err: -+ rcu_read_unlock_bh(); -+ if (likely(!ret || ret == -EPIPE)) -+ return; -+ wg_noise_keypair_put(PACKET_CB(first)->keypair, false); -+ wg_peer_put(peer); -+ skb_free_null_queue(first); -+} -+ -+void wg_packet_purge_staged_packets(struct wg_peer *peer) -+{ -+ spin_lock_bh(&peer->staged_packet_queue.lock); -+ peer->device->dev->stats.tx_dropped += peer->staged_packet_queue.qlen; -+ __skb_queue_purge(&peer->staged_packet_queue); -+ spin_unlock_bh(&peer->staged_packet_queue.lock); -+} -+ -+void wg_packet_send_staged_packets(struct wg_peer *peer) -+{ -+ struct noise_symmetric_key *key; -+ struct noise_keypair *keypair; -+ struct sk_buff_head packets; -+ struct sk_buff *skb; -+ -+ /* Steal the current queue into our local one. */ -+ __skb_queue_head_init(&packets); -+ spin_lock_bh(&peer->staged_packet_queue.lock); -+ skb_queue_splice_init(&peer->staged_packet_queue, &packets); -+ spin_unlock_bh(&peer->staged_packet_queue.lock); -+ if (unlikely(skb_queue_empty(&packets))) -+ return; -+ -+ /* First we make sure we have a valid reference to a valid key. */ -+ rcu_read_lock_bh(); -+ keypair = wg_noise_keypair_get( -+ rcu_dereference_bh(peer->keypairs.current_keypair)); -+ rcu_read_unlock_bh(); -+ if (unlikely(!keypair)) -+ goto out_nokey; -+ key = &keypair->sending; -+ if (unlikely(!READ_ONCE(key->is_valid))) -+ goto out_nokey; -+ if (unlikely(wg_birthdate_has_expired(key->birthdate, -+ REJECT_AFTER_TIME))) -+ goto out_invalid; -+ -+ /* After we know we have a somewhat valid key, we now try to assign -+ * nonces to all of the packets in the queue. If we can't assign nonces -+ * for all of them, we just consider it a failure and wait for the next -+ * handshake. -+ */ -+ skb_queue_walk(&packets, skb) { -+ /* 0 for no outer TOS: no leak. TODO: at some later point, we -+ * might consider using flowi->tos as outer instead. -+ */ -+ PACKET_CB(skb)->ds = ip_tunnel_ecn_encap(0, ip_hdr(skb), skb); -+ PACKET_CB(skb)->nonce = -+ atomic64_inc_return(&key->counter.counter) - 1; -+ if (unlikely(PACKET_CB(skb)->nonce >= REJECT_AFTER_MESSAGES)) -+ goto out_invalid; -+ } -+ -+ packets.prev->next = NULL; -+ wg_peer_get(keypair->entry.peer); -+ PACKET_CB(packets.next)->keypair = keypair; -+ wg_packet_create_data(packets.next); -+ return; -+ -+out_invalid: -+ WRITE_ONCE(key->is_valid, false); -+out_nokey: -+ wg_noise_keypair_put(keypair, false); -+ -+ /* We orphan the packets if we're waiting on a handshake, so that they -+ * don't block a socket's pool. -+ */ -+ skb_queue_walk(&packets, skb) -+ skb_orphan(skb); -+ /* Then we put them back on the top of the queue. We're not too -+ * concerned about accidentally getting things a little out of order if -+ * packets are being added really fast, because this queue is for before -+ * packets can even be sent and it's small anyway. -+ */ -+ spin_lock_bh(&peer->staged_packet_queue.lock); -+ skb_queue_splice(&packets, &peer->staged_packet_queue); -+ spin_unlock_bh(&peer->staged_packet_queue.lock); -+ -+ /* If we're exiting because there's something wrong with the key, it -+ * means we should initiate a new handshake. -+ */ -+ wg_packet_send_queued_handshake_initiation(peer, false); -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/socket.c 2019-08-20 20:26:42.410341426 +0000 -@@ -0,0 +1,436 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include "device.h" -+#include "peer.h" -+#include "socket.h" -+#include "queueing.h" -+#include "messages.h" -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+static int send4(struct wg_device *wg, struct sk_buff *skb, -+ struct endpoint *endpoint, u8 ds, struct dst_cache *cache) -+{ -+ struct flowi4 fl = { -+ .saddr = endpoint->src4.s_addr, -+ .daddr = endpoint->addr4.sin_addr.s_addr, -+ .fl4_dport = endpoint->addr4.sin_port, -+ .flowi4_mark = wg->fwmark, -+ .flowi4_proto = IPPROTO_UDP -+ }; -+ struct rtable *rt = NULL; -+ struct sock *sock; -+ int ret = 0; -+ -+ skb->next = skb->prev = NULL; -+ skb->dev = wg->dev; -+ skb->mark = wg->fwmark; -+ -+ rcu_read_lock_bh(); -+ sock = rcu_dereference_bh(wg->sock4); -+ -+ if (unlikely(!sock)) { -+ ret = -ENONET; -+ goto err; -+ } -+ -+ fl.fl4_sport = inet_sk(sock)->inet_sport; -+ -+ if (cache) -+ rt = dst_cache_get_ip4(cache, &fl.saddr); -+ -+ if (!rt) { -+ security_sk_classify_flow(sock, flowi4_to_flowi(&fl)); -+ if (unlikely(!inet_confirm_addr(sock_net(sock), NULL, 0, -+ fl.saddr, RT_SCOPE_HOST))) { -+ endpoint->src4.s_addr = 0; -+ *(__force __be32 *)&endpoint->src_if4 = 0; -+ fl.saddr = 0; -+ if (cache) -+ dst_cache_reset(cache); -+ } -+ rt = ip_route_output_flow(sock_net(sock), &fl, sock); -+ if (unlikely(endpoint->src_if4 && ((IS_ERR(rt) && -+ PTR_ERR(rt) == -EINVAL) || (!IS_ERR(rt) && -+ rt->dst.dev->ifindex != endpoint->src_if4)))) { -+ endpoint->src4.s_addr = 0; -+ *(__force __be32 *)&endpoint->src_if4 = 0; -+ fl.saddr = 0; -+ if (cache) -+ dst_cache_reset(cache); -+ if (!IS_ERR(rt)) -+ ip_rt_put(rt); -+ rt = ip_route_output_flow(sock_net(sock), &fl, sock); -+ } -+ if (unlikely(IS_ERR(rt))) { -+ ret = PTR_ERR(rt); -+ net_dbg_ratelimited("%s: No route to %pISpfsc, error %d\n", -+ wg->dev->name, &endpoint->addr, ret); -+ goto err; -+ } else if (unlikely(rt->dst.dev == skb->dev)) { -+ ip_rt_put(rt); -+ ret = -ELOOP; -+ net_dbg_ratelimited("%s: Avoiding routing loop to %pISpfsc\n", -+ wg->dev->name, &endpoint->addr); -+ goto err; -+ } -+ if (cache) -+ dst_cache_set_ip4(cache, &rt->dst, fl.saddr); -+ } -+ -+ skb->ignore_df = 1; -+ udp_tunnel_xmit_skb(rt, sock, skb, fl.saddr, fl.daddr, ds, -+ ip4_dst_hoplimit(&rt->dst), 0, fl.fl4_sport, -+ fl.fl4_dport, false, false); -+ goto out; -+ -+err: -+ kfree_skb(skb); -+out: -+ rcu_read_unlock_bh(); -+ return ret; -+} -+ -+static int send6(struct wg_device *wg, struct sk_buff *skb, -+ struct endpoint *endpoint, u8 ds, struct dst_cache *cache) -+{ -+#if IS_ENABLED(CONFIG_IPV6) -+ struct flowi6 fl = { -+ .saddr = endpoint->src6, -+ .daddr = endpoint->addr6.sin6_addr, -+ .fl6_dport = endpoint->addr6.sin6_port, -+ .flowi6_mark = wg->fwmark, -+ .flowi6_oif = endpoint->addr6.sin6_scope_id, -+ .flowi6_proto = IPPROTO_UDP -+ /* TODO: addr->sin6_flowinfo */ -+ }; -+ struct dst_entry *dst = NULL; -+ struct sock *sock; -+ int ret = 0; -+ -+ skb->next = skb->prev = NULL; -+ skb->dev = wg->dev; -+ skb->mark = wg->fwmark; -+ -+ rcu_read_lock_bh(); -+ sock = rcu_dereference_bh(wg->sock6); -+ -+ if (unlikely(!sock)) { -+ ret = -ENONET; -+ goto err; -+ } -+ -+ fl.fl6_sport = inet_sk(sock)->inet_sport; -+ -+ if (cache) -+ dst = dst_cache_get_ip6(cache, &fl.saddr); -+ -+ if (!dst) { -+ security_sk_classify_flow(sock, flowi6_to_flowi(&fl)); -+ if (unlikely(!ipv6_addr_any(&fl.saddr) && -+ !ipv6_chk_addr(sock_net(sock), &fl.saddr, NULL, 0))) { -+ endpoint->src6 = fl.saddr = in6addr_any; -+ if (cache) -+ dst_cache_reset(cache); -+ } -+ ret = ipv6_stub->ipv6_dst_lookup(sock_net(sock), sock, &dst, -+ &fl); -+ if (unlikely(ret)) { -+ net_dbg_ratelimited("%s: No route to %pISpfsc, error %d\n", -+ wg->dev->name, &endpoint->addr, ret); -+ goto err; -+ } else if (unlikely(dst->dev == skb->dev)) { -+ dst_release(dst); -+ ret = -ELOOP; -+ net_dbg_ratelimited("%s: Avoiding routing loop to %pISpfsc\n", -+ wg->dev->name, &endpoint->addr); -+ goto err; -+ } -+ if (cache) -+ dst_cache_set_ip6(cache, dst, &fl.saddr); -+ } -+ -+ skb->ignore_df = 1; -+ udp_tunnel6_xmit_skb(dst, sock, skb, skb->dev, &fl.saddr, &fl.daddr, ds, -+ ip6_dst_hoplimit(dst), 0, fl.fl6_sport, -+ fl.fl6_dport, false); -+ goto out; -+ -+err: -+ kfree_skb(skb); -+out: -+ rcu_read_unlock_bh(); -+ return ret; -+#else -+ return -EAFNOSUPPORT; -+#endif -+} -+ -+int wg_socket_send_skb_to_peer(struct wg_peer *peer, struct sk_buff *skb, u8 ds) -+{ -+ size_t skb_len = skb->len; -+ int ret = -EAFNOSUPPORT; -+ -+ read_lock_bh(&peer->endpoint_lock); -+ if (peer->endpoint.addr.sa_family == AF_INET) -+ ret = send4(peer->device, skb, &peer->endpoint, ds, -+ &peer->endpoint_cache); -+ else if (peer->endpoint.addr.sa_family == AF_INET6) -+ ret = send6(peer->device, skb, &peer->endpoint, ds, -+ &peer->endpoint_cache); -+ else -+ dev_kfree_skb(skb); -+ if (likely(!ret)) -+ peer->tx_bytes += skb_len; -+ read_unlock_bh(&peer->endpoint_lock); -+ -+ return ret; -+} -+ -+int wg_socket_send_buffer_to_peer(struct wg_peer *peer, void *buffer, -+ size_t len, u8 ds) -+{ -+ struct sk_buff *skb = alloc_skb(len + SKB_HEADER_LEN, GFP_ATOMIC); -+ -+ if (unlikely(!skb)) -+ return -ENOMEM; -+ -+ skb_reserve(skb, SKB_HEADER_LEN); -+ skb_set_inner_network_header(skb, 0); -+ skb_put_data(skb, buffer, len); -+ return wg_socket_send_skb_to_peer(peer, skb, ds); -+} -+ -+int wg_socket_send_buffer_as_reply_to_skb(struct wg_device *wg, -+ struct sk_buff *in_skb, void *buffer, -+ size_t len) -+{ -+ int ret = 0; -+ struct sk_buff *skb; -+ struct endpoint endpoint; -+ -+ if (unlikely(!in_skb)) -+ return -EINVAL; -+ ret = wg_socket_endpoint_from_skb(&endpoint, in_skb); -+ if (unlikely(ret < 0)) -+ return ret; -+ -+ skb = alloc_skb(len + SKB_HEADER_LEN, GFP_ATOMIC); -+ if (unlikely(!skb)) -+ return -ENOMEM; -+ skb_reserve(skb, SKB_HEADER_LEN); -+ skb_set_inner_network_header(skb, 0); -+ skb_put_data(skb, buffer, len); -+ -+ if (endpoint.addr.sa_family == AF_INET) -+ ret = send4(wg, skb, &endpoint, 0, NULL); -+ else if (endpoint.addr.sa_family == AF_INET6) -+ ret = send6(wg, skb, &endpoint, 0, NULL); -+ /* No other possibilities if the endpoint is valid, which it is, -+ * as we checked above. -+ */ -+ -+ return ret; -+} -+ -+int wg_socket_endpoint_from_skb(struct endpoint *endpoint, -+ const struct sk_buff *skb) -+{ -+ memset(endpoint, 0, sizeof(*endpoint)); -+ if (skb->protocol == htons(ETH_P_IP)) { -+ endpoint->addr4.sin_family = AF_INET; -+ endpoint->addr4.sin_port = udp_hdr(skb)->source; -+ endpoint->addr4.sin_addr.s_addr = ip_hdr(skb)->saddr; -+ endpoint->src4.s_addr = ip_hdr(skb)->daddr; -+ endpoint->src_if4 = skb->skb_iif; -+ } else if (skb->protocol == htons(ETH_P_IPV6)) { -+ endpoint->addr6.sin6_family = AF_INET6; -+ endpoint->addr6.sin6_port = udp_hdr(skb)->source; -+ endpoint->addr6.sin6_addr = ipv6_hdr(skb)->saddr; -+ endpoint->addr6.sin6_scope_id = ipv6_iface_scope_id( -+ &ipv6_hdr(skb)->saddr, skb->skb_iif); -+ endpoint->src6 = ipv6_hdr(skb)->daddr; -+ } else { -+ return -EINVAL; -+ } -+ return 0; -+} -+ -+static bool endpoint_eq(const struct endpoint *a, const struct endpoint *b) -+{ -+ return (a->addr.sa_family == AF_INET && b->addr.sa_family == AF_INET && -+ a->addr4.sin_port == b->addr4.sin_port && -+ a->addr4.sin_addr.s_addr == b->addr4.sin_addr.s_addr && -+ a->src4.s_addr == b->src4.s_addr && a->src_if4 == b->src_if4) || -+ (a->addr.sa_family == AF_INET6 && -+ b->addr.sa_family == AF_INET6 && -+ a->addr6.sin6_port == b->addr6.sin6_port && -+ ipv6_addr_equal(&a->addr6.sin6_addr, &b->addr6.sin6_addr) && -+ a->addr6.sin6_scope_id == b->addr6.sin6_scope_id && -+ ipv6_addr_equal(&a->src6, &b->src6)) || -+ unlikely(!a->addr.sa_family && !b->addr.sa_family); -+} -+ -+void wg_socket_set_peer_endpoint(struct wg_peer *peer, -+ const struct endpoint *endpoint) -+{ -+ /* First we check unlocked, in order to optimize, since it's pretty rare -+ * that an endpoint will change. If we happen to be mid-write, and two -+ * CPUs wind up writing the same thing or something slightly different, -+ * it doesn't really matter much either. -+ */ -+ if (endpoint_eq(endpoint, &peer->endpoint)) -+ return; -+ write_lock_bh(&peer->endpoint_lock); -+ if (endpoint->addr.sa_family == AF_INET) { -+ peer->endpoint.addr4 = endpoint->addr4; -+ peer->endpoint.src4 = endpoint->src4; -+ peer->endpoint.src_if4 = endpoint->src_if4; -+ } else if (endpoint->addr.sa_family == AF_INET6) { -+ peer->endpoint.addr6 = endpoint->addr6; -+ peer->endpoint.src6 = endpoint->src6; -+ } else { -+ goto out; -+ } -+ dst_cache_reset(&peer->endpoint_cache); -+out: -+ write_unlock_bh(&peer->endpoint_lock); -+} -+ -+void wg_socket_set_peer_endpoint_from_skb(struct wg_peer *peer, -+ const struct sk_buff *skb) -+{ -+ struct endpoint endpoint; -+ -+ if (!wg_socket_endpoint_from_skb(&endpoint, skb)) -+ wg_socket_set_peer_endpoint(peer, &endpoint); -+} -+ -+void wg_socket_clear_peer_endpoint_src(struct wg_peer *peer) -+{ -+ write_lock_bh(&peer->endpoint_lock); -+ memset(&peer->endpoint.src6, 0, sizeof(peer->endpoint.src6)); -+ dst_cache_reset(&peer->endpoint_cache); -+ write_unlock_bh(&peer->endpoint_lock); -+} -+ -+static int wg_receive(struct sock *sk, struct sk_buff *skb) -+{ -+ struct wg_device *wg; -+ -+ if (unlikely(!sk)) -+ goto err; -+ wg = sk->sk_user_data; -+ if (unlikely(!wg)) -+ goto err; -+ wg_packet_receive(wg, skb); -+ return 0; -+ -+err: -+ kfree_skb(skb); -+ return 0; -+} -+ -+static void sock_free(struct sock *sock) -+{ -+ if (unlikely(!sock)) -+ return; -+ sk_clear_memalloc(sock); -+ udp_tunnel_sock_release(sock->sk_socket); -+} -+ -+static void set_sock_opts(struct socket *sock) -+{ -+ sock->sk->sk_allocation = GFP_ATOMIC; -+ sock->sk->sk_sndbuf = INT_MAX; -+ sk_set_memalloc(sock->sk); -+} -+ -+int wg_socket_init(struct wg_device *wg, u16 port) -+{ -+ int ret; -+ struct udp_tunnel_sock_cfg cfg = { -+ .sk_user_data = wg, -+ .encap_type = 1, -+ .encap_rcv = wg_receive -+ }; -+ struct socket *new4 = NULL, *new6 = NULL; -+ struct udp_port_cfg port4 = { -+ .family = AF_INET, -+ .local_ip.s_addr = htonl(INADDR_ANY), -+ .local_udp_port = htons(port), -+ .use_udp_checksums = true -+ }; -+#if IS_ENABLED(CONFIG_IPV6) -+ int retries = 0; -+ struct udp_port_cfg port6 = { -+ .family = AF_INET6, -+ .local_ip6 = IN6ADDR_ANY_INIT, -+ .use_udp6_tx_checksums = true, -+ .use_udp6_rx_checksums = true, -+ .ipv6_v6only = true -+ }; -+#endif -+ -+#if IS_ENABLED(CONFIG_IPV6) -+retry: -+#endif -+ -+ ret = udp_sock_create(wg->creating_net, &port4, &new4); -+ if (ret < 0) { -+ pr_err("%s: Could not create IPv4 socket\n", wg->dev->name); -+ return ret; -+ } -+ set_sock_opts(new4); -+ setup_udp_tunnel_sock(wg->creating_net, new4, &cfg); -+ -+#if IS_ENABLED(CONFIG_IPV6) -+ if (ipv6_mod_enabled()) { -+ port6.local_udp_port = inet_sk(new4->sk)->inet_sport; -+ ret = udp_sock_create(wg->creating_net, &port6, &new6); -+ if (ret < 0) { -+ udp_tunnel_sock_release(new4); -+ if (ret == -EADDRINUSE && !port && retries++ < 100) -+ goto retry; -+ pr_err("%s: Could not create IPv6 socket\n", -+ wg->dev->name); -+ return ret; -+ } -+ set_sock_opts(new6); -+ setup_udp_tunnel_sock(wg->creating_net, new6, &cfg); -+ } -+#endif -+ -+ wg_socket_reinit(wg, new4 ? new4->sk : NULL, new6 ? new6->sk : NULL); -+ return 0; -+} -+ -+void wg_socket_reinit(struct wg_device *wg, struct sock *new4, -+ struct sock *new6) -+{ -+ struct sock *old4, *old6; -+ -+ mutex_lock(&wg->socket_update_lock); -+ old4 = rcu_dereference_protected(wg->sock4, -+ lockdep_is_held(&wg->socket_update_lock)); -+ old6 = rcu_dereference_protected(wg->sock6, -+ lockdep_is_held(&wg->socket_update_lock)); -+ rcu_assign_pointer(wg->sock4, new4); -+ rcu_assign_pointer(wg->sock6, new6); -+ if (new4) -+ wg->incoming_port = ntohs(inet_sk(new4)->inet_sport); -+ mutex_unlock(&wg->socket_update_lock); -+ synchronize_rcu(); -+ synchronize_net(); -+ sock_free(old4); -+ sock_free(old6); -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/timers.c 2019-08-20 20:26:42.412341426 +0000 -@@ -0,0 +1,243 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include "timers.h" -+#include "device.h" -+#include "peer.h" -+#include "queueing.h" -+#include "socket.h" -+ -+/* -+ * - Timer for retransmitting the handshake if we don't hear back after -+ * `REKEY_TIMEOUT + jitter` ms. -+ * -+ * - Timer for sending empty packet if we have received a packet but after have -+ * not sent one for `KEEPALIVE_TIMEOUT` ms. -+ * -+ * - Timer for initiating new handshake if we have sent a packet but after have -+ * not received one (even empty) for `(KEEPALIVE_TIMEOUT + REKEY_TIMEOUT) + -+ * jitter` ms. -+ * -+ * - Timer for zeroing out all ephemeral keys after `(REJECT_AFTER_TIME * 3)` ms -+ * if no new keys have been received. -+ * -+ * - Timer for, if enabled, sending an empty authenticated packet every user- -+ * specified seconds. -+ */ -+ -+static inline void mod_peer_timer(struct wg_peer *peer, -+ struct timer_list *timer, -+ unsigned long expires) -+{ -+ rcu_read_lock_bh(); -+ if (likely(netif_running(peer->device->dev) && -+ !READ_ONCE(peer->is_dead))) -+ mod_timer(timer, expires); -+ rcu_read_unlock_bh(); -+} -+ -+static void wg_expired_retransmit_handshake(struct timer_list *timer) -+{ -+ struct wg_peer *peer = from_timer(peer, timer, -+ timer_retransmit_handshake); -+ -+ if (peer->timer_handshake_attempts > MAX_TIMER_HANDSHAKES) { -+ pr_debug("%s: Handshake for peer %llu (%pISpfsc) did not complete after %d attempts, giving up\n", -+ peer->device->dev->name, peer->internal_id, -+ &peer->endpoint.addr, MAX_TIMER_HANDSHAKES + 2); -+ -+ del_timer(&peer->timer_send_keepalive); -+ /* We drop all packets without a keypair and don't try again, -+ * if we try unsuccessfully for too long to make a handshake. -+ */ -+ wg_packet_purge_staged_packets(peer); -+ -+ /* We set a timer for destroying any residue that might be left -+ * of a partial exchange. -+ */ -+ if (!timer_pending(&peer->timer_zero_key_material)) -+ mod_peer_timer(peer, &peer->timer_zero_key_material, -+ jiffies + REJECT_AFTER_TIME * 3 * HZ); -+ } else { -+ ++peer->timer_handshake_attempts; -+ pr_debug("%s: Handshake for peer %llu (%pISpfsc) did not complete after %d seconds, retrying (try %d)\n", -+ peer->device->dev->name, peer->internal_id, -+ &peer->endpoint.addr, REKEY_TIMEOUT, -+ peer->timer_handshake_attempts + 1); -+ -+ /* We clear the endpoint address src address, in case this is -+ * the cause of trouble. -+ */ -+ wg_socket_clear_peer_endpoint_src(peer); -+ -+ wg_packet_send_queued_handshake_initiation(peer, true); -+ } -+} -+ -+static void wg_expired_send_keepalive(struct timer_list *timer) -+{ -+ struct wg_peer *peer = from_timer(peer, timer, timer_send_keepalive); -+ -+ wg_packet_send_keepalive(peer); -+ if (peer->timer_need_another_keepalive) { -+ peer->timer_need_another_keepalive = false; -+ mod_peer_timer(peer, &peer->timer_send_keepalive, -+ jiffies + KEEPALIVE_TIMEOUT * HZ); -+ } -+} -+ -+static void wg_expired_new_handshake(struct timer_list *timer) -+{ -+ struct wg_peer *peer = from_timer(peer, timer, timer_new_handshake); -+ -+ pr_debug("%s: Retrying handshake with peer %llu (%pISpfsc) because we stopped hearing back after %d seconds\n", -+ peer->device->dev->name, peer->internal_id, -+ &peer->endpoint.addr, KEEPALIVE_TIMEOUT + REKEY_TIMEOUT); -+ /* We clear the endpoint address src address, in case this is the cause -+ * of trouble. -+ */ -+ wg_socket_clear_peer_endpoint_src(peer); -+ wg_packet_send_queued_handshake_initiation(peer, false); -+} -+ -+static void wg_expired_zero_key_material(struct timer_list *timer) -+{ -+ struct wg_peer *peer = from_timer(peer, timer, timer_zero_key_material); -+ -+ rcu_read_lock_bh(); -+ if (!READ_ONCE(peer->is_dead)) { -+ wg_peer_get(peer); -+ if (!queue_work(peer->device->handshake_send_wq, -+ &peer->clear_peer_work)) -+ /* If the work was already on the queue, we want to drop -+ * the extra reference. -+ */ -+ wg_peer_put(peer); -+ } -+ rcu_read_unlock_bh(); -+} -+ -+static void wg_queued_expired_zero_key_material(struct work_struct *work) -+{ -+ struct wg_peer *peer = container_of(work, struct wg_peer, -+ clear_peer_work); -+ -+ pr_debug("%s: Zeroing out all keys for peer %llu (%pISpfsc), since we haven't received a new one in %d seconds\n", -+ peer->device->dev->name, peer->internal_id, -+ &peer->endpoint.addr, REJECT_AFTER_TIME * 3); -+ wg_noise_handshake_clear(&peer->handshake); -+ wg_noise_keypairs_clear(&peer->keypairs); -+ wg_peer_put(peer); -+} -+ -+static void wg_expired_send_persistent_keepalive(struct timer_list *timer) -+{ -+ struct wg_peer *peer = from_timer(peer, timer, -+ timer_persistent_keepalive); -+ -+ if (likely(peer->persistent_keepalive_interval)) -+ wg_packet_send_keepalive(peer); -+} -+ -+/* Should be called after an authenticated data packet is sent. */ -+void wg_timers_data_sent(struct wg_peer *peer) -+{ -+ if (!timer_pending(&peer->timer_new_handshake)) -+ mod_peer_timer(peer, &peer->timer_new_handshake, -+ jiffies + (KEEPALIVE_TIMEOUT + REKEY_TIMEOUT) * HZ + -+ prandom_u32_max(REKEY_TIMEOUT_JITTER_MAX_JIFFIES)); -+} -+ -+/* Should be called after an authenticated data packet is received. */ -+void wg_timers_data_received(struct wg_peer *peer) -+{ -+ if (likely(netif_running(peer->device->dev))) { -+ if (!timer_pending(&peer->timer_send_keepalive)) -+ mod_peer_timer(peer, &peer->timer_send_keepalive, -+ jiffies + KEEPALIVE_TIMEOUT * HZ); -+ else -+ peer->timer_need_another_keepalive = true; -+ } -+} -+ -+/* Should be called after any type of authenticated packet is sent, whether -+ * keepalive, data, or handshake. -+ */ -+void wg_timers_any_authenticated_packet_sent(struct wg_peer *peer) -+{ -+ del_timer(&peer->timer_send_keepalive); -+} -+ -+/* Should be called after any type of authenticated packet is received, whether -+ * keepalive, data, or handshake. -+ */ -+void wg_timers_any_authenticated_packet_received(struct wg_peer *peer) -+{ -+ del_timer(&peer->timer_new_handshake); -+} -+ -+/* Should be called after a handshake initiation message is sent. */ -+void wg_timers_handshake_initiated(struct wg_peer *peer) -+{ -+ mod_peer_timer(peer, &peer->timer_retransmit_handshake, -+ jiffies + REKEY_TIMEOUT * HZ + -+ prandom_u32_max(REKEY_TIMEOUT_JITTER_MAX_JIFFIES)); -+} -+ -+/* Should be called after a handshake response message is received and processed -+ * or when getting key confirmation via the first data message. -+ */ -+void wg_timers_handshake_complete(struct wg_peer *peer) -+{ -+ del_timer(&peer->timer_retransmit_handshake); -+ peer->timer_handshake_attempts = 0; -+ peer->sent_lastminute_handshake = false; -+ ktime_get_real_ts64(&peer->walltime_last_handshake); -+} -+ -+/* Should be called after an ephemeral key is created, which is before sending a -+ * handshake response or after receiving a handshake response. -+ */ -+void wg_timers_session_derived(struct wg_peer *peer) -+{ -+ mod_peer_timer(peer, &peer->timer_zero_key_material, -+ jiffies + REJECT_AFTER_TIME * 3 * HZ); -+} -+ -+/* Should be called before a packet with authentication, whether -+ * keepalive, data, or handshakem is sent, or after one is received. -+ */ -+void wg_timers_any_authenticated_packet_traversal(struct wg_peer *peer) -+{ -+ if (peer->persistent_keepalive_interval) -+ mod_peer_timer(peer, &peer->timer_persistent_keepalive, -+ jiffies + peer->persistent_keepalive_interval * HZ); -+} -+ -+void wg_timers_init(struct wg_peer *peer) -+{ -+ timer_setup(&peer->timer_retransmit_handshake, -+ wg_expired_retransmit_handshake, 0); -+ timer_setup(&peer->timer_send_keepalive, wg_expired_send_keepalive, 0); -+ timer_setup(&peer->timer_new_handshake, wg_expired_new_handshake, 0); -+ timer_setup(&peer->timer_zero_key_material, -+ wg_expired_zero_key_material, 0); -+ timer_setup(&peer->timer_persistent_keepalive, -+ wg_expired_send_persistent_keepalive, 0); -+ INIT_WORK(&peer->clear_peer_work, wg_queued_expired_zero_key_material); -+ peer->timer_handshake_attempts = 0; -+ peer->sent_lastminute_handshake = false; -+ peer->timer_need_another_keepalive = false; -+} -+ -+void wg_timers_stop(struct wg_peer *peer) -+{ -+ del_timer_sync(&peer->timer_retransmit_handshake); -+ del_timer_sync(&peer->timer_send_keepalive); -+ del_timer_sync(&peer->timer_new_handshake); -+ del_timer_sync(&peer->timer_zero_key_material); -+ del_timer_sync(&peer->timer_persistent_keepalive); -+ flush_work(&peer->clear_peer_work); -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/allowedips.h 2019-08-20 20:26:42.392341425 +0000 -@@ -0,0 +1,59 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _WG_ALLOWEDIPS_H -+#define _WG_ALLOWEDIPS_H -+ -+#include -+#include -+#include -+ -+struct wg_peer; -+ -+struct allowedips_node { -+ struct wg_peer __rcu *peer; -+ struct allowedips_node __rcu *bit[2]; -+ /* While it may seem scandalous that we waste space for v4, -+ * we're alloc'ing to the nearest power of 2 anyway, so this -+ * doesn't actually make a difference. -+ */ -+ u8 bits[16] __aligned(__alignof(u64)); -+ u8 cidr, bit_at_a, bit_at_b, bitlen; -+ -+ /* Keep rarely used list at bottom to be beyond cache line. */ -+ union { -+ struct list_head peer_list; -+ struct rcu_head rcu; -+ }; -+}; -+ -+struct allowedips { -+ struct allowedips_node __rcu *root4; -+ struct allowedips_node __rcu *root6; -+ u64 seq; -+}; -+ -+void wg_allowedips_init(struct allowedips *table); -+void wg_allowedips_free(struct allowedips *table, struct mutex *mutex); -+int wg_allowedips_insert_v4(struct allowedips *table, const struct in_addr *ip, -+ u8 cidr, struct wg_peer *peer, struct mutex *lock); -+int wg_allowedips_insert_v6(struct allowedips *table, const struct in6_addr *ip, -+ u8 cidr, struct wg_peer *peer, struct mutex *lock); -+void wg_allowedips_remove_by_peer(struct allowedips *table, -+ struct wg_peer *peer, struct mutex *lock); -+/* The ip input pointer should be __aligned(__alignof(u64))) */ -+int wg_allowedips_read_node(struct allowedips_node *node, u8 ip[16], u8 *cidr); -+ -+/* These return a strong reference to a peer: */ -+struct wg_peer *wg_allowedips_lookup_dst(struct allowedips *table, -+ struct sk_buff *skb); -+struct wg_peer *wg_allowedips_lookup_src(struct allowedips *table, -+ struct sk_buff *skb); -+ -+#ifdef DEBUG -+bool wg_allowedips_selftest(void); -+#endif -+ -+#endif /* _WG_ALLOWEDIPS_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/checksum/checksum_partial_compat.h 2019-08-20 20:26:42.392341425 +0000 -@@ -0,0 +1,208 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#define IP6_MF 0x0001 -+#define IP6_OFFSET 0xFFF8 -+static inline int skb_maybe_pull_tail(struct sk_buff *skb, unsigned int len, unsigned int max) -+{ -+ if (skb_headlen(skb) >= len) -+ return 0; -+ if (max > skb->len) -+ max = skb->len; -+ if (__pskb_pull_tail(skb, max - skb_headlen(skb)) == NULL) -+ return -ENOMEM; -+ if (skb_headlen(skb) < len) -+ return -EPROTO; -+ return 0; -+} -+#define MAX_IP_HDR_LEN 128 -+static inline int skb_checksum_setup_ip(struct sk_buff *skb, bool recalculate) -+{ -+ unsigned int off; -+ bool fragment; -+ int err; -+ fragment = false; -+ err = skb_maybe_pull_tail(skb, sizeof(struct iphdr), MAX_IP_HDR_LEN); -+ if (err < 0) -+ goto out; -+ if (ip_hdr(skb)->frag_off & htons(IP_OFFSET | IP_MF)) -+ fragment = true; -+ off = ip_hdrlen(skb); -+ err = -EPROTO; -+ if (fragment) -+ goto out; -+ switch (ip_hdr(skb)->protocol) { -+ case IPPROTO_TCP: -+ err = skb_maybe_pull_tail(skb, -+ off + sizeof(struct tcphdr), -+ MAX_IP_HDR_LEN); -+ if (err < 0) -+ goto out; -+ -+ if (!skb_partial_csum_set(skb, off, -+ offsetof(struct tcphdr, check))) { -+ err = -EPROTO; -+ goto out; -+ } -+ -+ if (recalculate) -+ tcp_hdr(skb)->check = -+ ~csum_tcpudp_magic(ip_hdr(skb)->saddr, -+ ip_hdr(skb)->daddr, -+ skb->len - off, -+ IPPROTO_TCP, 0); -+ break; -+ case IPPROTO_UDP: -+ err = skb_maybe_pull_tail(skb, -+ off + sizeof(struct udphdr), -+ MAX_IP_HDR_LEN); -+ if (err < 0) -+ goto out; -+ -+ if (!skb_partial_csum_set(skb, off, -+ offsetof(struct udphdr, check))) { -+ err = -EPROTO; -+ goto out; -+ } -+ -+ if (recalculate) -+ udp_hdr(skb)->check = -+ ~csum_tcpudp_magic(ip_hdr(skb)->saddr, -+ ip_hdr(skb)->daddr, -+ skb->len - off, -+ IPPROTO_UDP, 0); -+ break; -+ default: -+ goto out; -+ } -+ err = 0; -+out: -+ return err; -+} -+#define MAX_IPV6_HDR_LEN 256 -+#define OPT_HDR(type, skb, off) \ -+ (type *)(skb_network_header(skb) + (off)) -+static inline int skb_checksum_setup_ipv6(struct sk_buff *skb, bool recalculate) -+{ -+ int err; -+ u8 nexthdr; -+ unsigned int off; -+ unsigned int len; -+ bool fragment; -+ bool done; -+ fragment = false; -+ done = false; -+ off = sizeof(struct ipv6hdr); -+ err = skb_maybe_pull_tail(skb, off, MAX_IPV6_HDR_LEN); -+ if (err < 0) -+ goto out; -+ nexthdr = ipv6_hdr(skb)->nexthdr; -+ len = sizeof(struct ipv6hdr) + ntohs(ipv6_hdr(skb)->payload_len); -+ while (off <= len && !done) { -+ switch (nexthdr) { -+ case IPPROTO_DSTOPTS: -+ case IPPROTO_HOPOPTS: -+ case IPPROTO_ROUTING: { -+ struct ipv6_opt_hdr *hp; -+ -+ err = skb_maybe_pull_tail(skb, off + sizeof(struct ipv6_opt_hdr), MAX_IPV6_HDR_LEN); -+ if (err < 0) -+ goto out; -+ hp = OPT_HDR(struct ipv6_opt_hdr, skb, off); -+ nexthdr = hp->nexthdr; -+ off += ipv6_optlen(hp); -+ break; -+ } -+ case IPPROTO_FRAGMENT: { -+ struct frag_hdr *hp; -+ err = skb_maybe_pull_tail(skb, off + sizeof(struct frag_hdr), MAX_IPV6_HDR_LEN); -+ if (err < 0) -+ goto out; -+ hp = OPT_HDR(struct frag_hdr, skb, off); -+ if (hp->frag_off & htons(IP6_OFFSET | IP6_MF)) -+ fragment = true; -+ nexthdr = hp->nexthdr; -+ off += sizeof(struct frag_hdr); -+ break; -+ } -+ default: -+ done = true; -+ break; -+ } -+ } -+ err = -EPROTO; -+ if (!done || fragment) -+ goto out; -+ switch (nexthdr) { -+ case IPPROTO_TCP: -+ err = skb_maybe_pull_tail(skb, -+ off + sizeof(struct tcphdr), -+ MAX_IPV6_HDR_LEN); -+ if (err < 0) -+ goto out; -+ -+ if (!skb_partial_csum_set(skb, off, -+ offsetof(struct tcphdr, check))) { -+ err = -EPROTO; -+ goto out; -+ } -+ -+ if (recalculate) -+ tcp_hdr(skb)->check = -+ ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, -+ &ipv6_hdr(skb)->daddr, -+ skb->len - off, -+ IPPROTO_TCP, 0); -+ break; -+ case IPPROTO_UDP: -+ err = skb_maybe_pull_tail(skb, -+ off + sizeof(struct udphdr), -+ MAX_IPV6_HDR_LEN); -+ if (err < 0) -+ goto out; -+ -+ if (!skb_partial_csum_set(skb, off, -+ offsetof(struct udphdr, check))) { -+ err = -EPROTO; -+ goto out; -+ } -+ -+ if (recalculate) -+ udp_hdr(skb)->check = -+ ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, -+ &ipv6_hdr(skb)->daddr, -+ skb->len - off, -+ IPPROTO_UDP, 0); -+ break; -+ default: -+ goto out; -+ } -+ err = 0; -+out: -+ return err; -+} -+static inline int skb_checksum_setup(struct sk_buff *skb, bool recalculate) -+{ -+ int err; -+ switch (skb->protocol) { -+ case htons(ETH_P_IP): -+ err = skb_checksum_setup_ip(skb, recalculate); -+ break; -+ -+ case htons(ETH_P_IPV6): -+ err = skb_checksum_setup_ipv6(skb, recalculate); -+ break; -+ default: -+ err = -EPROTO; -+ break; -+ } -+ return err; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/compat-asm.h 2019-08-20 20:26:42.392341425 +0000 -@@ -0,0 +1,43 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _WG_COMPATASM_H -+#define _WG_COMPATASM_H -+ -+#include -+#include -+#include -+ -+/* PaX compatibility */ -+#if defined(RAP_PLUGIN) -+#undef ENTRY -+#define ENTRY RAP_ENTRY -+#endif -+ -+#if defined(__LINUX_ARM_ARCH__) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) -+ .irp c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo -+ .macro ret\c, reg -+#if __LINUX_ARM_ARCH__ < 6 -+ mov\c pc, \reg -+#else -+ .ifeqs "\reg", "lr" -+ bx\c \reg -+ .else -+ mov\c pc, \reg -+ .endif -+#endif -+ .endm -+ .endr -+#endif -+ -+#if defined(__LINUX_ARM_ARCH__) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0) -+#include -+#define lspush push -+#define lspull pull -+#undef push -+#undef pull -+#endif -+ -+#endif /* _WG_COMPATASM_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/compat.h 2019-08-20 20:26:42.393341425 +0000 -@@ -0,0 +1,915 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _WG_COMPAT_H -+#define _WG_COMPAT_H -+ -+#include -+#include -+#include -+#include -+ -+#ifdef RHEL_MAJOR -+#if RHEL_MAJOR == 7 -+#define ISRHEL7 -+#elif RHEL_MAJOR == 8 -+#define ISRHEL8 -+#endif -+#endif -+#ifdef UTS_UBUNTU_RELEASE_ABI -+#if LINUX_VERSION_CODE == KERNEL_VERSION(3, 13, 11) -+#define ISUBUNTU1404 -+#endif -+#endif -+#ifdef CONFIG_SUSE_KERNEL -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0) -+#define ISOPENSUSE42 -+#endif -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) -+#define ISOPENSUSE15 -+#endif -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) -+#error "WireGuard requires Linux >= 3.10" -+#endif -+ -+#if defined(ISRHEL7) -+#include -+#define headers_end headers_start -+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) -+#define headers_start data -+#define headers_end data -+#endif -+ -+#include -+#ifndef __ro_after_init -+#define __ro_after_init __read_mostly -+#endif -+ -+#include -+#ifndef READ_ONCE -+#define READ_ONCE ACCESS_ONCE -+#endif -+#ifndef WRITE_ONCE -+#ifdef ACCESS_ONCE_RW -+#define WRITE_ONCE(p, v) (ACCESS_ONCE_RW(p) = (v)) -+#else -+#define WRITE_ONCE(p, v) (ACCESS_ONCE(p) = (v)) -+#endif -+#endif -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) -+#include "udp_tunnel/udp_tunnel_partial_compat.h" -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) && !defined(DEBUG) && defined(net_dbg_ratelimited) -+#undef net_dbg_ratelimited -+#define net_dbg_ratelimited(fmt, ...) do { if (0) no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); } while (0) -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) -+#include -+#ifndef RCU_LOCKDEP_WARN -+#define RCU_LOCKDEP_WARN(cond, message) rcu_lockdep_assert(!(cond), message) -+#endif -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) && !defined(ISRHEL7) -+#define ipv6_dst_lookup(a, b, c, d) ipv6_dst_lookup(b, c, d) -+#endif -+ -+#if (LINUX_VERSION_CODE == KERNEL_VERSION(4, 4, 0) || \ -+ (LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 5) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)) || \ -+ (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 17) && LINUX_VERSION_CODE > KERNEL_VERSION(3, 19, 0)) || \ -+ (LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 27) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)) || \ -+ (LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 8) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)) || \ -+ (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 40) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)) || \ -+ (LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 54))) && !defined(ISUBUNTU1404) -+#include -+#include -+#define IP6_ECN_set_ce(a, b) IP6_ECN_set_ce(b) -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && IS_ENABLED(CONFIG_IPV6) && !defined(ISRHEL7) -+#include -+struct ipv6_stub_type { -+ void *udpv6_encap_enable; -+ int (*ipv6_dst_lookup)(struct sock *sk, struct dst_entry **dst, struct flowi6 *fl6); -+}; -+static const struct ipv6_stub_type ipv6_stub_impl = { -+ .udpv6_encap_enable = (void *)1, -+ .ipv6_dst_lookup = ip6_dst_lookup -+}; -+static const struct ipv6_stub_type *ipv6_stub = &ipv6_stub_impl; -+#endif -+ -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0) && IS_ENABLED(CONFIG_IPV6) && !defined(ISOPENSUSE42) && !defined(ISRHEL7) -+#include -+static inline bool ipv6_mod_enabled(void) -+{ -+ return ipv6_stub != NULL && ipv6_stub->udpv6_encap_enable != NULL; -+} -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) && !defined(ISRHEL7) -+#include -+static inline void skb_reset_tc(struct sk_buff *skb) -+{ -+#ifdef CONFIG_NET_CLS_ACT -+ skb->tc_verd = 0; -+#endif -+} -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) -+#include -+#include -+static inline u32 __compat_get_random_u32(void) -+{ -+ static siphash_key_t key; -+ static u32 counter = 0; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0) -+ static bool has_seeded = false; -+ if (unlikely(!has_seeded)) { -+ get_random_bytes(&key, sizeof(key)); -+ has_seeded = true; -+ } -+#else -+ get_random_once(&key, sizeof(key)); -+#endif -+ return siphash_2u32(counter++, get_random_int(), &key); -+} -+#define get_random_u32 __compat_get_random_u32 -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) && !defined(ISRHEL7) -+static inline void netif_keep_dst(struct net_device *dev) -+{ -+ dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; -+} -+#define COMPAT_CANNOT_USE_CSUM_LEVEL -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) && !defined(ISRHEL7) -+#include -+#ifndef netdev_alloc_pcpu_stats -+#define pcpu_sw_netstats pcpu_tstats -+#endif -+#ifndef netdev_alloc_pcpu_stats -+#define netdev_alloc_pcpu_stats alloc_percpu -+#endif -+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0) && !defined(ISRHEL7) -+#include -+#ifndef netdev_alloc_pcpu_stats -+#define netdev_alloc_pcpu_stats(type) \ -+({ \ -+ typeof(type) __percpu *pcpu_stats = alloc_percpu(type); \ -+ if (pcpu_stats) { \ -+ int __cpu; \ -+ for_each_possible_cpu(__cpu) { \ -+ typeof(type) *stat; \ -+ stat = per_cpu_ptr(pcpu_stats, __cpu); \ -+ u64_stats_init(&stat->syncp); \ -+ } \ -+ } \ -+ pcpu_stats; \ -+}) -+#endif -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) && !defined(ISRHEL7) -+#include "checksum/checksum_partial_compat.h" -+static inline void *__compat_pskb_put(struct sk_buff *skb, struct sk_buff *tail, int len) -+{ -+ if (tail != skb) { -+ skb->data_len += len; -+ skb->len += len; -+ } -+ return skb_put(tail, len); -+} -+#define pskb_put __compat_pskb_put -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) && !defined(ISRHEL7) -+#include -+static inline void skb_scrub_packet(struct sk_buff *skb, bool xnet) -+{ -+#ifdef CONFIG_CAVIUM_OCTEON_IPFWD_OFFLOAD -+ memset(&skb->cvm_info, 0, sizeof(skb->cvm_info)); -+ skb->cvm_reserved = 0; -+#endif -+ skb->tstamp.tv64 = 0; -+ skb->pkt_type = PACKET_HOST; -+ skb->skb_iif = 0; -+ skb_dst_drop(skb); -+ secpath_reset(skb); -+ nf_reset(skb); -+ nf_reset_trace(skb); -+ if (!xnet) -+ return; -+ skb_orphan(skb); -+ skb->mark = 0; -+} -+#endif -+ -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) || defined(ISUBUNTU1404)) && !defined(ISRHEL7) -+#include -+static inline u32 __compat_prandom_u32_max(u32 ep_ro) -+{ -+ return (u32)(((u64)prandom_u32() * ep_ro) >> 32); -+} -+#define prandom_u32_max __compat_prandom_u32_max -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 75) && !defined(ISRHEL7) -+#ifndef U8_MAX -+#define U8_MAX ((u8)~0U) -+#endif -+#ifndef S8_MAX -+#define S8_MAX ((s8)(U8_MAX >> 1)) -+#endif -+#ifndef S8_MIN -+#define S8_MIN ((s8)(-S8_MAX - 1)) -+#endif -+#ifndef U16_MAX -+#define U16_MAX ((u16)~0U) -+#endif -+#ifndef S16_MAX -+#define S16_MAX ((s16)(U16_MAX >> 1)) -+#endif -+#ifndef S16_MIN -+#define S16_MIN ((s16)(-S16_MAX - 1)) -+#endif -+#ifndef U32_MAX -+#define U32_MAX ((u32)~0U) -+#endif -+#ifndef S32_MAX -+#define S32_MAX ((s32)(U32_MAX >> 1)) -+#endif -+#ifndef S32_MIN -+#define S32_MIN ((s32)(-S32_MAX - 1)) -+#endif -+#ifndef U64_MAX -+#define U64_MAX ((u64)~0ULL) -+#endif -+#ifndef S64_MAX -+#define S64_MAX ((s64)(U64_MAX >> 1)) -+#endif -+#ifndef S64_MIN -+#define S64_MIN ((s64)(-S64_MAX - 1)) -+#endif -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 60) && !defined(ISRHEL7) -+/* Making this static may very well invalidate its usefulness, -+ * but so it goes with compat code. */ -+static inline void memzero_explicit(void *s, size_t count) -+{ -+ memset(s, 0, count); -+ barrier(); -+} -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && !defined(ISRHEL7) -+static const struct in6_addr __compat_in6addr_any = IN6ADDR_ANY_INIT; -+#define in6addr_any __compat_in6addr_any -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) && !defined(ISOPENSUSE15) -+#include -+#include -+#include -+struct rng_initializer { -+ struct completion done; -+ struct random_ready_callback cb; -+}; -+static inline void rng_initialized_callback(struct random_ready_callback *cb) -+{ -+ complete(&container_of(cb, struct rng_initializer, cb)->done); -+} -+static inline int wait_for_random_bytes(void) -+{ -+ static bool rng_is_initialized = false; -+ int ret; -+ if (unlikely(!rng_is_initialized)) { -+ struct rng_initializer rng = { -+ .done = COMPLETION_INITIALIZER(rng.done), -+ .cb = { .owner = THIS_MODULE, .func = rng_initialized_callback } -+ }; -+ ret = add_random_ready_callback(&rng.cb); -+ if (!ret) { -+ ret = wait_for_completion_interruptible(&rng.done); -+ if (ret) { -+ del_random_ready_callback(&rng.cb); -+ return ret; -+ } -+ } else if (ret != -EALREADY) -+ return ret; -+ rng_is_initialized = true; -+ } -+ return 0; -+} -+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0) -+/* This is a disaster. Without this API, we really have no way of -+ * knowing if it's initialized. We just return that it has and hope -+ * for the best... */ -+static inline int wait_for_random_bytes(void) -+{ -+ return 0; -+} -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) -+#include -+#include -+struct rng_is_initialized_callback { -+ struct random_ready_callback cb; -+ atomic_t *rng_state; -+}; -+static inline void rng_is_initialized_callback(struct random_ready_callback *cb) -+{ -+ struct rng_is_initialized_callback *rdy = container_of(cb, struct rng_is_initialized_callback, cb); -+ atomic_set(rdy->rng_state, 2); -+ kfree(rdy); -+} -+static inline bool rng_is_initialized(void) -+{ -+ static atomic_t rng_state = ATOMIC_INIT(0); -+ -+ if (atomic_read(&rng_state) == 2) -+ return true; -+ -+ if (atomic_cmpxchg(&rng_state, 0, 1) == 0) { -+ int ret; -+ struct rng_is_initialized_callback *rdy = kmalloc(sizeof(*rdy), GFP_ATOMIC); -+ if (!rdy) { -+ atomic_set(&rng_state, 0); -+ return false; -+ } -+ rdy->cb.owner = THIS_MODULE; -+ rdy->cb.func = rng_is_initialized_callback; -+ rdy->rng_state = &rng_state; -+ ret = add_random_ready_callback(&rdy->cb); -+ if (ret) -+ kfree(rdy); -+ if (ret == -EALREADY) { -+ atomic_set(&rng_state, 2); -+ return true; -+ } else if (ret) -+ atomic_set(&rng_state, 0); -+ return false; -+ } -+ return false; -+} -+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0) -+/* This is a disaster. Without this API, we really have no way of -+ * knowing if it's initialized. We just return that it has and hope -+ * for the best... */ -+static inline bool rng_is_initialized(void) -+{ -+ return true; -+} -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && !defined(ISOPENSUSE15) -+static inline int get_random_bytes_wait(void *buf, int nbytes) -+{ -+ int ret = wait_for_random_bytes(); -+ if (unlikely(ret)) -+ return ret; -+ get_random_bytes(buf, nbytes); -+ return 0; -+} -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) && !defined(ISRHEL7) -+#define system_power_efficient_wq system_unbound_wq -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 0) -+#include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) -+#include -+#ifndef ktime_get_real_ts64 -+#define timespec64 timespec -+#define ktime_get_real_ts64 ktime_get_real_ts -+#endif -+#else -+#include -+#endif -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) -+static inline u64 __compat_jiffies64_to_nsecs(u64 j) -+{ -+#if !(NSEC_PER_SEC % HZ) -+ return (NSEC_PER_SEC / HZ) * j; -+#else -+ return div_u64(j * HZ_TO_USEC_NUM, HZ_TO_USEC_DEN) * 1000; -+#endif -+} -+#define jiffies64_to_nsecs __compat_jiffies64_to_nsecs -+#endif -+static inline u64 ktime_get_coarse_boottime_ns(void) -+{ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) -+ return ktime_to_ns(ktime_get_boottime()); -+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 12) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)) || LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 53) -+ return ktime_to_ns(ktime_mono_to_any(ns_to_ktime(jiffies64_to_nsecs(get_jiffies_64())), TK_OFFS_BOOT)); -+#else -+ return ktime_to_ns(ktime_get_coarse_boottime()); -+#endif -+} -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) -+#include -+static inline __be32 __compat_confirm_addr_indev(struct in_device *in_dev, __be32 dst, __be32 local, int scope) -+{ -+ int same = 0; -+ __be32 addr = 0; -+ for_ifa(in_dev) { -+ if (!addr && (local == ifa->ifa_local || !local) && ifa->ifa_scope <= scope) { -+ addr = ifa->ifa_local; -+ if (same) -+ break; -+ } -+ if (!same) { -+ same = (!local || inet_ifa_match(local, ifa)) && (!dst || inet_ifa_match(dst, ifa)); -+ if (same && addr) { -+ if (local || !dst) -+ break; -+ if (inet_ifa_match(addr, ifa)) -+ break; -+ if (ifa->ifa_scope <= scope) { -+ addr = ifa->ifa_local; -+ break; -+ } -+ same = 0; -+ } -+ } -+ } endfor_ifa(in_dev); -+ return same ? addr : 0; -+} -+static inline __be32 __compat_inet_confirm_addr(struct net *net, struct in_device *in_dev, __be32 dst, __be32 local, int scope) -+{ -+ __be32 addr = 0; -+ struct net_device *dev; -+ if (in_dev) -+ return __compat_confirm_addr_indev(in_dev, dst, local, scope); -+ rcu_read_lock(); -+ for_each_netdev_rcu(net, dev) { -+ in_dev = __in_dev_get_rcu(dev); -+ if (in_dev) { -+ addr = __compat_confirm_addr_indev(in_dev, dst, local, scope); -+ if (addr) -+ break; -+ } -+ } -+ rcu_read_unlock(); -+ return addr; -+} -+#define inet_confirm_addr __compat_inet_confirm_addr -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0) -+#include -+#include -+#include -+static inline void *__compat_kvmalloc(size_t size, gfp_t flags) -+{ -+ gfp_t kmalloc_flags = flags; -+ void *ret; -+ if (size > PAGE_SIZE) { -+ kmalloc_flags |= __GFP_NOWARN; -+ if (!(kmalloc_flags & __GFP_REPEAT) || (size <= PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER)) -+ kmalloc_flags |= __GFP_NORETRY; -+ } -+ ret = kmalloc(size, kmalloc_flags); -+ if (ret || size <= PAGE_SIZE) -+ return ret; -+ return __vmalloc(size, flags, PAGE_KERNEL); -+} -+static inline void *__compat_kvzalloc(size_t size, gfp_t flags) -+{ -+ return __compat_kvmalloc(size, flags | __GFP_ZERO); -+} -+#define kvmalloc __compat_kvmalloc -+#define kvzalloc __compat_kvzalloc -+#endif -+ -+#if ((LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)) || LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 41)) && !defined(ISUBUNTU1404) -+#include -+#include -+static inline void __compat_kvfree(const void *addr) -+{ -+ if (is_vmalloc_addr(addr)) -+ vfree(addr); -+ else -+ kfree(addr); -+} -+#define kvfree __compat_kvfree -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 9) -+#include -+#define priv_destructor destructor -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && !defined(ISOPENSUSE15) -+#define wg_newlink(a,b,c,d,e) wg_newlink(a,b,c,d) -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0) -+#include -+#include -+#define nlmsg_parse(a, b, c, d, e, f) nlmsg_parse(a, b, c, d, e) -+#define nla_parse_nested(a, b, c, d, e) nla_parse_nested(a, b, c, d) -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) && !defined(ISRHEL7) -+static inline struct nlattr **genl_family_attrbuf(const struct genl_family *family) -+{ -+ return family->attrbuf; -+} -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) -+#define PTR_ERR_OR_ZERO(p) PTR_RET(p) -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0) -+#include -+#define nla_put_u64_64bit(a, b, c, d) nla_put_u64(a, b, c) -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) -+#include -+#ifndef GENL_UNS_ADMIN_PERM -+#define GENL_UNS_ADMIN_PERM GENL_ADMIN_PERM -+#endif -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) && !defined(ISRHEL7) -+#include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) -+#define genl_register_family(a) genl_register_family_with_ops(a, genl_ops, ARRAY_SIZE(genl_ops)) -+#define COMPAT_CANNOT_USE_CONST_GENL_OPS -+#else -+#define genl_register_family(a) genl_register_family_with_ops(a, genl_ops) -+#endif -+#define COMPAT_CANNOT_USE_GENL_NOPS -+#endif -+ -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 2) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 16) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 65) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 101) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) || LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 84) -+#define __COMPAT_NETLINK_DUMP_BLOCK { \ -+ int ret; \ -+ skb->end -= nlmsg_total_size(sizeof(int)); \ -+ ret = wg_get_device_dump_real(skb, cb); \ -+ skb->end += nlmsg_total_size(sizeof(int)); \ -+ return ret; \ -+} -+#define __COMPAT_NETLINK_DUMP_OVERRIDE -+#else -+#define __COMPAT_NETLINK_DUMP_BLOCK return wg_get_device_dump_real(skb, cb); -+#endif -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 8) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 25) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)) || LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 87) -+#define wg_get_device_dump(a, b) wg_get_device_dump_real(a, b); \ -+static int wg_get_device_dump(a, b) { \ -+ struct wg_device *wg = (struct wg_device *)cb->args[0]; \ -+ if (!wg) { \ -+ int ret = wg_get_device_start(cb); \ -+ if (ret) \ -+ return ret; \ -+ } \ -+ __COMPAT_NETLINK_DUMP_BLOCK \ -+} \ -+static int wg_get_device_dump_real(a, b) -+#define COMPAT_CANNOT_USE_NETLINK_START -+#elif defined(__COMPAT_NETLINK_DUMP_OVERRIDE) -+#define wg_get_device_dump(a, b) wg_get_device_dump_real(a, b); \ -+static int wg_get_device_dump(a, b) { \ -+ __COMPAT_NETLINK_DUMP_BLOCK \ -+} \ -+static int wg_get_device_dump_real(a, b) -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) -+#define COMPAT_CANNOT_USE_IN6_DEV_GET -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) -+#define COMPAT_CANNOT_USE_DEV_CNF -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) -+#define COMPAT_CANNOT_USE_IFF_NO_QUEUE -+#endif -+ -+#if defined(CONFIG_X86_64) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0) -+#include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0) -+#include -+#include -+static inline int cpu_has_xfeatures(u64 xfeatures_needed, const char **feature_name) -+{ -+ return boot_cpu_has(X86_FEATURE_XSAVE) && xgetbv(XCR_XFEATURE_ENABLED_MASK) & xfeatures_needed; -+} -+#endif -+#ifndef XFEATURE_MASK_YMM -+#define XFEATURE_MASK_YMM XSTATE_YMM -+#endif -+#ifndef XFEATURE_MASK_SSE -+#define XFEATURE_MASK_SSE XSTATE_SSE -+#endif -+#ifndef XSTATE_AVX512 -+#define XSTATE_AVX512 (XSTATE_OPMASK | XSTATE_ZMM_Hi256 | XSTATE_Hi16_ZMM) -+#endif -+#ifndef XFEATURE_MASK_AVX512 -+#define XFEATURE_MASK_AVX512 XSTATE_AVX512 -+#endif -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) && defined(CONFIG_X86_64) -+/* This is incredibly dumb and reckless, but as it turns out, there's -+ * not really hardware Linux runs properly on that supports F but not BW -+ * and VL, so in practice this isn't so bad. Plus, this is compat layer, -+ * so the bar remains fairly low. -+ */ -+#include -+#ifndef X86_FEATURE_AVX512BW -+#define X86_FEATURE_AVX512BW X86_FEATURE_AVX512F -+#endif -+#ifndef X86_FEATURE_AVX512VL -+#define X86_FEATURE_AVX512VL X86_FEATURE_AVX512F -+#endif -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) -+struct __compat_dummy_container { char dev; }; -+#define netdev_notifier_info net_device *)data); __attribute((unused)) char __compat_dummy_variable = ((struct __compat_dummy_container -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) -+#define timer_setup(a, b, c) setup_timer(a, ((void (*)(unsigned long))b), ((unsigned long)a)) -+#define from_timer(var, callback_timer, timer_fieldname) container_of(callback_timer, typeof(*var), timer_fieldname) -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 3) -+#define COMPAT_CANNOT_USE_AVX512 -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) -+#include -+#define genl_dump_check_consistent(a, b) genl_dump_check_consistent(a, b, &genl_family) -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && !defined(ISRHEL7) && !defined(ISOPENSUSE15) -+static inline void *skb_put_data(struct sk_buff *skb, const void *data, unsigned int len) -+{ -+ void *tmp = skb_put(skb, len); -+ memcpy(tmp, data, len); -+ return tmp; -+} -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) && !defined(ISRHEL7) -+#define napi_complete_done(n, work_done) napi_complete(n) -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) -+#include -+/* NAPI_STATE_SCHED gets set by netif_napi_add anyway, so this is safe. -+ * Also, kernels without NAPI_STATE_NO_BUSY_POLL don't have a call to -+ * napi_hash_add inside of netif_napi_add. -+ */ -+#define NAPI_STATE_NO_BUSY_POLL NAPI_STATE_SCHED -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) -+#include -+#ifndef atomic_read_acquire -+#define atomic_read_acquire(v) ({ int __compat_p1 = atomic_read(v); smp_rmb(); __compat_p1; }) -+#endif -+#ifndef atomic_set_release -+#define atomic_set_release(v, i) ({ smp_wmb(); atomic_set(v, i); }) -+#endif -+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) -+#include -+#ifndef atomic_read_acquire -+#define atomic_read_acquire(v) smp_load_acquire(&(v)->counter) -+#endif -+#ifndef atomic_set_release -+#define atomic_set_release(v, i) smp_store_release(&(v)->counter, (i)) -+#endif -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) -+static inline void le32_to_cpu_array(u32 *buf, unsigned int words) -+{ -+ while (words--) { -+ __le32_to_cpus(buf); -+ buf++; -+ } -+} -+static inline void cpu_to_le32_array(u32 *buf, unsigned int words) -+{ -+ while (words--) { -+ __cpu_to_le32s(buf); -+ buf++; -+ } -+} -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) -+#include -+static inline void crypto_xor_cpy(u8 *dst, const u8 *src1, const u8 *src2, -+ unsigned int size) -+{ -+ if (IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && -+ __builtin_constant_p(size) && -+ (size % sizeof(unsigned long)) == 0) { -+ unsigned long *d = (unsigned long *)dst; -+ unsigned long *s1 = (unsigned long *)src1; -+ unsigned long *s2 = (unsigned long *)src2; -+ -+ while (size > 0) { -+ *d++ = *s1++ ^ *s2++; -+ size -= sizeof(unsigned long); -+ } -+ } else { -+ if (unlikely(dst != src1)) -+ memmove(dst, src1, size); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) -+ crypto_xor(dst, src2, size); -+#else -+ __crypto_xor(dst, src2, size); -+#endif -+ } -+} -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) -+#define read_cpuid_part() read_cpuid_part_number() -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) && !defined(ISRHEL7) -+#define hlist_add_behind(a, b) hlist_add_after(b, a) -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) -+#define totalram_pages() totalram_pages -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0) -+struct __kernel_timespec { -+ int64_t tv_sec, tv_nsec; -+}; -+#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) -+#include -+#ifdef __kernel_timespec -+#undef __kernel_timespec -+struct __kernel_timespec { -+ int64_t tv_sec, tv_nsec; -+}; -+#endif -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0) -+#include -+#ifndef ALIGN_DOWN -+#define ALIGN_DOWN(x, a) __ALIGN_KERNEL((x) - ((a) - 1), (a)) -+#endif -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) -+#include -+#define skb_probe_transport_header(a) skb_probe_transport_header(a, 0) -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) && !defined(ISRHEL7) -+#define ignore_df local_df -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) -+/* Note that all intentional uses of the non-_bh variety need to explicitly -+ * undef these, conditionalized on COMPAT_CANNOT_DEPRECIATE_BH_RCU. -+ */ -+#include -+static __always_inline void old_synchronize_rcu(void) -+{ -+ synchronize_rcu(); -+} -+static __always_inline void old_call_rcu(void *a, void *b) -+{ -+ call_rcu(a, b); -+} -+static __always_inline void old_rcu_barrier(void) -+{ -+ rcu_barrier(); -+} -+#ifdef synchronize_rcu -+#undef synchronize_rcu -+#endif -+#ifdef call_rcu -+#undef call_rcu -+#endif -+#ifdef rcu_barrier -+#undef rcu_barrier -+#endif -+#define synchronize_rcu synchronize_rcu_bh -+#define call_rcu call_rcu_bh -+#define rcu_barrier rcu_barrier_bh -+#define COMPAT_CANNOT_DEPRECIATE_BH_RCU -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 10) && !defined(ISRHEL8) -+static inline void skb_mark_not_on_list(struct sk_buff *skb) -+{ -+ skb->next = NULL; -+} -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0) -+#define NLA_EXACT_LEN NLA_UNSPEC -+#endif -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) -+#define NLA_MIN_LEN NLA_UNSPEC -+#define COMPAT_CANNOT_INDIVIDUAL_NETLINK_OPS_POLICY -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) && defined(__aarch64__) -+#define cpu_have_named_feature(name) (elf_hwcap & (HWCAP_ ## name)) -+#endif -+ -+#ifdef CONFIG_VE -+#include -+#ifdef NETIF_F_VIRTUAL -+#undef NETIF_F_LLTX -+#define NETIF_F_LLTX (__NETIF_F(LLTX) | __NETIF_F(VIRTUAL)) -+#endif -+#endif -+ -+/* https://github.com/ClangBuiltLinux/linux/issues/7 */ -+#if defined( __clang__) && (!defined(CONFIG_CLANG_VERSION) || CONFIG_CLANG_VERSION < 80000) -+#include -+#undef BUILD_BUG_ON -+#define BUILD_BUG_ON(x) -+#endif -+ -+/* https://lkml.kernel.org/r/20170624021727.17835-1-Jason@zx2c4.com */ -+#if IS_ENABLED(CONFIG_NF_CONNTRACK) -+#include -+#include -+#include -+#include -+#include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) -+#include -+#endif -+static inline void new_icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info) -+{ -+ enum ip_conntrack_info ctinfo; -+ struct nf_conn *ct = nf_ct_get(skb_in, &ctinfo); -+ if (skb_network_header(skb_in) < skb_in->head || (skb_network_header(skb_in) + sizeof(struct iphdr)) > skb_tail_pointer(skb_in)) -+ return; -+ if (ct) -+ ip_hdr(skb_in)->saddr = ct->tuplehash[0].tuple.src.u3.ip; -+ icmp_send(skb_in, type, code, info); -+} -+static inline void new_icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info) -+{ -+ enum ip_conntrack_info ctinfo; -+ struct nf_conn *ct = nf_ct_get(skb, &ctinfo); -+ if (skb_network_header(skb) < skb->head || (skb_network_header(skb) + sizeof(struct ipv6hdr)) > skb_tail_pointer(skb)) -+ return; -+ if (ct) -+ ipv6_hdr(skb)->saddr = ct->tuplehash[0].tuple.src.u3.in6; -+ icmpv6_send(skb, type, code, info); -+} -+#define icmp_send(a,b,c,d) new_icmp_send(a,b,c,d) -+#define icmpv6_send(a,b,c,d) new_icmpv6_send(a,b,c,d) -+#endif -+ -+/* PaX compatibility */ -+#ifdef CONSTIFY_PLUGIN -+#include -+#undef __read_mostly -+#define __read_mostly -+#endif -+#if (defined(RAP_PLUGIN) || defined(CONFIG_CFI_CLANG)) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) -+#include -+#define wg_expired_retransmit_handshake(a) wg_expired_retransmit_handshake(unsigned long timer) -+#define wg_expired_send_keepalive(a) wg_expired_send_keepalive(unsigned long timer) -+#define wg_expired_new_handshake(a) wg_expired_new_handshake(unsigned long timer) -+#define wg_expired_zero_key_material(a) wg_expired_zero_key_material(unsigned long timer) -+#define wg_expired_send_persistent_keepalive(a) wg_expired_send_persistent_keepalive(unsigned long timer) -+#undef timer_setup -+#define timer_setup(a, b, c) setup_timer(a, ((void (*)(unsigned long))b), ((unsigned long)a)) -+#undef from_timer -+#define from_timer(var, callback_timer, timer_fieldname) container_of((struct timer_list *)callback_timer, typeof(*var), timer_fieldname) -+#endif -+ -+#endif /* _WG_COMPAT_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/dst_cache/include/net/dst_cache.h 2019-08-20 20:26:42.393341425 +0000 -@@ -0,0 +1,97 @@ -+#ifndef _WG_NET_DST_CACHE_H -+#define _WG_NET_DST_CACHE_H -+ -+#include -+#include -+#if IS_ENABLED(CONFIG_IPV6) -+#include -+#endif -+ -+struct dst_cache { -+ struct dst_cache_pcpu __percpu *cache; -+ unsigned long reset_ts; -+}; -+ -+/** -+ * dst_cache_get - perform cache lookup -+ * @dst_cache: the cache -+ * -+ * The caller should use dst_cache_get_ip4() if it need to retrieve the -+ * source address to be used when xmitting to the cached dst. -+ * local BH must be disabled. -+ */ -+struct dst_entry *dst_cache_get(struct dst_cache *dst_cache); -+ -+/** -+ * dst_cache_get_ip4 - perform cache lookup and fetch ipv4 source address -+ * @dst_cache: the cache -+ * @saddr: return value for the retrieved source address -+ * -+ * local BH must be disabled. -+ */ -+struct rtable *dst_cache_get_ip4(struct dst_cache *dst_cache, __be32 *saddr); -+ -+/** -+ * dst_cache_set_ip4 - store the ipv4 dst into the cache -+ * @dst_cache: the cache -+ * @dst: the entry to be cached -+ * @saddr: the source address to be stored inside the cache -+ * -+ * local BH must be disabled. -+ */ -+void dst_cache_set_ip4(struct dst_cache *dst_cache, struct dst_entry *dst, -+ __be32 saddr); -+ -+#if IS_ENABLED(CONFIG_IPV6) -+ -+/** -+ * dst_cache_set_ip6 - store the ipv6 dst into the cache -+ * @dst_cache: the cache -+ * @dst: the entry to be cached -+ * @saddr: the source address to be stored inside the cache -+ * -+ * local BH must be disabled. -+ */ -+void dst_cache_set_ip6(struct dst_cache *dst_cache, struct dst_entry *dst, -+ const struct in6_addr *addr); -+ -+/** -+ * dst_cache_get_ip6 - perform cache lookup and fetch ipv6 source address -+ * @dst_cache: the cache -+ * @saddr: return value for the retrieved source address -+ * -+ * local BH must be disabled. -+ */ -+struct dst_entry *dst_cache_get_ip6(struct dst_cache *dst_cache, -+ struct in6_addr *saddr); -+#endif -+ -+/** -+ * dst_cache_reset - invalidate the cache contents -+ * @dst_cache: the cache -+ * -+ * This do not free the cached dst to avoid races and contentions. -+ * the dst will be freed on later cache lookup. -+ */ -+static inline void dst_cache_reset(struct dst_cache *dst_cache) -+{ -+ dst_cache->reset_ts = jiffies; -+} -+ -+/** -+ * dst_cache_init - initialize the cache, allocating the required storage -+ * @dst_cache: the cache -+ * @gfp: allocation flags -+ */ -+int dst_cache_init(struct dst_cache *dst_cache, gfp_t gfp); -+ -+/** -+ * dst_cache_destroy - empty the cache and free the allocated storage -+ * @dst_cache: the cache -+ * -+ * No synchronization is enforced: it must be called only when the cache -+ * is unused. -+ */ -+void dst_cache_destroy(struct dst_cache *dst_cache); -+ -+#endif /* _WG_NET_DST_CACHE_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/fpu-x86/include/asm/fpu/api.h 2019-08-20 20:26:42.393341425 +0000 -@@ -0,0 +1 @@ -+#include ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/intel-family-x86/include/asm/intel-family.h 2019-08-20 20:26:42.393341425 +0000 -@@ -0,0 +1,73 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+#ifndef _ASM_X86_INTEL_FAMILY_H -+#define _ASM_X86_INTEL_FAMILY_H -+ -+/* -+ * "Big Core" Processors (Branded as Core, Xeon, etc...) -+ * -+ * The "_X" parts are generally the EP and EX Xeons, or the -+ * "Extreme" ones, like Broadwell-E. -+ * -+ * Things ending in "2" are usually because we have no better -+ * name for them. There's no processor called "SILVERMONT2". -+ */ -+ -+#define INTEL_FAM6_CORE_YONAH 0x0E -+ -+#define INTEL_FAM6_CORE2_MEROM 0x0F -+#define INTEL_FAM6_CORE2_MEROM_L 0x16 -+#define INTEL_FAM6_CORE2_PENRYN 0x17 -+#define INTEL_FAM6_CORE2_DUNNINGTON 0x1D -+ -+#define INTEL_FAM6_NEHALEM 0x1E -+#define INTEL_FAM6_NEHALEM_G 0x1F /* Auburndale / Havendale */ -+#define INTEL_FAM6_NEHALEM_EP 0x1A -+#define INTEL_FAM6_NEHALEM_EX 0x2E -+ -+#define INTEL_FAM6_WESTMERE 0x25 -+#define INTEL_FAM6_WESTMERE_EP 0x2C -+#define INTEL_FAM6_WESTMERE_EX 0x2F -+ -+#define INTEL_FAM6_SANDYBRIDGE 0x2A -+#define INTEL_FAM6_SANDYBRIDGE_X 0x2D -+#define INTEL_FAM6_IVYBRIDGE 0x3A -+#define INTEL_FAM6_IVYBRIDGE_X 0x3E -+ -+#define INTEL_FAM6_HASWELL_CORE 0x3C -+#define INTEL_FAM6_HASWELL_X 0x3F -+#define INTEL_FAM6_HASWELL_ULT 0x45 -+#define INTEL_FAM6_HASWELL_GT3E 0x46 -+ -+#define INTEL_FAM6_BROADWELL_CORE 0x3D -+#define INTEL_FAM6_BROADWELL_GT3E 0x47 -+#define INTEL_FAM6_BROADWELL_X 0x4F -+#define INTEL_FAM6_BROADWELL_XEON_D 0x56 -+ -+#define INTEL_FAM6_SKYLAKE_MOBILE 0x4E -+#define INTEL_FAM6_SKYLAKE_DESKTOP 0x5E -+#define INTEL_FAM6_SKYLAKE_X 0x55 -+#define INTEL_FAM6_KABYLAKE_MOBILE 0x8E -+#define INTEL_FAM6_KABYLAKE_DESKTOP 0x9E -+ -+/* "Small Core" Processors (Atom) */ -+ -+#define INTEL_FAM6_ATOM_PINEVIEW 0x1C -+#define INTEL_FAM6_ATOM_LINCROFT 0x26 -+#define INTEL_FAM6_ATOM_PENWELL 0x27 -+#define INTEL_FAM6_ATOM_CLOVERVIEW 0x35 -+#define INTEL_FAM6_ATOM_CEDARVIEW 0x36 -+#define INTEL_FAM6_ATOM_SILVERMONT1 0x37 /* BayTrail/BYT / Valleyview */ -+#define INTEL_FAM6_ATOM_SILVERMONT2 0x4D /* Avaton/Rangely */ -+#define INTEL_FAM6_ATOM_AIRMONT 0x4C /* CherryTrail / Braswell */ -+#define INTEL_FAM6_ATOM_MERRIFIELD 0x4A /* Tangier */ -+#define INTEL_FAM6_ATOM_MOOREFIELD 0x5A /* Anniedale */ -+#define INTEL_FAM6_ATOM_GOLDMONT 0x5C -+#define INTEL_FAM6_ATOM_DENVERTON 0x5F /* Goldmont Microserver */ -+#define INTEL_FAM6_ATOM_GEMINI_LAKE 0x7A -+ -+/* Xeon Phi */ -+ -+#define INTEL_FAM6_XEON_PHI_KNL 0x57 /* Knights Landing */ -+#define INTEL_FAM6_XEON_PHI_KNM 0x85 /* Knights Mill */ -+ -+#endif /* _ASM_X86_INTEL_FAMILY_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/memneq/include.h 2018-06-02 16:21:38.100389985 +0000 -@@ -0,0 +1,5 @@ -+extern noinline unsigned long __crypto_memneq(const void *a, const void *b, size_t size); -+static inline int crypto_memneq(const void *a, const void *b, size_t size) -+{ -+ return __crypto_memneq(a, b, size) != 0UL ? 1 : 0; -+} ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/neon-arm/include/asm/neon.h 2019-08-20 20:26:42.393341425 +0000 -@@ -0,0 +1,7 @@ -+#ifndef _ARCH_ARM_ASM_NEON -+#define _ARCH_ARM_ASM_NEON -+#define kernel_neon_begin() \ -+ BUILD_BUG_ON_MSG(1, "This kernel does not support ARM NEON") -+#define kernel_neon_end() \ -+ BUILD_BUG_ON_MSG(1, "This kernel does not support ARM NEON") -+#endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/ptr_ring/include/linux/ptr_ring.h 2018-06-02 16:21:38.101389944 +0000 -@@ -0,0 +1,640 @@ -+/* -+ * Definitions for the 'struct ptr_ring' datastructure. -+ * -+ * Author: -+ * Michael S. Tsirkin -+ * -+ * Copyright (C) 2016 Red Hat, Inc. -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by the -+ * Free Software Foundation; either version 2 of the License, or (at your -+ * option) any later version. -+ * -+ * This is a limited-size FIFO maintaining pointers in FIFO order, with -+ * one CPU producing entries and another consuming entries from a FIFO. -+ * -+ * This implementation tries to minimize cache-contention when there is a -+ * single producer and a single consumer CPU. -+ */ -+ -+#ifndef _LINUX_PTR_RING_H -+#define _LINUX_PTR_RING_H 1 -+ -+#ifdef __KERNEL__ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#endif -+ -+struct ptr_ring { -+ int producer ____cacheline_aligned_in_smp; -+ spinlock_t producer_lock; -+ int consumer_head ____cacheline_aligned_in_smp; /* next valid entry */ -+ int consumer_tail; /* next entry to invalidate */ -+ spinlock_t consumer_lock; -+ /* Shared consumer/producer data */ -+ /* Read-only by both the producer and the consumer */ -+ int size ____cacheline_aligned_in_smp; /* max entries in queue */ -+ int batch; /* number of entries to consume in a batch */ -+ void **queue; -+}; -+ -+/* Note: callers invoking this in a loop must use a compiler barrier, -+ * for example cpu_relax(). If ring is ever resized, callers must hold -+ * producer_lock - see e.g. ptr_ring_full. Otherwise, if callers don't hold -+ * producer_lock, the next call to __ptr_ring_produce may fail. -+ */ -+static inline bool __ptr_ring_full(struct ptr_ring *r) -+{ -+ return r->queue[r->producer]; -+} -+ -+static inline bool ptr_ring_full(struct ptr_ring *r) -+{ -+ bool ret; -+ -+ spin_lock(&r->producer_lock); -+ ret = __ptr_ring_full(r); -+ spin_unlock(&r->producer_lock); -+ -+ return ret; -+} -+ -+static inline bool ptr_ring_full_irq(struct ptr_ring *r) -+{ -+ bool ret; -+ -+ spin_lock_irq(&r->producer_lock); -+ ret = __ptr_ring_full(r); -+ spin_unlock_irq(&r->producer_lock); -+ -+ return ret; -+} -+ -+static inline bool ptr_ring_full_any(struct ptr_ring *r) -+{ -+ unsigned long flags; -+ bool ret; -+ -+ spin_lock_irqsave(&r->producer_lock, flags); -+ ret = __ptr_ring_full(r); -+ spin_unlock_irqrestore(&r->producer_lock, flags); -+ -+ return ret; -+} -+ -+static inline bool ptr_ring_full_bh(struct ptr_ring *r) -+{ -+ bool ret; -+ -+ spin_lock_bh(&r->producer_lock); -+ ret = __ptr_ring_full(r); -+ spin_unlock_bh(&r->producer_lock); -+ -+ return ret; -+} -+ -+/* Note: callers invoking this in a loop must use a compiler barrier, -+ * for example cpu_relax(). Callers must hold producer_lock. -+ */ -+static inline int __ptr_ring_produce(struct ptr_ring *r, void *ptr) -+{ -+ if (unlikely(!r->size) || r->queue[r->producer]) -+ return -ENOSPC; -+ -+ r->queue[r->producer++] = ptr; -+ if (unlikely(r->producer >= r->size)) -+ r->producer = 0; -+ return 0; -+} -+ -+/* -+ * Note: resize (below) nests producer lock within consumer lock, so if you -+ * consume in interrupt or BH context, you must disable interrupts/BH when -+ * calling this. -+ */ -+static inline int ptr_ring_produce(struct ptr_ring *r, void *ptr) -+{ -+ int ret; -+ -+ spin_lock(&r->producer_lock); -+ ret = __ptr_ring_produce(r, ptr); -+ spin_unlock(&r->producer_lock); -+ -+ return ret; -+} -+ -+static inline int ptr_ring_produce_irq(struct ptr_ring *r, void *ptr) -+{ -+ int ret; -+ -+ spin_lock_irq(&r->producer_lock); -+ ret = __ptr_ring_produce(r, ptr); -+ spin_unlock_irq(&r->producer_lock); -+ -+ return ret; -+} -+ -+static inline int ptr_ring_produce_any(struct ptr_ring *r, void *ptr) -+{ -+ unsigned long flags; -+ int ret; -+ -+ spin_lock_irqsave(&r->producer_lock, flags); -+ ret = __ptr_ring_produce(r, ptr); -+ spin_unlock_irqrestore(&r->producer_lock, flags); -+ -+ return ret; -+} -+ -+static inline int ptr_ring_produce_bh(struct ptr_ring *r, void *ptr) -+{ -+ int ret; -+ -+ spin_lock_bh(&r->producer_lock); -+ ret = __ptr_ring_produce(r, ptr); -+ spin_unlock_bh(&r->producer_lock); -+ -+ return ret; -+} -+ -+/* Note: callers invoking this in a loop must use a compiler barrier, -+ * for example cpu_relax(). Callers must take consumer_lock -+ * if they dereference the pointer - see e.g. PTR_RING_PEEK_CALL. -+ * If ring is never resized, and if the pointer is merely -+ * tested, there's no need to take the lock - see e.g. __ptr_ring_empty. -+ */ -+static inline void *__ptr_ring_peek(struct ptr_ring *r) -+{ -+ if (likely(r->size)) -+ return r->queue[r->consumer_head]; -+ return NULL; -+} -+ -+/* Note: callers invoking this in a loop must use a compiler barrier, -+ * for example cpu_relax(). Callers must take consumer_lock -+ * if the ring is ever resized - see e.g. ptr_ring_empty. -+ */ -+static inline bool __ptr_ring_empty(struct ptr_ring *r) -+{ -+ return !__ptr_ring_peek(r); -+} -+ -+static inline bool ptr_ring_empty(struct ptr_ring *r) -+{ -+ bool ret; -+ -+ spin_lock(&r->consumer_lock); -+ ret = __ptr_ring_empty(r); -+ spin_unlock(&r->consumer_lock); -+ -+ return ret; -+} -+ -+static inline bool ptr_ring_empty_irq(struct ptr_ring *r) -+{ -+ bool ret; -+ -+ spin_lock_irq(&r->consumer_lock); -+ ret = __ptr_ring_empty(r); -+ spin_unlock_irq(&r->consumer_lock); -+ -+ return ret; -+} -+ -+static inline bool ptr_ring_empty_any(struct ptr_ring *r) -+{ -+ unsigned long flags; -+ bool ret; -+ -+ spin_lock_irqsave(&r->consumer_lock, flags); -+ ret = __ptr_ring_empty(r); -+ spin_unlock_irqrestore(&r->consumer_lock, flags); -+ -+ return ret; -+} -+ -+static inline bool ptr_ring_empty_bh(struct ptr_ring *r) -+{ -+ bool ret; -+ -+ spin_lock_bh(&r->consumer_lock); -+ ret = __ptr_ring_empty(r); -+ spin_unlock_bh(&r->consumer_lock); -+ -+ return ret; -+} -+ -+/* Must only be called after __ptr_ring_peek returned !NULL */ -+static inline void __ptr_ring_discard_one(struct ptr_ring *r) -+{ -+ /* Fundamentally, what we want to do is update consumer -+ * index and zero out the entry so producer can reuse it. -+ * Doing it naively at each consume would be as simple as: -+ * r->queue[r->consumer++] = NULL; -+ * if (unlikely(r->consumer >= r->size)) -+ * r->consumer = 0; -+ * but that is suboptimal when the ring is full as producer is writing -+ * out new entries in the same cache line. Defer these updates until a -+ * batch of entries has been consumed. -+ */ -+ int head = r->consumer_head++; -+ -+ /* Once we have processed enough entries invalidate them in -+ * the ring all at once so producer can reuse their space in the ring. -+ * We also do this when we reach end of the ring - not mandatory -+ * but helps keep the implementation simple. -+ */ -+ if (unlikely(r->consumer_head - r->consumer_tail >= r->batch || -+ r->consumer_head >= r->size)) { -+ /* Zero out entries in the reverse order: this way we touch the -+ * cache line that producer might currently be reading the last; -+ * producer won't make progress and touch other cache lines -+ * besides the first one until we write out all entries. -+ */ -+ while (likely(head >= r->consumer_tail)) -+ r->queue[head--] = NULL; -+ r->consumer_tail = r->consumer_head; -+ } -+ if (unlikely(r->consumer_head >= r->size)) { -+ r->consumer_head = 0; -+ r->consumer_tail = 0; -+ } -+} -+ -+static inline void *__ptr_ring_consume(struct ptr_ring *r) -+{ -+ void *ptr; -+ -+ ptr = __ptr_ring_peek(r); -+ if (ptr) -+ __ptr_ring_discard_one(r); -+ -+ return ptr; -+} -+ -+static inline int __ptr_ring_consume_batched(struct ptr_ring *r, -+ void **array, int n) -+{ -+ void *ptr; -+ int i; -+ -+ for (i = 0; i < n; i++) { -+ ptr = __ptr_ring_consume(r); -+ if (!ptr) -+ break; -+ array[i] = ptr; -+ } -+ -+ return i; -+} -+ -+/* -+ * Note: resize (below) nests producer lock within consumer lock, so if you -+ * call this in interrupt or BH context, you must disable interrupts/BH when -+ * producing. -+ */ -+static inline void *ptr_ring_consume(struct ptr_ring *r) -+{ -+ void *ptr; -+ -+ spin_lock(&r->consumer_lock); -+ ptr = __ptr_ring_consume(r); -+ spin_unlock(&r->consumer_lock); -+ -+ return ptr; -+} -+ -+static inline void *ptr_ring_consume_irq(struct ptr_ring *r) -+{ -+ void *ptr; -+ -+ spin_lock_irq(&r->consumer_lock); -+ ptr = __ptr_ring_consume(r); -+ spin_unlock_irq(&r->consumer_lock); -+ -+ return ptr; -+} -+ -+static inline void *ptr_ring_consume_any(struct ptr_ring *r) -+{ -+ unsigned long flags; -+ void *ptr; -+ -+ spin_lock_irqsave(&r->consumer_lock, flags); -+ ptr = __ptr_ring_consume(r); -+ spin_unlock_irqrestore(&r->consumer_lock, flags); -+ -+ return ptr; -+} -+ -+static inline void *ptr_ring_consume_bh(struct ptr_ring *r) -+{ -+ void *ptr; -+ -+ spin_lock_bh(&r->consumer_lock); -+ ptr = __ptr_ring_consume(r); -+ spin_unlock_bh(&r->consumer_lock); -+ -+ return ptr; -+} -+ -+static inline int ptr_ring_consume_batched(struct ptr_ring *r, -+ void **array, int n) -+{ -+ int ret; -+ -+ spin_lock(&r->consumer_lock); -+ ret = __ptr_ring_consume_batched(r, array, n); -+ spin_unlock(&r->consumer_lock); -+ -+ return ret; -+} -+ -+static inline int ptr_ring_consume_batched_irq(struct ptr_ring *r, -+ void **array, int n) -+{ -+ int ret; -+ -+ spin_lock_irq(&r->consumer_lock); -+ ret = __ptr_ring_consume_batched(r, array, n); -+ spin_unlock_irq(&r->consumer_lock); -+ -+ return ret; -+} -+ -+static inline int ptr_ring_consume_batched_any(struct ptr_ring *r, -+ void **array, int n) -+{ -+ unsigned long flags; -+ int ret; -+ -+ spin_lock_irqsave(&r->consumer_lock, flags); -+ ret = __ptr_ring_consume_batched(r, array, n); -+ spin_unlock_irqrestore(&r->consumer_lock, flags); -+ -+ return ret; -+} -+ -+static inline int ptr_ring_consume_batched_bh(struct ptr_ring *r, -+ void **array, int n) -+{ -+ int ret; -+ -+ spin_lock_bh(&r->consumer_lock); -+ ret = __ptr_ring_consume_batched(r, array, n); -+ spin_unlock_bh(&r->consumer_lock); -+ -+ return ret; -+} -+ -+/* Cast to structure type and call a function without discarding from FIFO. -+ * Function must return a value. -+ * Callers must take consumer_lock. -+ */ -+#define __PTR_RING_PEEK_CALL(r, f) ((f)(__ptr_ring_peek(r))) -+ -+#define PTR_RING_PEEK_CALL(r, f) ({ \ -+ typeof((f)(NULL)) __PTR_RING_PEEK_CALL_v; \ -+ \ -+ spin_lock(&(r)->consumer_lock); \ -+ __PTR_RING_PEEK_CALL_v = __PTR_RING_PEEK_CALL(r, f); \ -+ spin_unlock(&(r)->consumer_lock); \ -+ __PTR_RING_PEEK_CALL_v; \ -+}) -+ -+#define PTR_RING_PEEK_CALL_IRQ(r, f) ({ \ -+ typeof((f)(NULL)) __PTR_RING_PEEK_CALL_v; \ -+ \ -+ spin_lock_irq(&(r)->consumer_lock); \ -+ __PTR_RING_PEEK_CALL_v = __PTR_RING_PEEK_CALL(r, f); \ -+ spin_unlock_irq(&(r)->consumer_lock); \ -+ __PTR_RING_PEEK_CALL_v; \ -+}) -+ -+#define PTR_RING_PEEK_CALL_BH(r, f) ({ \ -+ typeof((f)(NULL)) __PTR_RING_PEEK_CALL_v; \ -+ \ -+ spin_lock_bh(&(r)->consumer_lock); \ -+ __PTR_RING_PEEK_CALL_v = __PTR_RING_PEEK_CALL(r, f); \ -+ spin_unlock_bh(&(r)->consumer_lock); \ -+ __PTR_RING_PEEK_CALL_v; \ -+}) -+ -+#define PTR_RING_PEEK_CALL_ANY(r, f) ({ \ -+ typeof((f)(NULL)) __PTR_RING_PEEK_CALL_v; \ -+ unsigned long __PTR_RING_PEEK_CALL_f;\ -+ \ -+ spin_lock_irqsave(&(r)->consumer_lock, __PTR_RING_PEEK_CALL_f); \ -+ __PTR_RING_PEEK_CALL_v = __PTR_RING_PEEK_CALL(r, f); \ -+ spin_unlock_irqrestore(&(r)->consumer_lock, __PTR_RING_PEEK_CALL_f); \ -+ __PTR_RING_PEEK_CALL_v; \ -+}) -+ -+static inline void **__ptr_ring_init_queue_alloc(unsigned int size, gfp_t gfp) -+{ -+ return kcalloc(size, sizeof(void *), gfp); -+} -+ -+static inline void __ptr_ring_set_size(struct ptr_ring *r, int size) -+{ -+ r->size = size; -+ r->batch = SMP_CACHE_BYTES * 2 / sizeof(*(r->queue)); -+ /* We need to set batch at least to 1 to make logic -+ * in __ptr_ring_discard_one work correctly. -+ * Batching too much (because ring is small) would cause a lot of -+ * burstiness. Needs tuning, for now disable batching. -+ */ -+ if (r->batch > r->size / 2 || !r->batch) -+ r->batch = 1; -+} -+ -+static inline int ptr_ring_init(struct ptr_ring *r, int size, gfp_t gfp) -+{ -+ r->queue = __ptr_ring_init_queue_alloc(size, gfp); -+ if (!r->queue) -+ return -ENOMEM; -+ -+ __ptr_ring_set_size(r, size); -+ r->producer = r->consumer_head = r->consumer_tail = 0; -+ spin_lock_init(&r->producer_lock); -+ spin_lock_init(&r->consumer_lock); -+ -+ return 0; -+} -+ -+/* -+ * Return entries into ring. Destroy entries that don't fit. -+ * -+ * Note: this is expected to be a rare slow path operation. -+ * -+ * Note: producer lock is nested within consumer lock, so if you -+ * resize you must make sure all uses nest correctly. -+ * In particular if you consume ring in interrupt or BH context, you must -+ * disable interrupts/BH when doing so. -+ */ -+static inline void ptr_ring_unconsume(struct ptr_ring *r, void **batch, int n, -+ void (*destroy)(void *)) -+{ -+ unsigned long flags; -+ int head; -+ -+ spin_lock_irqsave(&r->consumer_lock, flags); -+ spin_lock(&r->producer_lock); -+ -+ if (!r->size) -+ goto done; -+ -+ /* -+ * Clean out buffered entries (for simplicity). This way following code -+ * can test entries for NULL and if not assume they are valid. -+ */ -+ head = r->consumer_head - 1; -+ while (likely(head >= r->consumer_tail)) -+ r->queue[head--] = NULL; -+ r->consumer_tail = r->consumer_head; -+ -+ /* -+ * Go over entries in batch, start moving head back and copy entries. -+ * Stop when we run into previously unconsumed entries. -+ */ -+ while (n) { -+ head = r->consumer_head - 1; -+ if (head < 0) -+ head = r->size - 1; -+ if (r->queue[head]) { -+ /* This batch entry will have to be destroyed. */ -+ goto done; -+ } -+ r->queue[head] = batch[--n]; -+ r->consumer_tail = r->consumer_head = head; -+ } -+ -+done: -+ /* Destroy all entries left in the batch. */ -+ while (n) -+ destroy(batch[--n]); -+ spin_unlock(&r->producer_lock); -+ spin_unlock_irqrestore(&r->consumer_lock, flags); -+} -+ -+static inline void **__ptr_ring_swap_queue(struct ptr_ring *r, void **queue, -+ int size, gfp_t gfp, -+ void (*destroy)(void *)) -+{ -+ int producer = 0; -+ void **old; -+ void *ptr; -+ -+ while ((ptr = __ptr_ring_consume(r))) -+ if (producer < size) -+ queue[producer++] = ptr; -+ else if (destroy) -+ destroy(ptr); -+ -+ __ptr_ring_set_size(r, size); -+ r->producer = producer; -+ r->consumer_head = 0; -+ r->consumer_tail = 0; -+ old = r->queue; -+ r->queue = queue; -+ -+ return old; -+} -+ -+/* -+ * Note: producer lock is nested within consumer lock, so if you -+ * resize you must make sure all uses nest correctly. -+ * In particular if you consume ring in interrupt or BH context, you must -+ * disable interrupts/BH when doing so. -+ */ -+static inline int ptr_ring_resize(struct ptr_ring *r, int size, gfp_t gfp, -+ void (*destroy)(void *)) -+{ -+ unsigned long flags; -+ void **queue = __ptr_ring_init_queue_alloc(size, gfp); -+ void **old; -+ -+ if (!queue) -+ return -ENOMEM; -+ -+ spin_lock_irqsave(&(r)->consumer_lock, flags); -+ spin_lock(&(r)->producer_lock); -+ -+ old = __ptr_ring_swap_queue(r, queue, size, gfp, destroy); -+ -+ spin_unlock(&(r)->producer_lock); -+ spin_unlock_irqrestore(&(r)->consumer_lock, flags); -+ -+ kfree(old); -+ -+ return 0; -+} -+ -+/* -+ * Note: producer lock is nested within consumer lock, so if you -+ * resize you must make sure all uses nest correctly. -+ * In particular if you consume ring in interrupt or BH context, you must -+ * disable interrupts/BH when doing so. -+ */ -+static inline int ptr_ring_resize_multiple(struct ptr_ring **rings, -+ unsigned int nrings, -+ int size, -+ gfp_t gfp, void (*destroy)(void *)) -+{ -+ unsigned long flags; -+ void ***queues; -+ int i; -+ -+ queues = kmalloc_array(nrings, sizeof(*queues), gfp); -+ if (!queues) -+ goto noqueues; -+ -+ for (i = 0; i < nrings; ++i) { -+ queues[i] = __ptr_ring_init_queue_alloc(size, gfp); -+ if (!queues[i]) -+ goto nomem; -+ } -+ -+ for (i = 0; i < nrings; ++i) { -+ spin_lock_irqsave(&(rings[i])->consumer_lock, flags); -+ spin_lock(&(rings[i])->producer_lock); -+ queues[i] = __ptr_ring_swap_queue(rings[i], queues[i], -+ size, gfp, destroy); -+ spin_unlock(&(rings[i])->producer_lock); -+ spin_unlock_irqrestore(&(rings[i])->consumer_lock, flags); -+ } -+ -+ for (i = 0; i < nrings; ++i) -+ kfree(queues[i]); -+ -+ kfree(queues); -+ -+ return 0; -+ -+nomem: -+ while (--i >= 0) -+ kfree(queues[i]); -+ -+ kfree(queues); -+ -+noqueues: -+ return -ENOMEM; -+} -+ -+static inline void ptr_ring_cleanup(struct ptr_ring *r, void (*destroy)(void *)) -+{ -+ void *ptr; -+ -+ if (destroy) -+ while ((ptr = ptr_ring_consume(r))) -+ destroy(ptr); -+ kfree(r->queue); -+} -+ -+#endif /* _LINUX_PTR_RING_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/simd-asm/include/asm/simd.h 2019-08-20 20:26:42.393341425 +0000 -@@ -0,0 +1,21 @@ -+#ifndef _COMPAT_ASM_SIMD_H -+#define _COMPAT_ASM_SIMD_H -+ -+#if defined(CONFIG_X86_64) -+#include -+#endif -+ -+static __must_check inline bool may_use_simd(void) -+{ -+#if defined(CONFIG_X86_64) -+ return irq_fpu_usable(); -+#elif defined(CONFIG_ARM64) && defined(CONFIG_KERNEL_MODE_NEON) -+ return true; -+#elif defined(CONFIG_ARM) && defined(CONFIG_KERNEL_MODE_NEON) -+ return !in_nmi() && !in_irq() && !in_serving_softirq(); -+#else -+ return false; -+#endif -+} -+ -+#endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/simd/include/linux/simd.h 2019-08-20 20:26:42.394341425 +0000 -@@ -0,0 +1,70 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _WG_SIMD_H -+#define _WG_SIMD_H -+ -+#include -+#include -+#if defined(CONFIG_X86_64) -+#include -+#include -+#elif defined(CONFIG_KERNEL_MODE_NEON) -+#include -+#endif -+ -+typedef enum { -+ HAVE_NO_SIMD = 1 << 0, -+ HAVE_FULL_SIMD = 1 << 1, -+ HAVE_SIMD_IN_USE = 1 << 31 -+} simd_context_t; -+ -+#define DONT_USE_SIMD ((simd_context_t []){ HAVE_NO_SIMD }) -+ -+static inline void simd_get(simd_context_t *ctx) -+{ -+ *ctx = !IS_ENABLED(CONFIG_PREEMPT_RT_BASE) && may_use_simd() ? HAVE_FULL_SIMD : HAVE_NO_SIMD; -+} -+ -+static inline void simd_put(simd_context_t *ctx) -+{ -+#if defined(CONFIG_X86_64) -+ if (*ctx & HAVE_SIMD_IN_USE) -+ kernel_fpu_end(); -+#elif defined(CONFIG_KERNEL_MODE_NEON) -+ if (*ctx & HAVE_SIMD_IN_USE) -+ kernel_neon_end(); -+#endif -+ *ctx = HAVE_NO_SIMD; -+} -+ -+static inline bool simd_relax(simd_context_t *ctx) -+{ -+#ifdef CONFIG_PREEMPT -+ if ((*ctx & HAVE_SIMD_IN_USE) && need_resched()) { -+ simd_put(ctx); -+ simd_get(ctx); -+ return true; -+ } -+#endif -+ return false; -+} -+ -+static __must_check inline bool simd_use(simd_context_t *ctx) -+{ -+ if (!(*ctx & HAVE_FULL_SIMD)) -+ return false; -+ if (*ctx & HAVE_SIMD_IN_USE) -+ return true; -+#if defined(CONFIG_X86_64) -+ kernel_fpu_begin(); -+#elif defined(CONFIG_KERNEL_MODE_NEON) -+ kernel_neon_begin(); -+#endif -+ *ctx |= HAVE_SIMD_IN_USE; -+ return true; -+} -+ -+#endif /* _WG_SIMD_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/siphash/include/linux/siphash.h 2019-08-20 20:26:42.394341425 +0000 -@@ -0,0 +1,140 @@ -+/* Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ * -+ * This file is provided under a dual BSD/GPLv2 license. -+ * -+ * SipHash: a fast short-input PRF -+ * https://131002.net/siphash/ -+ * -+ * This implementation is specifically for SipHash2-4 for a secure PRF -+ * and HalfSipHash1-3/SipHash1-3 for an insecure PRF only suitable for -+ * hashtables. -+ */ -+ -+#ifndef _WG_LINUX_SIPHASH_H -+#define _WG_LINUX_SIPHASH_H -+ -+#include -+#include -+ -+#define SIPHASH_ALIGNMENT __alignof__(u64) -+typedef struct { -+ u64 key[2]; -+} siphash_key_t; -+ -+u64 __siphash_aligned(const void *data, size_t len, const siphash_key_t *key); -+#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS -+u64 __siphash_unaligned(const void *data, size_t len, const siphash_key_t *key); -+#endif -+ -+u64 siphash_1u64(const u64 a, const siphash_key_t *key); -+u64 siphash_2u64(const u64 a, const u64 b, const siphash_key_t *key); -+u64 siphash_3u64(const u64 a, const u64 b, const u64 c, -+ const siphash_key_t *key); -+u64 siphash_4u64(const u64 a, const u64 b, const u64 c, const u64 d, -+ const siphash_key_t *key); -+u64 siphash_1u32(const u32 a, const siphash_key_t *key); -+u64 siphash_3u32(const u32 a, const u32 b, const u32 c, -+ const siphash_key_t *key); -+ -+static inline u64 siphash_2u32(const u32 a, const u32 b, -+ const siphash_key_t *key) -+{ -+ return siphash_1u64((u64)b << 32 | a, key); -+} -+static inline u64 siphash_4u32(const u32 a, const u32 b, const u32 c, -+ const u32 d, const siphash_key_t *key) -+{ -+ return siphash_2u64((u64)b << 32 | a, (u64)d << 32 | c, key); -+} -+ -+ -+static inline u64 ___siphash_aligned(const __le64 *data, size_t len, -+ const siphash_key_t *key) -+{ -+ if (__builtin_constant_p(len) && len == 4) -+ return siphash_1u32(le32_to_cpup((const __le32 *)data), key); -+ if (__builtin_constant_p(len) && len == 8) -+ return siphash_1u64(le64_to_cpu(data[0]), key); -+ if (__builtin_constant_p(len) && len == 16) -+ return siphash_2u64(le64_to_cpu(data[0]), le64_to_cpu(data[1]), -+ key); -+ if (__builtin_constant_p(len) && len == 24) -+ return siphash_3u64(le64_to_cpu(data[0]), le64_to_cpu(data[1]), -+ le64_to_cpu(data[2]), key); -+ if (__builtin_constant_p(len) && len == 32) -+ return siphash_4u64(le64_to_cpu(data[0]), le64_to_cpu(data[1]), -+ le64_to_cpu(data[2]), le64_to_cpu(data[3]), -+ key); -+ return __siphash_aligned(data, len, key); -+} -+ -+/** -+ * siphash - compute 64-bit siphash PRF value -+ * @data: buffer to hash -+ * @size: size of @data -+ * @key: the siphash key -+ */ -+static inline u64 siphash(const void *data, size_t len, -+ const siphash_key_t *key) -+{ -+#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS -+ if (!IS_ALIGNED((unsigned long)data, SIPHASH_ALIGNMENT)) -+ return __siphash_unaligned(data, len, key); -+#endif -+ return ___siphash_aligned(data, len, key); -+} -+ -+#define HSIPHASH_ALIGNMENT __alignof__(unsigned long) -+typedef struct { -+ unsigned long key[2]; -+} hsiphash_key_t; -+ -+u32 __hsiphash_aligned(const void *data, size_t len, -+ const hsiphash_key_t *key); -+#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS -+u32 __hsiphash_unaligned(const void *data, size_t len, -+ const hsiphash_key_t *key); -+#endif -+ -+u32 hsiphash_1u32(const u32 a, const hsiphash_key_t *key); -+u32 hsiphash_2u32(const u32 a, const u32 b, const hsiphash_key_t *key); -+u32 hsiphash_3u32(const u32 a, const u32 b, const u32 c, -+ const hsiphash_key_t *key); -+u32 hsiphash_4u32(const u32 a, const u32 b, const u32 c, const u32 d, -+ const hsiphash_key_t *key); -+ -+static inline u32 ___hsiphash_aligned(const __le32 *data, size_t len, -+ const hsiphash_key_t *key) -+{ -+ if (__builtin_constant_p(len) && len == 4) -+ return hsiphash_1u32(le32_to_cpu(data[0]), key); -+ if (__builtin_constant_p(len) && len == 8) -+ return hsiphash_2u32(le32_to_cpu(data[0]), le32_to_cpu(data[1]), -+ key); -+ if (__builtin_constant_p(len) && len == 12) -+ return hsiphash_3u32(le32_to_cpu(data[0]), le32_to_cpu(data[1]), -+ le32_to_cpu(data[2]), key); -+ if (__builtin_constant_p(len) && len == 16) -+ return hsiphash_4u32(le32_to_cpu(data[0]), le32_to_cpu(data[1]), -+ le32_to_cpu(data[2]), le32_to_cpu(data[3]), -+ key); -+ return __hsiphash_aligned(data, len, key); -+} -+ -+/** -+ * hsiphash - compute 32-bit hsiphash PRF value -+ * @data: buffer to hash -+ * @size: size of @data -+ * @key: the hsiphash key -+ */ -+static inline u32 hsiphash(const void *data, size_t len, -+ const hsiphash_key_t *key) -+{ -+#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS -+ if (!IS_ALIGNED((unsigned long)data, HSIPHASH_ALIGNMENT)) -+ return __hsiphash_unaligned(data, len, key); -+#endif -+ return ___hsiphash_aligned(data, len, key); -+} -+ -+#endif /* _WG_LINUX_SIPHASH_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/udp_tunnel/include/net/udp_tunnel.h 2018-06-02 16:21:38.101389944 +0000 -@@ -0,0 +1,94 @@ -+#ifndef _WG_NET_UDP_TUNNEL_H -+#define _WG_NET_UDP_TUNNEL_H -+ -+#include -+#include -+ -+#if IS_ENABLED(CONFIG_IPV6) -+#include -+#include -+#endif -+ -+struct udp_port_cfg { -+ u8 family; -+ -+ /* Used only for kernel-created sockets */ -+ union { -+ struct in_addr local_ip; -+#if IS_ENABLED(CONFIG_IPV6) -+ struct in6_addr local_ip6; -+#endif -+ }; -+ -+ union { -+ struct in_addr peer_ip; -+#if IS_ENABLED(CONFIG_IPV6) -+ struct in6_addr peer_ip6; -+#endif -+ }; -+ -+ __be16 local_udp_port; -+ __be16 peer_udp_port; -+ unsigned int use_udp_checksums:1, -+ use_udp6_tx_checksums:1, -+ use_udp6_rx_checksums:1, -+ ipv6_v6only:1; -+}; -+ -+int udp_sock_create4(struct net *net, struct udp_port_cfg *cfg, -+ struct socket **sockp); -+ -+#if IS_ENABLED(CONFIG_IPV6) -+int udp_sock_create6(struct net *net, struct udp_port_cfg *cfg, -+ struct socket **sockp); -+#else -+static inline int udp_sock_create6(struct net *net, struct udp_port_cfg *cfg, -+ struct socket **sockp) -+{ -+ return 0; -+} -+#endif -+ -+static inline int udp_sock_create(struct net *net, -+ struct udp_port_cfg *cfg, -+ struct socket **sockp) -+{ -+ if (cfg->family == AF_INET) -+ return udp_sock_create4(net, cfg, sockp); -+ -+ if (cfg->family == AF_INET6) -+ return udp_sock_create6(net, cfg, sockp); -+ -+ return -EPFNOSUPPORT; -+} -+ -+typedef int (*udp_tunnel_encap_rcv_t)(struct sock *sk, struct sk_buff *skb); -+ -+struct udp_tunnel_sock_cfg { -+ void *sk_user_data; -+ __u8 encap_type; -+ udp_tunnel_encap_rcv_t encap_rcv; -+}; -+ -+/* Setup the given (UDP) sock to receive UDP encapsulated packets */ -+void setup_udp_tunnel_sock(struct net *net, struct socket *sock, -+ struct udp_tunnel_sock_cfg *sock_cfg); -+ -+/* Transmit the skb using UDP encapsulation. */ -+void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb, -+ __be32 src, __be32 dst, __u8 tos, __u8 ttl, -+ __be16 df, __be16 src_port, __be16 dst_port, -+ bool xnet, bool nocheck); -+ -+#if IS_ENABLED(CONFIG_IPV6) -+int udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk, -+ struct sk_buff *skb, -+ struct net_device *dev, struct in6_addr *saddr, -+ struct in6_addr *daddr, -+ __u8 prio, __u8 ttl, __be32 label, -+ __be16 src_port, __be16 dst_port, bool nocheck); -+#endif -+ -+void udp_tunnel_sock_release(struct socket *sock); -+ -+#endif /* _WG_NET_UDP_TUNNEL_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/udp_tunnel/udp_tunnel_partial_compat.h 2019-08-20 20:26:42.394341425 +0000 -@@ -0,0 +1,226 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) -+#define udp_sock_create4 udp_sock_create -+#define udp_sock_create6 udp_sock_create -+#include -+#include -+#include -+#include -+#include -+#include -+#if IS_ENABLED(CONFIG_IPV6) -+#include -+#include -+#include -+#include -+#include -+#endif -+static inline void __compat_fake_destructor(struct sk_buff *skb) -+{ -+} -+typedef int (*udp_tunnel_encap_rcv_t)(struct sock *sk, struct sk_buff *skb); -+struct udp_tunnel_sock_cfg { -+ void *sk_user_data; -+ __u8 encap_type; -+ udp_tunnel_encap_rcv_t encap_rcv; -+}; -+/* This is global so, uh, only one real call site... This is the kind of horrific hack you'd expect to see in compat code. */ -+static udp_tunnel_encap_rcv_t encap_rcv = NULL; -+static void __compat_sk_data_ready(struct sock *sk) -+{ -+ struct sk_buff *skb; -+ while ((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) { -+ skb_orphan(skb); -+ sk_mem_reclaim(sk); -+ encap_rcv(sk, skb); -+ } -+} -+static inline void setup_udp_tunnel_sock(struct net *net, struct socket *sock, -+ struct udp_tunnel_sock_cfg *cfg) -+{ -+ struct sock *sk = sock->sk; -+ inet_sk(sk)->mc_loop = 0; -+ encap_rcv = cfg->encap_rcv; -+ rcu_assign_sk_user_data(sk, cfg->sk_user_data); -+ sk->sk_data_ready = __compat_sk_data_ready; -+} -+static inline void udp_tunnel_sock_release(struct socket *sock) -+{ -+ rcu_assign_sk_user_data(sock->sk, NULL); -+ kernel_sock_shutdown(sock, SHUT_RDWR); -+ sk_release_kernel(sock->sk); -+} -+static inline int udp_tunnel_xmit_skb(struct socket *sock, struct rtable *rt, -+ struct sk_buff *skb, __be32 src, __be32 dst, -+ __u8 tos, __u8 ttl, __be16 df, __be16 src_port, -+ __be16 dst_port, bool xnet) -+{ -+ struct udphdr *uh; -+ __skb_push(skb, sizeof(*uh)); -+ skb_reset_transport_header(skb); -+ uh = udp_hdr(skb); -+ uh->dest = dst_port; -+ uh->source = src_port; -+ uh->len = htons(skb->len); -+ udp_set_csum(sock->sk->sk_no_check_tx, skb, src, dst, skb->len); -+ return iptunnel_xmit(sock->sk, rt, skb, src, dst, IPPROTO_UDP, -+ tos, ttl, df, xnet); -+} -+#if IS_ENABLED(CONFIG_IPV6) -+static inline int udp_tunnel6_xmit_skb(struct socket *sock, struct dst_entry *dst, -+ struct sk_buff *skb, struct net_device *dev, -+ struct in6_addr *saddr, struct in6_addr *daddr, -+ __u8 prio, __u8 ttl, __be16 src_port, -+ __be16 dst_port) -+{ -+ struct udphdr *uh; -+ struct ipv6hdr *ip6h; -+ struct sock *sk = sock->sk; -+ __skb_push(skb, sizeof(*uh)); -+ skb_reset_transport_header(skb); -+ uh = udp_hdr(skb); -+ uh->dest = dst_port; -+ uh->source = src_port; -+ uh->len = htons(skb->len); -+ memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); -+ IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED -+ | IPSKB_REROUTED); -+ skb_dst_set(skb, dst); -+ udp6_set_csum(udp_get_no_check6_tx(sk), skb, &inet6_sk(sk)->saddr, -+ &sk->sk_v6_daddr, skb->len); -+ __skb_push(skb, sizeof(*ip6h)); -+ skb_reset_network_header(skb); -+ ip6h = ipv6_hdr(skb); -+ ip6_flow_hdr(ip6h, prio, htonl(0)); -+ ip6h->payload_len = htons(skb->len); -+ ip6h->nexthdr = IPPROTO_UDP; -+ ip6h->hop_limit = ttl; -+ ip6h->daddr = *daddr; -+ ip6h->saddr = *saddr; -+ ip6tunnel_xmit(skb, dev); -+ return 0; -+} -+#endif -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) -+#include -+#include -+#include -+#include -+#include -+#include -+#define udp_tunnel_xmit_skb(a, b, c, d, e, f, g, h, i, j, k, l) do { struct net_device *dev__ = (c)->dev; int ret__; ret__ = udp_tunnel_xmit_skb((b)->sk_socket, a, c, d, e, f, g, h, i, j, k); if (ret__) iptunnel_xmit_stats(ret__ - 8, &dev__->stats, dev__->tstats); } while (0) -+#if IS_ENABLED(CONFIG_IPV6) -+#define udp_tunnel6_xmit_skb(a, b, c, d, e, f, g, h, i, j, k, l) udp_tunnel6_xmit_skb((b)->sk_socket, a, c, d, e, f, g, h, j, k); -+#endif -+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) -+#include -+#include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) -+static inline void __compat_fake_destructor(struct sk_buff *skb) -+{ -+} -+#endif -+#define udp_tunnel_xmit_skb(a, b, c, d, e, f, g, h, i, j, k, l) do { struct net_device *dev__ = (c)->dev; int ret__; if (!(c)->destructor) (c)->destructor = __compat_fake_destructor; if (!(c)->sk) (c)->sk = (b); ret__ = udp_tunnel_xmit_skb(a, c, d, e, f, g, h, i, j, k, l); if (ret__) iptunnel_xmit_stats(ret__ - 8, &dev__->stats, dev__->tstats); } while (0) -+#if IS_ENABLED(CONFIG_IPV6) -+#define udp_tunnel6_xmit_skb(a, b, c, d, e, f, g, h, i, j, k, l) do { if (!(c)->destructor) (c)->destructor = __compat_fake_destructor; if (!(c)->sk) (c)->sk = (b); udp_tunnel6_xmit_skb(a, c, d, e, f, g, h, j, k, l); } while(0) -+#endif -+#else -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) -+#include -+#include -+#define udp_tunnel_xmit_skb(a, b, c, d, e, f, g, h, i, j, k, l) do { struct net_device *dev__ = (c)->dev; int ret__ = udp_tunnel_xmit_skb(a, b, c, d, e, f, g, h, i, j, k, l); if (ret__) iptunnel_xmit_stats(ret__ - 8, &dev__->stats, dev__->tstats); } while (0) -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) -+#include -+#include -+#define udp_tunnel_xmit_skb(a, b, c, d, e, f, g, h, i, j, k, l) do { struct net_device *dev__ = (c)->dev; int ret__ = udp_tunnel_xmit_skb(a, b, c, d, e, f, g, h, i, j, k, l); iptunnel_xmit_stats(ret__, &dev__->stats, dev__->tstats); } while (0) -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) && IS_ENABLED(CONFIG_IPV6) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) -+#include -+#include -+#define udp_tunnel6_xmit_skb(a, b, c, d, e, f, g, h, i, j, k, l) udp_tunnel6_xmit_skb(a, b, c, d, e, f, g, h, j, k, l) -+#endif -+ -+#endif -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) -+#include -+#include -+#include -+struct __compat_udp_port_cfg { -+ u8 family; -+ union { -+ struct in_addr local_ip; -+#if IS_ENABLED(CONFIG_IPV6) -+ struct in6_addr local_ip6; -+#endif -+ }; -+ union { -+ struct in_addr peer_ip; -+#if IS_ENABLED(CONFIG_IPV6) -+ struct in6_addr peer_ip6; -+#endif -+ }; -+ __be16 local_udp_port; -+ __be16 peer_udp_port; -+ unsigned int use_udp_checksums:1, use_udp6_tx_checksums:1, use_udp6_rx_checksums:1, ipv6_v6only:1; -+}; -+static inline int __maybe_unused __compat_udp_sock_create(struct net *net, struct __compat_udp_port_cfg *cfg, struct socket **sockp) -+{ -+ struct udp_port_cfg old_cfg = { -+ .family = cfg->family, -+ .local_ip = cfg->local_ip, -+#if IS_ENABLED(CONFIG_IPV6) -+ .local_ip6 = cfg->local_ip6, -+#endif -+ .peer_ip = cfg->peer_ip, -+#if IS_ENABLED(CONFIG_IPV6) -+ .peer_ip6 = cfg->peer_ip6, -+#endif -+ .local_udp_port = cfg->local_udp_port, -+ .peer_udp_port = cfg->peer_udp_port, -+ .use_udp_checksums = cfg->use_udp_checksums, -+ .use_udp6_tx_checksums = cfg->use_udp6_tx_checksums, -+ .use_udp6_rx_checksums = cfg->use_udp6_rx_checksums -+ }; -+ if (cfg->family == AF_INET) -+ return udp_sock_create4(net, &old_cfg, sockp); -+ -+#if IS_ENABLED(CONFIG_IPV6) -+ if (cfg->family == AF_INET6) { -+ int ret; -+ int old_bindv6only; -+ struct net *nobns; -+ -+ if (cfg->ipv6_v6only) { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0) -+ nobns = &init_net; -+#else -+ nobns = net; -+#endif -+ /* Since udp_port_cfg only learned of ipv6_v6only in 4.3, we do this horrible -+ * hack here and set the sysctl variable temporarily to something that will -+ * set the right option for us in sock_create. It's super racey! */ -+ old_bindv6only = nobns->ipv6.sysctl.bindv6only; -+ nobns->ipv6.sysctl.bindv6only = 1; -+ } -+ ret = udp_sock_create6(net, &old_cfg, sockp); -+ if (cfg->ipv6_v6only) -+ nobns->ipv6.sysctl.bindv6only = old_bindv6only; -+ return ret; -+ } -+#endif -+ return -EPFNOSUPPORT; -+} -+#define udp_port_cfg __compat_udp_port_cfg -+#define udp_sock_create(a, b, c) __compat_udp_sock_create(a, b, c) -+#endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/cookie.h 2019-08-20 20:26:42.394341425 +0000 -@@ -0,0 +1,59 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _WG_COOKIE_H -+#define _WG_COOKIE_H -+ -+#include "messages.h" -+#include -+ -+struct wg_peer; -+ -+struct cookie_checker { -+ u8 secret[NOISE_HASH_LEN]; -+ u8 cookie_encryption_key[NOISE_SYMMETRIC_KEY_LEN]; -+ u8 message_mac1_key[NOISE_SYMMETRIC_KEY_LEN]; -+ u64 secret_birthdate; -+ struct rw_semaphore secret_lock; -+ struct wg_device *device; -+}; -+ -+struct cookie { -+ u64 birthdate; -+ bool is_valid; -+ u8 cookie[COOKIE_LEN]; -+ bool have_sent_mac1; -+ u8 last_mac1_sent[COOKIE_LEN]; -+ u8 cookie_decryption_key[NOISE_SYMMETRIC_KEY_LEN]; -+ u8 message_mac1_key[NOISE_SYMMETRIC_KEY_LEN]; -+ struct rw_semaphore lock; -+}; -+ -+enum cookie_mac_state { -+ INVALID_MAC, -+ VALID_MAC_BUT_NO_COOKIE, -+ VALID_MAC_WITH_COOKIE_BUT_RATELIMITED, -+ VALID_MAC_WITH_COOKIE -+}; -+ -+void wg_cookie_checker_init(struct cookie_checker *checker, -+ struct wg_device *wg); -+void wg_cookie_checker_precompute_device_keys(struct cookie_checker *checker); -+void wg_cookie_checker_precompute_peer_keys(struct wg_peer *peer); -+void wg_cookie_init(struct cookie *cookie); -+ -+enum cookie_mac_state wg_cookie_validate_packet(struct cookie_checker *checker, -+ struct sk_buff *skb, -+ bool check_cookie); -+void wg_cookie_add_mac_to_packet(void *message, size_t len, -+ struct wg_peer *peer); -+ -+void wg_cookie_message_create(struct message_handshake_cookie *src, -+ struct sk_buff *skb, __le32 index, -+ struct cookie_checker *checker); -+void wg_cookie_message_consume(struct message_handshake_cookie *src, -+ struct wg_device *wg); -+ -+#endif /* _WG_COOKIE_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/include/zinc/blake2s.h 2019-08-20 20:26:42.395341425 +0000 -@@ -0,0 +1,56 @@ -+/* SPDX-License-Identifier: GPL-2.0 OR MIT */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _ZINC_BLAKE2S_H -+#define _ZINC_BLAKE2S_H -+ -+#include -+#include -+#include -+ -+enum blake2s_lengths { -+ BLAKE2S_BLOCK_SIZE = 64, -+ BLAKE2S_HASH_SIZE = 32, -+ BLAKE2S_KEY_SIZE = 32 -+}; -+ -+struct blake2s_state { -+ u32 h[8]; -+ u32 t[2]; -+ u32 f[2]; -+ u8 buf[BLAKE2S_BLOCK_SIZE]; -+ unsigned int buflen; -+ unsigned int outlen; -+}; -+ -+void blake2s_init(struct blake2s_state *state, const size_t outlen); -+void blake2s_init_key(struct blake2s_state *state, const size_t outlen, -+ const void *key, const size_t keylen); -+void blake2s_update(struct blake2s_state *state, const u8 *in, size_t inlen); -+void blake2s_final(struct blake2s_state *state, u8 *out); -+ -+static inline void blake2s(u8 *out, const u8 *in, const u8 *key, -+ const size_t outlen, const size_t inlen, -+ const size_t keylen) -+{ -+ struct blake2s_state state; -+ -+ WARN_ON(IS_ENABLED(DEBUG) && ((!in && inlen > 0) || !out || !outlen || -+ outlen > BLAKE2S_HASH_SIZE || keylen > BLAKE2S_KEY_SIZE || -+ (!key && keylen))); -+ -+ if (keylen) -+ blake2s_init_key(&state, outlen, key, keylen); -+ else -+ blake2s_init(&state, outlen); -+ -+ blake2s_update(&state, in, inlen); -+ blake2s_final(&state, out); -+} -+ -+void blake2s_hmac(u8 *out, const u8 *in, const u8 *key, const size_t outlen, -+ const size_t inlen, const size_t keylen); -+ -+#endif /* _ZINC_BLAKE2S_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/include/zinc/chacha20.h 2019-08-20 20:26:42.395341425 +0000 -@@ -0,0 +1,70 @@ -+/* SPDX-License-Identifier: GPL-2.0 OR MIT */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _ZINC_CHACHA20_H -+#define _ZINC_CHACHA20_H -+ -+#include -+#include -+#include -+#include -+ -+enum chacha20_lengths { -+ CHACHA20_NONCE_SIZE = 16, -+ CHACHA20_KEY_SIZE = 32, -+ CHACHA20_KEY_WORDS = CHACHA20_KEY_SIZE / sizeof(u32), -+ CHACHA20_BLOCK_SIZE = 64, -+ CHACHA20_BLOCK_WORDS = CHACHA20_BLOCK_SIZE / sizeof(u32), -+ HCHACHA20_NONCE_SIZE = CHACHA20_NONCE_SIZE, -+ HCHACHA20_KEY_SIZE = CHACHA20_KEY_SIZE -+}; -+ -+enum chacha20_constants { /* expand 32-byte k */ -+ CHACHA20_CONSTANT_EXPA = 0x61707865U, -+ CHACHA20_CONSTANT_ND_3 = 0x3320646eU, -+ CHACHA20_CONSTANT_2_BY = 0x79622d32U, -+ CHACHA20_CONSTANT_TE_K = 0x6b206574U -+}; -+ -+struct chacha20_ctx { -+ union { -+ u32 state[16]; -+ struct { -+ u32 constant[4]; -+ u32 key[8]; -+ u32 counter[4]; -+ }; -+ }; -+}; -+ -+static inline void chacha20_init(struct chacha20_ctx *ctx, -+ const u8 key[CHACHA20_KEY_SIZE], -+ const u64 nonce) -+{ -+ ctx->constant[0] = CHACHA20_CONSTANT_EXPA; -+ ctx->constant[1] = CHACHA20_CONSTANT_ND_3; -+ ctx->constant[2] = CHACHA20_CONSTANT_2_BY; -+ ctx->constant[3] = CHACHA20_CONSTANT_TE_K; -+ ctx->key[0] = get_unaligned_le32(key + 0); -+ ctx->key[1] = get_unaligned_le32(key + 4); -+ ctx->key[2] = get_unaligned_le32(key + 8); -+ ctx->key[3] = get_unaligned_le32(key + 12); -+ ctx->key[4] = get_unaligned_le32(key + 16); -+ ctx->key[5] = get_unaligned_le32(key + 20); -+ ctx->key[6] = get_unaligned_le32(key + 24); -+ ctx->key[7] = get_unaligned_le32(key + 28); -+ ctx->counter[0] = 0; -+ ctx->counter[1] = 0; -+ ctx->counter[2] = nonce & U32_MAX; -+ ctx->counter[3] = nonce >> 32; -+} -+void chacha20(struct chacha20_ctx *ctx, u8 *dst, const u8 *src, u32 len, -+ simd_context_t *simd_context); -+ -+void hchacha20(u32 derived_key[CHACHA20_KEY_WORDS], -+ const u8 nonce[HCHACHA20_NONCE_SIZE], -+ const u8 key[HCHACHA20_KEY_SIZE], simd_context_t *simd_context); -+ -+#endif /* _ZINC_CHACHA20_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/include/zinc/chacha20poly1305.h 2019-08-20 20:26:42.395341425 +0000 -@@ -0,0 +1,50 @@ -+/* SPDX-License-Identifier: GPL-2.0 OR MIT */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _ZINC_CHACHA20POLY1305_H -+#define _ZINC_CHACHA20POLY1305_H -+ -+#include -+#include -+ -+struct scatterlist; -+ -+enum chacha20poly1305_lengths { -+ XCHACHA20POLY1305_NONCE_SIZE = 24, -+ CHACHA20POLY1305_KEY_SIZE = 32, -+ CHACHA20POLY1305_AUTHTAG_SIZE = 16 -+}; -+ -+void chacha20poly1305_encrypt(u8 *dst, const u8 *src, const size_t src_len, -+ const u8 *ad, const size_t ad_len, -+ const u64 nonce, -+ const u8 key[CHACHA20POLY1305_KEY_SIZE]); -+ -+bool __must_check chacha20poly1305_encrypt_sg( -+ struct scatterlist *dst, struct scatterlist *src, const size_t src_len, -+ const u8 *ad, const size_t ad_len, const u64 nonce, -+ const u8 key[CHACHA20POLY1305_KEY_SIZE], simd_context_t *simd_context); -+ -+bool __must_check -+chacha20poly1305_decrypt(u8 *dst, const u8 *src, const size_t src_len, -+ const u8 *ad, const size_t ad_len, const u64 nonce, -+ const u8 key[CHACHA20POLY1305_KEY_SIZE]); -+ -+bool __must_check chacha20poly1305_decrypt_sg( -+ struct scatterlist *dst, struct scatterlist *src, const size_t src_len, -+ const u8 *ad, const size_t ad_len, const u64 nonce, -+ const u8 key[CHACHA20POLY1305_KEY_SIZE], simd_context_t *simd_context); -+ -+void xchacha20poly1305_encrypt(u8 *dst, const u8 *src, const size_t src_len, -+ const u8 *ad, const size_t ad_len, -+ const u8 nonce[XCHACHA20POLY1305_NONCE_SIZE], -+ const u8 key[CHACHA20POLY1305_KEY_SIZE]); -+ -+bool __must_check xchacha20poly1305_decrypt( -+ u8 *dst, const u8 *src, const size_t src_len, const u8 *ad, -+ const size_t ad_len, const u8 nonce[XCHACHA20POLY1305_NONCE_SIZE], -+ const u8 key[CHACHA20POLY1305_KEY_SIZE]); -+ -+#endif /* _ZINC_CHACHA20POLY1305_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/include/zinc/curve25519.h 2019-08-20 20:26:42.395341425 +0000 -@@ -0,0 +1,28 @@ -+/* SPDX-License-Identifier: GPL-2.0 OR MIT */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _ZINC_CURVE25519_H -+#define _ZINC_CURVE25519_H -+ -+#include -+ -+enum curve25519_lengths { -+ CURVE25519_KEY_SIZE = 32 -+}; -+ -+bool __must_check curve25519(u8 mypublic[CURVE25519_KEY_SIZE], -+ const u8 secret[CURVE25519_KEY_SIZE], -+ const u8 basepoint[CURVE25519_KEY_SIZE]); -+void curve25519_generate_secret(u8 secret[CURVE25519_KEY_SIZE]); -+bool __must_check curve25519_generate_public( -+ u8 pub[CURVE25519_KEY_SIZE], const u8 secret[CURVE25519_KEY_SIZE]); -+ -+static inline void curve25519_clamp_secret(u8 secret[CURVE25519_KEY_SIZE]) -+{ -+ secret[0] &= 248; -+ secret[31] = (secret[31] & 127) | 64; -+} -+ -+#endif /* _ZINC_CURVE25519_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/include/zinc/poly1305.h 2019-08-20 20:26:42.395341425 +0000 -@@ -0,0 +1,31 @@ -+/* SPDX-License-Identifier: GPL-2.0 OR MIT */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _ZINC_POLY1305_H -+#define _ZINC_POLY1305_H -+ -+#include -+#include -+ -+enum poly1305_lengths { -+ POLY1305_BLOCK_SIZE = 16, -+ POLY1305_KEY_SIZE = 32, -+ POLY1305_MAC_SIZE = 16 -+}; -+ -+struct poly1305_ctx { -+ u8 opaque[24 * sizeof(u64)]; -+ u32 nonce[4]; -+ u8 data[POLY1305_BLOCK_SIZE]; -+ size_t num; -+} __aligned(8); -+ -+void poly1305_init(struct poly1305_ctx *ctx, const u8 key[POLY1305_KEY_SIZE]); -+void poly1305_update(struct poly1305_ctx *ctx, const u8 *input, size_t len, -+ simd_context_t *simd_context); -+void poly1305_final(struct poly1305_ctx *ctx, u8 mac[POLY1305_MAC_SIZE], -+ simd_context_t *simd_context); -+ -+#endif /* _ZINC_POLY1305_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc.h 2019-08-20 20:26:42.395341425 +0000 -@@ -0,0 +1,15 @@ -+/* SPDX-License-Identifier: GPL-2.0 OR MIT */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _WG_ZINC_H -+#define _WG_ZINC_H -+ -+int chacha20_mod_init(void); -+int poly1305_mod_init(void); -+int chacha20poly1305_mod_init(void); -+int blake2s_mod_init(void); -+int curve25519_mod_init(void); -+ -+#endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/selftest/run.h 2019-08-20 20:26:42.407341426 +0000 -@@ -0,0 +1,48 @@ -+/* SPDX-License-Identifier: GPL-2.0 OR MIT */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _ZINC_SELFTEST_RUN_H -+#define _ZINC_SELFTEST_RUN_H -+ -+#include -+#include -+#include -+ -+static inline bool selftest_run(const char *name, bool (*selftest)(void), -+ bool *const nobs[], unsigned int nobs_len) -+{ -+ unsigned long set = 0, subset = 0, largest_subset = 0; -+ unsigned int i; -+ -+ BUILD_BUG_ON(!__builtin_constant_p(nobs_len) || -+ nobs_len >= BITS_PER_LONG); -+ -+ if (!IS_ENABLED(CONFIG_ZINC_SELFTEST)) -+ return true; -+ -+ for (i = 0; i < nobs_len; ++i) -+ set |= ((unsigned long)*nobs[i]) << i; -+ -+ do { -+ for (i = 0; i < nobs_len; ++i) -+ *nobs[i] = BIT(i) & subset; -+ if (selftest()) -+ largest_subset = max(subset, largest_subset); -+ else -+ pr_err("%s self-test combination 0x%lx: FAIL\n", name, -+ subset); -+ subset = (subset - set) & set; -+ } while (subset); -+ -+ for (i = 0; i < nobs_len; ++i) -+ *nobs[i] = BIT(i) & largest_subset; -+ -+ if (largest_subset == set) -+ pr_info("%s self-tests: pass\n", name); -+ -+ return !WARN_ON(largest_subset != set); -+} -+ -+#endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/device.h 2019-08-20 20:26:42.407341426 +0000 -@@ -0,0 +1,65 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _WG_DEVICE_H -+#define _WG_DEVICE_H -+ -+#include "noise.h" -+#include "allowedips.h" -+#include "peerlookup.h" -+#include "cookie.h" -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+struct wg_device; -+ -+struct multicore_worker { -+ void *ptr; -+ struct work_struct work; -+}; -+ -+struct crypt_queue { -+ struct ptr_ring ring; -+ union { -+ struct { -+ struct multicore_worker __percpu *worker; -+ int last_cpu; -+ }; -+ struct work_struct work; -+ }; -+}; -+ -+struct wg_device { -+ struct net_device *dev; -+ struct crypt_queue encrypt_queue, decrypt_queue; -+ struct sock __rcu *sock4, *sock6; -+ struct net *creating_net; -+ struct noise_static_identity static_identity; -+ struct workqueue_struct *handshake_receive_wq, *handshake_send_wq; -+ struct workqueue_struct *packet_crypt_wq; -+ struct sk_buff_head incoming_handshakes; -+ int incoming_handshake_cpu; -+ struct multicore_worker __percpu *incoming_handshakes_worker; -+ struct cookie_checker cookie_checker; -+ struct pubkey_hashtable *peer_hashtable; -+ struct index_hashtable *index_hashtable; -+ struct allowedips peer_allowedips; -+ struct mutex device_update_lock, socket_update_lock; -+ struct list_head device_list, peer_list; -+ unsigned int num_peers, device_update_gen; -+ u32 fwmark; -+ u16 incoming_port; -+ bool have_creating_net_ref; -+}; -+ -+int wg_device_init(void); -+void wg_device_uninit(void); -+ -+#endif /* _WG_DEVICE_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/messages.h 2019-08-20 20:26:42.407341426 +0000 -@@ -0,0 +1,128 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _WG_MESSAGES_H -+#define _WG_MESSAGES_H -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+enum noise_lengths { -+ NOISE_PUBLIC_KEY_LEN = CURVE25519_KEY_SIZE, -+ NOISE_SYMMETRIC_KEY_LEN = CHACHA20POLY1305_KEY_SIZE, -+ NOISE_TIMESTAMP_LEN = sizeof(u64) + sizeof(u32), -+ NOISE_AUTHTAG_LEN = CHACHA20POLY1305_AUTHTAG_SIZE, -+ NOISE_HASH_LEN = BLAKE2S_HASH_SIZE -+}; -+ -+#define noise_encrypted_len(plain_len) ((plain_len) + NOISE_AUTHTAG_LEN) -+ -+enum cookie_values { -+ COOKIE_SECRET_MAX_AGE = 2 * 60, -+ COOKIE_SECRET_LATENCY = 5, -+ COOKIE_NONCE_LEN = XCHACHA20POLY1305_NONCE_SIZE, -+ COOKIE_LEN = 16 -+}; -+ -+enum counter_values { -+ COUNTER_BITS_TOTAL = 2048, -+ COUNTER_REDUNDANT_BITS = BITS_PER_LONG, -+ COUNTER_WINDOW_SIZE = COUNTER_BITS_TOTAL - COUNTER_REDUNDANT_BITS -+}; -+ -+enum limits { -+ REKEY_AFTER_MESSAGES = U64_MAX - 0xffff, -+ REJECT_AFTER_MESSAGES = U64_MAX - COUNTER_WINDOW_SIZE - 1, -+ REKEY_TIMEOUT = 5, -+ REKEY_TIMEOUT_JITTER_MAX_JIFFIES = HZ / 3, -+ REKEY_AFTER_TIME = 120, -+ REJECT_AFTER_TIME = 180, -+ INITIATIONS_PER_SECOND = 50, -+ MAX_PEERS_PER_DEVICE = 1U << 20, -+ KEEPALIVE_TIMEOUT = 10, -+ MAX_TIMER_HANDSHAKES = 90 / REKEY_TIMEOUT, -+ MAX_QUEUED_INCOMING_HANDSHAKES = 4096, /* TODO: replace this with DQL */ -+ MAX_STAGED_PACKETS = 128, -+ MAX_QUEUED_PACKETS = 1024 /* TODO: replace this with DQL */ -+}; -+ -+enum message_type { -+ MESSAGE_INVALID = 0, -+ MESSAGE_HANDSHAKE_INITIATION = 1, -+ MESSAGE_HANDSHAKE_RESPONSE = 2, -+ MESSAGE_HANDSHAKE_COOKIE = 3, -+ MESSAGE_DATA = 4 -+}; -+ -+struct message_header { -+ /* The actual layout of this that we want is: -+ * u8 type -+ * u8 reserved_zero[3] -+ * -+ * But it turns out that by encoding this as little endian, -+ * we achieve the same thing, and it makes checking faster. -+ */ -+ __le32 type; -+}; -+ -+struct message_macs { -+ u8 mac1[COOKIE_LEN]; -+ u8 mac2[COOKIE_LEN]; -+}; -+ -+struct message_handshake_initiation { -+ struct message_header header; -+ __le32 sender_index; -+ u8 unencrypted_ephemeral[NOISE_PUBLIC_KEY_LEN]; -+ u8 encrypted_static[noise_encrypted_len(NOISE_PUBLIC_KEY_LEN)]; -+ u8 encrypted_timestamp[noise_encrypted_len(NOISE_TIMESTAMP_LEN)]; -+ struct message_macs macs; -+}; -+ -+struct message_handshake_response { -+ struct message_header header; -+ __le32 sender_index; -+ __le32 receiver_index; -+ u8 unencrypted_ephemeral[NOISE_PUBLIC_KEY_LEN]; -+ u8 encrypted_nothing[noise_encrypted_len(0)]; -+ struct message_macs macs; -+}; -+ -+struct message_handshake_cookie { -+ struct message_header header; -+ __le32 receiver_index; -+ u8 nonce[COOKIE_NONCE_LEN]; -+ u8 encrypted_cookie[noise_encrypted_len(COOKIE_LEN)]; -+}; -+ -+struct message_data { -+ struct message_header header; -+ __le32 key_idx; -+ __le64 counter; -+ u8 encrypted_data[]; -+}; -+ -+#define message_data_len(plain_len) \ -+ (noise_encrypted_len(plain_len) + sizeof(struct message_data)) -+ -+enum message_alignments { -+ MESSAGE_PADDING_MULTIPLE = 16, -+ MESSAGE_MINIMUM_LENGTH = message_data_len(0) -+}; -+ -+#define SKB_HEADER_LEN \ -+ (max(sizeof(struct iphdr), sizeof(struct ipv6hdr)) + \ -+ sizeof(struct udphdr) + NET_SKB_PAD) -+#define DATA_PACKET_HEAD_ROOM \ -+ ALIGN(sizeof(struct message_data) + SKB_HEADER_LEN, 4) -+ -+enum { HANDSHAKE_DSCP = 0x88 /* AF41, plus 00 ECN */ }; -+ -+#endif /* _WG_MESSAGES_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/netlink.h 2019-08-20 20:26:42.408341426 +0000 -@@ -0,0 +1,12 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _WG_NETLINK_H -+#define _WG_NETLINK_H -+ -+int wg_genetlink_init(void); -+void wg_genetlink_uninit(void); -+ -+#endif /* _WG_NETLINK_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/noise.h 2019-08-20 20:26:42.408341426 +0000 -@@ -0,0 +1,137 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+#ifndef _WG_NOISE_H -+#define _WG_NOISE_H -+ -+#include "messages.h" -+#include "peerlookup.h" -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+union noise_counter { -+ struct { -+ u64 counter; -+ unsigned long backtrack[COUNTER_BITS_TOTAL / BITS_PER_LONG]; -+ spinlock_t lock; -+ } receive; -+ atomic64_t counter; -+}; -+ -+struct noise_symmetric_key { -+ u8 key[NOISE_SYMMETRIC_KEY_LEN]; -+ union noise_counter counter; -+ u64 birthdate; -+ bool is_valid; -+}; -+ -+struct noise_keypair { -+ struct index_hashtable_entry entry; -+ struct noise_symmetric_key sending; -+ struct noise_symmetric_key receiving; -+ __le32 remote_index; -+ bool i_am_the_initiator; -+ struct kref refcount; -+ struct rcu_head rcu; -+ u64 internal_id; -+}; -+ -+struct noise_keypairs { -+ struct noise_keypair __rcu *current_keypair; -+ struct noise_keypair __rcu *previous_keypair; -+ struct noise_keypair __rcu *next_keypair; -+ spinlock_t keypair_update_lock; -+}; -+ -+struct noise_static_identity { -+ u8 static_public[NOISE_PUBLIC_KEY_LEN]; -+ u8 static_private[NOISE_PUBLIC_KEY_LEN]; -+ struct rw_semaphore lock; -+ bool has_identity; -+}; -+ -+enum noise_handshake_state { -+ HANDSHAKE_ZEROED, -+ HANDSHAKE_CREATED_INITIATION, -+ HANDSHAKE_CONSUMED_INITIATION, -+ HANDSHAKE_CREATED_RESPONSE, -+ HANDSHAKE_CONSUMED_RESPONSE -+}; -+ -+struct noise_handshake { -+ struct index_hashtable_entry entry; -+ -+ enum noise_handshake_state state; -+ u64 last_initiation_consumption; -+ -+ struct noise_static_identity *static_identity; -+ -+ u8 ephemeral_private[NOISE_PUBLIC_KEY_LEN]; -+ u8 remote_static[NOISE_PUBLIC_KEY_LEN]; -+ u8 remote_ephemeral[NOISE_PUBLIC_KEY_LEN]; -+ u8 precomputed_static_static[NOISE_PUBLIC_KEY_LEN]; -+ -+ u8 preshared_key[NOISE_SYMMETRIC_KEY_LEN]; -+ -+ u8 hash[NOISE_HASH_LEN]; -+ u8 chaining_key[NOISE_HASH_LEN]; -+ -+ u8 latest_timestamp[NOISE_TIMESTAMP_LEN]; -+ __le32 remote_index; -+ -+ /* Protects all members except the immutable (after noise_handshake_ -+ * init): remote_static, precomputed_static_static, static_identity. -+ */ -+ struct rw_semaphore lock; -+}; -+ -+struct wg_device; -+ -+void wg_noise_init(void); -+bool wg_noise_handshake_init(struct noise_handshake *handshake, -+ struct noise_static_identity *static_identity, -+ const u8 peer_public_key[NOISE_PUBLIC_KEY_LEN], -+ const u8 peer_preshared_key[NOISE_SYMMETRIC_KEY_LEN], -+ struct wg_peer *peer); -+void wg_noise_handshake_clear(struct noise_handshake *handshake); -+static inline void wg_noise_reset_last_sent_handshake(atomic64_t *handshake_ns) -+{ -+ atomic64_set(handshake_ns, ktime_get_coarse_boottime_ns() - -+ (u64)(REKEY_TIMEOUT + 1) * NSEC_PER_SEC); -+} -+ -+void wg_noise_keypair_put(struct noise_keypair *keypair, bool unreference_now); -+struct noise_keypair *wg_noise_keypair_get(struct noise_keypair *keypair); -+void wg_noise_keypairs_clear(struct noise_keypairs *keypairs); -+bool wg_noise_received_with_keypair(struct noise_keypairs *keypairs, -+ struct noise_keypair *received_keypair); -+void wg_noise_expire_current_peer_keypairs(struct wg_peer *peer); -+ -+void wg_noise_set_static_identity_private_key( -+ struct noise_static_identity *static_identity, -+ const u8 private_key[NOISE_PUBLIC_KEY_LEN]); -+bool wg_noise_precompute_static_static(struct wg_peer *peer); -+ -+bool -+wg_noise_handshake_create_initiation(struct message_handshake_initiation *dst, -+ struct noise_handshake *handshake); -+struct wg_peer * -+wg_noise_handshake_consume_initiation(struct message_handshake_initiation *src, -+ struct wg_device *wg); -+ -+bool wg_noise_handshake_create_response(struct message_handshake_response *dst, -+ struct noise_handshake *handshake); -+struct wg_peer * -+wg_noise_handshake_consume_response(struct message_handshake_response *src, -+ struct wg_device *wg); -+ -+bool wg_noise_handshake_begin_session(struct noise_handshake *handshake, -+ struct noise_keypairs *keypairs); -+ -+#endif /* _WG_NOISE_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/peer.h 2019-08-20 20:26:42.408341426 +0000 -@@ -0,0 +1,83 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _WG_PEER_H -+#define _WG_PEER_H -+ -+#include "device.h" -+#include "noise.h" -+#include "cookie.h" -+ -+#include -+#include -+#include -+#include -+#include -+ -+struct wg_device; -+ -+struct endpoint { -+ union { -+ struct sockaddr addr; -+ struct sockaddr_in addr4; -+ struct sockaddr_in6 addr6; -+ }; -+ union { -+ struct { -+ struct in_addr src4; -+ /* Essentially the same as addr6->scope_id */ -+ int src_if4; -+ }; -+ struct in6_addr src6; -+ }; -+}; -+ -+struct wg_peer { -+ struct wg_device *device; -+ struct crypt_queue tx_queue, rx_queue; -+ struct sk_buff_head staged_packet_queue; -+ int serial_work_cpu; -+ struct noise_keypairs keypairs; -+ struct endpoint endpoint; -+ struct dst_cache endpoint_cache; -+ rwlock_t endpoint_lock; -+ struct noise_handshake handshake; -+ atomic64_t last_sent_handshake; -+ struct work_struct transmit_handshake_work, clear_peer_work; -+ struct cookie latest_cookie; -+ struct hlist_node pubkey_hash; -+ u64 rx_bytes, tx_bytes; -+ struct timer_list timer_retransmit_handshake, timer_send_keepalive; -+ struct timer_list timer_new_handshake, timer_zero_key_material; -+ struct timer_list timer_persistent_keepalive; -+ unsigned int timer_handshake_attempts; -+ u16 persistent_keepalive_interval; -+ bool timer_need_another_keepalive; -+ bool sent_lastminute_handshake; -+ struct timespec64 walltime_last_handshake; -+ struct kref refcount; -+ struct rcu_head rcu; -+ struct list_head peer_list; -+ struct list_head allowedips_list; -+ u64 internal_id; -+ struct napi_struct napi; -+ bool is_dead; -+}; -+ -+struct wg_peer *wg_peer_create(struct wg_device *wg, -+ const u8 public_key[NOISE_PUBLIC_KEY_LEN], -+ const u8 preshared_key[NOISE_SYMMETRIC_KEY_LEN]); -+ -+struct wg_peer *__must_check wg_peer_get_maybe_zero(struct wg_peer *peer); -+static inline struct wg_peer *wg_peer_get(struct wg_peer *peer) -+{ -+ kref_get(&peer->refcount); -+ return peer; -+} -+void wg_peer_put(struct wg_peer *peer); -+void wg_peer_remove(struct wg_peer *peer); -+void wg_peer_remove_all(struct wg_device *wg); -+ -+#endif /* _WG_PEER_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/peerlookup.h 2019-08-20 20:26:42.408341426 +0000 -@@ -0,0 +1,64 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _WG_PEERLOOKUP_H -+#define _WG_PEERLOOKUP_H -+ -+#include "messages.h" -+ -+#include -+#include -+#include -+ -+struct wg_peer; -+ -+struct pubkey_hashtable { -+ /* TODO: move to rhashtable */ -+ DECLARE_HASHTABLE(hashtable, 11); -+ siphash_key_t key; -+ struct mutex lock; -+}; -+ -+struct pubkey_hashtable *wg_pubkey_hashtable_alloc(void); -+void wg_pubkey_hashtable_add(struct pubkey_hashtable *table, -+ struct wg_peer *peer); -+void wg_pubkey_hashtable_remove(struct pubkey_hashtable *table, -+ struct wg_peer *peer); -+struct wg_peer * -+wg_pubkey_hashtable_lookup(struct pubkey_hashtable *table, -+ const u8 pubkey[NOISE_PUBLIC_KEY_LEN]); -+ -+struct index_hashtable { -+ /* TODO: move to rhashtable */ -+ DECLARE_HASHTABLE(hashtable, 13); -+ spinlock_t lock; -+}; -+ -+enum index_hashtable_type { -+ INDEX_HASHTABLE_HANDSHAKE = 1U << 0, -+ INDEX_HASHTABLE_KEYPAIR = 1U << 1 -+}; -+ -+struct index_hashtable_entry { -+ struct wg_peer *peer; -+ struct hlist_node index_hash; -+ enum index_hashtable_type type; -+ __le32 index; -+}; -+ -+struct index_hashtable *wg_index_hashtable_alloc(void); -+__le32 wg_index_hashtable_insert(struct index_hashtable *table, -+ struct index_hashtable_entry *entry); -+bool wg_index_hashtable_replace(struct index_hashtable *table, -+ struct index_hashtable_entry *old, -+ struct index_hashtable_entry *new); -+void wg_index_hashtable_remove(struct index_hashtable *table, -+ struct index_hashtable_entry *entry); -+struct index_hashtable_entry * -+wg_index_hashtable_lookup(struct index_hashtable *table, -+ const enum index_hashtable_type type_mask, -+ const __le32 index, struct wg_peer **peer); -+ -+#endif /* _WG_PEERLOOKUP_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/queueing.h 2019-08-20 20:26:42.409341426 +0000 -@@ -0,0 +1,197 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _WG_QUEUEING_H -+#define _WG_QUEUEING_H -+ -+#include "peer.h" -+#include -+#include -+#include -+#include -+ -+struct wg_device; -+struct wg_peer; -+struct multicore_worker; -+struct crypt_queue; -+struct sk_buff; -+ -+/* queueing.c APIs: */ -+int wg_packet_queue_init(struct crypt_queue *queue, work_func_t function, -+ bool multicore, unsigned int len); -+void wg_packet_queue_free(struct crypt_queue *queue, bool multicore); -+struct multicore_worker __percpu * -+wg_packet_percpu_multicore_worker_alloc(work_func_t function, void *ptr); -+ -+/* receive.c APIs: */ -+void wg_packet_receive(struct wg_device *wg, struct sk_buff *skb); -+void wg_packet_handshake_receive_worker(struct work_struct *work); -+/* NAPI poll function: */ -+int wg_packet_rx_poll(struct napi_struct *napi, int budget); -+/* Workqueue worker: */ -+void wg_packet_decrypt_worker(struct work_struct *work); -+ -+/* send.c APIs: */ -+void wg_packet_send_queued_handshake_initiation(struct wg_peer *peer, -+ bool is_retry); -+void wg_packet_send_handshake_response(struct wg_peer *peer); -+void wg_packet_send_handshake_cookie(struct wg_device *wg, -+ struct sk_buff *initiating_skb, -+ __le32 sender_index); -+void wg_packet_send_keepalive(struct wg_peer *peer); -+void wg_packet_purge_staged_packets(struct wg_peer *peer); -+void wg_packet_send_staged_packets(struct wg_peer *peer); -+/* Workqueue workers: */ -+void wg_packet_handshake_send_worker(struct work_struct *work); -+void wg_packet_tx_worker(struct work_struct *work); -+void wg_packet_encrypt_worker(struct work_struct *work); -+ -+enum packet_state { -+ PACKET_STATE_UNCRYPTED, -+ PACKET_STATE_CRYPTED, -+ PACKET_STATE_DEAD -+}; -+ -+struct packet_cb { -+ u64 nonce; -+ struct noise_keypair *keypair; -+ atomic_t state; -+ u32 mtu; -+ u8 ds; -+}; -+ -+#define PACKET_CB(skb) ((struct packet_cb *)((skb)->cb)) -+#define PACKET_PEER(skb) (PACKET_CB(skb)->keypair->entry.peer) -+ -+/* Returns either the correct skb->protocol value, or 0 if invalid. */ -+static inline __be16 wg_skb_examine_untrusted_ip_hdr(struct sk_buff *skb) -+{ -+ if (skb_network_header(skb) >= skb->head && -+ (skb_network_header(skb) + sizeof(struct iphdr)) <= -+ skb_tail_pointer(skb) && -+ ip_hdr(skb)->version == 4) -+ return htons(ETH_P_IP); -+ if (skb_network_header(skb) >= skb->head && -+ (skb_network_header(skb) + sizeof(struct ipv6hdr)) <= -+ skb_tail_pointer(skb) && -+ ipv6_hdr(skb)->version == 6) -+ return htons(ETH_P_IPV6); -+ return 0; -+} -+ -+static inline void wg_reset_packet(struct sk_buff *skb) -+{ -+ const int pfmemalloc = skb->pfmemalloc; -+ -+ skb_scrub_packet(skb, true); -+ memset(&skb->headers_start, 0, -+ offsetof(struct sk_buff, headers_end) - -+ offsetof(struct sk_buff, headers_start)); -+ skb->pfmemalloc = pfmemalloc; -+ skb->queue_mapping = 0; -+ skb->nohdr = 0; -+ skb->peeked = 0; -+ skb->mac_len = 0; -+ skb->dev = NULL; -+#ifdef CONFIG_NET_SCHED -+ skb->tc_index = 0; -+ skb_reset_tc(skb); -+#endif -+ skb->hdr_len = skb_headroom(skb); -+ skb_reset_mac_header(skb); -+ skb_reset_network_header(skb); -+ skb_reset_transport_header(skb); -+ skb_probe_transport_header(skb); -+ skb_reset_inner_headers(skb); -+} -+ -+static inline int wg_cpumask_choose_online(int *stored_cpu, unsigned int id) -+{ -+ unsigned int cpu = *stored_cpu, cpu_index, i; -+ -+ if (unlikely(cpu == nr_cpumask_bits || -+ !cpumask_test_cpu(cpu, cpu_online_mask))) { -+ cpu_index = id % cpumask_weight(cpu_online_mask); -+ cpu = cpumask_first(cpu_online_mask); -+ for (i = 0; i < cpu_index; ++i) -+ cpu = cpumask_next(cpu, cpu_online_mask); -+ *stored_cpu = cpu; -+ } -+ return cpu; -+} -+ -+/* This function is racy, in the sense that next is unlocked, so it could return -+ * the same CPU twice. A race-free version of this would be to instead store an -+ * atomic sequence number, do an increment-and-return, and then iterate through -+ * every possible CPU until we get to that index -- choose_cpu. However that's -+ * a bit slower, and it doesn't seem like this potential race actually -+ * introduces any performance loss, so we live with it. -+ */ -+static inline int wg_cpumask_next_online(int *next) -+{ -+ int cpu = *next; -+ -+ while (unlikely(!cpumask_test_cpu(cpu, cpu_online_mask))) -+ cpu = cpumask_next(cpu, cpu_online_mask) % nr_cpumask_bits; -+ *next = cpumask_next(cpu, cpu_online_mask) % nr_cpumask_bits; -+ return cpu; -+} -+ -+static inline int wg_queue_enqueue_per_device_and_peer( -+ struct crypt_queue *device_queue, struct crypt_queue *peer_queue, -+ struct sk_buff *skb, struct workqueue_struct *wq, int *next_cpu) -+{ -+ int cpu; -+ -+ atomic_set_release(&PACKET_CB(skb)->state, PACKET_STATE_UNCRYPTED); -+ /* We first queue this up for the peer ingestion, but the consumer -+ * will wait for the state to change to CRYPTED or DEAD before. -+ */ -+ if (unlikely(ptr_ring_produce_bh(&peer_queue->ring, skb))) -+ return -ENOSPC; -+ /* Then we queue it up in the device queue, which consumes the -+ * packet as soon as it can. -+ */ -+ cpu = wg_cpumask_next_online(next_cpu); -+ if (unlikely(ptr_ring_produce_bh(&device_queue->ring, skb))) -+ return -EPIPE; -+ queue_work_on(cpu, wq, &per_cpu_ptr(device_queue->worker, cpu)->work); -+ return 0; -+} -+ -+static inline void wg_queue_enqueue_per_peer(struct crypt_queue *queue, -+ struct sk_buff *skb, -+ enum packet_state state) -+{ -+ /* We take a reference, because as soon as we call atomic_set, the -+ * peer can be freed from below us. -+ */ -+ struct wg_peer *peer = wg_peer_get(PACKET_PEER(skb)); -+ -+ atomic_set_release(&PACKET_CB(skb)->state, state); -+ queue_work_on(wg_cpumask_choose_online(&peer->serial_work_cpu, -+ peer->internal_id), -+ peer->device->packet_crypt_wq, &queue->work); -+ wg_peer_put(peer); -+} -+ -+static inline void wg_queue_enqueue_per_peer_napi(struct sk_buff *skb, -+ enum packet_state state) -+{ -+ /* We take a reference, because as soon as we call atomic_set, the -+ * peer can be freed from below us. -+ */ -+ struct wg_peer *peer = wg_peer_get(PACKET_PEER(skb)); -+ -+ atomic_set_release(&PACKET_CB(skb)->state, state); -+ napi_schedule(&peer->napi); -+ wg_peer_put(peer); -+} -+ -+#ifdef DEBUG -+bool wg_packet_counter_selftest(void); -+#endif -+ -+#endif /* _WG_QUEUEING_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/ratelimiter.h 2019-08-20 20:26:42.409341426 +0000 -@@ -0,0 +1,19 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _WG_RATELIMITER_H -+#define _WG_RATELIMITER_H -+ -+#include -+ -+int wg_ratelimiter_init(void); -+void wg_ratelimiter_uninit(void); -+bool wg_ratelimiter_allow(struct sk_buff *skb, struct net *net); -+ -+#ifdef DEBUG -+bool wg_ratelimiter_selftest(void); -+#endif -+ -+#endif /* _WG_RATELIMITER_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/socket.h 2019-08-20 20:26:42.410341426 +0000 -@@ -0,0 +1,44 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _WG_SOCKET_H -+#define _WG_SOCKET_H -+ -+#include -+#include -+#include -+#include -+ -+int wg_socket_init(struct wg_device *wg, u16 port); -+void wg_socket_reinit(struct wg_device *wg, struct sock *new4, -+ struct sock *new6); -+int wg_socket_send_buffer_to_peer(struct wg_peer *peer, void *data, -+ size_t len, u8 ds); -+int wg_socket_send_skb_to_peer(struct wg_peer *peer, struct sk_buff *skb, -+ u8 ds); -+int wg_socket_send_buffer_as_reply_to_skb(struct wg_device *wg, -+ struct sk_buff *in_skb, -+ void *out_buffer, size_t len); -+ -+int wg_socket_endpoint_from_skb(struct endpoint *endpoint, -+ const struct sk_buff *skb); -+void wg_socket_set_peer_endpoint(struct wg_peer *peer, -+ const struct endpoint *endpoint); -+void wg_socket_set_peer_endpoint_from_skb(struct wg_peer *peer, -+ const struct sk_buff *skb); -+void wg_socket_clear_peer_endpoint_src(struct wg_peer *peer); -+ -+#if defined(CONFIG_DYNAMIC_DEBUG) || defined(DEBUG) -+#define net_dbg_skb_ratelimited(fmt, dev, skb, ...) do { \ -+ struct endpoint __endpoint; \ -+ wg_socket_endpoint_from_skb(&__endpoint, skb); \ -+ net_dbg_ratelimited(fmt, dev, &__endpoint.addr, \ -+ ##__VA_ARGS__); \ -+ } while (0) -+#else -+#define net_dbg_skb_ratelimited(fmt, skb, ...) -+#endif -+ -+#endif /* _WG_SOCKET_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/timers.h 2019-08-20 20:26:42.412341426 +0000 -@@ -0,0 +1,31 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#ifndef _WG_TIMERS_H -+#define _WG_TIMERS_H -+ -+#include -+ -+struct wg_peer; -+ -+void wg_timers_init(struct wg_peer *peer); -+void wg_timers_stop(struct wg_peer *peer); -+void wg_timers_data_sent(struct wg_peer *peer); -+void wg_timers_data_received(struct wg_peer *peer); -+void wg_timers_any_authenticated_packet_sent(struct wg_peer *peer); -+void wg_timers_any_authenticated_packet_received(struct wg_peer *peer); -+void wg_timers_handshake_initiated(struct wg_peer *peer); -+void wg_timers_handshake_complete(struct wg_peer *peer); -+void wg_timers_session_derived(struct wg_peer *peer); -+void wg_timers_any_authenticated_packet_traversal(struct wg_peer *peer); -+ -+static inline bool wg_birthdate_has_expired(u64 birthday_nanoseconds, -+ u64 expiration_seconds) -+{ -+ return (s64)(birthday_nanoseconds + expiration_seconds * NSEC_PER_SEC) -+ <= (s64)ktime_get_coarse_boottime_ns(); -+} -+ -+#endif /* _WG_TIMERS_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/uapi/wireguard.h 2019-08-20 20:26:42.416341426 +0000 -@@ -0,0 +1,192 @@ -+/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ * -+ * Documentation -+ * ============= -+ * -+ * The below enums and macros are for interfacing with WireGuard, using generic -+ * netlink, with family WG_GENL_NAME and version WG_GENL_VERSION. It defines two -+ * methods: get and set. Note that while they share many common attributes, -+ * these two functions actually accept a slightly different set of inputs and -+ * outputs. -+ * -+ * WG_CMD_GET_DEVICE -+ * ----------------- -+ * -+ * May only be called via NLM_F_REQUEST | NLM_F_DUMP. The command should contain -+ * one but not both of: -+ * -+ * WGDEVICE_A_IFINDEX: NLA_U32 -+ * WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMESIZ - 1 -+ * -+ * The kernel will then return several messages (NLM_F_MULTI) containing the -+ * following tree of nested items: -+ * -+ * WGDEVICE_A_IFINDEX: NLA_U32 -+ * WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMESIZ - 1 -+ * WGDEVICE_A_PRIVATE_KEY: NLA_EXACT_LEN, len WG_KEY_LEN -+ * WGDEVICE_A_PUBLIC_KEY: NLA_EXACT_LEN, len WG_KEY_LEN -+ * WGDEVICE_A_LISTEN_PORT: NLA_U16 -+ * WGDEVICE_A_FWMARK: NLA_U32 -+ * WGDEVICE_A_PEERS: NLA_NESTED -+ * 0: NLA_NESTED -+ * WGPEER_A_PUBLIC_KEY: NLA_EXACT_LEN, len WG_KEY_LEN -+ * WGPEER_A_PRESHARED_KEY: NLA_EXACT_LEN, len WG_KEY_LEN -+ * WGPEER_A_ENDPOINT: NLA_MIN_LEN(struct sockaddr), struct sockaddr_in or struct sockaddr_in6 -+ * WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: NLA_U16 -+ * WGPEER_A_LAST_HANDSHAKE_TIME: NLA_EXACT_LEN, struct __kernel_timespec -+ * WGPEER_A_RX_BYTES: NLA_U64 -+ * WGPEER_A_TX_BYTES: NLA_U64 -+ * WGPEER_A_ALLOWEDIPS: NLA_NESTED -+ * 0: NLA_NESTED -+ * WGALLOWEDIP_A_FAMILY: NLA_U16 -+ * WGALLOWEDIP_A_IPADDR: NLA_MIN_LEN(struct in_addr), struct in_addr or struct in6_addr -+ * WGALLOWEDIP_A_CIDR_MASK: NLA_U8 -+ * 0: NLA_NESTED -+ * ... -+ * 0: NLA_NESTED -+ * ... -+ * ... -+ * WGPEER_A_PROTOCOL_VERSION: NLA_U32 -+ * 0: NLA_NESTED -+ * ... -+ * ... -+ * -+ * It is possible that all of the allowed IPs of a single peer will not -+ * fit within a single netlink message. In that case, the same peer will -+ * be written in the following message, except it will only contain -+ * WGPEER_A_PUBLIC_KEY and WGPEER_A_ALLOWEDIPS. This may occur several -+ * times in a row for the same peer. It is then up to the receiver to -+ * coalesce adjacent peers. Likewise, it is possible that all peers will -+ * not fit within a single message. So, subsequent peers will be sent -+ * in following messages, except those will only contain WGDEVICE_A_IFNAME -+ * and WGDEVICE_A_PEERS. It is then up to the receiver to coalesce these -+ * messages to form the complete list of peers. -+ * -+ * Since this is an NLA_F_DUMP command, the final message will always be -+ * NLMSG_DONE, even if an error occurs. However, this NLMSG_DONE message -+ * contains an integer error code. It is either zero or a negative error -+ * code corresponding to the errno. -+ * -+ * WG_CMD_SET_DEVICE -+ * ----------------- -+ * -+ * May only be called via NLM_F_REQUEST. The command should contain the -+ * following tree of nested items, containing one but not both of -+ * WGDEVICE_A_IFINDEX and WGDEVICE_A_IFNAME: -+ * -+ * WGDEVICE_A_IFINDEX: NLA_U32 -+ * WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMESIZ - 1 -+ * WGDEVICE_A_FLAGS: NLA_U32, 0 or WGDEVICE_F_REPLACE_PEERS if all current -+ * peers should be removed prior to adding the list below. -+ * WGDEVICE_A_PRIVATE_KEY: len WG_KEY_LEN, all zeros to remove -+ * WGDEVICE_A_LISTEN_PORT: NLA_U16, 0 to choose randomly -+ * WGDEVICE_A_FWMARK: NLA_U32, 0 to disable -+ * WGDEVICE_A_PEERS: NLA_NESTED -+ * 0: NLA_NESTED -+ * WGPEER_A_PUBLIC_KEY: len WG_KEY_LEN -+ * WGPEER_A_FLAGS: NLA_U32, 0 and/or WGPEER_F_REMOVE_ME if the -+ * specified peer should be removed rather than -+ * added/updated and/or WGPEER_F_REPLACE_ALLOWEDIPS -+ * if all current allowed IPs of this peer should be -+ * removed prior to adding the list below. -+ * WGPEER_A_PRESHARED_KEY: len WG_KEY_LEN, all zeros to remove -+ * WGPEER_A_ENDPOINT: struct sockaddr_in or struct sockaddr_in6 -+ * WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: NLA_U16, 0 to disable -+ * WGPEER_A_ALLOWEDIPS: NLA_NESTED -+ * 0: NLA_NESTED -+ * WGALLOWEDIP_A_FAMILY: NLA_U16 -+ * WGALLOWEDIP_A_IPADDR: struct in_addr or struct in6_addr -+ * WGALLOWEDIP_A_CIDR_MASK: NLA_U8 -+ * 0: NLA_NESTED -+ * ... -+ * 0: NLA_NESTED -+ * ... -+ * ... -+ * WGPEER_A_PROTOCOL_VERSION: NLA_U32, should not be set or used at -+ * all by most users of this API, as the -+ * most recent protocol will be used when -+ * this is unset. Otherwise, must be set -+ * to 1. -+ * 0: NLA_NESTED -+ * ... -+ * ... -+ * -+ * It is possible that the amount of configuration data exceeds that of -+ * the maximum message length accepted by the kernel. In that case, several -+ * messages should be sent one after another, with each successive one -+ * filling in information not contained in the prior. Note that if -+ * WGDEVICE_F_REPLACE_PEERS is specified in the first message, it probably -+ * should not be specified in fragments that come after, so that the list -+ * of peers is only cleared the first time but appened after. Likewise for -+ * peers, if WGPEER_F_REPLACE_ALLOWEDIPS is specified in the first message -+ * of a peer, it likely should not be specified in subsequent fragments. -+ * -+ * If an error occurs, NLMSG_ERROR will reply containing an errno. -+ */ -+ -+#ifndef _WG_UAPI_WIREGUARD_H -+#define _WG_UAPI_WIREGUARD_H -+ -+#define WG_GENL_NAME "wireguard" -+#define WG_GENL_VERSION 1 -+ -+#define WG_KEY_LEN 32 -+ -+enum wg_cmd { -+ WG_CMD_GET_DEVICE, -+ WG_CMD_SET_DEVICE, -+ __WG_CMD_MAX -+}; -+#define WG_CMD_MAX (__WG_CMD_MAX - 1) -+ -+enum wgdevice_flag { -+ WGDEVICE_F_REPLACE_PEERS = 1U << 0, -+ __WGDEVICE_F_ALL = WGDEVICE_F_REPLACE_PEERS -+}; -+enum wgdevice_attribute { -+ WGDEVICE_A_UNSPEC, -+ WGDEVICE_A_IFINDEX, -+ WGDEVICE_A_IFNAME, -+ WGDEVICE_A_PRIVATE_KEY, -+ WGDEVICE_A_PUBLIC_KEY, -+ WGDEVICE_A_FLAGS, -+ WGDEVICE_A_LISTEN_PORT, -+ WGDEVICE_A_FWMARK, -+ WGDEVICE_A_PEERS, -+ __WGDEVICE_A_LAST -+}; -+#define WGDEVICE_A_MAX (__WGDEVICE_A_LAST - 1) -+ -+enum wgpeer_flag { -+ WGPEER_F_REMOVE_ME = 1U << 0, -+ WGPEER_F_REPLACE_ALLOWEDIPS = 1U << 1, -+ __WGPEER_F_ALL = WGPEER_F_REMOVE_ME | WGPEER_F_REPLACE_ALLOWEDIPS -+}; -+enum wgpeer_attribute { -+ WGPEER_A_UNSPEC, -+ WGPEER_A_PUBLIC_KEY, -+ WGPEER_A_PRESHARED_KEY, -+ WGPEER_A_FLAGS, -+ WGPEER_A_ENDPOINT, -+ WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL, -+ WGPEER_A_LAST_HANDSHAKE_TIME, -+ WGPEER_A_RX_BYTES, -+ WGPEER_A_TX_BYTES, -+ WGPEER_A_ALLOWEDIPS, -+ WGPEER_A_PROTOCOL_VERSION, -+ __WGPEER_A_LAST -+}; -+#define WGPEER_A_MAX (__WGPEER_A_LAST - 1) -+ -+enum wgallowedip_attribute { -+ WGALLOWEDIP_A_UNSPEC, -+ WGALLOWEDIP_A_FAMILY, -+ WGALLOWEDIP_A_IPADDR, -+ WGALLOWEDIP_A_CIDR_MASK, -+ __WGALLOWEDIP_A_LAST -+}; -+#define WGALLOWEDIP_A_MAX (__WGALLOWEDIP_A_LAST - 1) -+ -+#endif /* _WG_UAPI_WIREGUARD_H */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/version.h 2019-08-20 20:26:42.416341426 +0000 -@@ -0,0 +1 @@ -+#define WIREGUARD_VERSION "0.0.20190702" ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/blake2s/blake2s-x86_64.S 2019-08-20 20:26:42.395341425 +0000 -@@ -0,0 +1,258 @@ -+/* SPDX-License-Identifier: GPL-2.0 OR MIT */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ * Copyright (C) 2017-2019 Samuel Neves . All Rights Reserved. -+ */ -+ -+#include -+ -+.section .rodata.cst32.BLAKE2S_IV, "aM", @progbits, 32 -+.align 32 -+IV: .octa 0xA54FF53A3C6EF372BB67AE856A09E667 -+ .octa 0x5BE0CD191F83D9AB9B05688C510E527F -+.section .rodata.cst16.ROT16, "aM", @progbits, 16 -+.align 16 -+ROT16: .octa 0x0D0C0F0E09080B0A0504070601000302 -+.section .rodata.cst16.ROR328, "aM", @progbits, 16 -+.align 16 -+ROR328: .octa 0x0C0F0E0D080B0A090407060500030201 -+.section .rodata.cst64.BLAKE2S_SIGMA, "aM", @progbits, 160 -+.align 64 -+SIGMA: -+.byte 0, 2, 4, 6, 1, 3, 5, 7, 14, 8, 10, 12, 15, 9, 11, 13 -+.byte 14, 4, 9, 13, 10, 8, 15, 6, 5, 1, 0, 11, 3, 12, 2, 7 -+.byte 11, 12, 5, 15, 8, 0, 2, 13, 9, 10, 3, 7, 4, 14, 6, 1 -+.byte 7, 3, 13, 11, 9, 1, 12, 14, 15, 2, 5, 4, 8, 6, 10, 0 -+.byte 9, 5, 2, 10, 0, 7, 4, 15, 3, 14, 11, 6, 13, 1, 12, 8 -+.byte 2, 6, 0, 8, 12, 10, 11, 3, 1, 4, 7, 15, 9, 13, 5, 14 -+.byte 12, 1, 14, 4, 5, 15, 13, 10, 8, 0, 6, 9, 11, 7, 3, 2 -+.byte 13, 7, 12, 3, 11, 14, 1, 9, 2, 5, 15, 8, 10, 0, 4, 6 -+.byte 6, 14, 11, 0, 15, 9, 3, 8, 10, 12, 13, 1, 5, 2, 7, 4 -+.byte 10, 8, 7, 1, 2, 4, 6, 5, 13, 15, 9, 3, 0, 11, 14, 12 -+#ifdef CONFIG_AS_AVX512 -+.section .rodata.cst64.BLAKE2S_SIGMA2, "aM", @progbits, 640 -+.align 64 -+SIGMA2: -+.long 0, 2, 4, 6, 1, 3, 5, 7, 14, 8, 10, 12, 15, 9, 11, 13 -+.long 8, 2, 13, 15, 10, 9, 12, 3, 6, 4, 0, 14, 5, 11, 1, 7 -+.long 11, 13, 8, 6, 5, 10, 14, 3, 2, 4, 12, 15, 1, 0, 7, 9 -+.long 11, 10, 7, 0, 8, 15, 1, 13, 3, 6, 2, 12, 4, 14, 9, 5 -+.long 4, 10, 9, 14, 15, 0, 11, 8, 1, 7, 3, 13, 2, 5, 6, 12 -+.long 2, 11, 4, 15, 14, 3, 10, 8, 13, 6, 5, 7, 0, 12, 1, 9 -+.long 4, 8, 15, 9, 14, 11, 13, 5, 3, 2, 1, 12, 6, 10, 7, 0 -+.long 6, 13, 0, 14, 12, 2, 1, 11, 15, 4, 5, 8, 7, 9, 3, 10 -+.long 15, 5, 4, 13, 10, 7, 3, 11, 12, 2, 0, 6, 9, 8, 1, 14 -+.long 8, 7, 14, 11, 13, 15, 0, 12, 10, 4, 5, 6, 3, 2, 1, 9 -+#endif /* CONFIG_AS_AVX512 */ -+ -+.text -+#ifdef CONFIG_AS_SSSE3 -+ENTRY(blake2s_compress_ssse3) -+ testq %rdx,%rdx -+ je .Lendofloop -+ movdqu (%rdi),%xmm0 -+ movdqu 0x10(%rdi),%xmm1 -+ movdqa ROT16(%rip),%xmm12 -+ movdqa ROR328(%rip),%xmm13 -+ movdqu 0x20(%rdi),%xmm14 -+ movq %rcx,%xmm15 -+ leaq SIGMA+0xa0(%rip),%r8 -+ jmp .Lbeginofloop -+ .align 32 -+.Lbeginofloop: -+ movdqa %xmm0,%xmm10 -+ movdqa %xmm1,%xmm11 -+ paddq %xmm15,%xmm14 -+ movdqa IV(%rip),%xmm2 -+ movdqa %xmm14,%xmm3 -+ pxor IV+0x10(%rip),%xmm3 -+ leaq SIGMA(%rip),%rcx -+.Lroundloop: -+ movzbl (%rcx),%eax -+ movd (%rsi,%rax,4),%xmm4 -+ movzbl 0x1(%rcx),%eax -+ movd (%rsi,%rax,4),%xmm5 -+ movzbl 0x2(%rcx),%eax -+ movd (%rsi,%rax,4),%xmm6 -+ movzbl 0x3(%rcx),%eax -+ movd (%rsi,%rax,4),%xmm7 -+ punpckldq %xmm5,%xmm4 -+ punpckldq %xmm7,%xmm6 -+ punpcklqdq %xmm6,%xmm4 -+ paddd %xmm4,%xmm0 -+ paddd %xmm1,%xmm0 -+ pxor %xmm0,%xmm3 -+ pshufb %xmm12,%xmm3 -+ paddd %xmm3,%xmm2 -+ pxor %xmm2,%xmm1 -+ movdqa %xmm1,%xmm8 -+ psrld $0xc,%xmm1 -+ pslld $0x14,%xmm8 -+ por %xmm8,%xmm1 -+ movzbl 0x4(%rcx),%eax -+ movd (%rsi,%rax,4),%xmm5 -+ movzbl 0x5(%rcx),%eax -+ movd (%rsi,%rax,4),%xmm6 -+ movzbl 0x6(%rcx),%eax -+ movd (%rsi,%rax,4),%xmm7 -+ movzbl 0x7(%rcx),%eax -+ movd (%rsi,%rax,4),%xmm4 -+ punpckldq %xmm6,%xmm5 -+ punpckldq %xmm4,%xmm7 -+ punpcklqdq %xmm7,%xmm5 -+ paddd %xmm5,%xmm0 -+ paddd %xmm1,%xmm0 -+ pxor %xmm0,%xmm3 -+ pshufb %xmm13,%xmm3 -+ paddd %xmm3,%xmm2 -+ pxor %xmm2,%xmm1 -+ movdqa %xmm1,%xmm8 -+ psrld $0x7,%xmm1 -+ pslld $0x19,%xmm8 -+ por %xmm8,%xmm1 -+ pshufd $0x93,%xmm0,%xmm0 -+ pshufd $0x4e,%xmm3,%xmm3 -+ pshufd $0x39,%xmm2,%xmm2 -+ movzbl 0x8(%rcx),%eax -+ movd (%rsi,%rax,4),%xmm6 -+ movzbl 0x9(%rcx),%eax -+ movd (%rsi,%rax,4),%xmm7 -+ movzbl 0xa(%rcx),%eax -+ movd (%rsi,%rax,4),%xmm4 -+ movzbl 0xb(%rcx),%eax -+ movd (%rsi,%rax,4),%xmm5 -+ punpckldq %xmm7,%xmm6 -+ punpckldq %xmm5,%xmm4 -+ punpcklqdq %xmm4,%xmm6 -+ paddd %xmm6,%xmm0 -+ paddd %xmm1,%xmm0 -+ pxor %xmm0,%xmm3 -+ pshufb %xmm12,%xmm3 -+ paddd %xmm3,%xmm2 -+ pxor %xmm2,%xmm1 -+ movdqa %xmm1,%xmm8 -+ psrld $0xc,%xmm1 -+ pslld $0x14,%xmm8 -+ por %xmm8,%xmm1 -+ movzbl 0xc(%rcx),%eax -+ movd (%rsi,%rax,4),%xmm7 -+ movzbl 0xd(%rcx),%eax -+ movd (%rsi,%rax,4),%xmm4 -+ movzbl 0xe(%rcx),%eax -+ movd (%rsi,%rax,4),%xmm5 -+ movzbl 0xf(%rcx),%eax -+ movd (%rsi,%rax,4),%xmm6 -+ punpckldq %xmm4,%xmm7 -+ punpckldq %xmm6,%xmm5 -+ punpcklqdq %xmm5,%xmm7 -+ paddd %xmm7,%xmm0 -+ paddd %xmm1,%xmm0 -+ pxor %xmm0,%xmm3 -+ pshufb %xmm13,%xmm3 -+ paddd %xmm3,%xmm2 -+ pxor %xmm2,%xmm1 -+ movdqa %xmm1,%xmm8 -+ psrld $0x7,%xmm1 -+ pslld $0x19,%xmm8 -+ por %xmm8,%xmm1 -+ pshufd $0x39,%xmm0,%xmm0 -+ pshufd $0x4e,%xmm3,%xmm3 -+ pshufd $0x93,%xmm2,%xmm2 -+ addq $0x10,%rcx -+ cmpq %r8,%rcx -+ jnz .Lroundloop -+ pxor %xmm2,%xmm0 -+ pxor %xmm3,%xmm1 -+ pxor %xmm10,%xmm0 -+ pxor %xmm11,%xmm1 -+ addq $0x40,%rsi -+ decq %rdx -+ jnz .Lbeginofloop -+ movdqu %xmm0,(%rdi) -+ movdqu %xmm1,0x10(%rdi) -+ movdqu %xmm14,0x20(%rdi) -+.Lendofloop: -+ ret -+ENDPROC(blake2s_compress_ssse3) -+#endif /* CONFIG_AS_SSSE3 */ -+ -+#ifdef CONFIG_AS_AVX512 -+ENTRY(blake2s_compress_avx512) -+ vmovdqu (%rdi),%xmm0 -+ vmovdqu 0x10(%rdi),%xmm1 -+ vmovdqu 0x20(%rdi),%xmm4 -+ vmovq %rcx,%xmm5 -+ vmovdqa IV(%rip),%xmm14 -+ vmovdqa IV+16(%rip),%xmm15 -+ jmp .Lblake2s_compress_avx512_mainloop -+.align 32 -+.Lblake2s_compress_avx512_mainloop: -+ vmovdqa %xmm0,%xmm10 -+ vmovdqa %xmm1,%xmm11 -+ vpaddq %xmm5,%xmm4,%xmm4 -+ vmovdqa %xmm14,%xmm2 -+ vpxor %xmm15,%xmm4,%xmm3 -+ vmovdqu (%rsi),%ymm6 -+ vmovdqu 0x20(%rsi),%ymm7 -+ addq $0x40,%rsi -+ leaq SIGMA2(%rip),%rax -+ movb $0xa,%cl -+.Lblake2s_compress_avx512_roundloop: -+ addq $0x40,%rax -+ vmovdqa -0x40(%rax),%ymm8 -+ vmovdqa -0x20(%rax),%ymm9 -+ vpermi2d %ymm7,%ymm6,%ymm8 -+ vpermi2d %ymm7,%ymm6,%ymm9 -+ vmovdqa %ymm8,%ymm6 -+ vmovdqa %ymm9,%ymm7 -+ vpaddd %xmm8,%xmm0,%xmm0 -+ vpaddd %xmm1,%xmm0,%xmm0 -+ vpxor %xmm0,%xmm3,%xmm3 -+ vprord $0x10,%xmm3,%xmm3 -+ vpaddd %xmm3,%xmm2,%xmm2 -+ vpxor %xmm2,%xmm1,%xmm1 -+ vprord $0xc,%xmm1,%xmm1 -+ vextracti128 $0x1,%ymm8,%xmm8 -+ vpaddd %xmm8,%xmm0,%xmm0 -+ vpaddd %xmm1,%xmm0,%xmm0 -+ vpxor %xmm0,%xmm3,%xmm3 -+ vprord $0x8,%xmm3,%xmm3 -+ vpaddd %xmm3,%xmm2,%xmm2 -+ vpxor %xmm2,%xmm1,%xmm1 -+ vprord $0x7,%xmm1,%xmm1 -+ vpshufd $0x93,%xmm0,%xmm0 -+ vpshufd $0x4e,%xmm3,%xmm3 -+ vpshufd $0x39,%xmm2,%xmm2 -+ vpaddd %xmm9,%xmm0,%xmm0 -+ vpaddd %xmm1,%xmm0,%xmm0 -+ vpxor %xmm0,%xmm3,%xmm3 -+ vprord $0x10,%xmm3,%xmm3 -+ vpaddd %xmm3,%xmm2,%xmm2 -+ vpxor %xmm2,%xmm1,%xmm1 -+ vprord $0xc,%xmm1,%xmm1 -+ vextracti128 $0x1,%ymm9,%xmm9 -+ vpaddd %xmm9,%xmm0,%xmm0 -+ vpaddd %xmm1,%xmm0,%xmm0 -+ vpxor %xmm0,%xmm3,%xmm3 -+ vprord $0x8,%xmm3,%xmm3 -+ vpaddd %xmm3,%xmm2,%xmm2 -+ vpxor %xmm2,%xmm1,%xmm1 -+ vprord $0x7,%xmm1,%xmm1 -+ vpshufd $0x39,%xmm0,%xmm0 -+ vpshufd $0x4e,%xmm3,%xmm3 -+ vpshufd $0x93,%xmm2,%xmm2 -+ decb %cl -+ jne .Lblake2s_compress_avx512_roundloop -+ vpxor %xmm10,%xmm0,%xmm0 -+ vpxor %xmm11,%xmm1,%xmm1 -+ vpxor %xmm2,%xmm0,%xmm0 -+ vpxor %xmm3,%xmm1,%xmm1 -+ decq %rdx -+ jne .Lblake2s_compress_avx512_mainloop -+ vmovdqu %xmm0,(%rdi) -+ vmovdqu %xmm1,0x10(%rdi) -+ vmovdqu %xmm4,0x20(%rdi) -+ vzeroupper -+ retq -+ENDPROC(blake2s_compress_avx512) -+#endif /* CONFIG_AS_AVX512 */ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/chacha20/chacha20-mips.S 2019-08-20 20:26:42.396341425 +0000 -@@ -0,0 +1,424 @@ -+/* SPDX-License-Identifier: GPL-2.0 OR MIT */ -+/* -+ * Copyright (C) 2016-2018 René van Dorst . All Rights Reserved. -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#define MASK_U32 0x3c -+#define CHACHA20_BLOCK_SIZE 64 -+#define STACK_SIZE 32 -+ -+#define X0 $t0 -+#define X1 $t1 -+#define X2 $t2 -+#define X3 $t3 -+#define X4 $t4 -+#define X5 $t5 -+#define X6 $t6 -+#define X7 $t7 -+#define X8 $t8 -+#define X9 $t9 -+#define X10 $v1 -+#define X11 $s6 -+#define X12 $s5 -+#define X13 $s4 -+#define X14 $s3 -+#define X15 $s2 -+/* Use regs which are overwritten on exit for Tx so we don't leak clear data. */ -+#define T0 $s1 -+#define T1 $s0 -+#define T(n) T ## n -+#define X(n) X ## n -+ -+/* Input arguments */ -+#define STATE $a0 -+#define OUT $a1 -+#define IN $a2 -+#define BYTES $a3 -+ -+/* Output argument */ -+/* NONCE[0] is kept in a register and not in memory. -+ * We don't want to touch original value in memory. -+ * Must be incremented every loop iteration. -+ */ -+#define NONCE_0 $v0 -+ -+/* SAVED_X and SAVED_CA are set in the jump table. -+ * Use regs which are overwritten on exit else we don't leak clear data. -+ * They are used to handling the last bytes which are not multiple of 4. -+ */ -+#define SAVED_X X15 -+#define SAVED_CA $s7 -+ -+#define IS_UNALIGNED $s7 -+ -+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -+#define MSB 0 -+#define LSB 3 -+#define ROTx rotl -+#define ROTR(n) rotr n, 24 -+#define CPU_TO_LE32(n) \ -+ wsbh n; \ -+ rotr n, 16; -+#else -+#define MSB 3 -+#define LSB 0 -+#define ROTx rotr -+#define CPU_TO_LE32(n) -+#define ROTR(n) -+#endif -+ -+#define FOR_EACH_WORD(x) \ -+ x( 0); \ -+ x( 1); \ -+ x( 2); \ -+ x( 3); \ -+ x( 4); \ -+ x( 5); \ -+ x( 6); \ -+ x( 7); \ -+ x( 8); \ -+ x( 9); \ -+ x(10); \ -+ x(11); \ -+ x(12); \ -+ x(13); \ -+ x(14); \ -+ x(15); -+ -+#define FOR_EACH_WORD_REV(x) \ -+ x(15); \ -+ x(14); \ -+ x(13); \ -+ x(12); \ -+ x(11); \ -+ x(10); \ -+ x( 9); \ -+ x( 8); \ -+ x( 7); \ -+ x( 6); \ -+ x( 5); \ -+ x( 4); \ -+ x( 3); \ -+ x( 2); \ -+ x( 1); \ -+ x( 0); -+ -+#define PLUS_ONE_0 1 -+#define PLUS_ONE_1 2 -+#define PLUS_ONE_2 3 -+#define PLUS_ONE_3 4 -+#define PLUS_ONE_4 5 -+#define PLUS_ONE_5 6 -+#define PLUS_ONE_6 7 -+#define PLUS_ONE_7 8 -+#define PLUS_ONE_8 9 -+#define PLUS_ONE_9 10 -+#define PLUS_ONE_10 11 -+#define PLUS_ONE_11 12 -+#define PLUS_ONE_12 13 -+#define PLUS_ONE_13 14 -+#define PLUS_ONE_14 15 -+#define PLUS_ONE_15 16 -+#define PLUS_ONE(x) PLUS_ONE_ ## x -+#define _CONCAT3(a,b,c) a ## b ## c -+#define CONCAT3(a,b,c) _CONCAT3(a,b,c) -+ -+#define STORE_UNALIGNED(x) \ -+CONCAT3(.Lchacha20_mips_xor_unaligned_, PLUS_ONE(x), _b: ;) \ -+ .if (x != 12); \ -+ lw T0, (x*4)(STATE); \ -+ .endif; \ -+ lwl T1, (x*4)+MSB ## (IN); \ -+ lwr T1, (x*4)+LSB ## (IN); \ -+ .if (x == 12); \ -+ addu X ## x, NONCE_0; \ -+ .else; \ -+ addu X ## x, T0; \ -+ .endif; \ -+ CPU_TO_LE32(X ## x); \ -+ xor X ## x, T1; \ -+ swl X ## x, (x*4)+MSB ## (OUT); \ -+ swr X ## x, (x*4)+LSB ## (OUT); -+ -+#define STORE_ALIGNED(x) \ -+CONCAT3(.Lchacha20_mips_xor_aligned_, PLUS_ONE(x), _b: ;) \ -+ .if (x != 12); \ -+ lw T0, (x*4)(STATE); \ -+ .endif; \ -+ lw T1, (x*4) ## (IN); \ -+ .if (x == 12); \ -+ addu X ## x, NONCE_0; \ -+ .else; \ -+ addu X ## x, T0; \ -+ .endif; \ -+ CPU_TO_LE32(X ## x); \ -+ xor X ## x, T1; \ -+ sw X ## x, (x*4) ## (OUT); -+ -+/* Jump table macro. -+ * Used for setup and handling the last bytes, which are not multiple of 4. -+ * X15 is free to store Xn -+ * Every jumptable entry must be equal in size. -+ */ -+#define JMPTBL_ALIGNED(x) \ -+.Lchacha20_mips_jmptbl_aligned_ ## x: ; \ -+ .set noreorder; \ -+ b .Lchacha20_mips_xor_aligned_ ## x ## _b; \ -+ .if (x == 12); \ -+ addu SAVED_X, X ## x, NONCE_0; \ -+ .else; \ -+ addu SAVED_X, X ## x, SAVED_CA; \ -+ .endif; \ -+ .set reorder -+ -+#define JMPTBL_UNALIGNED(x) \ -+.Lchacha20_mips_jmptbl_unaligned_ ## x: ; \ -+ .set noreorder; \ -+ b .Lchacha20_mips_xor_unaligned_ ## x ## _b; \ -+ .if (x == 12); \ -+ addu SAVED_X, X ## x, NONCE_0; \ -+ .else; \ -+ addu SAVED_X, X ## x, SAVED_CA; \ -+ .endif; \ -+ .set reorder -+ -+#define AXR(A, B, C, D, K, L, M, N, V, W, Y, Z, S) \ -+ addu X(A), X(K); \ -+ addu X(B), X(L); \ -+ addu X(C), X(M); \ -+ addu X(D), X(N); \ -+ xor X(V), X(A); \ -+ xor X(W), X(B); \ -+ xor X(Y), X(C); \ -+ xor X(Z), X(D); \ -+ rotl X(V), S; \ -+ rotl X(W), S; \ -+ rotl X(Y), S; \ -+ rotl X(Z), S; -+ -+.text -+.set reorder -+.set noat -+.globl chacha20_mips -+.ent chacha20_mips -+chacha20_mips: -+ .frame $sp, STACK_SIZE, $ra -+ -+ addiu $sp, -STACK_SIZE -+ -+ /* Return bytes = 0. */ -+ beqz BYTES, .Lchacha20_mips_end -+ -+ lw NONCE_0, 48(STATE) -+ -+ /* Save s0-s7 */ -+ sw $s0, 0($sp) -+ sw $s1, 4($sp) -+ sw $s2, 8($sp) -+ sw $s3, 12($sp) -+ sw $s4, 16($sp) -+ sw $s5, 20($sp) -+ sw $s6, 24($sp) -+ sw $s7, 28($sp) -+ -+ /* Test IN or OUT is unaligned. -+ * IS_UNALIGNED = ( IN | OUT ) & 0x00000003 -+ */ -+ or IS_UNALIGNED, IN, OUT -+ andi IS_UNALIGNED, 0x3 -+ -+ /* Set number of rounds */ -+ li $at, 20 -+ -+ b .Lchacha20_rounds_start -+ -+.align 4 -+.Loop_chacha20_rounds: -+ addiu IN, CHACHA20_BLOCK_SIZE -+ addiu OUT, CHACHA20_BLOCK_SIZE -+ addiu NONCE_0, 1 -+ -+.Lchacha20_rounds_start: -+ lw X0, 0(STATE) -+ lw X1, 4(STATE) -+ lw X2, 8(STATE) -+ lw X3, 12(STATE) -+ -+ lw X4, 16(STATE) -+ lw X5, 20(STATE) -+ lw X6, 24(STATE) -+ lw X7, 28(STATE) -+ lw X8, 32(STATE) -+ lw X9, 36(STATE) -+ lw X10, 40(STATE) -+ lw X11, 44(STATE) -+ -+ move X12, NONCE_0 -+ lw X13, 52(STATE) -+ lw X14, 56(STATE) -+ lw X15, 60(STATE) -+ -+.Loop_chacha20_xor_rounds: -+ addiu $at, -2 -+ AXR( 0, 1, 2, 3, 4, 5, 6, 7, 12,13,14,15, 16); -+ AXR( 8, 9,10,11, 12,13,14,15, 4, 5, 6, 7, 12); -+ AXR( 0, 1, 2, 3, 4, 5, 6, 7, 12,13,14,15, 8); -+ AXR( 8, 9,10,11, 12,13,14,15, 4, 5, 6, 7, 7); -+ AXR( 0, 1, 2, 3, 5, 6, 7, 4, 15,12,13,14, 16); -+ AXR(10,11, 8, 9, 15,12,13,14, 5, 6, 7, 4, 12); -+ AXR( 0, 1, 2, 3, 5, 6, 7, 4, 15,12,13,14, 8); -+ AXR(10,11, 8, 9, 15,12,13,14, 5, 6, 7, 4, 7); -+ bnez $at, .Loop_chacha20_xor_rounds -+ -+ addiu BYTES, -(CHACHA20_BLOCK_SIZE) -+ -+ /* Is data src/dst unaligned? Jump */ -+ bnez IS_UNALIGNED, .Loop_chacha20_unaligned -+ -+ /* Set number rounds here to fill delayslot. */ -+ li $at, 20 -+ -+ /* BYTES < 0, it has no full block. */ -+ bltz BYTES, .Lchacha20_mips_no_full_block_aligned -+ -+ FOR_EACH_WORD_REV(STORE_ALIGNED) -+ -+ /* BYTES > 0? Loop again. */ -+ bgtz BYTES, .Loop_chacha20_rounds -+ -+ /* Place this here to fill delay slot */ -+ addiu NONCE_0, 1 -+ -+ /* BYTES < 0? Handle last bytes */ -+ bltz BYTES, .Lchacha20_mips_xor_bytes -+ -+.Lchacha20_mips_xor_done: -+ /* Restore used registers */ -+ lw $s0, 0($sp) -+ lw $s1, 4($sp) -+ lw $s2, 8($sp) -+ lw $s3, 12($sp) -+ lw $s4, 16($sp) -+ lw $s5, 20($sp) -+ lw $s6, 24($sp) -+ lw $s7, 28($sp) -+ -+ /* Write NONCE_0 back to right location in state */ -+ sw NONCE_0, 48(STATE) -+ -+.Lchacha20_mips_end: -+ addiu $sp, STACK_SIZE -+ jr $ra -+ -+.Lchacha20_mips_no_full_block_aligned: -+ /* Restore the offset on BYTES */ -+ addiu BYTES, CHACHA20_BLOCK_SIZE -+ -+ /* Get number of full WORDS */ -+ andi $at, BYTES, MASK_U32 -+ -+ /* Load upper half of jump table addr */ -+ lui T0, %hi(.Lchacha20_mips_jmptbl_aligned_0) -+ -+ /* Calculate lower half jump table offset */ -+ ins T0, $at, 1, 6 -+ -+ /* Add offset to STATE */ -+ addu T1, STATE, $at -+ -+ /* Add lower half jump table addr */ -+ addiu T0, %lo(.Lchacha20_mips_jmptbl_aligned_0) -+ -+ /* Read value from STATE */ -+ lw SAVED_CA, 0(T1) -+ -+ /* Store remaining bytecounter as negative value */ -+ subu BYTES, $at, BYTES -+ -+ jr T0 -+ -+ /* Jump table */ -+ FOR_EACH_WORD(JMPTBL_ALIGNED) -+ -+ -+.Loop_chacha20_unaligned: -+ /* Set number rounds here to fill delayslot. */ -+ li $at, 20 -+ -+ /* BYTES > 0, it has no full block. */ -+ bltz BYTES, .Lchacha20_mips_no_full_block_unaligned -+ -+ FOR_EACH_WORD_REV(STORE_UNALIGNED) -+ -+ /* BYTES > 0? Loop again. */ -+ bgtz BYTES, .Loop_chacha20_rounds -+ -+ /* Write NONCE_0 back to right location in state */ -+ sw NONCE_0, 48(STATE) -+ -+ .set noreorder -+ /* Fall through to byte handling */ -+ bgez BYTES, .Lchacha20_mips_xor_done -+.Lchacha20_mips_xor_unaligned_0_b: -+.Lchacha20_mips_xor_aligned_0_b: -+ /* Place this here to fill delay slot */ -+ addiu NONCE_0, 1 -+ .set reorder -+ -+.Lchacha20_mips_xor_bytes: -+ addu IN, $at -+ addu OUT, $at -+ /* First byte */ -+ lbu T1, 0(IN) -+ addiu $at, BYTES, 1 -+ CPU_TO_LE32(SAVED_X) -+ ROTR(SAVED_X) -+ xor T1, SAVED_X -+ sb T1, 0(OUT) -+ beqz $at, .Lchacha20_mips_xor_done -+ /* Second byte */ -+ lbu T1, 1(IN) -+ addiu $at, BYTES, 2 -+ ROTx SAVED_X, 8 -+ xor T1, SAVED_X -+ sb T1, 1(OUT) -+ beqz $at, .Lchacha20_mips_xor_done -+ /* Third byte */ -+ lbu T1, 2(IN) -+ ROTx SAVED_X, 8 -+ xor T1, SAVED_X -+ sb T1, 2(OUT) -+ b .Lchacha20_mips_xor_done -+ -+.Lchacha20_mips_no_full_block_unaligned: -+ /* Restore the offset on BYTES */ -+ addiu BYTES, CHACHA20_BLOCK_SIZE -+ -+ /* Get number of full WORDS */ -+ andi $at, BYTES, MASK_U32 -+ -+ /* Load upper half of jump table addr */ -+ lui T0, %hi(.Lchacha20_mips_jmptbl_unaligned_0) -+ -+ /* Calculate lower half jump table offset */ -+ ins T0, $at, 1, 6 -+ -+ /* Add offset to STATE */ -+ addu T1, STATE, $at -+ -+ /* Add lower half jump table addr */ -+ addiu T0, %lo(.Lchacha20_mips_jmptbl_unaligned_0) -+ -+ /* Read value from STATE */ -+ lw SAVED_CA, 0(T1) -+ -+ /* Store remaining bytecounter as negative value */ -+ subu BYTES, $at, BYTES -+ -+ jr T0 -+ -+ /* Jump table */ -+ FOR_EACH_WORD(JMPTBL_UNALIGNED) -+.end chacha20_mips -+.set at ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/chacha20/chacha20-unrolled-arm.S 2019-08-20 20:26:42.397341426 +0000 -@@ -0,0 +1,461 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2018 Google, Inc. -+ */ -+ -+#include -+#include -+ -+/* -+ * Design notes: -+ * -+ * 16 registers would be needed to hold the state matrix, but only 14 are -+ * available because 'sp' and 'pc' cannot be used. So we spill the elements -+ * (x8, x9) to the stack and swap them out with (x10, x11). This adds one -+ * 'ldrd' and one 'strd' instruction per round. -+ * -+ * All rotates are performed using the implicit rotate operand accepted by the -+ * 'add' and 'eor' instructions. This is faster than using explicit rotate -+ * instructions. To make this work, we allow the values in the second and last -+ * rows of the ChaCha state matrix (rows 'b' and 'd') to temporarily have the -+ * wrong rotation amount. The rotation amount is then fixed up just in time -+ * when the values are used. 'brot' is the number of bits the values in row 'b' -+ * need to be rotated right to arrive at the correct values, and 'drot' -+ * similarly for row 'd'. (brot, drot) start out as (0, 0) but we make it such -+ * that they end up as (25, 24) after every round. -+ */ -+ -+ // ChaCha state registers -+ X0 .req r0 -+ X1 .req r1 -+ X2 .req r2 -+ X3 .req r3 -+ X4 .req r4 -+ X5 .req r5 -+ X6 .req r6 -+ X7 .req r7 -+ X8_X10 .req r8 // shared by x8 and x10 -+ X9_X11 .req r9 // shared by x9 and x11 -+ X12 .req r10 -+ X13 .req r11 -+ X14 .req r12 -+ X15 .req r14 -+ -+.Lexpand_32byte_k: -+ // "expand 32-byte k" -+ .word 0x61707865, 0x3320646e, 0x79622d32, 0x6b206574 -+ -+#ifdef __thumb2__ -+# define adrl adr -+#endif -+ -+.macro __rev out, in, t0, t1, t2 -+.if __LINUX_ARM_ARCH__ >= 6 -+ rev \out, \in -+.else -+ lsl \t0, \in, #24 -+ and \t1, \in, #0xff00 -+ and \t2, \in, #0xff0000 -+ orr \out, \t0, \in, lsr #24 -+ orr \out, \out, \t1, lsl #8 -+ orr \out, \out, \t2, lsr #8 -+.endif -+.endm -+ -+.macro _le32_bswap x, t0, t1, t2 -+#ifdef __ARMEB__ -+ __rev \x, \x, \t0, \t1, \t2 -+#endif -+.endm -+ -+.macro _le32_bswap_4x a, b, c, d, t0, t1, t2 -+ _le32_bswap \a, \t0, \t1, \t2 -+ _le32_bswap \b, \t0, \t1, \t2 -+ _le32_bswap \c, \t0, \t1, \t2 -+ _le32_bswap \d, \t0, \t1, \t2 -+.endm -+ -+.macro __ldrd a, b, src, offset -+#if __LINUX_ARM_ARCH__ >= 6 -+ ldrd \a, \b, [\src, #\offset] -+#else -+ ldr \a, [\src, #\offset] -+ ldr \b, [\src, #\offset + 4] -+#endif -+.endm -+ -+.macro __strd a, b, dst, offset -+#if __LINUX_ARM_ARCH__ >= 6 -+ strd \a, \b, [\dst, #\offset] -+#else -+ str \a, [\dst, #\offset] -+ str \b, [\dst, #\offset + 4] -+#endif -+.endm -+ -+.macro _halfround a1, b1, c1, d1, a2, b2, c2, d2 -+ -+ // a += b; d ^= a; d = rol(d, 16); -+ add \a1, \a1, \b1, ror #brot -+ add \a2, \a2, \b2, ror #brot -+ eor \d1, \a1, \d1, ror #drot -+ eor \d2, \a2, \d2, ror #drot -+ // drot == 32 - 16 == 16 -+ -+ // c += d; b ^= c; b = rol(b, 12); -+ add \c1, \c1, \d1, ror #16 -+ add \c2, \c2, \d2, ror #16 -+ eor \b1, \c1, \b1, ror #brot -+ eor \b2, \c2, \b2, ror #brot -+ // brot == 32 - 12 == 20 -+ -+ // a += b; d ^= a; d = rol(d, 8); -+ add \a1, \a1, \b1, ror #20 -+ add \a2, \a2, \b2, ror #20 -+ eor \d1, \a1, \d1, ror #16 -+ eor \d2, \a2, \d2, ror #16 -+ // drot == 32 - 8 == 24 -+ -+ // c += d; b ^= c; b = rol(b, 7); -+ add \c1, \c1, \d1, ror #24 -+ add \c2, \c2, \d2, ror #24 -+ eor \b1, \c1, \b1, ror #20 -+ eor \b2, \c2, \b2, ror #20 -+ // brot == 32 - 7 == 25 -+.endm -+ -+.macro _doubleround -+ -+ // column round -+ -+ // quarterrounds: (x0, x4, x8, x12) and (x1, x5, x9, x13) -+ _halfround X0, X4, X8_X10, X12, X1, X5, X9_X11, X13 -+ -+ // save (x8, x9); restore (x10, x11) -+ __strd X8_X10, X9_X11, sp, 0 -+ __ldrd X8_X10, X9_X11, sp, 8 -+ -+ // quarterrounds: (x2, x6, x10, x14) and (x3, x7, x11, x15) -+ _halfround X2, X6, X8_X10, X14, X3, X7, X9_X11, X15 -+ -+ .set brot, 25 -+ .set drot, 24 -+ -+ // diagonal round -+ -+ // quarterrounds: (x0, x5, x10, x15) and (x1, x6, x11, x12) -+ _halfround X0, X5, X8_X10, X15, X1, X6, X9_X11, X12 -+ -+ // save (x10, x11); restore (x8, x9) -+ __strd X8_X10, X9_X11, sp, 8 -+ __ldrd X8_X10, X9_X11, sp, 0 -+ -+ // quarterrounds: (x2, x7, x8, x13) and (x3, x4, x9, x14) -+ _halfround X2, X7, X8_X10, X13, X3, X4, X9_X11, X14 -+.endm -+ -+.macro _chacha_permute nrounds -+ .set brot, 0 -+ .set drot, 0 -+ .rept \nrounds / 2 -+ _doubleround -+ .endr -+.endm -+ -+.macro _chacha nrounds -+ -+.Lnext_block\@: -+ // Stack: unused0-unused1 x10-x11 x0-x15 OUT IN LEN -+ // Registers contain x0-x9,x12-x15. -+ -+ // Do the core ChaCha permutation to update x0-x15. -+ _chacha_permute \nrounds -+ -+ add sp, #8 -+ // Stack: x10-x11 orig_x0-orig_x15 OUT IN LEN -+ // Registers contain x0-x9,x12-x15. -+ // x4-x7 are rotated by 'brot'; x12-x15 are rotated by 'drot'. -+ -+ // Free up some registers (r8-r12,r14) by pushing (x8-x9,x12-x15). -+ push {X8_X10, X9_X11, X12, X13, X14, X15} -+ -+ // Load (OUT, IN, LEN). -+ ldr r14, [sp, #96] -+ ldr r12, [sp, #100] -+ ldr r11, [sp, #104] -+ -+ orr r10, r14, r12 -+ -+ // Use slow path if fewer than 64 bytes remain. -+ cmp r11, #64 -+ blt .Lxor_slowpath\@ -+ -+ // Use slow path if IN and/or OUT isn't 4-byte aligned. Needed even on -+ // ARMv6+, since ldmia and stmia (used below) still require alignment. -+ tst r10, #3 -+ bne .Lxor_slowpath\@ -+ -+ // Fast path: XOR 64 bytes of aligned data. -+ -+ // Stack: x8-x9 x12-x15 x10-x11 orig_x0-orig_x15 OUT IN LEN -+ // Registers: r0-r7 are x0-x7; r8-r11 are free; r12 is IN; r14 is OUT. -+ // x4-x7 are rotated by 'brot'; x12-x15 are rotated by 'drot'. -+ -+ // x0-x3 -+ __ldrd r8, r9, sp, 32 -+ __ldrd r10, r11, sp, 40 -+ add X0, X0, r8 -+ add X1, X1, r9 -+ add X2, X2, r10 -+ add X3, X3, r11 -+ _le32_bswap_4x X0, X1, X2, X3, r8, r9, r10 -+ ldmia r12!, {r8-r11} -+ eor X0, X0, r8 -+ eor X1, X1, r9 -+ eor X2, X2, r10 -+ eor X3, X3, r11 -+ stmia r14!, {X0-X3} -+ -+ // x4-x7 -+ __ldrd r8, r9, sp, 48 -+ __ldrd r10, r11, sp, 56 -+ add X4, r8, X4, ror #brot -+ add X5, r9, X5, ror #brot -+ ldmia r12!, {X0-X3} -+ add X6, r10, X6, ror #brot -+ add X7, r11, X7, ror #brot -+ _le32_bswap_4x X4, X5, X6, X7, r8, r9, r10 -+ eor X4, X4, X0 -+ eor X5, X5, X1 -+ eor X6, X6, X2 -+ eor X7, X7, X3 -+ stmia r14!, {X4-X7} -+ -+ // x8-x15 -+ pop {r0-r7} // (x8-x9,x12-x15,x10-x11) -+ __ldrd r8, r9, sp, 32 -+ __ldrd r10, r11, sp, 40 -+ add r0, r0, r8 // x8 -+ add r1, r1, r9 // x9 -+ add r6, r6, r10 // x10 -+ add r7, r7, r11 // x11 -+ _le32_bswap_4x r0, r1, r6, r7, r8, r9, r10 -+ ldmia r12!, {r8-r11} -+ eor r0, r0, r8 // x8 -+ eor r1, r1, r9 // x9 -+ eor r6, r6, r10 // x10 -+ eor r7, r7, r11 // x11 -+ stmia r14!, {r0,r1,r6,r7} -+ ldmia r12!, {r0,r1,r6,r7} -+ __ldrd r8, r9, sp, 48 -+ __ldrd r10, r11, sp, 56 -+ add r2, r8, r2, ror #drot // x12 -+ add r3, r9, r3, ror #drot // x13 -+ add r4, r10, r4, ror #drot // x14 -+ add r5, r11, r5, ror #drot // x15 -+ _le32_bswap_4x r2, r3, r4, r5, r9, r10, r11 -+ ldr r9, [sp, #72] // load LEN -+ eor r2, r2, r0 // x12 -+ eor r3, r3, r1 // x13 -+ eor r4, r4, r6 // x14 -+ eor r5, r5, r7 // x15 -+ subs r9, #64 // decrement and check LEN -+ stmia r14!, {r2-r5} -+ -+ beq .Ldone\@ -+ -+.Lprepare_for_next_block\@: -+ -+ // Stack: x0-x15 OUT IN LEN -+ -+ // Increment block counter (x12) -+ add r8, #1 -+ -+ // Store updated (OUT, IN, LEN) -+ str r14, [sp, #64] -+ str r12, [sp, #68] -+ str r9, [sp, #72] -+ -+ mov r14, sp -+ -+ // Store updated block counter (x12) -+ str r8, [sp, #48] -+ -+ sub sp, #16 -+ -+ // Reload state and do next block -+ ldmia r14!, {r0-r11} // load x0-x11 -+ __strd r10, r11, sp, 8 // store x10-x11 before state -+ ldmia r14, {r10-r12,r14} // load x12-x15 -+ b .Lnext_block\@ -+ -+.Lxor_slowpath\@: -+ // Slow path: < 64 bytes remaining, or unaligned input or output buffer. -+ // We handle it by storing the 64 bytes of keystream to the stack, then -+ // XOR-ing the needed portion with the data. -+ -+ // Allocate keystream buffer -+ sub sp, #64 -+ mov r14, sp -+ -+ // Stack: ks0-ks15 x8-x9 x12-x15 x10-x11 orig_x0-orig_x15 OUT IN LEN -+ // Registers: r0-r7 are x0-x7; r8-r11 are free; r12 is IN; r14 is &ks0. -+ // x4-x7 are rotated by 'brot'; x12-x15 are rotated by 'drot'. -+ -+ // Save keystream for x0-x3 -+ __ldrd r8, r9, sp, 96 -+ __ldrd r10, r11, sp, 104 -+ add X0, X0, r8 -+ add X1, X1, r9 -+ add X2, X2, r10 -+ add X3, X3, r11 -+ _le32_bswap_4x X0, X1, X2, X3, r8, r9, r10 -+ stmia r14!, {X0-X3} -+ -+ // Save keystream for x4-x7 -+ __ldrd r8, r9, sp, 112 -+ __ldrd r10, r11, sp, 120 -+ add X4, r8, X4, ror #brot -+ add X5, r9, X5, ror #brot -+ add X6, r10, X6, ror #brot -+ add X7, r11, X7, ror #brot -+ _le32_bswap_4x X4, X5, X6, X7, r8, r9, r10 -+ add r8, sp, #64 -+ stmia r14!, {X4-X7} -+ -+ // Save keystream for x8-x15 -+ ldm r8, {r0-r7} // (x8-x9,x12-x15,x10-x11) -+ __ldrd r8, r9, sp, 128 -+ __ldrd r10, r11, sp, 136 -+ add r0, r0, r8 // x8 -+ add r1, r1, r9 // x9 -+ add r6, r6, r10 // x10 -+ add r7, r7, r11 // x11 -+ _le32_bswap_4x r0, r1, r6, r7, r8, r9, r10 -+ stmia r14!, {r0,r1,r6,r7} -+ __ldrd r8, r9, sp, 144 -+ __ldrd r10, r11, sp, 152 -+ add r2, r8, r2, ror #drot // x12 -+ add r3, r9, r3, ror #drot // x13 -+ add r4, r10, r4, ror #drot // x14 -+ add r5, r11, r5, ror #drot // x15 -+ _le32_bswap_4x r2, r3, r4, r5, r9, r10, r11 -+ stmia r14, {r2-r5} -+ -+ // Stack: ks0-ks15 unused0-unused7 x0-x15 OUT IN LEN -+ // Registers: r8 is block counter, r12 is IN. -+ -+ ldr r9, [sp, #168] // LEN -+ ldr r14, [sp, #160] // OUT -+ cmp r9, #64 -+ mov r0, sp -+ movle r1, r9 -+ movgt r1, #64 -+ // r1 is number of bytes to XOR, in range [1, 64] -+ -+.if __LINUX_ARM_ARCH__ < 6 -+ orr r2, r12, r14 -+ tst r2, #3 // IN or OUT misaligned? -+ bne .Lxor_next_byte\@ -+.endif -+ -+ // XOR a word at a time -+.rept 16 -+ subs r1, #4 -+ blt .Lxor_words_done\@ -+ ldr r2, [r12], #4 -+ ldr r3, [r0], #4 -+ eor r2, r2, r3 -+ str r2, [r14], #4 -+.endr -+ b .Lxor_slowpath_done\@ -+.Lxor_words_done\@: -+ ands r1, r1, #3 -+ beq .Lxor_slowpath_done\@ -+ -+ // XOR a byte at a time -+.Lxor_next_byte\@: -+ ldrb r2, [r12], #1 -+ ldrb r3, [r0], #1 -+ eor r2, r2, r3 -+ strb r2, [r14], #1 -+ subs r1, #1 -+ bne .Lxor_next_byte\@ -+ -+.Lxor_slowpath_done\@: -+ subs r9, #64 -+ add sp, #96 -+ bgt .Lprepare_for_next_block\@ -+ -+.Ldone\@: -+.endm // _chacha -+ -+/* -+ * void chacha20_arm(u8 *out, const u8 *in, size_t len, const u32 key[8], -+ * const u32 iv[4]); -+ */ -+ENTRY(chacha20_arm) -+ cmp r2, #0 // len == 0? -+ reteq lr -+ -+ push {r0-r2,r4-r11,lr} -+ -+ // Push state x0-x15 onto stack. -+ // Also store an extra copy of x10-x11 just before the state. -+ -+ ldr r4, [sp, #48] // iv -+ mov r0, sp -+ sub sp, #80 -+ -+ // iv: x12-x15 -+ ldm r4, {X12,X13,X14,X15} -+ stmdb r0!, {X12,X13,X14,X15} -+ -+ // key: x4-x11 -+ __ldrd X8_X10, X9_X11, r3, 24 -+ __strd X8_X10, X9_X11, sp, 8 -+ stmdb r0!, {X8_X10, X9_X11} -+ ldm r3, {X4-X9_X11} -+ stmdb r0!, {X4-X9_X11} -+ -+ // constants: x0-x3 -+ adrl X3, .Lexpand_32byte_k -+ ldm X3, {X0-X3} -+ __strd X0, X1, sp, 16 -+ __strd X2, X3, sp, 24 -+ -+ _chacha 20 -+ -+ add sp, #76 -+ pop {r4-r11, pc} -+ENDPROC(chacha20_arm) -+ -+/* -+ * void hchacha20_arm(const u32 state[16], u32 out[8]); -+ */ -+ENTRY(hchacha20_arm) -+ push {r1,r4-r11,lr} -+ -+ mov r14, r0 -+ ldmia r14!, {r0-r11} // load x0-x11 -+ push {r10-r11} // store x10-x11 to stack -+ ldm r14, {r10-r12,r14} // load x12-x15 -+ sub sp, #8 -+ -+ _chacha_permute 20 -+ -+ // Skip over (unused0-unused1, x10-x11) -+ add sp, #16 -+ -+ // Fix up rotations of x12-x15 -+ ror X12, X12, #drot -+ ror X13, X13, #drot -+ pop {r4} // load 'out' -+ ror X14, X14, #drot -+ ror X15, X15, #drot -+ -+ // Store (x0-x3,x12-x15) to 'out' -+ stm r4, {X0,X1,X2,X3,X12,X13,X14,X15} -+ -+ pop {r4-r11,pc} -+ENDPROC(hchacha20_arm) ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/curve25519/curve25519-arm.S 2019-08-20 20:26:42.398341426 +0000 -@@ -0,0 +1,2064 @@ -+/* SPDX-License-Identifier: GPL-2.0 OR MIT */ -+/* -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ * -+ * Based on public domain code from Daniel J. Bernstein and Peter Schwabe. This -+ * began from SUPERCOP's curve25519/neon2/scalarmult.s, but has subsequently been -+ * manually reworked for use in kernel space. -+ */ -+ -+#if defined(CONFIG_KERNEL_MODE_NEON) && !defined(__ARMEB__) -+#include -+ -+.text -+.fpu neon -+.arch armv7-a -+.align 4 -+ -+ENTRY(curve25519_neon) -+ push {r4-r11, lr} -+ mov ip, sp -+ sub r3, sp, #704 -+ and r3, r3, #0xfffffff0 -+ mov sp, r3 -+ movw r4, #0 -+ movw r5, #254 -+ vmov.i32 q0, #1 -+ vshr.u64 q1, q0, #7 -+ vshr.u64 q0, q0, #8 -+ vmov.i32 d4, #19 -+ vmov.i32 d5, #38 -+ add r6, sp, #480 -+ vst1.8 {d2-d3}, [r6, : 128]! -+ vst1.8 {d0-d1}, [r6, : 128]! -+ vst1.8 {d4-d5}, [r6, : 128] -+ add r6, r3, #0 -+ vmov.i32 q2, #0 -+ vst1.8 {d4-d5}, [r6, : 128]! -+ vst1.8 {d4-d5}, [r6, : 128]! -+ vst1.8 d4, [r6, : 64] -+ add r6, r3, #0 -+ movw r7, #960 -+ sub r7, r7, #2 -+ neg r7, r7 -+ sub r7, r7, r7, LSL #7 -+ str r7, [r6] -+ add r6, sp, #672 -+ vld1.8 {d4-d5}, [r1]! -+ vld1.8 {d6-d7}, [r1] -+ vst1.8 {d4-d5}, [r6, : 128]! -+ vst1.8 {d6-d7}, [r6, : 128] -+ sub r1, r6, #16 -+ ldrb r6, [r1] -+ and r6, r6, #248 -+ strb r6, [r1] -+ ldrb r6, [r1, #31] -+ and r6, r6, #127 -+ orr r6, r6, #64 -+ strb r6, [r1, #31] -+ vmov.i64 q2, #0xffffffff -+ vshr.u64 q3, q2, #7 -+ vshr.u64 q2, q2, #6 -+ vld1.8 {d8}, [r2] -+ vld1.8 {d10}, [r2] -+ add r2, r2, #6 -+ vld1.8 {d12}, [r2] -+ vld1.8 {d14}, [r2] -+ add r2, r2, #6 -+ vld1.8 {d16}, [r2] -+ add r2, r2, #4 -+ vld1.8 {d18}, [r2] -+ vld1.8 {d20}, [r2] -+ add r2, r2, #6 -+ vld1.8 {d22}, [r2] -+ add r2, r2, #2 -+ vld1.8 {d24}, [r2] -+ vld1.8 {d26}, [r2] -+ vshr.u64 q5, q5, #26 -+ vshr.u64 q6, q6, #3 -+ vshr.u64 q7, q7, #29 -+ vshr.u64 q8, q8, #6 -+ vshr.u64 q10, q10, #25 -+ vshr.u64 q11, q11, #3 -+ vshr.u64 q12, q12, #12 -+ vshr.u64 q13, q13, #38 -+ vand q4, q4, q2 -+ vand q6, q6, q2 -+ vand q8, q8, q2 -+ vand q10, q10, q2 -+ vand q2, q12, q2 -+ vand q5, q5, q3 -+ vand q7, q7, q3 -+ vand q9, q9, q3 -+ vand q11, q11, q3 -+ vand q3, q13, q3 -+ add r2, r3, #48 -+ vadd.i64 q12, q4, q1 -+ vadd.i64 q13, q10, q1 -+ vshr.s64 q12, q12, #26 -+ vshr.s64 q13, q13, #26 -+ vadd.i64 q5, q5, q12 -+ vshl.i64 q12, q12, #26 -+ vadd.i64 q14, q5, q0 -+ vadd.i64 q11, q11, q13 -+ vshl.i64 q13, q13, #26 -+ vadd.i64 q15, q11, q0 -+ vsub.i64 q4, q4, q12 -+ vshr.s64 q12, q14, #25 -+ vsub.i64 q10, q10, q13 -+ vshr.s64 q13, q15, #25 -+ vadd.i64 q6, q6, q12 -+ vshl.i64 q12, q12, #25 -+ vadd.i64 q14, q6, q1 -+ vadd.i64 q2, q2, q13 -+ vsub.i64 q5, q5, q12 -+ vshr.s64 q12, q14, #26 -+ vshl.i64 q13, q13, #25 -+ vadd.i64 q14, q2, q1 -+ vadd.i64 q7, q7, q12 -+ vshl.i64 q12, q12, #26 -+ vadd.i64 q15, q7, q0 -+ vsub.i64 q11, q11, q13 -+ vshr.s64 q13, q14, #26 -+ vsub.i64 q6, q6, q12 -+ vshr.s64 q12, q15, #25 -+ vadd.i64 q3, q3, q13 -+ vshl.i64 q13, q13, #26 -+ vadd.i64 q14, q3, q0 -+ vadd.i64 q8, q8, q12 -+ vshl.i64 q12, q12, #25 -+ vadd.i64 q15, q8, q1 -+ add r2, r2, #8 -+ vsub.i64 q2, q2, q13 -+ vshr.s64 q13, q14, #25 -+ vsub.i64 q7, q7, q12 -+ vshr.s64 q12, q15, #26 -+ vadd.i64 q14, q13, q13 -+ vadd.i64 q9, q9, q12 -+ vtrn.32 d12, d14 -+ vshl.i64 q12, q12, #26 -+ vtrn.32 d13, d15 -+ vadd.i64 q0, q9, q0 -+ vadd.i64 q4, q4, q14 -+ vst1.8 d12, [r2, : 64]! -+ vshl.i64 q6, q13, #4 -+ vsub.i64 q7, q8, q12 -+ vshr.s64 q0, q0, #25 -+ vadd.i64 q4, q4, q6 -+ vadd.i64 q6, q10, q0 -+ vshl.i64 q0, q0, #25 -+ vadd.i64 q8, q6, q1 -+ vadd.i64 q4, q4, q13 -+ vshl.i64 q10, q13, #25 -+ vadd.i64 q1, q4, q1 -+ vsub.i64 q0, q9, q0 -+ vshr.s64 q8, q8, #26 -+ vsub.i64 q3, q3, q10 -+ vtrn.32 d14, d0 -+ vshr.s64 q1, q1, #26 -+ vtrn.32 d15, d1 -+ vadd.i64 q0, q11, q8 -+ vst1.8 d14, [r2, : 64] -+ vshl.i64 q7, q8, #26 -+ vadd.i64 q5, q5, q1 -+ vtrn.32 d4, d6 -+ vshl.i64 q1, q1, #26 -+ vtrn.32 d5, d7 -+ vsub.i64 q3, q6, q7 -+ add r2, r2, #16 -+ vsub.i64 q1, q4, q1 -+ vst1.8 d4, [r2, : 64] -+ vtrn.32 d6, d0 -+ vtrn.32 d7, d1 -+ sub r2, r2, #8 -+ vtrn.32 d2, d10 -+ vtrn.32 d3, d11 -+ vst1.8 d6, [r2, : 64] -+ sub r2, r2, #24 -+ vst1.8 d2, [r2, : 64] -+ add r2, r3, #96 -+ vmov.i32 q0, #0 -+ vmov.i64 d2, #0xff -+ vmov.i64 d3, #0 -+ vshr.u32 q1, q1, #7 -+ vst1.8 {d2-d3}, [r2, : 128]! -+ vst1.8 {d0-d1}, [r2, : 128]! -+ vst1.8 d0, [r2, : 64] -+ add r2, r3, #144 -+ vmov.i32 q0, #0 -+ vst1.8 {d0-d1}, [r2, : 128]! -+ vst1.8 {d0-d1}, [r2, : 128]! -+ vst1.8 d0, [r2, : 64] -+ add r2, r3, #240 -+ vmov.i32 q0, #0 -+ vmov.i64 d2, #0xff -+ vmov.i64 d3, #0 -+ vshr.u32 q1, q1, #7 -+ vst1.8 {d2-d3}, [r2, : 128]! -+ vst1.8 {d0-d1}, [r2, : 128]! -+ vst1.8 d0, [r2, : 64] -+ add r2, r3, #48 -+ add r6, r3, #192 -+ vld1.8 {d0-d1}, [r2, : 128]! -+ vld1.8 {d2-d3}, [r2, : 128]! -+ vld1.8 {d4}, [r2, : 64] -+ vst1.8 {d0-d1}, [r6, : 128]! -+ vst1.8 {d2-d3}, [r6, : 128]! -+ vst1.8 d4, [r6, : 64] -+.Lmainloop: -+ mov r2, r5, LSR #3 -+ and r6, r5, #7 -+ ldrb r2, [r1, r2] -+ mov r2, r2, LSR r6 -+ and r2, r2, #1 -+ str r5, [sp, #456] -+ eor r4, r4, r2 -+ str r2, [sp, #460] -+ neg r2, r4 -+ add r4, r3, #96 -+ add r5, r3, #192 -+ add r6, r3, #144 -+ vld1.8 {d8-d9}, [r4, : 128]! -+ add r7, r3, #240 -+ vld1.8 {d10-d11}, [r5, : 128]! -+ veor q6, q4, q5 -+ vld1.8 {d14-d15}, [r6, : 128]! -+ vdup.i32 q8, r2 -+ vld1.8 {d18-d19}, [r7, : 128]! -+ veor q10, q7, q9 -+ vld1.8 {d22-d23}, [r4, : 128]! -+ vand q6, q6, q8 -+ vld1.8 {d24-d25}, [r5, : 128]! -+ vand q10, q10, q8 -+ vld1.8 {d26-d27}, [r6, : 128]! -+ veor q4, q4, q6 -+ vld1.8 {d28-d29}, [r7, : 128]! -+ veor q5, q5, q6 -+ vld1.8 {d0}, [r4, : 64] -+ veor q6, q7, q10 -+ vld1.8 {d2}, [r5, : 64] -+ veor q7, q9, q10 -+ vld1.8 {d4}, [r6, : 64] -+ veor q9, q11, q12 -+ vld1.8 {d6}, [r7, : 64] -+ veor q10, q0, q1 -+ sub r2, r4, #32 -+ vand q9, q9, q8 -+ sub r4, r5, #32 -+ vand q10, q10, q8 -+ sub r5, r6, #32 -+ veor q11, q11, q9 -+ sub r6, r7, #32 -+ veor q0, q0, q10 -+ veor q9, q12, q9 -+ veor q1, q1, q10 -+ veor q10, q13, q14 -+ veor q12, q2, q3 -+ vand q10, q10, q8 -+ vand q8, q12, q8 -+ veor q12, q13, q10 -+ veor q2, q2, q8 -+ veor q10, q14, q10 -+ veor q3, q3, q8 -+ vadd.i32 q8, q4, q6 -+ vsub.i32 q4, q4, q6 -+ vst1.8 {d16-d17}, [r2, : 128]! -+ vadd.i32 q6, q11, q12 -+ vst1.8 {d8-d9}, [r5, : 128]! -+ vsub.i32 q4, q11, q12 -+ vst1.8 {d12-d13}, [r2, : 128]! -+ vadd.i32 q6, q0, q2 -+ vst1.8 {d8-d9}, [r5, : 128]! -+ vsub.i32 q0, q0, q2 -+ vst1.8 d12, [r2, : 64] -+ vadd.i32 q2, q5, q7 -+ vst1.8 d0, [r5, : 64] -+ vsub.i32 q0, q5, q7 -+ vst1.8 {d4-d5}, [r4, : 128]! -+ vadd.i32 q2, q9, q10 -+ vst1.8 {d0-d1}, [r6, : 128]! -+ vsub.i32 q0, q9, q10 -+ vst1.8 {d4-d5}, [r4, : 128]! -+ vadd.i32 q2, q1, q3 -+ vst1.8 {d0-d1}, [r6, : 128]! -+ vsub.i32 q0, q1, q3 -+ vst1.8 d4, [r4, : 64] -+ vst1.8 d0, [r6, : 64] -+ add r2, sp, #512 -+ add r4, r3, #96 -+ add r5, r3, #144 -+ vld1.8 {d0-d1}, [r2, : 128] -+ vld1.8 {d2-d3}, [r4, : 128]! -+ vld1.8 {d4-d5}, [r5, : 128]! -+ vzip.i32 q1, q2 -+ vld1.8 {d6-d7}, [r4, : 128]! -+ vld1.8 {d8-d9}, [r5, : 128]! -+ vshl.i32 q5, q1, #1 -+ vzip.i32 q3, q4 -+ vshl.i32 q6, q2, #1 -+ vld1.8 {d14}, [r4, : 64] -+ vshl.i32 q8, q3, #1 -+ vld1.8 {d15}, [r5, : 64] -+ vshl.i32 q9, q4, #1 -+ vmul.i32 d21, d7, d1 -+ vtrn.32 d14, d15 -+ vmul.i32 q11, q4, q0 -+ vmul.i32 q0, q7, q0 -+ vmull.s32 q12, d2, d2 -+ vmlal.s32 q12, d11, d1 -+ vmlal.s32 q12, d12, d0 -+ vmlal.s32 q12, d13, d23 -+ vmlal.s32 q12, d16, d22 -+ vmlal.s32 q12, d7, d21 -+ vmull.s32 q10, d2, d11 -+ vmlal.s32 q10, d4, d1 -+ vmlal.s32 q10, d13, d0 -+ vmlal.s32 q10, d6, d23 -+ vmlal.s32 q10, d17, d22 -+ vmull.s32 q13, d10, d4 -+ vmlal.s32 q13, d11, d3 -+ vmlal.s32 q13, d13, d1 -+ vmlal.s32 q13, d16, d0 -+ vmlal.s32 q13, d17, d23 -+ vmlal.s32 q13, d8, d22 -+ vmull.s32 q1, d10, d5 -+ vmlal.s32 q1, d11, d4 -+ vmlal.s32 q1, d6, d1 -+ vmlal.s32 q1, d17, d0 -+ vmlal.s32 q1, d8, d23 -+ vmull.s32 q14, d10, d6 -+ vmlal.s32 q14, d11, d13 -+ vmlal.s32 q14, d4, d4 -+ vmlal.s32 q14, d17, d1 -+ vmlal.s32 q14, d18, d0 -+ vmlal.s32 q14, d9, d23 -+ vmull.s32 q11, d10, d7 -+ vmlal.s32 q11, d11, d6 -+ vmlal.s32 q11, d12, d5 -+ vmlal.s32 q11, d8, d1 -+ vmlal.s32 q11, d19, d0 -+ vmull.s32 q15, d10, d8 -+ vmlal.s32 q15, d11, d17 -+ vmlal.s32 q15, d12, d6 -+ vmlal.s32 q15, d13, d5 -+ vmlal.s32 q15, d19, d1 -+ vmlal.s32 q15, d14, d0 -+ vmull.s32 q2, d10, d9 -+ vmlal.s32 q2, d11, d8 -+ vmlal.s32 q2, d12, d7 -+ vmlal.s32 q2, d13, d6 -+ vmlal.s32 q2, d14, d1 -+ vmull.s32 q0, d15, d1 -+ vmlal.s32 q0, d10, d14 -+ vmlal.s32 q0, d11, d19 -+ vmlal.s32 q0, d12, d8 -+ vmlal.s32 q0, d13, d17 -+ vmlal.s32 q0, d6, d6 -+ add r2, sp, #480 -+ vld1.8 {d18-d19}, [r2, : 128]! -+ vmull.s32 q3, d16, d7 -+ vmlal.s32 q3, d10, d15 -+ vmlal.s32 q3, d11, d14 -+ vmlal.s32 q3, d12, d9 -+ vmlal.s32 q3, d13, d8 -+ vld1.8 {d8-d9}, [r2, : 128] -+ vadd.i64 q5, q12, q9 -+ vadd.i64 q6, q15, q9 -+ vshr.s64 q5, q5, #26 -+ vshr.s64 q6, q6, #26 -+ vadd.i64 q7, q10, q5 -+ vshl.i64 q5, q5, #26 -+ vadd.i64 q8, q7, q4 -+ vadd.i64 q2, q2, q6 -+ vshl.i64 q6, q6, #26 -+ vadd.i64 q10, q2, q4 -+ vsub.i64 q5, q12, q5 -+ vshr.s64 q8, q8, #25 -+ vsub.i64 q6, q15, q6 -+ vshr.s64 q10, q10, #25 -+ vadd.i64 q12, q13, q8 -+ vshl.i64 q8, q8, #25 -+ vadd.i64 q13, q12, q9 -+ vadd.i64 q0, q0, q10 -+ vsub.i64 q7, q7, q8 -+ vshr.s64 q8, q13, #26 -+ vshl.i64 q10, q10, #25 -+ vadd.i64 q13, q0, q9 -+ vadd.i64 q1, q1, q8 -+ vshl.i64 q8, q8, #26 -+ vadd.i64 q15, q1, q4 -+ vsub.i64 q2, q2, q10 -+ vshr.s64 q10, q13, #26 -+ vsub.i64 q8, q12, q8 -+ vshr.s64 q12, q15, #25 -+ vadd.i64 q3, q3, q10 -+ vshl.i64 q10, q10, #26 -+ vadd.i64 q13, q3, q4 -+ vadd.i64 q14, q14, q12 -+ add r2, r3, #288 -+ vshl.i64 q12, q12, #25 -+ add r4, r3, #336 -+ vadd.i64 q15, q14, q9 -+ add r2, r2, #8 -+ vsub.i64 q0, q0, q10 -+ add r4, r4, #8 -+ vshr.s64 q10, q13, #25 -+ vsub.i64 q1, q1, q12 -+ vshr.s64 q12, q15, #26 -+ vadd.i64 q13, q10, q10 -+ vadd.i64 q11, q11, q12 -+ vtrn.32 d16, d2 -+ vshl.i64 q12, q12, #26 -+ vtrn.32 d17, d3 -+ vadd.i64 q1, q11, q4 -+ vadd.i64 q4, q5, q13 -+ vst1.8 d16, [r2, : 64]! -+ vshl.i64 q5, q10, #4 -+ vst1.8 d17, [r4, : 64]! -+ vsub.i64 q8, q14, q12 -+ vshr.s64 q1, q1, #25 -+ vadd.i64 q4, q4, q5 -+ vadd.i64 q5, q6, q1 -+ vshl.i64 q1, q1, #25 -+ vadd.i64 q6, q5, q9 -+ vadd.i64 q4, q4, q10 -+ vshl.i64 q10, q10, #25 -+ vadd.i64 q9, q4, q9 -+ vsub.i64 q1, q11, q1 -+ vshr.s64 q6, q6, #26 -+ vsub.i64 q3, q3, q10 -+ vtrn.32 d16, d2 -+ vshr.s64 q9, q9, #26 -+ vtrn.32 d17, d3 -+ vadd.i64 q1, q2, q6 -+ vst1.8 d16, [r2, : 64] -+ vshl.i64 q2, q6, #26 -+ vst1.8 d17, [r4, : 64] -+ vadd.i64 q6, q7, q9 -+ vtrn.32 d0, d6 -+ vshl.i64 q7, q9, #26 -+ vtrn.32 d1, d7 -+ vsub.i64 q2, q5, q2 -+ add r2, r2, #16 -+ vsub.i64 q3, q4, q7 -+ vst1.8 d0, [r2, : 64] -+ add r4, r4, #16 -+ vst1.8 d1, [r4, : 64] -+ vtrn.32 d4, d2 -+ vtrn.32 d5, d3 -+ sub r2, r2, #8 -+ sub r4, r4, #8 -+ vtrn.32 d6, d12 -+ vtrn.32 d7, d13 -+ vst1.8 d4, [r2, : 64] -+ vst1.8 d5, [r4, : 64] -+ sub r2, r2, #24 -+ sub r4, r4, #24 -+ vst1.8 d6, [r2, : 64] -+ vst1.8 d7, [r4, : 64] -+ add r2, r3, #240 -+ add r4, r3, #96 -+ vld1.8 {d0-d1}, [r4, : 128]! -+ vld1.8 {d2-d3}, [r4, : 128]! -+ vld1.8 {d4}, [r4, : 64] -+ add r4, r3, #144 -+ vld1.8 {d6-d7}, [r4, : 128]! -+ vtrn.32 q0, q3 -+ vld1.8 {d8-d9}, [r4, : 128]! -+ vshl.i32 q5, q0, #4 -+ vtrn.32 q1, q4 -+ vshl.i32 q6, q3, #4 -+ vadd.i32 q5, q5, q0 -+ vadd.i32 q6, q6, q3 -+ vshl.i32 q7, q1, #4 -+ vld1.8 {d5}, [r4, : 64] -+ vshl.i32 q8, q4, #4 -+ vtrn.32 d4, d5 -+ vadd.i32 q7, q7, q1 -+ vadd.i32 q8, q8, q4 -+ vld1.8 {d18-d19}, [r2, : 128]! -+ vshl.i32 q10, q2, #4 -+ vld1.8 {d22-d23}, [r2, : 128]! -+ vadd.i32 q10, q10, q2 -+ vld1.8 {d24}, [r2, : 64] -+ vadd.i32 q5, q5, q0 -+ add r2, r3, #192 -+ vld1.8 {d26-d27}, [r2, : 128]! -+ vadd.i32 q6, q6, q3 -+ vld1.8 {d28-d29}, [r2, : 128]! -+ vadd.i32 q8, q8, q4 -+ vld1.8 {d25}, [r2, : 64] -+ vadd.i32 q10, q10, q2 -+ vtrn.32 q9, q13 -+ vadd.i32 q7, q7, q1 -+ vadd.i32 q5, q5, q0 -+ vtrn.32 q11, q14 -+ vadd.i32 q6, q6, q3 -+ add r2, sp, #528 -+ vadd.i32 q10, q10, q2 -+ vtrn.32 d24, d25 -+ vst1.8 {d12-d13}, [r2, : 128]! -+ vshl.i32 q6, q13, #1 -+ vst1.8 {d20-d21}, [r2, : 128]! -+ vshl.i32 q10, q14, #1 -+ vst1.8 {d12-d13}, [r2, : 128]! -+ vshl.i32 q15, q12, #1 -+ vadd.i32 q8, q8, q4 -+ vext.32 d10, d31, d30, #0 -+ vadd.i32 q7, q7, q1 -+ vst1.8 {d16-d17}, [r2, : 128]! -+ vmull.s32 q8, d18, d5 -+ vmlal.s32 q8, d26, d4 -+ vmlal.s32 q8, d19, d9 -+ vmlal.s32 q8, d27, d3 -+ vmlal.s32 q8, d22, d8 -+ vmlal.s32 q8, d28, d2 -+ vmlal.s32 q8, d23, d7 -+ vmlal.s32 q8, d29, d1 -+ vmlal.s32 q8, d24, d6 -+ vmlal.s32 q8, d25, d0 -+ vst1.8 {d14-d15}, [r2, : 128]! -+ vmull.s32 q2, d18, d4 -+ vmlal.s32 q2, d12, d9 -+ vmlal.s32 q2, d13, d8 -+ vmlal.s32 q2, d19, d3 -+ vmlal.s32 q2, d22, d2 -+ vmlal.s32 q2, d23, d1 -+ vmlal.s32 q2, d24, d0 -+ vst1.8 {d20-d21}, [r2, : 128]! -+ vmull.s32 q7, d18, d9 -+ vmlal.s32 q7, d26, d3 -+ vmlal.s32 q7, d19, d8 -+ vmlal.s32 q7, d27, d2 -+ vmlal.s32 q7, d22, d7 -+ vmlal.s32 q7, d28, d1 -+ vmlal.s32 q7, d23, d6 -+ vmlal.s32 q7, d29, d0 -+ vst1.8 {d10-d11}, [r2, : 128]! -+ vmull.s32 q5, d18, d3 -+ vmlal.s32 q5, d19, d2 -+ vmlal.s32 q5, d22, d1 -+ vmlal.s32 q5, d23, d0 -+ vmlal.s32 q5, d12, d8 -+ vst1.8 {d16-d17}, [r2, : 128] -+ vmull.s32 q4, d18, d8 -+ vmlal.s32 q4, d26, d2 -+ vmlal.s32 q4, d19, d7 -+ vmlal.s32 q4, d27, d1 -+ vmlal.s32 q4, d22, d6 -+ vmlal.s32 q4, d28, d0 -+ vmull.s32 q8, d18, d7 -+ vmlal.s32 q8, d26, d1 -+ vmlal.s32 q8, d19, d6 -+ vmlal.s32 q8, d27, d0 -+ add r2, sp, #544 -+ vld1.8 {d20-d21}, [r2, : 128] -+ vmlal.s32 q7, d24, d21 -+ vmlal.s32 q7, d25, d20 -+ vmlal.s32 q4, d23, d21 -+ vmlal.s32 q4, d29, d20 -+ vmlal.s32 q8, d22, d21 -+ vmlal.s32 q8, d28, d20 -+ vmlal.s32 q5, d24, d20 -+ vst1.8 {d14-d15}, [r2, : 128] -+ vmull.s32 q7, d18, d6 -+ vmlal.s32 q7, d26, d0 -+ add r2, sp, #624 -+ vld1.8 {d30-d31}, [r2, : 128] -+ vmlal.s32 q2, d30, d21 -+ vmlal.s32 q7, d19, d21 -+ vmlal.s32 q7, d27, d20 -+ add r2, sp, #592 -+ vld1.8 {d26-d27}, [r2, : 128] -+ vmlal.s32 q4, d25, d27 -+ vmlal.s32 q8, d29, d27 -+ vmlal.s32 q8, d25, d26 -+ vmlal.s32 q7, d28, d27 -+ vmlal.s32 q7, d29, d26 -+ add r2, sp, #576 -+ vld1.8 {d28-d29}, [r2, : 128] -+ vmlal.s32 q4, d24, d29 -+ vmlal.s32 q8, d23, d29 -+ vmlal.s32 q8, d24, d28 -+ vmlal.s32 q7, d22, d29 -+ vmlal.s32 q7, d23, d28 -+ vst1.8 {d8-d9}, [r2, : 128] -+ add r2, sp, #528 -+ vld1.8 {d8-d9}, [r2, : 128] -+ vmlal.s32 q7, d24, d9 -+ vmlal.s32 q7, d25, d31 -+ vmull.s32 q1, d18, d2 -+ vmlal.s32 q1, d19, d1 -+ vmlal.s32 q1, d22, d0 -+ vmlal.s32 q1, d24, d27 -+ vmlal.s32 q1, d23, d20 -+ vmlal.s32 q1, d12, d7 -+ vmlal.s32 q1, d13, d6 -+ vmull.s32 q6, d18, d1 -+ vmlal.s32 q6, d19, d0 -+ vmlal.s32 q6, d23, d27 -+ vmlal.s32 q6, d22, d20 -+ vmlal.s32 q6, d24, d26 -+ vmull.s32 q0, d18, d0 -+ vmlal.s32 q0, d22, d27 -+ vmlal.s32 q0, d23, d26 -+ vmlal.s32 q0, d24, d31 -+ vmlal.s32 q0, d19, d20 -+ add r2, sp, #608 -+ vld1.8 {d18-d19}, [r2, : 128] -+ vmlal.s32 q2, d18, d7 -+ vmlal.s32 q5, d18, d6 -+ vmlal.s32 q1, d18, d21 -+ vmlal.s32 q0, d18, d28 -+ vmlal.s32 q6, d18, d29 -+ vmlal.s32 q2, d19, d6 -+ vmlal.s32 q5, d19, d21 -+ vmlal.s32 q1, d19, d29 -+ vmlal.s32 q0, d19, d9 -+ vmlal.s32 q6, d19, d28 -+ add r2, sp, #560 -+ vld1.8 {d18-d19}, [r2, : 128] -+ add r2, sp, #480 -+ vld1.8 {d22-d23}, [r2, : 128] -+ vmlal.s32 q5, d19, d7 -+ vmlal.s32 q0, d18, d21 -+ vmlal.s32 q0, d19, d29 -+ vmlal.s32 q6, d18, d6 -+ add r2, sp, #496 -+ vld1.8 {d6-d7}, [r2, : 128] -+ vmlal.s32 q6, d19, d21 -+ add r2, sp, #544 -+ vld1.8 {d18-d19}, [r2, : 128] -+ vmlal.s32 q0, d30, d8 -+ add r2, sp, #640 -+ vld1.8 {d20-d21}, [r2, : 128] -+ vmlal.s32 q5, d30, d29 -+ add r2, sp, #576 -+ vld1.8 {d24-d25}, [r2, : 128] -+ vmlal.s32 q1, d30, d28 -+ vadd.i64 q13, q0, q11 -+ vadd.i64 q14, q5, q11 -+ vmlal.s32 q6, d30, d9 -+ vshr.s64 q4, q13, #26 -+ vshr.s64 q13, q14, #26 -+ vadd.i64 q7, q7, q4 -+ vshl.i64 q4, q4, #26 -+ vadd.i64 q14, q7, q3 -+ vadd.i64 q9, q9, q13 -+ vshl.i64 q13, q13, #26 -+ vadd.i64 q15, q9, q3 -+ vsub.i64 q0, q0, q4 -+ vshr.s64 q4, q14, #25 -+ vsub.i64 q5, q5, q13 -+ vshr.s64 q13, q15, #25 -+ vadd.i64 q6, q6, q4 -+ vshl.i64 q4, q4, #25 -+ vadd.i64 q14, q6, q11 -+ vadd.i64 q2, q2, q13 -+ vsub.i64 q4, q7, q4 -+ vshr.s64 q7, q14, #26 -+ vshl.i64 q13, q13, #25 -+ vadd.i64 q14, q2, q11 -+ vadd.i64 q8, q8, q7 -+ vshl.i64 q7, q7, #26 -+ vadd.i64 q15, q8, q3 -+ vsub.i64 q9, q9, q13 -+ vshr.s64 q13, q14, #26 -+ vsub.i64 q6, q6, q7 -+ vshr.s64 q7, q15, #25 -+ vadd.i64 q10, q10, q13 -+ vshl.i64 q13, q13, #26 -+ vadd.i64 q14, q10, q3 -+ vadd.i64 q1, q1, q7 -+ add r2, r3, #144 -+ vshl.i64 q7, q7, #25 -+ add r4, r3, #96 -+ vadd.i64 q15, q1, q11 -+ add r2, r2, #8 -+ vsub.i64 q2, q2, q13 -+ add r4, r4, #8 -+ vshr.s64 q13, q14, #25 -+ vsub.i64 q7, q8, q7 -+ vshr.s64 q8, q15, #26 -+ vadd.i64 q14, q13, q13 -+ vadd.i64 q12, q12, q8 -+ vtrn.32 d12, d14 -+ vshl.i64 q8, q8, #26 -+ vtrn.32 d13, d15 -+ vadd.i64 q3, q12, q3 -+ vadd.i64 q0, q0, q14 -+ vst1.8 d12, [r2, : 64]! -+ vshl.i64 q7, q13, #4 -+ vst1.8 d13, [r4, : 64]! -+ vsub.i64 q1, q1, q8 -+ vshr.s64 q3, q3, #25 -+ vadd.i64 q0, q0, q7 -+ vadd.i64 q5, q5, q3 -+ vshl.i64 q3, q3, #25 -+ vadd.i64 q6, q5, q11 -+ vadd.i64 q0, q0, q13 -+ vshl.i64 q7, q13, #25 -+ vadd.i64 q8, q0, q11 -+ vsub.i64 q3, q12, q3 -+ vshr.s64 q6, q6, #26 -+ vsub.i64 q7, q10, q7 -+ vtrn.32 d2, d6 -+ vshr.s64 q8, q8, #26 -+ vtrn.32 d3, d7 -+ vadd.i64 q3, q9, q6 -+ vst1.8 d2, [r2, : 64] -+ vshl.i64 q6, q6, #26 -+ vst1.8 d3, [r4, : 64] -+ vadd.i64 q1, q4, q8 -+ vtrn.32 d4, d14 -+ vshl.i64 q4, q8, #26 -+ vtrn.32 d5, d15 -+ vsub.i64 q5, q5, q6 -+ add r2, r2, #16 -+ vsub.i64 q0, q0, q4 -+ vst1.8 d4, [r2, : 64] -+ add r4, r4, #16 -+ vst1.8 d5, [r4, : 64] -+ vtrn.32 d10, d6 -+ vtrn.32 d11, d7 -+ sub r2, r2, #8 -+ sub r4, r4, #8 -+ vtrn.32 d0, d2 -+ vtrn.32 d1, d3 -+ vst1.8 d10, [r2, : 64] -+ vst1.8 d11, [r4, : 64] -+ sub r2, r2, #24 -+ sub r4, r4, #24 -+ vst1.8 d0, [r2, : 64] -+ vst1.8 d1, [r4, : 64] -+ add r2, r3, #288 -+ add r4, r3, #336 -+ vld1.8 {d0-d1}, [r2, : 128]! -+ vld1.8 {d2-d3}, [r4, : 128]! -+ vsub.i32 q0, q0, q1 -+ vld1.8 {d2-d3}, [r2, : 128]! -+ vld1.8 {d4-d5}, [r4, : 128]! -+ vsub.i32 q1, q1, q2 -+ add r5, r3, #240 -+ vld1.8 {d4}, [r2, : 64] -+ vld1.8 {d6}, [r4, : 64] -+ vsub.i32 q2, q2, q3 -+ vst1.8 {d0-d1}, [r5, : 128]! -+ vst1.8 {d2-d3}, [r5, : 128]! -+ vst1.8 d4, [r5, : 64] -+ add r2, r3, #144 -+ add r4, r3, #96 -+ add r5, r3, #144 -+ add r6, r3, #192 -+ vld1.8 {d0-d1}, [r2, : 128]! -+ vld1.8 {d2-d3}, [r4, : 128]! -+ vsub.i32 q2, q0, q1 -+ vadd.i32 q0, q0, q1 -+ vld1.8 {d2-d3}, [r2, : 128]! -+ vld1.8 {d6-d7}, [r4, : 128]! -+ vsub.i32 q4, q1, q3 -+ vadd.i32 q1, q1, q3 -+ vld1.8 {d6}, [r2, : 64] -+ vld1.8 {d10}, [r4, : 64] -+ vsub.i32 q6, q3, q5 -+ vadd.i32 q3, q3, q5 -+ vst1.8 {d4-d5}, [r5, : 128]! -+ vst1.8 {d0-d1}, [r6, : 128]! -+ vst1.8 {d8-d9}, [r5, : 128]! -+ vst1.8 {d2-d3}, [r6, : 128]! -+ vst1.8 d12, [r5, : 64] -+ vst1.8 d6, [r6, : 64] -+ add r2, r3, #0 -+ add r4, r3, #240 -+ vld1.8 {d0-d1}, [r4, : 128]! -+ vld1.8 {d2-d3}, [r4, : 128]! -+ vld1.8 {d4}, [r4, : 64] -+ add r4, r3, #336 -+ vld1.8 {d6-d7}, [r4, : 128]! -+ vtrn.32 q0, q3 -+ vld1.8 {d8-d9}, [r4, : 128]! -+ vshl.i32 q5, q0, #4 -+ vtrn.32 q1, q4 -+ vshl.i32 q6, q3, #4 -+ vadd.i32 q5, q5, q0 -+ vadd.i32 q6, q6, q3 -+ vshl.i32 q7, q1, #4 -+ vld1.8 {d5}, [r4, : 64] -+ vshl.i32 q8, q4, #4 -+ vtrn.32 d4, d5 -+ vadd.i32 q7, q7, q1 -+ vadd.i32 q8, q8, q4 -+ vld1.8 {d18-d19}, [r2, : 128]! -+ vshl.i32 q10, q2, #4 -+ vld1.8 {d22-d23}, [r2, : 128]! -+ vadd.i32 q10, q10, q2 -+ vld1.8 {d24}, [r2, : 64] -+ vadd.i32 q5, q5, q0 -+ add r2, r3, #288 -+ vld1.8 {d26-d27}, [r2, : 128]! -+ vadd.i32 q6, q6, q3 -+ vld1.8 {d28-d29}, [r2, : 128]! -+ vadd.i32 q8, q8, q4 -+ vld1.8 {d25}, [r2, : 64] -+ vadd.i32 q10, q10, q2 -+ vtrn.32 q9, q13 -+ vadd.i32 q7, q7, q1 -+ vadd.i32 q5, q5, q0 -+ vtrn.32 q11, q14 -+ vadd.i32 q6, q6, q3 -+ add r2, sp, #528 -+ vadd.i32 q10, q10, q2 -+ vtrn.32 d24, d25 -+ vst1.8 {d12-d13}, [r2, : 128]! -+ vshl.i32 q6, q13, #1 -+ vst1.8 {d20-d21}, [r2, : 128]! -+ vshl.i32 q10, q14, #1 -+ vst1.8 {d12-d13}, [r2, : 128]! -+ vshl.i32 q15, q12, #1 -+ vadd.i32 q8, q8, q4 -+ vext.32 d10, d31, d30, #0 -+ vadd.i32 q7, q7, q1 -+ vst1.8 {d16-d17}, [r2, : 128]! -+ vmull.s32 q8, d18, d5 -+ vmlal.s32 q8, d26, d4 -+ vmlal.s32 q8, d19, d9 -+ vmlal.s32 q8, d27, d3 -+ vmlal.s32 q8, d22, d8 -+ vmlal.s32 q8, d28, d2 -+ vmlal.s32 q8, d23, d7 -+ vmlal.s32 q8, d29, d1 -+ vmlal.s32 q8, d24, d6 -+ vmlal.s32 q8, d25, d0 -+ vst1.8 {d14-d15}, [r2, : 128]! -+ vmull.s32 q2, d18, d4 -+ vmlal.s32 q2, d12, d9 -+ vmlal.s32 q2, d13, d8 -+ vmlal.s32 q2, d19, d3 -+ vmlal.s32 q2, d22, d2 -+ vmlal.s32 q2, d23, d1 -+ vmlal.s32 q2, d24, d0 -+ vst1.8 {d20-d21}, [r2, : 128]! -+ vmull.s32 q7, d18, d9 -+ vmlal.s32 q7, d26, d3 -+ vmlal.s32 q7, d19, d8 -+ vmlal.s32 q7, d27, d2 -+ vmlal.s32 q7, d22, d7 -+ vmlal.s32 q7, d28, d1 -+ vmlal.s32 q7, d23, d6 -+ vmlal.s32 q7, d29, d0 -+ vst1.8 {d10-d11}, [r2, : 128]! -+ vmull.s32 q5, d18, d3 -+ vmlal.s32 q5, d19, d2 -+ vmlal.s32 q5, d22, d1 -+ vmlal.s32 q5, d23, d0 -+ vmlal.s32 q5, d12, d8 -+ vst1.8 {d16-d17}, [r2, : 128]! -+ vmull.s32 q4, d18, d8 -+ vmlal.s32 q4, d26, d2 -+ vmlal.s32 q4, d19, d7 -+ vmlal.s32 q4, d27, d1 -+ vmlal.s32 q4, d22, d6 -+ vmlal.s32 q4, d28, d0 -+ vmull.s32 q8, d18, d7 -+ vmlal.s32 q8, d26, d1 -+ vmlal.s32 q8, d19, d6 -+ vmlal.s32 q8, d27, d0 -+ add r2, sp, #544 -+ vld1.8 {d20-d21}, [r2, : 128] -+ vmlal.s32 q7, d24, d21 -+ vmlal.s32 q7, d25, d20 -+ vmlal.s32 q4, d23, d21 -+ vmlal.s32 q4, d29, d20 -+ vmlal.s32 q8, d22, d21 -+ vmlal.s32 q8, d28, d20 -+ vmlal.s32 q5, d24, d20 -+ vst1.8 {d14-d15}, [r2, : 128] -+ vmull.s32 q7, d18, d6 -+ vmlal.s32 q7, d26, d0 -+ add r2, sp, #624 -+ vld1.8 {d30-d31}, [r2, : 128] -+ vmlal.s32 q2, d30, d21 -+ vmlal.s32 q7, d19, d21 -+ vmlal.s32 q7, d27, d20 -+ add r2, sp, #592 -+ vld1.8 {d26-d27}, [r2, : 128] -+ vmlal.s32 q4, d25, d27 -+ vmlal.s32 q8, d29, d27 -+ vmlal.s32 q8, d25, d26 -+ vmlal.s32 q7, d28, d27 -+ vmlal.s32 q7, d29, d26 -+ add r2, sp, #576 -+ vld1.8 {d28-d29}, [r2, : 128] -+ vmlal.s32 q4, d24, d29 -+ vmlal.s32 q8, d23, d29 -+ vmlal.s32 q8, d24, d28 -+ vmlal.s32 q7, d22, d29 -+ vmlal.s32 q7, d23, d28 -+ vst1.8 {d8-d9}, [r2, : 128] -+ add r2, sp, #528 -+ vld1.8 {d8-d9}, [r2, : 128] -+ vmlal.s32 q7, d24, d9 -+ vmlal.s32 q7, d25, d31 -+ vmull.s32 q1, d18, d2 -+ vmlal.s32 q1, d19, d1 -+ vmlal.s32 q1, d22, d0 -+ vmlal.s32 q1, d24, d27 -+ vmlal.s32 q1, d23, d20 -+ vmlal.s32 q1, d12, d7 -+ vmlal.s32 q1, d13, d6 -+ vmull.s32 q6, d18, d1 -+ vmlal.s32 q6, d19, d0 -+ vmlal.s32 q6, d23, d27 -+ vmlal.s32 q6, d22, d20 -+ vmlal.s32 q6, d24, d26 -+ vmull.s32 q0, d18, d0 -+ vmlal.s32 q0, d22, d27 -+ vmlal.s32 q0, d23, d26 -+ vmlal.s32 q0, d24, d31 -+ vmlal.s32 q0, d19, d20 -+ add r2, sp, #608 -+ vld1.8 {d18-d19}, [r2, : 128] -+ vmlal.s32 q2, d18, d7 -+ vmlal.s32 q5, d18, d6 -+ vmlal.s32 q1, d18, d21 -+ vmlal.s32 q0, d18, d28 -+ vmlal.s32 q6, d18, d29 -+ vmlal.s32 q2, d19, d6 -+ vmlal.s32 q5, d19, d21 -+ vmlal.s32 q1, d19, d29 -+ vmlal.s32 q0, d19, d9 -+ vmlal.s32 q6, d19, d28 -+ add r2, sp, #560 -+ vld1.8 {d18-d19}, [r2, : 128] -+ add r2, sp, #480 -+ vld1.8 {d22-d23}, [r2, : 128] -+ vmlal.s32 q5, d19, d7 -+ vmlal.s32 q0, d18, d21 -+ vmlal.s32 q0, d19, d29 -+ vmlal.s32 q6, d18, d6 -+ add r2, sp, #496 -+ vld1.8 {d6-d7}, [r2, : 128] -+ vmlal.s32 q6, d19, d21 -+ add r2, sp, #544 -+ vld1.8 {d18-d19}, [r2, : 128] -+ vmlal.s32 q0, d30, d8 -+ add r2, sp, #640 -+ vld1.8 {d20-d21}, [r2, : 128] -+ vmlal.s32 q5, d30, d29 -+ add r2, sp, #576 -+ vld1.8 {d24-d25}, [r2, : 128] -+ vmlal.s32 q1, d30, d28 -+ vadd.i64 q13, q0, q11 -+ vadd.i64 q14, q5, q11 -+ vmlal.s32 q6, d30, d9 -+ vshr.s64 q4, q13, #26 -+ vshr.s64 q13, q14, #26 -+ vadd.i64 q7, q7, q4 -+ vshl.i64 q4, q4, #26 -+ vadd.i64 q14, q7, q3 -+ vadd.i64 q9, q9, q13 -+ vshl.i64 q13, q13, #26 -+ vadd.i64 q15, q9, q3 -+ vsub.i64 q0, q0, q4 -+ vshr.s64 q4, q14, #25 -+ vsub.i64 q5, q5, q13 -+ vshr.s64 q13, q15, #25 -+ vadd.i64 q6, q6, q4 -+ vshl.i64 q4, q4, #25 -+ vadd.i64 q14, q6, q11 -+ vadd.i64 q2, q2, q13 -+ vsub.i64 q4, q7, q4 -+ vshr.s64 q7, q14, #26 -+ vshl.i64 q13, q13, #25 -+ vadd.i64 q14, q2, q11 -+ vadd.i64 q8, q8, q7 -+ vshl.i64 q7, q7, #26 -+ vadd.i64 q15, q8, q3 -+ vsub.i64 q9, q9, q13 -+ vshr.s64 q13, q14, #26 -+ vsub.i64 q6, q6, q7 -+ vshr.s64 q7, q15, #25 -+ vadd.i64 q10, q10, q13 -+ vshl.i64 q13, q13, #26 -+ vadd.i64 q14, q10, q3 -+ vadd.i64 q1, q1, q7 -+ add r2, r3, #288 -+ vshl.i64 q7, q7, #25 -+ add r4, r3, #96 -+ vadd.i64 q15, q1, q11 -+ add r2, r2, #8 -+ vsub.i64 q2, q2, q13 -+ add r4, r4, #8 -+ vshr.s64 q13, q14, #25 -+ vsub.i64 q7, q8, q7 -+ vshr.s64 q8, q15, #26 -+ vadd.i64 q14, q13, q13 -+ vadd.i64 q12, q12, q8 -+ vtrn.32 d12, d14 -+ vshl.i64 q8, q8, #26 -+ vtrn.32 d13, d15 -+ vadd.i64 q3, q12, q3 -+ vadd.i64 q0, q0, q14 -+ vst1.8 d12, [r2, : 64]! -+ vshl.i64 q7, q13, #4 -+ vst1.8 d13, [r4, : 64]! -+ vsub.i64 q1, q1, q8 -+ vshr.s64 q3, q3, #25 -+ vadd.i64 q0, q0, q7 -+ vadd.i64 q5, q5, q3 -+ vshl.i64 q3, q3, #25 -+ vadd.i64 q6, q5, q11 -+ vadd.i64 q0, q0, q13 -+ vshl.i64 q7, q13, #25 -+ vadd.i64 q8, q0, q11 -+ vsub.i64 q3, q12, q3 -+ vshr.s64 q6, q6, #26 -+ vsub.i64 q7, q10, q7 -+ vtrn.32 d2, d6 -+ vshr.s64 q8, q8, #26 -+ vtrn.32 d3, d7 -+ vadd.i64 q3, q9, q6 -+ vst1.8 d2, [r2, : 64] -+ vshl.i64 q6, q6, #26 -+ vst1.8 d3, [r4, : 64] -+ vadd.i64 q1, q4, q8 -+ vtrn.32 d4, d14 -+ vshl.i64 q4, q8, #26 -+ vtrn.32 d5, d15 -+ vsub.i64 q5, q5, q6 -+ add r2, r2, #16 -+ vsub.i64 q0, q0, q4 -+ vst1.8 d4, [r2, : 64] -+ add r4, r4, #16 -+ vst1.8 d5, [r4, : 64] -+ vtrn.32 d10, d6 -+ vtrn.32 d11, d7 -+ sub r2, r2, #8 -+ sub r4, r4, #8 -+ vtrn.32 d0, d2 -+ vtrn.32 d1, d3 -+ vst1.8 d10, [r2, : 64] -+ vst1.8 d11, [r4, : 64] -+ sub r2, r2, #24 -+ sub r4, r4, #24 -+ vst1.8 d0, [r2, : 64] -+ vst1.8 d1, [r4, : 64] -+ add r2, sp, #512 -+ add r4, r3, #144 -+ add r5, r3, #192 -+ vld1.8 {d0-d1}, [r2, : 128] -+ vld1.8 {d2-d3}, [r4, : 128]! -+ vld1.8 {d4-d5}, [r5, : 128]! -+ vzip.i32 q1, q2 -+ vld1.8 {d6-d7}, [r4, : 128]! -+ vld1.8 {d8-d9}, [r5, : 128]! -+ vshl.i32 q5, q1, #1 -+ vzip.i32 q3, q4 -+ vshl.i32 q6, q2, #1 -+ vld1.8 {d14}, [r4, : 64] -+ vshl.i32 q8, q3, #1 -+ vld1.8 {d15}, [r5, : 64] -+ vshl.i32 q9, q4, #1 -+ vmul.i32 d21, d7, d1 -+ vtrn.32 d14, d15 -+ vmul.i32 q11, q4, q0 -+ vmul.i32 q0, q7, q0 -+ vmull.s32 q12, d2, d2 -+ vmlal.s32 q12, d11, d1 -+ vmlal.s32 q12, d12, d0 -+ vmlal.s32 q12, d13, d23 -+ vmlal.s32 q12, d16, d22 -+ vmlal.s32 q12, d7, d21 -+ vmull.s32 q10, d2, d11 -+ vmlal.s32 q10, d4, d1 -+ vmlal.s32 q10, d13, d0 -+ vmlal.s32 q10, d6, d23 -+ vmlal.s32 q10, d17, d22 -+ vmull.s32 q13, d10, d4 -+ vmlal.s32 q13, d11, d3 -+ vmlal.s32 q13, d13, d1 -+ vmlal.s32 q13, d16, d0 -+ vmlal.s32 q13, d17, d23 -+ vmlal.s32 q13, d8, d22 -+ vmull.s32 q1, d10, d5 -+ vmlal.s32 q1, d11, d4 -+ vmlal.s32 q1, d6, d1 -+ vmlal.s32 q1, d17, d0 -+ vmlal.s32 q1, d8, d23 -+ vmull.s32 q14, d10, d6 -+ vmlal.s32 q14, d11, d13 -+ vmlal.s32 q14, d4, d4 -+ vmlal.s32 q14, d17, d1 -+ vmlal.s32 q14, d18, d0 -+ vmlal.s32 q14, d9, d23 -+ vmull.s32 q11, d10, d7 -+ vmlal.s32 q11, d11, d6 -+ vmlal.s32 q11, d12, d5 -+ vmlal.s32 q11, d8, d1 -+ vmlal.s32 q11, d19, d0 -+ vmull.s32 q15, d10, d8 -+ vmlal.s32 q15, d11, d17 -+ vmlal.s32 q15, d12, d6 -+ vmlal.s32 q15, d13, d5 -+ vmlal.s32 q15, d19, d1 -+ vmlal.s32 q15, d14, d0 -+ vmull.s32 q2, d10, d9 -+ vmlal.s32 q2, d11, d8 -+ vmlal.s32 q2, d12, d7 -+ vmlal.s32 q2, d13, d6 -+ vmlal.s32 q2, d14, d1 -+ vmull.s32 q0, d15, d1 -+ vmlal.s32 q0, d10, d14 -+ vmlal.s32 q0, d11, d19 -+ vmlal.s32 q0, d12, d8 -+ vmlal.s32 q0, d13, d17 -+ vmlal.s32 q0, d6, d6 -+ add r2, sp, #480 -+ vld1.8 {d18-d19}, [r2, : 128]! -+ vmull.s32 q3, d16, d7 -+ vmlal.s32 q3, d10, d15 -+ vmlal.s32 q3, d11, d14 -+ vmlal.s32 q3, d12, d9 -+ vmlal.s32 q3, d13, d8 -+ vld1.8 {d8-d9}, [r2, : 128] -+ vadd.i64 q5, q12, q9 -+ vadd.i64 q6, q15, q9 -+ vshr.s64 q5, q5, #26 -+ vshr.s64 q6, q6, #26 -+ vadd.i64 q7, q10, q5 -+ vshl.i64 q5, q5, #26 -+ vadd.i64 q8, q7, q4 -+ vadd.i64 q2, q2, q6 -+ vshl.i64 q6, q6, #26 -+ vadd.i64 q10, q2, q4 -+ vsub.i64 q5, q12, q5 -+ vshr.s64 q8, q8, #25 -+ vsub.i64 q6, q15, q6 -+ vshr.s64 q10, q10, #25 -+ vadd.i64 q12, q13, q8 -+ vshl.i64 q8, q8, #25 -+ vadd.i64 q13, q12, q9 -+ vadd.i64 q0, q0, q10 -+ vsub.i64 q7, q7, q8 -+ vshr.s64 q8, q13, #26 -+ vshl.i64 q10, q10, #25 -+ vadd.i64 q13, q0, q9 -+ vadd.i64 q1, q1, q8 -+ vshl.i64 q8, q8, #26 -+ vadd.i64 q15, q1, q4 -+ vsub.i64 q2, q2, q10 -+ vshr.s64 q10, q13, #26 -+ vsub.i64 q8, q12, q8 -+ vshr.s64 q12, q15, #25 -+ vadd.i64 q3, q3, q10 -+ vshl.i64 q10, q10, #26 -+ vadd.i64 q13, q3, q4 -+ vadd.i64 q14, q14, q12 -+ add r2, r3, #144 -+ vshl.i64 q12, q12, #25 -+ add r4, r3, #192 -+ vadd.i64 q15, q14, q9 -+ add r2, r2, #8 -+ vsub.i64 q0, q0, q10 -+ add r4, r4, #8 -+ vshr.s64 q10, q13, #25 -+ vsub.i64 q1, q1, q12 -+ vshr.s64 q12, q15, #26 -+ vadd.i64 q13, q10, q10 -+ vadd.i64 q11, q11, q12 -+ vtrn.32 d16, d2 -+ vshl.i64 q12, q12, #26 -+ vtrn.32 d17, d3 -+ vadd.i64 q1, q11, q4 -+ vadd.i64 q4, q5, q13 -+ vst1.8 d16, [r2, : 64]! -+ vshl.i64 q5, q10, #4 -+ vst1.8 d17, [r4, : 64]! -+ vsub.i64 q8, q14, q12 -+ vshr.s64 q1, q1, #25 -+ vadd.i64 q4, q4, q5 -+ vadd.i64 q5, q6, q1 -+ vshl.i64 q1, q1, #25 -+ vadd.i64 q6, q5, q9 -+ vadd.i64 q4, q4, q10 -+ vshl.i64 q10, q10, #25 -+ vadd.i64 q9, q4, q9 -+ vsub.i64 q1, q11, q1 -+ vshr.s64 q6, q6, #26 -+ vsub.i64 q3, q3, q10 -+ vtrn.32 d16, d2 -+ vshr.s64 q9, q9, #26 -+ vtrn.32 d17, d3 -+ vadd.i64 q1, q2, q6 -+ vst1.8 d16, [r2, : 64] -+ vshl.i64 q2, q6, #26 -+ vst1.8 d17, [r4, : 64] -+ vadd.i64 q6, q7, q9 -+ vtrn.32 d0, d6 -+ vshl.i64 q7, q9, #26 -+ vtrn.32 d1, d7 -+ vsub.i64 q2, q5, q2 -+ add r2, r2, #16 -+ vsub.i64 q3, q4, q7 -+ vst1.8 d0, [r2, : 64] -+ add r4, r4, #16 -+ vst1.8 d1, [r4, : 64] -+ vtrn.32 d4, d2 -+ vtrn.32 d5, d3 -+ sub r2, r2, #8 -+ sub r4, r4, #8 -+ vtrn.32 d6, d12 -+ vtrn.32 d7, d13 -+ vst1.8 d4, [r2, : 64] -+ vst1.8 d5, [r4, : 64] -+ sub r2, r2, #24 -+ sub r4, r4, #24 -+ vst1.8 d6, [r2, : 64] -+ vst1.8 d7, [r4, : 64] -+ add r2, r3, #336 -+ add r4, r3, #288 -+ vld1.8 {d0-d1}, [r2, : 128]! -+ vld1.8 {d2-d3}, [r4, : 128]! -+ vadd.i32 q0, q0, q1 -+ vld1.8 {d2-d3}, [r2, : 128]! -+ vld1.8 {d4-d5}, [r4, : 128]! -+ vadd.i32 q1, q1, q2 -+ add r5, r3, #288 -+ vld1.8 {d4}, [r2, : 64] -+ vld1.8 {d6}, [r4, : 64] -+ vadd.i32 q2, q2, q3 -+ vst1.8 {d0-d1}, [r5, : 128]! -+ vst1.8 {d2-d3}, [r5, : 128]! -+ vst1.8 d4, [r5, : 64] -+ add r2, r3, #48 -+ add r4, r3, #144 -+ vld1.8 {d0-d1}, [r4, : 128]! -+ vld1.8 {d2-d3}, [r4, : 128]! -+ vld1.8 {d4}, [r4, : 64] -+ add r4, r3, #288 -+ vld1.8 {d6-d7}, [r4, : 128]! -+ vtrn.32 q0, q3 -+ vld1.8 {d8-d9}, [r4, : 128]! -+ vshl.i32 q5, q0, #4 -+ vtrn.32 q1, q4 -+ vshl.i32 q6, q3, #4 -+ vadd.i32 q5, q5, q0 -+ vadd.i32 q6, q6, q3 -+ vshl.i32 q7, q1, #4 -+ vld1.8 {d5}, [r4, : 64] -+ vshl.i32 q8, q4, #4 -+ vtrn.32 d4, d5 -+ vadd.i32 q7, q7, q1 -+ vadd.i32 q8, q8, q4 -+ vld1.8 {d18-d19}, [r2, : 128]! -+ vshl.i32 q10, q2, #4 -+ vld1.8 {d22-d23}, [r2, : 128]! -+ vadd.i32 q10, q10, q2 -+ vld1.8 {d24}, [r2, : 64] -+ vadd.i32 q5, q5, q0 -+ add r2, r3, #240 -+ vld1.8 {d26-d27}, [r2, : 128]! -+ vadd.i32 q6, q6, q3 -+ vld1.8 {d28-d29}, [r2, : 128]! -+ vadd.i32 q8, q8, q4 -+ vld1.8 {d25}, [r2, : 64] -+ vadd.i32 q10, q10, q2 -+ vtrn.32 q9, q13 -+ vadd.i32 q7, q7, q1 -+ vadd.i32 q5, q5, q0 -+ vtrn.32 q11, q14 -+ vadd.i32 q6, q6, q3 -+ add r2, sp, #528 -+ vadd.i32 q10, q10, q2 -+ vtrn.32 d24, d25 -+ vst1.8 {d12-d13}, [r2, : 128]! -+ vshl.i32 q6, q13, #1 -+ vst1.8 {d20-d21}, [r2, : 128]! -+ vshl.i32 q10, q14, #1 -+ vst1.8 {d12-d13}, [r2, : 128]! -+ vshl.i32 q15, q12, #1 -+ vadd.i32 q8, q8, q4 -+ vext.32 d10, d31, d30, #0 -+ vadd.i32 q7, q7, q1 -+ vst1.8 {d16-d17}, [r2, : 128]! -+ vmull.s32 q8, d18, d5 -+ vmlal.s32 q8, d26, d4 -+ vmlal.s32 q8, d19, d9 -+ vmlal.s32 q8, d27, d3 -+ vmlal.s32 q8, d22, d8 -+ vmlal.s32 q8, d28, d2 -+ vmlal.s32 q8, d23, d7 -+ vmlal.s32 q8, d29, d1 -+ vmlal.s32 q8, d24, d6 -+ vmlal.s32 q8, d25, d0 -+ vst1.8 {d14-d15}, [r2, : 128]! -+ vmull.s32 q2, d18, d4 -+ vmlal.s32 q2, d12, d9 -+ vmlal.s32 q2, d13, d8 -+ vmlal.s32 q2, d19, d3 -+ vmlal.s32 q2, d22, d2 -+ vmlal.s32 q2, d23, d1 -+ vmlal.s32 q2, d24, d0 -+ vst1.8 {d20-d21}, [r2, : 128]! -+ vmull.s32 q7, d18, d9 -+ vmlal.s32 q7, d26, d3 -+ vmlal.s32 q7, d19, d8 -+ vmlal.s32 q7, d27, d2 -+ vmlal.s32 q7, d22, d7 -+ vmlal.s32 q7, d28, d1 -+ vmlal.s32 q7, d23, d6 -+ vmlal.s32 q7, d29, d0 -+ vst1.8 {d10-d11}, [r2, : 128]! -+ vmull.s32 q5, d18, d3 -+ vmlal.s32 q5, d19, d2 -+ vmlal.s32 q5, d22, d1 -+ vmlal.s32 q5, d23, d0 -+ vmlal.s32 q5, d12, d8 -+ vst1.8 {d16-d17}, [r2, : 128]! -+ vmull.s32 q4, d18, d8 -+ vmlal.s32 q4, d26, d2 -+ vmlal.s32 q4, d19, d7 -+ vmlal.s32 q4, d27, d1 -+ vmlal.s32 q4, d22, d6 -+ vmlal.s32 q4, d28, d0 -+ vmull.s32 q8, d18, d7 -+ vmlal.s32 q8, d26, d1 -+ vmlal.s32 q8, d19, d6 -+ vmlal.s32 q8, d27, d0 -+ add r2, sp, #544 -+ vld1.8 {d20-d21}, [r2, : 128] -+ vmlal.s32 q7, d24, d21 -+ vmlal.s32 q7, d25, d20 -+ vmlal.s32 q4, d23, d21 -+ vmlal.s32 q4, d29, d20 -+ vmlal.s32 q8, d22, d21 -+ vmlal.s32 q8, d28, d20 -+ vmlal.s32 q5, d24, d20 -+ vst1.8 {d14-d15}, [r2, : 128] -+ vmull.s32 q7, d18, d6 -+ vmlal.s32 q7, d26, d0 -+ add r2, sp, #624 -+ vld1.8 {d30-d31}, [r2, : 128] -+ vmlal.s32 q2, d30, d21 -+ vmlal.s32 q7, d19, d21 -+ vmlal.s32 q7, d27, d20 -+ add r2, sp, #592 -+ vld1.8 {d26-d27}, [r2, : 128] -+ vmlal.s32 q4, d25, d27 -+ vmlal.s32 q8, d29, d27 -+ vmlal.s32 q8, d25, d26 -+ vmlal.s32 q7, d28, d27 -+ vmlal.s32 q7, d29, d26 -+ add r2, sp, #576 -+ vld1.8 {d28-d29}, [r2, : 128] -+ vmlal.s32 q4, d24, d29 -+ vmlal.s32 q8, d23, d29 -+ vmlal.s32 q8, d24, d28 -+ vmlal.s32 q7, d22, d29 -+ vmlal.s32 q7, d23, d28 -+ vst1.8 {d8-d9}, [r2, : 128] -+ add r2, sp, #528 -+ vld1.8 {d8-d9}, [r2, : 128] -+ vmlal.s32 q7, d24, d9 -+ vmlal.s32 q7, d25, d31 -+ vmull.s32 q1, d18, d2 -+ vmlal.s32 q1, d19, d1 -+ vmlal.s32 q1, d22, d0 -+ vmlal.s32 q1, d24, d27 -+ vmlal.s32 q1, d23, d20 -+ vmlal.s32 q1, d12, d7 -+ vmlal.s32 q1, d13, d6 -+ vmull.s32 q6, d18, d1 -+ vmlal.s32 q6, d19, d0 -+ vmlal.s32 q6, d23, d27 -+ vmlal.s32 q6, d22, d20 -+ vmlal.s32 q6, d24, d26 -+ vmull.s32 q0, d18, d0 -+ vmlal.s32 q0, d22, d27 -+ vmlal.s32 q0, d23, d26 -+ vmlal.s32 q0, d24, d31 -+ vmlal.s32 q0, d19, d20 -+ add r2, sp, #608 -+ vld1.8 {d18-d19}, [r2, : 128] -+ vmlal.s32 q2, d18, d7 -+ vmlal.s32 q5, d18, d6 -+ vmlal.s32 q1, d18, d21 -+ vmlal.s32 q0, d18, d28 -+ vmlal.s32 q6, d18, d29 -+ vmlal.s32 q2, d19, d6 -+ vmlal.s32 q5, d19, d21 -+ vmlal.s32 q1, d19, d29 -+ vmlal.s32 q0, d19, d9 -+ vmlal.s32 q6, d19, d28 -+ add r2, sp, #560 -+ vld1.8 {d18-d19}, [r2, : 128] -+ add r2, sp, #480 -+ vld1.8 {d22-d23}, [r2, : 128] -+ vmlal.s32 q5, d19, d7 -+ vmlal.s32 q0, d18, d21 -+ vmlal.s32 q0, d19, d29 -+ vmlal.s32 q6, d18, d6 -+ add r2, sp, #496 -+ vld1.8 {d6-d7}, [r2, : 128] -+ vmlal.s32 q6, d19, d21 -+ add r2, sp, #544 -+ vld1.8 {d18-d19}, [r2, : 128] -+ vmlal.s32 q0, d30, d8 -+ add r2, sp, #640 -+ vld1.8 {d20-d21}, [r2, : 128] -+ vmlal.s32 q5, d30, d29 -+ add r2, sp, #576 -+ vld1.8 {d24-d25}, [r2, : 128] -+ vmlal.s32 q1, d30, d28 -+ vadd.i64 q13, q0, q11 -+ vadd.i64 q14, q5, q11 -+ vmlal.s32 q6, d30, d9 -+ vshr.s64 q4, q13, #26 -+ vshr.s64 q13, q14, #26 -+ vadd.i64 q7, q7, q4 -+ vshl.i64 q4, q4, #26 -+ vadd.i64 q14, q7, q3 -+ vadd.i64 q9, q9, q13 -+ vshl.i64 q13, q13, #26 -+ vadd.i64 q15, q9, q3 -+ vsub.i64 q0, q0, q4 -+ vshr.s64 q4, q14, #25 -+ vsub.i64 q5, q5, q13 -+ vshr.s64 q13, q15, #25 -+ vadd.i64 q6, q6, q4 -+ vshl.i64 q4, q4, #25 -+ vadd.i64 q14, q6, q11 -+ vadd.i64 q2, q2, q13 -+ vsub.i64 q4, q7, q4 -+ vshr.s64 q7, q14, #26 -+ vshl.i64 q13, q13, #25 -+ vadd.i64 q14, q2, q11 -+ vadd.i64 q8, q8, q7 -+ vshl.i64 q7, q7, #26 -+ vadd.i64 q15, q8, q3 -+ vsub.i64 q9, q9, q13 -+ vshr.s64 q13, q14, #26 -+ vsub.i64 q6, q6, q7 -+ vshr.s64 q7, q15, #25 -+ vadd.i64 q10, q10, q13 -+ vshl.i64 q13, q13, #26 -+ vadd.i64 q14, q10, q3 -+ vadd.i64 q1, q1, q7 -+ add r2, r3, #240 -+ vshl.i64 q7, q7, #25 -+ add r4, r3, #144 -+ vadd.i64 q15, q1, q11 -+ add r2, r2, #8 -+ vsub.i64 q2, q2, q13 -+ add r4, r4, #8 -+ vshr.s64 q13, q14, #25 -+ vsub.i64 q7, q8, q7 -+ vshr.s64 q8, q15, #26 -+ vadd.i64 q14, q13, q13 -+ vadd.i64 q12, q12, q8 -+ vtrn.32 d12, d14 -+ vshl.i64 q8, q8, #26 -+ vtrn.32 d13, d15 -+ vadd.i64 q3, q12, q3 -+ vadd.i64 q0, q0, q14 -+ vst1.8 d12, [r2, : 64]! -+ vshl.i64 q7, q13, #4 -+ vst1.8 d13, [r4, : 64]! -+ vsub.i64 q1, q1, q8 -+ vshr.s64 q3, q3, #25 -+ vadd.i64 q0, q0, q7 -+ vadd.i64 q5, q5, q3 -+ vshl.i64 q3, q3, #25 -+ vadd.i64 q6, q5, q11 -+ vadd.i64 q0, q0, q13 -+ vshl.i64 q7, q13, #25 -+ vadd.i64 q8, q0, q11 -+ vsub.i64 q3, q12, q3 -+ vshr.s64 q6, q6, #26 -+ vsub.i64 q7, q10, q7 -+ vtrn.32 d2, d6 -+ vshr.s64 q8, q8, #26 -+ vtrn.32 d3, d7 -+ vadd.i64 q3, q9, q6 -+ vst1.8 d2, [r2, : 64] -+ vshl.i64 q6, q6, #26 -+ vst1.8 d3, [r4, : 64] -+ vadd.i64 q1, q4, q8 -+ vtrn.32 d4, d14 -+ vshl.i64 q4, q8, #26 -+ vtrn.32 d5, d15 -+ vsub.i64 q5, q5, q6 -+ add r2, r2, #16 -+ vsub.i64 q0, q0, q4 -+ vst1.8 d4, [r2, : 64] -+ add r4, r4, #16 -+ vst1.8 d5, [r4, : 64] -+ vtrn.32 d10, d6 -+ vtrn.32 d11, d7 -+ sub r2, r2, #8 -+ sub r4, r4, #8 -+ vtrn.32 d0, d2 -+ vtrn.32 d1, d3 -+ vst1.8 d10, [r2, : 64] -+ vst1.8 d11, [r4, : 64] -+ sub r2, r2, #24 -+ sub r4, r4, #24 -+ vst1.8 d0, [r2, : 64] -+ vst1.8 d1, [r4, : 64] -+ ldr r2, [sp, #456] -+ ldr r4, [sp, #460] -+ subs r5, r2, #1 -+ bge .Lmainloop -+ add r1, r3, #144 -+ add r2, r3, #336 -+ vld1.8 {d0-d1}, [r1, : 128]! -+ vld1.8 {d2-d3}, [r1, : 128]! -+ vld1.8 {d4}, [r1, : 64] -+ vst1.8 {d0-d1}, [r2, : 128]! -+ vst1.8 {d2-d3}, [r2, : 128]! -+ vst1.8 d4, [r2, : 64] -+ movw r1, #0 -+.Linvertloop: -+ add r2, r3, #144 -+ movw r4, #0 -+ movw r5, #2 -+ cmp r1, #1 -+ moveq r5, #1 -+ addeq r2, r3, #336 -+ addeq r4, r3, #48 -+ cmp r1, #2 -+ moveq r5, #1 -+ addeq r2, r3, #48 -+ cmp r1, #3 -+ moveq r5, #5 -+ addeq r4, r3, #336 -+ cmp r1, #4 -+ moveq r5, #10 -+ cmp r1, #5 -+ moveq r5, #20 -+ cmp r1, #6 -+ moveq r5, #10 -+ addeq r2, r3, #336 -+ addeq r4, r3, #336 -+ cmp r1, #7 -+ moveq r5, #50 -+ cmp r1, #8 -+ moveq r5, #100 -+ cmp r1, #9 -+ moveq r5, #50 -+ addeq r2, r3, #336 -+ cmp r1, #10 -+ moveq r5, #5 -+ addeq r2, r3, #48 -+ cmp r1, #11 -+ moveq r5, #0 -+ addeq r2, r3, #96 -+ add r6, r3, #144 -+ add r7, r3, #288 -+ vld1.8 {d0-d1}, [r6, : 128]! -+ vld1.8 {d2-d3}, [r6, : 128]! -+ vld1.8 {d4}, [r6, : 64] -+ vst1.8 {d0-d1}, [r7, : 128]! -+ vst1.8 {d2-d3}, [r7, : 128]! -+ vst1.8 d4, [r7, : 64] -+ cmp r5, #0 -+ beq .Lskipsquaringloop -+.Lsquaringloop: -+ add r6, r3, #288 -+ add r7, r3, #288 -+ add r8, r3, #288 -+ vmov.i32 q0, #19 -+ vmov.i32 q1, #0 -+ vmov.i32 q2, #1 -+ vzip.i32 q1, q2 -+ vld1.8 {d4-d5}, [r7, : 128]! -+ vld1.8 {d6-d7}, [r7, : 128]! -+ vld1.8 {d9}, [r7, : 64] -+ vld1.8 {d10-d11}, [r6, : 128]! -+ add r7, sp, #384 -+ vld1.8 {d12-d13}, [r6, : 128]! -+ vmul.i32 q7, q2, q0 -+ vld1.8 {d8}, [r6, : 64] -+ vext.32 d17, d11, d10, #1 -+ vmul.i32 q9, q3, q0 -+ vext.32 d16, d10, d8, #1 -+ vshl.u32 q10, q5, q1 -+ vext.32 d22, d14, d4, #1 -+ vext.32 d24, d18, d6, #1 -+ vshl.u32 q13, q6, q1 -+ vshl.u32 d28, d8, d2 -+ vrev64.i32 d22, d22 -+ vmul.i32 d1, d9, d1 -+ vrev64.i32 d24, d24 -+ vext.32 d29, d8, d13, #1 -+ vext.32 d0, d1, d9, #1 -+ vrev64.i32 d0, d0 -+ vext.32 d2, d9, d1, #1 -+ vext.32 d23, d15, d5, #1 -+ vmull.s32 q4, d20, d4 -+ vrev64.i32 d23, d23 -+ vmlal.s32 q4, d21, d1 -+ vrev64.i32 d2, d2 -+ vmlal.s32 q4, d26, d19 -+ vext.32 d3, d5, d15, #1 -+ vmlal.s32 q4, d27, d18 -+ vrev64.i32 d3, d3 -+ vmlal.s32 q4, d28, d15 -+ vext.32 d14, d12, d11, #1 -+ vmull.s32 q5, d16, d23 -+ vext.32 d15, d13, d12, #1 -+ vmlal.s32 q5, d17, d4 -+ vst1.8 d8, [r7, : 64]! -+ vmlal.s32 q5, d14, d1 -+ vext.32 d12, d9, d8, #0 -+ vmlal.s32 q5, d15, d19 -+ vmov.i64 d13, #0 -+ vmlal.s32 q5, d29, d18 -+ vext.32 d25, d19, d7, #1 -+ vmlal.s32 q6, d20, d5 -+ vrev64.i32 d25, d25 -+ vmlal.s32 q6, d21, d4 -+ vst1.8 d11, [r7, : 64]! -+ vmlal.s32 q6, d26, d1 -+ vext.32 d9, d10, d10, #0 -+ vmlal.s32 q6, d27, d19 -+ vmov.i64 d8, #0 -+ vmlal.s32 q6, d28, d18 -+ vmlal.s32 q4, d16, d24 -+ vmlal.s32 q4, d17, d5 -+ vmlal.s32 q4, d14, d4 -+ vst1.8 d12, [r7, : 64]! -+ vmlal.s32 q4, d15, d1 -+ vext.32 d10, d13, d12, #0 -+ vmlal.s32 q4, d29, d19 -+ vmov.i64 d11, #0 -+ vmlal.s32 q5, d20, d6 -+ vmlal.s32 q5, d21, d5 -+ vmlal.s32 q5, d26, d4 -+ vext.32 d13, d8, d8, #0 -+ vmlal.s32 q5, d27, d1 -+ vmov.i64 d12, #0 -+ vmlal.s32 q5, d28, d19 -+ vst1.8 d9, [r7, : 64]! -+ vmlal.s32 q6, d16, d25 -+ vmlal.s32 q6, d17, d6 -+ vst1.8 d10, [r7, : 64] -+ vmlal.s32 q6, d14, d5 -+ vext.32 d8, d11, d10, #0 -+ vmlal.s32 q6, d15, d4 -+ vmov.i64 d9, #0 -+ vmlal.s32 q6, d29, d1 -+ vmlal.s32 q4, d20, d7 -+ vmlal.s32 q4, d21, d6 -+ vmlal.s32 q4, d26, d5 -+ vext.32 d11, d12, d12, #0 -+ vmlal.s32 q4, d27, d4 -+ vmov.i64 d10, #0 -+ vmlal.s32 q4, d28, d1 -+ vmlal.s32 q5, d16, d0 -+ sub r6, r7, #32 -+ vmlal.s32 q5, d17, d7 -+ vmlal.s32 q5, d14, d6 -+ vext.32 d30, d9, d8, #0 -+ vmlal.s32 q5, d15, d5 -+ vld1.8 {d31}, [r6, : 64]! -+ vmlal.s32 q5, d29, d4 -+ vmlal.s32 q15, d20, d0 -+ vext.32 d0, d6, d18, #1 -+ vmlal.s32 q15, d21, d25 -+ vrev64.i32 d0, d0 -+ vmlal.s32 q15, d26, d24 -+ vext.32 d1, d7, d19, #1 -+ vext.32 d7, d10, d10, #0 -+ vmlal.s32 q15, d27, d23 -+ vrev64.i32 d1, d1 -+ vld1.8 {d6}, [r6, : 64] -+ vmlal.s32 q15, d28, d22 -+ vmlal.s32 q3, d16, d4 -+ add r6, r6, #24 -+ vmlal.s32 q3, d17, d2 -+ vext.32 d4, d31, d30, #0 -+ vmov d17, d11 -+ vmlal.s32 q3, d14, d1 -+ vext.32 d11, d13, d13, #0 -+ vext.32 d13, d30, d30, #0 -+ vmlal.s32 q3, d15, d0 -+ vext.32 d1, d8, d8, #0 -+ vmlal.s32 q3, d29, d3 -+ vld1.8 {d5}, [r6, : 64] -+ sub r6, r6, #16 -+ vext.32 d10, d6, d6, #0 -+ vmov.i32 q1, #0xffffffff -+ vshl.i64 q4, q1, #25 -+ add r7, sp, #480 -+ vld1.8 {d14-d15}, [r7, : 128] -+ vadd.i64 q9, q2, q7 -+ vshl.i64 q1, q1, #26 -+ vshr.s64 q10, q9, #26 -+ vld1.8 {d0}, [r6, : 64]! -+ vadd.i64 q5, q5, q10 -+ vand q9, q9, q1 -+ vld1.8 {d16}, [r6, : 64]! -+ add r6, sp, #496 -+ vld1.8 {d20-d21}, [r6, : 128] -+ vadd.i64 q11, q5, q10 -+ vsub.i64 q2, q2, q9 -+ vshr.s64 q9, q11, #25 -+ vext.32 d12, d5, d4, #0 -+ vand q11, q11, q4 -+ vadd.i64 q0, q0, q9 -+ vmov d19, d7 -+ vadd.i64 q3, q0, q7 -+ vsub.i64 q5, q5, q11 -+ vshr.s64 q11, q3, #26 -+ vext.32 d18, d11, d10, #0 -+ vand q3, q3, q1 -+ vadd.i64 q8, q8, q11 -+ vadd.i64 q11, q8, q10 -+ vsub.i64 q0, q0, q3 -+ vshr.s64 q3, q11, #25 -+ vand q11, q11, q4 -+ vadd.i64 q3, q6, q3 -+ vadd.i64 q6, q3, q7 -+ vsub.i64 q8, q8, q11 -+ vshr.s64 q11, q6, #26 -+ vand q6, q6, q1 -+ vadd.i64 q9, q9, q11 -+ vadd.i64 d25, d19, d21 -+ vsub.i64 q3, q3, q6 -+ vshr.s64 d23, d25, #25 -+ vand q4, q12, q4 -+ vadd.i64 d21, d23, d23 -+ vshl.i64 d25, d23, #4 -+ vadd.i64 d21, d21, d23 -+ vadd.i64 d25, d25, d21 -+ vadd.i64 d4, d4, d25 -+ vzip.i32 q0, q8 -+ vadd.i64 d12, d4, d14 -+ add r6, r8, #8 -+ vst1.8 d0, [r6, : 64] -+ vsub.i64 d19, d19, d9 -+ add r6, r6, #16 -+ vst1.8 d16, [r6, : 64] -+ vshr.s64 d22, d12, #26 -+ vand q0, q6, q1 -+ vadd.i64 d10, d10, d22 -+ vzip.i32 q3, q9 -+ vsub.i64 d4, d4, d0 -+ sub r6, r6, #8 -+ vst1.8 d6, [r6, : 64] -+ add r6, r6, #16 -+ vst1.8 d18, [r6, : 64] -+ vzip.i32 q2, q5 -+ sub r6, r6, #32 -+ vst1.8 d4, [r6, : 64] -+ subs r5, r5, #1 -+ bhi .Lsquaringloop -+.Lskipsquaringloop: -+ mov r2, r2 -+ add r5, r3, #288 -+ add r6, r3, #144 -+ vmov.i32 q0, #19 -+ vmov.i32 q1, #0 -+ vmov.i32 q2, #1 -+ vzip.i32 q1, q2 -+ vld1.8 {d4-d5}, [r5, : 128]! -+ vld1.8 {d6-d7}, [r5, : 128]! -+ vld1.8 {d9}, [r5, : 64] -+ vld1.8 {d10-d11}, [r2, : 128]! -+ add r5, sp, #384 -+ vld1.8 {d12-d13}, [r2, : 128]! -+ vmul.i32 q7, q2, q0 -+ vld1.8 {d8}, [r2, : 64] -+ vext.32 d17, d11, d10, #1 -+ vmul.i32 q9, q3, q0 -+ vext.32 d16, d10, d8, #1 -+ vshl.u32 q10, q5, q1 -+ vext.32 d22, d14, d4, #1 -+ vext.32 d24, d18, d6, #1 -+ vshl.u32 q13, q6, q1 -+ vshl.u32 d28, d8, d2 -+ vrev64.i32 d22, d22 -+ vmul.i32 d1, d9, d1 -+ vrev64.i32 d24, d24 -+ vext.32 d29, d8, d13, #1 -+ vext.32 d0, d1, d9, #1 -+ vrev64.i32 d0, d0 -+ vext.32 d2, d9, d1, #1 -+ vext.32 d23, d15, d5, #1 -+ vmull.s32 q4, d20, d4 -+ vrev64.i32 d23, d23 -+ vmlal.s32 q4, d21, d1 -+ vrev64.i32 d2, d2 -+ vmlal.s32 q4, d26, d19 -+ vext.32 d3, d5, d15, #1 -+ vmlal.s32 q4, d27, d18 -+ vrev64.i32 d3, d3 -+ vmlal.s32 q4, d28, d15 -+ vext.32 d14, d12, d11, #1 -+ vmull.s32 q5, d16, d23 -+ vext.32 d15, d13, d12, #1 -+ vmlal.s32 q5, d17, d4 -+ vst1.8 d8, [r5, : 64]! -+ vmlal.s32 q5, d14, d1 -+ vext.32 d12, d9, d8, #0 -+ vmlal.s32 q5, d15, d19 -+ vmov.i64 d13, #0 -+ vmlal.s32 q5, d29, d18 -+ vext.32 d25, d19, d7, #1 -+ vmlal.s32 q6, d20, d5 -+ vrev64.i32 d25, d25 -+ vmlal.s32 q6, d21, d4 -+ vst1.8 d11, [r5, : 64]! -+ vmlal.s32 q6, d26, d1 -+ vext.32 d9, d10, d10, #0 -+ vmlal.s32 q6, d27, d19 -+ vmov.i64 d8, #0 -+ vmlal.s32 q6, d28, d18 -+ vmlal.s32 q4, d16, d24 -+ vmlal.s32 q4, d17, d5 -+ vmlal.s32 q4, d14, d4 -+ vst1.8 d12, [r5, : 64]! -+ vmlal.s32 q4, d15, d1 -+ vext.32 d10, d13, d12, #0 -+ vmlal.s32 q4, d29, d19 -+ vmov.i64 d11, #0 -+ vmlal.s32 q5, d20, d6 -+ vmlal.s32 q5, d21, d5 -+ vmlal.s32 q5, d26, d4 -+ vext.32 d13, d8, d8, #0 -+ vmlal.s32 q5, d27, d1 -+ vmov.i64 d12, #0 -+ vmlal.s32 q5, d28, d19 -+ vst1.8 d9, [r5, : 64]! -+ vmlal.s32 q6, d16, d25 -+ vmlal.s32 q6, d17, d6 -+ vst1.8 d10, [r5, : 64] -+ vmlal.s32 q6, d14, d5 -+ vext.32 d8, d11, d10, #0 -+ vmlal.s32 q6, d15, d4 -+ vmov.i64 d9, #0 -+ vmlal.s32 q6, d29, d1 -+ vmlal.s32 q4, d20, d7 -+ vmlal.s32 q4, d21, d6 -+ vmlal.s32 q4, d26, d5 -+ vext.32 d11, d12, d12, #0 -+ vmlal.s32 q4, d27, d4 -+ vmov.i64 d10, #0 -+ vmlal.s32 q4, d28, d1 -+ vmlal.s32 q5, d16, d0 -+ sub r2, r5, #32 -+ vmlal.s32 q5, d17, d7 -+ vmlal.s32 q5, d14, d6 -+ vext.32 d30, d9, d8, #0 -+ vmlal.s32 q5, d15, d5 -+ vld1.8 {d31}, [r2, : 64]! -+ vmlal.s32 q5, d29, d4 -+ vmlal.s32 q15, d20, d0 -+ vext.32 d0, d6, d18, #1 -+ vmlal.s32 q15, d21, d25 -+ vrev64.i32 d0, d0 -+ vmlal.s32 q15, d26, d24 -+ vext.32 d1, d7, d19, #1 -+ vext.32 d7, d10, d10, #0 -+ vmlal.s32 q15, d27, d23 -+ vrev64.i32 d1, d1 -+ vld1.8 {d6}, [r2, : 64] -+ vmlal.s32 q15, d28, d22 -+ vmlal.s32 q3, d16, d4 -+ add r2, r2, #24 -+ vmlal.s32 q3, d17, d2 -+ vext.32 d4, d31, d30, #0 -+ vmov d17, d11 -+ vmlal.s32 q3, d14, d1 -+ vext.32 d11, d13, d13, #0 -+ vext.32 d13, d30, d30, #0 -+ vmlal.s32 q3, d15, d0 -+ vext.32 d1, d8, d8, #0 -+ vmlal.s32 q3, d29, d3 -+ vld1.8 {d5}, [r2, : 64] -+ sub r2, r2, #16 -+ vext.32 d10, d6, d6, #0 -+ vmov.i32 q1, #0xffffffff -+ vshl.i64 q4, q1, #25 -+ add r5, sp, #480 -+ vld1.8 {d14-d15}, [r5, : 128] -+ vadd.i64 q9, q2, q7 -+ vshl.i64 q1, q1, #26 -+ vshr.s64 q10, q9, #26 -+ vld1.8 {d0}, [r2, : 64]! -+ vadd.i64 q5, q5, q10 -+ vand q9, q9, q1 -+ vld1.8 {d16}, [r2, : 64]! -+ add r2, sp, #496 -+ vld1.8 {d20-d21}, [r2, : 128] -+ vadd.i64 q11, q5, q10 -+ vsub.i64 q2, q2, q9 -+ vshr.s64 q9, q11, #25 -+ vext.32 d12, d5, d4, #0 -+ vand q11, q11, q4 -+ vadd.i64 q0, q0, q9 -+ vmov d19, d7 -+ vadd.i64 q3, q0, q7 -+ vsub.i64 q5, q5, q11 -+ vshr.s64 q11, q3, #26 -+ vext.32 d18, d11, d10, #0 -+ vand q3, q3, q1 -+ vadd.i64 q8, q8, q11 -+ vadd.i64 q11, q8, q10 -+ vsub.i64 q0, q0, q3 -+ vshr.s64 q3, q11, #25 -+ vand q11, q11, q4 -+ vadd.i64 q3, q6, q3 -+ vadd.i64 q6, q3, q7 -+ vsub.i64 q8, q8, q11 -+ vshr.s64 q11, q6, #26 -+ vand q6, q6, q1 -+ vadd.i64 q9, q9, q11 -+ vadd.i64 d25, d19, d21 -+ vsub.i64 q3, q3, q6 -+ vshr.s64 d23, d25, #25 -+ vand q4, q12, q4 -+ vadd.i64 d21, d23, d23 -+ vshl.i64 d25, d23, #4 -+ vadd.i64 d21, d21, d23 -+ vadd.i64 d25, d25, d21 -+ vadd.i64 d4, d4, d25 -+ vzip.i32 q0, q8 -+ vadd.i64 d12, d4, d14 -+ add r2, r6, #8 -+ vst1.8 d0, [r2, : 64] -+ vsub.i64 d19, d19, d9 -+ add r2, r2, #16 -+ vst1.8 d16, [r2, : 64] -+ vshr.s64 d22, d12, #26 -+ vand q0, q6, q1 -+ vadd.i64 d10, d10, d22 -+ vzip.i32 q3, q9 -+ vsub.i64 d4, d4, d0 -+ sub r2, r2, #8 -+ vst1.8 d6, [r2, : 64] -+ add r2, r2, #16 -+ vst1.8 d18, [r2, : 64] -+ vzip.i32 q2, q5 -+ sub r2, r2, #32 -+ vst1.8 d4, [r2, : 64] -+ cmp r4, #0 -+ beq .Lskippostcopy -+ add r2, r3, #144 -+ mov r4, r4 -+ vld1.8 {d0-d1}, [r2, : 128]! -+ vld1.8 {d2-d3}, [r2, : 128]! -+ vld1.8 {d4}, [r2, : 64] -+ vst1.8 {d0-d1}, [r4, : 128]! -+ vst1.8 {d2-d3}, [r4, : 128]! -+ vst1.8 d4, [r4, : 64] -+.Lskippostcopy: -+ cmp r1, #1 -+ bne .Lskipfinalcopy -+ add r2, r3, #288 -+ add r4, r3, #144 -+ vld1.8 {d0-d1}, [r2, : 128]! -+ vld1.8 {d2-d3}, [r2, : 128]! -+ vld1.8 {d4}, [r2, : 64] -+ vst1.8 {d0-d1}, [r4, : 128]! -+ vst1.8 {d2-d3}, [r4, : 128]! -+ vst1.8 d4, [r4, : 64] -+.Lskipfinalcopy: -+ add r1, r1, #1 -+ cmp r1, #12 -+ blo .Linvertloop -+ add r1, r3, #144 -+ ldr r2, [r1], #4 -+ ldr r3, [r1], #4 -+ ldr r4, [r1], #4 -+ ldr r5, [r1], #4 -+ ldr r6, [r1], #4 -+ ldr r7, [r1], #4 -+ ldr r8, [r1], #4 -+ ldr r9, [r1], #4 -+ ldr r10, [r1], #4 -+ ldr r1, [r1] -+ add r11, r1, r1, LSL #4 -+ add r11, r11, r1, LSL #1 -+ add r11, r11, #16777216 -+ mov r11, r11, ASR #25 -+ add r11, r11, r2 -+ mov r11, r11, ASR #26 -+ add r11, r11, r3 -+ mov r11, r11, ASR #25 -+ add r11, r11, r4 -+ mov r11, r11, ASR #26 -+ add r11, r11, r5 -+ mov r11, r11, ASR #25 -+ add r11, r11, r6 -+ mov r11, r11, ASR #26 -+ add r11, r11, r7 -+ mov r11, r11, ASR #25 -+ add r11, r11, r8 -+ mov r11, r11, ASR #26 -+ add r11, r11, r9 -+ mov r11, r11, ASR #25 -+ add r11, r11, r10 -+ mov r11, r11, ASR #26 -+ add r11, r11, r1 -+ mov r11, r11, ASR #25 -+ add r2, r2, r11 -+ add r2, r2, r11, LSL #1 -+ add r2, r2, r11, LSL #4 -+ mov r11, r2, ASR #26 -+ add r3, r3, r11 -+ sub r2, r2, r11, LSL #26 -+ mov r11, r3, ASR #25 -+ add r4, r4, r11 -+ sub r3, r3, r11, LSL #25 -+ mov r11, r4, ASR #26 -+ add r5, r5, r11 -+ sub r4, r4, r11, LSL #26 -+ mov r11, r5, ASR #25 -+ add r6, r6, r11 -+ sub r5, r5, r11, LSL #25 -+ mov r11, r6, ASR #26 -+ add r7, r7, r11 -+ sub r6, r6, r11, LSL #26 -+ mov r11, r7, ASR #25 -+ add r8, r8, r11 -+ sub r7, r7, r11, LSL #25 -+ mov r11, r8, ASR #26 -+ add r9, r9, r11 -+ sub r8, r8, r11, LSL #26 -+ mov r11, r9, ASR #25 -+ add r10, r10, r11 -+ sub r9, r9, r11, LSL #25 -+ mov r11, r10, ASR #26 -+ add r1, r1, r11 -+ sub r10, r10, r11, LSL #26 -+ mov r11, r1, ASR #25 -+ sub r1, r1, r11, LSL #25 -+ add r2, r2, r3, LSL #26 -+ mov r3, r3, LSR #6 -+ add r3, r3, r4, LSL #19 -+ mov r4, r4, LSR #13 -+ add r4, r4, r5, LSL #13 -+ mov r5, r5, LSR #19 -+ add r5, r5, r6, LSL #6 -+ add r6, r7, r8, LSL #25 -+ mov r7, r8, LSR #7 -+ add r7, r7, r9, LSL #19 -+ mov r8, r9, LSR #13 -+ add r8, r8, r10, LSL #12 -+ mov r9, r10, LSR #20 -+ add r1, r9, r1, LSL #6 -+ str r2, [r0] -+ str r3, [r0, #4] -+ str r4, [r0, #8] -+ str r5, [r0, #12] -+ str r6, [r0, #16] -+ str r7, [r0, #20] -+ str r8, [r0, #24] -+ str r1, [r0, #28] -+ movw r0, #0 -+ mov sp, ip -+ pop {r4-r11, pc} -+ENDPROC(curve25519_neon) -+#endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/poly1305/poly1305-mips.S 2019-08-20 20:26:42.401341426 +0000 -@@ -0,0 +1,407 @@ -+/* SPDX-License-Identifier: GPL-2.0 OR MIT */ -+/* -+ * Copyright (C) 2016-2018 René van Dorst All Rights Reserved. -+ * Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ */ -+ -+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -+#define MSB 0 -+#define LSB 3 -+#else -+#define MSB 3 -+#define LSB 0 -+#endif -+ -+#define POLY1305_BLOCK_SIZE 16 -+.text -+#define H0 $t0 -+#define H1 $t1 -+#define H2 $t2 -+#define H3 $t3 -+#define H4 $t4 -+ -+#define R0 $t5 -+#define R1 $t6 -+#define R2 $t7 -+#define R3 $t8 -+ -+#define O0 $s0 -+#define O1 $s4 -+#define O2 $v1 -+#define O3 $t9 -+#define O4 $s5 -+ -+#define S1 $s1 -+#define S2 $s2 -+#define S3 $s3 -+ -+#define SC $at -+#define CA $v0 -+ -+/* Input arguments */ -+#define poly $a0 -+#define src $a1 -+#define srclen $a2 -+#define hibit $a3 -+ -+/* Location in the opaque buffer -+ * R[0..3], CA, H[0..4] -+ */ -+#define PTR_POLY1305_R(n) ( 0 + (n*4)) ## ($a0) -+#define PTR_POLY1305_CA (16 ) ## ($a0) -+#define PTR_POLY1305_H(n) (20 + (n*4)) ## ($a0) -+ -+#define POLY1305_BLOCK_SIZE 16 -+#define POLY1305_STACK_SIZE 32 -+ -+.set noat -+.align 4 -+.globl poly1305_blocks_mips -+.ent poly1305_blocks_mips -+poly1305_blocks_mips: -+ .frame $sp, POLY1305_STACK_SIZE, $ra -+ /* srclen &= 0xFFFFFFF0 */ -+ ins srclen, $zero, 0, 4 -+ -+ addiu $sp, -(POLY1305_STACK_SIZE) -+ -+ /* check srclen >= 16 bytes */ -+ beqz srclen, .Lpoly1305_blocks_mips_end -+ -+ /* Calculate last round based on src address pointer. -+ * last round src ptr (srclen) = src + (srclen & 0xFFFFFFF0) -+ */ -+ addu srclen, src -+ -+ lw R0, PTR_POLY1305_R(0) -+ lw R1, PTR_POLY1305_R(1) -+ lw R2, PTR_POLY1305_R(2) -+ lw R3, PTR_POLY1305_R(3) -+ -+ /* store the used save registers. */ -+ sw $s0, 0($sp) -+ sw $s1, 4($sp) -+ sw $s2, 8($sp) -+ sw $s3, 12($sp) -+ sw $s4, 16($sp) -+ sw $s5, 20($sp) -+ -+ /* load Hx and Carry */ -+ lw CA, PTR_POLY1305_CA -+ lw H0, PTR_POLY1305_H(0) -+ lw H1, PTR_POLY1305_H(1) -+ lw H2, PTR_POLY1305_H(2) -+ lw H3, PTR_POLY1305_H(3) -+ lw H4, PTR_POLY1305_H(4) -+ -+ /* Sx = Rx + (Rx >> 2) */ -+ srl S1, R1, 2 -+ srl S2, R2, 2 -+ srl S3, R3, 2 -+ addu S1, R1 -+ addu S2, R2 -+ addu S3, R3 -+ -+ addiu SC, $zero, 1 -+ -+.Lpoly1305_loop: -+ lwl O0, 0+MSB(src) -+ lwl O1, 4+MSB(src) -+ lwl O2, 8+MSB(src) -+ lwl O3,12+MSB(src) -+ lwr O0, 0+LSB(src) -+ lwr O1, 4+LSB(src) -+ lwr O2, 8+LSB(src) -+ lwr O3,12+LSB(src) -+ -+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -+ wsbh O0 -+ wsbh O1 -+ wsbh O2 -+ wsbh O3 -+ rotr O0, 16 -+ rotr O1, 16 -+ rotr O2, 16 -+ rotr O3, 16 -+#endif -+ -+ /* h0 = (u32)(d0 = (u64)h0 + inp[0] + c 'Carry_previous cycle'); */ -+ addu H0, CA -+ sltu CA, H0, CA -+ addu O0, H0 -+ sltu H0, O0, H0 -+ addu CA, H0 -+ -+ /* h1 = (u32)(d1 = (u64)h1 + (d0 >> 32) + inp[4]); */ -+ addu H1, CA -+ sltu CA, H1, CA -+ addu O1, H1 -+ sltu H1, O1, H1 -+ addu CA, H1 -+ -+ /* h2 = (u32)(d2 = (u64)h2 + (d1 >> 32) + inp[8]); */ -+ addu H2, CA -+ sltu CA, H2, CA -+ addu O2, H2 -+ sltu H2, O2, H2 -+ addu CA, H2 -+ -+ /* h3 = (u32)(d3 = (u64)h3 + (d2 >> 32) + inp[12]); */ -+ addu H3, CA -+ sltu CA, H3, CA -+ addu O3, H3 -+ sltu H3, O3, H3 -+ addu CA, H3 -+ -+ /* h4 += (u32)(d3 >> 32) + padbit; */ -+ addu H4, hibit -+ addu O4, H4, CA -+ -+ /* D0 */ -+ multu O0, R0 -+ maddu O1, S3 -+ maddu O2, S2 -+ maddu O3, S1 -+ mfhi CA -+ mflo H0 -+ -+ /* D1 */ -+ multu O0, R1 -+ maddu O1, R0 -+ maddu O2, S3 -+ maddu O3, S2 -+ maddu O4, S1 -+ maddu CA, SC -+ mfhi CA -+ mflo H1 -+ -+ /* D2 */ -+ multu O0, R2 -+ maddu O1, R1 -+ maddu O2, R0 -+ maddu O3, S3 -+ maddu O4, S2 -+ maddu CA, SC -+ mfhi CA -+ mflo H2 -+ -+ /* D4 */ -+ mul H4, O4, R0 -+ -+ /* D3 */ -+ multu O0, R3 -+ maddu O1, R2 -+ maddu O2, R1 -+ maddu O3, R0 -+ maddu O4, S3 -+ maddu CA, SC -+ mfhi CA -+ mflo H3 -+ -+ addiu src, POLY1305_BLOCK_SIZE -+ -+ /* h4 += (u32)(d3 >> 32); */ -+ addu O4, H4, CA -+ /* h4 &= 3 */ -+ andi H4, O4, 3 -+ /* c = (h4 >> 2) + (h4 & ~3U); */ -+ srl CA, O4, 2 -+ ins O4, $zero, 0, 2 -+ -+ addu CA, O4 -+ -+ /* able to do a 16 byte block. */ -+ bne src, srclen, .Lpoly1305_loop -+ -+ /* restore the used save registers. */ -+ lw $s0, 0($sp) -+ lw $s1, 4($sp) -+ lw $s2, 8($sp) -+ lw $s3, 12($sp) -+ lw $s4, 16($sp) -+ lw $s5, 20($sp) -+ -+ /* store Hx and Carry */ -+ sw CA, PTR_POLY1305_CA -+ sw H0, PTR_POLY1305_H(0) -+ sw H1, PTR_POLY1305_H(1) -+ sw H2, PTR_POLY1305_H(2) -+ sw H3, PTR_POLY1305_H(3) -+ sw H4, PTR_POLY1305_H(4) -+ -+.Lpoly1305_blocks_mips_end: -+ addiu $sp, POLY1305_STACK_SIZE -+ -+ /* Jump Back */ -+ jr $ra -+.end poly1305_blocks_mips -+.set at -+ -+/* Input arguments CTX=$a0, MAC=$a1, NONCE=$a2 */ -+#define MAC $a1 -+#define NONCE $a2 -+ -+#define G0 $t5 -+#define G1 $t6 -+#define G2 $t7 -+#define G3 $t8 -+#define G4 $t9 -+ -+.set noat -+.align 4 -+.globl poly1305_emit_mips -+.ent poly1305_emit_mips -+poly1305_emit_mips: -+ /* load Hx and Carry */ -+ lw CA, PTR_POLY1305_CA -+ lw H0, PTR_POLY1305_H(0) -+ lw H1, PTR_POLY1305_H(1) -+ lw H2, PTR_POLY1305_H(2) -+ lw H3, PTR_POLY1305_H(3) -+ lw H4, PTR_POLY1305_H(4) -+ -+ /* Add left over carry */ -+ addu H0, CA -+ sltu CA, H0, CA -+ addu H1, CA -+ sltu CA, H1, CA -+ addu H2, CA -+ sltu CA, H2, CA -+ addu H3, CA -+ sltu CA, H3, CA -+ addu H4, CA -+ -+ /* compare to modulus by computing h + -p */ -+ addiu G0, H0, 5 -+ sltu CA, G0, H0 -+ addu G1, H1, CA -+ sltu CA, G1, H1 -+ addu G2, H2, CA -+ sltu CA, G2, H2 -+ addu G3, H3, CA -+ sltu CA, G3, H3 -+ addu G4, H4, CA -+ -+ srl SC, G4, 2 -+ -+ /* if there was carry into 131st bit, h3:h0 = g3:g0 */ -+ movn H0, G0, SC -+ movn H1, G1, SC -+ movn H2, G2, SC -+ movn H3, G3, SC -+ -+ lwl G0, 0+MSB(NONCE) -+ lwl G1, 4+MSB(NONCE) -+ lwl G2, 8+MSB(NONCE) -+ lwl G3,12+MSB(NONCE) -+ lwr G0, 0+LSB(NONCE) -+ lwr G1, 4+LSB(NONCE) -+ lwr G2, 8+LSB(NONCE) -+ lwr G3,12+LSB(NONCE) -+ -+ /* mac = (h + nonce) % (2^128) */ -+ addu H0, G0 -+ sltu CA, H0, G0 -+ -+ /* H1 */ -+ addu H1, CA -+ sltu CA, H1, CA -+ addu H1, G1 -+ sltu G1, H1, G1 -+ addu CA, G1 -+ -+ /* H2 */ -+ addu H2, CA -+ sltu CA, H2, CA -+ addu H2, G2 -+ sltu G2, H2, G2 -+ addu CA, G2 -+ -+ /* H3 */ -+ addu H3, CA -+ addu H3, G3 -+ -+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -+ wsbh H0 -+ wsbh H1 -+ wsbh H2 -+ wsbh H3 -+ rotr H0, 16 -+ rotr H1, 16 -+ rotr H2, 16 -+ rotr H3, 16 -+#endif -+ -+ /* store MAC */ -+ swl H0, 0+MSB(MAC) -+ swl H1, 4+MSB(MAC) -+ swl H2, 8+MSB(MAC) -+ swl H3,12+MSB(MAC) -+ swr H0, 0+LSB(MAC) -+ swr H1, 4+LSB(MAC) -+ swr H2, 8+LSB(MAC) -+ swr H3,12+LSB(MAC) -+ -+ jr $ra -+.end poly1305_emit_mips -+ -+#define PR0 $t0 -+#define PR1 $t1 -+#define PR2 $t2 -+#define PR3 $t3 -+#define PT0 $t4 -+ -+/* Input arguments CTX=$a0, KEY=$a1 */ -+ -+.align 4 -+.globl poly1305_init_mips -+.ent poly1305_init_mips -+poly1305_init_mips: -+ lwl PR0, 0+MSB($a1) -+ lwl PR1, 4+MSB($a1) -+ lwl PR2, 8+MSB($a1) -+ lwl PR3,12+MSB($a1) -+ lwr PR0, 0+LSB($a1) -+ lwr PR1, 4+LSB($a1) -+ lwr PR2, 8+LSB($a1) -+ lwr PR3,12+LSB($a1) -+ -+ /* store Hx and Carry */ -+ sw $zero, PTR_POLY1305_CA -+ sw $zero, PTR_POLY1305_H(0) -+ sw $zero, PTR_POLY1305_H(1) -+ sw $zero, PTR_POLY1305_H(2) -+ sw $zero, PTR_POLY1305_H(3) -+ sw $zero, PTR_POLY1305_H(4) -+ -+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -+ wsbh PR0 -+ wsbh PR1 -+ wsbh PR2 -+ wsbh PR3 -+ rotr PR0, 16 -+ rotr PR1, 16 -+ rotr PR2, 16 -+ rotr PR3, 16 -+#endif -+ -+ lui PT0, 0x0FFF -+ ori PT0, 0xFFFC -+ -+ /* AND 0x0fffffff; */ -+ ext PR0, PR0, 0, (32-4) -+ -+ /* AND 0x0ffffffc; */ -+ and PR1, PT0 -+ and PR2, PT0 -+ and PR3, PT0 -+ -+ /* store Rx */ -+ sw PR0, PTR_POLY1305_R(0) -+ sw PR1, PTR_POLY1305_R(1) -+ sw PR2, PTR_POLY1305_R(2) -+ sw PR3, PTR_POLY1305_R(3) -+ -+ /* Jump Back */ -+ jr $ra -+.end poly1305_init_mips ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/chacha20/chacha20-arm.pl 2019-08-20 20:26:42.396341425 +0000 -@@ -0,0 +1,1227 @@ -+#!/usr/bin/env perl -+# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause -+# -+# This code is taken from the OpenSSL project but the author, Andy Polyakov, -+# has relicensed it under the licenses specified in the SPDX header above. -+# The original headers, including the original license headers, are -+# included below for completeness. -+# -+# ==================================================================== -+# Written by Andy Polyakov for the OpenSSL -+# project. The module is, however, dual licensed under OpenSSL and -+# CRYPTOGAMS licenses depending on where you obtain it. For further -+# details see http://www.openssl.org/~appro/cryptogams/. -+# ==================================================================== -+# -+# December 2014 -+# -+# ChaCha20 for ARMv4. -+# -+# September 2018 -+# -+# Improve scalar performance per Eric Biggers' suggestion to eliminate -+# separate rotates. This requires b[0..3] and d[0..3] to be maintained -+# pre-rotated, hence odd twists prior inner loop and when accumulating -+# key material. Since amount of instructions is reduced as result, even -+# NEON performance is improved somewhat, most notably by ~9% on low-end -+# Cortex-A5/A7. Full unroll was shown to provide even better scalar -+# performance on Cortex-A5/A7, naturally at the cost of manyfold size -+# increase. We let it be. Oversized code works in benchmarks, but is not -+# necessarily optimal in real life, when it's likely to be out-of-cache -+# upon entry and evict significant part of cache upon completion. -+# -+# Performance in cycles per byte out of large buffer. -+# -+# IALU/gcc-4.4 1xNEON 3xNEON+1xIALU -+# -+# Cortex-A5 14.2(*)/+160% 21.8 12.9(**) -+# Cortex-A8 10.2(*)/+190% 13.9 6.10 -+# Cortex-A9 10.8(*)/+150% 14.3 6.50 -+# Cortex-A15 11.0/+40% 16.0 4.90 -+# Snapdragon S4 13.9(***)/+90% 13.6 4.90 -+# -+# (*) most "favourable" result for aligned data on little-endian -+# processor, result for misaligned data is 10-15% lower; -+# (**) pure 4xNEON [with "vertical" layout] was shown to provide ~8% -+# better performance on Cortex-A5/A7, but not on others; -+# (***) it's 17% slower than original, trade-off is considered -+# acceptable, because of improvement on others, specifically -+# +36% on Cortex-A5/A7 and +20% on Cortex-A9; -+ -+$flavour = shift; -+if ($flavour=~/\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; } -+else { while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {} } -+ -+if ($flavour && $flavour ne "void") { -+ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; -+ ( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or -+ ( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or -+ die "can't locate arm-xlate.pl"; -+ -+ open STDOUT,"| \"$^X\" $xlate $flavour $output"; -+} else { -+ open STDOUT,">$output"; -+} -+ -+sub AUTOLOAD() # thunk [simplified] x86-style perlasm -+{ my $opcode = $AUTOLOAD; $opcode =~ s/.*:://; $opcode =~ s/_/\./; -+ my $arg = pop; -+ $arg = "#$arg" if ($arg*1 eq $arg); -+ $code .= "\t$opcode\t".join(',',@_,$arg)."\n"; -+} -+ -+my @x=map("r$_",(0..7,"x","x","x","x",12,"x",14,"x")); -+my @t=map("r$_",(8..11)); -+ -+sub ROUND { -+my ($a0,$b0,$c0,$d0)=@_; -+my ($a1,$b1,$c1,$d1)=map(($_&~3)+(($_+1)&3),($a0,$b0,$c0,$d0)); -+my ($a2,$b2,$c2,$d2)=map(($_&~3)+(($_+1)&3),($a1,$b1,$c1,$d1)); -+my ($a3,$b3,$c3,$d3)=map(($_&~3)+(($_+1)&3),($a2,$b2,$c2,$d2)); -+my $odd = $d0&1; -+my ($xc,$xc_) = (@t[0..1]); -+my ($xd,$xd_) = $odd ? (@t[2],@x[$d1]) : (@x[$d0],@t[2]); -+my @ret; -+ -+ # Consider order in which variables are addressed by their -+ # index: -+ # -+ # a b c d -+ # -+ # 0 4 8 12 < even round -+ # 1 5 9 13 -+ # 2 6 10 14 -+ # 3 7 11 15 -+ # 0 5 10 15 < odd round -+ # 1 6 11 12 -+ # 2 7 8 13 -+ # 3 4 9 14 -+ # -+ # 'a', 'b' are permanently allocated in registers, @x[0..7], -+ # while 'c's and pair of 'd's are maintained in memory. If -+ # you observe 'c' column, you'll notice that pair of 'c's is -+ # invariant between rounds. This means that we have to reload -+ # them once per round, in the middle. This is why you'll see -+ # bunch of 'c' stores and loads in the middle, but none in -+ # the beginning or end. If you observe 'd' column, you'll -+ # notice that 15 and 13 are reused in next pair of rounds. -+ # This is why these two are chosen for offloading to memory, -+ # to make loads count more. -+ push @ret,( -+ "&add (@x[$a0],@x[$a0],@x[$b0],'ror#13')", -+ "&add (@x[$a1],@x[$a1],@x[$b1],'ror#13')", -+ "&eor ($xd,@x[$a0],$xd,'ror#24')", -+ "&eor ($xd_,@x[$a1],$xd_,'ror#24')", -+ -+ "&add ($xc,$xc,$xd,'ror#16')", -+ "&add ($xc_,$xc_,$xd_,'ror#16')", -+ "&eor (@x[$b0],$xc, @x[$b0],'ror#13')", -+ "&eor (@x[$b1],$xc_,@x[$b1],'ror#13')", -+ -+ "&add (@x[$a0],@x[$a0],@x[$b0],'ror#20')", -+ "&add (@x[$a1],@x[$a1],@x[$b1],'ror#20')", -+ "&eor ($xd,@x[$a0],$xd,'ror#16')", -+ "&eor ($xd_,@x[$a1],$xd_,'ror#16')" ); -+ push @ret,( -+ "&str ($xd,'[sp,#4*(16+$d0)]')" ) if ($odd); -+ push @ret,( -+ "&add ($xc,$xc,$xd,'ror#24')" ); -+ push @ret,( -+ "&ldr ($xd,'[sp,#4*(16+$d2)]')" ) if ($odd); -+ push @ret,( -+ "&str ($xd_,'[sp,#4*(16+$d1)]')" ) if (!$odd); -+ push @ret,( -+ "&add ($xc_,$xc_,$xd_,'ror#24')" ); -+ push @ret,( -+ "&ldr ($xd_,'[sp,#4*(16+$d3)]')" ) if (!$odd); -+ push @ret,( -+ "&str ($xc,'[sp,#4*(16+$c0)]')", -+ "&eor (@x[$b0],@x[$b0],$xc,'ror#12')", -+ "&str ($xc_,'[sp,#4*(16+$c1)]')", -+ "&eor (@x[$b1],@x[$b1],$xc_,'ror#12')" ); -+ -+ $xd=@x[$d2] if (!$odd); -+ $xd_=@x[$d3] if ($odd); -+ push @ret,( -+ "&ldr ($xc,'[sp,#4*(16+$c2)]')", -+ "&add (@x[$a2],@x[$a2],@x[$b2],'ror#13')", -+ "&ldr ($xc_,'[sp,#4*(16+$c3)]')", -+ "&add (@x[$a3],@x[$a3],@x[$b3],'ror#13')", -+ "&eor ($xd,@x[$a2],$xd,'ror#24')", -+ "&eor ($xd_,@x[$a3],$xd_,'ror#24')", -+ -+ "&add ($xc,$xc,$xd,'ror#16')", -+ "&add ($xc_,$xc_,$xd_,'ror#16')", -+ "&eor (@x[$b2],$xc, @x[$b2],'ror#13')", -+ "&eor (@x[$b3],$xc_,@x[$b3],'ror#13')", -+ -+ "&add (@x[$a2],@x[$a2],@x[$b2],'ror#20')", -+ "&add (@x[$a3],@x[$a3],@x[$b3],'ror#20')", -+ "&eor ($xd,@x[$a2],$xd,'ror#16')", -+ "&eor ($xd_,@x[$a3],$xd_,'ror#16')", -+ -+ "&add ($xc,$xc,$xd,'ror#24')", -+ "&add ($xc_,$xc_,$xd_,'ror#24')", -+ "&eor (@x[$b2],@x[$b2],$xc,'ror#12')", -+ "&eor (@x[$b3],@x[$b3],$xc_,'ror#12')" ); -+ -+ @ret; -+} -+ -+$code.=<<___; -+#ifndef __KERNEL__ -+# include "arm_arch.h" -+#else -+# define __ARM_ARCH__ __LINUX_ARM_ARCH__ -+# define __ARM_MAX_ARCH__ __LINUX_ARM_ARCH__ -+# define ChaCha20_ctr32 chacha20_arm_cryptogams -+# define ChaCha20_neon chacha20_neon -+#endif -+ -+.text -+#if defined(__thumb2__) || defined(__clang__) -+.syntax unified -+# define ldrhsb ldrbhs -+#endif -+#if defined(__thumb2__) -+.thumb -+#else -+.code 32 -+#endif -+ -+.align 5 -+.Lsigma: -+.long 0x61707865,0x3320646e,0x79622d32,0x6b206574 @ endian-neutral -+.Lone: -+.long 1,0,0,0 -+.Lrot8: -+.long 0x02010003,0x06050407 -+#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) -+.LOPENSSL_armcap: -+.word OPENSSL_armcap_P-.LChaCha20_ctr32 -+#else -+.word -1 -+#endif -+ -+.globl ChaCha20_ctr32 -+.type ChaCha20_ctr32,%function -+.align 5 -+ChaCha20_ctr32: -+.LChaCha20_ctr32: -+ ldr r12,[sp,#0] @ pull pointer to counter and nonce -+ stmdb sp!,{r0-r2,r4-r11,lr} -+#if __ARM_ARCH__<7 && !defined(__thumb2__) -+ sub r14,pc,#16 @ ChaCha20_ctr32 -+#else -+ adr r14,.LChaCha20_ctr32 -+#endif -+ cmp r2,#0 @ len==0? -+#ifdef __thumb2__ -+ itt eq -+#endif -+ addeq sp,sp,#4*3 -+ beq .Lno_data -+#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) -+ cmp r2,#192 @ test len -+ bls .Lshort -+ ldr r4,[r14,#-24] -+ ldr r4,[r14,r4] -+# ifdef __APPLE__ -+ ldr r4,[r4] -+# endif -+ tst r4,#ARMV7_NEON -+ bne .LChaCha20_neon -+.Lshort: -+#endif -+ ldmia r12,{r4-r7} @ load counter and nonce -+ sub sp,sp,#4*(16) @ off-load area -+ sub r14,r14,#64 @ .Lsigma -+ stmdb sp!,{r4-r7} @ copy counter and nonce -+ ldmia r3,{r4-r11} @ load key -+ ldmia r14,{r0-r3} @ load sigma -+ stmdb sp!,{r4-r11} @ copy key -+ stmdb sp!,{r0-r3} @ copy sigma -+ str r10,[sp,#4*(16+10)] @ off-load "@x[10]" -+ str r11,[sp,#4*(16+11)] @ off-load "@x[11]" -+ b .Loop_outer_enter -+ -+.align 4 -+.Loop_outer: -+ ldmia sp,{r0-r9} @ load key material -+ str @t[3],[sp,#4*(32+2)] @ save len -+ str r12, [sp,#4*(32+1)] @ save inp -+ str r14, [sp,#4*(32+0)] @ save out -+.Loop_outer_enter: -+ ldr @t[3], [sp,#4*(15)] -+ mov @x[4],@x[4],ror#19 @ twist b[0..3] -+ ldr @x[12],[sp,#4*(12)] @ modulo-scheduled load -+ mov @x[5],@x[5],ror#19 -+ ldr @t[2], [sp,#4*(13)] -+ mov @x[6],@x[6],ror#19 -+ ldr @x[14],[sp,#4*(14)] -+ mov @x[7],@x[7],ror#19 -+ mov @t[3],@t[3],ror#8 @ twist d[0..3] -+ mov @x[12],@x[12],ror#8 -+ mov @t[2],@t[2],ror#8 -+ mov @x[14],@x[14],ror#8 -+ str @t[3], [sp,#4*(16+15)] -+ mov @t[3],#10 -+ b .Loop -+ -+.align 4 -+.Loop: -+ subs @t[3],@t[3],#1 -+___ -+ foreach (&ROUND(0, 4, 8,12)) { eval; } -+ foreach (&ROUND(0, 5,10,15)) { eval; } -+$code.=<<___; -+ bne .Loop -+ -+ ldr @t[3],[sp,#4*(32+2)] @ load len -+ -+ str @t[0], [sp,#4*(16+8)] @ modulo-scheduled store -+ str @t[1], [sp,#4*(16+9)] -+ str @x[12],[sp,#4*(16+12)] -+ str @t[2], [sp,#4*(16+13)] -+ str @x[14],[sp,#4*(16+14)] -+ -+ @ at this point we have first half of 512-bit result in -+ @ @x[0-7] and second half at sp+4*(16+8) -+ -+ cmp @t[3],#64 @ done yet? -+#ifdef __thumb2__ -+ itete lo -+#endif -+ addlo r12,sp,#4*(0) @ shortcut or ... -+ ldrhs r12,[sp,#4*(32+1)] @ ... load inp -+ addlo r14,sp,#4*(0) @ shortcut or ... -+ ldrhs r14,[sp,#4*(32+0)] @ ... load out -+ -+ ldr @t[0],[sp,#4*(0)] @ load key material -+ ldr @t[1],[sp,#4*(1)] -+ -+#if __ARM_ARCH__>=6 || !defined(__ARMEB__) -+# if __ARM_ARCH__<7 -+ orr @t[2],r12,r14 -+ tst @t[2],#3 @ are input and output aligned? -+ ldr @t[2],[sp,#4*(2)] -+ bne .Lunaligned -+ cmp @t[3],#64 @ restore flags -+# else -+ ldr @t[2],[sp,#4*(2)] -+# endif -+ ldr @t[3],[sp,#4*(3)] -+ -+ add @x[0],@x[0],@t[0] @ accumulate key material -+ add @x[1],@x[1],@t[1] -+# ifdef __thumb2__ -+ itt hs -+# endif -+ ldrhs @t[0],[r12],#16 @ load input -+ ldrhs @t[1],[r12,#-12] -+ -+ add @x[2],@x[2],@t[2] -+ add @x[3],@x[3],@t[3] -+# ifdef __thumb2__ -+ itt hs -+# endif -+ ldrhs @t[2],[r12,#-8] -+ ldrhs @t[3],[r12,#-4] -+# if __ARM_ARCH__>=6 && defined(__ARMEB__) -+ rev @x[0],@x[0] -+ rev @x[1],@x[1] -+ rev @x[2],@x[2] -+ rev @x[3],@x[3] -+# endif -+# ifdef __thumb2__ -+ itt hs -+# endif -+ eorhs @x[0],@x[0],@t[0] @ xor with input -+ eorhs @x[1],@x[1],@t[1] -+ add @t[0],sp,#4*(4) -+ str @x[0],[r14],#16 @ store output -+# ifdef __thumb2__ -+ itt hs -+# endif -+ eorhs @x[2],@x[2],@t[2] -+ eorhs @x[3],@x[3],@t[3] -+ ldmia @t[0],{@t[0]-@t[3]} @ load key material -+ str @x[1],[r14,#-12] -+ str @x[2],[r14,#-8] -+ str @x[3],[r14,#-4] -+ -+ add @x[4],@t[0],@x[4],ror#13 @ accumulate key material -+ add @x[5],@t[1],@x[5],ror#13 -+# ifdef __thumb2__ -+ itt hs -+# endif -+ ldrhs @t[0],[r12],#16 @ load input -+ ldrhs @t[1],[r12,#-12] -+ add @x[6],@t[2],@x[6],ror#13 -+ add @x[7],@t[3],@x[7],ror#13 -+# ifdef __thumb2__ -+ itt hs -+# endif -+ ldrhs @t[2],[r12,#-8] -+ ldrhs @t[3],[r12,#-4] -+# if __ARM_ARCH__>=6 && defined(__ARMEB__) -+ rev @x[4],@x[4] -+ rev @x[5],@x[5] -+ rev @x[6],@x[6] -+ rev @x[7],@x[7] -+# endif -+# ifdef __thumb2__ -+ itt hs -+# endif -+ eorhs @x[4],@x[4],@t[0] -+ eorhs @x[5],@x[5],@t[1] -+ add @t[0],sp,#4*(8) -+ str @x[4],[r14],#16 @ store output -+# ifdef __thumb2__ -+ itt hs -+# endif -+ eorhs @x[6],@x[6],@t[2] -+ eorhs @x[7],@x[7],@t[3] -+ str @x[5],[r14,#-12] -+ ldmia @t[0],{@t[0]-@t[3]} @ load key material -+ str @x[6],[r14,#-8] -+ add @x[0],sp,#4*(16+8) -+ str @x[7],[r14,#-4] -+ -+ ldmia @x[0],{@x[0]-@x[7]} @ load second half -+ -+ add @x[0],@x[0],@t[0] @ accumulate key material -+ add @x[1],@x[1],@t[1] -+# ifdef __thumb2__ -+ itt hs -+# endif -+ ldrhs @t[0],[r12],#16 @ load input -+ ldrhs @t[1],[r12,#-12] -+# ifdef __thumb2__ -+ itt hi -+# endif -+ strhi @t[2],[sp,#4*(16+10)] @ copy "@x[10]" while at it -+ strhi @t[3],[sp,#4*(16+11)] @ copy "@x[11]" while at it -+ add @x[2],@x[2],@t[2] -+ add @x[3],@x[3],@t[3] -+# ifdef __thumb2__ -+ itt hs -+# endif -+ ldrhs @t[2],[r12,#-8] -+ ldrhs @t[3],[r12,#-4] -+# if __ARM_ARCH__>=6 && defined(__ARMEB__) -+ rev @x[0],@x[0] -+ rev @x[1],@x[1] -+ rev @x[2],@x[2] -+ rev @x[3],@x[3] -+# endif -+# ifdef __thumb2__ -+ itt hs -+# endif -+ eorhs @x[0],@x[0],@t[0] -+ eorhs @x[1],@x[1],@t[1] -+ add @t[0],sp,#4*(12) -+ str @x[0],[r14],#16 @ store output -+# ifdef __thumb2__ -+ itt hs -+# endif -+ eorhs @x[2],@x[2],@t[2] -+ eorhs @x[3],@x[3],@t[3] -+ str @x[1],[r14,#-12] -+ ldmia @t[0],{@t[0]-@t[3]} @ load key material -+ str @x[2],[r14,#-8] -+ str @x[3],[r14,#-4] -+ -+ add @x[4],@t[0],@x[4],ror#24 @ accumulate key material -+ add @x[5],@t[1],@x[5],ror#24 -+# ifdef __thumb2__ -+ itt hi -+# endif -+ addhi @t[0],@t[0],#1 @ next counter value -+ strhi @t[0],[sp,#4*(12)] @ save next counter value -+# ifdef __thumb2__ -+ itt hs -+# endif -+ ldrhs @t[0],[r12],#16 @ load input -+ ldrhs @t[1],[r12,#-12] -+ add @x[6],@t[2],@x[6],ror#24 -+ add @x[7],@t[3],@x[7],ror#24 -+# ifdef __thumb2__ -+ itt hs -+# endif -+ ldrhs @t[2],[r12,#-8] -+ ldrhs @t[3],[r12,#-4] -+# if __ARM_ARCH__>=6 && defined(__ARMEB__) -+ rev @x[4],@x[4] -+ rev @x[5],@x[5] -+ rev @x[6],@x[6] -+ rev @x[7],@x[7] -+# endif -+# ifdef __thumb2__ -+ itt hs -+# endif -+ eorhs @x[4],@x[4],@t[0] -+ eorhs @x[5],@x[5],@t[1] -+# ifdef __thumb2__ -+ it ne -+# endif -+ ldrne @t[0],[sp,#4*(32+2)] @ re-load len -+# ifdef __thumb2__ -+ itt hs -+# endif -+ eorhs @x[6],@x[6],@t[2] -+ eorhs @x[7],@x[7],@t[3] -+ str @x[4],[r14],#16 @ store output -+ str @x[5],[r14,#-12] -+# ifdef __thumb2__ -+ it hs -+# endif -+ subhs @t[3],@t[0],#64 @ len-=64 -+ str @x[6],[r14,#-8] -+ str @x[7],[r14,#-4] -+ bhi .Loop_outer -+ -+ beq .Ldone -+# if __ARM_ARCH__<7 -+ b .Ltail -+ -+.align 4 -+.Lunaligned: @ unaligned endian-neutral path -+ cmp @t[3],#64 @ restore flags -+# endif -+#endif -+#if __ARM_ARCH__<7 -+ ldr @t[3],[sp,#4*(3)] -+___ -+for ($i=0;$i<16;$i+=4) { -+my $j=$i&0x7; -+my $twist=""; -+if ($i==4) { $twist = ",ror#13"; } -+elsif ($i==12) { $twist = ",ror#24"; } -+ -+$code.=<<___ if ($i==4); -+ add @x[0],sp,#4*(16+8) -+___ -+$code.=<<___ if ($i==8); -+ ldmia @x[0],{@x[0]-@x[7]} @ load second half -+# ifdef __thumb2__ -+ itt hi -+# endif -+ strhi @t[2],[sp,#4*(16+10)] @ copy "@x[10]" -+ strhi @t[3],[sp,#4*(16+11)] @ copy "@x[11]" -+___ -+$code.=<<___; -+ add @x[$j+0],@t[0],@x[$j+0]$twist @ accumulate key material -+___ -+$code.=<<___ if ($i==12); -+# ifdef __thumb2__ -+ itt hi -+# endif -+ addhi @t[0],@t[0],#1 @ next counter value -+ strhi @t[0],[sp,#4*(12)] @ save next counter value -+___ -+$code.=<<___; -+ add @x[$j+1],@t[1],@x[$j+1]$twist -+ add @x[$j+2],@t[2],@x[$j+2]$twist -+# ifdef __thumb2__ -+ itete lo -+# endif -+ eorlo @t[0],@t[0],@t[0] @ zero or ... -+ ldrhsb @t[0],[r12],#16 @ ... load input -+ eorlo @t[1],@t[1],@t[1] -+ ldrhsb @t[1],[r12,#-12] -+ -+ add @x[$j+3],@t[3],@x[$j+3]$twist -+# ifdef __thumb2__ -+ itete lo -+# endif -+ eorlo @t[2],@t[2],@t[2] -+ ldrhsb @t[2],[r12,#-8] -+ eorlo @t[3],@t[3],@t[3] -+ ldrhsb @t[3],[r12,#-4] -+ -+ eor @x[$j+0],@t[0],@x[$j+0] @ xor with input (or zero) -+ eor @x[$j+1],@t[1],@x[$j+1] -+# ifdef __thumb2__ -+ itt hs -+# endif -+ ldrhsb @t[0],[r12,#-15] @ load more input -+ ldrhsb @t[1],[r12,#-11] -+ eor @x[$j+2],@t[2],@x[$j+2] -+ strb @x[$j+0],[r14],#16 @ store output -+ eor @x[$j+3],@t[3],@x[$j+3] -+# ifdef __thumb2__ -+ itt hs -+# endif -+ ldrhsb @t[2],[r12,#-7] -+ ldrhsb @t[3],[r12,#-3] -+ strb @x[$j+1],[r14,#-12] -+ eor @x[$j+0],@t[0],@x[$j+0],lsr#8 -+ strb @x[$j+2],[r14,#-8] -+ eor @x[$j+1],@t[1],@x[$j+1],lsr#8 -+# ifdef __thumb2__ -+ itt hs -+# endif -+ ldrhsb @t[0],[r12,#-14] @ load more input -+ ldrhsb @t[1],[r12,#-10] -+ strb @x[$j+3],[r14,#-4] -+ eor @x[$j+2],@t[2],@x[$j+2],lsr#8 -+ strb @x[$j+0],[r14,#-15] -+ eor @x[$j+3],@t[3],@x[$j+3],lsr#8 -+# ifdef __thumb2__ -+ itt hs -+# endif -+ ldrhsb @t[2],[r12,#-6] -+ ldrhsb @t[3],[r12,#-2] -+ strb @x[$j+1],[r14,#-11] -+ eor @x[$j+0],@t[0],@x[$j+0],lsr#8 -+ strb @x[$j+2],[r14,#-7] -+ eor @x[$j+1],@t[1],@x[$j+1],lsr#8 -+# ifdef __thumb2__ -+ itt hs -+# endif -+ ldrhsb @t[0],[r12,#-13] @ load more input -+ ldrhsb @t[1],[r12,#-9] -+ strb @x[$j+3],[r14,#-3] -+ eor @x[$j+2],@t[2],@x[$j+2],lsr#8 -+ strb @x[$j+0],[r14,#-14] -+ eor @x[$j+3],@t[3],@x[$j+3],lsr#8 -+# ifdef __thumb2__ -+ itt hs -+# endif -+ ldrhsb @t[2],[r12,#-5] -+ ldrhsb @t[3],[r12,#-1] -+ strb @x[$j+1],[r14,#-10] -+ strb @x[$j+2],[r14,#-6] -+ eor @x[$j+0],@t[0],@x[$j+0],lsr#8 -+ strb @x[$j+3],[r14,#-2] -+ eor @x[$j+1],@t[1],@x[$j+1],lsr#8 -+ strb @x[$j+0],[r14,#-13] -+ eor @x[$j+2],@t[2],@x[$j+2],lsr#8 -+ strb @x[$j+1],[r14,#-9] -+ eor @x[$j+3],@t[3],@x[$j+3],lsr#8 -+ strb @x[$j+2],[r14,#-5] -+ strb @x[$j+3],[r14,#-1] -+___ -+$code.=<<___ if ($i<12); -+ add @t[0],sp,#4*(4+$i) -+ ldmia @t[0],{@t[0]-@t[3]} @ load key material -+___ -+} -+$code.=<<___; -+# ifdef __thumb2__ -+ it ne -+# endif -+ ldrne @t[0],[sp,#4*(32+2)] @ re-load len -+# ifdef __thumb2__ -+ it hs -+# endif -+ subhs @t[3],@t[0],#64 @ len-=64 -+ bhi .Loop_outer -+ -+ beq .Ldone -+#endif -+ -+.Ltail: -+ ldr r12,[sp,#4*(32+1)] @ load inp -+ add @t[1],sp,#4*(0) -+ ldr r14,[sp,#4*(32+0)] @ load out -+ -+.Loop_tail: -+ ldrb @t[2],[@t[1]],#1 @ read buffer on stack -+ ldrb @t[3],[r12],#1 @ read input -+ subs @t[0],@t[0],#1 -+ eor @t[3],@t[3],@t[2] -+ strb @t[3],[r14],#1 @ store output -+ bne .Loop_tail -+ -+.Ldone: -+ add sp,sp,#4*(32+3) -+.Lno_data: -+#if __ARM_ARCH__>=5 -+ ldmia sp!,{r4-r11,pc} -+#else -+ ldmia sp!,{r4-r12,lr} -+ tst lr,#1 -+ moveq pc,lr @ be binary compatible with V4, yet -+ .long 0xe12fff1e @ interoperable with Thumb ISA:-) -+#endif -+.size ChaCha20_ctr32,.-ChaCha20_ctr32 -+___ -+ -+{{{ -+my ($a0,$b0,$c0,$d0,$a1,$b1,$c1,$d1,$a2,$b2,$c2,$d2,$t0,$t1,$t2,$t3) = -+ map("q$_",(0..15)); -+ -+# This can replace vshr-by-24+vsli-by-8. It gives ~3% improvement on -+# Cortex-A5/A7, but hurts Cortex-A9 by 5% and Snapdragon S4 by 14%! -+sub vperm() -+{ my ($dst,$src,$tbl) = @_; -+ $code .= " vtbl.8 $dst#lo,{$src#lo},$tbl#lo\n"; -+ $code .= " vtbl.8 $dst#hi,{$src#hi},$tbl#lo\n"; -+} -+ -+sub NEONROUND { -+my $odd = pop; -+my ($a,$b,$c,$d,$t)=@_; -+ -+ ( -+ "&vadd_i32 ($a,$a,$b)", -+ "&veor ($d,$d,$a)", -+ "&vrev32_16 ($d,$d)", # vrot ($d,16) -+ -+ "&vadd_i32 ($c,$c,$d)", -+ "&veor ($t,$b,$c)", -+ "&vshr_u32 ($b,$t,20)", -+ "&vsli_32 ($b,$t,12)", -+ -+ "&vadd_i32 ($a,$a,$b)", -+ "&veor ($t,$d,$a)", -+ "&vshr_u32 ($d,$t,24)", -+ "&vsli_32 ($d,$t,8)", -+ #"&vperm ($d,$t,$t3)", -+ -+ "&vadd_i32 ($c,$c,$d)", -+ "&veor ($t,$b,$c)", -+ "&vshr_u32 ($b,$t,25)", -+ "&vsli_32 ($b,$t,7)", -+ -+ "&vext_8 ($a,$a,$a,$odd?4:12)", -+ "&vext_8 ($d,$d,$d,8)", -+ "&vext_8 ($c,$c,$c,$odd?12:4)" -+ ); -+} -+ -+$code.=<<___; -+#if (defined(__KERNEL__) && defined(CONFIG_KERNEL_MODE_NEON)) || (!defined(__KERNEL__) && __ARM_MAX_ARCH__>=7) -+.arch armv7-a -+.fpu neon -+ -+# ifdef __KERNEL__ -+.globl ChaCha20_neon -+@ For optimal performance it's appropriate for caller to enforce -+@ minimum input length, 193 bytes is suggested. -+# endif -+.type ChaCha20_neon,%function -+.align 5 -+ChaCha20_neon: -+ ldr r12,[sp,#0] @ pull pointer to counter and nonce -+ stmdb sp!,{r0-r2,r4-r11,lr} -+.LChaCha20_neon: -+ adr r14,.Lsigma -+ vstmdb sp!,{d8-d15} @ ABI spec says so -+ stmdb sp!,{r0-r3} -+ -+ vld1.32 {$b0-$c0},[r3] @ load key -+ ldmia r3,{r4-r11} @ load key -+ -+ sub sp,sp,#4*(16+16) -+ vld1.32 {$d0},[r12] @ load counter and nonce -+ add r12,sp,#4*8 -+ ldmia r14,{r0-r3} @ load sigma -+ vld1.32 {$a0},[r14]! @ load sigma -+ vld1.32 {$t0},[r14]! @ one -+ @ vld1.32 {$t3#lo},[r14] @ rot8 -+ vst1.32 {$c0-$d0},[r12] @ copy 1/2key|counter|nonce -+ vst1.32 {$a0-$b0},[sp] @ copy sigma|1/2key -+ -+ str r10,[sp,#4*(16+10)] @ off-load "@x[10]" -+ str r11,[sp,#4*(16+11)] @ off-load "@x[11]" -+ vshl.i32 $t1#lo,$t0#lo,#1 @ two -+ vstr $t0#lo,[sp,#4*(16+0)] -+ vshl.i32 $t2#lo,$t0#lo,#2 @ four -+ vstr $t1#lo,[sp,#4*(16+2)] -+ vmov $a1,$a0 -+ vstr $t2#lo,[sp,#4*(16+4)] -+ vmov $a2,$a0 -+ @ vstr $t3#lo,[sp,#4*(16+6)] -+ vmov $b1,$b0 -+ vmov $b2,$b0 -+ b .Loop_neon_enter -+ -+.align 4 -+.Loop_neon_outer: -+ ldmia sp,{r0-r9} @ load key material -+ cmp @t[3],#64*2 @ if len<=64*2 -+ bls .Lbreak_neon @ switch to integer-only -+ @ vldr $t3#lo,[sp,#4*(16+6)] @ rot8 -+ vmov $a1,$a0 -+ str @t[3],[sp,#4*(32+2)] @ save len -+ vmov $a2,$a0 -+ str r12, [sp,#4*(32+1)] @ save inp -+ vmov $b1,$b0 -+ str r14, [sp,#4*(32+0)] @ save out -+ vmov $b2,$b0 -+.Loop_neon_enter: -+ ldr @t[3], [sp,#4*(15)] -+ mov @x[4],@x[4],ror#19 @ twist b[0..3] -+ vadd.i32 $d1,$d0,$t0 @ counter+1 -+ ldr @x[12],[sp,#4*(12)] @ modulo-scheduled load -+ mov @x[5],@x[5],ror#19 -+ vmov $c1,$c0 -+ ldr @t[2], [sp,#4*(13)] -+ mov @x[6],@x[6],ror#19 -+ vmov $c2,$c0 -+ ldr @x[14],[sp,#4*(14)] -+ mov @x[7],@x[7],ror#19 -+ vadd.i32 $d2,$d1,$t0 @ counter+2 -+ add @x[12],@x[12],#3 @ counter+3 -+ mov @t[3],@t[3],ror#8 @ twist d[0..3] -+ mov @x[12],@x[12],ror#8 -+ mov @t[2],@t[2],ror#8 -+ mov @x[14],@x[14],ror#8 -+ str @t[3], [sp,#4*(16+15)] -+ mov @t[3],#10 -+ b .Loop_neon -+ -+.align 4 -+.Loop_neon: -+ subs @t[3],@t[3],#1 -+___ -+ my @thread0=&NEONROUND($a0,$b0,$c0,$d0,$t0,0); -+ my @thread1=&NEONROUND($a1,$b1,$c1,$d1,$t1,0); -+ my @thread2=&NEONROUND($a2,$b2,$c2,$d2,$t2,0); -+ my @thread3=&ROUND(0,4,8,12); -+ -+ foreach (@thread0) { -+ eval; eval(shift(@thread3)); -+ eval(shift(@thread1)); eval(shift(@thread3)); -+ eval(shift(@thread2)); eval(shift(@thread3)); -+ } -+ -+ @thread0=&NEONROUND($a0,$b0,$c0,$d0,$t0,1); -+ @thread1=&NEONROUND($a1,$b1,$c1,$d1,$t1,1); -+ @thread2=&NEONROUND($a2,$b2,$c2,$d2,$t2,1); -+ @thread3=&ROUND(0,5,10,15); -+ -+ foreach (@thread0) { -+ eval; eval(shift(@thread3)); -+ eval(shift(@thread1)); eval(shift(@thread3)); -+ eval(shift(@thread2)); eval(shift(@thread3)); -+ } -+$code.=<<___; -+ bne .Loop_neon -+ -+ add @t[3],sp,#32 -+ vld1.32 {$t0-$t1},[sp] @ load key material -+ vld1.32 {$t2-$t3},[@t[3]] -+ -+ ldr @t[3],[sp,#4*(32+2)] @ load len -+ -+ str @t[0], [sp,#4*(16+8)] @ modulo-scheduled store -+ str @t[1], [sp,#4*(16+9)] -+ str @x[12],[sp,#4*(16+12)] -+ str @t[2], [sp,#4*(16+13)] -+ str @x[14],[sp,#4*(16+14)] -+ -+ @ at this point we have first half of 512-bit result in -+ @ @x[0-7] and second half at sp+4*(16+8) -+ -+ ldr r12,[sp,#4*(32+1)] @ load inp -+ ldr r14,[sp,#4*(32+0)] @ load out -+ -+ vadd.i32 $a0,$a0,$t0 @ accumulate key material -+ vadd.i32 $a1,$a1,$t0 -+ vadd.i32 $a2,$a2,$t0 -+ vldr $t0#lo,[sp,#4*(16+0)] @ one -+ -+ vadd.i32 $b0,$b0,$t1 -+ vadd.i32 $b1,$b1,$t1 -+ vadd.i32 $b2,$b2,$t1 -+ vldr $t1#lo,[sp,#4*(16+2)] @ two -+ -+ vadd.i32 $c0,$c0,$t2 -+ vadd.i32 $c1,$c1,$t2 -+ vadd.i32 $c2,$c2,$t2 -+ vadd.i32 $d1#lo,$d1#lo,$t0#lo @ counter+1 -+ vadd.i32 $d2#lo,$d2#lo,$t1#lo @ counter+2 -+ -+ vadd.i32 $d0,$d0,$t3 -+ vadd.i32 $d1,$d1,$t3 -+ vadd.i32 $d2,$d2,$t3 -+ -+ cmp @t[3],#64*4 -+ blo .Ltail_neon -+ -+ vld1.8 {$t0-$t1},[r12]! @ load input -+ mov @t[3],sp -+ vld1.8 {$t2-$t3},[r12]! -+ veor $a0,$a0,$t0 @ xor with input -+ veor $b0,$b0,$t1 -+ vld1.8 {$t0-$t1},[r12]! -+ veor $c0,$c0,$t2 -+ veor $d0,$d0,$t3 -+ vld1.8 {$t2-$t3},[r12]! -+ -+ veor $a1,$a1,$t0 -+ vst1.8 {$a0-$b0},[r14]! @ store output -+ veor $b1,$b1,$t1 -+ vld1.8 {$t0-$t1},[r12]! -+ veor $c1,$c1,$t2 -+ vst1.8 {$c0-$d0},[r14]! -+ veor $d1,$d1,$t3 -+ vld1.8 {$t2-$t3},[r12]! -+ -+ veor $a2,$a2,$t0 -+ vld1.32 {$a0-$b0},[@t[3]]! @ load for next iteration -+ veor $t0#hi,$t0#hi,$t0#hi -+ vldr $t0#lo,[sp,#4*(16+4)] @ four -+ veor $b2,$b2,$t1 -+ vld1.32 {$c0-$d0},[@t[3]] -+ veor $c2,$c2,$t2 -+ vst1.8 {$a1-$b1},[r14]! -+ veor $d2,$d2,$t3 -+ vst1.8 {$c1-$d1},[r14]! -+ -+ vadd.i32 $d0#lo,$d0#lo,$t0#lo @ next counter value -+ vldr $t0#lo,[sp,#4*(16+0)] @ one -+ -+ ldmia sp,{@t[0]-@t[3]} @ load key material -+ add @x[0],@x[0],@t[0] @ accumulate key material -+ ldr @t[0],[r12],#16 @ load input -+ vst1.8 {$a2-$b2},[r14]! -+ add @x[1],@x[1],@t[1] -+ ldr @t[1],[r12,#-12] -+ vst1.8 {$c2-$d2},[r14]! -+ add @x[2],@x[2],@t[2] -+ ldr @t[2],[r12,#-8] -+ add @x[3],@x[3],@t[3] -+ ldr @t[3],[r12,#-4] -+# ifdef __ARMEB__ -+ rev @x[0],@x[0] -+ rev @x[1],@x[1] -+ rev @x[2],@x[2] -+ rev @x[3],@x[3] -+# endif -+ eor @x[0],@x[0],@t[0] @ xor with input -+ add @t[0],sp,#4*(4) -+ eor @x[1],@x[1],@t[1] -+ str @x[0],[r14],#16 @ store output -+ eor @x[2],@x[2],@t[2] -+ str @x[1],[r14,#-12] -+ eor @x[3],@x[3],@t[3] -+ ldmia @t[0],{@t[0]-@t[3]} @ load key material -+ str @x[2],[r14,#-8] -+ str @x[3],[r14,#-4] -+ -+ add @x[4],@t[0],@x[4],ror#13 @ accumulate key material -+ ldr @t[0],[r12],#16 @ load input -+ add @x[5],@t[1],@x[5],ror#13 -+ ldr @t[1],[r12,#-12] -+ add @x[6],@t[2],@x[6],ror#13 -+ ldr @t[2],[r12,#-8] -+ add @x[7],@t[3],@x[7],ror#13 -+ ldr @t[3],[r12,#-4] -+# ifdef __ARMEB__ -+ rev @x[4],@x[4] -+ rev @x[5],@x[5] -+ rev @x[6],@x[6] -+ rev @x[7],@x[7] -+# endif -+ eor @x[4],@x[4],@t[0] -+ add @t[0],sp,#4*(8) -+ eor @x[5],@x[5],@t[1] -+ str @x[4],[r14],#16 @ store output -+ eor @x[6],@x[6],@t[2] -+ str @x[5],[r14,#-12] -+ eor @x[7],@x[7],@t[3] -+ ldmia @t[0],{@t[0]-@t[3]} @ load key material -+ str @x[6],[r14,#-8] -+ add @x[0],sp,#4*(16+8) -+ str @x[7],[r14,#-4] -+ -+ ldmia @x[0],{@x[0]-@x[7]} @ load second half -+ -+ add @x[0],@x[0],@t[0] @ accumulate key material -+ ldr @t[0],[r12],#16 @ load input -+ add @x[1],@x[1],@t[1] -+ ldr @t[1],[r12,#-12] -+# ifdef __thumb2__ -+ it hi -+# endif -+ strhi @t[2],[sp,#4*(16+10)] @ copy "@x[10]" while at it -+ add @x[2],@x[2],@t[2] -+ ldr @t[2],[r12,#-8] -+# ifdef __thumb2__ -+ it hi -+# endif -+ strhi @t[3],[sp,#4*(16+11)] @ copy "@x[11]" while at it -+ add @x[3],@x[3],@t[3] -+ ldr @t[3],[r12,#-4] -+# ifdef __ARMEB__ -+ rev @x[0],@x[0] -+ rev @x[1],@x[1] -+ rev @x[2],@x[2] -+ rev @x[3],@x[3] -+# endif -+ eor @x[0],@x[0],@t[0] -+ add @t[0],sp,#4*(12) -+ eor @x[1],@x[1],@t[1] -+ str @x[0],[r14],#16 @ store output -+ eor @x[2],@x[2],@t[2] -+ str @x[1],[r14,#-12] -+ eor @x[3],@x[3],@t[3] -+ ldmia @t[0],{@t[0]-@t[3]} @ load key material -+ str @x[2],[r14,#-8] -+ str @x[3],[r14,#-4] -+ -+ add @x[4],@t[0],@x[4],ror#24 @ accumulate key material -+ add @t[0],@t[0],#4 @ next counter value -+ add @x[5],@t[1],@x[5],ror#24 -+ str @t[0],[sp,#4*(12)] @ save next counter value -+ ldr @t[0],[r12],#16 @ load input -+ add @x[6],@t[2],@x[6],ror#24 -+ add @x[4],@x[4],#3 @ counter+3 -+ ldr @t[1],[r12,#-12] -+ add @x[7],@t[3],@x[7],ror#24 -+ ldr @t[2],[r12,#-8] -+ ldr @t[3],[r12,#-4] -+# ifdef __ARMEB__ -+ rev @x[4],@x[4] -+ rev @x[5],@x[5] -+ rev @x[6],@x[6] -+ rev @x[7],@x[7] -+# endif -+ eor @x[4],@x[4],@t[0] -+# ifdef __thumb2__ -+ it hi -+# endif -+ ldrhi @t[0],[sp,#4*(32+2)] @ re-load len -+ eor @x[5],@x[5],@t[1] -+ eor @x[6],@x[6],@t[2] -+ str @x[4],[r14],#16 @ store output -+ eor @x[7],@x[7],@t[3] -+ str @x[5],[r14,#-12] -+ sub @t[3],@t[0],#64*4 @ len-=64*4 -+ str @x[6],[r14,#-8] -+ str @x[7],[r14,#-4] -+ bhi .Loop_neon_outer -+ -+ b .Ldone_neon -+ -+.align 4 -+.Lbreak_neon: -+ @ harmonize NEON and integer-only stack frames: load data -+ @ from NEON frame, but save to integer-only one; distance -+ @ between the two is 4*(32+4+16-32)=4*(20). -+ -+ str @t[3], [sp,#4*(20+32+2)] @ save len -+ add @t[3],sp,#4*(32+4) -+ str r12, [sp,#4*(20+32+1)] @ save inp -+ str r14, [sp,#4*(20+32+0)] @ save out -+ -+ ldr @x[12],[sp,#4*(16+10)] -+ ldr @x[14],[sp,#4*(16+11)] -+ vldmia @t[3],{d8-d15} @ fulfill ABI requirement -+ str @x[12],[sp,#4*(20+16+10)] @ copy "@x[10]" -+ str @x[14],[sp,#4*(20+16+11)] @ copy "@x[11]" -+ -+ ldr @t[3], [sp,#4*(15)] -+ mov @x[4],@x[4],ror#19 @ twist b[0..3] -+ ldr @x[12],[sp,#4*(12)] @ modulo-scheduled load -+ mov @x[5],@x[5],ror#19 -+ ldr @t[2], [sp,#4*(13)] -+ mov @x[6],@x[6],ror#19 -+ ldr @x[14],[sp,#4*(14)] -+ mov @x[7],@x[7],ror#19 -+ mov @t[3],@t[3],ror#8 @ twist d[0..3] -+ mov @x[12],@x[12],ror#8 -+ mov @t[2],@t[2],ror#8 -+ mov @x[14],@x[14],ror#8 -+ str @t[3], [sp,#4*(20+16+15)] -+ add @t[3],sp,#4*(20) -+ vst1.32 {$a0-$b0},[@t[3]]! @ copy key -+ add sp,sp,#4*(20) @ switch frame -+ vst1.32 {$c0-$d0},[@t[3]] -+ mov @t[3],#10 -+ b .Loop @ go integer-only -+ -+.align 4 -+.Ltail_neon: -+ cmp @t[3],#64*3 -+ bhs .L192_or_more_neon -+ cmp @t[3],#64*2 -+ bhs .L128_or_more_neon -+ cmp @t[3],#64*1 -+ bhs .L64_or_more_neon -+ -+ add @t[0],sp,#4*(8) -+ vst1.8 {$a0-$b0},[sp] -+ add @t[2],sp,#4*(0) -+ vst1.8 {$c0-$d0},[@t[0]] -+ b .Loop_tail_neon -+ -+.align 4 -+.L64_or_more_neon: -+ vld1.8 {$t0-$t1},[r12]! -+ vld1.8 {$t2-$t3},[r12]! -+ veor $a0,$a0,$t0 -+ veor $b0,$b0,$t1 -+ veor $c0,$c0,$t2 -+ veor $d0,$d0,$t3 -+ vst1.8 {$a0-$b0},[r14]! -+ vst1.8 {$c0-$d0},[r14]! -+ -+ beq .Ldone_neon -+ -+ add @t[0],sp,#4*(8) -+ vst1.8 {$a1-$b1},[sp] -+ add @t[2],sp,#4*(0) -+ vst1.8 {$c1-$d1},[@t[0]] -+ sub @t[3],@t[3],#64*1 @ len-=64*1 -+ b .Loop_tail_neon -+ -+.align 4 -+.L128_or_more_neon: -+ vld1.8 {$t0-$t1},[r12]! -+ vld1.8 {$t2-$t3},[r12]! -+ veor $a0,$a0,$t0 -+ veor $b0,$b0,$t1 -+ vld1.8 {$t0-$t1},[r12]! -+ veor $c0,$c0,$t2 -+ veor $d0,$d0,$t3 -+ vld1.8 {$t2-$t3},[r12]! -+ -+ veor $a1,$a1,$t0 -+ veor $b1,$b1,$t1 -+ vst1.8 {$a0-$b0},[r14]! -+ veor $c1,$c1,$t2 -+ vst1.8 {$c0-$d0},[r14]! -+ veor $d1,$d1,$t3 -+ vst1.8 {$a1-$b1},[r14]! -+ vst1.8 {$c1-$d1},[r14]! -+ -+ beq .Ldone_neon -+ -+ add @t[0],sp,#4*(8) -+ vst1.8 {$a2-$b2},[sp] -+ add @t[2],sp,#4*(0) -+ vst1.8 {$c2-$d2},[@t[0]] -+ sub @t[3],@t[3],#64*2 @ len-=64*2 -+ b .Loop_tail_neon -+ -+.align 4 -+.L192_or_more_neon: -+ vld1.8 {$t0-$t1},[r12]! -+ vld1.8 {$t2-$t3},[r12]! -+ veor $a0,$a0,$t0 -+ veor $b0,$b0,$t1 -+ vld1.8 {$t0-$t1},[r12]! -+ veor $c0,$c0,$t2 -+ veor $d0,$d0,$t3 -+ vld1.8 {$t2-$t3},[r12]! -+ -+ veor $a1,$a1,$t0 -+ veor $b1,$b1,$t1 -+ vld1.8 {$t0-$t1},[r12]! -+ veor $c1,$c1,$t2 -+ vst1.8 {$a0-$b0},[r14]! -+ veor $d1,$d1,$t3 -+ vld1.8 {$t2-$t3},[r12]! -+ -+ veor $a2,$a2,$t0 -+ vst1.8 {$c0-$d0},[r14]! -+ veor $b2,$b2,$t1 -+ vst1.8 {$a1-$b1},[r14]! -+ veor $c2,$c2,$t2 -+ vst1.8 {$c1-$d1},[r14]! -+ veor $d2,$d2,$t3 -+ vst1.8 {$a2-$b2},[r14]! -+ vst1.8 {$c2-$d2},[r14]! -+ -+ beq .Ldone_neon -+ -+ ldmia sp,{@t[0]-@t[3]} @ load key material -+ add @x[0],@x[0],@t[0] @ accumulate key material -+ add @t[0],sp,#4*(4) -+ add @x[1],@x[1],@t[1] -+ add @x[2],@x[2],@t[2] -+ add @x[3],@x[3],@t[3] -+ ldmia @t[0],{@t[0]-@t[3]} @ load key material -+ -+ add @x[4],@t[0],@x[4],ror#13 @ accumulate key material -+ add @t[0],sp,#4*(8) -+ add @x[5],@t[1],@x[5],ror#13 -+ add @x[6],@t[2],@x[6],ror#13 -+ add @x[7],@t[3],@x[7],ror#13 -+ ldmia @t[0],{@t[0]-@t[3]} @ load key material -+# ifdef __ARMEB__ -+ rev @x[0],@x[0] -+ rev @x[1],@x[1] -+ rev @x[2],@x[2] -+ rev @x[3],@x[3] -+ rev @x[4],@x[4] -+ rev @x[5],@x[5] -+ rev @x[6],@x[6] -+ rev @x[7],@x[7] -+# endif -+ stmia sp,{@x[0]-@x[7]} -+ add @x[0],sp,#4*(16+8) -+ -+ ldmia @x[0],{@x[0]-@x[7]} @ load second half -+ -+ add @x[0],@x[0],@t[0] @ accumulate key material -+ add @t[0],sp,#4*(12) -+ add @x[1],@x[1],@t[1] -+ add @x[2],@x[2],@t[2] -+ add @x[3],@x[3],@t[3] -+ ldmia @t[0],{@t[0]-@t[3]} @ load key material -+ -+ add @x[4],@t[0],@x[4],ror#24 @ accumulate key material -+ add @t[0],sp,#4*(8) -+ add @x[5],@t[1],@x[5],ror#24 -+ add @x[4],@x[4],#3 @ counter+3 -+ add @x[6],@t[2],@x[6],ror#24 -+ add @x[7],@t[3],@x[7],ror#24 -+ ldr @t[3],[sp,#4*(32+2)] @ re-load len -+# ifdef __ARMEB__ -+ rev @x[0],@x[0] -+ rev @x[1],@x[1] -+ rev @x[2],@x[2] -+ rev @x[3],@x[3] -+ rev @x[4],@x[4] -+ rev @x[5],@x[5] -+ rev @x[6],@x[6] -+ rev @x[7],@x[7] -+# endif -+ stmia @t[0],{@x[0]-@x[7]} -+ add @t[2],sp,#4*(0) -+ sub @t[3],@t[3],#64*3 @ len-=64*3 -+ -+.Loop_tail_neon: -+ ldrb @t[0],[@t[2]],#1 @ read buffer on stack -+ ldrb @t[1],[r12],#1 @ read input -+ subs @t[3],@t[3],#1 -+ eor @t[0],@t[0],@t[1] -+ strb @t[0],[r14],#1 @ store output -+ bne .Loop_tail_neon -+ -+.Ldone_neon: -+ add sp,sp,#4*(32+4) -+ vldmia sp,{d8-d15} -+ add sp,sp,#4*(16+3) -+ ldmia sp!,{r4-r11,pc} -+.size ChaCha20_neon,.-ChaCha20_neon -+# ifndef __KERNEL__ -+.comm OPENSSL_armcap_P,4,4 -+# endif -+#endif -+___ -+}}} -+ -+open SELF,$0; -+while() { -+ next if (/^#!/); -+ last if (!s/^#/@/ and !/^$/); -+ print; -+} -+close SELF; -+ -+foreach (split("\n",$code)) { -+ s/\`([^\`]*)\`/eval $1/geo; -+ -+ s/\bq([0-9]+)#(lo|hi)/sprintf "d%d",2*$1+($2 eq "hi")/geo; -+ -+ print $_,"\n"; -+} -+close STDOUT; ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/chacha20/chacha20-arm64.pl 2019-08-20 20:26:42.396341425 +0000 -@@ -0,0 +1,1163 @@ -+#!/usr/bin/env perl -+# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause -+# -+# This code is taken from the OpenSSL project but the author, Andy Polyakov, -+# has relicensed it under the licenses specified in the SPDX header above. -+# The original headers, including the original license headers, are -+# included below for completeness. -+# -+# ==================================================================== -+# Written by Andy Polyakov for the OpenSSL -+# project. The module is, however, dual licensed under OpenSSL and -+# CRYPTOGAMS licenses depending on where you obtain it. For further -+# details see http://www.openssl.org/~appro/cryptogams/. -+# ==================================================================== -+# -+# June 2015 -+# -+# ChaCha20 for ARMv8. -+# -+# Performance in cycles per byte out of large buffer. -+# -+# IALU/gcc-4.9 3xNEON+1xIALU 6xNEON+2xIALU(*) -+# -+# Apple A7 5.50/+49% 3.33 1.70 -+# Cortex-A53 8.40/+80% 4.72 4.72(**) -+# Cortex-A57 8.06/+43% 4.90 4.43(***) -+# Denver 4.50/+82% 2.63 2.67(**) -+# X-Gene 9.50/+46% 8.82 8.89(**) -+# Mongoose 8.00/+44% 3.64 3.25(***) -+# Kryo 8.17/+50% 4.83 4.65(***) -+# -+# (*) since no non-Apple processor exhibits significantly better -+# performance, the code path is #ifdef __APPLE__-ed; -+# (**) it's expected that doubling interleave factor doesn't help -+# all processors, only those with higher NEON latency and -+# higher instruction issue rate; -+# (***) expected improvement was actually higher; -+ -+$flavour=shift; -+if ($flavour=~/\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; } -+else { while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {} } -+ -+if ($flavour && $flavour ne "void") { -+ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; -+ ( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or -+ ( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or -+ die "can't locate arm-xlate.pl"; -+ -+ open STDOUT,"| \"$^X\" $xlate $flavour $output"; -+} else { -+ open STDOUT,">$output"; -+} -+ -+sub AUTOLOAD() # thunk [simplified] x86-style perlasm -+{ my $opcode = $AUTOLOAD; $opcode =~ s/.*:://; $opcode =~ s/_/\./; -+ my $arg = pop; -+ $arg = "#$arg" if ($arg*1 eq $arg); -+ $code .= "\t$opcode\t".join(',',@_,$arg)."\n"; -+} -+ -+my ($out,$inp,$len,$key,$ctr) = map("x$_",(0..4)); -+ -+my @x=map("x$_",(5..17,19..21)); -+my @d=map("x$_",(22..28,30)); -+ -+sub ROUND { -+my ($a0,$b0,$c0,$d0)=@_; -+my ($a1,$b1,$c1,$d1)=map(($_&~3)+(($_+1)&3),($a0,$b0,$c0,$d0)); -+my ($a2,$b2,$c2,$d2)=map(($_&~3)+(($_+1)&3),($a1,$b1,$c1,$d1)); -+my ($a3,$b3,$c3,$d3)=map(($_&~3)+(($_+1)&3),($a2,$b2,$c2,$d2)); -+ -+ ( -+ "&add_32 (@x[$a0],@x[$a0],@x[$b0])", -+ "&add_32 (@x[$a1],@x[$a1],@x[$b1])", -+ "&add_32 (@x[$a2],@x[$a2],@x[$b2])", -+ "&add_32 (@x[$a3],@x[$a3],@x[$b3])", -+ "&eor_32 (@x[$d0],@x[$d0],@x[$a0])", -+ "&eor_32 (@x[$d1],@x[$d1],@x[$a1])", -+ "&eor_32 (@x[$d2],@x[$d2],@x[$a2])", -+ "&eor_32 (@x[$d3],@x[$d3],@x[$a3])", -+ "&ror_32 (@x[$d0],@x[$d0],16)", -+ "&ror_32 (@x[$d1],@x[$d1],16)", -+ "&ror_32 (@x[$d2],@x[$d2],16)", -+ "&ror_32 (@x[$d3],@x[$d3],16)", -+ -+ "&add_32 (@x[$c0],@x[$c0],@x[$d0])", -+ "&add_32 (@x[$c1],@x[$c1],@x[$d1])", -+ "&add_32 (@x[$c2],@x[$c2],@x[$d2])", -+ "&add_32 (@x[$c3],@x[$c3],@x[$d3])", -+ "&eor_32 (@x[$b0],@x[$b0],@x[$c0])", -+ "&eor_32 (@x[$b1],@x[$b1],@x[$c1])", -+ "&eor_32 (@x[$b2],@x[$b2],@x[$c2])", -+ "&eor_32 (@x[$b3],@x[$b3],@x[$c3])", -+ "&ror_32 (@x[$b0],@x[$b0],20)", -+ "&ror_32 (@x[$b1],@x[$b1],20)", -+ "&ror_32 (@x[$b2],@x[$b2],20)", -+ "&ror_32 (@x[$b3],@x[$b3],20)", -+ -+ "&add_32 (@x[$a0],@x[$a0],@x[$b0])", -+ "&add_32 (@x[$a1],@x[$a1],@x[$b1])", -+ "&add_32 (@x[$a2],@x[$a2],@x[$b2])", -+ "&add_32 (@x[$a3],@x[$a3],@x[$b3])", -+ "&eor_32 (@x[$d0],@x[$d0],@x[$a0])", -+ "&eor_32 (@x[$d1],@x[$d1],@x[$a1])", -+ "&eor_32 (@x[$d2],@x[$d2],@x[$a2])", -+ "&eor_32 (@x[$d3],@x[$d3],@x[$a3])", -+ "&ror_32 (@x[$d0],@x[$d0],24)", -+ "&ror_32 (@x[$d1],@x[$d1],24)", -+ "&ror_32 (@x[$d2],@x[$d2],24)", -+ "&ror_32 (@x[$d3],@x[$d3],24)", -+ -+ "&add_32 (@x[$c0],@x[$c0],@x[$d0])", -+ "&add_32 (@x[$c1],@x[$c1],@x[$d1])", -+ "&add_32 (@x[$c2],@x[$c2],@x[$d2])", -+ "&add_32 (@x[$c3],@x[$c3],@x[$d3])", -+ "&eor_32 (@x[$b0],@x[$b0],@x[$c0])", -+ "&eor_32 (@x[$b1],@x[$b1],@x[$c1])", -+ "&eor_32 (@x[$b2],@x[$b2],@x[$c2])", -+ "&eor_32 (@x[$b3],@x[$b3],@x[$c3])", -+ "&ror_32 (@x[$b0],@x[$b0],25)", -+ "&ror_32 (@x[$b1],@x[$b1],25)", -+ "&ror_32 (@x[$b2],@x[$b2],25)", -+ "&ror_32 (@x[$b3],@x[$b3],25)" -+ ); -+} -+ -+$code.=<<___; -+#ifndef __KERNEL__ -+# include "arm_arch.h" -+.extern OPENSSL_armcap_P -+#else -+# define ChaCha20_ctr32 chacha20_arm -+# define ChaCha20_neon chacha20_neon -+#endif -+ -+.text -+ -+.align 5 -+.Lsigma: -+.quad 0x3320646e61707865,0x6b20657479622d32 // endian-neutral -+.Lone: -+.long 1,0,0,0 -+#ifndef __KERNEL__ -+.LOPENSSL_armcap_P: -+# ifdef __ILP32__ -+.long OPENSSL_armcap_P-. -+# else -+.quad OPENSSL_armcap_P-. -+# endif -+#endif -+ -+.globl ChaCha20_ctr32 -+.type ChaCha20_ctr32,%function -+.align 5 -+ChaCha20_ctr32: -+ cbz $len,.Labort -+#ifndef __KERNEL__ -+ adr @x[0],.LOPENSSL_armcap_P -+ cmp $len,#192 -+ b.lo .Lshort -+# ifdef __ILP32__ -+ ldrsw @x[1],[@x[0]] -+# else -+ ldr @x[1],[@x[0]] -+# endif -+ ldr w17,[@x[1],@x[0]] -+ tst w17,#ARMV7_NEON -+ b.ne ChaCha20_neon -+ -+.Lshort: -+#endif -+ stp x29,x30,[sp,#-96]! -+ add x29,sp,#0 -+ -+ adr @x[0],.Lsigma -+ stp x19,x20,[sp,#16] -+ stp x21,x22,[sp,#32] -+ stp x23,x24,[sp,#48] -+ stp x25,x26,[sp,#64] -+ stp x27,x28,[sp,#80] -+ sub sp,sp,#64 -+ -+ ldp @d[0],@d[1],[@x[0]] // load sigma -+ ldp @d[2],@d[3],[$key] // load key -+ ldp @d[4],@d[5],[$key,#16] -+ ldp @d[6],@d[7],[$ctr] // load counter -+#ifdef __AARCH64EB__ -+ ror @d[2],@d[2],#32 -+ ror @d[3],@d[3],#32 -+ ror @d[4],@d[4],#32 -+ ror @d[5],@d[5],#32 -+ ror @d[6],@d[6],#32 -+ ror @d[7],@d[7],#32 -+#endif -+ -+.Loop_outer: -+ mov.32 @x[0],@d[0] // unpack key block -+ lsr @x[1],@d[0],#32 -+ mov.32 @x[2],@d[1] -+ lsr @x[3],@d[1],#32 -+ mov.32 @x[4],@d[2] -+ lsr @x[5],@d[2],#32 -+ mov.32 @x[6],@d[3] -+ lsr @x[7],@d[3],#32 -+ mov.32 @x[8],@d[4] -+ lsr @x[9],@d[4],#32 -+ mov.32 @x[10],@d[5] -+ lsr @x[11],@d[5],#32 -+ mov.32 @x[12],@d[6] -+ lsr @x[13],@d[6],#32 -+ mov.32 @x[14],@d[7] -+ lsr @x[15],@d[7],#32 -+ -+ mov $ctr,#10 -+ subs $len,$len,#64 -+.Loop: -+ sub $ctr,$ctr,#1 -+___ -+ foreach (&ROUND(0, 4, 8,12)) { eval; } -+ foreach (&ROUND(0, 5,10,15)) { eval; } -+$code.=<<___; -+ cbnz $ctr,.Loop -+ -+ add.32 @x[0],@x[0],@d[0] // accumulate key block -+ add @x[1],@x[1],@d[0],lsr#32 -+ add.32 @x[2],@x[2],@d[1] -+ add @x[3],@x[3],@d[1],lsr#32 -+ add.32 @x[4],@x[4],@d[2] -+ add @x[5],@x[5],@d[2],lsr#32 -+ add.32 @x[6],@x[6],@d[3] -+ add @x[7],@x[7],@d[3],lsr#32 -+ add.32 @x[8],@x[8],@d[4] -+ add @x[9],@x[9],@d[4],lsr#32 -+ add.32 @x[10],@x[10],@d[5] -+ add @x[11],@x[11],@d[5],lsr#32 -+ add.32 @x[12],@x[12],@d[6] -+ add @x[13],@x[13],@d[6],lsr#32 -+ add.32 @x[14],@x[14],@d[7] -+ add @x[15],@x[15],@d[7],lsr#32 -+ -+ b.lo .Ltail -+ -+ add @x[0],@x[0],@x[1],lsl#32 // pack -+ add @x[2],@x[2],@x[3],lsl#32 -+ ldp @x[1],@x[3],[$inp,#0] // load input -+ add @x[4],@x[4],@x[5],lsl#32 -+ add @x[6],@x[6],@x[7],lsl#32 -+ ldp @x[5],@x[7],[$inp,#16] -+ add @x[8],@x[8],@x[9],lsl#32 -+ add @x[10],@x[10],@x[11],lsl#32 -+ ldp @x[9],@x[11],[$inp,#32] -+ add @x[12],@x[12],@x[13],lsl#32 -+ add @x[14],@x[14],@x[15],lsl#32 -+ ldp @x[13],@x[15],[$inp,#48] -+ add $inp,$inp,#64 -+#ifdef __AARCH64EB__ -+ rev @x[0],@x[0] -+ rev @x[2],@x[2] -+ rev @x[4],@x[4] -+ rev @x[6],@x[6] -+ rev @x[8],@x[8] -+ rev @x[10],@x[10] -+ rev @x[12],@x[12] -+ rev @x[14],@x[14] -+#endif -+ eor @x[0],@x[0],@x[1] -+ eor @x[2],@x[2],@x[3] -+ eor @x[4],@x[4],@x[5] -+ eor @x[6],@x[6],@x[7] -+ eor @x[8],@x[8],@x[9] -+ eor @x[10],@x[10],@x[11] -+ eor @x[12],@x[12],@x[13] -+ eor @x[14],@x[14],@x[15] -+ -+ stp @x[0],@x[2],[$out,#0] // store output -+ add @d[6],@d[6],#1 // increment counter -+ stp @x[4],@x[6],[$out,#16] -+ stp @x[8],@x[10],[$out,#32] -+ stp @x[12],@x[14],[$out,#48] -+ add $out,$out,#64 -+ -+ b.hi .Loop_outer -+ -+ ldp x19,x20,[x29,#16] -+ add sp,sp,#64 -+ ldp x21,x22,[x29,#32] -+ ldp x23,x24,[x29,#48] -+ ldp x25,x26,[x29,#64] -+ ldp x27,x28,[x29,#80] -+ ldp x29,x30,[sp],#96 -+.Labort: -+ ret -+ -+.align 4 -+.Ltail: -+ add $len,$len,#64 -+.Less_than_64: -+ sub $out,$out,#1 -+ add $inp,$inp,$len -+ add $out,$out,$len -+ add $ctr,sp,$len -+ neg $len,$len -+ -+ add @x[0],@x[0],@x[1],lsl#32 // pack -+ add @x[2],@x[2],@x[3],lsl#32 -+ add @x[4],@x[4],@x[5],lsl#32 -+ add @x[6],@x[6],@x[7],lsl#32 -+ add @x[8],@x[8],@x[9],lsl#32 -+ add @x[10],@x[10],@x[11],lsl#32 -+ add @x[12],@x[12],@x[13],lsl#32 -+ add @x[14],@x[14],@x[15],lsl#32 -+#ifdef __AARCH64EB__ -+ rev @x[0],@x[0] -+ rev @x[2],@x[2] -+ rev @x[4],@x[4] -+ rev @x[6],@x[6] -+ rev @x[8],@x[8] -+ rev @x[10],@x[10] -+ rev @x[12],@x[12] -+ rev @x[14],@x[14] -+#endif -+ stp @x[0],@x[2],[sp,#0] -+ stp @x[4],@x[6],[sp,#16] -+ stp @x[8],@x[10],[sp,#32] -+ stp @x[12],@x[14],[sp,#48] -+ -+.Loop_tail: -+ ldrb w10,[$inp,$len] -+ ldrb w11,[$ctr,$len] -+ add $len,$len,#1 -+ eor w10,w10,w11 -+ strb w10,[$out,$len] -+ cbnz $len,.Loop_tail -+ -+ stp xzr,xzr,[sp,#0] -+ stp xzr,xzr,[sp,#16] -+ stp xzr,xzr,[sp,#32] -+ stp xzr,xzr,[sp,#48] -+ -+ ldp x19,x20,[x29,#16] -+ add sp,sp,#64 -+ ldp x21,x22,[x29,#32] -+ ldp x23,x24,[x29,#48] -+ ldp x25,x26,[x29,#64] -+ ldp x27,x28,[x29,#80] -+ ldp x29,x30,[sp],#96 -+ ret -+.size ChaCha20_ctr32,.-ChaCha20_ctr32 -+___ -+ -+{{{ -+my ($A0,$B0,$C0,$D0,$A1,$B1,$C1,$D1,$A2,$B2,$C2,$D2,$T0,$T1,$T2,$T3) = -+ map("v$_.4s",(0..7,16..23)); -+my (@K)=map("v$_.4s",(24..30)); -+my $ONE="v31.4s"; -+ -+sub NEONROUND { -+my $odd = pop; -+my ($a,$b,$c,$d,$t)=@_; -+ -+ ( -+ "&add ('$a','$a','$b')", -+ "&eor ('$d','$d','$a')", -+ "&rev32_16 ('$d','$d')", # vrot ($d,16) -+ -+ "&add ('$c','$c','$d')", -+ "&eor ('$t','$b','$c')", -+ "&ushr ('$b','$t',20)", -+ "&sli ('$b','$t',12)", -+ -+ "&add ('$a','$a','$b')", -+ "&eor ('$t','$d','$a')", -+ "&ushr ('$d','$t',24)", -+ "&sli ('$d','$t',8)", -+ -+ "&add ('$c','$c','$d')", -+ "&eor ('$t','$b','$c')", -+ "&ushr ('$b','$t',25)", -+ "&sli ('$b','$t',7)", -+ -+ "&ext ('$a','$a','$a',$odd?4:12)", -+ "&ext ('$d','$d','$d',8)", -+ "&ext ('$c','$c','$c',$odd?12:4)" -+ ); -+} -+ -+$code.=<<___; -+#if !defined(__KERNEL__) || defined(CONFIG_KERNEL_MODE_NEON) -+#ifdef __KERNEL__ -+.globl ChaCha20_neon -+.type ChaCha20_neon,%function -+#endif -+.type ChaCha20_neon,%function -+.align 5 -+ChaCha20_neon: -+ stp x29,x30,[sp,#-96]! -+ add x29,sp,#0 -+ -+ adr @x[0],.Lsigma -+ stp x19,x20,[sp,#16] -+ stp x21,x22,[sp,#32] -+ stp x23,x24,[sp,#48] -+ stp x25,x26,[sp,#64] -+ stp x27,x28,[sp,#80] -+#ifdef __APPLE__ -+ cmp $len,#512 -+ b.hs .L512_or_more_neon -+#endif -+ -+ sub sp,sp,#64 -+ -+ ldp @d[0],@d[1],[@x[0]] // load sigma -+ ld1 {@K[0]},[@x[0]],#16 -+ ldp @d[2],@d[3],[$key] // load key -+ ldp @d[4],@d[5],[$key,#16] -+ ld1 {@K[1],@K[2]},[$key] -+ ldp @d[6],@d[7],[$ctr] // load counter -+ ld1 {@K[3]},[$ctr] -+ ld1 {$ONE},[@x[0]] -+#ifdef __AARCH64EB__ -+ rev64 @K[0],@K[0] -+ ror @d[2],@d[2],#32 -+ ror @d[3],@d[3],#32 -+ ror @d[4],@d[4],#32 -+ ror @d[5],@d[5],#32 -+ ror @d[6],@d[6],#32 -+ ror @d[7],@d[7],#32 -+#endif -+ add @K[3],@K[3],$ONE // += 1 -+ add @K[4],@K[3],$ONE -+ add @K[5],@K[4],$ONE -+ shl $ONE,$ONE,#2 // 1 -> 4 -+ -+.Loop_outer_neon: -+ mov.32 @x[0],@d[0] // unpack key block -+ lsr @x[1],@d[0],#32 -+ mov $A0,@K[0] -+ mov.32 @x[2],@d[1] -+ lsr @x[3],@d[1],#32 -+ mov $A1,@K[0] -+ mov.32 @x[4],@d[2] -+ lsr @x[5],@d[2],#32 -+ mov $A2,@K[0] -+ mov.32 @x[6],@d[3] -+ mov $B0,@K[1] -+ lsr @x[7],@d[3],#32 -+ mov $B1,@K[1] -+ mov.32 @x[8],@d[4] -+ mov $B2,@K[1] -+ lsr @x[9],@d[4],#32 -+ mov $D0,@K[3] -+ mov.32 @x[10],@d[5] -+ mov $D1,@K[4] -+ lsr @x[11],@d[5],#32 -+ mov $D2,@K[5] -+ mov.32 @x[12],@d[6] -+ mov $C0,@K[2] -+ lsr @x[13],@d[6],#32 -+ mov $C1,@K[2] -+ mov.32 @x[14],@d[7] -+ mov $C2,@K[2] -+ lsr @x[15],@d[7],#32 -+ -+ mov $ctr,#10 -+ subs $len,$len,#256 -+.Loop_neon: -+ sub $ctr,$ctr,#1 -+___ -+ my @thread0=&NEONROUND($A0,$B0,$C0,$D0,$T0,0); -+ my @thread1=&NEONROUND($A1,$B1,$C1,$D1,$T1,0); -+ my @thread2=&NEONROUND($A2,$B2,$C2,$D2,$T2,0); -+ my @thread3=&ROUND(0,4,8,12); -+ -+ foreach (@thread0) { -+ eval; eval(shift(@thread3)); -+ eval(shift(@thread1)); eval(shift(@thread3)); -+ eval(shift(@thread2)); eval(shift(@thread3)); -+ } -+ -+ @thread0=&NEONROUND($A0,$B0,$C0,$D0,$T0,1); -+ @thread1=&NEONROUND($A1,$B1,$C1,$D1,$T1,1); -+ @thread2=&NEONROUND($A2,$B2,$C2,$D2,$T2,1); -+ @thread3=&ROUND(0,5,10,15); -+ -+ foreach (@thread0) { -+ eval; eval(shift(@thread3)); -+ eval(shift(@thread1)); eval(shift(@thread3)); -+ eval(shift(@thread2)); eval(shift(@thread3)); -+ } -+$code.=<<___; -+ cbnz $ctr,.Loop_neon -+ -+ add.32 @x[0],@x[0],@d[0] // accumulate key block -+ add $A0,$A0,@K[0] -+ add @x[1],@x[1],@d[0],lsr#32 -+ add $A1,$A1,@K[0] -+ add.32 @x[2],@x[2],@d[1] -+ add $A2,$A2,@K[0] -+ add @x[3],@x[3],@d[1],lsr#32 -+ add $C0,$C0,@K[2] -+ add.32 @x[4],@x[4],@d[2] -+ add $C1,$C1,@K[2] -+ add @x[5],@x[5],@d[2],lsr#32 -+ add $C2,$C2,@K[2] -+ add.32 @x[6],@x[6],@d[3] -+ add $D0,$D0,@K[3] -+ add @x[7],@x[7],@d[3],lsr#32 -+ add.32 @x[8],@x[8],@d[4] -+ add $D1,$D1,@K[4] -+ add @x[9],@x[9],@d[4],lsr#32 -+ add.32 @x[10],@x[10],@d[5] -+ add $D2,$D2,@K[5] -+ add @x[11],@x[11],@d[5],lsr#32 -+ add.32 @x[12],@x[12],@d[6] -+ add $B0,$B0,@K[1] -+ add @x[13],@x[13],@d[6],lsr#32 -+ add.32 @x[14],@x[14],@d[7] -+ add $B1,$B1,@K[1] -+ add @x[15],@x[15],@d[7],lsr#32 -+ add $B2,$B2,@K[1] -+ -+ b.lo .Ltail_neon -+ -+ add @x[0],@x[0],@x[1],lsl#32 // pack -+ add @x[2],@x[2],@x[3],lsl#32 -+ ldp @x[1],@x[3],[$inp,#0] // load input -+ add @x[4],@x[4],@x[5],lsl#32 -+ add @x[6],@x[6],@x[7],lsl#32 -+ ldp @x[5],@x[7],[$inp,#16] -+ add @x[8],@x[8],@x[9],lsl#32 -+ add @x[10],@x[10],@x[11],lsl#32 -+ ldp @x[9],@x[11],[$inp,#32] -+ add @x[12],@x[12],@x[13],lsl#32 -+ add @x[14],@x[14],@x[15],lsl#32 -+ ldp @x[13],@x[15],[$inp,#48] -+ add $inp,$inp,#64 -+#ifdef __AARCH64EB__ -+ rev @x[0],@x[0] -+ rev @x[2],@x[2] -+ rev @x[4],@x[4] -+ rev @x[6],@x[6] -+ rev @x[8],@x[8] -+ rev @x[10],@x[10] -+ rev @x[12],@x[12] -+ rev @x[14],@x[14] -+#endif -+ ld1.8 {$T0-$T3},[$inp],#64 -+ eor @x[0],@x[0],@x[1] -+ eor @x[2],@x[2],@x[3] -+ eor @x[4],@x[4],@x[5] -+ eor @x[6],@x[6],@x[7] -+ eor @x[8],@x[8],@x[9] -+ eor $A0,$A0,$T0 -+ eor @x[10],@x[10],@x[11] -+ eor $B0,$B0,$T1 -+ eor @x[12],@x[12],@x[13] -+ eor $C0,$C0,$T2 -+ eor @x[14],@x[14],@x[15] -+ eor $D0,$D0,$T3 -+ ld1.8 {$T0-$T3},[$inp],#64 -+ -+ stp @x[0],@x[2],[$out,#0] // store output -+ add @d[6],@d[6],#4 // increment counter -+ stp @x[4],@x[6],[$out,#16] -+ add @K[3],@K[3],$ONE // += 4 -+ stp @x[8],@x[10],[$out,#32] -+ add @K[4],@K[4],$ONE -+ stp @x[12],@x[14],[$out,#48] -+ add @K[5],@K[5],$ONE -+ add $out,$out,#64 -+ -+ st1.8 {$A0-$D0},[$out],#64 -+ ld1.8 {$A0-$D0},[$inp],#64 -+ -+ eor $A1,$A1,$T0 -+ eor $B1,$B1,$T1 -+ eor $C1,$C1,$T2 -+ eor $D1,$D1,$T3 -+ st1.8 {$A1-$D1},[$out],#64 -+ -+ eor $A2,$A2,$A0 -+ eor $B2,$B2,$B0 -+ eor $C2,$C2,$C0 -+ eor $D2,$D2,$D0 -+ st1.8 {$A2-$D2},[$out],#64 -+ -+ b.hi .Loop_outer_neon -+ -+ ldp x19,x20,[x29,#16] -+ add sp,sp,#64 -+ ldp x21,x22,[x29,#32] -+ ldp x23,x24,[x29,#48] -+ ldp x25,x26,[x29,#64] -+ ldp x27,x28,[x29,#80] -+ ldp x29,x30,[sp],#96 -+ ret -+ -+.Ltail_neon: -+ add $len,$len,#256 -+ cmp $len,#64 -+ b.lo .Less_than_64 -+ -+ add @x[0],@x[0],@x[1],lsl#32 // pack -+ add @x[2],@x[2],@x[3],lsl#32 -+ ldp @x[1],@x[3],[$inp,#0] // load input -+ add @x[4],@x[4],@x[5],lsl#32 -+ add @x[6],@x[6],@x[7],lsl#32 -+ ldp @x[5],@x[7],[$inp,#16] -+ add @x[8],@x[8],@x[9],lsl#32 -+ add @x[10],@x[10],@x[11],lsl#32 -+ ldp @x[9],@x[11],[$inp,#32] -+ add @x[12],@x[12],@x[13],lsl#32 -+ add @x[14],@x[14],@x[15],lsl#32 -+ ldp @x[13],@x[15],[$inp,#48] -+ add $inp,$inp,#64 -+#ifdef __AARCH64EB__ -+ rev @x[0],@x[0] -+ rev @x[2],@x[2] -+ rev @x[4],@x[4] -+ rev @x[6],@x[6] -+ rev @x[8],@x[8] -+ rev @x[10],@x[10] -+ rev @x[12],@x[12] -+ rev @x[14],@x[14] -+#endif -+ eor @x[0],@x[0],@x[1] -+ eor @x[2],@x[2],@x[3] -+ eor @x[4],@x[4],@x[5] -+ eor @x[6],@x[6],@x[7] -+ eor @x[8],@x[8],@x[9] -+ eor @x[10],@x[10],@x[11] -+ eor @x[12],@x[12],@x[13] -+ eor @x[14],@x[14],@x[15] -+ -+ stp @x[0],@x[2],[$out,#0] // store output -+ add @d[6],@d[6],#4 // increment counter -+ stp @x[4],@x[6],[$out,#16] -+ stp @x[8],@x[10],[$out,#32] -+ stp @x[12],@x[14],[$out,#48] -+ add $out,$out,#64 -+ b.eq .Ldone_neon -+ sub $len,$len,#64 -+ cmp $len,#64 -+ b.lo .Less_than_128 -+ -+ ld1.8 {$T0-$T3},[$inp],#64 -+ eor $A0,$A0,$T0 -+ eor $B0,$B0,$T1 -+ eor $C0,$C0,$T2 -+ eor $D0,$D0,$T3 -+ st1.8 {$A0-$D0},[$out],#64 -+ b.eq .Ldone_neon -+ sub $len,$len,#64 -+ cmp $len,#64 -+ b.lo .Less_than_192 -+ -+ ld1.8 {$T0-$T3},[$inp],#64 -+ eor $A1,$A1,$T0 -+ eor $B1,$B1,$T1 -+ eor $C1,$C1,$T2 -+ eor $D1,$D1,$T3 -+ st1.8 {$A1-$D1},[$out],#64 -+ b.eq .Ldone_neon -+ sub $len,$len,#64 -+ -+ st1.8 {$A2-$D2},[sp] -+ b .Last_neon -+ -+.Less_than_128: -+ st1.8 {$A0-$D0},[sp] -+ b .Last_neon -+.Less_than_192: -+ st1.8 {$A1-$D1},[sp] -+ b .Last_neon -+ -+.align 4 -+.Last_neon: -+ sub $out,$out,#1 -+ add $inp,$inp,$len -+ add $out,$out,$len -+ add $ctr,sp,$len -+ neg $len,$len -+ -+.Loop_tail_neon: -+ ldrb w10,[$inp,$len] -+ ldrb w11,[$ctr,$len] -+ add $len,$len,#1 -+ eor w10,w10,w11 -+ strb w10,[$out,$len] -+ cbnz $len,.Loop_tail_neon -+ -+ stp xzr,xzr,[sp,#0] -+ stp xzr,xzr,[sp,#16] -+ stp xzr,xzr,[sp,#32] -+ stp xzr,xzr,[sp,#48] -+ -+.Ldone_neon: -+ ldp x19,x20,[x29,#16] -+ add sp,sp,#64 -+ ldp x21,x22,[x29,#32] -+ ldp x23,x24,[x29,#48] -+ ldp x25,x26,[x29,#64] -+ ldp x27,x28,[x29,#80] -+ ldp x29,x30,[sp],#96 -+ ret -+.size ChaCha20_neon,.-ChaCha20_neon -+___ -+{ -+my ($T0,$T1,$T2,$T3,$T4,$T5)=@K; -+my ($A0,$B0,$C0,$D0,$A1,$B1,$C1,$D1,$A2,$B2,$C2,$D2, -+ $A3,$B3,$C3,$D3,$A4,$B4,$C4,$D4,$A5,$B5,$C5,$D5) = map("v$_.4s",(0..23)); -+ -+$code.=<<___; -+#ifdef __APPLE__ -+.type ChaCha20_512_neon,%function -+.align 5 -+ChaCha20_512_neon: -+ stp x29,x30,[sp,#-96]! -+ add x29,sp,#0 -+ -+ adr @x[0],.Lsigma -+ stp x19,x20,[sp,#16] -+ stp x21,x22,[sp,#32] -+ stp x23,x24,[sp,#48] -+ stp x25,x26,[sp,#64] -+ stp x27,x28,[sp,#80] -+ -+.L512_or_more_neon: -+ sub sp,sp,#128+64 -+ -+ ldp @d[0],@d[1],[@x[0]] // load sigma -+ ld1 {@K[0]},[@x[0]],#16 -+ ldp @d[2],@d[3],[$key] // load key -+ ldp @d[4],@d[5],[$key,#16] -+ ld1 {@K[1],@K[2]},[$key] -+ ldp @d[6],@d[7],[$ctr] // load counter -+ ld1 {@K[3]},[$ctr] -+ ld1 {$ONE},[@x[0]] -+# ifdef __AARCH64EB__ -+ rev64 @K[0],@K[0] -+ ror @d[2],@d[2],#32 -+ ror @d[3],@d[3],#32 -+ ror @d[4],@d[4],#32 -+ ror @d[5],@d[5],#32 -+ ror @d[6],@d[6],#32 -+ ror @d[7],@d[7],#32 -+# endif -+ add @K[3],@K[3],$ONE // += 1 -+ stp @K[0],@K[1],[sp,#0] // off-load key block, invariant part -+ add @K[3],@K[3],$ONE // not typo -+ str @K[2],[sp,#32] -+ add @K[4],@K[3],$ONE -+ add @K[5],@K[4],$ONE -+ add @K[6],@K[5],$ONE -+ shl $ONE,$ONE,#2 // 1 -> 4 -+ -+ stp d8,d9,[sp,#128+0] // meet ABI requirements -+ stp d10,d11,[sp,#128+16] -+ stp d12,d13,[sp,#128+32] -+ stp d14,d15,[sp,#128+48] -+ -+ sub $len,$len,#512 // not typo -+ -+.Loop_outer_512_neon: -+ mov $A0,@K[0] -+ mov $A1,@K[0] -+ mov $A2,@K[0] -+ mov $A3,@K[0] -+ mov $A4,@K[0] -+ mov $A5,@K[0] -+ mov $B0,@K[1] -+ mov.32 @x[0],@d[0] // unpack key block -+ mov $B1,@K[1] -+ lsr @x[1],@d[0],#32 -+ mov $B2,@K[1] -+ mov.32 @x[2],@d[1] -+ mov $B3,@K[1] -+ lsr @x[3],@d[1],#32 -+ mov $B4,@K[1] -+ mov.32 @x[4],@d[2] -+ mov $B5,@K[1] -+ lsr @x[5],@d[2],#32 -+ mov $D0,@K[3] -+ mov.32 @x[6],@d[3] -+ mov $D1,@K[4] -+ lsr @x[7],@d[3],#32 -+ mov $D2,@K[5] -+ mov.32 @x[8],@d[4] -+ mov $D3,@K[6] -+ lsr @x[9],@d[4],#32 -+ mov $C0,@K[2] -+ mov.32 @x[10],@d[5] -+ mov $C1,@K[2] -+ lsr @x[11],@d[5],#32 -+ add $D4,$D0,$ONE // +4 -+ mov.32 @x[12],@d[6] -+ add $D5,$D1,$ONE // +4 -+ lsr @x[13],@d[6],#32 -+ mov $C2,@K[2] -+ mov.32 @x[14],@d[7] -+ mov $C3,@K[2] -+ lsr @x[15],@d[7],#32 -+ mov $C4,@K[2] -+ stp @K[3],@K[4],[sp,#48] // off-load key block, variable part -+ mov $C5,@K[2] -+ str @K[5],[sp,#80] -+ -+ mov $ctr,#5 -+ subs $len,$len,#512 -+.Loop_upper_neon: -+ sub $ctr,$ctr,#1 -+___ -+ my @thread0=&NEONROUND($A0,$B0,$C0,$D0,$T0,0); -+ my @thread1=&NEONROUND($A1,$B1,$C1,$D1,$T1,0); -+ my @thread2=&NEONROUND($A2,$B2,$C2,$D2,$T2,0); -+ my @thread3=&NEONROUND($A3,$B3,$C3,$D3,$T3,0); -+ my @thread4=&NEONROUND($A4,$B4,$C4,$D4,$T4,0); -+ my @thread5=&NEONROUND($A5,$B5,$C5,$D5,$T5,0); -+ my @thread67=(&ROUND(0,4,8,12),&ROUND(0,5,10,15)); -+ my $diff = ($#thread0+1)*6 - $#thread67 - 1; -+ my $i = 0; -+ -+ foreach (@thread0) { -+ eval; eval(shift(@thread67)); -+ eval(shift(@thread1)); eval(shift(@thread67)); -+ eval(shift(@thread2)); eval(shift(@thread67)); -+ eval(shift(@thread3)); eval(shift(@thread67)); -+ eval(shift(@thread4)); eval(shift(@thread67)); -+ eval(shift(@thread5)); eval(shift(@thread67)); -+ } -+ -+ @thread0=&NEONROUND($A0,$B0,$C0,$D0,$T0,1); -+ @thread1=&NEONROUND($A1,$B1,$C1,$D1,$T1,1); -+ @thread2=&NEONROUND($A2,$B2,$C2,$D2,$T2,1); -+ @thread3=&NEONROUND($A3,$B3,$C3,$D3,$T3,1); -+ @thread4=&NEONROUND($A4,$B4,$C4,$D4,$T4,1); -+ @thread5=&NEONROUND($A5,$B5,$C5,$D5,$T5,1); -+ @thread67=(&ROUND(0,4,8,12),&ROUND(0,5,10,15)); -+ -+ foreach (@thread0) { -+ eval; eval(shift(@thread67)); -+ eval(shift(@thread1)); eval(shift(@thread67)); -+ eval(shift(@thread2)); eval(shift(@thread67)); -+ eval(shift(@thread3)); eval(shift(@thread67)); -+ eval(shift(@thread4)); eval(shift(@thread67)); -+ eval(shift(@thread5)); eval(shift(@thread67)); -+ } -+$code.=<<___; -+ cbnz $ctr,.Loop_upper_neon -+ -+ add.32 @x[0],@x[0],@d[0] // accumulate key block -+ add @x[1],@x[1],@d[0],lsr#32 -+ add.32 @x[2],@x[2],@d[1] -+ add @x[3],@x[3],@d[1],lsr#32 -+ add.32 @x[4],@x[4],@d[2] -+ add @x[5],@x[5],@d[2],lsr#32 -+ add.32 @x[6],@x[6],@d[3] -+ add @x[7],@x[7],@d[3],lsr#32 -+ add.32 @x[8],@x[8],@d[4] -+ add @x[9],@x[9],@d[4],lsr#32 -+ add.32 @x[10],@x[10],@d[5] -+ add @x[11],@x[11],@d[5],lsr#32 -+ add.32 @x[12],@x[12],@d[6] -+ add @x[13],@x[13],@d[6],lsr#32 -+ add.32 @x[14],@x[14],@d[7] -+ add @x[15],@x[15],@d[7],lsr#32 -+ -+ add @x[0],@x[0],@x[1],lsl#32 // pack -+ add @x[2],@x[2],@x[3],lsl#32 -+ ldp @x[1],@x[3],[$inp,#0] // load input -+ add @x[4],@x[4],@x[5],lsl#32 -+ add @x[6],@x[6],@x[7],lsl#32 -+ ldp @x[5],@x[7],[$inp,#16] -+ add @x[8],@x[8],@x[9],lsl#32 -+ add @x[10],@x[10],@x[11],lsl#32 -+ ldp @x[9],@x[11],[$inp,#32] -+ add @x[12],@x[12],@x[13],lsl#32 -+ add @x[14],@x[14],@x[15],lsl#32 -+ ldp @x[13],@x[15],[$inp,#48] -+ add $inp,$inp,#64 -+# ifdef __AARCH64EB__ -+ rev @x[0],@x[0] -+ rev @x[2],@x[2] -+ rev @x[4],@x[4] -+ rev @x[6],@x[6] -+ rev @x[8],@x[8] -+ rev @x[10],@x[10] -+ rev @x[12],@x[12] -+ rev @x[14],@x[14] -+# endif -+ eor @x[0],@x[0],@x[1] -+ eor @x[2],@x[2],@x[3] -+ eor @x[4],@x[4],@x[5] -+ eor @x[6],@x[6],@x[7] -+ eor @x[8],@x[8],@x[9] -+ eor @x[10],@x[10],@x[11] -+ eor @x[12],@x[12],@x[13] -+ eor @x[14],@x[14],@x[15] -+ -+ stp @x[0],@x[2],[$out,#0] // store output -+ add @d[6],@d[6],#1 // increment counter -+ mov.32 @x[0],@d[0] // unpack key block -+ lsr @x[1],@d[0],#32 -+ stp @x[4],@x[6],[$out,#16] -+ mov.32 @x[2],@d[1] -+ lsr @x[3],@d[1],#32 -+ stp @x[8],@x[10],[$out,#32] -+ mov.32 @x[4],@d[2] -+ lsr @x[5],@d[2],#32 -+ stp @x[12],@x[14],[$out,#48] -+ add $out,$out,#64 -+ mov.32 @x[6],@d[3] -+ lsr @x[7],@d[3],#32 -+ mov.32 @x[8],@d[4] -+ lsr @x[9],@d[4],#32 -+ mov.32 @x[10],@d[5] -+ lsr @x[11],@d[5],#32 -+ mov.32 @x[12],@d[6] -+ lsr @x[13],@d[6],#32 -+ mov.32 @x[14],@d[7] -+ lsr @x[15],@d[7],#32 -+ -+ mov $ctr,#5 -+.Loop_lower_neon: -+ sub $ctr,$ctr,#1 -+___ -+ @thread0=&NEONROUND($A0,$B0,$C0,$D0,$T0,0); -+ @thread1=&NEONROUND($A1,$B1,$C1,$D1,$T1,0); -+ @thread2=&NEONROUND($A2,$B2,$C2,$D2,$T2,0); -+ @thread3=&NEONROUND($A3,$B3,$C3,$D3,$T3,0); -+ @thread4=&NEONROUND($A4,$B4,$C4,$D4,$T4,0); -+ @thread5=&NEONROUND($A5,$B5,$C5,$D5,$T5,0); -+ @thread67=(&ROUND(0,4,8,12),&ROUND(0,5,10,15)); -+ -+ foreach (@thread0) { -+ eval; eval(shift(@thread67)); -+ eval(shift(@thread1)); eval(shift(@thread67)); -+ eval(shift(@thread2)); eval(shift(@thread67)); -+ eval(shift(@thread3)); eval(shift(@thread67)); -+ eval(shift(@thread4)); eval(shift(@thread67)); -+ eval(shift(@thread5)); eval(shift(@thread67)); -+ } -+ -+ @thread0=&NEONROUND($A0,$B0,$C0,$D0,$T0,1); -+ @thread1=&NEONROUND($A1,$B1,$C1,$D1,$T1,1); -+ @thread2=&NEONROUND($A2,$B2,$C2,$D2,$T2,1); -+ @thread3=&NEONROUND($A3,$B3,$C3,$D3,$T3,1); -+ @thread4=&NEONROUND($A4,$B4,$C4,$D4,$T4,1); -+ @thread5=&NEONROUND($A5,$B5,$C5,$D5,$T5,1); -+ @thread67=(&ROUND(0,4,8,12),&ROUND(0,5,10,15)); -+ -+ foreach (@thread0) { -+ eval; eval(shift(@thread67)); -+ eval(shift(@thread1)); eval(shift(@thread67)); -+ eval(shift(@thread2)); eval(shift(@thread67)); -+ eval(shift(@thread3)); eval(shift(@thread67)); -+ eval(shift(@thread4)); eval(shift(@thread67)); -+ eval(shift(@thread5)); eval(shift(@thread67)); -+ } -+$code.=<<___; -+ cbnz $ctr,.Loop_lower_neon -+ -+ add.32 @x[0],@x[0],@d[0] // accumulate key block -+ ldp @K[0],@K[1],[sp,#0] -+ add @x[1],@x[1],@d[0],lsr#32 -+ ldp @K[2],@K[3],[sp,#32] -+ add.32 @x[2],@x[2],@d[1] -+ ldp @K[4],@K[5],[sp,#64] -+ add @x[3],@x[3],@d[1],lsr#32 -+ add $A0,$A0,@K[0] -+ add.32 @x[4],@x[4],@d[2] -+ add $A1,$A1,@K[0] -+ add @x[5],@x[5],@d[2],lsr#32 -+ add $A2,$A2,@K[0] -+ add.32 @x[6],@x[6],@d[3] -+ add $A3,$A3,@K[0] -+ add @x[7],@x[7],@d[3],lsr#32 -+ add $A4,$A4,@K[0] -+ add.32 @x[8],@x[8],@d[4] -+ add $A5,$A5,@K[0] -+ add @x[9],@x[9],@d[4],lsr#32 -+ add $C0,$C0,@K[2] -+ add.32 @x[10],@x[10],@d[5] -+ add $C1,$C1,@K[2] -+ add @x[11],@x[11],@d[5],lsr#32 -+ add $C2,$C2,@K[2] -+ add.32 @x[12],@x[12],@d[6] -+ add $C3,$C3,@K[2] -+ add @x[13],@x[13],@d[6],lsr#32 -+ add $C4,$C4,@K[2] -+ add.32 @x[14],@x[14],@d[7] -+ add $C5,$C5,@K[2] -+ add @x[15],@x[15],@d[7],lsr#32 -+ add $D4,$D4,$ONE // +4 -+ add @x[0],@x[0],@x[1],lsl#32 // pack -+ add $D5,$D5,$ONE // +4 -+ add @x[2],@x[2],@x[3],lsl#32 -+ add $D0,$D0,@K[3] -+ ldp @x[1],@x[3],[$inp,#0] // load input -+ add $D1,$D1,@K[4] -+ add @x[4],@x[4],@x[5],lsl#32 -+ add $D2,$D2,@K[5] -+ add @x[6],@x[6],@x[7],lsl#32 -+ add $D3,$D3,@K[6] -+ ldp @x[5],@x[7],[$inp,#16] -+ add $D4,$D4,@K[3] -+ add @x[8],@x[8],@x[9],lsl#32 -+ add $D5,$D5,@K[4] -+ add @x[10],@x[10],@x[11],lsl#32 -+ add $B0,$B0,@K[1] -+ ldp @x[9],@x[11],[$inp,#32] -+ add $B1,$B1,@K[1] -+ add @x[12],@x[12],@x[13],lsl#32 -+ add $B2,$B2,@K[1] -+ add @x[14],@x[14],@x[15],lsl#32 -+ add $B3,$B3,@K[1] -+ ldp @x[13],@x[15],[$inp,#48] -+ add $B4,$B4,@K[1] -+ add $inp,$inp,#64 -+ add $B5,$B5,@K[1] -+ -+# ifdef __AARCH64EB__ -+ rev @x[0],@x[0] -+ rev @x[2],@x[2] -+ rev @x[4],@x[4] -+ rev @x[6],@x[6] -+ rev @x[8],@x[8] -+ rev @x[10],@x[10] -+ rev @x[12],@x[12] -+ rev @x[14],@x[14] -+# endif -+ ld1.8 {$T0-$T3},[$inp],#64 -+ eor @x[0],@x[0],@x[1] -+ eor @x[2],@x[2],@x[3] -+ eor @x[4],@x[4],@x[5] -+ eor @x[6],@x[6],@x[7] -+ eor @x[8],@x[8],@x[9] -+ eor $A0,$A0,$T0 -+ eor @x[10],@x[10],@x[11] -+ eor $B0,$B0,$T1 -+ eor @x[12],@x[12],@x[13] -+ eor $C0,$C0,$T2 -+ eor @x[14],@x[14],@x[15] -+ eor $D0,$D0,$T3 -+ ld1.8 {$T0-$T3},[$inp],#64 -+ -+ stp @x[0],@x[2],[$out,#0] // store output -+ add @d[6],@d[6],#7 // increment counter -+ stp @x[4],@x[6],[$out,#16] -+ stp @x[8],@x[10],[$out,#32] -+ stp @x[12],@x[14],[$out,#48] -+ add $out,$out,#64 -+ st1.8 {$A0-$D0},[$out],#64 -+ -+ ld1.8 {$A0-$D0},[$inp],#64 -+ eor $A1,$A1,$T0 -+ eor $B1,$B1,$T1 -+ eor $C1,$C1,$T2 -+ eor $D1,$D1,$T3 -+ st1.8 {$A1-$D1},[$out],#64 -+ -+ ld1.8 {$A1-$D1},[$inp],#64 -+ eor $A2,$A2,$A0 -+ ldp @K[0],@K[1],[sp,#0] -+ eor $B2,$B2,$B0 -+ ldp @K[2],@K[3],[sp,#32] -+ eor $C2,$C2,$C0 -+ eor $D2,$D2,$D0 -+ st1.8 {$A2-$D2},[$out],#64 -+ -+ ld1.8 {$A2-$D2},[$inp],#64 -+ eor $A3,$A3,$A1 -+ eor $B3,$B3,$B1 -+ eor $C3,$C3,$C1 -+ eor $D3,$D3,$D1 -+ st1.8 {$A3-$D3},[$out],#64 -+ -+ ld1.8 {$A3-$D3},[$inp],#64 -+ eor $A4,$A4,$A2 -+ eor $B4,$B4,$B2 -+ eor $C4,$C4,$C2 -+ eor $D4,$D4,$D2 -+ st1.8 {$A4-$D4},[$out],#64 -+ -+ shl $A0,$ONE,#1 // 4 -> 8 -+ eor $A5,$A5,$A3 -+ eor $B5,$B5,$B3 -+ eor $C5,$C5,$C3 -+ eor $D5,$D5,$D3 -+ st1.8 {$A5-$D5},[$out],#64 -+ -+ add @K[3],@K[3],$A0 // += 8 -+ add @K[4],@K[4],$A0 -+ add @K[5],@K[5],$A0 -+ add @K[6],@K[6],$A0 -+ -+ b.hs .Loop_outer_512_neon -+ -+ adds $len,$len,#512 -+ ushr $A0,$ONE,#2 // 4 -> 1 -+ -+ ldp d8,d9,[sp,#128+0] // meet ABI requirements -+ ldp d10,d11,[sp,#128+16] -+ ldp d12,d13,[sp,#128+32] -+ ldp d14,d15,[sp,#128+48] -+ -+ stp @K[0],$ONE,[sp,#0] // wipe off-load area -+ stp @K[0],$ONE,[sp,#32] -+ stp @K[0],$ONE,[sp,#64] -+ -+ b.eq .Ldone_512_neon -+ -+ cmp $len,#192 -+ sub @K[3],@K[3],$A0 // -= 1 -+ sub @K[4],@K[4],$A0 -+ sub @K[5],@K[5],$A0 -+ add sp,sp,#128 -+ b.hs .Loop_outer_neon -+ -+ eor @K[1],@K[1],@K[1] -+ eor @K[2],@K[2],@K[2] -+ eor @K[3],@K[3],@K[3] -+ eor @K[4],@K[4],@K[4] -+ eor @K[5],@K[5],@K[5] -+ eor @K[6],@K[6],@K[6] -+ b .Loop_outer -+ -+.Ldone_512_neon: -+ ldp x19,x20,[x29,#16] -+ add sp,sp,#128+64 -+ ldp x21,x22,[x29,#32] -+ ldp x23,x24,[x29,#48] -+ ldp x25,x26,[x29,#64] -+ ldp x27,x28,[x29,#80] -+ ldp x29,x30,[sp],#96 -+ ret -+.size ChaCha20_512_neon,.-ChaCha20_512_neon -+#endif -+#endif -+___ -+} -+}}} -+ -+open SELF,$0; -+while() { -+ next if (/^#!/); -+ last if (!s/^#/\/\// and !/^$/); -+ print; -+} -+close SELF; -+ -+foreach (split("\n",$code)) { -+ s/\`([^\`]*)\`/eval $1/geo; -+ -+ (s/\b([a-z]+)\.32\b/$1/ and (s/x([0-9]+)/w$1/g or 1)) or -+ (m/\b(eor|ext|mov)\b/ and (s/\.4s/\.16b/g or 1)) or -+ (s/\b((?:ld|st)1)\.8\b/$1/ and (s/\.4s/\.16b/g or 1)) or -+ (m/\b(ld|st)[rp]\b/ and (s/v([0-9]+)\.4s/q$1/g or 1)) or -+ (s/\brev32\.16\b/rev32/ and (s/\.4s/\.8h/g or 1)); -+ -+ print $_,"\n"; -+} -+close STDOUT; # flush ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/chacha20/chacha20-x86_64.pl 2019-08-20 20:26:42.397341426 +0000 -@@ -0,0 +1,4106 @@ -+#!/usr/bin/env perl -+# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause -+# -+# Copyright (C) 2017-2019 Samuel Neves . All Rights Reserved. -+# Copyright (C) 2017-2019 Jason A. Donenfeld . All Rights Reserved. -+# Copyright (C) 2006-2017 CRYPTOGAMS by . All Rights Reserved. -+# -+# This code is taken from the OpenSSL project but the author, Andy Polyakov, -+# has relicensed it under the licenses specified in the SPDX header above. -+# The original headers, including the original license headers, are -+# included below for completeness. -+# -+# ==================================================================== -+# Written by Andy Polyakov for the OpenSSL -+# project. The module is, however, dual licensed under OpenSSL and -+# CRYPTOGAMS licenses depending on where you obtain it. For further -+# details see http://www.openssl.org/~appro/cryptogams/. -+# ==================================================================== -+# -+# November 2014 -+# -+# ChaCha20 for x86_64. -+# -+# December 2016 -+# -+# Add AVX512F code path. -+# -+# December 2017 -+# -+# Add AVX512VL code path. -+# -+# Performance in cycles per byte out of large buffer. -+# -+# IALU/gcc 4.8(i) 1x/2xSSSE3(ii) 4xSSSE3 NxAVX(v) -+# -+# P4 9.48/+99% - - -+# Core2 7.83/+55% 7.90/5.76 4.35 -+# Westmere 7.19/+50% 5.60/4.50 3.00 -+# Sandy Bridge 8.31/+42% 5.45/4.00 2.72 -+# Ivy Bridge 6.71/+46% 5.40/? 2.41 -+# Haswell 5.92/+43% 5.20/3.45 2.42 1.23 -+# Skylake[-X] 5.87/+39% 4.70/3.22 2.31 1.19[0.80(vi)] -+# Silvermont 12.0/+33% 7.75/6.90 7.03(iii) -+# Knights L 11.7/- ? 9.60(iii) 0.80 -+# Goldmont 10.6/+17% 5.10/3.52 3.28 -+# Sledgehammer 7.28/+52% - - -+# Bulldozer 9.66/+28% 9.85/5.35(iv) 3.06(iv) -+# Ryzen 5.96/+50% 5.19/3.00 2.40 2.09 -+# VIA Nano 10.5/+46% 6.72/6.88 6.05 -+# -+# (i) compared to older gcc 3.x one can observe >2x improvement on -+# most platforms; -+# (ii) 2xSSSE3 is code path optimized specifically for 128 bytes used -+# by chacha20_poly1305_tls_cipher, results are EVP-free; -+# (iii) this is not optimal result for Atom because of MSROM -+# limitations, SSE2 can do better, but gain is considered too -+# low to justify the [maintenance] effort; -+# (iv) Bulldozer actually executes 4xXOP code path that delivers 2.20 -+# and 4.85 for 128-byte inputs; -+# (v) 8xAVX2, 8xAVX512VL or 16xAVX512F, whichever best applicable; -+# (vi) even though Skylake-X can execute AVX512F code and deliver 0.57 -+# cpb in single thread, the corresponding capability is suppressed; -+ -+$flavour = shift; -+$output = shift; -+if ($flavour =~ /\./) { $output = $flavour; undef $flavour; } -+ -+$win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/); -+$kernel=0; $kernel=1 if (!$flavour && !$output); -+ -+if (!$kernel) { -+ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; -+ ( $xlate="${dir}x86_64-xlate.pl" and -f $xlate ) or -+ ( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or -+ die "can't locate x86_64-xlate.pl"; -+ -+ open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\""; -+ *STDOUT=*OUT; -+ -+ if (`$ENV{CC} -Wa,-v -c -o /dev/null -x assembler /dev/null 2>&1` -+ =~ /GNU assembler version ([2-9]\.[0-9]+)/) { -+ $avx = ($1>=2.19) + ($1>=2.22) + ($1>=2.25); -+ } -+ -+ if (!$avx && $win64 && ($flavour =~ /nasm/ || $ENV{ASM} =~ /nasm/) && -+ `nasm -v 2>&1` =~ /NASM version ([2-9]\.[0-9]+)(?:\.([0-9]+))?/) { -+ $avx = ($1>=2.09) + ($1>=2.10) + ($1>=2.12); -+ $avx += 1 if ($1==2.11 && $2>=8); -+ } -+ -+ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) && -+ `ml64 2>&1` =~ /Version ([0-9]+)\./) { -+ $avx = ($1>=10) + ($1>=11); -+ } -+ -+ if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9]\.[0-9]+)/) { -+ $avx = ($2>=3.0) + ($2>3.0); -+ } -+} else { -+ $avx = 4; # The kernel uses ifdefs for this. -+} -+ -+# input parameter block -+($out,$inp,$len,$key,$counter)=("%rdi","%rsi","%rdx","%rcx","%r8"); -+ -+$code.=<<___ if $kernel; -+#include -+___ -+ -+sub declare_variable() { -+ my ($name, $size, $type, $payload) = @_; -+ if($kernel) { -+ $code.=".section .rodata.cst$size.L$name, \"aM\", \@progbits, $size\n"; -+ $code.=".align $size\n"; -+ $code.=".L$name:\n"; -+ $code.=".$type $payload\n"; -+ } else { -+ $code.=".L$name:\n"; -+ $code.=".$type $payload\n"; -+ } -+} -+ -+sub declare_function() { -+ my ($name, $align, $nargs) = @_; -+ if($kernel) { -+ $code .= ".align $align\n"; -+ $code .= "ENTRY($name)\n"; -+ $code .= ".L$name:\n"; -+ } else { -+ $code .= ".globl $name\n"; -+ $code .= ".type $name,\@function,$nargs\n"; -+ $code .= ".align $align\n"; -+ $code .= "$name:\n"; -+ } -+} -+ -+sub end_function() { -+ my ($name) = @_; -+ if($kernel) { -+ $code .= "ENDPROC($name)\n"; -+ } else { -+ $code .= ".size $name,.-$name\n"; -+ } -+} -+ -+if(!$kernel) { -+ $code .= ".text\n"; -+} -+&declare_variable('zero', 16, 'long', '0,0,0,0'); -+&declare_variable('one', 16, 'long', '1,0,0,0'); -+&declare_variable('inc', 16, 'long', '0,1,2,3'); -+&declare_variable('four', 16, 'long', '4,4,4,4'); -+&declare_variable('incy', 32, 'long', '0,2,4,6,1,3,5,7'); -+&declare_variable('eight', 32, 'long', '8,8,8,8,8,8,8,8'); -+&declare_variable('rot16', 16, 'byte', '0x2,0x3,0x0,0x1, 0x6,0x7,0x4,0x5, 0xa,0xb,0x8,0x9, 0xe,0xf,0xc,0xd'); -+&declare_variable('rot24', 16, 'byte', '0x3,0x0,0x1,0x2, 0x7,0x4,0x5,0x6, 0xb,0x8,0x9,0xa, 0xf,0xc,0xd,0xe'); -+&declare_variable('twoy', 32, 'long', '2,0,0,0, 2,0,0,0'); -+&declare_variable('zeroz', 64, 'long', '0,0,0,0, 1,0,0,0, 2,0,0,0, 3,0,0,0'); -+&declare_variable('fourz', 64, 'long', '4,0,0,0, 4,0,0,0, 4,0,0,0, 4,0,0,0'); -+&declare_variable('incz', 64, 'long', '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15'); -+&declare_variable('sixteen', 64, 'long', '16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16'); -+&declare_variable('sigma', 16, 'ascii', '"expand 32-byte k"'); -+ -+$code.=<<___ if !$kernel; -+.asciz "ChaCha20 for x86_64, CRYPTOGAMS by " -+___ -+$code.=".text\n"; -+ -+sub AUTOLOAD() # thunk [simplified] 32-bit style perlasm -+{ my $opcode = $AUTOLOAD; $opcode =~ s/.*:://; -+ my $arg = pop; -+ $arg = "\$$arg" if ($arg*1 eq $arg); -+ $code .= "\t$opcode\t".join(',',$arg,reverse @_)."\n"; -+} -+ -+@x=("%eax","%ebx","%ecx","%edx",map("%r${_}d",(8..11)), -+ "%nox","%nox","%nox","%nox",map("%r${_}d",(12..15))); -+@t=("%esi","%edi"); -+ -+sub ROUND { # critical path is 24 cycles per round -+my ($a0,$b0,$c0,$d0)=@_; -+my ($a1,$b1,$c1,$d1)=map(($_&~3)+(($_+1)&3),($a0,$b0,$c0,$d0)); -+my ($a2,$b2,$c2,$d2)=map(($_&~3)+(($_+1)&3),($a1,$b1,$c1,$d1)); -+my ($a3,$b3,$c3,$d3)=map(($_&~3)+(($_+1)&3),($a2,$b2,$c2,$d2)); -+my ($xc,$xc_)=map("\"$_\"",@t); -+my @x=map("\"$_\"",@x); -+ -+ # Consider order in which variables are addressed by their -+ # index: -+ # -+ # a b c d -+ # -+ # 0 4 8 12 < even round -+ # 1 5 9 13 -+ # 2 6 10 14 -+ # 3 7 11 15 -+ # 0 5 10 15 < odd round -+ # 1 6 11 12 -+ # 2 7 8 13 -+ # 3 4 9 14 -+ # -+ # 'a', 'b' and 'd's are permanently allocated in registers, -+ # @x[0..7,12..15], while 'c's are maintained in memory. If -+ # you observe 'c' column, you'll notice that pair of 'c's is -+ # invariant between rounds. This means that we have to reload -+ # them once per round, in the middle. This is why you'll see -+ # bunch of 'c' stores and loads in the middle, but none in -+ # the beginning or end. -+ -+ # Normally instructions would be interleaved to favour in-order -+ # execution. Generally out-of-order cores manage it gracefully, -+ # but not this time for some reason. As in-order execution -+ # cores are dying breed, old Atom is the only one around, -+ # instructions are left uninterleaved. Besides, Atom is better -+ # off executing 1xSSSE3 code anyway... -+ -+ ( -+ "&add (@x[$a0],@x[$b0])", # Q1 -+ "&xor (@x[$d0],@x[$a0])", -+ "&rol (@x[$d0],16)", -+ "&add (@x[$a1],@x[$b1])", # Q2 -+ "&xor (@x[$d1],@x[$a1])", -+ "&rol (@x[$d1],16)", -+ -+ "&add ($xc,@x[$d0])", -+ "&xor (@x[$b0],$xc)", -+ "&rol (@x[$b0],12)", -+ "&add ($xc_,@x[$d1])", -+ "&xor (@x[$b1],$xc_)", -+ "&rol (@x[$b1],12)", -+ -+ "&add (@x[$a0],@x[$b0])", -+ "&xor (@x[$d0],@x[$a0])", -+ "&rol (@x[$d0],8)", -+ "&add (@x[$a1],@x[$b1])", -+ "&xor (@x[$d1],@x[$a1])", -+ "&rol (@x[$d1],8)", -+ -+ "&add ($xc,@x[$d0])", -+ "&xor (@x[$b0],$xc)", -+ "&rol (@x[$b0],7)", -+ "&add ($xc_,@x[$d1])", -+ "&xor (@x[$b1],$xc_)", -+ "&rol (@x[$b1],7)", -+ -+ "&mov (\"4*$c0(%rsp)\",$xc)", # reload pair of 'c's -+ "&mov (\"4*$c1(%rsp)\",$xc_)", -+ "&mov ($xc,\"4*$c2(%rsp)\")", -+ "&mov ($xc_,\"4*$c3(%rsp)\")", -+ -+ "&add (@x[$a2],@x[$b2])", # Q3 -+ "&xor (@x[$d2],@x[$a2])", -+ "&rol (@x[$d2],16)", -+ "&add (@x[$a3],@x[$b3])", # Q4 -+ "&xor (@x[$d3],@x[$a3])", -+ "&rol (@x[$d3],16)", -+ -+ "&add ($xc,@x[$d2])", -+ "&xor (@x[$b2],$xc)", -+ "&rol (@x[$b2],12)", -+ "&add ($xc_,@x[$d3])", -+ "&xor (@x[$b3],$xc_)", -+ "&rol (@x[$b3],12)", -+ -+ "&add (@x[$a2],@x[$b2])", -+ "&xor (@x[$d2],@x[$a2])", -+ "&rol (@x[$d2],8)", -+ "&add (@x[$a3],@x[$b3])", -+ "&xor (@x[$d3],@x[$a3])", -+ "&rol (@x[$d3],8)", -+ -+ "&add ($xc,@x[$d2])", -+ "&xor (@x[$b2],$xc)", -+ "&rol (@x[$b2],7)", -+ "&add ($xc_,@x[$d3])", -+ "&xor (@x[$b3],$xc_)", -+ "&rol (@x[$b3],7)" -+ ); -+} -+ -+######################################################################## -+# Generic code path that handles all lengths on pre-SSSE3 processors. -+if(!$kernel) { -+&declare_function("chacha20_ctr32", 64, 5); -+$code.=<<___; -+.cfi_startproc -+ cmp \$0,$len -+ je .Lno_data -+ mov OPENSSL_ia32cap_P+4(%rip),%r9 -+___ -+$code.=<<___ if ($avx>2); -+ bt \$48,%r9 # check for AVX512F -+ jc .Lchacha20_avx512 -+ test %r9,%r9 # check for AVX512VL -+ js .Lchacha20_avx512vl -+___ -+$code.=<<___; -+ test \$`1<<(41-32)`,%r9d -+ jnz .Lchacha20_ssse3 -+___ -+$code.=<<___; -+ push %rbx -+.cfi_push %rbx -+ push %rbp -+.cfi_push %rbp -+ push %r12 -+.cfi_push %r12 -+ push %r13 -+.cfi_push %r13 -+ push %r14 -+.cfi_push %r14 -+ push %r15 -+.cfi_push %r15 -+ sub \$64+24,%rsp -+.cfi_adjust_cfa_offset 64+24 -+.Lctr32_body: -+ -+ #movdqa .Lsigma(%rip),%xmm0 -+ movdqu ($key),%xmm1 -+ movdqu 16($key),%xmm2 -+ movdqu ($counter),%xmm3 -+ movdqa .Lone(%rip),%xmm4 -+ -+ #movdqa %xmm0,4*0(%rsp) # key[0] -+ movdqa %xmm1,4*4(%rsp) # key[1] -+ movdqa %xmm2,4*8(%rsp) # key[2] -+ movdqa %xmm3,4*12(%rsp) # key[3] -+ mov $len,%rbp # reassign $len -+ jmp .Loop_outer -+ -+.align 32 -+.Loop_outer: -+ mov \$0x61707865,@x[0] # 'expa' -+ mov \$0x3320646e,@x[1] # 'nd 3' -+ mov \$0x79622d32,@x[2] # '2-by' -+ mov \$0x6b206574,@x[3] # 'te k' -+ mov 4*4(%rsp),@x[4] -+ mov 4*5(%rsp),@x[5] -+ mov 4*6(%rsp),@x[6] -+ mov 4*7(%rsp),@x[7] -+ movd %xmm3,@x[12] -+ mov 4*13(%rsp),@x[13] -+ mov 4*14(%rsp),@x[14] -+ mov 4*15(%rsp),@x[15] -+ -+ mov %rbp,64+0(%rsp) # save len -+ mov \$10,%ebp -+ mov $inp,64+8(%rsp) # save inp -+ movq %xmm2,%rsi # "@x[8]" -+ mov $out,64+16(%rsp) # save out -+ mov %rsi,%rdi -+ shr \$32,%rdi # "@x[9]" -+ jmp .Loop -+ -+.align 32 -+.Loop: -+___ -+ foreach (&ROUND (0, 4, 8,12)) { eval; } -+ foreach (&ROUND (0, 5,10,15)) { eval; } -+ &dec ("%ebp"); -+ &jnz (".Loop"); -+ -+$code.=<<___; -+ mov @t[1],4*9(%rsp) # modulo-scheduled -+ mov @t[0],4*8(%rsp) -+ mov 64(%rsp),%rbp # load len -+ movdqa %xmm2,%xmm1 -+ mov 64+8(%rsp),$inp # load inp -+ paddd %xmm4,%xmm3 # increment counter -+ mov 64+16(%rsp),$out # load out -+ -+ add \$0x61707865,@x[0] # 'expa' -+ add \$0x3320646e,@x[1] # 'nd 3' -+ add \$0x79622d32,@x[2] # '2-by' -+ add \$0x6b206574,@x[3] # 'te k' -+ add 4*4(%rsp),@x[4] -+ add 4*5(%rsp),@x[5] -+ add 4*6(%rsp),@x[6] -+ add 4*7(%rsp),@x[7] -+ add 4*12(%rsp),@x[12] -+ add 4*13(%rsp),@x[13] -+ add 4*14(%rsp),@x[14] -+ add 4*15(%rsp),@x[15] -+ paddd 4*8(%rsp),%xmm1 -+ -+ cmp \$64,%rbp -+ jb .Ltail -+ -+ xor 4*0($inp),@x[0] # xor with input -+ xor 4*1($inp),@x[1] -+ xor 4*2($inp),@x[2] -+ xor 4*3($inp),@x[3] -+ xor 4*4($inp),@x[4] -+ xor 4*5($inp),@x[5] -+ xor 4*6($inp),@x[6] -+ xor 4*7($inp),@x[7] -+ movdqu 4*8($inp),%xmm0 -+ xor 4*12($inp),@x[12] -+ xor 4*13($inp),@x[13] -+ xor 4*14($inp),@x[14] -+ xor 4*15($inp),@x[15] -+ lea 4*16($inp),$inp # inp+=64 -+ pxor %xmm1,%xmm0 -+ -+ movdqa %xmm2,4*8(%rsp) -+ movd %xmm3,4*12(%rsp) -+ -+ mov @x[0],4*0($out) # write output -+ mov @x[1],4*1($out) -+ mov @x[2],4*2($out) -+ mov @x[3],4*3($out) -+ mov @x[4],4*4($out) -+ mov @x[5],4*5($out) -+ mov @x[6],4*6($out) -+ mov @x[7],4*7($out) -+ movdqu %xmm0,4*8($out) -+ mov @x[12],4*12($out) -+ mov @x[13],4*13($out) -+ mov @x[14],4*14($out) -+ mov @x[15],4*15($out) -+ lea 4*16($out),$out # out+=64 -+ -+ sub \$64,%rbp -+ jnz .Loop_outer -+ -+ jmp .Ldone -+ -+.align 16 -+.Ltail: -+ mov @x[0],4*0(%rsp) -+ mov @x[1],4*1(%rsp) -+ xor %rbx,%rbx -+ mov @x[2],4*2(%rsp) -+ mov @x[3],4*3(%rsp) -+ mov @x[4],4*4(%rsp) -+ mov @x[5],4*5(%rsp) -+ mov @x[6],4*6(%rsp) -+ mov @x[7],4*7(%rsp) -+ movdqa %xmm1,4*8(%rsp) -+ mov @x[12],4*12(%rsp) -+ mov @x[13],4*13(%rsp) -+ mov @x[14],4*14(%rsp) -+ mov @x[15],4*15(%rsp) -+ -+.Loop_tail: -+ movzb ($inp,%rbx),%eax -+ movzb (%rsp,%rbx),%edx -+ lea 1(%rbx),%rbx -+ xor %edx,%eax -+ mov %al,-1($out,%rbx) -+ dec %rbp -+ jnz .Loop_tail -+ -+.Ldone: -+ add \$64+24,%rsp -+.cfi_adjust_cfa_offset -64-24 -+ pop %r15 -+.cfi_restore %r15 -+ pop %r14 -+.cfi_restore %r14 -+ pop %r13 -+.cfi_restore %r13 -+ pop %r12 -+.cfi_restore %r12 -+ pop %rbp -+.cfi_restore %rbp -+ pop %rbx -+.cfi_restore %rbx -+.Lno_data: -+ ret -+.cfi_endproc -+___ -+&end_function("chacha20_ctr32"); -+} -+ -+######################################################################## -+# SSSE3 code path that handles shorter lengths -+{ -+my ($a,$b,$c,$d,$t,$t1,$rot16,$rot24)=map("%xmm$_",(0..7)); -+ -+sub SSSE3ROUND { # critical path is 20 "SIMD ticks" per round -+ &paddd ($a,$b); -+ &pxor ($d,$a); -+ &pshufb ($d,$rot16); -+ -+ &paddd ($c,$d); -+ &pxor ($b,$c); -+ &movdqa ($t,$b); -+ &psrld ($b,20); -+ &pslld ($t,12); -+ &por ($b,$t); -+ -+ &paddd ($a,$b); -+ &pxor ($d,$a); -+ &pshufb ($d,$rot24); -+ -+ &paddd ($c,$d); -+ &pxor ($b,$c); -+ &movdqa ($t,$b); -+ &psrld ($b,25); -+ &pslld ($t,7); -+ &por ($b,$t); -+} -+ -+my $xframe = $win64 ? 32+8 : 8; -+ -+if($kernel) { -+ $code .= "#ifdef CONFIG_AS_SSSE3\n"; -+} -+ -+if($kernel) { -+&declare_function("hchacha20_ssse3", 32, 5); -+$code.=<<___; -+ movdqa .Lsigma(%rip),$a -+ movdqu ($len),$b -+ movdqu 16($len),$c -+ movdqu ($inp),$d -+ # This code is only used when targeting kernel. -+ # If targeting win64, xmm{6,7} preserving needs to be added. -+ movdqa .Lrot16(%rip),$rot16 -+ movdqa .Lrot24(%rip),$rot24 -+ mov \$10,$counter # reuse $counter -+ jmp 1f -+.align 32 -+1: -+___ -+ &SSSE3ROUND(); -+ &pshufd ($a,$a,0b10010011); -+ &pshufd ($d,$d,0b01001110); -+ &pshufd ($c,$c,0b00111001); -+ &nop (); -+ -+ &SSSE3ROUND(); -+ &pshufd ($a,$a,0b00111001); -+ &pshufd ($d,$d,0b01001110); -+ &pshufd ($c,$c,0b10010011); -+ -+ &dec ($counter); -+ &jnz ("1b"); -+ -+$code.=<<___; -+ movdqu $a, ($out) -+ movdqu $d, 16($out) -+ ret -+___ -+&end_function("hchacha20_ssse3"); -+} -+ -+&declare_function("chacha20_ssse3", 32, 5); -+$code.=<<___; -+.cfi_startproc -+ lea 8(%rsp),%r10 # frame pointer -+.cfi_def_cfa_register %r10 -+___ -+$code.=<<___ if ($avx && !$kernel); -+ test \$`1<<(43-32)`,%r10d -+ jnz .Lchacha20_4xop # XOP is fastest even if we use 1/4 -+___ -+$code.=<<___; -+ cmp \$128,$len # we might throw away some data, -+ je .Lchacha20_128 -+ ja .Lchacha20_4x # but overall it won't be slower -+ -+.Ldo_ssse3_after_all: -+ sub \$64+$xframe,%rsp -+ and \$-16,%rsp -+___ -+$code.=<<___ if ($win64); -+ movaps %xmm6,-0x30(%r10) -+ movaps %xmm7,-0x20(%r10) -+.Lssse3_body: -+___ -+$code.=<<___; -+ movdqa .Lsigma(%rip),$a -+ movdqu ($key),$b -+ movdqu 16($key),$c -+ movdqu ($counter),$d -+ movdqa .Lrot16(%rip),$rot16 -+ movdqa .Lrot24(%rip),$rot24 -+ -+ movdqa $a,0x00(%rsp) -+ movdqa $b,0x10(%rsp) -+ movdqa $c,0x20(%rsp) -+ movdqa $d,0x30(%rsp) -+ mov \$10,$counter # reuse $counter -+ jmp .Loop_ssse3 -+ -+.align 32 -+.Loop_outer_ssse3: -+ movdqa .Lone(%rip),$d -+ movdqa 0x00(%rsp),$a -+ movdqa 0x10(%rsp),$b -+ movdqa 0x20(%rsp),$c -+ paddd 0x30(%rsp),$d -+ mov \$10,$counter -+ movdqa $d,0x30(%rsp) -+ jmp .Loop_ssse3 -+ -+.align 32 -+.Loop_ssse3: -+___ -+ &SSSE3ROUND(); -+ &pshufd ($a,$a,0b10010011); -+ &pshufd ($d,$d,0b01001110); -+ &pshufd ($c,$c,0b00111001); -+ &nop (); -+ -+ &SSSE3ROUND(); -+ &pshufd ($a,$a,0b00111001); -+ &pshufd ($d,$d,0b01001110); -+ &pshufd ($c,$c,0b10010011); -+ -+ &dec ($counter); -+ &jnz (".Loop_ssse3"); -+ -+$code.=<<___; -+ paddd 0x00(%rsp),$a -+ paddd 0x10(%rsp),$b -+ paddd 0x20(%rsp),$c -+ paddd 0x30(%rsp),$d -+ -+ cmp \$64,$len -+ jb .Ltail_ssse3 -+ -+ movdqu 0x00($inp),$t -+ movdqu 0x10($inp),$t1 -+ pxor $t,$a # xor with input -+ movdqu 0x20($inp),$t -+ pxor $t1,$b -+ movdqu 0x30($inp),$t1 -+ lea 0x40($inp),$inp # inp+=64 -+ pxor $t,$c -+ pxor $t1,$d -+ -+ movdqu $a,0x00($out) # write output -+ movdqu $b,0x10($out) -+ movdqu $c,0x20($out) -+ movdqu $d,0x30($out) -+ lea 0x40($out),$out # out+=64 -+ -+ sub \$64,$len -+ jnz .Loop_outer_ssse3 -+ -+ jmp .Ldone_ssse3 -+ -+.align 16 -+.Ltail_ssse3: -+ movdqa $a,0x00(%rsp) -+ movdqa $b,0x10(%rsp) -+ movdqa $c,0x20(%rsp) -+ movdqa $d,0x30(%rsp) -+ xor $counter,$counter -+ -+.Loop_tail_ssse3: -+ movzb ($inp,$counter),%eax -+ movzb (%rsp,$counter),%ecx -+ lea 1($counter),$counter -+ xor %ecx,%eax -+ mov %al,-1($out,$counter) -+ dec $len -+ jnz .Loop_tail_ssse3 -+ -+.Ldone_ssse3: -+___ -+$code.=<<___ if ($win64); -+ movaps -0x30(%r10),%xmm6 -+ movaps -0x20(%r10),%xmm7 -+___ -+$code.=<<___; -+ lea -8(%r10),%rsp -+.cfi_def_cfa_register %rsp -+.Lssse3_epilogue: -+ ret -+.cfi_endproc -+___ -+} -+&end_function("chacha20_ssse3"); -+ -+######################################################################## -+# SSSE3 code path that handles 128-byte inputs -+{ -+my ($a,$b,$c,$d,$t,$t1,$rot16,$rot24)=map("%xmm$_",(8,9,2..7)); -+my ($a1,$b1,$c1,$d1)=map("%xmm$_",(10,11,0,1)); -+ -+sub SSSE3ROUND_2x { -+ &paddd ($a,$b); -+ &pxor ($d,$a); -+ &paddd ($a1,$b1); -+ &pxor ($d1,$a1); -+ &pshufb ($d,$rot16); -+ &pshufb($d1,$rot16); -+ -+ &paddd ($c,$d); -+ &paddd ($c1,$d1); -+ &pxor ($b,$c); -+ &pxor ($b1,$c1); -+ &movdqa ($t,$b); -+ &psrld ($b,20); -+ &movdqa($t1,$b1); -+ &pslld ($t,12); -+ &psrld ($b1,20); -+ &por ($b,$t); -+ &pslld ($t1,12); -+ &por ($b1,$t1); -+ -+ &paddd ($a,$b); -+ &pxor ($d,$a); -+ &paddd ($a1,$b1); -+ &pxor ($d1,$a1); -+ &pshufb ($d,$rot24); -+ &pshufb($d1,$rot24); -+ -+ &paddd ($c,$d); -+ &paddd ($c1,$d1); -+ &pxor ($b,$c); -+ &pxor ($b1,$c1); -+ &movdqa ($t,$b); -+ &psrld ($b,25); -+ &movdqa($t1,$b1); -+ &pslld ($t,7); -+ &psrld ($b1,25); -+ &por ($b,$t); -+ &pslld ($t1,7); -+ &por ($b1,$t1); -+} -+ -+my $xframe = $win64 ? 0x68 : 8; -+ -+$code.=<<___; -+.type chacha20_128,\@function,5 -+.align 32 -+chacha20_128: -+.cfi_startproc -+.Lchacha20_128: -+ lea 8(%rsp),%r10 # frame pointer -+.cfi_def_cfa_register %r10 -+ sub \$64+$xframe,%rsp -+ and \$-16,%rsp -+___ -+$code.=<<___ if ($win64); -+ movaps %xmm6,-0x70(%r10) -+ movaps %xmm7,-0x60(%r10) -+ movaps %xmm8,-0x50(%r10) -+ movaps %xmm9,-0x40(%r10) -+ movaps %xmm10,-0x30(%r10) -+ movaps %xmm11,-0x20(%r10) -+.L128_body: -+___ -+$code.=<<___; -+ movdqa .Lsigma(%rip),$a -+ movdqu ($key),$b -+ movdqu 16($key),$c -+ movdqu ($counter),$d -+ movdqa .Lone(%rip),$d1 -+ movdqa .Lrot16(%rip),$rot16 -+ movdqa .Lrot24(%rip),$rot24 -+ -+ movdqa $a,$a1 -+ movdqa $a,0x00(%rsp) -+ movdqa $b,$b1 -+ movdqa $b,0x10(%rsp) -+ movdqa $c,$c1 -+ movdqa $c,0x20(%rsp) -+ paddd $d,$d1 -+ movdqa $d,0x30(%rsp) -+ mov \$10,$counter # reuse $counter -+ jmp .Loop_128 -+ -+.align 32 -+.Loop_128: -+___ -+ &SSSE3ROUND_2x(); -+ &pshufd ($a,$a,0b10010011); -+ &pshufd ($d,$d,0b01001110); -+ &pshufd ($c,$c,0b00111001); -+ &pshufd ($a1,$a1,0b10010011); -+ &pshufd ($d1,$d1,0b01001110); -+ &pshufd ($c1,$c1,0b00111001); -+ -+ &SSSE3ROUND_2x(); -+ &pshufd ($a,$a,0b00111001); -+ &pshufd ($d,$d,0b01001110); -+ &pshufd ($c,$c,0b10010011); -+ &pshufd ($a1,$a1,0b00111001); -+ &pshufd ($d1,$d1,0b01001110); -+ &pshufd ($c1,$c1,0b10010011); -+ -+ &dec ($counter); -+ &jnz (".Loop_128"); -+ -+$code.=<<___; -+ paddd 0x00(%rsp),$a -+ paddd 0x10(%rsp),$b -+ paddd 0x20(%rsp),$c -+ paddd 0x30(%rsp),$d -+ paddd .Lone(%rip),$d1 -+ paddd 0x00(%rsp),$a1 -+ paddd 0x10(%rsp),$b1 -+ paddd 0x20(%rsp),$c1 -+ paddd 0x30(%rsp),$d1 -+ -+ movdqu 0x00($inp),$t -+ movdqu 0x10($inp),$t1 -+ pxor $t,$a # xor with input -+ movdqu 0x20($inp),$t -+ pxor $t1,$b -+ movdqu 0x30($inp),$t1 -+ pxor $t,$c -+ movdqu 0x40($inp),$t -+ pxor $t1,$d -+ movdqu 0x50($inp),$t1 -+ pxor $t,$a1 -+ movdqu 0x60($inp),$t -+ pxor $t1,$b1 -+ movdqu 0x70($inp),$t1 -+ pxor $t,$c1 -+ pxor $t1,$d1 -+ -+ movdqu $a,0x00($out) # write output -+ movdqu $b,0x10($out) -+ movdqu $c,0x20($out) -+ movdqu $d,0x30($out) -+ movdqu $a1,0x40($out) -+ movdqu $b1,0x50($out) -+ movdqu $c1,0x60($out) -+ movdqu $d1,0x70($out) -+___ -+$code.=<<___ if ($win64); -+ movaps -0x70(%r10),%xmm6 -+ movaps -0x60(%r10),%xmm7 -+ movaps -0x50(%r10),%xmm8 -+ movaps -0x40(%r10),%xmm9 -+ movaps -0x30(%r10),%xmm10 -+ movaps -0x20(%r10),%xmm11 -+___ -+$code.=<<___; -+ lea -8(%r10),%rsp -+.cfi_def_cfa_register %rsp -+.L128_epilogue: -+ ret -+.cfi_endproc -+.size chacha20_128,.-chacha20_128 -+___ -+} -+ -+######################################################################## -+# SSSE3 code path that handles longer messages. -+{ -+# assign variables to favor Atom front-end -+my ($xd0,$xd1,$xd2,$xd3, $xt0,$xt1,$xt2,$xt3, -+ $xa0,$xa1,$xa2,$xa3, $xb0,$xb1,$xb2,$xb3)=map("%xmm$_",(0..15)); -+my @xx=($xa0,$xa1,$xa2,$xa3, $xb0,$xb1,$xb2,$xb3, -+ "%nox","%nox","%nox","%nox", $xd0,$xd1,$xd2,$xd3); -+ -+sub SSSE3_lane_ROUND { -+my ($a0,$b0,$c0,$d0)=@_; -+my ($a1,$b1,$c1,$d1)=map(($_&~3)+(($_+1)&3),($a0,$b0,$c0,$d0)); -+my ($a2,$b2,$c2,$d2)=map(($_&~3)+(($_+1)&3),($a1,$b1,$c1,$d1)); -+my ($a3,$b3,$c3,$d3)=map(($_&~3)+(($_+1)&3),($a2,$b2,$c2,$d2)); -+my ($xc,$xc_,$t0,$t1)=map("\"$_\"",$xt0,$xt1,$xt2,$xt3); -+my @x=map("\"$_\"",@xx); -+ -+ # Consider order in which variables are addressed by their -+ # index: -+ # -+ # a b c d -+ # -+ # 0 4 8 12 < even round -+ # 1 5 9 13 -+ # 2 6 10 14 -+ # 3 7 11 15 -+ # 0 5 10 15 < odd round -+ # 1 6 11 12 -+ # 2 7 8 13 -+ # 3 4 9 14 -+ # -+ # 'a', 'b' and 'd's are permanently allocated in registers, -+ # @x[0..7,12..15], while 'c's are maintained in memory. If -+ # you observe 'c' column, you'll notice that pair of 'c's is -+ # invariant between rounds. This means that we have to reload -+ # them once per round, in the middle. This is why you'll see -+ # bunch of 'c' stores and loads in the middle, but none in -+ # the beginning or end. -+ -+ ( -+ "&paddd (@x[$a0],@x[$b0])", # Q1 -+ "&paddd (@x[$a1],@x[$b1])", # Q2 -+ "&pxor (@x[$d0],@x[$a0])", -+ "&pxor (@x[$d1],@x[$a1])", -+ "&pshufb (@x[$d0],$t1)", -+ "&pshufb (@x[$d1],$t1)", -+ -+ "&paddd ($xc,@x[$d0])", -+ "&paddd ($xc_,@x[$d1])", -+ "&pxor (@x[$b0],$xc)", -+ "&pxor (@x[$b1],$xc_)", -+ "&movdqa ($t0,@x[$b0])", -+ "&pslld (@x[$b0],12)", -+ "&psrld ($t0,20)", -+ "&movdqa ($t1,@x[$b1])", -+ "&pslld (@x[$b1],12)", -+ "&por (@x[$b0],$t0)", -+ "&psrld ($t1,20)", -+ "&movdqa ($t0,'(%r11)')", # .Lrot24(%rip) -+ "&por (@x[$b1],$t1)", -+ -+ "&paddd (@x[$a0],@x[$b0])", -+ "&paddd (@x[$a1],@x[$b1])", -+ "&pxor (@x[$d0],@x[$a0])", -+ "&pxor (@x[$d1],@x[$a1])", -+ "&pshufb (@x[$d0],$t0)", -+ "&pshufb (@x[$d1],$t0)", -+ -+ "&paddd ($xc,@x[$d0])", -+ "&paddd ($xc_,@x[$d1])", -+ "&pxor (@x[$b0],$xc)", -+ "&pxor (@x[$b1],$xc_)", -+ "&movdqa ($t1,@x[$b0])", -+ "&pslld (@x[$b0],7)", -+ "&psrld ($t1,25)", -+ "&movdqa ($t0,@x[$b1])", -+ "&pslld (@x[$b1],7)", -+ "&por (@x[$b0],$t1)", -+ "&psrld ($t0,25)", -+ "&movdqa ($t1,'(%r9)')", # .Lrot16(%rip) -+ "&por (@x[$b1],$t0)", -+ -+ "&movdqa (\"`16*($c0-8)`(%rsp)\",$xc)", # reload pair of 'c's -+ "&movdqa (\"`16*($c1-8)`(%rsp)\",$xc_)", -+ "&movdqa ($xc,\"`16*($c2-8)`(%rsp)\")", -+ "&movdqa ($xc_,\"`16*($c3-8)`(%rsp)\")", -+ -+ "&paddd (@x[$a2],@x[$b2])", # Q3 -+ "&paddd (@x[$a3],@x[$b3])", # Q4 -+ "&pxor (@x[$d2],@x[$a2])", -+ "&pxor (@x[$d3],@x[$a3])", -+ "&pshufb (@x[$d2],$t1)", -+ "&pshufb (@x[$d3],$t1)", -+ -+ "&paddd ($xc,@x[$d2])", -+ "&paddd ($xc_,@x[$d3])", -+ "&pxor (@x[$b2],$xc)", -+ "&pxor (@x[$b3],$xc_)", -+ "&movdqa ($t0,@x[$b2])", -+ "&pslld (@x[$b2],12)", -+ "&psrld ($t0,20)", -+ "&movdqa ($t1,@x[$b3])", -+ "&pslld (@x[$b3],12)", -+ "&por (@x[$b2],$t0)", -+ "&psrld ($t1,20)", -+ "&movdqa ($t0,'(%r11)')", # .Lrot24(%rip) -+ "&por (@x[$b3],$t1)", -+ -+ "&paddd (@x[$a2],@x[$b2])", -+ "&paddd (@x[$a3],@x[$b3])", -+ "&pxor (@x[$d2],@x[$a2])", -+ "&pxor (@x[$d3],@x[$a3])", -+ "&pshufb (@x[$d2],$t0)", -+ "&pshufb (@x[$d3],$t0)", -+ -+ "&paddd ($xc,@x[$d2])", -+ "&paddd ($xc_,@x[$d3])", -+ "&pxor (@x[$b2],$xc)", -+ "&pxor (@x[$b3],$xc_)", -+ "&movdqa ($t1,@x[$b2])", -+ "&pslld (@x[$b2],7)", -+ "&psrld ($t1,25)", -+ "&movdqa ($t0,@x[$b3])", -+ "&pslld (@x[$b3],7)", -+ "&por (@x[$b2],$t1)", -+ "&psrld ($t0,25)", -+ "&movdqa ($t1,'(%r9)')", # .Lrot16(%rip) -+ "&por (@x[$b3],$t0)" -+ ); -+} -+ -+my $xframe = $win64 ? 0xa8 : 8; -+ -+$code.=<<___; -+.type chacha20_4x,\@function,5 -+.align 32 -+chacha20_4x: -+.cfi_startproc -+.Lchacha20_4x: -+ lea 8(%rsp),%r10 # frame pointer -+.cfi_def_cfa_register %r10 -+___ -+$code.=<<___ if (!$kernel); -+ mov %r9,%r11 -+___ -+$code.=<<___ if ($avx>1 && !$kernel); -+ shr \$32,%r9 # OPENSSL_ia32cap_P+8 -+ test \$`1<<5`,%r9 # test AVX2 -+ jnz .Lchacha20_8x -+___ -+$code.=<<___; -+ cmp \$192,$len -+ ja .Lproceed4x -+___ -+$code.=<<___ if (!$kernel); -+ and \$`1<<26|1<<22`,%r11 # isolate XSAVE+MOVBE -+ cmp \$`1<<22`,%r11 # check for MOVBE without XSAVE -+ je .Ldo_ssse3_after_all # to detect Atom -+___ -+$code.=<<___; -+.Lproceed4x: -+ sub \$0x140+$xframe,%rsp -+ and \$-16,%rsp -+___ -+ ################ stack layout -+ # +0x00 SIMD equivalent of @x[8-12] -+ # ... -+ # +0x40 constant copy of key[0-2] smashed by lanes -+ # ... -+ # +0x100 SIMD counters (with nonce smashed by lanes) -+ # ... -+ # +0x140 -+$code.=<<___ if ($win64); -+ movaps %xmm6,-0xb0(%r10) -+ movaps %xmm7,-0xa0(%r10) -+ movaps %xmm8,-0x90(%r10) -+ movaps %xmm9,-0x80(%r10) -+ movaps %xmm10,-0x70(%r10) -+ movaps %xmm11,-0x60(%r10) -+ movaps %xmm12,-0x50(%r10) -+ movaps %xmm13,-0x40(%r10) -+ movaps %xmm14,-0x30(%r10) -+ movaps %xmm15,-0x20(%r10) -+.L4x_body: -+___ -+$code.=<<___; -+ movdqa .Lsigma(%rip),$xa3 # key[0] -+ movdqu ($key),$xb3 # key[1] -+ movdqu 16($key),$xt3 # key[2] -+ movdqu ($counter),$xd3 # key[3] -+ lea 0x100(%rsp),%rcx # size optimization -+ lea .Lrot16(%rip),%r9 -+ lea .Lrot24(%rip),%r11 -+ -+ pshufd \$0x00,$xa3,$xa0 # smash key by lanes... -+ pshufd \$0x55,$xa3,$xa1 -+ movdqa $xa0,0x40(%rsp) # ... and offload -+ pshufd \$0xaa,$xa3,$xa2 -+ movdqa $xa1,0x50(%rsp) -+ pshufd \$0xff,$xa3,$xa3 -+ movdqa $xa2,0x60(%rsp) -+ movdqa $xa3,0x70(%rsp) -+ -+ pshufd \$0x00,$xb3,$xb0 -+ pshufd \$0x55,$xb3,$xb1 -+ movdqa $xb0,0x80-0x100(%rcx) -+ pshufd \$0xaa,$xb3,$xb2 -+ movdqa $xb1,0x90-0x100(%rcx) -+ pshufd \$0xff,$xb3,$xb3 -+ movdqa $xb2,0xa0-0x100(%rcx) -+ movdqa $xb3,0xb0-0x100(%rcx) -+ -+ pshufd \$0x00,$xt3,$xt0 # "$xc0" -+ pshufd \$0x55,$xt3,$xt1 # "$xc1" -+ movdqa $xt0,0xc0-0x100(%rcx) -+ pshufd \$0xaa,$xt3,$xt2 # "$xc2" -+ movdqa $xt1,0xd0-0x100(%rcx) -+ pshufd \$0xff,$xt3,$xt3 # "$xc3" -+ movdqa $xt2,0xe0-0x100(%rcx) -+ movdqa $xt3,0xf0-0x100(%rcx) -+ -+ pshufd \$0x00,$xd3,$xd0 -+ pshufd \$0x55,$xd3,$xd1 -+ paddd .Linc(%rip),$xd0 # don't save counters yet -+ pshufd \$0xaa,$xd3,$xd2 -+ movdqa $xd1,0x110-0x100(%rcx) -+ pshufd \$0xff,$xd3,$xd3 -+ movdqa $xd2,0x120-0x100(%rcx) -+ movdqa $xd3,0x130-0x100(%rcx) -+ -+ jmp .Loop_enter4x -+ -+.align 32 -+.Loop_outer4x: -+ movdqa 0x40(%rsp),$xa0 # re-load smashed key -+ movdqa 0x50(%rsp),$xa1 -+ movdqa 0x60(%rsp),$xa2 -+ movdqa 0x70(%rsp),$xa3 -+ movdqa 0x80-0x100(%rcx),$xb0 -+ movdqa 0x90-0x100(%rcx),$xb1 -+ movdqa 0xa0-0x100(%rcx),$xb2 -+ movdqa 0xb0-0x100(%rcx),$xb3 -+ movdqa 0xc0-0x100(%rcx),$xt0 # "$xc0" -+ movdqa 0xd0-0x100(%rcx),$xt1 # "$xc1" -+ movdqa 0xe0-0x100(%rcx),$xt2 # "$xc2" -+ movdqa 0xf0-0x100(%rcx),$xt3 # "$xc3" -+ movdqa 0x100-0x100(%rcx),$xd0 -+ movdqa 0x110-0x100(%rcx),$xd1 -+ movdqa 0x120-0x100(%rcx),$xd2 -+ movdqa 0x130-0x100(%rcx),$xd3 -+ paddd .Lfour(%rip),$xd0 # next SIMD counters -+ -+.Loop_enter4x: -+ movdqa $xt2,0x20(%rsp) # SIMD equivalent of "@x[10]" -+ movdqa $xt3,0x30(%rsp) # SIMD equivalent of "@x[11]" -+ movdqa (%r9),$xt3 # .Lrot16(%rip) -+ mov \$10,%eax -+ movdqa $xd0,0x100-0x100(%rcx) # save SIMD counters -+ jmp .Loop4x -+ -+.align 32 -+.Loop4x: -+___ -+ foreach (&SSSE3_lane_ROUND(0, 4, 8,12)) { eval; } -+ foreach (&SSSE3_lane_ROUND(0, 5,10,15)) { eval; } -+$code.=<<___; -+ dec %eax -+ jnz .Loop4x -+ -+ paddd 0x40(%rsp),$xa0 # accumulate key material -+ paddd 0x50(%rsp),$xa1 -+ paddd 0x60(%rsp),$xa2 -+ paddd 0x70(%rsp),$xa3 -+ -+ movdqa $xa0,$xt2 # "de-interlace" data -+ punpckldq $xa1,$xa0 -+ movdqa $xa2,$xt3 -+ punpckldq $xa3,$xa2 -+ punpckhdq $xa1,$xt2 -+ punpckhdq $xa3,$xt3 -+ movdqa $xa0,$xa1 -+ punpcklqdq $xa2,$xa0 # "a0" -+ movdqa $xt2,$xa3 -+ punpcklqdq $xt3,$xt2 # "a2" -+ punpckhqdq $xa2,$xa1 # "a1" -+ punpckhqdq $xt3,$xa3 # "a3" -+___ -+ ($xa2,$xt2)=($xt2,$xa2); -+$code.=<<___; -+ paddd 0x80-0x100(%rcx),$xb0 -+ paddd 0x90-0x100(%rcx),$xb1 -+ paddd 0xa0-0x100(%rcx),$xb2 -+ paddd 0xb0-0x100(%rcx),$xb3 -+ -+ movdqa $xa0,0x00(%rsp) # offload $xaN -+ movdqa $xa1,0x10(%rsp) -+ movdqa 0x20(%rsp),$xa0 # "xc2" -+ movdqa 0x30(%rsp),$xa1 # "xc3" -+ -+ movdqa $xb0,$xt2 -+ punpckldq $xb1,$xb0 -+ movdqa $xb2,$xt3 -+ punpckldq $xb3,$xb2 -+ punpckhdq $xb1,$xt2 -+ punpckhdq $xb3,$xt3 -+ movdqa $xb0,$xb1 -+ punpcklqdq $xb2,$xb0 # "b0" -+ movdqa $xt2,$xb3 -+ punpcklqdq $xt3,$xt2 # "b2" -+ punpckhqdq $xb2,$xb1 # "b1" -+ punpckhqdq $xt3,$xb3 # "b3" -+___ -+ ($xb2,$xt2)=($xt2,$xb2); -+ my ($xc0,$xc1,$xc2,$xc3)=($xt0,$xt1,$xa0,$xa1); -+$code.=<<___; -+ paddd 0xc0-0x100(%rcx),$xc0 -+ paddd 0xd0-0x100(%rcx),$xc1 -+ paddd 0xe0-0x100(%rcx),$xc2 -+ paddd 0xf0-0x100(%rcx),$xc3 -+ -+ movdqa $xa2,0x20(%rsp) # keep offloading $xaN -+ movdqa $xa3,0x30(%rsp) -+ -+ movdqa $xc0,$xt2 -+ punpckldq $xc1,$xc0 -+ movdqa $xc2,$xt3 -+ punpckldq $xc3,$xc2 -+ punpckhdq $xc1,$xt2 -+ punpckhdq $xc3,$xt3 -+ movdqa $xc0,$xc1 -+ punpcklqdq $xc2,$xc0 # "c0" -+ movdqa $xt2,$xc3 -+ punpcklqdq $xt3,$xt2 # "c2" -+ punpckhqdq $xc2,$xc1 # "c1" -+ punpckhqdq $xt3,$xc3 # "c3" -+___ -+ ($xc2,$xt2)=($xt2,$xc2); -+ ($xt0,$xt1)=($xa2,$xa3); # use $xaN as temporary -+$code.=<<___; -+ paddd 0x100-0x100(%rcx),$xd0 -+ paddd 0x110-0x100(%rcx),$xd1 -+ paddd 0x120-0x100(%rcx),$xd2 -+ paddd 0x130-0x100(%rcx),$xd3 -+ -+ movdqa $xd0,$xt2 -+ punpckldq $xd1,$xd0 -+ movdqa $xd2,$xt3 -+ punpckldq $xd3,$xd2 -+ punpckhdq $xd1,$xt2 -+ punpckhdq $xd3,$xt3 -+ movdqa $xd0,$xd1 -+ punpcklqdq $xd2,$xd0 # "d0" -+ movdqa $xt2,$xd3 -+ punpcklqdq $xt3,$xt2 # "d2" -+ punpckhqdq $xd2,$xd1 # "d1" -+ punpckhqdq $xt3,$xd3 # "d3" -+___ -+ ($xd2,$xt2)=($xt2,$xd2); -+$code.=<<___; -+ cmp \$64*4,$len -+ jb .Ltail4x -+ -+ movdqu 0x00($inp),$xt0 # xor with input -+ movdqu 0x10($inp),$xt1 -+ movdqu 0x20($inp),$xt2 -+ movdqu 0x30($inp),$xt3 -+ pxor 0x00(%rsp),$xt0 # $xaN is offloaded, remember? -+ pxor $xb0,$xt1 -+ pxor $xc0,$xt2 -+ pxor $xd0,$xt3 -+ -+ movdqu $xt0,0x00($out) -+ movdqu 0x40($inp),$xt0 -+ movdqu $xt1,0x10($out) -+ movdqu 0x50($inp),$xt1 -+ movdqu $xt2,0x20($out) -+ movdqu 0x60($inp),$xt2 -+ movdqu $xt3,0x30($out) -+ movdqu 0x70($inp),$xt3 -+ lea 0x80($inp),$inp # size optimization -+ pxor 0x10(%rsp),$xt0 -+ pxor $xb1,$xt1 -+ pxor $xc1,$xt2 -+ pxor $xd1,$xt3 -+ -+ movdqu $xt0,0x40($out) -+ movdqu 0x00($inp),$xt0 -+ movdqu $xt1,0x50($out) -+ movdqu 0x10($inp),$xt1 -+ movdqu $xt2,0x60($out) -+ movdqu 0x20($inp),$xt2 -+ movdqu $xt3,0x70($out) -+ lea 0x80($out),$out # size optimization -+ movdqu 0x30($inp),$xt3 -+ pxor 0x20(%rsp),$xt0 -+ pxor $xb2,$xt1 -+ pxor $xc2,$xt2 -+ pxor $xd2,$xt3 -+ -+ movdqu $xt0,0x00($out) -+ movdqu 0x40($inp),$xt0 -+ movdqu $xt1,0x10($out) -+ movdqu 0x50($inp),$xt1 -+ movdqu $xt2,0x20($out) -+ movdqu 0x60($inp),$xt2 -+ movdqu $xt3,0x30($out) -+ movdqu 0x70($inp),$xt3 -+ lea 0x80($inp),$inp # inp+=64*4 -+ pxor 0x30(%rsp),$xt0 -+ pxor $xb3,$xt1 -+ pxor $xc3,$xt2 -+ pxor $xd3,$xt3 -+ movdqu $xt0,0x40($out) -+ movdqu $xt1,0x50($out) -+ movdqu $xt2,0x60($out) -+ movdqu $xt3,0x70($out) -+ lea 0x80($out),$out # out+=64*4 -+ -+ sub \$64*4,$len -+ jnz .Loop_outer4x -+ -+ jmp .Ldone4x -+ -+.Ltail4x: -+ cmp \$192,$len -+ jae .L192_or_more4x -+ cmp \$128,$len -+ jae .L128_or_more4x -+ cmp \$64,$len -+ jae .L64_or_more4x -+ -+ #movdqa 0x00(%rsp),$xt0 # $xaN is offloaded, remember? -+ xor %r9,%r9 -+ #movdqa $xt0,0x00(%rsp) -+ movdqa $xb0,0x10(%rsp) -+ movdqa $xc0,0x20(%rsp) -+ movdqa $xd0,0x30(%rsp) -+ jmp .Loop_tail4x -+ -+.align 32 -+.L64_or_more4x: -+ movdqu 0x00($inp),$xt0 # xor with input -+ movdqu 0x10($inp),$xt1 -+ movdqu 0x20($inp),$xt2 -+ movdqu 0x30($inp),$xt3 -+ pxor 0x00(%rsp),$xt0 # $xaxN is offloaded, remember? -+ pxor $xb0,$xt1 -+ pxor $xc0,$xt2 -+ pxor $xd0,$xt3 -+ movdqu $xt0,0x00($out) -+ movdqu $xt1,0x10($out) -+ movdqu $xt2,0x20($out) -+ movdqu $xt3,0x30($out) -+ je .Ldone4x -+ -+ movdqa 0x10(%rsp),$xt0 # $xaN is offloaded, remember? -+ lea 0x40($inp),$inp # inp+=64*1 -+ xor %r9,%r9 -+ movdqa $xt0,0x00(%rsp) -+ movdqa $xb1,0x10(%rsp) -+ lea 0x40($out),$out # out+=64*1 -+ movdqa $xc1,0x20(%rsp) -+ sub \$64,$len # len-=64*1 -+ movdqa $xd1,0x30(%rsp) -+ jmp .Loop_tail4x -+ -+.align 32 -+.L128_or_more4x: -+ movdqu 0x00($inp),$xt0 # xor with input -+ movdqu 0x10($inp),$xt1 -+ movdqu 0x20($inp),$xt2 -+ movdqu 0x30($inp),$xt3 -+ pxor 0x00(%rsp),$xt0 # $xaN is offloaded, remember? -+ pxor $xb0,$xt1 -+ pxor $xc0,$xt2 -+ pxor $xd0,$xt3 -+ -+ movdqu $xt0,0x00($out) -+ movdqu 0x40($inp),$xt0 -+ movdqu $xt1,0x10($out) -+ movdqu 0x50($inp),$xt1 -+ movdqu $xt2,0x20($out) -+ movdqu 0x60($inp),$xt2 -+ movdqu $xt3,0x30($out) -+ movdqu 0x70($inp),$xt3 -+ pxor 0x10(%rsp),$xt0 -+ pxor $xb1,$xt1 -+ pxor $xc1,$xt2 -+ pxor $xd1,$xt3 -+ movdqu $xt0,0x40($out) -+ movdqu $xt1,0x50($out) -+ movdqu $xt2,0x60($out) -+ movdqu $xt3,0x70($out) -+ je .Ldone4x -+ -+ movdqa 0x20(%rsp),$xt0 # $xaN is offloaded, remember? -+ lea 0x80($inp),$inp # inp+=64*2 -+ xor %r9,%r9 -+ movdqa $xt0,0x00(%rsp) -+ movdqa $xb2,0x10(%rsp) -+ lea 0x80($out),$out # out+=64*2 -+ movdqa $xc2,0x20(%rsp) -+ sub \$128,$len # len-=64*2 -+ movdqa $xd2,0x30(%rsp) -+ jmp .Loop_tail4x -+ -+.align 32 -+.L192_or_more4x: -+ movdqu 0x00($inp),$xt0 # xor with input -+ movdqu 0x10($inp),$xt1 -+ movdqu 0x20($inp),$xt2 -+ movdqu 0x30($inp),$xt3 -+ pxor 0x00(%rsp),$xt0 # $xaN is offloaded, remember? -+ pxor $xb0,$xt1 -+ pxor $xc0,$xt2 -+ pxor $xd0,$xt3 -+ -+ movdqu $xt0,0x00($out) -+ movdqu 0x40($inp),$xt0 -+ movdqu $xt1,0x10($out) -+ movdqu 0x50($inp),$xt1 -+ movdqu $xt2,0x20($out) -+ movdqu 0x60($inp),$xt2 -+ movdqu $xt3,0x30($out) -+ movdqu 0x70($inp),$xt3 -+ lea 0x80($inp),$inp # size optimization -+ pxor 0x10(%rsp),$xt0 -+ pxor $xb1,$xt1 -+ pxor $xc1,$xt2 -+ pxor $xd1,$xt3 -+ -+ movdqu $xt0,0x40($out) -+ movdqu 0x00($inp),$xt0 -+ movdqu $xt1,0x50($out) -+ movdqu 0x10($inp),$xt1 -+ movdqu $xt2,0x60($out) -+ movdqu 0x20($inp),$xt2 -+ movdqu $xt3,0x70($out) -+ lea 0x80($out),$out # size optimization -+ movdqu 0x30($inp),$xt3 -+ pxor 0x20(%rsp),$xt0 -+ pxor $xb2,$xt1 -+ pxor $xc2,$xt2 -+ pxor $xd2,$xt3 -+ movdqu $xt0,0x00($out) -+ movdqu $xt1,0x10($out) -+ movdqu $xt2,0x20($out) -+ movdqu $xt3,0x30($out) -+ je .Ldone4x -+ -+ movdqa 0x30(%rsp),$xt0 # $xaN is offloaded, remember? -+ lea 0x40($inp),$inp # inp+=64*3 -+ xor %r9,%r9 -+ movdqa $xt0,0x00(%rsp) -+ movdqa $xb3,0x10(%rsp) -+ lea 0x40($out),$out # out+=64*3 -+ movdqa $xc3,0x20(%rsp) -+ sub \$192,$len # len-=64*3 -+ movdqa $xd3,0x30(%rsp) -+ -+.Loop_tail4x: -+ movzb ($inp,%r9),%eax -+ movzb (%rsp,%r9),%ecx -+ lea 1(%r9),%r9 -+ xor %ecx,%eax -+ mov %al,-1($out,%r9) -+ dec $len -+ jnz .Loop_tail4x -+ -+.Ldone4x: -+___ -+$code.=<<___ if ($win64); -+ movaps -0xb0(%r10),%xmm6 -+ movaps -0xa0(%r10),%xmm7 -+ movaps -0x90(%r10),%xmm8 -+ movaps -0x80(%r10),%xmm9 -+ movaps -0x70(%r10),%xmm10 -+ movaps -0x60(%r10),%xmm11 -+ movaps -0x50(%r10),%xmm12 -+ movaps -0x40(%r10),%xmm13 -+ movaps -0x30(%r10),%xmm14 -+ movaps -0x20(%r10),%xmm15 -+___ -+$code.=<<___; -+ lea -8(%r10),%rsp -+.cfi_def_cfa_register %rsp -+.L4x_epilogue: -+ ret -+.cfi_endproc -+.size chacha20_4x,.-chacha20_4x -+___ -+} -+if($kernel) { -+ $code .= "#endif\n"; -+} -+ -+######################################################################## -+# XOP code path that handles all lengths. -+if ($avx && !$kernel) { -+# There is some "anomaly" observed depending on instructions' size or -+# alignment. If you look closely at below code you'll notice that -+# sometimes argument order varies. The order affects instruction -+# encoding by making it larger, and such fiddling gives 5% performance -+# improvement. This is on FX-4100... -+ -+my ($xb0,$xb1,$xb2,$xb3, $xd0,$xd1,$xd2,$xd3, -+ $xa0,$xa1,$xa2,$xa3, $xt0,$xt1,$xt2,$xt3)=map("%xmm$_",(0..15)); -+my @xx=($xa0,$xa1,$xa2,$xa3, $xb0,$xb1,$xb2,$xb3, -+ $xt0,$xt1,$xt2,$xt3, $xd0,$xd1,$xd2,$xd3); -+ -+sub XOP_lane_ROUND { -+my ($a0,$b0,$c0,$d0)=@_; -+my ($a1,$b1,$c1,$d1)=map(($_&~3)+(($_+1)&3),($a0,$b0,$c0,$d0)); -+my ($a2,$b2,$c2,$d2)=map(($_&~3)+(($_+1)&3),($a1,$b1,$c1,$d1)); -+my ($a3,$b3,$c3,$d3)=map(($_&~3)+(($_+1)&3),($a2,$b2,$c2,$d2)); -+my @x=map("\"$_\"",@xx); -+ -+ ( -+ "&vpaddd (@x[$a0],@x[$a0],@x[$b0])", # Q1 -+ "&vpaddd (@x[$a1],@x[$a1],@x[$b1])", # Q2 -+ "&vpaddd (@x[$a2],@x[$a2],@x[$b2])", # Q3 -+ "&vpaddd (@x[$a3],@x[$a3],@x[$b3])", # Q4 -+ "&vpxor (@x[$d0],@x[$a0],@x[$d0])", -+ "&vpxor (@x[$d1],@x[$a1],@x[$d1])", -+ "&vpxor (@x[$d2],@x[$a2],@x[$d2])", -+ "&vpxor (@x[$d3],@x[$a3],@x[$d3])", -+ "&vprotd (@x[$d0],@x[$d0],16)", -+ "&vprotd (@x[$d1],@x[$d1],16)", -+ "&vprotd (@x[$d2],@x[$d2],16)", -+ "&vprotd (@x[$d3],@x[$d3],16)", -+ -+ "&vpaddd (@x[$c0],@x[$c0],@x[$d0])", -+ "&vpaddd (@x[$c1],@x[$c1],@x[$d1])", -+ "&vpaddd (@x[$c2],@x[$c2],@x[$d2])", -+ "&vpaddd (@x[$c3],@x[$c3],@x[$d3])", -+ "&vpxor (@x[$b0],@x[$c0],@x[$b0])", -+ "&vpxor (@x[$b1],@x[$c1],@x[$b1])", -+ "&vpxor (@x[$b2],@x[$b2],@x[$c2])", # flip -+ "&vpxor (@x[$b3],@x[$b3],@x[$c3])", # flip -+ "&vprotd (@x[$b0],@x[$b0],12)", -+ "&vprotd (@x[$b1],@x[$b1],12)", -+ "&vprotd (@x[$b2],@x[$b2],12)", -+ "&vprotd (@x[$b3],@x[$b3],12)", -+ -+ "&vpaddd (@x[$a0],@x[$b0],@x[$a0])", # flip -+ "&vpaddd (@x[$a1],@x[$b1],@x[$a1])", # flip -+ "&vpaddd (@x[$a2],@x[$a2],@x[$b2])", -+ "&vpaddd (@x[$a3],@x[$a3],@x[$b3])", -+ "&vpxor (@x[$d0],@x[$a0],@x[$d0])", -+ "&vpxor (@x[$d1],@x[$a1],@x[$d1])", -+ "&vpxor (@x[$d2],@x[$a2],@x[$d2])", -+ "&vpxor (@x[$d3],@x[$a3],@x[$d3])", -+ "&vprotd (@x[$d0],@x[$d0],8)", -+ "&vprotd (@x[$d1],@x[$d1],8)", -+ "&vprotd (@x[$d2],@x[$d2],8)", -+ "&vprotd (@x[$d3],@x[$d3],8)", -+ -+ "&vpaddd (@x[$c0],@x[$c0],@x[$d0])", -+ "&vpaddd (@x[$c1],@x[$c1],@x[$d1])", -+ "&vpaddd (@x[$c2],@x[$c2],@x[$d2])", -+ "&vpaddd (@x[$c3],@x[$c3],@x[$d3])", -+ "&vpxor (@x[$b0],@x[$c0],@x[$b0])", -+ "&vpxor (@x[$b1],@x[$c1],@x[$b1])", -+ "&vpxor (@x[$b2],@x[$b2],@x[$c2])", # flip -+ "&vpxor (@x[$b3],@x[$b3],@x[$c3])", # flip -+ "&vprotd (@x[$b0],@x[$b0],7)", -+ "&vprotd (@x[$b1],@x[$b1],7)", -+ "&vprotd (@x[$b2],@x[$b2],7)", -+ "&vprotd (@x[$b3],@x[$b3],7)" -+ ); -+} -+ -+my $xframe = $win64 ? 0xa8 : 8; -+ -+&declare_function("chacha20_xop", 32, 5); -+$code.=<<___; -+.cfi_startproc -+.Lchacha20_4xop: -+ lea 8(%rsp),%r10 # frame pointer -+.cfi_def_cfa_register %r10 -+ sub \$0x140+$xframe,%rsp -+ and \$-16,%rsp -+___ -+ ################ stack layout -+ # +0x00 SIMD equivalent of @x[8-12] -+ # ... -+ # +0x40 constant copy of key[0-2] smashed by lanes -+ # ... -+ # +0x100 SIMD counters (with nonce smashed by lanes) -+ # ... -+ # +0x140 -+$code.=<<___ if ($win64); -+ movaps %xmm6,-0xb0(%r10) -+ movaps %xmm7,-0xa0(%r10) -+ movaps %xmm8,-0x90(%r10) -+ movaps %xmm9,-0x80(%r10) -+ movaps %xmm10,-0x70(%r10) -+ movaps %xmm11,-0x60(%r10) -+ movaps %xmm12,-0x50(%r10) -+ movaps %xmm13,-0x40(%r10) -+ movaps %xmm14,-0x30(%r10) -+ movaps %xmm15,-0x20(%r10) -+.L4xop_body: -+___ -+$code.=<<___; -+ vzeroupper -+ -+ vmovdqa .Lsigma(%rip),$xa3 # key[0] -+ vmovdqu ($key),$xb3 # key[1] -+ vmovdqu 16($key),$xt3 # key[2] -+ vmovdqu ($counter),$xd3 # key[3] -+ lea 0x100(%rsp),%rcx # size optimization -+ -+ vpshufd \$0x00,$xa3,$xa0 # smash key by lanes... -+ vpshufd \$0x55,$xa3,$xa1 -+ vmovdqa $xa0,0x40(%rsp) # ... and offload -+ vpshufd \$0xaa,$xa3,$xa2 -+ vmovdqa $xa1,0x50(%rsp) -+ vpshufd \$0xff,$xa3,$xa3 -+ vmovdqa $xa2,0x60(%rsp) -+ vmovdqa $xa3,0x70(%rsp) -+ -+ vpshufd \$0x00,$xb3,$xb0 -+ vpshufd \$0x55,$xb3,$xb1 -+ vmovdqa $xb0,0x80-0x100(%rcx) -+ vpshufd \$0xaa,$xb3,$xb2 -+ vmovdqa $xb1,0x90-0x100(%rcx) -+ vpshufd \$0xff,$xb3,$xb3 -+ vmovdqa $xb2,0xa0-0x100(%rcx) -+ vmovdqa $xb3,0xb0-0x100(%rcx) -+ -+ vpshufd \$0x00,$xt3,$xt0 # "$xc0" -+ vpshufd \$0x55,$xt3,$xt1 # "$xc1" -+ vmovdqa $xt0,0xc0-0x100(%rcx) -+ vpshufd \$0xaa,$xt3,$xt2 # "$xc2" -+ vmovdqa $xt1,0xd0-0x100(%rcx) -+ vpshufd \$0xff,$xt3,$xt3 # "$xc3" -+ vmovdqa $xt2,0xe0-0x100(%rcx) -+ vmovdqa $xt3,0xf0-0x100(%rcx) -+ -+ vpshufd \$0x00,$xd3,$xd0 -+ vpshufd \$0x55,$xd3,$xd1 -+ vpaddd .Linc(%rip),$xd0,$xd0 # don't save counters yet -+ vpshufd \$0xaa,$xd3,$xd2 -+ vmovdqa $xd1,0x110-0x100(%rcx) -+ vpshufd \$0xff,$xd3,$xd3 -+ vmovdqa $xd2,0x120-0x100(%rcx) -+ vmovdqa $xd3,0x130-0x100(%rcx) -+ -+ jmp .Loop_enter4xop -+ -+.align 32 -+.Loop_outer4xop: -+ vmovdqa 0x40(%rsp),$xa0 # re-load smashed key -+ vmovdqa 0x50(%rsp),$xa1 -+ vmovdqa 0x60(%rsp),$xa2 -+ vmovdqa 0x70(%rsp),$xa3 -+ vmovdqa 0x80-0x100(%rcx),$xb0 -+ vmovdqa 0x90-0x100(%rcx),$xb1 -+ vmovdqa 0xa0-0x100(%rcx),$xb2 -+ vmovdqa 0xb0-0x100(%rcx),$xb3 -+ vmovdqa 0xc0-0x100(%rcx),$xt0 # "$xc0" -+ vmovdqa 0xd0-0x100(%rcx),$xt1 # "$xc1" -+ vmovdqa 0xe0-0x100(%rcx),$xt2 # "$xc2" -+ vmovdqa 0xf0-0x100(%rcx),$xt3 # "$xc3" -+ vmovdqa 0x100-0x100(%rcx),$xd0 -+ vmovdqa 0x110-0x100(%rcx),$xd1 -+ vmovdqa 0x120-0x100(%rcx),$xd2 -+ vmovdqa 0x130-0x100(%rcx),$xd3 -+ vpaddd .Lfour(%rip),$xd0,$xd0 # next SIMD counters -+ -+.Loop_enter4xop: -+ mov \$10,%eax -+ vmovdqa $xd0,0x100-0x100(%rcx) # save SIMD counters -+ jmp .Loop4xop -+ -+.align 32 -+.Loop4xop: -+___ -+ foreach (&XOP_lane_ROUND(0, 4, 8,12)) { eval; } -+ foreach (&XOP_lane_ROUND(0, 5,10,15)) { eval; } -+$code.=<<___; -+ dec %eax -+ jnz .Loop4xop -+ -+ vpaddd 0x40(%rsp),$xa0,$xa0 # accumulate key material -+ vpaddd 0x50(%rsp),$xa1,$xa1 -+ vpaddd 0x60(%rsp),$xa2,$xa2 -+ vpaddd 0x70(%rsp),$xa3,$xa3 -+ -+ vmovdqa $xt2,0x20(%rsp) # offload $xc2,3 -+ vmovdqa $xt3,0x30(%rsp) -+ -+ vpunpckldq $xa1,$xa0,$xt2 # "de-interlace" data -+ vpunpckldq $xa3,$xa2,$xt3 -+ vpunpckhdq $xa1,$xa0,$xa0 -+ vpunpckhdq $xa3,$xa2,$xa2 -+ vpunpcklqdq $xt3,$xt2,$xa1 # "a0" -+ vpunpckhqdq $xt3,$xt2,$xt2 # "a1" -+ vpunpcklqdq $xa2,$xa0,$xa3 # "a2" -+ vpunpckhqdq $xa2,$xa0,$xa0 # "a3" -+___ -+ ($xa0,$xa1,$xa2,$xa3,$xt2)=($xa1,$xt2,$xa3,$xa0,$xa2); -+$code.=<<___; -+ vpaddd 0x80-0x100(%rcx),$xb0,$xb0 -+ vpaddd 0x90-0x100(%rcx),$xb1,$xb1 -+ vpaddd 0xa0-0x100(%rcx),$xb2,$xb2 -+ vpaddd 0xb0-0x100(%rcx),$xb3,$xb3 -+ -+ vmovdqa $xa0,0x00(%rsp) # offload $xa0,1 -+ vmovdqa $xa1,0x10(%rsp) -+ vmovdqa 0x20(%rsp),$xa0 # "xc2" -+ vmovdqa 0x30(%rsp),$xa1 # "xc3" -+ -+ vpunpckldq $xb1,$xb0,$xt2 -+ vpunpckldq $xb3,$xb2,$xt3 -+ vpunpckhdq $xb1,$xb0,$xb0 -+ vpunpckhdq $xb3,$xb2,$xb2 -+ vpunpcklqdq $xt3,$xt2,$xb1 # "b0" -+ vpunpckhqdq $xt3,$xt2,$xt2 # "b1" -+ vpunpcklqdq $xb2,$xb0,$xb3 # "b2" -+ vpunpckhqdq $xb2,$xb0,$xb0 # "b3" -+___ -+ ($xb0,$xb1,$xb2,$xb3,$xt2)=($xb1,$xt2,$xb3,$xb0,$xb2); -+ my ($xc0,$xc1,$xc2,$xc3)=($xt0,$xt1,$xa0,$xa1); -+$code.=<<___; -+ vpaddd 0xc0-0x100(%rcx),$xc0,$xc0 -+ vpaddd 0xd0-0x100(%rcx),$xc1,$xc1 -+ vpaddd 0xe0-0x100(%rcx),$xc2,$xc2 -+ vpaddd 0xf0-0x100(%rcx),$xc3,$xc3 -+ -+ vpunpckldq $xc1,$xc0,$xt2 -+ vpunpckldq $xc3,$xc2,$xt3 -+ vpunpckhdq $xc1,$xc0,$xc0 -+ vpunpckhdq $xc3,$xc2,$xc2 -+ vpunpcklqdq $xt3,$xt2,$xc1 # "c0" -+ vpunpckhqdq $xt3,$xt2,$xt2 # "c1" -+ vpunpcklqdq $xc2,$xc0,$xc3 # "c2" -+ vpunpckhqdq $xc2,$xc0,$xc0 # "c3" -+___ -+ ($xc0,$xc1,$xc2,$xc3,$xt2)=($xc1,$xt2,$xc3,$xc0,$xc2); -+$code.=<<___; -+ vpaddd 0x100-0x100(%rcx),$xd0,$xd0 -+ vpaddd 0x110-0x100(%rcx),$xd1,$xd1 -+ vpaddd 0x120-0x100(%rcx),$xd2,$xd2 -+ vpaddd 0x130-0x100(%rcx),$xd3,$xd3 -+ -+ vpunpckldq $xd1,$xd0,$xt2 -+ vpunpckldq $xd3,$xd2,$xt3 -+ vpunpckhdq $xd1,$xd0,$xd0 -+ vpunpckhdq $xd3,$xd2,$xd2 -+ vpunpcklqdq $xt3,$xt2,$xd1 # "d0" -+ vpunpckhqdq $xt3,$xt2,$xt2 # "d1" -+ vpunpcklqdq $xd2,$xd0,$xd3 # "d2" -+ vpunpckhqdq $xd2,$xd0,$xd0 # "d3" -+___ -+ ($xd0,$xd1,$xd2,$xd3,$xt2)=($xd1,$xt2,$xd3,$xd0,$xd2); -+ ($xa0,$xa1)=($xt2,$xt3); -+$code.=<<___; -+ vmovdqa 0x00(%rsp),$xa0 # restore $xa0,1 -+ vmovdqa 0x10(%rsp),$xa1 -+ -+ cmp \$64*4,$len -+ jb .Ltail4xop -+ -+ vpxor 0x00($inp),$xa0,$xa0 # xor with input -+ vpxor 0x10($inp),$xb0,$xb0 -+ vpxor 0x20($inp),$xc0,$xc0 -+ vpxor 0x30($inp),$xd0,$xd0 -+ vpxor 0x40($inp),$xa1,$xa1 -+ vpxor 0x50($inp),$xb1,$xb1 -+ vpxor 0x60($inp),$xc1,$xc1 -+ vpxor 0x70($inp),$xd1,$xd1 -+ lea 0x80($inp),$inp # size optimization -+ vpxor 0x00($inp),$xa2,$xa2 -+ vpxor 0x10($inp),$xb2,$xb2 -+ vpxor 0x20($inp),$xc2,$xc2 -+ vpxor 0x30($inp),$xd2,$xd2 -+ vpxor 0x40($inp),$xa3,$xa3 -+ vpxor 0x50($inp),$xb3,$xb3 -+ vpxor 0x60($inp),$xc3,$xc3 -+ vpxor 0x70($inp),$xd3,$xd3 -+ lea 0x80($inp),$inp # inp+=64*4 -+ -+ vmovdqu $xa0,0x00($out) -+ vmovdqu $xb0,0x10($out) -+ vmovdqu $xc0,0x20($out) -+ vmovdqu $xd0,0x30($out) -+ vmovdqu $xa1,0x40($out) -+ vmovdqu $xb1,0x50($out) -+ vmovdqu $xc1,0x60($out) -+ vmovdqu $xd1,0x70($out) -+ lea 0x80($out),$out # size optimization -+ vmovdqu $xa2,0x00($out) -+ vmovdqu $xb2,0x10($out) -+ vmovdqu $xc2,0x20($out) -+ vmovdqu $xd2,0x30($out) -+ vmovdqu $xa3,0x40($out) -+ vmovdqu $xb3,0x50($out) -+ vmovdqu $xc3,0x60($out) -+ vmovdqu $xd3,0x70($out) -+ lea 0x80($out),$out # out+=64*4 -+ -+ sub \$64*4,$len -+ jnz .Loop_outer4xop -+ -+ jmp .Ldone4xop -+ -+.align 32 -+.Ltail4xop: -+ cmp \$192,$len -+ jae .L192_or_more4xop -+ cmp \$128,$len -+ jae .L128_or_more4xop -+ cmp \$64,$len -+ jae .L64_or_more4xop -+ -+ xor %r9,%r9 -+ vmovdqa $xa0,0x00(%rsp) -+ vmovdqa $xb0,0x10(%rsp) -+ vmovdqa $xc0,0x20(%rsp) -+ vmovdqa $xd0,0x30(%rsp) -+ jmp .Loop_tail4xop -+ -+.align 32 -+.L64_or_more4xop: -+ vpxor 0x00($inp),$xa0,$xa0 # xor with input -+ vpxor 0x10($inp),$xb0,$xb0 -+ vpxor 0x20($inp),$xc0,$xc0 -+ vpxor 0x30($inp),$xd0,$xd0 -+ vmovdqu $xa0,0x00($out) -+ vmovdqu $xb0,0x10($out) -+ vmovdqu $xc0,0x20($out) -+ vmovdqu $xd0,0x30($out) -+ je .Ldone4xop -+ -+ lea 0x40($inp),$inp # inp+=64*1 -+ vmovdqa $xa1,0x00(%rsp) -+ xor %r9,%r9 -+ vmovdqa $xb1,0x10(%rsp) -+ lea 0x40($out),$out # out+=64*1 -+ vmovdqa $xc1,0x20(%rsp) -+ sub \$64,$len # len-=64*1 -+ vmovdqa $xd1,0x30(%rsp) -+ jmp .Loop_tail4xop -+ -+.align 32 -+.L128_or_more4xop: -+ vpxor 0x00($inp),$xa0,$xa0 # xor with input -+ vpxor 0x10($inp),$xb0,$xb0 -+ vpxor 0x20($inp),$xc0,$xc0 -+ vpxor 0x30($inp),$xd0,$xd0 -+ vpxor 0x40($inp),$xa1,$xa1 -+ vpxor 0x50($inp),$xb1,$xb1 -+ vpxor 0x60($inp),$xc1,$xc1 -+ vpxor 0x70($inp),$xd1,$xd1 -+ -+ vmovdqu $xa0,0x00($out) -+ vmovdqu $xb0,0x10($out) -+ vmovdqu $xc0,0x20($out) -+ vmovdqu $xd0,0x30($out) -+ vmovdqu $xa1,0x40($out) -+ vmovdqu $xb1,0x50($out) -+ vmovdqu $xc1,0x60($out) -+ vmovdqu $xd1,0x70($out) -+ je .Ldone4xop -+ -+ lea 0x80($inp),$inp # inp+=64*2 -+ vmovdqa $xa2,0x00(%rsp) -+ xor %r9,%r9 -+ vmovdqa $xb2,0x10(%rsp) -+ lea 0x80($out),$out # out+=64*2 -+ vmovdqa $xc2,0x20(%rsp) -+ sub \$128,$len # len-=64*2 -+ vmovdqa $xd2,0x30(%rsp) -+ jmp .Loop_tail4xop -+ -+.align 32 -+.L192_or_more4xop: -+ vpxor 0x00($inp),$xa0,$xa0 # xor with input -+ vpxor 0x10($inp),$xb0,$xb0 -+ vpxor 0x20($inp),$xc0,$xc0 -+ vpxor 0x30($inp),$xd0,$xd0 -+ vpxor 0x40($inp),$xa1,$xa1 -+ vpxor 0x50($inp),$xb1,$xb1 -+ vpxor 0x60($inp),$xc1,$xc1 -+ vpxor 0x70($inp),$xd1,$xd1 -+ lea 0x80($inp),$inp # size optimization -+ vpxor 0x00($inp),$xa2,$xa2 -+ vpxor 0x10($inp),$xb2,$xb2 -+ vpxor 0x20($inp),$xc2,$xc2 -+ vpxor 0x30($inp),$xd2,$xd2 -+ -+ vmovdqu $xa0,0x00($out) -+ vmovdqu $xb0,0x10($out) -+ vmovdqu $xc0,0x20($out) -+ vmovdqu $xd0,0x30($out) -+ vmovdqu $xa1,0x40($out) -+ vmovdqu $xb1,0x50($out) -+ vmovdqu $xc1,0x60($out) -+ vmovdqu $xd1,0x70($out) -+ lea 0x80($out),$out # size optimization -+ vmovdqu $xa2,0x00($out) -+ vmovdqu $xb2,0x10($out) -+ vmovdqu $xc2,0x20($out) -+ vmovdqu $xd2,0x30($out) -+ je .Ldone4xop -+ -+ lea 0x40($inp),$inp # inp+=64*3 -+ vmovdqa $xa3,0x00(%rsp) -+ xor %r9,%r9 -+ vmovdqa $xb3,0x10(%rsp) -+ lea 0x40($out),$out # out+=64*3 -+ vmovdqa $xc3,0x20(%rsp) -+ sub \$192,$len # len-=64*3 -+ vmovdqa $xd3,0x30(%rsp) -+ -+.Loop_tail4xop: -+ movzb ($inp,%r9),%eax -+ movzb (%rsp,%r9),%ecx -+ lea 1(%r9),%r9 -+ xor %ecx,%eax -+ mov %al,-1($out,%r9) -+ dec $len -+ jnz .Loop_tail4xop -+ -+.Ldone4xop: -+ vzeroupper -+___ -+$code.=<<___ if ($win64); -+ movaps -0xb0(%r10),%xmm6 -+ movaps -0xa0(%r10),%xmm7 -+ movaps -0x90(%r10),%xmm8 -+ movaps -0x80(%r10),%xmm9 -+ movaps -0x70(%r10),%xmm10 -+ movaps -0x60(%r10),%xmm11 -+ movaps -0x50(%r10),%xmm12 -+ movaps -0x40(%r10),%xmm13 -+ movaps -0x30(%r10),%xmm14 -+ movaps -0x20(%r10),%xmm15 -+___ -+$code.=<<___; -+ lea -8(%r10),%rsp -+.cfi_def_cfa_register %rsp -+.L4xop_epilogue: -+ ret -+.cfi_endproc -+___ -+&end_function("chacha20_xop"); -+} -+ -+######################################################################## -+# AVX2 code path -+if ($avx>1) { -+ -+if($kernel) { -+ $code .= "#ifdef CONFIG_AS_AVX2\n"; -+} -+ -+my ($xb0,$xb1,$xb2,$xb3, $xd0,$xd1,$xd2,$xd3, -+ $xa0,$xa1,$xa2,$xa3, $xt0,$xt1,$xt2,$xt3)=map("%ymm$_",(0..15)); -+my @xx=($xa0,$xa1,$xa2,$xa3, $xb0,$xb1,$xb2,$xb3, -+ "%nox","%nox","%nox","%nox", $xd0,$xd1,$xd2,$xd3); -+ -+sub AVX2_lane_ROUND { -+my ($a0,$b0,$c0,$d0)=@_; -+my ($a1,$b1,$c1,$d1)=map(($_&~3)+(($_+1)&3),($a0,$b0,$c0,$d0)); -+my ($a2,$b2,$c2,$d2)=map(($_&~3)+(($_+1)&3),($a1,$b1,$c1,$d1)); -+my ($a3,$b3,$c3,$d3)=map(($_&~3)+(($_+1)&3),($a2,$b2,$c2,$d2)); -+my ($xc,$xc_,$t0,$t1)=map("\"$_\"",$xt0,$xt1,$xt2,$xt3); -+my @x=map("\"$_\"",@xx); -+ -+ # Consider order in which variables are addressed by their -+ # index: -+ # -+ # a b c d -+ # -+ # 0 4 8 12 < even round -+ # 1 5 9 13 -+ # 2 6 10 14 -+ # 3 7 11 15 -+ # 0 5 10 15 < odd round -+ # 1 6 11 12 -+ # 2 7 8 13 -+ # 3 4 9 14 -+ # -+ # 'a', 'b' and 'd's are permanently allocated in registers, -+ # @x[0..7,12..15], while 'c's are maintained in memory. If -+ # you observe 'c' column, you'll notice that pair of 'c's is -+ # invariant between rounds. This means that we have to reload -+ # them once per round, in the middle. This is why you'll see -+ # bunch of 'c' stores and loads in the middle, but none in -+ # the beginning or end. -+ -+ ( -+ "&vpaddd (@x[$a0],@x[$a0],@x[$b0])", # Q1 -+ "&vpxor (@x[$d0],@x[$a0],@x[$d0])", -+ "&vpshufb (@x[$d0],@x[$d0],$t1)", -+ "&vpaddd (@x[$a1],@x[$a1],@x[$b1])", # Q2 -+ "&vpxor (@x[$d1],@x[$a1],@x[$d1])", -+ "&vpshufb (@x[$d1],@x[$d1],$t1)", -+ -+ "&vpaddd ($xc,$xc,@x[$d0])", -+ "&vpxor (@x[$b0],$xc,@x[$b0])", -+ "&vpslld ($t0,@x[$b0],12)", -+ "&vpsrld (@x[$b0],@x[$b0],20)", -+ "&vpor (@x[$b0],$t0,@x[$b0])", -+ "&vbroadcasti128($t0,'(%r11)')", # .Lrot24(%rip) -+ "&vpaddd ($xc_,$xc_,@x[$d1])", -+ "&vpxor (@x[$b1],$xc_,@x[$b1])", -+ "&vpslld ($t1,@x[$b1],12)", -+ "&vpsrld (@x[$b1],@x[$b1],20)", -+ "&vpor (@x[$b1],$t1,@x[$b1])", -+ -+ "&vpaddd (@x[$a0],@x[$a0],@x[$b0])", -+ "&vpxor (@x[$d0],@x[$a0],@x[$d0])", -+ "&vpshufb (@x[$d0],@x[$d0],$t0)", -+ "&vpaddd (@x[$a1],@x[$a1],@x[$b1])", -+ "&vpxor (@x[$d1],@x[$a1],@x[$d1])", -+ "&vpshufb (@x[$d1],@x[$d1],$t0)", -+ -+ "&vpaddd ($xc,$xc,@x[$d0])", -+ "&vpxor (@x[$b0],$xc,@x[$b0])", -+ "&vpslld ($t1,@x[$b0],7)", -+ "&vpsrld (@x[$b0],@x[$b0],25)", -+ "&vpor (@x[$b0],$t1,@x[$b0])", -+ "&vbroadcasti128($t1,'(%r9)')", # .Lrot16(%rip) -+ "&vpaddd ($xc_,$xc_,@x[$d1])", -+ "&vpxor (@x[$b1],$xc_,@x[$b1])", -+ "&vpslld ($t0,@x[$b1],7)", -+ "&vpsrld (@x[$b1],@x[$b1],25)", -+ "&vpor (@x[$b1],$t0,@x[$b1])", -+ -+ "&vmovdqa (\"`32*($c0-8)`(%rsp)\",$xc)", # reload pair of 'c's -+ "&vmovdqa (\"`32*($c1-8)`(%rsp)\",$xc_)", -+ "&vmovdqa ($xc,\"`32*($c2-8)`(%rsp)\")", -+ "&vmovdqa ($xc_,\"`32*($c3-8)`(%rsp)\")", -+ -+ "&vpaddd (@x[$a2],@x[$a2],@x[$b2])", # Q3 -+ "&vpxor (@x[$d2],@x[$a2],@x[$d2])", -+ "&vpshufb (@x[$d2],@x[$d2],$t1)", -+ "&vpaddd (@x[$a3],@x[$a3],@x[$b3])", # Q4 -+ "&vpxor (@x[$d3],@x[$a3],@x[$d3])", -+ "&vpshufb (@x[$d3],@x[$d3],$t1)", -+ -+ "&vpaddd ($xc,$xc,@x[$d2])", -+ "&vpxor (@x[$b2],$xc,@x[$b2])", -+ "&vpslld ($t0,@x[$b2],12)", -+ "&vpsrld (@x[$b2],@x[$b2],20)", -+ "&vpor (@x[$b2],$t0,@x[$b2])", -+ "&vbroadcasti128($t0,'(%r11)')", # .Lrot24(%rip) -+ "&vpaddd ($xc_,$xc_,@x[$d3])", -+ "&vpxor (@x[$b3],$xc_,@x[$b3])", -+ "&vpslld ($t1,@x[$b3],12)", -+ "&vpsrld (@x[$b3],@x[$b3],20)", -+ "&vpor (@x[$b3],$t1,@x[$b3])", -+ -+ "&vpaddd (@x[$a2],@x[$a2],@x[$b2])", -+ "&vpxor (@x[$d2],@x[$a2],@x[$d2])", -+ "&vpshufb (@x[$d2],@x[$d2],$t0)", -+ "&vpaddd (@x[$a3],@x[$a3],@x[$b3])", -+ "&vpxor (@x[$d3],@x[$a3],@x[$d3])", -+ "&vpshufb (@x[$d3],@x[$d3],$t0)", -+ -+ "&vpaddd ($xc,$xc,@x[$d2])", -+ "&vpxor (@x[$b2],$xc,@x[$b2])", -+ "&vpslld ($t1,@x[$b2],7)", -+ "&vpsrld (@x[$b2],@x[$b2],25)", -+ "&vpor (@x[$b2],$t1,@x[$b2])", -+ "&vbroadcasti128($t1,'(%r9)')", # .Lrot16(%rip) -+ "&vpaddd ($xc_,$xc_,@x[$d3])", -+ "&vpxor (@x[$b3],$xc_,@x[$b3])", -+ "&vpslld ($t0,@x[$b3],7)", -+ "&vpsrld (@x[$b3],@x[$b3],25)", -+ "&vpor (@x[$b3],$t0,@x[$b3])" -+ ); -+} -+ -+my $xframe = $win64 ? 0xa8 : 8; -+ -+&declare_function("chacha20_avx2", 32, 5); -+$code.=<<___; -+.cfi_startproc -+.Lchacha20_8x: -+ lea 8(%rsp),%r10 # frame register -+.cfi_def_cfa_register %r10 -+ sub \$0x280+$xframe,%rsp -+ and \$-32,%rsp -+___ -+$code.=<<___ if ($win64); -+ movaps %xmm6,-0xb0(%r10) -+ movaps %xmm7,-0xa0(%r10) -+ movaps %xmm8,-0x90(%r10) -+ movaps %xmm9,-0x80(%r10) -+ movaps %xmm10,-0x70(%r10) -+ movaps %xmm11,-0x60(%r10) -+ movaps %xmm12,-0x50(%r10) -+ movaps %xmm13,-0x40(%r10) -+ movaps %xmm14,-0x30(%r10) -+ movaps %xmm15,-0x20(%r10) -+.L8x_body: -+___ -+$code.=<<___; -+ vzeroupper -+ -+ ################ stack layout -+ # +0x00 SIMD equivalent of @x[8-12] -+ # ... -+ # +0x80 constant copy of key[0-2] smashed by lanes -+ # ... -+ # +0x200 SIMD counters (with nonce smashed by lanes) -+ # ... -+ # +0x280 -+ -+ vbroadcasti128 .Lsigma(%rip),$xa3 # key[0] -+ vbroadcasti128 ($key),$xb3 # key[1] -+ vbroadcasti128 16($key),$xt3 # key[2] -+ vbroadcasti128 ($counter),$xd3 # key[3] -+ lea 0x100(%rsp),%rcx # size optimization -+ lea 0x200(%rsp),%rax # size optimization -+ lea .Lrot16(%rip),%r9 -+ lea .Lrot24(%rip),%r11 -+ -+ vpshufd \$0x00,$xa3,$xa0 # smash key by lanes... -+ vpshufd \$0x55,$xa3,$xa1 -+ vmovdqa $xa0,0x80-0x100(%rcx) # ... and offload -+ vpshufd \$0xaa,$xa3,$xa2 -+ vmovdqa $xa1,0xa0-0x100(%rcx) -+ vpshufd \$0xff,$xa3,$xa3 -+ vmovdqa $xa2,0xc0-0x100(%rcx) -+ vmovdqa $xa3,0xe0-0x100(%rcx) -+ -+ vpshufd \$0x00,$xb3,$xb0 -+ vpshufd \$0x55,$xb3,$xb1 -+ vmovdqa $xb0,0x100-0x100(%rcx) -+ vpshufd \$0xaa,$xb3,$xb2 -+ vmovdqa $xb1,0x120-0x100(%rcx) -+ vpshufd \$0xff,$xb3,$xb3 -+ vmovdqa $xb2,0x140-0x100(%rcx) -+ vmovdqa $xb3,0x160-0x100(%rcx) -+ -+ vpshufd \$0x00,$xt3,$xt0 # "xc0" -+ vpshufd \$0x55,$xt3,$xt1 # "xc1" -+ vmovdqa $xt0,0x180-0x200(%rax) -+ vpshufd \$0xaa,$xt3,$xt2 # "xc2" -+ vmovdqa $xt1,0x1a0-0x200(%rax) -+ vpshufd \$0xff,$xt3,$xt3 # "xc3" -+ vmovdqa $xt2,0x1c0-0x200(%rax) -+ vmovdqa $xt3,0x1e0-0x200(%rax) -+ -+ vpshufd \$0x00,$xd3,$xd0 -+ vpshufd \$0x55,$xd3,$xd1 -+ vpaddd .Lincy(%rip),$xd0,$xd0 # don't save counters yet -+ vpshufd \$0xaa,$xd3,$xd2 -+ vmovdqa $xd1,0x220-0x200(%rax) -+ vpshufd \$0xff,$xd3,$xd3 -+ vmovdqa $xd2,0x240-0x200(%rax) -+ vmovdqa $xd3,0x260-0x200(%rax) -+ -+ jmp .Loop_enter8x -+ -+.align 32 -+.Loop_outer8x: -+ vmovdqa 0x80-0x100(%rcx),$xa0 # re-load smashed key -+ vmovdqa 0xa0-0x100(%rcx),$xa1 -+ vmovdqa 0xc0-0x100(%rcx),$xa2 -+ vmovdqa 0xe0-0x100(%rcx),$xa3 -+ vmovdqa 0x100-0x100(%rcx),$xb0 -+ vmovdqa 0x120-0x100(%rcx),$xb1 -+ vmovdqa 0x140-0x100(%rcx),$xb2 -+ vmovdqa 0x160-0x100(%rcx),$xb3 -+ vmovdqa 0x180-0x200(%rax),$xt0 # "xc0" -+ vmovdqa 0x1a0-0x200(%rax),$xt1 # "xc1" -+ vmovdqa 0x1c0-0x200(%rax),$xt2 # "xc2" -+ vmovdqa 0x1e0-0x200(%rax),$xt3 # "xc3" -+ vmovdqa 0x200-0x200(%rax),$xd0 -+ vmovdqa 0x220-0x200(%rax),$xd1 -+ vmovdqa 0x240-0x200(%rax),$xd2 -+ vmovdqa 0x260-0x200(%rax),$xd3 -+ vpaddd .Leight(%rip),$xd0,$xd0 # next SIMD counters -+ -+.Loop_enter8x: -+ vmovdqa $xt2,0x40(%rsp) # SIMD equivalent of "@x[10]" -+ vmovdqa $xt3,0x60(%rsp) # SIMD equivalent of "@x[11]" -+ vbroadcasti128 (%r9),$xt3 -+ vmovdqa $xd0,0x200-0x200(%rax) # save SIMD counters -+ mov \$10,%eax -+ jmp .Loop8x -+ -+.align 32 -+.Loop8x: -+___ -+ foreach (&AVX2_lane_ROUND(0, 4, 8,12)) { eval; } -+ foreach (&AVX2_lane_ROUND(0, 5,10,15)) { eval; } -+$code.=<<___; -+ dec %eax -+ jnz .Loop8x -+ -+ lea 0x200(%rsp),%rax # size optimization -+ vpaddd 0x80-0x100(%rcx),$xa0,$xa0 # accumulate key -+ vpaddd 0xa0-0x100(%rcx),$xa1,$xa1 -+ vpaddd 0xc0-0x100(%rcx),$xa2,$xa2 -+ vpaddd 0xe0-0x100(%rcx),$xa3,$xa3 -+ -+ vpunpckldq $xa1,$xa0,$xt2 # "de-interlace" data -+ vpunpckldq $xa3,$xa2,$xt3 -+ vpunpckhdq $xa1,$xa0,$xa0 -+ vpunpckhdq $xa3,$xa2,$xa2 -+ vpunpcklqdq $xt3,$xt2,$xa1 # "a0" -+ vpunpckhqdq $xt3,$xt2,$xt2 # "a1" -+ vpunpcklqdq $xa2,$xa0,$xa3 # "a2" -+ vpunpckhqdq $xa2,$xa0,$xa0 # "a3" -+___ -+ ($xa0,$xa1,$xa2,$xa3,$xt2)=($xa1,$xt2,$xa3,$xa0,$xa2); -+$code.=<<___; -+ vpaddd 0x100-0x100(%rcx),$xb0,$xb0 -+ vpaddd 0x120-0x100(%rcx),$xb1,$xb1 -+ vpaddd 0x140-0x100(%rcx),$xb2,$xb2 -+ vpaddd 0x160-0x100(%rcx),$xb3,$xb3 -+ -+ vpunpckldq $xb1,$xb0,$xt2 -+ vpunpckldq $xb3,$xb2,$xt3 -+ vpunpckhdq $xb1,$xb0,$xb0 -+ vpunpckhdq $xb3,$xb2,$xb2 -+ vpunpcklqdq $xt3,$xt2,$xb1 # "b0" -+ vpunpckhqdq $xt3,$xt2,$xt2 # "b1" -+ vpunpcklqdq $xb2,$xb0,$xb3 # "b2" -+ vpunpckhqdq $xb2,$xb0,$xb0 # "b3" -+___ -+ ($xb0,$xb1,$xb2,$xb3,$xt2)=($xb1,$xt2,$xb3,$xb0,$xb2); -+$code.=<<___; -+ vperm2i128 \$0x20,$xb0,$xa0,$xt3 # "de-interlace" further -+ vperm2i128 \$0x31,$xb0,$xa0,$xb0 -+ vperm2i128 \$0x20,$xb1,$xa1,$xa0 -+ vperm2i128 \$0x31,$xb1,$xa1,$xb1 -+ vperm2i128 \$0x20,$xb2,$xa2,$xa1 -+ vperm2i128 \$0x31,$xb2,$xa2,$xb2 -+ vperm2i128 \$0x20,$xb3,$xa3,$xa2 -+ vperm2i128 \$0x31,$xb3,$xa3,$xb3 -+___ -+ ($xa0,$xa1,$xa2,$xa3,$xt3)=($xt3,$xa0,$xa1,$xa2,$xa3); -+ my ($xc0,$xc1,$xc2,$xc3)=($xt0,$xt1,$xa0,$xa1); -+$code.=<<___; -+ vmovdqa $xa0,0x00(%rsp) # offload $xaN -+ vmovdqa $xa1,0x20(%rsp) -+ vmovdqa 0x40(%rsp),$xc2 # $xa0 -+ vmovdqa 0x60(%rsp),$xc3 # $xa1 -+ -+ vpaddd 0x180-0x200(%rax),$xc0,$xc0 -+ vpaddd 0x1a0-0x200(%rax),$xc1,$xc1 -+ vpaddd 0x1c0-0x200(%rax),$xc2,$xc2 -+ vpaddd 0x1e0-0x200(%rax),$xc3,$xc3 -+ -+ vpunpckldq $xc1,$xc0,$xt2 -+ vpunpckldq $xc3,$xc2,$xt3 -+ vpunpckhdq $xc1,$xc0,$xc0 -+ vpunpckhdq $xc3,$xc2,$xc2 -+ vpunpcklqdq $xt3,$xt2,$xc1 # "c0" -+ vpunpckhqdq $xt3,$xt2,$xt2 # "c1" -+ vpunpcklqdq $xc2,$xc0,$xc3 # "c2" -+ vpunpckhqdq $xc2,$xc0,$xc0 # "c3" -+___ -+ ($xc0,$xc1,$xc2,$xc3,$xt2)=($xc1,$xt2,$xc3,$xc0,$xc2); -+$code.=<<___; -+ vpaddd 0x200-0x200(%rax),$xd0,$xd0 -+ vpaddd 0x220-0x200(%rax),$xd1,$xd1 -+ vpaddd 0x240-0x200(%rax),$xd2,$xd2 -+ vpaddd 0x260-0x200(%rax),$xd3,$xd3 -+ -+ vpunpckldq $xd1,$xd0,$xt2 -+ vpunpckldq $xd3,$xd2,$xt3 -+ vpunpckhdq $xd1,$xd0,$xd0 -+ vpunpckhdq $xd3,$xd2,$xd2 -+ vpunpcklqdq $xt3,$xt2,$xd1 # "d0" -+ vpunpckhqdq $xt3,$xt2,$xt2 # "d1" -+ vpunpcklqdq $xd2,$xd0,$xd3 # "d2" -+ vpunpckhqdq $xd2,$xd0,$xd0 # "d3" -+___ -+ ($xd0,$xd1,$xd2,$xd3,$xt2)=($xd1,$xt2,$xd3,$xd0,$xd2); -+$code.=<<___; -+ vperm2i128 \$0x20,$xd0,$xc0,$xt3 # "de-interlace" further -+ vperm2i128 \$0x31,$xd0,$xc0,$xd0 -+ vperm2i128 \$0x20,$xd1,$xc1,$xc0 -+ vperm2i128 \$0x31,$xd1,$xc1,$xd1 -+ vperm2i128 \$0x20,$xd2,$xc2,$xc1 -+ vperm2i128 \$0x31,$xd2,$xc2,$xd2 -+ vperm2i128 \$0x20,$xd3,$xc3,$xc2 -+ vperm2i128 \$0x31,$xd3,$xc3,$xd3 -+___ -+ ($xc0,$xc1,$xc2,$xc3,$xt3)=($xt3,$xc0,$xc1,$xc2,$xc3); -+ ($xb0,$xb1,$xb2,$xb3,$xc0,$xc1,$xc2,$xc3)= -+ ($xc0,$xc1,$xc2,$xc3,$xb0,$xb1,$xb2,$xb3); -+ ($xa0,$xa1)=($xt2,$xt3); -+$code.=<<___; -+ vmovdqa 0x00(%rsp),$xa0 # $xaN was offloaded, remember? -+ vmovdqa 0x20(%rsp),$xa1 -+ -+ cmp \$64*8,$len -+ jb .Ltail8x -+ -+ vpxor 0x00($inp),$xa0,$xa0 # xor with input -+ vpxor 0x20($inp),$xb0,$xb0 -+ vpxor 0x40($inp),$xc0,$xc0 -+ vpxor 0x60($inp),$xd0,$xd0 -+ lea 0x80($inp),$inp # size optimization -+ vmovdqu $xa0,0x00($out) -+ vmovdqu $xb0,0x20($out) -+ vmovdqu $xc0,0x40($out) -+ vmovdqu $xd0,0x60($out) -+ lea 0x80($out),$out # size optimization -+ -+ vpxor 0x00($inp),$xa1,$xa1 -+ vpxor 0x20($inp),$xb1,$xb1 -+ vpxor 0x40($inp),$xc1,$xc1 -+ vpxor 0x60($inp),$xd1,$xd1 -+ lea 0x80($inp),$inp # size optimization -+ vmovdqu $xa1,0x00($out) -+ vmovdqu $xb1,0x20($out) -+ vmovdqu $xc1,0x40($out) -+ vmovdqu $xd1,0x60($out) -+ lea 0x80($out),$out # size optimization -+ -+ vpxor 0x00($inp),$xa2,$xa2 -+ vpxor 0x20($inp),$xb2,$xb2 -+ vpxor 0x40($inp),$xc2,$xc2 -+ vpxor 0x60($inp),$xd2,$xd2 -+ lea 0x80($inp),$inp # size optimization -+ vmovdqu $xa2,0x00($out) -+ vmovdqu $xb2,0x20($out) -+ vmovdqu $xc2,0x40($out) -+ vmovdqu $xd2,0x60($out) -+ lea 0x80($out),$out # size optimization -+ -+ vpxor 0x00($inp),$xa3,$xa3 -+ vpxor 0x20($inp),$xb3,$xb3 -+ vpxor 0x40($inp),$xc3,$xc3 -+ vpxor 0x60($inp),$xd3,$xd3 -+ lea 0x80($inp),$inp # size optimization -+ vmovdqu $xa3,0x00($out) -+ vmovdqu $xb3,0x20($out) -+ vmovdqu $xc3,0x40($out) -+ vmovdqu $xd3,0x60($out) -+ lea 0x80($out),$out # size optimization -+ -+ sub \$64*8,$len -+ jnz .Loop_outer8x -+ -+ jmp .Ldone8x -+ -+.Ltail8x: -+ cmp \$448,$len -+ jae .L448_or_more8x -+ cmp \$384,$len -+ jae .L384_or_more8x -+ cmp \$320,$len -+ jae .L320_or_more8x -+ cmp \$256,$len -+ jae .L256_or_more8x -+ cmp \$192,$len -+ jae .L192_or_more8x -+ cmp \$128,$len -+ jae .L128_or_more8x -+ cmp \$64,$len -+ jae .L64_or_more8x -+ -+ xor %r9,%r9 -+ vmovdqa $xa0,0x00(%rsp) -+ vmovdqa $xb0,0x20(%rsp) -+ jmp .Loop_tail8x -+ -+.align 32 -+.L64_or_more8x: -+ vpxor 0x00($inp),$xa0,$xa0 # xor with input -+ vpxor 0x20($inp),$xb0,$xb0 -+ vmovdqu $xa0,0x00($out) -+ vmovdqu $xb0,0x20($out) -+ je .Ldone8x -+ -+ lea 0x40($inp),$inp # inp+=64*1 -+ xor %r9,%r9 -+ vmovdqa $xc0,0x00(%rsp) -+ lea 0x40($out),$out # out+=64*1 -+ sub \$64,$len # len-=64*1 -+ vmovdqa $xd0,0x20(%rsp) -+ jmp .Loop_tail8x -+ -+.align 32 -+.L128_or_more8x: -+ vpxor 0x00($inp),$xa0,$xa0 # xor with input -+ vpxor 0x20($inp),$xb0,$xb0 -+ vpxor 0x40($inp),$xc0,$xc0 -+ vpxor 0x60($inp),$xd0,$xd0 -+ vmovdqu $xa0,0x00($out) -+ vmovdqu $xb0,0x20($out) -+ vmovdqu $xc0,0x40($out) -+ vmovdqu $xd0,0x60($out) -+ je .Ldone8x -+ -+ lea 0x80($inp),$inp # inp+=64*2 -+ xor %r9,%r9 -+ vmovdqa $xa1,0x00(%rsp) -+ lea 0x80($out),$out # out+=64*2 -+ sub \$128,$len # len-=64*2 -+ vmovdqa $xb1,0x20(%rsp) -+ jmp .Loop_tail8x -+ -+.align 32 -+.L192_or_more8x: -+ vpxor 0x00($inp),$xa0,$xa0 # xor with input -+ vpxor 0x20($inp),$xb0,$xb0 -+ vpxor 0x40($inp),$xc0,$xc0 -+ vpxor 0x60($inp),$xd0,$xd0 -+ vpxor 0x80($inp),$xa1,$xa1 -+ vpxor 0xa0($inp),$xb1,$xb1 -+ vmovdqu $xa0,0x00($out) -+ vmovdqu $xb0,0x20($out) -+ vmovdqu $xc0,0x40($out) -+ vmovdqu $xd0,0x60($out) -+ vmovdqu $xa1,0x80($out) -+ vmovdqu $xb1,0xa0($out) -+ je .Ldone8x -+ -+ lea 0xc0($inp),$inp # inp+=64*3 -+ xor %r9,%r9 -+ vmovdqa $xc1,0x00(%rsp) -+ lea 0xc0($out),$out # out+=64*3 -+ sub \$192,$len # len-=64*3 -+ vmovdqa $xd1,0x20(%rsp) -+ jmp .Loop_tail8x -+ -+.align 32 -+.L256_or_more8x: -+ vpxor 0x00($inp),$xa0,$xa0 # xor with input -+ vpxor 0x20($inp),$xb0,$xb0 -+ vpxor 0x40($inp),$xc0,$xc0 -+ vpxor 0x60($inp),$xd0,$xd0 -+ vpxor 0x80($inp),$xa1,$xa1 -+ vpxor 0xa0($inp),$xb1,$xb1 -+ vpxor 0xc0($inp),$xc1,$xc1 -+ vpxor 0xe0($inp),$xd1,$xd1 -+ vmovdqu $xa0,0x00($out) -+ vmovdqu $xb0,0x20($out) -+ vmovdqu $xc0,0x40($out) -+ vmovdqu $xd0,0x60($out) -+ vmovdqu $xa1,0x80($out) -+ vmovdqu $xb1,0xa0($out) -+ vmovdqu $xc1,0xc0($out) -+ vmovdqu $xd1,0xe0($out) -+ je .Ldone8x -+ -+ lea 0x100($inp),$inp # inp+=64*4 -+ xor %r9,%r9 -+ vmovdqa $xa2,0x00(%rsp) -+ lea 0x100($out),$out # out+=64*4 -+ sub \$256,$len # len-=64*4 -+ vmovdqa $xb2,0x20(%rsp) -+ jmp .Loop_tail8x -+ -+.align 32 -+.L320_or_more8x: -+ vpxor 0x00($inp),$xa0,$xa0 # xor with input -+ vpxor 0x20($inp),$xb0,$xb0 -+ vpxor 0x40($inp),$xc0,$xc0 -+ vpxor 0x60($inp),$xd0,$xd0 -+ vpxor 0x80($inp),$xa1,$xa1 -+ vpxor 0xa0($inp),$xb1,$xb1 -+ vpxor 0xc0($inp),$xc1,$xc1 -+ vpxor 0xe0($inp),$xd1,$xd1 -+ vpxor 0x100($inp),$xa2,$xa2 -+ vpxor 0x120($inp),$xb2,$xb2 -+ vmovdqu $xa0,0x00($out) -+ vmovdqu $xb0,0x20($out) -+ vmovdqu $xc0,0x40($out) -+ vmovdqu $xd0,0x60($out) -+ vmovdqu $xa1,0x80($out) -+ vmovdqu $xb1,0xa0($out) -+ vmovdqu $xc1,0xc0($out) -+ vmovdqu $xd1,0xe0($out) -+ vmovdqu $xa2,0x100($out) -+ vmovdqu $xb2,0x120($out) -+ je .Ldone8x -+ -+ lea 0x140($inp),$inp # inp+=64*5 -+ xor %r9,%r9 -+ vmovdqa $xc2,0x00(%rsp) -+ lea 0x140($out),$out # out+=64*5 -+ sub \$320,$len # len-=64*5 -+ vmovdqa $xd2,0x20(%rsp) -+ jmp .Loop_tail8x -+ -+.align 32 -+.L384_or_more8x: -+ vpxor 0x00($inp),$xa0,$xa0 # xor with input -+ vpxor 0x20($inp),$xb0,$xb0 -+ vpxor 0x40($inp),$xc0,$xc0 -+ vpxor 0x60($inp),$xd0,$xd0 -+ vpxor 0x80($inp),$xa1,$xa1 -+ vpxor 0xa0($inp),$xb1,$xb1 -+ vpxor 0xc0($inp),$xc1,$xc1 -+ vpxor 0xe0($inp),$xd1,$xd1 -+ vpxor 0x100($inp),$xa2,$xa2 -+ vpxor 0x120($inp),$xb2,$xb2 -+ vpxor 0x140($inp),$xc2,$xc2 -+ vpxor 0x160($inp),$xd2,$xd2 -+ vmovdqu $xa0,0x00($out) -+ vmovdqu $xb0,0x20($out) -+ vmovdqu $xc0,0x40($out) -+ vmovdqu $xd0,0x60($out) -+ vmovdqu $xa1,0x80($out) -+ vmovdqu $xb1,0xa0($out) -+ vmovdqu $xc1,0xc0($out) -+ vmovdqu $xd1,0xe0($out) -+ vmovdqu $xa2,0x100($out) -+ vmovdqu $xb2,0x120($out) -+ vmovdqu $xc2,0x140($out) -+ vmovdqu $xd2,0x160($out) -+ je .Ldone8x -+ -+ lea 0x180($inp),$inp # inp+=64*6 -+ xor %r9,%r9 -+ vmovdqa $xa3,0x00(%rsp) -+ lea 0x180($out),$out # out+=64*6 -+ sub \$384,$len # len-=64*6 -+ vmovdqa $xb3,0x20(%rsp) -+ jmp .Loop_tail8x -+ -+.align 32 -+.L448_or_more8x: -+ vpxor 0x00($inp),$xa0,$xa0 # xor with input -+ vpxor 0x20($inp),$xb0,$xb0 -+ vpxor 0x40($inp),$xc0,$xc0 -+ vpxor 0x60($inp),$xd0,$xd0 -+ vpxor 0x80($inp),$xa1,$xa1 -+ vpxor 0xa0($inp),$xb1,$xb1 -+ vpxor 0xc0($inp),$xc1,$xc1 -+ vpxor 0xe0($inp),$xd1,$xd1 -+ vpxor 0x100($inp),$xa2,$xa2 -+ vpxor 0x120($inp),$xb2,$xb2 -+ vpxor 0x140($inp),$xc2,$xc2 -+ vpxor 0x160($inp),$xd2,$xd2 -+ vpxor 0x180($inp),$xa3,$xa3 -+ vpxor 0x1a0($inp),$xb3,$xb3 -+ vmovdqu $xa0,0x00($out) -+ vmovdqu $xb0,0x20($out) -+ vmovdqu $xc0,0x40($out) -+ vmovdqu $xd0,0x60($out) -+ vmovdqu $xa1,0x80($out) -+ vmovdqu $xb1,0xa0($out) -+ vmovdqu $xc1,0xc0($out) -+ vmovdqu $xd1,0xe0($out) -+ vmovdqu $xa2,0x100($out) -+ vmovdqu $xb2,0x120($out) -+ vmovdqu $xc2,0x140($out) -+ vmovdqu $xd2,0x160($out) -+ vmovdqu $xa3,0x180($out) -+ vmovdqu $xb3,0x1a0($out) -+ je .Ldone8x -+ -+ lea 0x1c0($inp),$inp # inp+=64*7 -+ xor %r9,%r9 -+ vmovdqa $xc3,0x00(%rsp) -+ lea 0x1c0($out),$out # out+=64*7 -+ sub \$448,$len # len-=64*7 -+ vmovdqa $xd3,0x20(%rsp) -+ -+.Loop_tail8x: -+ movzb ($inp,%r9),%eax -+ movzb (%rsp,%r9),%ecx -+ lea 1(%r9),%r9 -+ xor %ecx,%eax -+ mov %al,-1($out,%r9) -+ dec $len -+ jnz .Loop_tail8x -+ -+.Ldone8x: -+ vzeroall -+___ -+$code.=<<___ if ($win64); -+ movaps -0xb0(%r10),%xmm6 -+ movaps -0xa0(%r10),%xmm7 -+ movaps -0x90(%r10),%xmm8 -+ movaps -0x80(%r10),%xmm9 -+ movaps -0x70(%r10),%xmm10 -+ movaps -0x60(%r10),%xmm11 -+ movaps -0x50(%r10),%xmm12 -+ movaps -0x40(%r10),%xmm13 -+ movaps -0x30(%r10),%xmm14 -+ movaps -0x20(%r10),%xmm15 -+___ -+$code.=<<___; -+ lea -8(%r10),%rsp -+.cfi_def_cfa_register %rsp -+.L8x_epilogue: -+ ret -+.cfi_endproc -+___ -+&end_function("chacha20_avx2"); -+if($kernel) { -+ $code .= "#endif\n"; -+} -+} -+ -+######################################################################## -+# AVX512 code paths -+if ($avx>2) { -+# This one handles shorter inputs... -+if($kernel) { -+ $code .= "#ifdef CONFIG_AS_AVX512\n"; -+} -+ -+my ($a,$b,$c,$d, $a_,$b_,$c_,$d_,$fourz) = map("%zmm$_",(0..3,16..20)); -+my ($t0,$t1,$t2,$t3) = map("%xmm$_",(4..7)); -+ -+sub vpxord() # size optimization -+{ my $opcode = "vpxor"; # adhere to vpxor when possible -+ -+ foreach (@_) { -+ if (/%([zy])mm([0-9]+)/ && ($1 eq "z" || $2>=16)) { -+ $opcode = "vpxord"; -+ last; -+ } -+ } -+ -+ $code .= "\t$opcode\t".join(',',reverse @_)."\n"; -+} -+ -+sub AVX512ROUND { # critical path is 14 "SIMD ticks" per round -+ &vpaddd ($a,$a,$b); -+ &vpxord ($d,$d,$a); -+ &vprold ($d,$d,16); -+ -+ &vpaddd ($c,$c,$d); -+ &vpxord ($b,$b,$c); -+ &vprold ($b,$b,12); -+ -+ &vpaddd ($a,$a,$b); -+ &vpxord ($d,$d,$a); -+ &vprold ($d,$d,8); -+ -+ &vpaddd ($c,$c,$d); -+ &vpxord ($b,$b,$c); -+ &vprold ($b,$b,7); -+} -+ -+my $xframe = $win64 ? 32+8 : 8; -+ -+&declare_function("chacha20_avx512", 32, 5); -+$code.=<<___; -+.cfi_startproc -+.Lchacha20_avx512: -+ lea 8(%rsp),%r10 # frame pointer -+.cfi_def_cfa_register %r10 -+ cmp \$512,$len -+ ja .Lchacha20_16x -+ -+ sub \$64+$xframe,%rsp -+ and \$-64,%rsp -+___ -+$code.=<<___ if ($win64); -+ movaps %xmm6,-0x30(%r10) -+ movaps %xmm7,-0x20(%r10) -+.Lavx512_body: -+___ -+$code.=<<___; -+ vbroadcasti32x4 .Lsigma(%rip),$a -+ vbroadcasti32x4 ($key),$b -+ vbroadcasti32x4 16($key),$c -+ vbroadcasti32x4 ($counter),$d -+ -+ vmovdqa32 $a,$a_ -+ vmovdqa32 $b,$b_ -+ vmovdqa32 $c,$c_ -+ vpaddd .Lzeroz(%rip),$d,$d -+ vmovdqa32 .Lfourz(%rip),$fourz -+ mov \$10,$counter # reuse $counter -+ vmovdqa32 $d,$d_ -+ jmp .Loop_avx512 -+ -+.align 16 -+.Loop_outer_avx512: -+ vmovdqa32 $a_,$a -+ vmovdqa32 $b_,$b -+ vmovdqa32 $c_,$c -+ vpaddd $fourz,$d_,$d -+ mov \$10,$counter -+ vmovdqa32 $d,$d_ -+ jmp .Loop_avx512 -+ -+.align 32 -+.Loop_avx512: -+___ -+ &AVX512ROUND(); -+ &vpshufd ($c,$c,0b01001110); -+ &vpshufd ($b,$b,0b00111001); -+ &vpshufd ($d,$d,0b10010011); -+ -+ &AVX512ROUND(); -+ &vpshufd ($c,$c,0b01001110); -+ &vpshufd ($b,$b,0b10010011); -+ &vpshufd ($d,$d,0b00111001); -+ -+ &dec ($counter); -+ &jnz (".Loop_avx512"); -+ -+$code.=<<___; -+ vpaddd $a_,$a,$a -+ vpaddd $b_,$b,$b -+ vpaddd $c_,$c,$c -+ vpaddd $d_,$d,$d -+ -+ sub \$64,$len -+ jb .Ltail64_avx512 -+ -+ vpxor 0x00($inp),%x#$a,$t0 # xor with input -+ vpxor 0x10($inp),%x#$b,$t1 -+ vpxor 0x20($inp),%x#$c,$t2 -+ vpxor 0x30($inp),%x#$d,$t3 -+ lea 0x40($inp),$inp # inp+=64 -+ -+ vmovdqu $t0,0x00($out) # write output -+ vmovdqu $t1,0x10($out) -+ vmovdqu $t2,0x20($out) -+ vmovdqu $t3,0x30($out) -+ lea 0x40($out),$out # out+=64 -+ -+ jz .Ldone_avx512 -+ -+ vextracti32x4 \$1,$a,$t0 -+ vextracti32x4 \$1,$b,$t1 -+ vextracti32x4 \$1,$c,$t2 -+ vextracti32x4 \$1,$d,$t3 -+ -+ sub \$64,$len -+ jb .Ltail_avx512 -+ -+ vpxor 0x00($inp),$t0,$t0 # xor with input -+ vpxor 0x10($inp),$t1,$t1 -+ vpxor 0x20($inp),$t2,$t2 -+ vpxor 0x30($inp),$t3,$t3 -+ lea 0x40($inp),$inp # inp+=64 -+ -+ vmovdqu $t0,0x00($out) # write output -+ vmovdqu $t1,0x10($out) -+ vmovdqu $t2,0x20($out) -+ vmovdqu $t3,0x30($out) -+ lea 0x40($out),$out # out+=64 -+ -+ jz .Ldone_avx512 -+ -+ vextracti32x4 \$2,$a,$t0 -+ vextracti32x4 \$2,$b,$t1 -+ vextracti32x4 \$2,$c,$t2 -+ vextracti32x4 \$2,$d,$t3 -+ -+ sub \$64,$len -+ jb .Ltail_avx512 -+ -+ vpxor 0x00($inp),$t0,$t0 # xor with input -+ vpxor 0x10($inp),$t1,$t1 -+ vpxor 0x20($inp),$t2,$t2 -+ vpxor 0x30($inp),$t3,$t3 -+ lea 0x40($inp),$inp # inp+=64 -+ -+ vmovdqu $t0,0x00($out) # write output -+ vmovdqu $t1,0x10($out) -+ vmovdqu $t2,0x20($out) -+ vmovdqu $t3,0x30($out) -+ lea 0x40($out),$out # out+=64 -+ -+ jz .Ldone_avx512 -+ -+ vextracti32x4 \$3,$a,$t0 -+ vextracti32x4 \$3,$b,$t1 -+ vextracti32x4 \$3,$c,$t2 -+ vextracti32x4 \$3,$d,$t3 -+ -+ sub \$64,$len -+ jb .Ltail_avx512 -+ -+ vpxor 0x00($inp),$t0,$t0 # xor with input -+ vpxor 0x10($inp),$t1,$t1 -+ vpxor 0x20($inp),$t2,$t2 -+ vpxor 0x30($inp),$t3,$t3 -+ lea 0x40($inp),$inp # inp+=64 -+ -+ vmovdqu $t0,0x00($out) # write output -+ vmovdqu $t1,0x10($out) -+ vmovdqu $t2,0x20($out) -+ vmovdqu $t3,0x30($out) -+ lea 0x40($out),$out # out+=64 -+ -+ jnz .Loop_outer_avx512 -+ -+ jmp .Ldone_avx512 -+ -+.align 16 -+.Ltail64_avx512: -+ vmovdqa %x#$a,0x00(%rsp) -+ vmovdqa %x#$b,0x10(%rsp) -+ vmovdqa %x#$c,0x20(%rsp) -+ vmovdqa %x#$d,0x30(%rsp) -+ add \$64,$len -+ jmp .Loop_tail_avx512 -+ -+.align 16 -+.Ltail_avx512: -+ vmovdqa $t0,0x00(%rsp) -+ vmovdqa $t1,0x10(%rsp) -+ vmovdqa $t2,0x20(%rsp) -+ vmovdqa $t3,0x30(%rsp) -+ add \$64,$len -+ -+.Loop_tail_avx512: -+ movzb ($inp,$counter),%eax -+ movzb (%rsp,$counter),%ecx -+ lea 1($counter),$counter -+ xor %ecx,%eax -+ mov %al,-1($out,$counter) -+ dec $len -+ jnz .Loop_tail_avx512 -+ -+ vmovdqu32 $a_,0x00(%rsp) -+ -+.Ldone_avx512: -+ vzeroall -+___ -+$code.=<<___ if ($win64); -+ movaps -0x30(%r10),%xmm6 -+ movaps -0x20(%r10),%xmm7 -+___ -+$code.=<<___; -+ lea -8(%r10),%rsp -+.cfi_def_cfa_register %rsp -+.Lavx512_epilogue: -+ ret -+.cfi_endproc -+___ -+&end_function("chacha20_avx512"); -+ -+map(s/%z/%y/, $a,$b,$c,$d, $a_,$b_,$c_,$d_,$fourz); -+ -+&declare_function("chacha20_avx512vl", 32, 5); -+$code.=<<___; -+.cfi_startproc -+.Lchacha20_avx512vl: -+ lea 8(%rsp),%r10 # frame pointer -+.cfi_def_cfa_register %r10 -+ cmp \$128,$len -+ ja .Lchacha20_8xvl -+ -+ sub \$64+$xframe,%rsp -+ and \$-32,%rsp -+___ -+$code.=<<___ if ($win64); -+ movaps %xmm6,-0x30(%r10) -+ movaps %xmm7,-0x20(%r10) -+.Lavx512vl_body: -+___ -+$code.=<<___; -+ vbroadcasti128 .Lsigma(%rip),$a -+ vbroadcasti128 ($key),$b -+ vbroadcasti128 16($key),$c -+ vbroadcasti128 ($counter),$d -+ -+ vmovdqa32 $a,$a_ -+ vmovdqa32 $b,$b_ -+ vmovdqa32 $c,$c_ -+ vpaddd .Lzeroz(%rip),$d,$d -+ vmovdqa32 .Ltwoy(%rip),$fourz -+ mov \$10,$counter # reuse $counter -+ vmovdqa32 $d,$d_ -+ jmp .Loop_avx512vl -+ -+.align 16 -+.Loop_outer_avx512vl: -+ vmovdqa32 $c_,$c -+ vpaddd $fourz,$d_,$d -+ mov \$10,$counter -+ vmovdqa32 $d,$d_ -+ jmp .Loop_avx512vl -+ -+.align 32 -+.Loop_avx512vl: -+___ -+ &AVX512ROUND(); -+ &vpshufd ($c,$c,0b01001110); -+ &vpshufd ($b,$b,0b00111001); -+ &vpshufd ($d,$d,0b10010011); -+ -+ &AVX512ROUND(); -+ &vpshufd ($c,$c,0b01001110); -+ &vpshufd ($b,$b,0b10010011); -+ &vpshufd ($d,$d,0b00111001); -+ -+ &dec ($counter); -+ &jnz (".Loop_avx512vl"); -+ -+$code.=<<___; -+ vpaddd $a_,$a,$a -+ vpaddd $b_,$b,$b -+ vpaddd $c_,$c,$c -+ vpaddd $d_,$d,$d -+ -+ sub \$64,$len -+ jb .Ltail64_avx512vl -+ -+ vpxor 0x00($inp),%x#$a,$t0 # xor with input -+ vpxor 0x10($inp),%x#$b,$t1 -+ vpxor 0x20($inp),%x#$c,$t2 -+ vpxor 0x30($inp),%x#$d,$t3 -+ lea 0x40($inp),$inp # inp+=64 -+ -+ vmovdqu $t0,0x00($out) # write output -+ vmovdqu $t1,0x10($out) -+ vmovdqu $t2,0x20($out) -+ vmovdqu $t3,0x30($out) -+ lea 0x40($out),$out # out+=64 -+ -+ jz .Ldone_avx512vl -+ -+ vextracti128 \$1,$a,$t0 -+ vextracti128 \$1,$b,$t1 -+ vextracti128 \$1,$c,$t2 -+ vextracti128 \$1,$d,$t3 -+ -+ sub \$64,$len -+ jb .Ltail_avx512vl -+ -+ vpxor 0x00($inp),$t0,$t0 # xor with input -+ vpxor 0x10($inp),$t1,$t1 -+ vpxor 0x20($inp),$t2,$t2 -+ vpxor 0x30($inp),$t3,$t3 -+ lea 0x40($inp),$inp # inp+=64 -+ -+ vmovdqu $t0,0x00($out) # write output -+ vmovdqu $t1,0x10($out) -+ vmovdqu $t2,0x20($out) -+ vmovdqu $t3,0x30($out) -+ lea 0x40($out),$out # out+=64 -+ -+ vmovdqa32 $a_,$a -+ vmovdqa32 $b_,$b -+ jnz .Loop_outer_avx512vl -+ -+ jmp .Ldone_avx512vl -+ -+.align 16 -+.Ltail64_avx512vl: -+ vmovdqa %x#$a,0x00(%rsp) -+ vmovdqa %x#$b,0x10(%rsp) -+ vmovdqa %x#$c,0x20(%rsp) -+ vmovdqa %x#$d,0x30(%rsp) -+ add \$64,$len -+ jmp .Loop_tail_avx512vl -+ -+.align 16 -+.Ltail_avx512vl: -+ vmovdqa $t0,0x00(%rsp) -+ vmovdqa $t1,0x10(%rsp) -+ vmovdqa $t2,0x20(%rsp) -+ vmovdqa $t3,0x30(%rsp) -+ add \$64,$len -+ -+.Loop_tail_avx512vl: -+ movzb ($inp,$counter),%eax -+ movzb (%rsp,$counter),%ecx -+ lea 1($counter),$counter -+ xor %ecx,%eax -+ mov %al,-1($out,$counter) -+ dec $len -+ jnz .Loop_tail_avx512vl -+ -+ vmovdqu32 $a_,0x00(%rsp) -+ vmovdqu32 $a_,0x20(%rsp) -+ -+.Ldone_avx512vl: -+ vzeroall -+___ -+$code.=<<___ if ($win64); -+ movaps -0x30(%r10),%xmm6 -+ movaps -0x20(%r10),%xmm7 -+___ -+$code.=<<___; -+ lea -8(%r10),%rsp -+.cfi_def_cfa_register %rsp -+.Lavx512vl_epilogue: -+ ret -+.cfi_endproc -+___ -+&end_function("chacha20_avx512vl"); -+ -+# This one handles longer inputs... -+ -+my ($xa0,$xa1,$xa2,$xa3, $xb0,$xb1,$xb2,$xb3, -+ $xc0,$xc1,$xc2,$xc3, $xd0,$xd1,$xd2,$xd3)=map("%zmm$_",(0..15)); -+my @xx=($xa0,$xa1,$xa2,$xa3, $xb0,$xb1,$xb2,$xb3, -+ $xc0,$xc1,$xc2,$xc3, $xd0,$xd1,$xd2,$xd3); -+my @key=map("%zmm$_",(16..31)); -+my ($xt0,$xt1,$xt2,$xt3)=@key[0..3]; -+ -+sub AVX512_lane_ROUND { -+my ($a0,$b0,$c0,$d0)=@_; -+my ($a1,$b1,$c1,$d1)=map(($_&~3)+(($_+1)&3),($a0,$b0,$c0,$d0)); -+my ($a2,$b2,$c2,$d2)=map(($_&~3)+(($_+1)&3),($a1,$b1,$c1,$d1)); -+my ($a3,$b3,$c3,$d3)=map(($_&~3)+(($_+1)&3),($a2,$b2,$c2,$d2)); -+my @x=map("\"$_\"",@xx); -+ -+ ( -+ "&vpaddd (@x[$a0],@x[$a0],@x[$b0])", # Q1 -+ "&vpaddd (@x[$a1],@x[$a1],@x[$b1])", # Q2 -+ "&vpaddd (@x[$a2],@x[$a2],@x[$b2])", # Q3 -+ "&vpaddd (@x[$a3],@x[$a3],@x[$b3])", # Q4 -+ "&vpxord (@x[$d0],@x[$d0],@x[$a0])", -+ "&vpxord (@x[$d1],@x[$d1],@x[$a1])", -+ "&vpxord (@x[$d2],@x[$d2],@x[$a2])", -+ "&vpxord (@x[$d3],@x[$d3],@x[$a3])", -+ "&vprold (@x[$d0],@x[$d0],16)", -+ "&vprold (@x[$d1],@x[$d1],16)", -+ "&vprold (@x[$d2],@x[$d2],16)", -+ "&vprold (@x[$d3],@x[$d3],16)", -+ -+ "&vpaddd (@x[$c0],@x[$c0],@x[$d0])", -+ "&vpaddd (@x[$c1],@x[$c1],@x[$d1])", -+ "&vpaddd (@x[$c2],@x[$c2],@x[$d2])", -+ "&vpaddd (@x[$c3],@x[$c3],@x[$d3])", -+ "&vpxord (@x[$b0],@x[$b0],@x[$c0])", -+ "&vpxord (@x[$b1],@x[$b1],@x[$c1])", -+ "&vpxord (@x[$b2],@x[$b2],@x[$c2])", -+ "&vpxord (@x[$b3],@x[$b3],@x[$c3])", -+ "&vprold (@x[$b0],@x[$b0],12)", -+ "&vprold (@x[$b1],@x[$b1],12)", -+ "&vprold (@x[$b2],@x[$b2],12)", -+ "&vprold (@x[$b3],@x[$b3],12)", -+ -+ "&vpaddd (@x[$a0],@x[$a0],@x[$b0])", -+ "&vpaddd (@x[$a1],@x[$a1],@x[$b1])", -+ "&vpaddd (@x[$a2],@x[$a2],@x[$b2])", -+ "&vpaddd (@x[$a3],@x[$a3],@x[$b3])", -+ "&vpxord (@x[$d0],@x[$d0],@x[$a0])", -+ "&vpxord (@x[$d1],@x[$d1],@x[$a1])", -+ "&vpxord (@x[$d2],@x[$d2],@x[$a2])", -+ "&vpxord (@x[$d3],@x[$d3],@x[$a3])", -+ "&vprold (@x[$d0],@x[$d0],8)", -+ "&vprold (@x[$d1],@x[$d1],8)", -+ "&vprold (@x[$d2],@x[$d2],8)", -+ "&vprold (@x[$d3],@x[$d3],8)", -+ -+ "&vpaddd (@x[$c0],@x[$c0],@x[$d0])", -+ "&vpaddd (@x[$c1],@x[$c1],@x[$d1])", -+ "&vpaddd (@x[$c2],@x[$c2],@x[$d2])", -+ "&vpaddd (@x[$c3],@x[$c3],@x[$d3])", -+ "&vpxord (@x[$b0],@x[$b0],@x[$c0])", -+ "&vpxord (@x[$b1],@x[$b1],@x[$c1])", -+ "&vpxord (@x[$b2],@x[$b2],@x[$c2])", -+ "&vpxord (@x[$b3],@x[$b3],@x[$c3])", -+ "&vprold (@x[$b0],@x[$b0],7)", -+ "&vprold (@x[$b1],@x[$b1],7)", -+ "&vprold (@x[$b2],@x[$b2],7)", -+ "&vprold (@x[$b3],@x[$b3],7)" -+ ); -+} -+ -+my $xframe = $win64 ? 0xa8 : 8; -+ -+$code.=<<___; -+.type chacha20_16x,\@function,5 -+.align 32 -+chacha20_16x: -+.cfi_startproc -+.Lchacha20_16x: -+ lea 8(%rsp),%r10 # frame register -+.cfi_def_cfa_register %r10 -+ sub \$64+$xframe,%rsp -+ and \$-64,%rsp -+___ -+$code.=<<___ if ($win64); -+ movaps %xmm6,-0xb0(%r10) -+ movaps %xmm7,-0xa0(%r10) -+ movaps %xmm8,-0x90(%r10) -+ movaps %xmm9,-0x80(%r10) -+ movaps %xmm10,-0x70(%r10) -+ movaps %xmm11,-0x60(%r10) -+ movaps %xmm12,-0x50(%r10) -+ movaps %xmm13,-0x40(%r10) -+ movaps %xmm14,-0x30(%r10) -+ movaps %xmm15,-0x20(%r10) -+.L16x_body: -+___ -+$code.=<<___; -+ vzeroupper -+ -+ lea .Lsigma(%rip),%r9 -+ vbroadcasti32x4 (%r9),$xa3 # key[0] -+ vbroadcasti32x4 ($key),$xb3 # key[1] -+ vbroadcasti32x4 16($key),$xc3 # key[2] -+ vbroadcasti32x4 ($counter),$xd3 # key[3] -+ -+ vpshufd \$0x00,$xa3,$xa0 # smash key by lanes... -+ vpshufd \$0x55,$xa3,$xa1 -+ vpshufd \$0xaa,$xa3,$xa2 -+ vpshufd \$0xff,$xa3,$xa3 -+ vmovdqa64 $xa0,@key[0] -+ vmovdqa64 $xa1,@key[1] -+ vmovdqa64 $xa2,@key[2] -+ vmovdqa64 $xa3,@key[3] -+ -+ vpshufd \$0x00,$xb3,$xb0 -+ vpshufd \$0x55,$xb3,$xb1 -+ vpshufd \$0xaa,$xb3,$xb2 -+ vpshufd \$0xff,$xb3,$xb3 -+ vmovdqa64 $xb0,@key[4] -+ vmovdqa64 $xb1,@key[5] -+ vmovdqa64 $xb2,@key[6] -+ vmovdqa64 $xb3,@key[7] -+ -+ vpshufd \$0x00,$xc3,$xc0 -+ vpshufd \$0x55,$xc3,$xc1 -+ vpshufd \$0xaa,$xc3,$xc2 -+ vpshufd \$0xff,$xc3,$xc3 -+ vmovdqa64 $xc0,@key[8] -+ vmovdqa64 $xc1,@key[9] -+ vmovdqa64 $xc2,@key[10] -+ vmovdqa64 $xc3,@key[11] -+ -+ vpshufd \$0x00,$xd3,$xd0 -+ vpshufd \$0x55,$xd3,$xd1 -+ vpshufd \$0xaa,$xd3,$xd2 -+ vpshufd \$0xff,$xd3,$xd3 -+ vpaddd .Lincz(%rip),$xd0,$xd0 # don't save counters yet -+ vmovdqa64 $xd0,@key[12] -+ vmovdqa64 $xd1,@key[13] -+ vmovdqa64 $xd2,@key[14] -+ vmovdqa64 $xd3,@key[15] -+ -+ mov \$10,%eax -+ jmp .Loop16x -+ -+.align 32 -+.Loop_outer16x: -+ vpbroadcastd 0(%r9),$xa0 # reload key -+ vpbroadcastd 4(%r9),$xa1 -+ vpbroadcastd 8(%r9),$xa2 -+ vpbroadcastd 12(%r9),$xa3 -+ vpaddd .Lsixteen(%rip),@key[12],@key[12] # next SIMD counters -+ vmovdqa64 @key[4],$xb0 -+ vmovdqa64 @key[5],$xb1 -+ vmovdqa64 @key[6],$xb2 -+ vmovdqa64 @key[7],$xb3 -+ vmovdqa64 @key[8],$xc0 -+ vmovdqa64 @key[9],$xc1 -+ vmovdqa64 @key[10],$xc2 -+ vmovdqa64 @key[11],$xc3 -+ vmovdqa64 @key[12],$xd0 -+ vmovdqa64 @key[13],$xd1 -+ vmovdqa64 @key[14],$xd2 -+ vmovdqa64 @key[15],$xd3 -+ -+ vmovdqa64 $xa0,@key[0] -+ vmovdqa64 $xa1,@key[1] -+ vmovdqa64 $xa2,@key[2] -+ vmovdqa64 $xa3,@key[3] -+ -+ mov \$10,%eax -+ jmp .Loop16x -+ -+.align 32 -+.Loop16x: -+___ -+ foreach (&AVX512_lane_ROUND(0, 4, 8,12)) { eval; } -+ foreach (&AVX512_lane_ROUND(0, 5,10,15)) { eval; } -+$code.=<<___; -+ dec %eax -+ jnz .Loop16x -+ -+ vpaddd @key[0],$xa0,$xa0 # accumulate key -+ vpaddd @key[1],$xa1,$xa1 -+ vpaddd @key[2],$xa2,$xa2 -+ vpaddd @key[3],$xa3,$xa3 -+ -+ vpunpckldq $xa1,$xa0,$xt2 # "de-interlace" data -+ vpunpckldq $xa3,$xa2,$xt3 -+ vpunpckhdq $xa1,$xa0,$xa0 -+ vpunpckhdq $xa3,$xa2,$xa2 -+ vpunpcklqdq $xt3,$xt2,$xa1 # "a0" -+ vpunpckhqdq $xt3,$xt2,$xt2 # "a1" -+ vpunpcklqdq $xa2,$xa0,$xa3 # "a2" -+ vpunpckhqdq $xa2,$xa0,$xa0 # "a3" -+___ -+ ($xa0,$xa1,$xa2,$xa3,$xt2)=($xa1,$xt2,$xa3,$xa0,$xa2); -+$code.=<<___; -+ vpaddd @key[4],$xb0,$xb0 -+ vpaddd @key[5],$xb1,$xb1 -+ vpaddd @key[6],$xb2,$xb2 -+ vpaddd @key[7],$xb3,$xb3 -+ -+ vpunpckldq $xb1,$xb0,$xt2 -+ vpunpckldq $xb3,$xb2,$xt3 -+ vpunpckhdq $xb1,$xb0,$xb0 -+ vpunpckhdq $xb3,$xb2,$xb2 -+ vpunpcklqdq $xt3,$xt2,$xb1 # "b0" -+ vpunpckhqdq $xt3,$xt2,$xt2 # "b1" -+ vpunpcklqdq $xb2,$xb0,$xb3 # "b2" -+ vpunpckhqdq $xb2,$xb0,$xb0 # "b3" -+___ -+ ($xb0,$xb1,$xb2,$xb3,$xt2)=($xb1,$xt2,$xb3,$xb0,$xb2); -+$code.=<<___; -+ vshufi32x4 \$0x44,$xb0,$xa0,$xt3 # "de-interlace" further -+ vshufi32x4 \$0xee,$xb0,$xa0,$xb0 -+ vshufi32x4 \$0x44,$xb1,$xa1,$xa0 -+ vshufi32x4 \$0xee,$xb1,$xa1,$xb1 -+ vshufi32x4 \$0x44,$xb2,$xa2,$xa1 -+ vshufi32x4 \$0xee,$xb2,$xa2,$xb2 -+ vshufi32x4 \$0x44,$xb3,$xa3,$xa2 -+ vshufi32x4 \$0xee,$xb3,$xa3,$xb3 -+___ -+ ($xa0,$xa1,$xa2,$xa3,$xt3)=($xt3,$xa0,$xa1,$xa2,$xa3); -+$code.=<<___; -+ vpaddd @key[8],$xc0,$xc0 -+ vpaddd @key[9],$xc1,$xc1 -+ vpaddd @key[10],$xc2,$xc2 -+ vpaddd @key[11],$xc3,$xc3 -+ -+ vpunpckldq $xc1,$xc0,$xt2 -+ vpunpckldq $xc3,$xc2,$xt3 -+ vpunpckhdq $xc1,$xc0,$xc0 -+ vpunpckhdq $xc3,$xc2,$xc2 -+ vpunpcklqdq $xt3,$xt2,$xc1 # "c0" -+ vpunpckhqdq $xt3,$xt2,$xt2 # "c1" -+ vpunpcklqdq $xc2,$xc0,$xc3 # "c2" -+ vpunpckhqdq $xc2,$xc0,$xc0 # "c3" -+___ -+ ($xc0,$xc1,$xc2,$xc3,$xt2)=($xc1,$xt2,$xc3,$xc0,$xc2); -+$code.=<<___; -+ vpaddd @key[12],$xd0,$xd0 -+ vpaddd @key[13],$xd1,$xd1 -+ vpaddd @key[14],$xd2,$xd2 -+ vpaddd @key[15],$xd3,$xd3 -+ -+ vpunpckldq $xd1,$xd0,$xt2 -+ vpunpckldq $xd3,$xd2,$xt3 -+ vpunpckhdq $xd1,$xd0,$xd0 -+ vpunpckhdq $xd3,$xd2,$xd2 -+ vpunpcklqdq $xt3,$xt2,$xd1 # "d0" -+ vpunpckhqdq $xt3,$xt2,$xt2 # "d1" -+ vpunpcklqdq $xd2,$xd0,$xd3 # "d2" -+ vpunpckhqdq $xd2,$xd0,$xd0 # "d3" -+___ -+ ($xd0,$xd1,$xd2,$xd3,$xt2)=($xd1,$xt2,$xd3,$xd0,$xd2); -+$code.=<<___; -+ vshufi32x4 \$0x44,$xd0,$xc0,$xt3 # "de-interlace" further -+ vshufi32x4 \$0xee,$xd0,$xc0,$xd0 -+ vshufi32x4 \$0x44,$xd1,$xc1,$xc0 -+ vshufi32x4 \$0xee,$xd1,$xc1,$xd1 -+ vshufi32x4 \$0x44,$xd2,$xc2,$xc1 -+ vshufi32x4 \$0xee,$xd2,$xc2,$xd2 -+ vshufi32x4 \$0x44,$xd3,$xc3,$xc2 -+ vshufi32x4 \$0xee,$xd3,$xc3,$xd3 -+___ -+ ($xc0,$xc1,$xc2,$xc3,$xt3)=($xt3,$xc0,$xc1,$xc2,$xc3); -+$code.=<<___; -+ vshufi32x4 \$0x88,$xc0,$xa0,$xt0 # "de-interlace" further -+ vshufi32x4 \$0xdd,$xc0,$xa0,$xa0 -+ vshufi32x4 \$0x88,$xd0,$xb0,$xc0 -+ vshufi32x4 \$0xdd,$xd0,$xb0,$xd0 -+ vshufi32x4 \$0x88,$xc1,$xa1,$xt1 -+ vshufi32x4 \$0xdd,$xc1,$xa1,$xa1 -+ vshufi32x4 \$0x88,$xd1,$xb1,$xc1 -+ vshufi32x4 \$0xdd,$xd1,$xb1,$xd1 -+ vshufi32x4 \$0x88,$xc2,$xa2,$xt2 -+ vshufi32x4 \$0xdd,$xc2,$xa2,$xa2 -+ vshufi32x4 \$0x88,$xd2,$xb2,$xc2 -+ vshufi32x4 \$0xdd,$xd2,$xb2,$xd2 -+ vshufi32x4 \$0x88,$xc3,$xa3,$xt3 -+ vshufi32x4 \$0xdd,$xc3,$xa3,$xa3 -+ vshufi32x4 \$0x88,$xd3,$xb3,$xc3 -+ vshufi32x4 \$0xdd,$xd3,$xb3,$xd3 -+___ -+ ($xa0,$xa1,$xa2,$xa3,$xb0,$xb1,$xb2,$xb3)= -+ ($xt0,$xt1,$xt2,$xt3,$xa0,$xa1,$xa2,$xa3); -+ -+ ($xa0,$xb0,$xc0,$xd0, $xa1,$xb1,$xc1,$xd1, -+ $xa2,$xb2,$xc2,$xd2, $xa3,$xb3,$xc3,$xd3) = -+ ($xa0,$xa1,$xa2,$xa3, $xb0,$xb1,$xb2,$xb3, -+ $xc0,$xc1,$xc2,$xc3, $xd0,$xd1,$xd2,$xd3); -+$code.=<<___; -+ cmp \$64*16,$len -+ jb .Ltail16x -+ -+ vpxord 0x00($inp),$xa0,$xa0 # xor with input -+ vpxord 0x40($inp),$xb0,$xb0 -+ vpxord 0x80($inp),$xc0,$xc0 -+ vpxord 0xc0($inp),$xd0,$xd0 -+ vmovdqu32 $xa0,0x00($out) -+ vmovdqu32 $xb0,0x40($out) -+ vmovdqu32 $xc0,0x80($out) -+ vmovdqu32 $xd0,0xc0($out) -+ -+ vpxord 0x100($inp),$xa1,$xa1 -+ vpxord 0x140($inp),$xb1,$xb1 -+ vpxord 0x180($inp),$xc1,$xc1 -+ vpxord 0x1c0($inp),$xd1,$xd1 -+ vmovdqu32 $xa1,0x100($out) -+ vmovdqu32 $xb1,0x140($out) -+ vmovdqu32 $xc1,0x180($out) -+ vmovdqu32 $xd1,0x1c0($out) -+ -+ vpxord 0x200($inp),$xa2,$xa2 -+ vpxord 0x240($inp),$xb2,$xb2 -+ vpxord 0x280($inp),$xc2,$xc2 -+ vpxord 0x2c0($inp),$xd2,$xd2 -+ vmovdqu32 $xa2,0x200($out) -+ vmovdqu32 $xb2,0x240($out) -+ vmovdqu32 $xc2,0x280($out) -+ vmovdqu32 $xd2,0x2c0($out) -+ -+ vpxord 0x300($inp),$xa3,$xa3 -+ vpxord 0x340($inp),$xb3,$xb3 -+ vpxord 0x380($inp),$xc3,$xc3 -+ vpxord 0x3c0($inp),$xd3,$xd3 -+ lea 0x400($inp),$inp -+ vmovdqu32 $xa3,0x300($out) -+ vmovdqu32 $xb3,0x340($out) -+ vmovdqu32 $xc3,0x380($out) -+ vmovdqu32 $xd3,0x3c0($out) -+ lea 0x400($out),$out -+ -+ sub \$64*16,$len -+ jnz .Loop_outer16x -+ -+ jmp .Ldone16x -+ -+.align 32 -+.Ltail16x: -+ xor %r9,%r9 -+ sub $inp,$out -+ cmp \$64*1,$len -+ jb .Less_than_64_16x -+ vpxord ($inp),$xa0,$xa0 # xor with input -+ vmovdqu32 $xa0,($out,$inp) -+ je .Ldone16x -+ vmovdqa32 $xb0,$xa0 -+ lea 64($inp),$inp -+ -+ cmp \$64*2,$len -+ jb .Less_than_64_16x -+ vpxord ($inp),$xb0,$xb0 -+ vmovdqu32 $xb0,($out,$inp) -+ je .Ldone16x -+ vmovdqa32 $xc0,$xa0 -+ lea 64($inp),$inp -+ -+ cmp \$64*3,$len -+ jb .Less_than_64_16x -+ vpxord ($inp),$xc0,$xc0 -+ vmovdqu32 $xc0,($out,$inp) -+ je .Ldone16x -+ vmovdqa32 $xd0,$xa0 -+ lea 64($inp),$inp -+ -+ cmp \$64*4,$len -+ jb .Less_than_64_16x -+ vpxord ($inp),$xd0,$xd0 -+ vmovdqu32 $xd0,($out,$inp) -+ je .Ldone16x -+ vmovdqa32 $xa1,$xa0 -+ lea 64($inp),$inp -+ -+ cmp \$64*5,$len -+ jb .Less_than_64_16x -+ vpxord ($inp),$xa1,$xa1 -+ vmovdqu32 $xa1,($out,$inp) -+ je .Ldone16x -+ vmovdqa32 $xb1,$xa0 -+ lea 64($inp),$inp -+ -+ cmp \$64*6,$len -+ jb .Less_than_64_16x -+ vpxord ($inp),$xb1,$xb1 -+ vmovdqu32 $xb1,($out,$inp) -+ je .Ldone16x -+ vmovdqa32 $xc1,$xa0 -+ lea 64($inp),$inp -+ -+ cmp \$64*7,$len -+ jb .Less_than_64_16x -+ vpxord ($inp),$xc1,$xc1 -+ vmovdqu32 $xc1,($out,$inp) -+ je .Ldone16x -+ vmovdqa32 $xd1,$xa0 -+ lea 64($inp),$inp -+ -+ cmp \$64*8,$len -+ jb .Less_than_64_16x -+ vpxord ($inp),$xd1,$xd1 -+ vmovdqu32 $xd1,($out,$inp) -+ je .Ldone16x -+ vmovdqa32 $xa2,$xa0 -+ lea 64($inp),$inp -+ -+ cmp \$64*9,$len -+ jb .Less_than_64_16x -+ vpxord ($inp),$xa2,$xa2 -+ vmovdqu32 $xa2,($out,$inp) -+ je .Ldone16x -+ vmovdqa32 $xb2,$xa0 -+ lea 64($inp),$inp -+ -+ cmp \$64*10,$len -+ jb .Less_than_64_16x -+ vpxord ($inp),$xb2,$xb2 -+ vmovdqu32 $xb2,($out,$inp) -+ je .Ldone16x -+ vmovdqa32 $xc2,$xa0 -+ lea 64($inp),$inp -+ -+ cmp \$64*11,$len -+ jb .Less_than_64_16x -+ vpxord ($inp),$xc2,$xc2 -+ vmovdqu32 $xc2,($out,$inp) -+ je .Ldone16x -+ vmovdqa32 $xd2,$xa0 -+ lea 64($inp),$inp -+ -+ cmp \$64*12,$len -+ jb .Less_than_64_16x -+ vpxord ($inp),$xd2,$xd2 -+ vmovdqu32 $xd2,($out,$inp) -+ je .Ldone16x -+ vmovdqa32 $xa3,$xa0 -+ lea 64($inp),$inp -+ -+ cmp \$64*13,$len -+ jb .Less_than_64_16x -+ vpxord ($inp),$xa3,$xa3 -+ vmovdqu32 $xa3,($out,$inp) -+ je .Ldone16x -+ vmovdqa32 $xb3,$xa0 -+ lea 64($inp),$inp -+ -+ cmp \$64*14,$len -+ jb .Less_than_64_16x -+ vpxord ($inp),$xb3,$xb3 -+ vmovdqu32 $xb3,($out,$inp) -+ je .Ldone16x -+ vmovdqa32 $xc3,$xa0 -+ lea 64($inp),$inp -+ -+ cmp \$64*15,$len -+ jb .Less_than_64_16x -+ vpxord ($inp),$xc3,$xc3 -+ vmovdqu32 $xc3,($out,$inp) -+ je .Ldone16x -+ vmovdqa32 $xd3,$xa0 -+ lea 64($inp),$inp -+ -+.Less_than_64_16x: -+ vmovdqa32 $xa0,0x00(%rsp) -+ lea ($out,$inp),$out -+ and \$63,$len -+ -+.Loop_tail16x: -+ movzb ($inp,%r9),%eax -+ movzb (%rsp,%r9),%ecx -+ lea 1(%r9),%r9 -+ xor %ecx,%eax -+ mov %al,-1($out,%r9) -+ dec $len -+ jnz .Loop_tail16x -+ -+ vpxord $xa0,$xa0,$xa0 -+ vmovdqa32 $xa0,0(%rsp) -+ -+.Ldone16x: -+ vzeroall -+___ -+$code.=<<___ if ($win64); -+ movaps -0xb0(%r10),%xmm6 -+ movaps -0xa0(%r10),%xmm7 -+ movaps -0x90(%r10),%xmm8 -+ movaps -0x80(%r10),%xmm9 -+ movaps -0x70(%r10),%xmm10 -+ movaps -0x60(%r10),%xmm11 -+ movaps -0x50(%r10),%xmm12 -+ movaps -0x40(%r10),%xmm13 -+ movaps -0x30(%r10),%xmm14 -+ movaps -0x20(%r10),%xmm15 -+___ -+$code.=<<___; -+ lea -8(%r10),%rsp -+.cfi_def_cfa_register %rsp -+.L16x_epilogue: -+ ret -+.cfi_endproc -+.size chacha20_16x,.-chacha20_16x -+___ -+ -+# switch to %ymm domain -+($xa0,$xa1,$xa2,$xa3, $xb0,$xb1,$xb2,$xb3, -+ $xc0,$xc1,$xc2,$xc3, $xd0,$xd1,$xd2,$xd3)=map("%ymm$_",(0..15)); -+@xx=($xa0,$xa1,$xa2,$xa3, $xb0,$xb1,$xb2,$xb3, -+ $xc0,$xc1,$xc2,$xc3, $xd0,$xd1,$xd2,$xd3); -+@key=map("%ymm$_",(16..31)); -+($xt0,$xt1,$xt2,$xt3)=@key[0..3]; -+ -+$code.=<<___; -+.type chacha20_8xvl,\@function,5 -+.align 32 -+chacha20_8xvl: -+.cfi_startproc -+.Lchacha20_8xvl: -+ lea 8(%rsp),%r10 # frame register -+.cfi_def_cfa_register %r10 -+ sub \$64+$xframe,%rsp -+ and \$-64,%rsp -+___ -+$code.=<<___ if ($win64); -+ movaps %xmm6,-0xb0(%r10) -+ movaps %xmm7,-0xa0(%r10) -+ movaps %xmm8,-0x90(%r10) -+ movaps %xmm9,-0x80(%r10) -+ movaps %xmm10,-0x70(%r10) -+ movaps %xmm11,-0x60(%r10) -+ movaps %xmm12,-0x50(%r10) -+ movaps %xmm13,-0x40(%r10) -+ movaps %xmm14,-0x30(%r10) -+ movaps %xmm15,-0x20(%r10) -+.L8xvl_body: -+___ -+$code.=<<___; -+ vzeroupper -+ -+ lea .Lsigma(%rip),%r9 -+ vbroadcasti128 (%r9),$xa3 # key[0] -+ vbroadcasti128 ($key),$xb3 # key[1] -+ vbroadcasti128 16($key),$xc3 # key[2] -+ vbroadcasti128 ($counter),$xd3 # key[3] -+ -+ vpshufd \$0x00,$xa3,$xa0 # smash key by lanes... -+ vpshufd \$0x55,$xa3,$xa1 -+ vpshufd \$0xaa,$xa3,$xa2 -+ vpshufd \$0xff,$xa3,$xa3 -+ vmovdqa64 $xa0,@key[0] -+ vmovdqa64 $xa1,@key[1] -+ vmovdqa64 $xa2,@key[2] -+ vmovdqa64 $xa3,@key[3] -+ -+ vpshufd \$0x00,$xb3,$xb0 -+ vpshufd \$0x55,$xb3,$xb1 -+ vpshufd \$0xaa,$xb3,$xb2 -+ vpshufd \$0xff,$xb3,$xb3 -+ vmovdqa64 $xb0,@key[4] -+ vmovdqa64 $xb1,@key[5] -+ vmovdqa64 $xb2,@key[6] -+ vmovdqa64 $xb3,@key[7] -+ -+ vpshufd \$0x00,$xc3,$xc0 -+ vpshufd \$0x55,$xc3,$xc1 -+ vpshufd \$0xaa,$xc3,$xc2 -+ vpshufd \$0xff,$xc3,$xc3 -+ vmovdqa64 $xc0,@key[8] -+ vmovdqa64 $xc1,@key[9] -+ vmovdqa64 $xc2,@key[10] -+ vmovdqa64 $xc3,@key[11] -+ -+ vpshufd \$0x00,$xd3,$xd0 -+ vpshufd \$0x55,$xd3,$xd1 -+ vpshufd \$0xaa,$xd3,$xd2 -+ vpshufd \$0xff,$xd3,$xd3 -+ vpaddd .Lincy(%rip),$xd0,$xd0 # don't save counters yet -+ vmovdqa64 $xd0,@key[12] -+ vmovdqa64 $xd1,@key[13] -+ vmovdqa64 $xd2,@key[14] -+ vmovdqa64 $xd3,@key[15] -+ -+ mov \$10,%eax -+ jmp .Loop8xvl -+ -+.align 32 -+.Loop_outer8xvl: -+ #vpbroadcastd 0(%r9),$xa0 # reload key -+ #vpbroadcastd 4(%r9),$xa1 -+ vpbroadcastd 8(%r9),$xa2 -+ vpbroadcastd 12(%r9),$xa3 -+ vpaddd .Leight(%rip),@key[12],@key[12] # next SIMD counters -+ vmovdqa64 @key[4],$xb0 -+ vmovdqa64 @key[5],$xb1 -+ vmovdqa64 @key[6],$xb2 -+ vmovdqa64 @key[7],$xb3 -+ vmovdqa64 @key[8],$xc0 -+ vmovdqa64 @key[9],$xc1 -+ vmovdqa64 @key[10],$xc2 -+ vmovdqa64 @key[11],$xc3 -+ vmovdqa64 @key[12],$xd0 -+ vmovdqa64 @key[13],$xd1 -+ vmovdqa64 @key[14],$xd2 -+ vmovdqa64 @key[15],$xd3 -+ -+ vmovdqa64 $xa0,@key[0] -+ vmovdqa64 $xa1,@key[1] -+ vmovdqa64 $xa2,@key[2] -+ vmovdqa64 $xa3,@key[3] -+ -+ mov \$10,%eax -+ jmp .Loop8xvl -+ -+.align 32 -+.Loop8xvl: -+___ -+ foreach (&AVX512_lane_ROUND(0, 4, 8,12)) { eval; } -+ foreach (&AVX512_lane_ROUND(0, 5,10,15)) { eval; } -+$code.=<<___; -+ dec %eax -+ jnz .Loop8xvl -+ -+ vpaddd @key[0],$xa0,$xa0 # accumulate key -+ vpaddd @key[1],$xa1,$xa1 -+ vpaddd @key[2],$xa2,$xa2 -+ vpaddd @key[3],$xa3,$xa3 -+ -+ vpunpckldq $xa1,$xa0,$xt2 # "de-interlace" data -+ vpunpckldq $xa3,$xa2,$xt3 -+ vpunpckhdq $xa1,$xa0,$xa0 -+ vpunpckhdq $xa3,$xa2,$xa2 -+ vpunpcklqdq $xt3,$xt2,$xa1 # "a0" -+ vpunpckhqdq $xt3,$xt2,$xt2 # "a1" -+ vpunpcklqdq $xa2,$xa0,$xa3 # "a2" -+ vpunpckhqdq $xa2,$xa0,$xa0 # "a3" -+___ -+ ($xa0,$xa1,$xa2,$xa3,$xt2)=($xa1,$xt2,$xa3,$xa0,$xa2); -+$code.=<<___; -+ vpaddd @key[4],$xb0,$xb0 -+ vpaddd @key[5],$xb1,$xb1 -+ vpaddd @key[6],$xb2,$xb2 -+ vpaddd @key[7],$xb3,$xb3 -+ -+ vpunpckldq $xb1,$xb0,$xt2 -+ vpunpckldq $xb3,$xb2,$xt3 -+ vpunpckhdq $xb1,$xb0,$xb0 -+ vpunpckhdq $xb3,$xb2,$xb2 -+ vpunpcklqdq $xt3,$xt2,$xb1 # "b0" -+ vpunpckhqdq $xt3,$xt2,$xt2 # "b1" -+ vpunpcklqdq $xb2,$xb0,$xb3 # "b2" -+ vpunpckhqdq $xb2,$xb0,$xb0 # "b3" -+___ -+ ($xb0,$xb1,$xb2,$xb3,$xt2)=($xb1,$xt2,$xb3,$xb0,$xb2); -+$code.=<<___; -+ vshufi32x4 \$0,$xb0,$xa0,$xt3 # "de-interlace" further -+ vshufi32x4 \$3,$xb0,$xa0,$xb0 -+ vshufi32x4 \$0,$xb1,$xa1,$xa0 -+ vshufi32x4 \$3,$xb1,$xa1,$xb1 -+ vshufi32x4 \$0,$xb2,$xa2,$xa1 -+ vshufi32x4 \$3,$xb2,$xa2,$xb2 -+ vshufi32x4 \$0,$xb3,$xa3,$xa2 -+ vshufi32x4 \$3,$xb3,$xa3,$xb3 -+___ -+ ($xa0,$xa1,$xa2,$xa3,$xt3)=($xt3,$xa0,$xa1,$xa2,$xa3); -+$code.=<<___; -+ vpaddd @key[8],$xc0,$xc0 -+ vpaddd @key[9],$xc1,$xc1 -+ vpaddd @key[10],$xc2,$xc2 -+ vpaddd @key[11],$xc3,$xc3 -+ -+ vpunpckldq $xc1,$xc0,$xt2 -+ vpunpckldq $xc3,$xc2,$xt3 -+ vpunpckhdq $xc1,$xc0,$xc0 -+ vpunpckhdq $xc3,$xc2,$xc2 -+ vpunpcklqdq $xt3,$xt2,$xc1 # "c0" -+ vpunpckhqdq $xt3,$xt2,$xt2 # "c1" -+ vpunpcklqdq $xc2,$xc0,$xc3 # "c2" -+ vpunpckhqdq $xc2,$xc0,$xc0 # "c3" -+___ -+ ($xc0,$xc1,$xc2,$xc3,$xt2)=($xc1,$xt2,$xc3,$xc0,$xc2); -+$code.=<<___; -+ vpaddd @key[12],$xd0,$xd0 -+ vpaddd @key[13],$xd1,$xd1 -+ vpaddd @key[14],$xd2,$xd2 -+ vpaddd @key[15],$xd3,$xd3 -+ -+ vpunpckldq $xd1,$xd0,$xt2 -+ vpunpckldq $xd3,$xd2,$xt3 -+ vpunpckhdq $xd1,$xd0,$xd0 -+ vpunpckhdq $xd3,$xd2,$xd2 -+ vpunpcklqdq $xt3,$xt2,$xd1 # "d0" -+ vpunpckhqdq $xt3,$xt2,$xt2 # "d1" -+ vpunpcklqdq $xd2,$xd0,$xd3 # "d2" -+ vpunpckhqdq $xd2,$xd0,$xd0 # "d3" -+___ -+ ($xd0,$xd1,$xd2,$xd3,$xt2)=($xd1,$xt2,$xd3,$xd0,$xd2); -+$code.=<<___; -+ vperm2i128 \$0x20,$xd0,$xc0,$xt3 # "de-interlace" further -+ vperm2i128 \$0x31,$xd0,$xc0,$xd0 -+ vperm2i128 \$0x20,$xd1,$xc1,$xc0 -+ vperm2i128 \$0x31,$xd1,$xc1,$xd1 -+ vperm2i128 \$0x20,$xd2,$xc2,$xc1 -+ vperm2i128 \$0x31,$xd2,$xc2,$xd2 -+ vperm2i128 \$0x20,$xd3,$xc3,$xc2 -+ vperm2i128 \$0x31,$xd3,$xc3,$xd3 -+___ -+ ($xc0,$xc1,$xc2,$xc3,$xt3)=($xt3,$xc0,$xc1,$xc2,$xc3); -+ ($xb0,$xb1,$xb2,$xb3,$xc0,$xc1,$xc2,$xc3)= -+ ($xc0,$xc1,$xc2,$xc3,$xb0,$xb1,$xb2,$xb3); -+$code.=<<___; -+ cmp \$64*8,$len -+ jb .Ltail8xvl -+ -+ mov \$0x80,%eax # size optimization -+ vpxord 0x00($inp),$xa0,$xa0 # xor with input -+ vpxor 0x20($inp),$xb0,$xb0 -+ vpxor 0x40($inp),$xc0,$xc0 -+ vpxor 0x60($inp),$xd0,$xd0 -+ lea ($inp,%rax),$inp # size optimization -+ vmovdqu32 $xa0,0x00($out) -+ vmovdqu $xb0,0x20($out) -+ vmovdqu $xc0,0x40($out) -+ vmovdqu $xd0,0x60($out) -+ lea ($out,%rax),$out # size optimization -+ -+ vpxor 0x00($inp),$xa1,$xa1 -+ vpxor 0x20($inp),$xb1,$xb1 -+ vpxor 0x40($inp),$xc1,$xc1 -+ vpxor 0x60($inp),$xd1,$xd1 -+ lea ($inp,%rax),$inp # size optimization -+ vmovdqu $xa1,0x00($out) -+ vmovdqu $xb1,0x20($out) -+ vmovdqu $xc1,0x40($out) -+ vmovdqu $xd1,0x60($out) -+ lea ($out,%rax),$out # size optimization -+ -+ vpxord 0x00($inp),$xa2,$xa2 -+ vpxor 0x20($inp),$xb2,$xb2 -+ vpxor 0x40($inp),$xc2,$xc2 -+ vpxor 0x60($inp),$xd2,$xd2 -+ lea ($inp,%rax),$inp # size optimization -+ vmovdqu32 $xa2,0x00($out) -+ vmovdqu $xb2,0x20($out) -+ vmovdqu $xc2,0x40($out) -+ vmovdqu $xd2,0x60($out) -+ lea ($out,%rax),$out # size optimization -+ -+ vpxor 0x00($inp),$xa3,$xa3 -+ vpxor 0x20($inp),$xb3,$xb3 -+ vpxor 0x40($inp),$xc3,$xc3 -+ vpxor 0x60($inp),$xd3,$xd3 -+ lea ($inp,%rax),$inp # size optimization -+ vmovdqu $xa3,0x00($out) -+ vmovdqu $xb3,0x20($out) -+ vmovdqu $xc3,0x40($out) -+ vmovdqu $xd3,0x60($out) -+ lea ($out,%rax),$out # size optimization -+ -+ vpbroadcastd 0(%r9),%ymm0 # reload key -+ vpbroadcastd 4(%r9),%ymm1 -+ -+ sub \$64*8,$len -+ jnz .Loop_outer8xvl -+ -+ jmp .Ldone8xvl -+ -+.align 32 -+.Ltail8xvl: -+ vmovdqa64 $xa0,%ymm8 # size optimization -+___ -+$xa0 = "%ymm8"; -+$code.=<<___; -+ xor %r9,%r9 -+ sub $inp,$out -+ cmp \$64*1,$len -+ jb .Less_than_64_8xvl -+ vpxor 0x00($inp),$xa0,$xa0 # xor with input -+ vpxor 0x20($inp),$xb0,$xb0 -+ vmovdqu $xa0,0x00($out,$inp) -+ vmovdqu $xb0,0x20($out,$inp) -+ je .Ldone8xvl -+ vmovdqa $xc0,$xa0 -+ vmovdqa $xd0,$xb0 -+ lea 64($inp),$inp -+ -+ cmp \$64*2,$len -+ jb .Less_than_64_8xvl -+ vpxor 0x00($inp),$xc0,$xc0 -+ vpxor 0x20($inp),$xd0,$xd0 -+ vmovdqu $xc0,0x00($out,$inp) -+ vmovdqu $xd0,0x20($out,$inp) -+ je .Ldone8xvl -+ vmovdqa $xa1,$xa0 -+ vmovdqa $xb1,$xb0 -+ lea 64($inp),$inp -+ -+ cmp \$64*3,$len -+ jb .Less_than_64_8xvl -+ vpxor 0x00($inp),$xa1,$xa1 -+ vpxor 0x20($inp),$xb1,$xb1 -+ vmovdqu $xa1,0x00($out,$inp) -+ vmovdqu $xb1,0x20($out,$inp) -+ je .Ldone8xvl -+ vmovdqa $xc1,$xa0 -+ vmovdqa $xd1,$xb0 -+ lea 64($inp),$inp -+ -+ cmp \$64*4,$len -+ jb .Less_than_64_8xvl -+ vpxor 0x00($inp),$xc1,$xc1 -+ vpxor 0x20($inp),$xd1,$xd1 -+ vmovdqu $xc1,0x00($out,$inp) -+ vmovdqu $xd1,0x20($out,$inp) -+ je .Ldone8xvl -+ vmovdqa32 $xa2,$xa0 -+ vmovdqa $xb2,$xb0 -+ lea 64($inp),$inp -+ -+ cmp \$64*5,$len -+ jb .Less_than_64_8xvl -+ vpxord 0x00($inp),$xa2,$xa2 -+ vpxor 0x20($inp),$xb2,$xb2 -+ vmovdqu32 $xa2,0x00($out,$inp) -+ vmovdqu $xb2,0x20($out,$inp) -+ je .Ldone8xvl -+ vmovdqa $xc2,$xa0 -+ vmovdqa $xd2,$xb0 -+ lea 64($inp),$inp -+ -+ cmp \$64*6,$len -+ jb .Less_than_64_8xvl -+ vpxor 0x00($inp),$xc2,$xc2 -+ vpxor 0x20($inp),$xd2,$xd2 -+ vmovdqu $xc2,0x00($out,$inp) -+ vmovdqu $xd2,0x20($out,$inp) -+ je .Ldone8xvl -+ vmovdqa $xa3,$xa0 -+ vmovdqa $xb3,$xb0 -+ lea 64($inp),$inp -+ -+ cmp \$64*7,$len -+ jb .Less_than_64_8xvl -+ vpxor 0x00($inp),$xa3,$xa3 -+ vpxor 0x20($inp),$xb3,$xb3 -+ vmovdqu $xa3,0x00($out,$inp) -+ vmovdqu $xb3,0x20($out,$inp) -+ je .Ldone8xvl -+ vmovdqa $xc3,$xa0 -+ vmovdqa $xd3,$xb0 -+ lea 64($inp),$inp -+ -+.Less_than_64_8xvl: -+ vmovdqa $xa0,0x00(%rsp) -+ vmovdqa $xb0,0x20(%rsp) -+ lea ($out,$inp),$out -+ and \$63,$len -+ -+.Loop_tail8xvl: -+ movzb ($inp,%r9),%eax -+ movzb (%rsp,%r9),%ecx -+ lea 1(%r9),%r9 -+ xor %ecx,%eax -+ mov %al,-1($out,%r9) -+ dec $len -+ jnz .Loop_tail8xvl -+ -+ vpxor $xa0,$xa0,$xa0 -+ vmovdqa $xa0,0x00(%rsp) -+ vmovdqa $xa0,0x20(%rsp) -+ -+.Ldone8xvl: -+ vzeroall -+___ -+$code.=<<___ if ($win64); -+ movaps -0xb0(%r10),%xmm6 -+ movaps -0xa0(%r10),%xmm7 -+ movaps -0x90(%r10),%xmm8 -+ movaps -0x80(%r10),%xmm9 -+ movaps -0x70(%r10),%xmm10 -+ movaps -0x60(%r10),%xmm11 -+ movaps -0x50(%r10),%xmm12 -+ movaps -0x40(%r10),%xmm13 -+ movaps -0x30(%r10),%xmm14 -+ movaps -0x20(%r10),%xmm15 -+___ -+$code.=<<___; -+ lea -8(%r10),%rsp -+.cfi_def_cfa_register %rsp -+.L8xvl_epilogue: -+ ret -+.cfi_endproc -+.size chacha20_8xvl,.-chacha20_8xvl -+___ -+if($kernel) { -+ $code .= "#endif\n"; -+} -+} -+ -+# EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, -+# CONTEXT *context,DISPATCHER_CONTEXT *disp) -+if ($win64) { -+$rec="%rcx"; -+$frame="%rdx"; -+$context="%r8"; -+$disp="%r9"; -+ -+$code.=<<___; -+.extern __imp_RtlVirtualUnwind -+.type se_handler,\@abi-omnipotent -+.align 16 -+se_handler: -+ push %rsi -+ push %rdi -+ push %rbx -+ push %rbp -+ push %r12 -+ push %r13 -+ push %r14 -+ push %r15 -+ pushfq -+ sub \$64,%rsp -+ -+ mov 120($context),%rax # pull context->Rax -+ mov 248($context),%rbx # pull context->Rip -+ -+ mov 8($disp),%rsi # disp->ImageBase -+ mov 56($disp),%r11 # disp->HandlerData -+ -+ lea .Lctr32_body(%rip),%r10 -+ cmp %r10,%rbx # context->Rip<.Lprologue -+ jb .Lcommon_seh_tail -+ -+ mov 152($context),%rax # pull context->Rsp -+ -+ lea .Lno_data(%rip),%r10 # epilogue label -+ cmp %r10,%rbx # context->Rip>=.Lepilogue -+ jae .Lcommon_seh_tail -+ -+ lea 64+24+48(%rax),%rax -+ -+ mov -8(%rax),%rbx -+ mov -16(%rax),%rbp -+ mov -24(%rax),%r12 -+ mov -32(%rax),%r13 -+ mov -40(%rax),%r14 -+ mov -48(%rax),%r15 -+ mov %rbx,144($context) # restore context->Rbx -+ mov %rbp,160($context) # restore context->Rbp -+ mov %r12,216($context) # restore context->R12 -+ mov %r13,224($context) # restore context->R13 -+ mov %r14,232($context) # restore context->R14 -+ mov %r15,240($context) # restore context->R14 -+ -+.Lcommon_seh_tail: -+ mov 8(%rax),%rdi -+ mov 16(%rax),%rsi -+ mov %rax,152($context) # restore context->Rsp -+ mov %rsi,168($context) # restore context->Rsi -+ mov %rdi,176($context) # restore context->Rdi -+ -+ mov 40($disp),%rdi # disp->ContextRecord -+ mov $context,%rsi # context -+ mov \$154,%ecx # sizeof(CONTEXT) -+ .long 0xa548f3fc # cld; rep movsq -+ -+ mov $disp,%rsi -+ xor %rcx,%rcx # arg1, UNW_FLAG_NHANDLER -+ mov 8(%rsi),%rdx # arg2, disp->ImageBase -+ mov 0(%rsi),%r8 # arg3, disp->ControlPc -+ mov 16(%rsi),%r9 # arg4, disp->FunctionEntry -+ mov 40(%rsi),%r10 # disp->ContextRecord -+ lea 56(%rsi),%r11 # &disp->HandlerData -+ lea 24(%rsi),%r12 # &disp->EstablisherFrame -+ mov %r10,32(%rsp) # arg5 -+ mov %r11,40(%rsp) # arg6 -+ mov %r12,48(%rsp) # arg7 -+ mov %rcx,56(%rsp) # arg8, (NULL) -+ call *__imp_RtlVirtualUnwind(%rip) -+ -+ mov \$1,%eax # ExceptionContinueSearch -+ add \$64,%rsp -+ popfq -+ pop %r15 -+ pop %r14 -+ pop %r13 -+ pop %r12 -+ pop %rbp -+ pop %rbx -+ pop %rdi -+ pop %rsi -+ ret -+.size se_handler,.-se_handler -+ -+.type simd_handler,\@abi-omnipotent -+.align 16 -+simd_handler: -+ push %rsi -+ push %rdi -+ push %rbx -+ push %rbp -+ push %r12 -+ push %r13 -+ push %r14 -+ push %r15 -+ pushfq -+ sub \$64,%rsp -+ -+ mov 120($context),%rax # pull context->Rax -+ mov 248($context),%rbx # pull context->Rip -+ -+ mov 8($disp),%rsi # disp->ImageBase -+ mov 56($disp),%r11 # disp->HandlerData -+ -+ mov 0(%r11),%r10d # HandlerData[0] -+ lea (%rsi,%r10),%r10 # prologue label -+ cmp %r10,%rbx # context->RipR9 -+ -+ mov 4(%r11),%r10d # HandlerData[1] -+ mov 8(%r11),%ecx # HandlerData[2] -+ lea (%rsi,%r10),%r10 # epilogue label -+ cmp %r10,%rbx # context->Rip>=epilogue label -+ jae .Lcommon_seh_tail -+ -+ neg %rcx -+ lea -8(%rax,%rcx),%rsi -+ lea 512($context),%rdi # &context.Xmm6 -+ neg %ecx -+ shr \$3,%ecx -+ .long 0xa548f3fc # cld; rep movsq -+ -+ jmp .Lcommon_seh_tail -+.size simd_handler,.-simd_handler -+ -+.section .pdata -+.align 4 -+ .rva .LSEH_begin_chacha20_ctr32 -+ .rva .LSEH_end_chacha20_ctr32 -+ .rva .LSEH_info_chacha20_ctr32 -+ -+ .rva .LSEH_begin_chacha20_ssse3 -+ .rva .LSEH_end_chacha20_ssse3 -+ .rva .LSEH_info_chacha20_ssse3 -+ -+ .rva .LSEH_begin_chacha20_128 -+ .rva .LSEH_end_chacha20_128 -+ .rva .LSEH_info_chacha20_128 -+ -+ .rva .LSEH_begin_chacha20_4x -+ .rva .LSEH_end_chacha20_4x -+ .rva .LSEH_info_chacha20_4x -+___ -+$code.=<<___ if ($avx); -+ .rva .LSEH_begin_chacha20_xop -+ .rva .LSEH_end_chacha20_xop -+ .rva .LSEH_info_chacha20_xop -+___ -+$code.=<<___ if ($avx>1); -+ .rva .LSEH_begin_chacha20_avx2 -+ .rva .LSEH_end_chacha20_avx2 -+ .rva .LSEH_info_chacha20_avx2 -+___ -+$code.=<<___ if ($avx>2); -+ .rva .LSEH_begin_chacha20_avx512 -+ .rva .LSEH_end_chacha20_avx512 -+ .rva .LSEH_info_chacha20_avx512 -+ -+ .rva .LSEH_begin_chacha20_avx512vl -+ .rva .LSEH_end_chacha20_avx512vl -+ .rva .LSEH_info_chacha20_avx512vl -+ -+ .rva .LSEH_begin_chacha20_16x -+ .rva .LSEH_end_chacha20_16x -+ .rva .LSEH_info_chacha20_16x -+ -+ .rva .LSEH_begin_chacha20_8xvl -+ .rva .LSEH_end_chacha20_8xvl -+ .rva .LSEH_info_chacha20_8xvl -+___ -+$code.=<<___; -+.section .xdata -+.align 8 -+.LSEH_info_chacha20_ctr32: -+ .byte 9,0,0,0 -+ .rva se_handler -+ -+.LSEH_info_chacha20_ssse3: -+ .byte 9,0,0,0 -+ .rva simd_handler -+ .rva .Lssse3_body,.Lssse3_epilogue -+ .long 0x20,0 -+ -+.LSEH_info_chacha20_128: -+ .byte 9,0,0,0 -+ .rva simd_handler -+ .rva .L128_body,.L128_epilogue -+ .long 0x60,0 -+ -+.LSEH_info_chacha20_4x: -+ .byte 9,0,0,0 -+ .rva simd_handler -+ .rva .L4x_body,.L4x_epilogue -+ .long 0xa0,0 -+___ -+$code.=<<___ if ($avx); -+.LSEH_info_chacha20_xop: -+ .byte 9,0,0,0 -+ .rva simd_handler -+ .rva .L4xop_body,.L4xop_epilogue # HandlerData[] -+ .long 0xa0,0 -+___ -+$code.=<<___ if ($avx>1); -+.LSEH_info_chacha20_avx2: -+ .byte 9,0,0,0 -+ .rva simd_handler -+ .rva .L8x_body,.L8x_epilogue # HandlerData[] -+ .long 0xa0,0 -+___ -+$code.=<<___ if ($avx>2); -+.LSEH_info_chacha20_avx512: -+ .byte 9,0,0,0 -+ .rva simd_handler -+ .rva .Lavx512_body,.Lavx512_epilogue # HandlerData[] -+ .long 0x20,0 -+ -+.LSEH_info_chacha20_avx512vl: -+ .byte 9,0,0,0 -+ .rva simd_handler -+ .rva .Lavx512vl_body,.Lavx512vl_epilogue # HandlerData[] -+ .long 0x20,0 -+ -+.LSEH_info_chacha20_16x: -+ .byte 9,0,0,0 -+ .rva simd_handler -+ .rva .L16x_body,.L16x_epilogue # HandlerData[] -+ .long 0xa0,0 -+ -+.LSEH_info_chacha20_8xvl: -+ .byte 9,0,0,0 -+ .rva simd_handler -+ .rva .L8xvl_body,.L8xvl_epilogue # HandlerData[] -+ .long 0xa0,0 -+___ -+} -+ -+open SELF,$0; -+while() { -+ next if (/^#!/); -+ last if (!s/^#/\/\// and !/^$/); -+ print; -+} -+close SELF; -+ -+foreach (split("\n",$code)) { -+ s/\`([^\`]*)\`/eval $1/ge; -+ -+ s/%x#%[yz]/%x/g; # "down-shift" -+ -+ if ($kernel) { -+ s/(^\.type.*),[0-9]+$/\1/; -+ next if /^\.cfi.*/; -+ } -+ -+ print $_,"\n"; -+} -+ -+close STDOUT; ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/poly1305/poly1305-arm.pl 2019-08-20 20:26:42.400341426 +0000 -@@ -0,0 +1,1276 @@ -+#!/usr/bin/env perl -+# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause -+# -+# This code is taken from the OpenSSL project but the author, Andy Polyakov, -+# has relicensed it under the licenses specified in the SPDX header above. -+# The original headers, including the original license headers, are -+# included below for completeness. -+# -+# ==================================================================== -+# Written by Andy Polyakov for the OpenSSL -+# project. The module is, however, dual licensed under OpenSSL and -+# CRYPTOGAMS licenses depending on where you obtain it. For further -+# details see http://www.openssl.org/~appro/cryptogams/. -+# ==================================================================== -+# -+# IALU(*)/gcc-4.4 NEON -+# -+# ARM11xx(ARMv6) 7.78/+100% - -+# Cortex-A5 6.35/+130% 3.00 -+# Cortex-A8 6.25/+115% 2.36 -+# Cortex-A9 5.10/+95% 2.55 -+# Cortex-A15 3.85/+85% 1.25(**) -+# Snapdragon S4 5.70/+100% 1.48(**) -+# -+# (*) this is for -march=armv6, i.e. with bunch of ldrb loading data; -+# (**) these are trade-off results, they can be improved by ~8% but at -+# the cost of 15/12% regression on Cortex-A5/A7, it's even possible -+# to improve Cortex-A9 result, but then A5/A7 loose more than 20%; -+ -+$flavour = shift; -+if ($flavour=~/\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; } -+else { while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {} } -+ -+if ($flavour && $flavour ne "void") { -+ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; -+ ( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or -+ ( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or -+ die "can't locate arm-xlate.pl"; -+ -+ open STDOUT,"| \"$^X\" $xlate $flavour $output"; -+} else { -+ open STDOUT,">$output"; -+} -+ -+($ctx,$inp,$len,$padbit)=map("r$_",(0..3)); -+ -+$code.=<<___; -+#ifndef __KERNEL__ -+# include "arm_arch.h" -+#else -+# define __ARM_ARCH__ __LINUX_ARM_ARCH__ -+# define __ARM_MAX_ARCH__ __LINUX_ARM_ARCH__ -+# define poly1305_init poly1305_init_arm -+# define poly1305_blocks poly1305_blocks_arm -+# define poly1305_emit poly1305_emit_arm -+#endif -+ -+.text -+#if defined(__thumb2__) -+.syntax unified -+.thumb -+#else -+.code 32 -+#endif -+ -+.globl poly1305_emit -+.globl poly1305_blocks -+.globl poly1305_init -+.type poly1305_init,%function -+.align 5 -+poly1305_init: -+.Lpoly1305_init: -+ stmdb sp!,{r4-r11} -+ -+ eor r3,r3,r3 -+ cmp $inp,#0 -+ str r3,[$ctx,#0] @ zero hash value -+ str r3,[$ctx,#4] -+ str r3,[$ctx,#8] -+ str r3,[$ctx,#12] -+ str r3,[$ctx,#16] -+ str r3,[$ctx,#36] @ is_base2_26 -+ add $ctx,$ctx,#20 -+ -+#ifdef __thumb2__ -+ it eq -+#endif -+ moveq r0,#0 -+ beq .Lno_key -+ -+#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) -+ adr r11,.Lpoly1305_init -+ ldr r12,.LOPENSSL_armcap -+#endif -+ ldrb r4,[$inp,#0] -+ mov r10,#0x0fffffff -+ ldrb r5,[$inp,#1] -+ and r3,r10,#-4 @ 0x0ffffffc -+ ldrb r6,[$inp,#2] -+ ldrb r7,[$inp,#3] -+ orr r4,r4,r5,lsl#8 -+ ldrb r5,[$inp,#4] -+ orr r4,r4,r6,lsl#16 -+ ldrb r6,[$inp,#5] -+ orr r4,r4,r7,lsl#24 -+ ldrb r7,[$inp,#6] -+ and r4,r4,r10 -+ -+#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) -+ ldr r12,[r11,r12] @ OPENSSL_armcap_P -+# ifdef __APPLE__ -+ ldr r12,[r12] -+# endif -+#endif -+ ldrb r8,[$inp,#7] -+ orr r5,r5,r6,lsl#8 -+ ldrb r6,[$inp,#8] -+ orr r5,r5,r7,lsl#16 -+ ldrb r7,[$inp,#9] -+ orr r5,r5,r8,lsl#24 -+ ldrb r8,[$inp,#10] -+ and r5,r5,r3 -+ -+#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) -+ tst r12,#ARMV7_NEON @ check for NEON -+# ifdef __APPLE__ -+ adr r9,poly1305_blocks_neon -+ adr r11,poly1305_blocks -+# ifdef __thumb2__ -+ it ne -+# endif -+ movne r11,r9 -+ adr r12,poly1305_emit -+ adr r10,poly1305_emit_neon -+# ifdef __thumb2__ -+ it ne -+# endif -+ movne r12,r10 -+# else -+# ifdef __thumb2__ -+ itete eq -+# endif -+ addeq r12,r11,#(poly1305_emit-.Lpoly1305_init) -+ addne r12,r11,#(poly1305_emit_neon-.Lpoly1305_init) -+ addeq r11,r11,#(poly1305_blocks-.Lpoly1305_init) -+ addne r11,r11,#(poly1305_blocks_neon-.Lpoly1305_init) -+# endif -+# ifdef __thumb2__ -+ orr r12,r12,#1 @ thumb-ify address -+ orr r11,r11,#1 -+# endif -+#endif -+ ldrb r9,[$inp,#11] -+ orr r6,r6,r7,lsl#8 -+ ldrb r7,[$inp,#12] -+ orr r6,r6,r8,lsl#16 -+ ldrb r8,[$inp,#13] -+ orr r6,r6,r9,lsl#24 -+ ldrb r9,[$inp,#14] -+ and r6,r6,r3 -+ -+ ldrb r10,[$inp,#15] -+ orr r7,r7,r8,lsl#8 -+ str r4,[$ctx,#0] -+ orr r7,r7,r9,lsl#16 -+ str r5,[$ctx,#4] -+ orr r7,r7,r10,lsl#24 -+ str r6,[$ctx,#8] -+ and r7,r7,r3 -+ str r7,[$ctx,#12] -+#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) -+ stmia r2,{r11,r12} @ fill functions table -+ mov r0,#1 -+#else -+ mov r0,#0 -+#endif -+.Lno_key: -+ ldmia sp!,{r4-r11} -+#if __ARM_ARCH__>=5 -+ ret @ bx lr -+#else -+ tst lr,#1 -+ moveq pc,lr @ be binary compatible with V4, yet -+ bx lr @ interoperable with Thumb ISA:-) -+#endif -+.size poly1305_init,.-poly1305_init -+___ -+{ -+my ($h0,$h1,$h2,$h3,$h4,$r0,$r1,$r2,$r3)=map("r$_",(4..12)); -+my ($s1,$s2,$s3)=($r1,$r2,$r3); -+ -+$code.=<<___; -+.type poly1305_blocks,%function -+.align 5 -+poly1305_blocks: -+.Lpoly1305_blocks: -+ stmdb sp!,{r3-r11,lr} -+ -+ ands $len,$len,#-16 -+ beq .Lno_data -+ -+ cmp $padbit,#0 -+ add $len,$len,$inp @ end pointer -+ sub sp,sp,#32 -+ -+ ldmia $ctx,{$h0-$r3} @ load context -+ -+ str $ctx,[sp,#12] @ offload stuff -+ mov lr,$inp -+ str $len,[sp,#16] -+ str $r1,[sp,#20] -+ str $r2,[sp,#24] -+ str $r3,[sp,#28] -+ b .Loop -+ -+.Loop: -+#if __ARM_ARCH__<7 -+ ldrb r0,[lr],#16 @ load input -+# ifdef __thumb2__ -+ it hi -+# endif -+ addhi $h4,$h4,#1 @ 1<<128 -+ ldrb r1,[lr,#-15] -+ ldrb r2,[lr,#-14] -+ ldrb r3,[lr,#-13] -+ orr r1,r0,r1,lsl#8 -+ ldrb r0,[lr,#-12] -+ orr r2,r1,r2,lsl#16 -+ ldrb r1,[lr,#-11] -+ orr r3,r2,r3,lsl#24 -+ ldrb r2,[lr,#-10] -+ adds $h0,$h0,r3 @ accumulate input -+ -+ ldrb r3,[lr,#-9] -+ orr r1,r0,r1,lsl#8 -+ ldrb r0,[lr,#-8] -+ orr r2,r1,r2,lsl#16 -+ ldrb r1,[lr,#-7] -+ orr r3,r2,r3,lsl#24 -+ ldrb r2,[lr,#-6] -+ adcs $h1,$h1,r3 -+ -+ ldrb r3,[lr,#-5] -+ orr r1,r0,r1,lsl#8 -+ ldrb r0,[lr,#-4] -+ orr r2,r1,r2,lsl#16 -+ ldrb r1,[lr,#-3] -+ orr r3,r2,r3,lsl#24 -+ ldrb r2,[lr,#-2] -+ adcs $h2,$h2,r3 -+ -+ ldrb r3,[lr,#-1] -+ orr r1,r0,r1,lsl#8 -+ str lr,[sp,#8] @ offload input pointer -+ orr r2,r1,r2,lsl#16 -+ add $s1,$r1,$r1,lsr#2 -+ orr r3,r2,r3,lsl#24 -+#else -+ ldr r0,[lr],#16 @ load input -+# ifdef __thumb2__ -+ it hi -+# endif -+ addhi $h4,$h4,#1 @ padbit -+ ldr r1,[lr,#-12] -+ ldr r2,[lr,#-8] -+ ldr r3,[lr,#-4] -+# ifdef __ARMEB__ -+ rev r0,r0 -+ rev r1,r1 -+ rev r2,r2 -+ rev r3,r3 -+# endif -+ adds $h0,$h0,r0 @ accumulate input -+ str lr,[sp,#8] @ offload input pointer -+ adcs $h1,$h1,r1 -+ add $s1,$r1,$r1,lsr#2 -+ adcs $h2,$h2,r2 -+#endif -+ add $s2,$r2,$r2,lsr#2 -+ adcs $h3,$h3,r3 -+ add $s3,$r3,$r3,lsr#2 -+ -+ umull r2,r3,$h1,$r0 -+ adc $h4,$h4,#0 -+ umull r0,r1,$h0,$r0 -+ umlal r2,r3,$h4,$s1 -+ umlal r0,r1,$h3,$s1 -+ ldr $r1,[sp,#20] @ reload $r1 -+ umlal r2,r3,$h2,$s3 -+ umlal r0,r1,$h1,$s3 -+ umlal r2,r3,$h3,$s2 -+ umlal r0,r1,$h2,$s2 -+ umlal r2,r3,$h0,$r1 -+ str r0,[sp,#0] @ future $h0 -+ mul r0,$s2,$h4 -+ ldr $r2,[sp,#24] @ reload $r2 -+ adds r2,r2,r1 @ d1+=d0>>32 -+ eor r1,r1,r1 -+ adc lr,r3,#0 @ future $h2 -+ str r2,[sp,#4] @ future $h1 -+ -+ mul r2,$s3,$h4 -+ eor r3,r3,r3 -+ umlal r0,r1,$h3,$s3 -+ ldr $r3,[sp,#28] @ reload $r3 -+ umlal r2,r3,$h3,$r0 -+ umlal r0,r1,$h2,$r0 -+ umlal r2,r3,$h2,$r1 -+ umlal r0,r1,$h1,$r1 -+ umlal r2,r3,$h1,$r2 -+ umlal r0,r1,$h0,$r2 -+ umlal r2,r3,$h0,$r3 -+ ldr $h0,[sp,#0] -+ mul $h4,$r0,$h4 -+ ldr $h1,[sp,#4] -+ -+ adds $h2,lr,r0 @ d2+=d1>>32 -+ ldr lr,[sp,#8] @ reload input pointer -+ adc r1,r1,#0 -+ adds $h3,r2,r1 @ d3+=d2>>32 -+ ldr r0,[sp,#16] @ reload end pointer -+ adc r3,r3,#0 -+ add $h4,$h4,r3 @ h4+=d3>>32 -+ -+ and r1,$h4,#-4 -+ and $h4,$h4,#3 -+ add r1,r1,r1,lsr#2 @ *=5 -+ adds $h0,$h0,r1 -+ adcs $h1,$h1,#0 -+ adcs $h2,$h2,#0 -+ adcs $h3,$h3,#0 -+ adc $h4,$h4,#0 -+ -+ cmp r0,lr @ done yet? -+ bhi .Loop -+ -+ ldr $ctx,[sp,#12] -+ add sp,sp,#32 -+ stmia $ctx,{$h0-$h4} @ store the result -+ -+.Lno_data: -+#if __ARM_ARCH__>=5 -+ ldmia sp!,{r3-r11,pc} -+#else -+ ldmia sp!,{r3-r11,lr} -+ tst lr,#1 -+ moveq pc,lr @ be binary compatible with V4, yet -+ bx lr @ interoperable with Thumb ISA:-) -+#endif -+.size poly1305_blocks,.-poly1305_blocks -+___ -+} -+{ -+my ($ctx,$mac,$nonce)=map("r$_",(0..2)); -+my ($h0,$h1,$h2,$h3,$h4,$g0,$g1,$g2,$g3)=map("r$_",(3..11)); -+my $g4=$h4; -+ -+$code.=<<___; -+.type poly1305_emit,%function -+.align 5 -+poly1305_emit: -+ stmdb sp!,{r4-r11} -+.Lpoly1305_emit_enter: -+ -+ ldmia $ctx,{$h0-$h4} -+ adds $g0,$h0,#5 @ compare to modulus -+ adcs $g1,$h1,#0 -+ adcs $g2,$h2,#0 -+ adcs $g3,$h3,#0 -+ adc $g4,$h4,#0 -+ tst $g4,#4 @ did it carry/borrow? -+ -+#ifdef __thumb2__ -+ it ne -+#endif -+ movne $h0,$g0 -+ ldr $g0,[$nonce,#0] -+#ifdef __thumb2__ -+ it ne -+#endif -+ movne $h1,$g1 -+ ldr $g1,[$nonce,#4] -+#ifdef __thumb2__ -+ it ne -+#endif -+ movne $h2,$g2 -+ ldr $g2,[$nonce,#8] -+#ifdef __thumb2__ -+ it ne -+#endif -+ movne $h3,$g3 -+ ldr $g3,[$nonce,#12] -+ -+ adds $h0,$h0,$g0 -+ adcs $h1,$h1,$g1 -+ adcs $h2,$h2,$g2 -+ adc $h3,$h3,$g3 -+ -+#if __ARM_ARCH__>=7 -+# ifdef __ARMEB__ -+ rev $h0,$h0 -+ rev $h1,$h1 -+ rev $h2,$h2 -+ rev $h3,$h3 -+# endif -+ str $h0,[$mac,#0] -+ str $h1,[$mac,#4] -+ str $h2,[$mac,#8] -+ str $h3,[$mac,#12] -+#else -+ strb $h0,[$mac,#0] -+ mov $h0,$h0,lsr#8 -+ strb $h1,[$mac,#4] -+ mov $h1,$h1,lsr#8 -+ strb $h2,[$mac,#8] -+ mov $h2,$h2,lsr#8 -+ strb $h3,[$mac,#12] -+ mov $h3,$h3,lsr#8 -+ -+ strb $h0,[$mac,#1] -+ mov $h0,$h0,lsr#8 -+ strb $h1,[$mac,#5] -+ mov $h1,$h1,lsr#8 -+ strb $h2,[$mac,#9] -+ mov $h2,$h2,lsr#8 -+ strb $h3,[$mac,#13] -+ mov $h3,$h3,lsr#8 -+ -+ strb $h0,[$mac,#2] -+ mov $h0,$h0,lsr#8 -+ strb $h1,[$mac,#6] -+ mov $h1,$h1,lsr#8 -+ strb $h2,[$mac,#10] -+ mov $h2,$h2,lsr#8 -+ strb $h3,[$mac,#14] -+ mov $h3,$h3,lsr#8 -+ -+ strb $h0,[$mac,#3] -+ strb $h1,[$mac,#7] -+ strb $h2,[$mac,#11] -+ strb $h3,[$mac,#15] -+#endif -+ ldmia sp!,{r4-r11} -+#if __ARM_ARCH__>=5 -+ ret @ bx lr -+#else -+ tst lr,#1 -+ moveq pc,lr @ be binary compatible with V4, yet -+ bx lr @ interoperable with Thumb ISA:-) -+#endif -+.size poly1305_emit,.-poly1305_emit -+___ -+{ -+my ($R0,$R1,$S1,$R2,$S2,$R3,$S3,$R4,$S4) = map("d$_",(0..9)); -+my ($D0,$D1,$D2,$D3,$D4, $H0,$H1,$H2,$H3,$H4) = map("q$_",(5..14)); -+my ($T0,$T1,$MASK) = map("q$_",(15,4,0)); -+ -+my ($in2,$zeros,$tbl0,$tbl1) = map("r$_",(4..7)); -+ -+$code.=<<___; -+#if (defined(__KERNEL__) && defined(CONFIG_KERNEL_MODE_NEON)) || (!defined(__KERNEL__) && __ARM_MAX_ARCH__>=7) -+.fpu neon -+ -+.type poly1305_init_neon,%function -+.align 5 -+poly1305_init_neon: -+.Lpoly1305_init_neon: -+ ldr r4,[$ctx,#20] @ load key base 2^32 -+ ldr r5,[$ctx,#24] -+ ldr r6,[$ctx,#28] -+ ldr r7,[$ctx,#32] -+ -+ and r2,r4,#0x03ffffff @ base 2^32 -> base 2^26 -+ mov r3,r4,lsr#26 -+ mov r4,r5,lsr#20 -+ orr r3,r3,r5,lsl#6 -+ mov r5,r6,lsr#14 -+ orr r4,r4,r6,lsl#12 -+ mov r6,r7,lsr#8 -+ orr r5,r5,r7,lsl#18 -+ and r3,r3,#0x03ffffff -+ and r4,r4,#0x03ffffff -+ and r5,r5,#0x03ffffff -+ -+ vdup.32 $R0,r2 @ r^1 in both lanes -+ add r2,r3,r3,lsl#2 @ *5 -+ vdup.32 $R1,r3 -+ add r3,r4,r4,lsl#2 -+ vdup.32 $S1,r2 -+ vdup.32 $R2,r4 -+ add r4,r5,r5,lsl#2 -+ vdup.32 $S2,r3 -+ vdup.32 $R3,r5 -+ add r5,r6,r6,lsl#2 -+ vdup.32 $S3,r4 -+ vdup.32 $R4,r6 -+ vdup.32 $S4,r5 -+ -+ mov $zeros,#2 @ counter -+ -+.Lsquare_neon: -+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -+ @ d0 = h0*r0 + h4*5*r1 + h3*5*r2 + h2*5*r3 + h1*5*r4 -+ @ d1 = h1*r0 + h0*r1 + h4*5*r2 + h3*5*r3 + h2*5*r4 -+ @ d2 = h2*r0 + h1*r1 + h0*r2 + h4*5*r3 + h3*5*r4 -+ @ d3 = h3*r0 + h2*r1 + h1*r2 + h0*r3 + h4*5*r4 -+ @ d4 = h4*r0 + h3*r1 + h2*r2 + h1*r3 + h0*r4 -+ -+ vmull.u32 $D0,$R0,${R0}[1] -+ vmull.u32 $D1,$R1,${R0}[1] -+ vmull.u32 $D2,$R2,${R0}[1] -+ vmull.u32 $D3,$R3,${R0}[1] -+ vmull.u32 $D4,$R4,${R0}[1] -+ -+ vmlal.u32 $D0,$R4,${S1}[1] -+ vmlal.u32 $D1,$R0,${R1}[1] -+ vmlal.u32 $D2,$R1,${R1}[1] -+ vmlal.u32 $D3,$R2,${R1}[1] -+ vmlal.u32 $D4,$R3,${R1}[1] -+ -+ vmlal.u32 $D0,$R3,${S2}[1] -+ vmlal.u32 $D1,$R4,${S2}[1] -+ vmlal.u32 $D3,$R1,${R2}[1] -+ vmlal.u32 $D2,$R0,${R2}[1] -+ vmlal.u32 $D4,$R2,${R2}[1] -+ -+ vmlal.u32 $D0,$R2,${S3}[1] -+ vmlal.u32 $D3,$R0,${R3}[1] -+ vmlal.u32 $D1,$R3,${S3}[1] -+ vmlal.u32 $D2,$R4,${S3}[1] -+ vmlal.u32 $D4,$R1,${R3}[1] -+ -+ vmlal.u32 $D3,$R4,${S4}[1] -+ vmlal.u32 $D0,$R1,${S4}[1] -+ vmlal.u32 $D1,$R2,${S4}[1] -+ vmlal.u32 $D2,$R3,${S4}[1] -+ vmlal.u32 $D4,$R0,${R4}[1] -+ -+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -+ @ lazy reduction as discussed in "NEON crypto" by D.J. Bernstein -+ @ and P. Schwabe -+ @ -+ @ H0>>+H1>>+H2>>+H3>>+H4 -+ @ H3>>+H4>>*5+H0>>+H1 -+ @ -+ @ Trivia. -+ @ -+ @ Result of multiplication of n-bit number by m-bit number is -+ @ n+m bits wide. However! Even though 2^n is a n+1-bit number, -+ @ m-bit number multiplied by 2^n is still n+m bits wide. -+ @ -+ @ Sum of two n-bit numbers is n+1 bits wide, sum of three - n+2, -+ @ and so is sum of four. Sum of 2^m n-m-bit numbers and n-bit -+ @ one is n+1 bits wide. -+ @ -+ @ >>+ denotes Hnext += Hn>>26, Hn &= 0x3ffffff. This means that -+ @ H0, H2, H3 are guaranteed to be 26 bits wide, while H1 and H4 -+ @ can be 27. However! In cases when their width exceeds 26 bits -+ @ they are limited by 2^26+2^6. This in turn means that *sum* -+ @ of the products with these values can still be viewed as sum -+ @ of 52-bit numbers as long as the amount of addends is not a -+ @ power of 2. For example, -+ @ -+ @ H4 = H4*R0 + H3*R1 + H2*R2 + H1*R3 + H0 * R4, -+ @ -+ @ which can't be larger than 5 * (2^26 + 2^6) * (2^26 + 2^6), or -+ @ 5 * (2^52 + 2*2^32 + 2^12), which in turn is smaller than -+ @ 8 * (2^52) or 2^55. However, the value is then multiplied by -+ @ by 5, so we should be looking at 5 * 5 * (2^52 + 2^33 + 2^12), -+ @ which is less than 32 * (2^52) or 2^57. And when processing -+ @ data we are looking at triple as many addends... -+ @ -+ @ In key setup procedure pre-reduced H0 is limited by 5*4+1 and -+ @ 5*H4 - by 5*5 52-bit addends, or 57 bits. But when hashing the -+ @ input H0 is limited by (5*4+1)*3 addends, or 58 bits, while -+ @ 5*H4 by 5*5*3, or 59[!] bits. How is this relevant? vmlal.u32 -+ @ instruction accepts 2x32-bit input and writes 2x64-bit result. -+ @ This means that result of reduction have to be compressed upon -+ @ loop wrap-around. This can be done in the process of reduction -+ @ to minimize amount of instructions [as well as amount of -+ @ 128-bit instructions, which benefits low-end processors], but -+ @ one has to watch for H2 (which is narrower than H0) and 5*H4 -+ @ not being wider than 58 bits, so that result of right shift -+ @ by 26 bits fits in 32 bits. This is also useful on x86, -+ @ because it allows to use paddd in place for paddq, which -+ @ benefits Atom, where paddq is ridiculously slow. -+ -+ vshr.u64 $T0,$D3,#26 -+ vmovn.i64 $D3#lo,$D3 -+ vshr.u64 $T1,$D0,#26 -+ vmovn.i64 $D0#lo,$D0 -+ vadd.i64 $D4,$D4,$T0 @ h3 -> h4 -+ vbic.i32 $D3#lo,#0xfc000000 @ &=0x03ffffff -+ vadd.i64 $D1,$D1,$T1 @ h0 -> h1 -+ vbic.i32 $D0#lo,#0xfc000000 -+ -+ vshrn.u64 $T0#lo,$D4,#26 -+ vmovn.i64 $D4#lo,$D4 -+ vshr.u64 $T1,$D1,#26 -+ vmovn.i64 $D1#lo,$D1 -+ vadd.i64 $D2,$D2,$T1 @ h1 -> h2 -+ vbic.i32 $D4#lo,#0xfc000000 -+ vbic.i32 $D1#lo,#0xfc000000 -+ -+ vadd.i32 $D0#lo,$D0#lo,$T0#lo -+ vshl.u32 $T0#lo,$T0#lo,#2 -+ vshrn.u64 $T1#lo,$D2,#26 -+ vmovn.i64 $D2#lo,$D2 -+ vadd.i32 $D0#lo,$D0#lo,$T0#lo @ h4 -> h0 -+ vadd.i32 $D3#lo,$D3#lo,$T1#lo @ h2 -> h3 -+ vbic.i32 $D2#lo,#0xfc000000 -+ -+ vshr.u32 $T0#lo,$D0#lo,#26 -+ vbic.i32 $D0#lo,#0xfc000000 -+ vshr.u32 $T1#lo,$D3#lo,#26 -+ vbic.i32 $D3#lo,#0xfc000000 -+ vadd.i32 $D1#lo,$D1#lo,$T0#lo @ h0 -> h1 -+ vadd.i32 $D4#lo,$D4#lo,$T1#lo @ h3 -> h4 -+ -+ subs $zeros,$zeros,#1 -+ beq .Lsquare_break_neon -+ -+ add $tbl0,$ctx,#(48+0*9*4) -+ add $tbl1,$ctx,#(48+1*9*4) -+ -+ vtrn.32 $R0,$D0#lo @ r^2:r^1 -+ vtrn.32 $R2,$D2#lo -+ vtrn.32 $R3,$D3#lo -+ vtrn.32 $R1,$D1#lo -+ vtrn.32 $R4,$D4#lo -+ -+ vshl.u32 $S2,$R2,#2 @ *5 -+ vshl.u32 $S3,$R3,#2 -+ vshl.u32 $S1,$R1,#2 -+ vshl.u32 $S4,$R4,#2 -+ vadd.i32 $S2,$S2,$R2 -+ vadd.i32 $S1,$S1,$R1 -+ vadd.i32 $S3,$S3,$R3 -+ vadd.i32 $S4,$S4,$R4 -+ -+ vst4.32 {${R0}[0],${R1}[0],${S1}[0],${R2}[0]},[$tbl0]! -+ vst4.32 {${R0}[1],${R1}[1],${S1}[1],${R2}[1]},[$tbl1]! -+ vst4.32 {${S2}[0],${R3}[0],${S3}[0],${R4}[0]},[$tbl0]! -+ vst4.32 {${S2}[1],${R3}[1],${S3}[1],${R4}[1]},[$tbl1]! -+ vst1.32 {${S4}[0]},[$tbl0,:32] -+ vst1.32 {${S4}[1]},[$tbl1,:32] -+ -+ b .Lsquare_neon -+ -+.align 4 -+.Lsquare_break_neon: -+ add $tbl0,$ctx,#(48+2*4*9) -+ add $tbl1,$ctx,#(48+3*4*9) -+ -+ vmov $R0,$D0#lo @ r^4:r^3 -+ vshl.u32 $S1,$D1#lo,#2 @ *5 -+ vmov $R1,$D1#lo -+ vshl.u32 $S2,$D2#lo,#2 -+ vmov $R2,$D2#lo -+ vshl.u32 $S3,$D3#lo,#2 -+ vmov $R3,$D3#lo -+ vshl.u32 $S4,$D4#lo,#2 -+ vmov $R4,$D4#lo -+ vadd.i32 $S1,$S1,$D1#lo -+ vadd.i32 $S2,$S2,$D2#lo -+ vadd.i32 $S3,$S3,$D3#lo -+ vadd.i32 $S4,$S4,$D4#lo -+ -+ vst4.32 {${R0}[0],${R1}[0],${S1}[0],${R2}[0]},[$tbl0]! -+ vst4.32 {${R0}[1],${R1}[1],${S1}[1],${R2}[1]},[$tbl1]! -+ vst4.32 {${S2}[0],${R3}[0],${S3}[0],${R4}[0]},[$tbl0]! -+ vst4.32 {${S2}[1],${R3}[1],${S3}[1],${R4}[1]},[$tbl1]! -+ vst1.32 {${S4}[0]},[$tbl0] -+ vst1.32 {${S4}[1]},[$tbl1] -+ -+ ret @ bx lr -+.size poly1305_init_neon,.-poly1305_init_neon -+ -+#ifdef __KERNEL__ -+.globl poly1305_blocks_neon -+#endif -+.type poly1305_blocks_neon,%function -+.align 5 -+poly1305_blocks_neon: -+ ldr ip,[$ctx,#36] @ is_base2_26 -+ ands $len,$len,#-16 -+ beq .Lno_data_neon -+ -+ cmp $len,#64 -+ bhs .Lenter_neon -+ tst ip,ip @ is_base2_26? -+ beq .Lpoly1305_blocks -+ -+.Lenter_neon: -+ stmdb sp!,{r4-r7} -+ vstmdb sp!,{d8-d15} @ ABI specification says so -+ -+ tst ip,ip @ is_base2_26? -+ bne .Lbase2_26_neon -+ -+ stmdb sp!,{r1-r3,lr} -+ bl .Lpoly1305_init_neon -+ -+ ldr r4,[$ctx,#0] @ load hash value base 2^32 -+ ldr r5,[$ctx,#4] -+ ldr r6,[$ctx,#8] -+ ldr r7,[$ctx,#12] -+ ldr ip,[$ctx,#16] -+ -+ and r2,r4,#0x03ffffff @ base 2^32 -> base 2^26 -+ mov r3,r4,lsr#26 -+ veor $D0#lo,$D0#lo,$D0#lo -+ mov r4,r5,lsr#20 -+ orr r3,r3,r5,lsl#6 -+ veor $D1#lo,$D1#lo,$D1#lo -+ mov r5,r6,lsr#14 -+ orr r4,r4,r6,lsl#12 -+ veor $D2#lo,$D2#lo,$D2#lo -+ mov r6,r7,lsr#8 -+ orr r5,r5,r7,lsl#18 -+ veor $D3#lo,$D3#lo,$D3#lo -+ and r3,r3,#0x03ffffff -+ orr r6,r6,ip,lsl#24 -+ veor $D4#lo,$D4#lo,$D4#lo -+ and r4,r4,#0x03ffffff -+ mov r1,#1 -+ and r5,r5,#0x03ffffff -+ str r1,[$ctx,#36] @ is_base2_26 -+ -+ vmov.32 $D0#lo[0],r2 -+ vmov.32 $D1#lo[0],r3 -+ vmov.32 $D2#lo[0],r4 -+ vmov.32 $D3#lo[0],r5 -+ vmov.32 $D4#lo[0],r6 -+ adr $zeros,.Lzeros -+ -+ ldmia sp!,{r1-r3,lr} -+ b .Lbase2_32_neon -+ -+.align 4 -+.Lbase2_26_neon: -+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -+ @ load hash value -+ -+ veor $D0#lo,$D0#lo,$D0#lo -+ veor $D1#lo,$D1#lo,$D1#lo -+ veor $D2#lo,$D2#lo,$D2#lo -+ veor $D3#lo,$D3#lo,$D3#lo -+ veor $D4#lo,$D4#lo,$D4#lo -+ vld4.32 {$D0#lo[0],$D1#lo[0],$D2#lo[0],$D3#lo[0]},[$ctx]! -+ adr $zeros,.Lzeros -+ vld1.32 {$D4#lo[0]},[$ctx] -+ sub $ctx,$ctx,#16 @ rewind -+ -+.Lbase2_32_neon: -+ add $in2,$inp,#32 -+ mov $padbit,$padbit,lsl#24 -+ tst $len,#31 -+ beq .Leven -+ -+ vld4.32 {$H0#lo[0],$H1#lo[0],$H2#lo[0],$H3#lo[0]},[$inp]! -+ vmov.32 $H4#lo[0],$padbit -+ sub $len,$len,#16 -+ add $in2,$inp,#32 -+ -+# ifdef __ARMEB__ -+ vrev32.8 $H0,$H0 -+ vrev32.8 $H3,$H3 -+ vrev32.8 $H1,$H1 -+ vrev32.8 $H2,$H2 -+# endif -+ vsri.u32 $H4#lo,$H3#lo,#8 @ base 2^32 -> base 2^26 -+ vshl.u32 $H3#lo,$H3#lo,#18 -+ -+ vsri.u32 $H3#lo,$H2#lo,#14 -+ vshl.u32 $H2#lo,$H2#lo,#12 -+ vadd.i32 $H4#hi,$H4#lo,$D4#lo @ add hash value and move to #hi -+ -+ vbic.i32 $H3#lo,#0xfc000000 -+ vsri.u32 $H2#lo,$H1#lo,#20 -+ vshl.u32 $H1#lo,$H1#lo,#6 -+ -+ vbic.i32 $H2#lo,#0xfc000000 -+ vsri.u32 $H1#lo,$H0#lo,#26 -+ vadd.i32 $H3#hi,$H3#lo,$D3#lo -+ -+ vbic.i32 $H0#lo,#0xfc000000 -+ vbic.i32 $H1#lo,#0xfc000000 -+ vadd.i32 $H2#hi,$H2#lo,$D2#lo -+ -+ vadd.i32 $H0#hi,$H0#lo,$D0#lo -+ vadd.i32 $H1#hi,$H1#lo,$D1#lo -+ -+ mov $tbl1,$zeros -+ add $tbl0,$ctx,#48 -+ -+ cmp $len,$len -+ b .Long_tail -+ -+.align 4 -+.Leven: -+ subs $len,$len,#64 -+ it lo -+ movlo $in2,$zeros -+ -+ vmov.i32 $H4,#1<<24 @ padbit, yes, always -+ vld4.32 {$H0#lo,$H1#lo,$H2#lo,$H3#lo},[$inp] @ inp[0:1] -+ add $inp,$inp,#64 -+ vld4.32 {$H0#hi,$H1#hi,$H2#hi,$H3#hi},[$in2] @ inp[2:3] (or 0) -+ add $in2,$in2,#64 -+ itt hi -+ addhi $tbl1,$ctx,#(48+1*9*4) -+ addhi $tbl0,$ctx,#(48+3*9*4) -+ -+# ifdef __ARMEB__ -+ vrev32.8 $H0,$H0 -+ vrev32.8 $H3,$H3 -+ vrev32.8 $H1,$H1 -+ vrev32.8 $H2,$H2 -+# endif -+ vsri.u32 $H4,$H3,#8 @ base 2^32 -> base 2^26 -+ vshl.u32 $H3,$H3,#18 -+ -+ vsri.u32 $H3,$H2,#14 -+ vshl.u32 $H2,$H2,#12 -+ -+ vbic.i32 $H3,#0xfc000000 -+ vsri.u32 $H2,$H1,#20 -+ vshl.u32 $H1,$H1,#6 -+ -+ vbic.i32 $H2,#0xfc000000 -+ vsri.u32 $H1,$H0,#26 -+ -+ vbic.i32 $H0,#0xfc000000 -+ vbic.i32 $H1,#0xfc000000 -+ -+ bls .Lskip_loop -+ -+ vld4.32 {${R0}[1],${R1}[1],${S1}[1],${R2}[1]},[$tbl1]! @ load r^2 -+ vld4.32 {${R0}[0],${R1}[0],${S1}[0],${R2}[0]},[$tbl0]! @ load r^4 -+ vld4.32 {${S2}[1],${R3}[1],${S3}[1],${R4}[1]},[$tbl1]! -+ vld4.32 {${S2}[0],${R3}[0],${S3}[0],${R4}[0]},[$tbl0]! -+ b .Loop_neon -+ -+.align 5 -+.Loop_neon: -+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -+ @ ((inp[0]*r^4+inp[2]*r^2+inp[4])*r^4+inp[6]*r^2 -+ @ ((inp[1]*r^4+inp[3]*r^2+inp[5])*r^3+inp[7]*r -+ @ \___________________/ -+ @ ((inp[0]*r^4+inp[2]*r^2+inp[4])*r^4+inp[6]*r^2+inp[8])*r^2 -+ @ ((inp[1]*r^4+inp[3]*r^2+inp[5])*r^4+inp[7]*r^2+inp[9])*r -+ @ \___________________/ \____________________/ -+ @ -+ @ Note that we start with inp[2:3]*r^2. This is because it -+ @ doesn't depend on reduction in previous iteration. -+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -+ @ d4 = h4*r0 + h3*r1 + h2*r2 + h1*r3 + h0*r4 -+ @ d3 = h3*r0 + h2*r1 + h1*r2 + h0*r3 + h4*5*r4 -+ @ d2 = h2*r0 + h1*r1 + h0*r2 + h4*5*r3 + h3*5*r4 -+ @ d1 = h1*r0 + h0*r1 + h4*5*r2 + h3*5*r3 + h2*5*r4 -+ @ d0 = h0*r0 + h4*5*r1 + h3*5*r2 + h2*5*r3 + h1*5*r4 -+ -+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -+ @ inp[2:3]*r^2 -+ -+ vadd.i32 $H2#lo,$H2#lo,$D2#lo @ accumulate inp[0:1] -+ vmull.u32 $D2,$H2#hi,${R0}[1] -+ vadd.i32 $H0#lo,$H0#lo,$D0#lo -+ vmull.u32 $D0,$H0#hi,${R0}[1] -+ vadd.i32 $H3#lo,$H3#lo,$D3#lo -+ vmull.u32 $D3,$H3#hi,${R0}[1] -+ vmlal.u32 $D2,$H1#hi,${R1}[1] -+ vadd.i32 $H1#lo,$H1#lo,$D1#lo -+ vmull.u32 $D1,$H1#hi,${R0}[1] -+ -+ vadd.i32 $H4#lo,$H4#lo,$D4#lo -+ vmull.u32 $D4,$H4#hi,${R0}[1] -+ subs $len,$len,#64 -+ vmlal.u32 $D0,$H4#hi,${S1}[1] -+ it lo -+ movlo $in2,$zeros -+ vmlal.u32 $D3,$H2#hi,${R1}[1] -+ vld1.32 ${S4}[1],[$tbl1,:32] -+ vmlal.u32 $D1,$H0#hi,${R1}[1] -+ vmlal.u32 $D4,$H3#hi,${R1}[1] -+ -+ vmlal.u32 $D0,$H3#hi,${S2}[1] -+ vmlal.u32 $D3,$H1#hi,${R2}[1] -+ vmlal.u32 $D4,$H2#hi,${R2}[1] -+ vmlal.u32 $D1,$H4#hi,${S2}[1] -+ vmlal.u32 $D2,$H0#hi,${R2}[1] -+ -+ vmlal.u32 $D3,$H0#hi,${R3}[1] -+ vmlal.u32 $D0,$H2#hi,${S3}[1] -+ vmlal.u32 $D4,$H1#hi,${R3}[1] -+ vmlal.u32 $D1,$H3#hi,${S3}[1] -+ vmlal.u32 $D2,$H4#hi,${S3}[1] -+ -+ vmlal.u32 $D3,$H4#hi,${S4}[1] -+ vmlal.u32 $D0,$H1#hi,${S4}[1] -+ vmlal.u32 $D4,$H0#hi,${R4}[1] -+ vmlal.u32 $D1,$H2#hi,${S4}[1] -+ vmlal.u32 $D2,$H3#hi,${S4}[1] -+ -+ vld4.32 {$H0#hi,$H1#hi,$H2#hi,$H3#hi},[$in2] @ inp[2:3] (or 0) -+ add $in2,$in2,#64 -+ -+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -+ @ (hash+inp[0:1])*r^4 and accumulate -+ -+ vmlal.u32 $D3,$H3#lo,${R0}[0] -+ vmlal.u32 $D0,$H0#lo,${R0}[0] -+ vmlal.u32 $D4,$H4#lo,${R0}[0] -+ vmlal.u32 $D1,$H1#lo,${R0}[0] -+ vmlal.u32 $D2,$H2#lo,${R0}[0] -+ vld1.32 ${S4}[0],[$tbl0,:32] -+ -+ vmlal.u32 $D3,$H2#lo,${R1}[0] -+ vmlal.u32 $D0,$H4#lo,${S1}[0] -+ vmlal.u32 $D4,$H3#lo,${R1}[0] -+ vmlal.u32 $D1,$H0#lo,${R1}[0] -+ vmlal.u32 $D2,$H1#lo,${R1}[0] -+ -+ vmlal.u32 $D3,$H1#lo,${R2}[0] -+ vmlal.u32 $D0,$H3#lo,${S2}[0] -+ vmlal.u32 $D4,$H2#lo,${R2}[0] -+ vmlal.u32 $D1,$H4#lo,${S2}[0] -+ vmlal.u32 $D2,$H0#lo,${R2}[0] -+ -+ vmlal.u32 $D3,$H0#lo,${R3}[0] -+ vmlal.u32 $D0,$H2#lo,${S3}[0] -+ vmlal.u32 $D4,$H1#lo,${R3}[0] -+ vmlal.u32 $D1,$H3#lo,${S3}[0] -+ vmlal.u32 $D3,$H4#lo,${S4}[0] -+ -+ vmlal.u32 $D2,$H4#lo,${S3}[0] -+ vmlal.u32 $D0,$H1#lo,${S4}[0] -+ vmlal.u32 $D4,$H0#lo,${R4}[0] -+ vmov.i32 $H4,#1<<24 @ padbit, yes, always -+ vmlal.u32 $D1,$H2#lo,${S4}[0] -+ vmlal.u32 $D2,$H3#lo,${S4}[0] -+ -+ vld4.32 {$H0#lo,$H1#lo,$H2#lo,$H3#lo},[$inp] @ inp[0:1] -+ add $inp,$inp,#64 -+# ifdef __ARMEB__ -+ vrev32.8 $H0,$H0 -+ vrev32.8 $H1,$H1 -+ vrev32.8 $H2,$H2 -+ vrev32.8 $H3,$H3 -+# endif -+ -+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -+ @ lazy reduction interleaved with base 2^32 -> base 2^26 of -+ @ inp[0:3] previously loaded to $H0-$H3 and smashed to $H0-$H4. -+ -+ vshr.u64 $T0,$D3,#26 -+ vmovn.i64 $D3#lo,$D3 -+ vshr.u64 $T1,$D0,#26 -+ vmovn.i64 $D0#lo,$D0 -+ vadd.i64 $D4,$D4,$T0 @ h3 -> h4 -+ vbic.i32 $D3#lo,#0xfc000000 -+ vsri.u32 $H4,$H3,#8 @ base 2^32 -> base 2^26 -+ vadd.i64 $D1,$D1,$T1 @ h0 -> h1 -+ vshl.u32 $H3,$H3,#18 -+ vbic.i32 $D0#lo,#0xfc000000 -+ -+ vshrn.u64 $T0#lo,$D4,#26 -+ vmovn.i64 $D4#lo,$D4 -+ vshr.u64 $T1,$D1,#26 -+ vmovn.i64 $D1#lo,$D1 -+ vadd.i64 $D2,$D2,$T1 @ h1 -> h2 -+ vsri.u32 $H3,$H2,#14 -+ vbic.i32 $D4#lo,#0xfc000000 -+ vshl.u32 $H2,$H2,#12 -+ vbic.i32 $D1#lo,#0xfc000000 -+ -+ vadd.i32 $D0#lo,$D0#lo,$T0#lo -+ vshl.u32 $T0#lo,$T0#lo,#2 -+ vbic.i32 $H3,#0xfc000000 -+ vshrn.u64 $T1#lo,$D2,#26 -+ vmovn.i64 $D2#lo,$D2 -+ vaddl.u32 $D0,$D0#lo,$T0#lo @ h4 -> h0 [widen for a sec] -+ vsri.u32 $H2,$H1,#20 -+ vadd.i32 $D3#lo,$D3#lo,$T1#lo @ h2 -> h3 -+ vshl.u32 $H1,$H1,#6 -+ vbic.i32 $D2#lo,#0xfc000000 -+ vbic.i32 $H2,#0xfc000000 -+ -+ vshrn.u64 $T0#lo,$D0,#26 @ re-narrow -+ vmovn.i64 $D0#lo,$D0 -+ vsri.u32 $H1,$H0,#26 -+ vbic.i32 $H0,#0xfc000000 -+ vshr.u32 $T1#lo,$D3#lo,#26 -+ vbic.i32 $D3#lo,#0xfc000000 -+ vbic.i32 $D0#lo,#0xfc000000 -+ vadd.i32 $D1#lo,$D1#lo,$T0#lo @ h0 -> h1 -+ vadd.i32 $D4#lo,$D4#lo,$T1#lo @ h3 -> h4 -+ vbic.i32 $H1,#0xfc000000 -+ -+ bhi .Loop_neon -+ -+.Lskip_loop: -+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -+ @ multiply (inp[0:1]+hash) or inp[2:3] by r^2:r^1 -+ -+ add $tbl1,$ctx,#(48+0*9*4) -+ add $tbl0,$ctx,#(48+1*9*4) -+ adds $len,$len,#32 -+ it ne -+ movne $len,#0 -+ bne .Long_tail -+ -+ vadd.i32 $H2#hi,$H2#lo,$D2#lo @ add hash value and move to #hi -+ vadd.i32 $H0#hi,$H0#lo,$D0#lo -+ vadd.i32 $H3#hi,$H3#lo,$D3#lo -+ vadd.i32 $H1#hi,$H1#lo,$D1#lo -+ vadd.i32 $H4#hi,$H4#lo,$D4#lo -+ -+.Long_tail: -+ vld4.32 {${R0}[1],${R1}[1],${S1}[1],${R2}[1]},[$tbl1]! @ load r^1 -+ vld4.32 {${R0}[0],${R1}[0],${S1}[0],${R2}[0]},[$tbl0]! @ load r^2 -+ -+ vadd.i32 $H2#lo,$H2#lo,$D2#lo @ can be redundant -+ vmull.u32 $D2,$H2#hi,$R0 -+ vadd.i32 $H0#lo,$H0#lo,$D0#lo -+ vmull.u32 $D0,$H0#hi,$R0 -+ vadd.i32 $H3#lo,$H3#lo,$D3#lo -+ vmull.u32 $D3,$H3#hi,$R0 -+ vadd.i32 $H1#lo,$H1#lo,$D1#lo -+ vmull.u32 $D1,$H1#hi,$R0 -+ vadd.i32 $H4#lo,$H4#lo,$D4#lo -+ vmull.u32 $D4,$H4#hi,$R0 -+ -+ vmlal.u32 $D0,$H4#hi,$S1 -+ vld4.32 {${S2}[1],${R3}[1],${S3}[1],${R4}[1]},[$tbl1]! -+ vmlal.u32 $D3,$H2#hi,$R1 -+ vld4.32 {${S2}[0],${R3}[0],${S3}[0],${R4}[0]},[$tbl0]! -+ vmlal.u32 $D1,$H0#hi,$R1 -+ vmlal.u32 $D4,$H3#hi,$R1 -+ vmlal.u32 $D2,$H1#hi,$R1 -+ -+ vmlal.u32 $D3,$H1#hi,$R2 -+ vld1.32 ${S4}[1],[$tbl1,:32] -+ vmlal.u32 $D0,$H3#hi,$S2 -+ vld1.32 ${S4}[0],[$tbl0,:32] -+ vmlal.u32 $D4,$H2#hi,$R2 -+ vmlal.u32 $D1,$H4#hi,$S2 -+ vmlal.u32 $D2,$H0#hi,$R2 -+ -+ vmlal.u32 $D3,$H0#hi,$R3 -+ it ne -+ addne $tbl1,$ctx,#(48+2*9*4) -+ vmlal.u32 $D0,$H2#hi,$S3 -+ it ne -+ addne $tbl0,$ctx,#(48+3*9*4) -+ vmlal.u32 $D4,$H1#hi,$R3 -+ vmlal.u32 $D1,$H3#hi,$S3 -+ vmlal.u32 $D2,$H4#hi,$S3 -+ -+ vmlal.u32 $D3,$H4#hi,$S4 -+ vorn $MASK,$MASK,$MASK @ all-ones, can be redundant -+ vmlal.u32 $D0,$H1#hi,$S4 -+ vshr.u64 $MASK,$MASK,#38 -+ vmlal.u32 $D4,$H0#hi,$R4 -+ vmlal.u32 $D1,$H2#hi,$S4 -+ vmlal.u32 $D2,$H3#hi,$S4 -+ -+ beq .Lshort_tail -+ -+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -+ @ (hash+inp[0:1])*r^4:r^3 and accumulate -+ -+ vld4.32 {${R0}[1],${R1}[1],${S1}[1],${R2}[1]},[$tbl1]! @ load r^3 -+ vld4.32 {${R0}[0],${R1}[0],${S1}[0],${R2}[0]},[$tbl0]! @ load r^4 -+ -+ vmlal.u32 $D2,$H2#lo,$R0 -+ vmlal.u32 $D0,$H0#lo,$R0 -+ vmlal.u32 $D3,$H3#lo,$R0 -+ vmlal.u32 $D1,$H1#lo,$R0 -+ vmlal.u32 $D4,$H4#lo,$R0 -+ -+ vmlal.u32 $D0,$H4#lo,$S1 -+ vld4.32 {${S2}[1],${R3}[1],${S3}[1],${R4}[1]},[$tbl1]! -+ vmlal.u32 $D3,$H2#lo,$R1 -+ vld4.32 {${S2}[0],${R3}[0],${S3}[0],${R4}[0]},[$tbl0]! -+ vmlal.u32 $D1,$H0#lo,$R1 -+ vmlal.u32 $D4,$H3#lo,$R1 -+ vmlal.u32 $D2,$H1#lo,$R1 -+ -+ vmlal.u32 $D3,$H1#lo,$R2 -+ vld1.32 ${S4}[1],[$tbl1,:32] -+ vmlal.u32 $D0,$H3#lo,$S2 -+ vld1.32 ${S4}[0],[$tbl0,:32] -+ vmlal.u32 $D4,$H2#lo,$R2 -+ vmlal.u32 $D1,$H4#lo,$S2 -+ vmlal.u32 $D2,$H0#lo,$R2 -+ -+ vmlal.u32 $D3,$H0#lo,$R3 -+ vmlal.u32 $D0,$H2#lo,$S3 -+ vmlal.u32 $D4,$H1#lo,$R3 -+ vmlal.u32 $D1,$H3#lo,$S3 -+ vmlal.u32 $D2,$H4#lo,$S3 -+ -+ vmlal.u32 $D3,$H4#lo,$S4 -+ vorn $MASK,$MASK,$MASK @ all-ones -+ vmlal.u32 $D0,$H1#lo,$S4 -+ vshr.u64 $MASK,$MASK,#38 -+ vmlal.u32 $D4,$H0#lo,$R4 -+ vmlal.u32 $D1,$H2#lo,$S4 -+ vmlal.u32 $D2,$H3#lo,$S4 -+ -+.Lshort_tail: -+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -+ @ horizontal addition -+ -+ vadd.i64 $D3#lo,$D3#lo,$D3#hi -+ vadd.i64 $D0#lo,$D0#lo,$D0#hi -+ vadd.i64 $D4#lo,$D4#lo,$D4#hi -+ vadd.i64 $D1#lo,$D1#lo,$D1#hi -+ vadd.i64 $D2#lo,$D2#lo,$D2#hi -+ -+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -+ @ lazy reduction, but without narrowing -+ -+ vshr.u64 $T0,$D3,#26 -+ vand.i64 $D3,$D3,$MASK -+ vshr.u64 $T1,$D0,#26 -+ vand.i64 $D0,$D0,$MASK -+ vadd.i64 $D4,$D4,$T0 @ h3 -> h4 -+ vadd.i64 $D1,$D1,$T1 @ h0 -> h1 -+ -+ vshr.u64 $T0,$D4,#26 -+ vand.i64 $D4,$D4,$MASK -+ vshr.u64 $T1,$D1,#26 -+ vand.i64 $D1,$D1,$MASK -+ vadd.i64 $D2,$D2,$T1 @ h1 -> h2 -+ -+ vadd.i64 $D0,$D0,$T0 -+ vshl.u64 $T0,$T0,#2 -+ vshr.u64 $T1,$D2,#26 -+ vand.i64 $D2,$D2,$MASK -+ vadd.i64 $D0,$D0,$T0 @ h4 -> h0 -+ vadd.i64 $D3,$D3,$T1 @ h2 -> h3 -+ -+ vshr.u64 $T0,$D0,#26 -+ vand.i64 $D0,$D0,$MASK -+ vshr.u64 $T1,$D3,#26 -+ vand.i64 $D3,$D3,$MASK -+ vadd.i64 $D1,$D1,$T0 @ h0 -> h1 -+ vadd.i64 $D4,$D4,$T1 @ h3 -> h4 -+ -+ cmp $len,#0 -+ bne .Leven -+ -+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -+ @ store hash value -+ -+ vst4.32 {$D0#lo[0],$D1#lo[0],$D2#lo[0],$D3#lo[0]},[$ctx]! -+ vst1.32 {$D4#lo[0]},[$ctx] -+ -+ vldmia sp!,{d8-d15} @ epilogue -+ ldmia sp!,{r4-r7} -+.Lno_data_neon: -+ ret @ bx lr -+.size poly1305_blocks_neon,.-poly1305_blocks_neon -+ -+#ifdef __KERNEL__ -+.globl poly1305_emit_neon -+#endif -+.type poly1305_emit_neon,%function -+.align 5 -+poly1305_emit_neon: -+ ldr ip,[$ctx,#36] @ is_base2_26 -+ -+ stmdb sp!,{r4-r11} -+ -+ tst ip,ip -+ beq .Lpoly1305_emit_enter -+ -+ ldmia $ctx,{$h0-$h4} -+ eor $g0,$g0,$g0 -+ -+ adds $h0,$h0,$h1,lsl#26 @ base 2^26 -> base 2^32 -+ mov $h1,$h1,lsr#6 -+ adcs $h1,$h1,$h2,lsl#20 -+ mov $h2,$h2,lsr#12 -+ adcs $h2,$h2,$h3,lsl#14 -+ mov $h3,$h3,lsr#18 -+ adcs $h3,$h3,$h4,lsl#8 -+ adc $h4,$g0,$h4,lsr#24 @ can be partially reduced ... -+ -+ and $g0,$h4,#-4 @ ... so reduce -+ and $h4,$h3,#3 -+ add $g0,$g0,$g0,lsr#2 @ *= 5 -+ adds $h0,$h0,$g0 -+ adcs $h1,$h1,#0 -+ adcs $h2,$h2,#0 -+ adcs $h3,$h3,#0 -+ adc $h4,$h4,#0 -+ -+ adds $g0,$h0,#5 @ compare to modulus -+ adcs $g1,$h1,#0 -+ adcs $g2,$h2,#0 -+ adcs $g3,$h3,#0 -+ adc $g4,$h4,#0 -+ tst $g4,#4 @ did it carry/borrow? -+ -+ it ne -+ movne $h0,$g0 -+ ldr $g0,[$nonce,#0] -+ it ne -+ movne $h1,$g1 -+ ldr $g1,[$nonce,#4] -+ it ne -+ movne $h2,$g2 -+ ldr $g2,[$nonce,#8] -+ it ne -+ movne $h3,$g3 -+ ldr $g3,[$nonce,#12] -+ -+ adds $h0,$h0,$g0 @ accumulate nonce -+ adcs $h1,$h1,$g1 -+ adcs $h2,$h2,$g2 -+ adc $h3,$h3,$g3 -+ -+# ifdef __ARMEB__ -+ rev $h0,$h0 -+ rev $h1,$h1 -+ rev $h2,$h2 -+ rev $h3,$h3 -+# endif -+ str $h0,[$mac,#0] @ store the result -+ str $h1,[$mac,#4] -+ str $h2,[$mac,#8] -+ str $h3,[$mac,#12] -+ -+ ldmia sp!,{r4-r11} -+ ret @ bx lr -+.size poly1305_emit_neon,.-poly1305_emit_neon -+ -+.align 5 -+.Lzeros: -+.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -+# ifndef __KERNEL__ -+.LOPENSSL_armcap: -+.word OPENSSL_armcap_P-.Lpoly1305_init -+# endif -+#endif -+___ -+} } -+$code.=<<___; -+.align 2 -+#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) -+.comm OPENSSL_armcap_P,4,4 -+#endif -+___ -+ -+open SELF,$0; -+while() { -+ next if (/^#!/); -+ last if (!s/^#/@/ and !/^$/); -+ print; -+} -+close SELF; -+ -+foreach (split("\n",$code)) { -+ s/\`([^\`]*)\`/eval $1/geo; -+ -+ s/\bq([0-9]+)#(lo|hi)/sprintf "d%d",2*$1+($2 eq "hi")/geo or -+ s/\bret\b/bx lr/go or -+ s/\bbx\s+lr\b/.word\t0xe12fff1e/go; # make it possible to compile with -march=armv4 -+ -+ print $_,"\n"; -+} -+close STDOUT; # enforce flush ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/poly1305/poly1305-arm64.pl 2019-08-20 20:26:42.400341426 +0000 -@@ -0,0 +1,974 @@ -+#!/usr/bin/env perl -+# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause -+# -+# This code is taken from the OpenSSL project but the author, Andy Polyakov, -+# has relicensed it under the licenses specified in the SPDX header above. -+# The original headers, including the original license headers, are -+# included below for completeness. -+# -+# ==================================================================== -+# Written by Andy Polyakov for the OpenSSL -+# project. The module is, however, dual licensed under OpenSSL and -+# CRYPTOGAMS licenses depending on where you obtain it. For further -+# details see http://www.openssl.org/~appro/cryptogams/. -+# ==================================================================== -+# -+# This module implements Poly1305 hash for ARMv8. -+# -+# June 2015 -+# -+# Numbers are cycles per processed byte with poly1305_blocks alone. -+# -+# IALU/gcc-4.9 NEON -+# -+# Apple A7 1.86/+5% 0.72 -+# Cortex-A53 2.69/+58% 1.47 -+# Cortex-A57 2.70/+7% 1.14 -+# Denver 1.64/+50% 1.18(*) -+# X-Gene 2.13/+68% 2.27 -+# Mongoose 1.77/+75% 1.12 -+# Kryo 2.70/+55% 1.13 -+# -+# (*) estimate based on resources availability is less than 1.0, -+# i.e. measured result is worse than expected, presumably binary -+# translator is not almighty; -+ -+$flavour=shift; -+if ($flavour=~/\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; } -+else { while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {} } -+ -+if ($flavour && $flavour ne "void") { -+ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; -+ ( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or -+ ( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or -+ die "can't locate arm-xlate.pl"; -+ -+ open STDOUT,"| \"$^X\" $xlate $flavour $output"; -+} else { -+ open STDOUT,">$output"; -+} -+ -+my ($ctx,$inp,$len,$padbit) = map("x$_",(0..3)); -+my ($mac,$nonce)=($inp,$len); -+ -+my ($h0,$h1,$h2,$r0,$r1,$s1,$t0,$t1,$d0,$d1,$d2) = map("x$_",(4..14)); -+ -+$code.=<<___; -+#ifndef __KERNEL__ -+# include "arm_arch.h" -+.extern OPENSSL_armcap_P -+#else -+# define poly1305_init poly1305_init_arm -+# define poly1305_blocks poly1305_blocks_arm -+# define poly1305_emit poly1305_emit_arm -+#endif -+ -+.text -+ -+// forward "declarations" are required for Apple -+.globl poly1305_blocks -+.globl poly1305_emit -+.globl poly1305_init -+.type poly1305_init,%function -+.align 5 -+poly1305_init: -+ cmp $inp,xzr -+ stp xzr,xzr,[$ctx] // zero hash value -+ stp xzr,xzr,[$ctx,#16] // [along with is_base2_26] -+ -+ csel x0,xzr,x0,eq -+ b.eq .Lno_key -+ -+#ifndef __KERNEL__ -+# ifdef __ILP32__ -+ ldrsw $t1,.LOPENSSL_armcap_P -+# else -+ ldr $t1,.LOPENSSL_armcap_P -+# endif -+ adr $t0,.LOPENSSL_armcap_P -+ ldr w17,[$t0,$t1] -+#endif -+ -+ ldp $r0,$r1,[$inp] // load key -+ mov $s1,#0xfffffffc0fffffff -+ movk $s1,#0x0fff,lsl#48 -+#ifdef __AARCH64EB__ -+ rev $r0,$r0 // flip bytes -+ rev $r1,$r1 -+#endif -+ and $r0,$r0,$s1 // &=0ffffffc0fffffff -+ and $s1,$s1,#-4 -+ and $r1,$r1,$s1 // &=0ffffffc0ffffffc -+ stp $r0,$r1,[$ctx,#32] // save key value -+ -+#ifndef __KERNEL__ -+ tst w17,#ARMV7_NEON -+ -+ adr $d0,poly1305_blocks -+ adr $r0,poly1305_blocks_neon -+ adr $d1,poly1305_emit -+ adr $r1,poly1305_emit_neon -+ -+ csel $d0,$d0,$r0,eq -+ csel $d1,$d1,$r1,eq -+ -+# ifdef __ILP32__ -+ stp w12,w13,[$len] -+# else -+ stp $d0,$d1,[$len] -+# endif -+ -+ mov x0,#1 -+#else -+ mov x0,#0 -+#endif -+.Lno_key: -+ ret -+.size poly1305_init,.-poly1305_init -+ -+.type poly1305_blocks,%function -+.align 5 -+poly1305_blocks: -+ ands $len,$len,#-16 -+ b.eq .Lno_data -+ -+ ldp $h0,$h1,[$ctx] // load hash value -+ ldp $r0,$r1,[$ctx,#32] // load key value -+ ldr $h2,[$ctx,#16] -+ add $s1,$r1,$r1,lsr#2 // s1 = r1 + (r1 >> 2) -+ b .Loop -+ -+.align 5 -+.Loop: -+ ldp $t0,$t1,[$inp],#16 // load input -+ sub $len,$len,#16 -+#ifdef __AARCH64EB__ -+ rev $t0,$t0 -+ rev $t1,$t1 -+#endif -+ adds $h0,$h0,$t0 // accumulate input -+ adcs $h1,$h1,$t1 -+ -+ mul $d0,$h0,$r0 // h0*r0 -+ adc $h2,$h2,$padbit -+ umulh $d1,$h0,$r0 -+ -+ mul $t0,$h1,$s1 // h1*5*r1 -+ umulh $t1,$h1,$s1 -+ -+ adds $d0,$d0,$t0 -+ mul $t0,$h0,$r1 // h0*r1 -+ adc $d1,$d1,$t1 -+ umulh $d2,$h0,$r1 -+ -+ adds $d1,$d1,$t0 -+ mul $t0,$h1,$r0 // h1*r0 -+ adc $d2,$d2,xzr -+ umulh $t1,$h1,$r0 -+ -+ adds $d1,$d1,$t0 -+ mul $t0,$h2,$s1 // h2*5*r1 -+ adc $d2,$d2,$t1 -+ mul $t1,$h2,$r0 // h2*r0 -+ -+ adds $d1,$d1,$t0 -+ adc $d2,$d2,$t1 -+ -+ and $t0,$d2,#-4 // final reduction -+ and $h2,$d2,#3 -+ add $t0,$t0,$d2,lsr#2 -+ adds $h0,$d0,$t0 -+ adcs $h1,$d1,xzr -+ adc $h2,$h2,xzr -+ -+ cbnz $len,.Loop -+ -+ stp $h0,$h1,[$ctx] // store hash value -+ str $h2,[$ctx,#16] -+ -+.Lno_data: -+ ret -+.size poly1305_blocks,.-poly1305_blocks -+ -+.type poly1305_emit,%function -+.align 5 -+poly1305_emit: -+ ldp $h0,$h1,[$ctx] // load hash base 2^64 -+ ldr $h2,[$ctx,#16] -+ ldp $t0,$t1,[$nonce] // load nonce -+ -+ adds $d0,$h0,#5 // compare to modulus -+ adcs $d1,$h1,xzr -+ adc $d2,$h2,xzr -+ -+ tst $d2,#-4 // see if it's carried/borrowed -+ -+ csel $h0,$h0,$d0,eq -+ csel $h1,$h1,$d1,eq -+ -+#ifdef __AARCH64EB__ -+ ror $t0,$t0,#32 // flip nonce words -+ ror $t1,$t1,#32 -+#endif -+ adds $h0,$h0,$t0 // accumulate nonce -+ adc $h1,$h1,$t1 -+#ifdef __AARCH64EB__ -+ rev $h0,$h0 // flip output bytes -+ rev $h1,$h1 -+#endif -+ stp $h0,$h1,[$mac] // write result -+ -+ ret -+.size poly1305_emit,.-poly1305_emit -+___ -+my ($R0,$R1,$S1,$R2,$S2,$R3,$S3,$R4,$S4) = map("v$_.4s",(0..8)); -+my ($IN01_0,$IN01_1,$IN01_2,$IN01_3,$IN01_4) = map("v$_.2s",(9..13)); -+my ($IN23_0,$IN23_1,$IN23_2,$IN23_3,$IN23_4) = map("v$_.2s",(14..18)); -+my ($ACC0,$ACC1,$ACC2,$ACC3,$ACC4) = map("v$_.2d",(19..23)); -+my ($H0,$H1,$H2,$H3,$H4) = map("v$_.2s",(24..28)); -+my ($T0,$T1,$MASK) = map("v$_",(29..31)); -+ -+my ($in2,$zeros)=("x16","x17"); -+my $is_base2_26 = $zeros; # borrow -+ -+$code.=<<___; -+.type __poly1305_mult,%function -+.align 5 -+__poly1305_mult: -+ mul $d0,$h0,$r0 // h0*r0 -+ umulh $d1,$h0,$r0 -+ -+ mul $t0,$h1,$s1 // h1*5*r1 -+ umulh $t1,$h1,$s1 -+ -+ adds $d0,$d0,$t0 -+ mul $t0,$h0,$r1 // h0*r1 -+ adc $d1,$d1,$t1 -+ umulh $d2,$h0,$r1 -+ -+ adds $d1,$d1,$t0 -+ mul $t0,$h1,$r0 // h1*r0 -+ adc $d2,$d2,xzr -+ umulh $t1,$h1,$r0 -+ -+ adds $d1,$d1,$t0 -+ mul $t0,$h2,$s1 // h2*5*r1 -+ adc $d2,$d2,$t1 -+ mul $t1,$h2,$r0 // h2*r0 -+ -+ adds $d1,$d1,$t0 -+ adc $d2,$d2,$t1 -+ -+ and $t0,$d2,#-4 // final reduction -+ and $h2,$d2,#3 -+ add $t0,$t0,$d2,lsr#2 -+ adds $h0,$d0,$t0 -+ adcs $h1,$d1,xzr -+ adc $h2,$h2,xzr -+ -+ ret -+.size __poly1305_mult,.-__poly1305_mult -+ -+.type __poly1305_splat,%function -+.align 5 -+__poly1305_splat: -+ and x12,$h0,#0x03ffffff // base 2^64 -> base 2^26 -+ ubfx x13,$h0,#26,#26 -+ extr x14,$h1,$h0,#52 -+ and x14,x14,#0x03ffffff -+ ubfx x15,$h1,#14,#26 -+ extr x16,$h2,$h1,#40 -+ -+ str w12,[$ctx,#16*0] // r0 -+ add w12,w13,w13,lsl#2 // r1*5 -+ str w13,[$ctx,#16*1] // r1 -+ add w13,w14,w14,lsl#2 // r2*5 -+ str w12,[$ctx,#16*2] // s1 -+ str w14,[$ctx,#16*3] // r2 -+ add w14,w15,w15,lsl#2 // r3*5 -+ str w13,[$ctx,#16*4] // s2 -+ str w15,[$ctx,#16*5] // r3 -+ add w15,w16,w16,lsl#2 // r4*5 -+ str w14,[$ctx,#16*6] // s3 -+ str w16,[$ctx,#16*7] // r4 -+ str w15,[$ctx,#16*8] // s4 -+ -+ ret -+.size __poly1305_splat,.-__poly1305_splat -+ -+#if !defined(__KERNEL__) || defined(CONFIG_KERNEL_MODE_NEON) -+#ifdef __KERNEL__ -+.globl poly1305_blocks_neon -+.globl poly1305_emit_neon -+#endif -+ -+.type poly1305_blocks_neon,%function -+.align 5 -+poly1305_blocks_neon: -+ ldr $is_base2_26,[$ctx,#24] -+ cmp $len,#128 -+ b.hs .Lblocks_neon -+ cbz $is_base2_26,poly1305_blocks -+ -+.Lblocks_neon: -+ stp x29,x30,[sp,#-80]! -+ add x29,sp,#0 -+ -+ ands $len,$len,#-16 -+ b.eq .Lno_data_neon -+ -+ cbz $is_base2_26,.Lbase2_64_neon -+ -+ ldp w10,w11,[$ctx] // load hash value base 2^26 -+ ldp w12,w13,[$ctx,#8] -+ ldr w14,[$ctx,#16] -+ -+ tst $len,#31 -+ b.eq .Leven_neon -+ -+ ldp $r0,$r1,[$ctx,#32] // load key value -+ -+ add $h0,x10,x11,lsl#26 // base 2^26 -> base 2^64 -+ lsr $h1,x12,#12 -+ adds $h0,$h0,x12,lsl#52 -+ add $h1,$h1,x13,lsl#14 -+ adc $h1,$h1,xzr -+ lsr $h2,x14,#24 -+ adds $h1,$h1,x14,lsl#40 -+ adc $d2,$h2,xzr // can be partially reduced... -+ -+ ldp $d0,$d1,[$inp],#16 // load input -+ sub $len,$len,#16 -+ add $s1,$r1,$r1,lsr#2 // s1 = r1 + (r1 >> 2) -+ -+ and $t0,$d2,#-4 // ... so reduce -+ and $h2,$d2,#3 -+ add $t0,$t0,$d2,lsr#2 -+ adds $h0,$h0,$t0 -+ adcs $h1,$h1,xzr -+ adc $h2,$h2,xzr -+ -+#ifdef __AARCH64EB__ -+ rev $d0,$d0 -+ rev $d1,$d1 -+#endif -+ adds $h0,$h0,$d0 // accumulate input -+ adcs $h1,$h1,$d1 -+ adc $h2,$h2,$padbit -+ -+ bl __poly1305_mult -+ ldr x30,[sp,#8] -+ -+ cbz $padbit,.Lstore_base2_64_neon -+ -+ and x10,$h0,#0x03ffffff // base 2^64 -> base 2^26 -+ ubfx x11,$h0,#26,#26 -+ extr x12,$h1,$h0,#52 -+ and x12,x12,#0x03ffffff -+ ubfx x13,$h1,#14,#26 -+ extr x14,$h2,$h1,#40 -+ -+ cbnz $len,.Leven_neon -+ -+ stp w10,w11,[$ctx] // store hash value base 2^26 -+ stp w12,w13,[$ctx,#8] -+ str w14,[$ctx,#16] -+ b .Lno_data_neon -+ -+.align 4 -+.Lstore_base2_64_neon: -+ stp $h0,$h1,[$ctx] // store hash value base 2^64 -+ stp $h2,xzr,[$ctx,#16] // note that is_base2_26 is zeroed -+ b .Lno_data_neon -+ -+.align 4 -+.Lbase2_64_neon: -+ ldp $r0,$r1,[$ctx,#32] // load key value -+ -+ ldp $h0,$h1,[$ctx] // load hash value base 2^64 -+ ldr $h2,[$ctx,#16] -+ -+ tst $len,#31 -+ b.eq .Linit_neon -+ -+ ldp $d0,$d1,[$inp],#16 // load input -+ sub $len,$len,#16 -+ add $s1,$r1,$r1,lsr#2 // s1 = r1 + (r1 >> 2) -+#ifdef __AARCH64EB__ -+ rev $d0,$d0 -+ rev $d1,$d1 -+#endif -+ adds $h0,$h0,$d0 // accumulate input -+ adcs $h1,$h1,$d1 -+ adc $h2,$h2,$padbit -+ -+ bl __poly1305_mult -+ -+.Linit_neon: -+ and x10,$h0,#0x03ffffff // base 2^64 -> base 2^26 -+ ubfx x11,$h0,#26,#26 -+ extr x12,$h1,$h0,#52 -+ and x12,x12,#0x03ffffff -+ ubfx x13,$h1,#14,#26 -+ extr x14,$h2,$h1,#40 -+ -+ stp d8,d9,[sp,#16] // meet ABI requirements -+ stp d10,d11,[sp,#32] -+ stp d12,d13,[sp,#48] -+ stp d14,d15,[sp,#64] -+ -+ fmov ${H0},x10 -+ fmov ${H1},x11 -+ fmov ${H2},x12 -+ fmov ${H3},x13 -+ fmov ${H4},x14 -+ -+ ////////////////////////////////// initialize r^n table -+ mov $h0,$r0 // r^1 -+ add $s1,$r1,$r1,lsr#2 // s1 = r1 + (r1 >> 2) -+ mov $h1,$r1 -+ mov $h2,xzr -+ add $ctx,$ctx,#48+12 -+ bl __poly1305_splat -+ -+ bl __poly1305_mult // r^2 -+ sub $ctx,$ctx,#4 -+ bl __poly1305_splat -+ -+ bl __poly1305_mult // r^3 -+ sub $ctx,$ctx,#4 -+ bl __poly1305_splat -+ -+ bl __poly1305_mult // r^4 -+ sub $ctx,$ctx,#4 -+ bl __poly1305_splat -+ ldr x30,[sp,#8] -+ -+ add $in2,$inp,#32 -+ adr $zeros,.Lzeros -+ subs $len,$len,#64 -+ csel $in2,$zeros,$in2,lo -+ -+ mov x4,#1 -+ str x4,[$ctx,#-24] // set is_base2_26 -+ sub $ctx,$ctx,#48 // restore original $ctx -+ b .Ldo_neon -+ -+.align 4 -+.Leven_neon: -+ add $in2,$inp,#32 -+ adr $zeros,.Lzeros -+ subs $len,$len,#64 -+ csel $in2,$zeros,$in2,lo -+ -+ stp d8,d9,[sp,#16] // meet ABI requirements -+ stp d10,d11,[sp,#32] -+ stp d12,d13,[sp,#48] -+ stp d14,d15,[sp,#64] -+ -+ fmov ${H0},x10 -+ fmov ${H1},x11 -+ fmov ${H2},x12 -+ fmov ${H3},x13 -+ fmov ${H4},x14 -+ -+.Ldo_neon: -+ ldp x8,x12,[$in2],#16 // inp[2:3] (or zero) -+ ldp x9,x13,[$in2],#48 -+ -+ lsl $padbit,$padbit,#24 -+ add x15,$ctx,#48 -+ -+#ifdef __AARCH64EB__ -+ rev x8,x8 -+ rev x12,x12 -+ rev x9,x9 -+ rev x13,x13 -+#endif -+ and x4,x8,#0x03ffffff // base 2^64 -> base 2^26 -+ and x5,x9,#0x03ffffff -+ ubfx x6,x8,#26,#26 -+ ubfx x7,x9,#26,#26 -+ add x4,x4,x5,lsl#32 // bfi x4,x5,#32,#32 -+ extr x8,x12,x8,#52 -+ extr x9,x13,x9,#52 -+ add x6,x6,x7,lsl#32 // bfi x6,x7,#32,#32 -+ fmov $IN23_0,x4 -+ and x8,x8,#0x03ffffff -+ and x9,x9,#0x03ffffff -+ ubfx x10,x12,#14,#26 -+ ubfx x11,x13,#14,#26 -+ add x12,$padbit,x12,lsr#40 -+ add x13,$padbit,x13,lsr#40 -+ add x8,x8,x9,lsl#32 // bfi x8,x9,#32,#32 -+ fmov $IN23_1,x6 -+ add x10,x10,x11,lsl#32 // bfi x10,x11,#32,#32 -+ add x12,x12,x13,lsl#32 // bfi x12,x13,#32,#32 -+ fmov $IN23_2,x8 -+ fmov $IN23_3,x10 -+ fmov $IN23_4,x12 -+ -+ ldp x8,x12,[$inp],#16 // inp[0:1] -+ ldp x9,x13,[$inp],#48 -+ -+ ld1 {$R0,$R1,$S1,$R2},[x15],#64 -+ ld1 {$S2,$R3,$S3,$R4},[x15],#64 -+ ld1 {$S4},[x15] -+ -+#ifdef __AARCH64EB__ -+ rev x8,x8 -+ rev x12,x12 -+ rev x9,x9 -+ rev x13,x13 -+#endif -+ and x4,x8,#0x03ffffff // base 2^64 -> base 2^26 -+ and x5,x9,#0x03ffffff -+ ubfx x6,x8,#26,#26 -+ ubfx x7,x9,#26,#26 -+ add x4,x4,x5,lsl#32 // bfi x4,x5,#32,#32 -+ extr x8,x12,x8,#52 -+ extr x9,x13,x9,#52 -+ add x6,x6,x7,lsl#32 // bfi x6,x7,#32,#32 -+ fmov $IN01_0,x4 -+ and x8,x8,#0x03ffffff -+ and x9,x9,#0x03ffffff -+ ubfx x10,x12,#14,#26 -+ ubfx x11,x13,#14,#26 -+ add x12,$padbit,x12,lsr#40 -+ add x13,$padbit,x13,lsr#40 -+ add x8,x8,x9,lsl#32 // bfi x8,x9,#32,#32 -+ fmov $IN01_1,x6 -+ add x10,x10,x11,lsl#32 // bfi x10,x11,#32,#32 -+ add x12,x12,x13,lsl#32 // bfi x12,x13,#32,#32 -+ movi $MASK.2d,#-1 -+ fmov $IN01_2,x8 -+ fmov $IN01_3,x10 -+ fmov $IN01_4,x12 -+ ushr $MASK.2d,$MASK.2d,#38 -+ -+ b.ls .Lskip_loop -+ -+.align 4 -+.Loop_neon: -+ //////////////////////////////////////////////////////////////// -+ // ((inp[0]*r^4+inp[2]*r^2+inp[4])*r^4+inp[6]*r^2 -+ // ((inp[1]*r^4+inp[3]*r^2+inp[5])*r^3+inp[7]*r -+ // \___________________/ -+ // ((inp[0]*r^4+inp[2]*r^2+inp[4])*r^4+inp[6]*r^2+inp[8])*r^2 -+ // ((inp[1]*r^4+inp[3]*r^2+inp[5])*r^4+inp[7]*r^2+inp[9])*r -+ // \___________________/ \____________________/ -+ // -+ // Note that we start with inp[2:3]*r^2. This is because it -+ // doesn't depend on reduction in previous iteration. -+ //////////////////////////////////////////////////////////////// -+ // d4 = h0*r4 + h1*r3 + h2*r2 + h3*r1 + h4*r0 -+ // d3 = h0*r3 + h1*r2 + h2*r1 + h3*r0 + h4*5*r4 -+ // d2 = h0*r2 + h1*r1 + h2*r0 + h3*5*r4 + h4*5*r3 -+ // d1 = h0*r1 + h1*r0 + h2*5*r4 + h3*5*r3 + h4*5*r2 -+ // d0 = h0*r0 + h1*5*r4 + h2*5*r3 + h3*5*r2 + h4*5*r1 -+ -+ subs $len,$len,#64 -+ umull $ACC4,$IN23_0,${R4}[2] -+ csel $in2,$zeros,$in2,lo -+ umull $ACC3,$IN23_0,${R3}[2] -+ umull $ACC2,$IN23_0,${R2}[2] -+ ldp x8,x12,[$in2],#16 // inp[2:3] (or zero) -+ umull $ACC1,$IN23_0,${R1}[2] -+ ldp x9,x13,[$in2],#48 -+ umull $ACC0,$IN23_0,${R0}[2] -+#ifdef __AARCH64EB__ -+ rev x8,x8 -+ rev x12,x12 -+ rev x9,x9 -+ rev x13,x13 -+#endif -+ -+ umlal $ACC4,$IN23_1,${R3}[2] -+ and x4,x8,#0x03ffffff // base 2^64 -> base 2^26 -+ umlal $ACC3,$IN23_1,${R2}[2] -+ and x5,x9,#0x03ffffff -+ umlal $ACC2,$IN23_1,${R1}[2] -+ ubfx x6,x8,#26,#26 -+ umlal $ACC1,$IN23_1,${R0}[2] -+ ubfx x7,x9,#26,#26 -+ umlal $ACC0,$IN23_1,${S4}[2] -+ add x4,x4,x5,lsl#32 // bfi x4,x5,#32,#32 -+ -+ umlal $ACC4,$IN23_2,${R2}[2] -+ extr x8,x12,x8,#52 -+ umlal $ACC3,$IN23_2,${R1}[2] -+ extr x9,x13,x9,#52 -+ umlal $ACC2,$IN23_2,${R0}[2] -+ add x6,x6,x7,lsl#32 // bfi x6,x7,#32,#32 -+ umlal $ACC1,$IN23_2,${S4}[2] -+ fmov $IN23_0,x4 -+ umlal $ACC0,$IN23_2,${S3}[2] -+ and x8,x8,#0x03ffffff -+ -+ umlal $ACC4,$IN23_3,${R1}[2] -+ and x9,x9,#0x03ffffff -+ umlal $ACC3,$IN23_3,${R0}[2] -+ ubfx x10,x12,#14,#26 -+ umlal $ACC2,$IN23_3,${S4}[2] -+ ubfx x11,x13,#14,#26 -+ umlal $ACC1,$IN23_3,${S3}[2] -+ add x8,x8,x9,lsl#32 // bfi x8,x9,#32,#32 -+ umlal $ACC0,$IN23_3,${S2}[2] -+ fmov $IN23_1,x6 -+ -+ add $IN01_2,$IN01_2,$H2 -+ add x12,$padbit,x12,lsr#40 -+ umlal $ACC4,$IN23_4,${R0}[2] -+ add x13,$padbit,x13,lsr#40 -+ umlal $ACC3,$IN23_4,${S4}[2] -+ add x10,x10,x11,lsl#32 // bfi x10,x11,#32,#32 -+ umlal $ACC2,$IN23_4,${S3}[2] -+ add x12,x12,x13,lsl#32 // bfi x12,x13,#32,#32 -+ umlal $ACC1,$IN23_4,${S2}[2] -+ fmov $IN23_2,x8 -+ umlal $ACC0,$IN23_4,${S1}[2] -+ fmov $IN23_3,x10 -+ -+ //////////////////////////////////////////////////////////////// -+ // (hash+inp[0:1])*r^4 and accumulate -+ -+ add $IN01_0,$IN01_0,$H0 -+ fmov $IN23_4,x12 -+ umlal $ACC3,$IN01_2,${R1}[0] -+ ldp x8,x12,[$inp],#16 // inp[0:1] -+ umlal $ACC0,$IN01_2,${S3}[0] -+ ldp x9,x13,[$inp],#48 -+ umlal $ACC4,$IN01_2,${R2}[0] -+ umlal $ACC1,$IN01_2,${S4}[0] -+ umlal $ACC2,$IN01_2,${R0}[0] -+#ifdef __AARCH64EB__ -+ rev x8,x8 -+ rev x12,x12 -+ rev x9,x9 -+ rev x13,x13 -+#endif -+ -+ add $IN01_1,$IN01_1,$H1 -+ umlal $ACC3,$IN01_0,${R3}[0] -+ umlal $ACC4,$IN01_0,${R4}[0] -+ and x4,x8,#0x03ffffff // base 2^64 -> base 2^26 -+ umlal $ACC2,$IN01_0,${R2}[0] -+ and x5,x9,#0x03ffffff -+ umlal $ACC0,$IN01_0,${R0}[0] -+ ubfx x6,x8,#26,#26 -+ umlal $ACC1,$IN01_0,${R1}[0] -+ ubfx x7,x9,#26,#26 -+ -+ add $IN01_3,$IN01_3,$H3 -+ add x4,x4,x5,lsl#32 // bfi x4,x5,#32,#32 -+ umlal $ACC3,$IN01_1,${R2}[0] -+ extr x8,x12,x8,#52 -+ umlal $ACC4,$IN01_1,${R3}[0] -+ extr x9,x13,x9,#52 -+ umlal $ACC0,$IN01_1,${S4}[0] -+ add x6,x6,x7,lsl#32 // bfi x6,x7,#32,#32 -+ umlal $ACC2,$IN01_1,${R1}[0] -+ fmov $IN01_0,x4 -+ umlal $ACC1,$IN01_1,${R0}[0] -+ and x8,x8,#0x03ffffff -+ -+ add $IN01_4,$IN01_4,$H4 -+ and x9,x9,#0x03ffffff -+ umlal $ACC3,$IN01_3,${R0}[0] -+ ubfx x10,x12,#14,#26 -+ umlal $ACC0,$IN01_3,${S2}[0] -+ ubfx x11,x13,#14,#26 -+ umlal $ACC4,$IN01_3,${R1}[0] -+ add x8,x8,x9,lsl#32 // bfi x8,x9,#32,#32 -+ umlal $ACC1,$IN01_3,${S3}[0] -+ fmov $IN01_1,x6 -+ umlal $ACC2,$IN01_3,${S4}[0] -+ add x12,$padbit,x12,lsr#40 -+ -+ umlal $ACC3,$IN01_4,${S4}[0] -+ add x13,$padbit,x13,lsr#40 -+ umlal $ACC0,$IN01_4,${S1}[0] -+ add x10,x10,x11,lsl#32 // bfi x10,x11,#32,#32 -+ umlal $ACC4,$IN01_4,${R0}[0] -+ add x12,x12,x13,lsl#32 // bfi x12,x13,#32,#32 -+ umlal $ACC1,$IN01_4,${S2}[0] -+ fmov $IN01_2,x8 -+ umlal $ACC2,$IN01_4,${S3}[0] -+ fmov $IN01_3,x10 -+ fmov $IN01_4,x12 -+ -+ ///////////////////////////////////////////////////////////////// -+ // lazy reduction as discussed in "NEON crypto" by D.J. Bernstein -+ // and P. Schwabe -+ // -+ // [see discussion in poly1305-armv4 module] -+ -+ ushr $T0.2d,$ACC3,#26 -+ xtn $H3,$ACC3 -+ ushr $T1.2d,$ACC0,#26 -+ and $ACC0,$ACC0,$MASK.2d -+ add $ACC4,$ACC4,$T0.2d // h3 -> h4 -+ bic $H3,#0xfc,lsl#24 // &=0x03ffffff -+ add $ACC1,$ACC1,$T1.2d // h0 -> h1 -+ -+ ushr $T0.2d,$ACC4,#26 -+ xtn $H4,$ACC4 -+ ushr $T1.2d,$ACC1,#26 -+ xtn $H1,$ACC1 -+ bic $H4,#0xfc,lsl#24 -+ add $ACC2,$ACC2,$T1.2d // h1 -> h2 -+ -+ add $ACC0,$ACC0,$T0.2d -+ shl $T0.2d,$T0.2d,#2 -+ shrn $T1.2s,$ACC2,#26 -+ xtn $H2,$ACC2 -+ add $ACC0,$ACC0,$T0.2d // h4 -> h0 -+ bic $H1,#0xfc,lsl#24 -+ add $H3,$H3,$T1.2s // h2 -> h3 -+ bic $H2,#0xfc,lsl#24 -+ -+ shrn $T0.2s,$ACC0,#26 -+ xtn $H0,$ACC0 -+ ushr $T1.2s,$H3,#26 -+ bic $H3,#0xfc,lsl#24 -+ bic $H0,#0xfc,lsl#24 -+ add $H1,$H1,$T0.2s // h0 -> h1 -+ add $H4,$H4,$T1.2s // h3 -> h4 -+ -+ b.hi .Loop_neon -+ -+.Lskip_loop: -+ dup $IN23_2,${IN23_2}[0] -+ add $IN01_2,$IN01_2,$H2 -+ -+ //////////////////////////////////////////////////////////////// -+ // multiply (inp[0:1]+hash) or inp[2:3] by r^2:r^1 -+ -+ adds $len,$len,#32 -+ b.ne .Long_tail -+ -+ dup $IN23_2,${IN01_2}[0] -+ add $IN23_0,$IN01_0,$H0 -+ add $IN23_3,$IN01_3,$H3 -+ add $IN23_1,$IN01_1,$H1 -+ add $IN23_4,$IN01_4,$H4 -+ -+.Long_tail: -+ dup $IN23_0,${IN23_0}[0] -+ umull2 $ACC0,$IN23_2,${S3} -+ umull2 $ACC3,$IN23_2,${R1} -+ umull2 $ACC4,$IN23_2,${R2} -+ umull2 $ACC2,$IN23_2,${R0} -+ umull2 $ACC1,$IN23_2,${S4} -+ -+ dup $IN23_1,${IN23_1}[0] -+ umlal2 $ACC0,$IN23_0,${R0} -+ umlal2 $ACC2,$IN23_0,${R2} -+ umlal2 $ACC3,$IN23_0,${R3} -+ umlal2 $ACC4,$IN23_0,${R4} -+ umlal2 $ACC1,$IN23_0,${R1} -+ -+ dup $IN23_3,${IN23_3}[0] -+ umlal2 $ACC0,$IN23_1,${S4} -+ umlal2 $ACC3,$IN23_1,${R2} -+ umlal2 $ACC2,$IN23_1,${R1} -+ umlal2 $ACC4,$IN23_1,${R3} -+ umlal2 $ACC1,$IN23_1,${R0} -+ -+ dup $IN23_4,${IN23_4}[0] -+ umlal2 $ACC3,$IN23_3,${R0} -+ umlal2 $ACC4,$IN23_3,${R1} -+ umlal2 $ACC0,$IN23_3,${S2} -+ umlal2 $ACC1,$IN23_3,${S3} -+ umlal2 $ACC2,$IN23_3,${S4} -+ -+ umlal2 $ACC3,$IN23_4,${S4} -+ umlal2 $ACC0,$IN23_4,${S1} -+ umlal2 $ACC4,$IN23_4,${R0} -+ umlal2 $ACC1,$IN23_4,${S2} -+ umlal2 $ACC2,$IN23_4,${S3} -+ -+ b.eq .Lshort_tail -+ -+ //////////////////////////////////////////////////////////////// -+ // (hash+inp[0:1])*r^4:r^3 and accumulate -+ -+ add $IN01_0,$IN01_0,$H0 -+ umlal $ACC3,$IN01_2,${R1} -+ umlal $ACC0,$IN01_2,${S3} -+ umlal $ACC4,$IN01_2,${R2} -+ umlal $ACC1,$IN01_2,${S4} -+ umlal $ACC2,$IN01_2,${R0} -+ -+ add $IN01_1,$IN01_1,$H1 -+ umlal $ACC3,$IN01_0,${R3} -+ umlal $ACC0,$IN01_0,${R0} -+ umlal $ACC4,$IN01_0,${R4} -+ umlal $ACC1,$IN01_0,${R1} -+ umlal $ACC2,$IN01_0,${R2} -+ -+ add $IN01_3,$IN01_3,$H3 -+ umlal $ACC3,$IN01_1,${R2} -+ umlal $ACC0,$IN01_1,${S4} -+ umlal $ACC4,$IN01_1,${R3} -+ umlal $ACC1,$IN01_1,${R0} -+ umlal $ACC2,$IN01_1,${R1} -+ -+ add $IN01_4,$IN01_4,$H4 -+ umlal $ACC3,$IN01_3,${R0} -+ umlal $ACC0,$IN01_3,${S2} -+ umlal $ACC4,$IN01_3,${R1} -+ umlal $ACC1,$IN01_3,${S3} -+ umlal $ACC2,$IN01_3,${S4} -+ -+ umlal $ACC3,$IN01_4,${S4} -+ umlal $ACC0,$IN01_4,${S1} -+ umlal $ACC4,$IN01_4,${R0} -+ umlal $ACC1,$IN01_4,${S2} -+ umlal $ACC2,$IN01_4,${S3} -+ -+.Lshort_tail: -+ //////////////////////////////////////////////////////////////// -+ // horizontal add -+ -+ addp $ACC3,$ACC3,$ACC3 -+ ldp d8,d9,[sp,#16] // meet ABI requirements -+ addp $ACC0,$ACC0,$ACC0 -+ ldp d10,d11,[sp,#32] -+ addp $ACC4,$ACC4,$ACC4 -+ ldp d12,d13,[sp,#48] -+ addp $ACC1,$ACC1,$ACC1 -+ ldp d14,d15,[sp,#64] -+ addp $ACC2,$ACC2,$ACC2 -+ -+ //////////////////////////////////////////////////////////////// -+ // lazy reduction, but without narrowing -+ -+ ushr $T0.2d,$ACC3,#26 -+ and $ACC3,$ACC3,$MASK.2d -+ ushr $T1.2d,$ACC0,#26 -+ and $ACC0,$ACC0,$MASK.2d -+ -+ add $ACC4,$ACC4,$T0.2d // h3 -> h4 -+ add $ACC1,$ACC1,$T1.2d // h0 -> h1 -+ -+ ushr $T0.2d,$ACC4,#26 -+ and $ACC4,$ACC4,$MASK.2d -+ ushr $T1.2d,$ACC1,#26 -+ and $ACC1,$ACC1,$MASK.2d -+ add $ACC2,$ACC2,$T1.2d // h1 -> h2 -+ -+ add $ACC0,$ACC0,$T0.2d -+ shl $T0.2d,$T0.2d,#2 -+ ushr $T1.2d,$ACC2,#26 -+ and $ACC2,$ACC2,$MASK.2d -+ add $ACC0,$ACC0,$T0.2d // h4 -> h0 -+ add $ACC3,$ACC3,$T1.2d // h2 -> h3 -+ -+ ushr $T0.2d,$ACC0,#26 -+ and $ACC0,$ACC0,$MASK.2d -+ ushr $T1.2d,$ACC3,#26 -+ and $ACC3,$ACC3,$MASK.2d -+ add $ACC1,$ACC1,$T0.2d // h0 -> h1 -+ add $ACC4,$ACC4,$T1.2d // h3 -> h4 -+ -+ //////////////////////////////////////////////////////////////// -+ // write the result, can be partially reduced -+ -+ st4 {$ACC0,$ACC1,$ACC2,$ACC3}[0],[$ctx],#16 -+ st1 {$ACC4}[0],[$ctx] -+ -+.Lno_data_neon: -+ ldr x29,[sp],#80 -+ ret -+.size poly1305_blocks_neon,.-poly1305_blocks_neon -+ -+.type poly1305_emit_neon,%function -+.align 5 -+poly1305_emit_neon: -+ ldr $is_base2_26,[$ctx,#24] -+ cbz $is_base2_26,poly1305_emit -+ -+ ldp w10,w11,[$ctx] // load hash value base 2^26 -+ ldp w12,w13,[$ctx,#8] -+ ldr w14,[$ctx,#16] -+ -+ add $h0,x10,x11,lsl#26 // base 2^26 -> base 2^64 -+ lsr $h1,x12,#12 -+ adds $h0,$h0,x12,lsl#52 -+ add $h1,$h1,x13,lsl#14 -+ adc $h1,$h1,xzr -+ lsr $h2,x14,#24 -+ adds $h1,$h1,x14,lsl#40 -+ adc $h2,$h2,xzr // can be partially reduced... -+ -+ ldp $t0,$t1,[$nonce] // load nonce -+ -+ and $d0,$h2,#-4 // ... so reduce -+ add $d0,$d0,$h2,lsr#2 -+ and $h2,$h2,#3 -+ adds $h0,$h0,$d0 -+ adcs $h1,$h1,xzr -+ adc $h2,$h2,xzr -+ -+ adds $d0,$h0,#5 // compare to modulus -+ adcs $d1,$h1,xzr -+ adc $d2,$h2,xzr -+ -+ tst $d2,#-4 // see if it's carried/borrowed -+ -+ csel $h0,$h0,$d0,eq -+ csel $h1,$h1,$d1,eq -+ -+#ifdef __AARCH64EB__ -+ ror $t0,$t0,#32 // flip nonce words -+ ror $t1,$t1,#32 -+#endif -+ adds $h0,$h0,$t0 // accumulate nonce -+ adc $h1,$h1,$t1 -+#ifdef __AARCH64EB__ -+ rev $h0,$h0 // flip output bytes -+ rev $h1,$h1 -+#endif -+ stp $h0,$h1,[$mac] // write result -+ -+ ret -+.size poly1305_emit_neon,.-poly1305_emit_neon -+#endif -+ -+.align 5 -+.Lzeros: -+.long 0,0,0,0,0,0,0,0 -+#ifndef __KERNEL__ -+.LOPENSSL_armcap_P: -+#ifdef __ILP32__ -+.long OPENSSL_armcap_P-. -+#else -+.quad OPENSSL_armcap_P-. -+#endif -+#endif -+.align 2 -+___ -+ -+open SELF,$0; -+while() { -+ next if (/^#!/); -+ last if (!s/^#/\/\// and !/^$/); -+ print; -+} -+close SELF; -+ -+foreach (split("\n",$code)) { -+ s/\b(shrn\s+v[0-9]+)\.[24]d/$1.2s/ or -+ s/\b(fmov\s+)v([0-9]+)[^,]*,\s*x([0-9]+)/$1d$2,x$3/ or -+ (m/\bdup\b/ and (s/\.[24]s/.2d/g or 1)) or -+ (m/\b(eor|and)/ and (s/\.[248][sdh]/.16b/g or 1)) or -+ (m/\bum(ul|la)l\b/ and (s/\.4s/.2s/g or 1)) or -+ (m/\bum(ul|la)l2\b/ and (s/\.2s/.4s/g or 1)) or -+ (m/\bst[1-4]\s+{[^}]+}\[/ and (s/\.[24]d/.s/g or 1)); -+ -+ s/\.[124]([sd])\[/.$1\[/; -+ -+ print $_,"\n"; -+} -+close STDOUT; ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/poly1305/poly1305-mips64.pl 2019-08-20 20:26:42.401341426 +0000 -@@ -0,0 +1,467 @@ -+#!/usr/bin/env perl -+# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause -+# -+# This code is taken from the OpenSSL project but the author, Andy Polyakov, -+# has relicensed it under the licenses specified in the SPDX header above. -+# The original headers, including the original license headers, are -+# included below for completeness. -+# -+# ==================================================================== -+# Written by Andy Polyakov for the OpenSSL -+# project. The module is, however, dual licensed under OpenSSL and -+# CRYPTOGAMS licenses depending on where you obtain it. For further -+# details see http://www.openssl.org/~appro/cryptogams/. -+# ==================================================================== -+# -+# Poly1305 hash for MIPS64. -+# -+# May 2016 -+# -+# Numbers are cycles per processed byte with poly1305_blocks alone. -+# -+# IALU/gcc -+# R1x000 5.64/+120% (big-endian) -+# Octeon II 3.80/+280% (little-endian) -+ -+###################################################################### -+# There is a number of MIPS ABI in use, O32 and N32/64 are most -+# widely used. Then there is a new contender: NUBI. It appears that if -+# one picks the latter, it's possible to arrange code in ABI neutral -+# manner. Therefore let's stick to NUBI register layout: -+# -+($zero,$at,$t0,$t1,$t2)=map("\$$_",(0..2,24,25)); -+($a0,$a1,$a2,$a3,$a4,$a5,$a6,$a7)=map("\$$_",(4..11)); -+($s0,$s1,$s2,$s3,$s4,$s5,$s6,$s7,$s8,$s9,$s10,$s11)=map("\$$_",(12..23)); -+($gp,$tp,$sp,$fp,$ra)=map("\$$_",(3,28..31)); -+# -+# The return value is placed in $a0. Following coding rules facilitate -+# interoperability: -+# -+# - never ever touch $tp, "thread pointer", former $gp [o32 can be -+# excluded from the rule, because it's specified volatile]; -+# - copy return value to $t0, former $v0 [or to $a0 if you're adapting -+# old code]; -+# - on O32 populate $a4-$a7 with 'lw $aN,4*N($sp)' if necessary; -+# -+# For reference here is register layout for N32/64 MIPS ABIs: -+# -+# ($zero,$at,$v0,$v1)=map("\$$_",(0..3)); -+# ($a0,$a1,$a2,$a3,$a4,$a5,$a6,$a7)=map("\$$_",(4..11)); -+# ($t0,$t1,$t2,$t3,$t8,$t9)=map("\$$_",(12..15,24,25)); -+# ($s0,$s1,$s2,$s3,$s4,$s5,$s6,$s7)=map("\$$_",(16..23)); -+# ($gp,$sp,$fp,$ra)=map("\$$_",(28..31)); -+# -+# -+# -+###################################################################### -+ -+$flavour = shift || "64"; # supported flavours are o32,n32,64,nubi32,nubi64 -+ -+die "MIPS64 only" unless ($flavour =~ /64|n32/i); -+ -+$v0 = ($flavour =~ /nubi/i) ? $a0 : $t0; -+$SAVED_REGS_MASK = ($flavour =~ /nubi/i) ? "0x0003f000" : "0x00030000"; -+ -+($ctx,$inp,$len,$padbit) = ($a0,$a1,$a2,$a3); -+($in0,$in1,$tmp0,$tmp1,$tmp2,$tmp3,$tmp4) = ($a4,$a5,$a6,$a7,$at,$t0,$t1); -+ -+$code.=<<___; -+#if (defined(_MIPS_ARCH_MIPS64R3) || defined(_MIPS_ARCH_MIPS64R5) || \\ -+ defined(_MIPS_ARCH_MIPS64R6)) \\ -+ && !defined(_MIPS_ARCH_MIPS64R2) -+# define _MIPS_ARCH_MIPS64R2 -+#endif -+ -+#if defined(_MIPS_ARCH_MIPS64R6) -+# define dmultu(rs,rt) -+# define mflo(rd,rs,rt) dmulu rd,rs,rt -+# define mfhi(rd,rs,rt) dmuhu rd,rs,rt -+#else -+# define dmultu(rs,rt) dmultu rs,rt -+# define mflo(rd,rs,rt) mflo rd -+# define mfhi(rd,rs,rt) mfhi rd -+#endif -+ -+#ifdef __KERNEL__ -+# define poly1305_init poly1305_init_mips -+# define poly1305_blocks poly1305_blocks_mips -+# define poly1305_emit poly1305_emit_mips -+#endif -+ -+#if defined(__MIPSEB__) && !defined(MIPSEB) -+# define MIPSEB -+#endif -+ -+#ifdef MIPSEB -+# define MSB 0 -+# define LSB 7 -+#else -+# define MSB 7 -+# define LSB 0 -+#endif -+ -+.text -+.set noat -+.set noreorder -+ -+.align 5 -+.globl poly1305_init -+.ent poly1305_init -+poly1305_init: -+ .frame $sp,0,$ra -+ .set reorder -+ -+ sd $zero,0($ctx) -+ sd $zero,8($ctx) -+ sd $zero,16($ctx) -+ -+ beqz $inp,.Lno_key -+ -+#if defined(_MIPS_ARCH_MIPS64R6) -+ ld $in0,0($inp) -+ ld $in1,8($inp) -+#else -+ ldl $in0,0+MSB($inp) -+ ldl $in1,8+MSB($inp) -+ ldr $in0,0+LSB($inp) -+ ldr $in1,8+LSB($inp) -+#endif -+#ifdef MIPSEB -+# if defined(_MIPS_ARCH_MIPS64R2) -+ dsbh $in0,$in0 # byte swap -+ dsbh $in1,$in1 -+ dshd $in0,$in0 -+ dshd $in1,$in1 -+# else -+ ori $tmp0,$zero,0xFF -+ dsll $tmp2,$tmp0,32 -+ or $tmp0,$tmp2 # 0x000000FF000000FF -+ -+ and $tmp1,$in0,$tmp0 # byte swap -+ and $tmp3,$in1,$tmp0 -+ dsrl $tmp2,$in0,24 -+ dsrl $tmp4,$in1,24 -+ dsll $tmp1,24 -+ dsll $tmp3,24 -+ and $tmp2,$tmp0 -+ and $tmp4,$tmp0 -+ dsll $tmp0,8 # 0x0000FF000000FF00 -+ or $tmp1,$tmp2 -+ or $tmp3,$tmp4 -+ and $tmp2,$in0,$tmp0 -+ and $tmp4,$in1,$tmp0 -+ dsrl $in0,8 -+ dsrl $in1,8 -+ dsll $tmp2,8 -+ dsll $tmp4,8 -+ and $in0,$tmp0 -+ and $in1,$tmp0 -+ or $tmp1,$tmp2 -+ or $tmp3,$tmp4 -+ or $in0,$tmp1 -+ or $in1,$tmp3 -+ dsrl $tmp1,$in0,32 -+ dsrl $tmp3,$in1,32 -+ dsll $in0,32 -+ dsll $in1,32 -+ or $in0,$tmp1 -+ or $in1,$tmp3 -+# endif -+#endif -+ li $tmp0,1 -+ dsll $tmp0,32 -+ daddiu $tmp0,-63 -+ dsll $tmp0,28 -+ daddiu $tmp0,-1 # 0ffffffc0fffffff -+ -+ and $in0,$tmp0 -+ daddiu $tmp0,-3 # 0ffffffc0ffffffc -+ and $in1,$tmp0 -+ -+ sd $in0,24($ctx) -+ dsrl $tmp0,$in1,2 -+ sd $in1,32($ctx) -+ daddu $tmp0,$in1 # s1 = r1 + (r1 >> 2) -+ sd $tmp0,40($ctx) -+ -+.Lno_key: -+ li $v0,0 # return 0 -+ jr $ra -+.end poly1305_init -+___ -+{ -+my ($h0,$h1,$h2,$r0,$r1,$s1,$d0,$d1,$d2) = -+ ($s0,$s1,$s2,$s3,$s4,$s5,$in0,$in1,$t2); -+ -+$code.=<<___; -+.align 5 -+.globl poly1305_blocks -+.ent poly1305_blocks -+poly1305_blocks: -+ .set noreorder -+ dsrl $len,4 # number of complete blocks -+ bnez $len,poly1305_blocks_internal -+ nop -+ jr $ra -+ nop -+.end poly1305_blocks -+ -+.align 5 -+.ent poly1305_blocks_internal -+poly1305_blocks_internal: -+ .frame $sp,6*8,$ra -+ .mask $SAVED_REGS_MASK,-8 -+ .set noreorder -+ dsubu $sp,6*8 -+ sd $s5,40($sp) -+ sd $s4,32($sp) -+___ -+$code.=<<___ if ($flavour =~ /nubi/i); # optimize non-nubi prologue -+ sd $s3,24($sp) -+ sd $s2,16($sp) -+ sd $s1,8($sp) -+ sd $s0,0($sp) -+___ -+$code.=<<___; -+ .set reorder -+ -+ ld $h0,0($ctx) # load hash value -+ ld $h1,8($ctx) -+ ld $h2,16($ctx) -+ -+ ld $r0,24($ctx) # load key -+ ld $r1,32($ctx) -+ ld $s1,40($ctx) -+ -+.Loop: -+#if defined(_MIPS_ARCH_MIPS64R6) -+ ld $in0,0($inp) # load input -+ ld $in1,8($inp) -+#else -+ ldl $in0,0+MSB($inp) # load input -+ ldl $in1,8+MSB($inp) -+ ldr $in0,0+LSB($inp) -+ ldr $in1,8+LSB($inp) -+#endif -+ daddiu $len,-1 -+ daddiu $inp,16 -+#ifdef MIPSEB -+# if defined(_MIPS_ARCH_MIPS64R2) -+ dsbh $in0,$in0 # byte swap -+ dsbh $in1,$in1 -+ dshd $in0,$in0 -+ dshd $in1,$in1 -+# else -+ ori $tmp0,$zero,0xFF -+ dsll $tmp2,$tmp0,32 -+ or $tmp0,$tmp2 # 0x000000FF000000FF -+ -+ and $tmp1,$in0,$tmp0 # byte swap -+ and $tmp3,$in1,$tmp0 -+ dsrl $tmp2,$in0,24 -+ dsrl $tmp4,$in1,24 -+ dsll $tmp1,24 -+ dsll $tmp3,24 -+ and $tmp2,$tmp0 -+ and $tmp4,$tmp0 -+ dsll $tmp0,8 # 0x0000FF000000FF00 -+ or $tmp1,$tmp2 -+ or $tmp3,$tmp4 -+ and $tmp2,$in0,$tmp0 -+ and $tmp4,$in1,$tmp0 -+ dsrl $in0,8 -+ dsrl $in1,8 -+ dsll $tmp2,8 -+ dsll $tmp4,8 -+ and $in0,$tmp0 -+ and $in1,$tmp0 -+ or $tmp1,$tmp2 -+ or $tmp3,$tmp4 -+ or $in0,$tmp1 -+ or $in1,$tmp3 -+ dsrl $tmp1,$in0,32 -+ dsrl $tmp3,$in1,32 -+ dsll $in0,32 -+ dsll $in1,32 -+ or $in0,$tmp1 -+ or $in1,$tmp3 -+# endif -+#endif -+ daddu $h0,$in0 # accumulate input -+ daddu $h1,$in1 -+ sltu $tmp0,$h0,$in0 -+ sltu $tmp1,$h1,$in1 -+ daddu $h1,$tmp0 -+ -+ dmultu ($r0,$h0) # h0*r0 -+ daddu $h2,$padbit -+ sltu $tmp0,$h1,$tmp0 -+ mflo ($d0,$r0,$h0) -+ mfhi ($d1,$r0,$h0) -+ -+ dmultu ($s1,$h1) # h1*5*r1 -+ daddu $tmp0,$tmp1 -+ daddu $h2,$tmp0 -+ mflo ($tmp0,$s1,$h1) -+ mfhi ($tmp1,$s1,$h1) -+ -+ dmultu ($r1,$h0) # h0*r1 -+ daddu $d0,$tmp0 -+ daddu $d1,$tmp1 -+ mflo ($tmp2,$r1,$h0) -+ mfhi ($d2,$r1,$h0) -+ sltu $tmp0,$d0,$tmp0 -+ daddu $d1,$tmp0 -+ -+ dmultu ($r0,$h1) # h1*r0 -+ daddu $d1,$tmp2 -+ sltu $tmp2,$d1,$tmp2 -+ mflo ($tmp0,$r0,$h1) -+ mfhi ($tmp1,$r0,$h1) -+ daddu $d2,$tmp2 -+ -+ dmultu ($s1,$h2) # h2*5*r1 -+ daddu $d1,$tmp0 -+ daddu $d2,$tmp1 -+ mflo ($tmp2,$s1,$h2) -+ -+ dmultu ($r0,$h2) # h2*r0 -+ sltu $tmp0,$d1,$tmp0 -+ daddu $d2,$tmp0 -+ mflo ($tmp3,$r0,$h2) -+ -+ daddu $d1,$tmp2 -+ daddu $d2,$tmp3 -+ sltu $tmp2,$d1,$tmp2 -+ daddu $d2,$tmp2 -+ -+ li $tmp0,-4 # final reduction -+ and $tmp0,$d2 -+ dsrl $tmp1,$d2,2 -+ andi $h2,$d2,3 -+ daddu $tmp0,$tmp1 -+ daddu $h0,$d0,$tmp0 -+ sltu $tmp0,$h0,$tmp0 -+ daddu $h1,$d1,$tmp0 -+ sltu $tmp0,$h1,$tmp0 -+ daddu $h2,$h2,$tmp0 -+ -+ bnez $len,.Loop -+ -+ sd $h0,0($ctx) # store hash value -+ sd $h1,8($ctx) -+ sd $h2,16($ctx) -+ -+ .set noreorder -+ ld $s5,40($sp) # epilogue -+ ld $s4,32($sp) -+___ -+$code.=<<___ if ($flavour =~ /nubi/i); # optimize non-nubi epilogue -+ ld $s3,24($sp) -+ ld $s2,16($sp) -+ ld $s1,8($sp) -+ ld $s0,0($sp) -+___ -+$code.=<<___; -+ jr $ra -+ daddu $sp,6*8 -+.end poly1305_blocks_internal -+___ -+} -+{ -+my ($ctx,$mac,$nonce) = ($a0,$a1,$a2); -+ -+$code.=<<___; -+.align 5 -+.globl poly1305_emit -+.ent poly1305_emit -+poly1305_emit: -+ .frame $sp,0,$ra -+ .set reorder -+ -+ ld $tmp0,0($ctx) -+ ld $tmp1,8($ctx) -+ ld $tmp2,16($ctx) -+ -+ daddiu $in0,$tmp0,5 # compare to modulus -+ sltiu $tmp3,$in0,5 -+ daddu $in1,$tmp1,$tmp3 -+ sltu $tmp3,$in1,$tmp3 -+ daddu $tmp2,$tmp2,$tmp3 -+ -+ dsrl $tmp2,2 # see if it carried/borrowed -+ dsubu $tmp2,$zero,$tmp2 -+ nor $tmp3,$zero,$tmp2 -+ -+ and $in0,$tmp2 -+ and $tmp0,$tmp3 -+ and $in1,$tmp2 -+ and $tmp1,$tmp3 -+ or $in0,$tmp0 -+ or $in1,$tmp1 -+ -+ lwu $tmp0,0($nonce) # load nonce -+ lwu $tmp1,4($nonce) -+ lwu $tmp2,8($nonce) -+ lwu $tmp3,12($nonce) -+ dsll $tmp1,32 -+ dsll $tmp3,32 -+ or $tmp0,$tmp1 -+ or $tmp2,$tmp3 -+ -+ daddu $in0,$tmp0 # accumulate nonce -+ daddu $in1,$tmp2 -+ sltu $tmp0,$in0,$tmp0 -+ daddu $in1,$tmp0 -+ -+ dsrl $tmp0,$in0,8 # write mac value -+ dsrl $tmp1,$in0,16 -+ dsrl $tmp2,$in0,24 -+ sb $in0,0($mac) -+ dsrl $tmp3,$in0,32 -+ sb $tmp0,1($mac) -+ dsrl $tmp0,$in0,40 -+ sb $tmp1,2($mac) -+ dsrl $tmp1,$in0,48 -+ sb $tmp2,3($mac) -+ dsrl $tmp2,$in0,56 -+ sb $tmp3,4($mac) -+ dsrl $tmp3,$in1,8 -+ sb $tmp0,5($mac) -+ dsrl $tmp0,$in1,16 -+ sb $tmp1,6($mac) -+ dsrl $tmp1,$in1,24 -+ sb $tmp2,7($mac) -+ -+ sb $in1,8($mac) -+ dsrl $tmp2,$in1,32 -+ sb $tmp3,9($mac) -+ dsrl $tmp3,$in1,40 -+ sb $tmp0,10($mac) -+ dsrl $tmp0,$in1,48 -+ sb $tmp1,11($mac) -+ dsrl $tmp1,$in1,56 -+ sb $tmp2,12($mac) -+ sb $tmp3,13($mac) -+ sb $tmp0,14($mac) -+ sb $tmp1,15($mac) -+ -+ jr $ra -+.end poly1305_emit -+.rdata -+.align 2 -+___ -+} -+ -+open SELF,$0; -+while() { -+ next if (/^#!/); -+ last if (!s/^#/\/\// and !/^$/); -+ print; -+} -+close SELF; -+ -+$output=pop and open STDOUT,">$output"; -+print $code; -+close STDOUT; -+ ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/zinc/poly1305/poly1305-x86_64.pl 2019-08-20 20:26:42.402341426 +0000 -@@ -0,0 +1,4266 @@ -+#!/usr/bin/env perl -+# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause -+# -+# Copyright (C) 2017-2018 Samuel Neves . All Rights Reserved. -+# Copyright (C) 2017-2019 Jason A. Donenfeld . All Rights Reserved. -+# Copyright (C) 2006-2017 CRYPTOGAMS by . All Rights Reserved. -+# -+# This code is taken from the OpenSSL project but the author, Andy Polyakov, -+# has relicensed it under the licenses specified in the SPDX header above. -+# The original headers, including the original license headers, are -+# included below for completeness. -+# -+# ==================================================================== -+# Written by Andy Polyakov for the OpenSSL -+# project. The module is, however, dual licensed under OpenSSL and -+# CRYPTOGAMS licenses depending on where you obtain it. For further -+# details see http://www.openssl.org/~appro/cryptogams/. -+# ==================================================================== -+# -+# This module implements Poly1305 hash for x86_64. -+# -+# March 2015 -+# -+# Initial release. -+# -+# December 2016 -+# -+# Add AVX512F+VL+BW code path. -+# -+# November 2017 -+# -+# Convert AVX512F+VL+BW code path to pure AVX512F, so that it can be -+# executed even on Knights Landing. Trigger for modification was -+# observation that AVX512 code paths can negatively affect overall -+# Skylake-X system performance. Since we are likely to suppress -+# AVX512F capability flag [at least on Skylake-X], conversion serves -+# as kind of "investment protection". Note that next *lake processor, -+# Cannolake, has AVX512IFMA code path to execute... -+# -+# Numbers are cycles per processed byte with poly1305_blocks alone, -+# measured with rdtsc at fixed clock frequency. -+# -+# IALU/gcc-4.8(*) AVX(**) AVX2 AVX-512 -+# P4 4.46/+120% - -+# Core 2 2.41/+90% - -+# Westmere 1.88/+120% - -+# Sandy Bridge 1.39/+140% 1.10 -+# Haswell 1.14/+175% 1.11 0.65 -+# Skylake[-X] 1.13/+120% 0.96 0.51 [0.35] -+# Silvermont 2.83/+95% - -+# Knights L 3.60/? 1.65 1.10 0.41(***) -+# Goldmont 1.70/+180% - -+# VIA Nano 1.82/+150% - -+# Sledgehammer 1.38/+160% - -+# Bulldozer 2.30/+130% 0.97 -+# Ryzen 1.15/+200% 1.08 1.18 -+# -+# (*) improvement coefficients relative to clang are more modest and -+# are ~50% on most processors, in both cases we are comparing to -+# __int128 code; -+# (**) SSE2 implementation was attempted, but among non-AVX processors -+# it was faster than integer-only code only on older Intel P4 and -+# Core processors, 50-30%, less newer processor is, but slower on -+# contemporary ones, for example almost 2x slower on Atom, and as -+# former are naturally disappearing, SSE2 is deemed unnecessary; -+# (***) strangely enough performance seems to vary from core to core, -+# listed result is best case; -+ -+$flavour = shift; -+$output = shift; -+if ($flavour =~ /\./) { $output = $flavour; undef $flavour; } -+ -+$win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/); -+$kernel=0; $kernel=1 if (!$flavour && !$output); -+ -+if (!$kernel) { -+ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; -+ ( $xlate="${dir}x86_64-xlate.pl" and -f $xlate ) or -+ ( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or -+ die "can't locate x86_64-xlate.pl"; -+ -+ open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\""; -+ *STDOUT=*OUT; -+ -+ if (`$ENV{CC} -Wa,-v -c -o /dev/null -x assembler /dev/null 2>&1` -+ =~ /GNU assembler version ([2-9]\.[0-9]+)/) { -+ $avx = ($1>=2.19) + ($1>=2.22) + ($1>=2.25); -+ } -+ -+ if (!$avx && $win64 && ($flavour =~ /nasm/ || $ENV{ASM} =~ /nasm/) && -+ `nasm -v 2>&1` =~ /NASM version ([2-9]\.[0-9]+)(?:\.([0-9]+))?/) { -+ $avx = ($1>=2.09) + ($1>=2.10) + ($1>=2.12); -+ $avx += 1 if ($1==2.11 && $2>=8); -+ } -+ -+ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) && -+ `ml64 2>&1` =~ /Version ([0-9]+)\./) { -+ $avx = ($1>=10) + ($1>=11); -+ } -+ -+ if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9]\.[0-9]+)/) { -+ $avx = ($2>=3.0) + ($2>3.0); -+ } -+} else { -+ $avx = 4; # The kernel uses ifdefs for this. -+} -+ -+sub declare_function() { -+ my ($name, $align, $nargs) = @_; -+ if($kernel) { -+ $code .= ".align $align\n"; -+ $code .= "ENTRY($name)\n"; -+ $code .= ".L$name:\n"; -+ } else { -+ $code .= ".globl $name\n"; -+ $code .= ".type $name,\@function,$nargs\n"; -+ $code .= ".align $align\n"; -+ $code .= "$name:\n"; -+ } -+} -+ -+sub end_function() { -+ my ($name) = @_; -+ if($kernel) { -+ $code .= "ENDPROC($name)\n"; -+ } else { -+ $code .= ".size $name,.-$name\n"; -+ } -+} -+ -+$code.=<<___ if $kernel; -+#include -+___ -+ -+if ($avx) { -+$code.=<<___ if $kernel; -+.section .rodata -+___ -+$code.=<<___; -+.align 64 -+.Lconst: -+.Lmask24: -+.long 0x0ffffff,0,0x0ffffff,0,0x0ffffff,0,0x0ffffff,0 -+.L129: -+.long `1<<24`,0,`1<<24`,0,`1<<24`,0,`1<<24`,0 -+.Lmask26: -+.long 0x3ffffff,0,0x3ffffff,0,0x3ffffff,0,0x3ffffff,0 -+.Lpermd_avx2: -+.long 2,2,2,3,2,0,2,1 -+.Lpermd_avx512: -+.long 0,0,0,1, 0,2,0,3, 0,4,0,5, 0,6,0,7 -+ -+.L2_44_inp_permd: -+.long 0,1,1,2,2,3,7,7 -+.L2_44_inp_shift: -+.quad 0,12,24,64 -+.L2_44_mask: -+.quad 0xfffffffffff,0xfffffffffff,0x3ffffffffff,0xffffffffffffffff -+.L2_44_shift_rgt: -+.quad 44,44,42,64 -+.L2_44_shift_lft: -+.quad 8,8,10,64 -+ -+.align 64 -+.Lx_mask44: -+.quad 0xfffffffffff,0xfffffffffff,0xfffffffffff,0xfffffffffff -+.quad 0xfffffffffff,0xfffffffffff,0xfffffffffff,0xfffffffffff -+.Lx_mask42: -+.quad 0x3ffffffffff,0x3ffffffffff,0x3ffffffffff,0x3ffffffffff -+.quad 0x3ffffffffff,0x3ffffffffff,0x3ffffffffff,0x3ffffffffff -+___ -+} -+$code.=<<___ if (!$kernel); -+.asciz "Poly1305 for x86_64, CRYPTOGAMS by " -+.align 16 -+___ -+ -+my ($ctx,$inp,$len,$padbit)=("%rdi","%rsi","%rdx","%rcx"); -+my ($mac,$nonce)=($inp,$len); # *_emit arguments -+my ($d1,$d2,$d3, $r0,$r1,$s1)=("%r8","%r9","%rdi","%r11","%r12","%r13"); -+my ($h0,$h1,$h2)=("%r14","%rbx","%r10"); -+ -+sub poly1305_iteration { -+# input: copy of $r1 in %rax, $h0-$h2, $r0-$r1 -+# output: $h0-$h2 *= $r0-$r1 -+$code.=<<___; -+ mulq $h0 # h0*r1 -+ mov %rax,$d2 -+ mov $r0,%rax -+ mov %rdx,$d3 -+ -+ mulq $h0 # h0*r0 -+ mov %rax,$h0 # future $h0 -+ mov $r0,%rax -+ mov %rdx,$d1 -+ -+ mulq $h1 # h1*r0 -+ add %rax,$d2 -+ mov $s1,%rax -+ adc %rdx,$d3 -+ -+ mulq $h1 # h1*s1 -+ mov $h2,$h1 # borrow $h1 -+ add %rax,$h0 -+ adc %rdx,$d1 -+ -+ imulq $s1,$h1 # h2*s1 -+ add $h1,$d2 -+ mov $d1,$h1 -+ adc \$0,$d3 -+ -+ imulq $r0,$h2 # h2*r0 -+ add $d2,$h1 -+ mov \$-4,%rax # mask value -+ adc $h2,$d3 -+ -+ and $d3,%rax # last reduction step -+ mov $d3,$h2 -+ shr \$2,$d3 -+ and \$3,$h2 -+ add $d3,%rax -+ add %rax,$h0 -+ adc \$0,$h1 -+ adc \$0,$h2 -+___ -+} -+ -+######################################################################## -+# Layout of opaque area is following. -+# -+# unsigned __int64 h[3]; # current hash value base 2^64 -+# unsigned __int64 r[2]; # key value base 2^64 -+ -+$code.=<<___; -+.text -+___ -+$code.=<<___ if (!$kernel); -+.extern OPENSSL_ia32cap_P -+ -+.globl poly1305_init_x86_64 -+.hidden poly1305_init_x86_64 -+.globl poly1305_blocks_x86_64 -+.hidden poly1305_blocks_x86_64 -+.globl poly1305_emit_x86_64 -+.hidden poly1305_emit_x86_64 -+___ -+&declare_function("poly1305_init_x86_64", 32, 3); -+$code.=<<___; -+ xor %rax,%rax -+ mov %rax,0($ctx) # initialize hash value -+ mov %rax,8($ctx) -+ mov %rax,16($ctx) -+ -+ cmp \$0,$inp -+ je .Lno_key -+___ -+$code.=<<___ if (!$kernel); -+ lea poly1305_blocks_x86_64(%rip),%r10 -+ lea poly1305_emit_x86_64(%rip),%r11 -+___ -+$code.=<<___ if (!$kernel && $avx); -+ mov OPENSSL_ia32cap_P+4(%rip),%r9 -+ lea poly1305_blocks_avx(%rip),%rax -+ lea poly1305_emit_avx(%rip),%rcx -+ bt \$`60-32`,%r9 # AVX? -+ cmovc %rax,%r10 -+ cmovc %rcx,%r11 -+___ -+$code.=<<___ if (!$kernel && $avx>1); -+ lea poly1305_blocks_avx2(%rip),%rax -+ bt \$`5+32`,%r9 # AVX2? -+ cmovc %rax,%r10 -+___ -+$code.=<<___ if (!$kernel && $avx>3); -+ mov \$`(1<<31|1<<21|1<<16)`,%rax -+ shr \$32,%r9 -+ and %rax,%r9 -+ cmp %rax,%r9 -+ je .Linit_base2_44 -+___ -+$code.=<<___; -+ mov \$0x0ffffffc0fffffff,%rax -+ mov \$0x0ffffffc0ffffffc,%rcx -+ and 0($inp),%rax -+ and 8($inp),%rcx -+ mov %rax,24($ctx) -+ mov %rcx,32($ctx) -+___ -+$code.=<<___ if (!$kernel && $flavour !~ /elf32/); -+ mov %r10,0(%rdx) -+ mov %r11,8(%rdx) -+___ -+$code.=<<___ if (!$kernel && $flavour =~ /elf32/); -+ mov %r10d,0(%rdx) -+ mov %r11d,4(%rdx) -+___ -+$code.=<<___; -+ mov \$1,%eax -+.Lno_key: -+ ret -+___ -+&end_function("poly1305_init_x86_64"); -+ -+&declare_function("poly1305_blocks_x86_64", 32, 4); -+$code.=<<___; -+.cfi_startproc -+.Lblocks: -+ shr \$4,$len -+ jz .Lno_data # too short -+ -+ push %rbx -+.cfi_push %rbx -+ push %r12 -+.cfi_push %r12 -+ push %r13 -+.cfi_push %r13 -+ push %r14 -+.cfi_push %r14 -+ push %r15 -+.cfi_push %r15 -+ push $ctx -+.cfi_push $ctx -+.Lblocks_body: -+ -+ mov $len,%r15 # reassign $len -+ -+ mov 24($ctx),$r0 # load r -+ mov 32($ctx),$s1 -+ -+ mov 0($ctx),$h0 # load hash value -+ mov 8($ctx),$h1 -+ mov 16($ctx),$h2 -+ -+ mov $s1,$r1 -+ shr \$2,$s1 -+ mov $r1,%rax -+ add $r1,$s1 # s1 = r1 + (r1 >> 2) -+ jmp .Loop -+ -+.align 32 -+.Loop: -+ add 0($inp),$h0 # accumulate input -+ adc 8($inp),$h1 -+ lea 16($inp),$inp -+ adc $padbit,$h2 -+___ -+ -+ &poly1305_iteration(); -+ -+$code.=<<___; -+ mov $r1,%rax -+ dec %r15 # len-=16 -+ jnz .Loop -+ -+ mov 0(%rsp),$ctx -+.cfi_restore $ctx -+ -+ mov $h0,0($ctx) # store hash value -+ mov $h1,8($ctx) -+ mov $h2,16($ctx) -+ -+ mov 8(%rsp),%r15 -+.cfi_restore %r15 -+ mov 16(%rsp),%r14 -+.cfi_restore %r14 -+ mov 24(%rsp),%r13 -+.cfi_restore %r13 -+ mov 32(%rsp),%r12 -+.cfi_restore %r12 -+ mov 40(%rsp),%rbx -+.cfi_restore %rbx -+ lea 48(%rsp),%rsp -+.cfi_adjust_cfa_offset -48 -+.Lno_data: -+.Lblocks_epilogue: -+ ret -+.cfi_endproc -+___ -+&end_function("poly1305_blocks_x86_64"); -+ -+&declare_function("poly1305_emit_x86_64", 32, 3); -+$code.=<<___; -+.Lemit: -+ mov 0($ctx),%r8 # load hash value -+ mov 8($ctx),%r9 -+ mov 16($ctx),%r10 -+ -+ mov %r8,%rax -+ add \$5,%r8 # compare to modulus -+ mov %r9,%rcx -+ adc \$0,%r9 -+ adc \$0,%r10 -+ shr \$2,%r10 # did 130-bit value overflow? -+ cmovnz %r8,%rax -+ cmovnz %r9,%rcx -+ -+ add 0($nonce),%rax # accumulate nonce -+ adc 8($nonce),%rcx -+ mov %rax,0($mac) # write result -+ mov %rcx,8($mac) -+ -+ ret -+___ -+&end_function("poly1305_emit_x86_64"); -+if ($avx) { -+ -+if($kernel) { -+ $code .= "#ifdef CONFIG_AS_AVX\n"; -+} -+ -+######################################################################## -+# Layout of opaque area is following. -+# -+# unsigned __int32 h[5]; # current hash value base 2^26 -+# unsigned __int32 is_base2_26; -+# unsigned __int64 r[2]; # key value base 2^64 -+# unsigned __int64 pad; -+# struct { unsigned __int32 r^2, r^1, r^4, r^3; } r[9]; -+# -+# where r^n are base 2^26 digits of degrees of multiplier key. There are -+# 5 digits, but last four are interleaved with multiples of 5, totalling -+# in 9 elements: r0, r1, 5*r1, r2, 5*r2, r3, 5*r3, r4, 5*r4. -+ -+my ($H0,$H1,$H2,$H3,$H4, $T0,$T1,$T2,$T3,$T4, $D0,$D1,$D2,$D3,$D4, $MASK) = -+ map("%xmm$_",(0..15)); -+ -+$code.=<<___; -+.type __poly1305_block,\@abi-omnipotent -+.align 32 -+__poly1305_block: -+ push $ctx -+___ -+ &poly1305_iteration(); -+$code.=<<___; -+ pop $ctx -+ ret -+.size __poly1305_block,.-__poly1305_block -+ -+.type __poly1305_init_avx,\@abi-omnipotent -+.align 32 -+__poly1305_init_avx: -+ push %rbp -+ mov %rsp,%rbp -+ mov $r0,$h0 -+ mov $r1,$h1 -+ xor $h2,$h2 -+ -+ lea 48+64($ctx),$ctx # size optimization -+ -+ mov $r1,%rax -+ call __poly1305_block # r^2 -+ -+ mov \$0x3ffffff,%eax # save interleaved r^2 and r base 2^26 -+ mov \$0x3ffffff,%edx -+ mov $h0,$d1 -+ and $h0#d,%eax -+ mov $r0,$d2 -+ and $r0#d,%edx -+ mov %eax,`16*0+0-64`($ctx) -+ shr \$26,$d1 -+ mov %edx,`16*0+4-64`($ctx) -+ shr \$26,$d2 -+ -+ mov \$0x3ffffff,%eax -+ mov \$0x3ffffff,%edx -+ and $d1#d,%eax -+ and $d2#d,%edx -+ mov %eax,`16*1+0-64`($ctx) -+ lea (%rax,%rax,4),%eax # *5 -+ mov %edx,`16*1+4-64`($ctx) -+ lea (%rdx,%rdx,4),%edx # *5 -+ mov %eax,`16*2+0-64`($ctx) -+ shr \$26,$d1 -+ mov %edx,`16*2+4-64`($ctx) -+ shr \$26,$d2 -+ -+ mov $h1,%rax -+ mov $r1,%rdx -+ shl \$12,%rax -+ shl \$12,%rdx -+ or $d1,%rax -+ or $d2,%rdx -+ and \$0x3ffffff,%eax -+ and \$0x3ffffff,%edx -+ mov %eax,`16*3+0-64`($ctx) -+ lea (%rax,%rax,4),%eax # *5 -+ mov %edx,`16*3+4-64`($ctx) -+ lea (%rdx,%rdx,4),%edx # *5 -+ mov %eax,`16*4+0-64`($ctx) -+ mov $h1,$d1 -+ mov %edx,`16*4+4-64`($ctx) -+ mov $r1,$d2 -+ -+ mov \$0x3ffffff,%eax -+ mov \$0x3ffffff,%edx -+ shr \$14,$d1 -+ shr \$14,$d2 -+ and $d1#d,%eax -+ and $d2#d,%edx -+ mov %eax,`16*5+0-64`($ctx) -+ lea (%rax,%rax,4),%eax # *5 -+ mov %edx,`16*5+4-64`($ctx) -+ lea (%rdx,%rdx,4),%edx # *5 -+ mov %eax,`16*6+0-64`($ctx) -+ shr \$26,$d1 -+ mov %edx,`16*6+4-64`($ctx) -+ shr \$26,$d2 -+ -+ mov $h2,%rax -+ shl \$24,%rax -+ or %rax,$d1 -+ mov $d1#d,`16*7+0-64`($ctx) -+ lea ($d1,$d1,4),$d1 # *5 -+ mov $d2#d,`16*7+4-64`($ctx) -+ lea ($d2,$d2,4),$d2 # *5 -+ mov $d1#d,`16*8+0-64`($ctx) -+ mov $d2#d,`16*8+4-64`($ctx) -+ -+ mov $r1,%rax -+ call __poly1305_block # r^3 -+ -+ mov \$0x3ffffff,%eax # save r^3 base 2^26 -+ mov $h0,$d1 -+ and $h0#d,%eax -+ shr \$26,$d1 -+ mov %eax,`16*0+12-64`($ctx) -+ -+ mov \$0x3ffffff,%edx -+ and $d1#d,%edx -+ mov %edx,`16*1+12-64`($ctx) -+ lea (%rdx,%rdx,4),%edx # *5 -+ shr \$26,$d1 -+ mov %edx,`16*2+12-64`($ctx) -+ -+ mov $h1,%rax -+ shl \$12,%rax -+ or $d1,%rax -+ and \$0x3ffffff,%eax -+ mov %eax,`16*3+12-64`($ctx) -+ lea (%rax,%rax,4),%eax # *5 -+ mov $h1,$d1 -+ mov %eax,`16*4+12-64`($ctx) -+ -+ mov \$0x3ffffff,%edx -+ shr \$14,$d1 -+ and $d1#d,%edx -+ mov %edx,`16*5+12-64`($ctx) -+ lea (%rdx,%rdx,4),%edx # *5 -+ shr \$26,$d1 -+ mov %edx,`16*6+12-64`($ctx) -+ -+ mov $h2,%rax -+ shl \$24,%rax -+ or %rax,$d1 -+ mov $d1#d,`16*7+12-64`($ctx) -+ lea ($d1,$d1,4),$d1 # *5 -+ mov $d1#d,`16*8+12-64`($ctx) -+ -+ mov $r1,%rax -+ call __poly1305_block # r^4 -+ -+ mov \$0x3ffffff,%eax # save r^4 base 2^26 -+ mov $h0,$d1 -+ and $h0#d,%eax -+ shr \$26,$d1 -+ mov %eax,`16*0+8-64`($ctx) -+ -+ mov \$0x3ffffff,%edx -+ and $d1#d,%edx -+ mov %edx,`16*1+8-64`($ctx) -+ lea (%rdx,%rdx,4),%edx # *5 -+ shr \$26,$d1 -+ mov %edx,`16*2+8-64`($ctx) -+ -+ mov $h1,%rax -+ shl \$12,%rax -+ or $d1,%rax -+ and \$0x3ffffff,%eax -+ mov %eax,`16*3+8-64`($ctx) -+ lea (%rax,%rax,4),%eax # *5 -+ mov $h1,$d1 -+ mov %eax,`16*4+8-64`($ctx) -+ -+ mov \$0x3ffffff,%edx -+ shr \$14,$d1 -+ and $d1#d,%edx -+ mov %edx,`16*5+8-64`($ctx) -+ lea (%rdx,%rdx,4),%edx # *5 -+ shr \$26,$d1 -+ mov %edx,`16*6+8-64`($ctx) -+ -+ mov $h2,%rax -+ shl \$24,%rax -+ or %rax,$d1 -+ mov $d1#d,`16*7+8-64`($ctx) -+ lea ($d1,$d1,4),$d1 # *5 -+ mov $d1#d,`16*8+8-64`($ctx) -+ -+ lea -48-64($ctx),$ctx # size [de-]optimization -+ pop %rbp -+ ret -+.size __poly1305_init_avx,.-__poly1305_init_avx -+___ -+ -+&declare_function("poly1305_blocks_avx", 32, 4); -+$code.=<<___; -+.cfi_startproc -+ mov 20($ctx),%r8d # is_base2_26 -+ cmp \$128,$len -+ jae .Lblocks_avx -+ test %r8d,%r8d -+ jz .Lblocks -+ -+.Lblocks_avx: -+ and \$-16,$len -+ jz .Lno_data_avx -+ -+ vzeroupper -+ -+ test %r8d,%r8d -+ jz .Lbase2_64_avx -+ -+ test \$31,$len -+ jz .Leven_avx -+ -+ push %rbp -+.cfi_push %rbp -+ mov %rsp,%rbp -+ push %rbx -+.cfi_push %rbx -+ push %r12 -+.cfi_push %r12 -+ push %r13 -+.cfi_push %r13 -+ push %r14 -+.cfi_push %r14 -+ push %r15 -+.cfi_push %r15 -+.Lblocks_avx_body: -+ -+ mov $len,%r15 # reassign $len -+ -+ mov 0($ctx),$d1 # load hash value -+ mov 8($ctx),$d2 -+ mov 16($ctx),$h2#d -+ -+ mov 24($ctx),$r0 # load r -+ mov 32($ctx),$s1 -+ -+ ################################# base 2^26 -> base 2^64 -+ mov $d1#d,$h0#d -+ and \$`-1*(1<<31)`,$d1 -+ mov $d2,$r1 # borrow $r1 -+ mov $d2#d,$h1#d -+ and \$`-1*(1<<31)`,$d2 -+ -+ shr \$6,$d1 -+ shl \$52,$r1 -+ add $d1,$h0 -+ shr \$12,$h1 -+ shr \$18,$d2 -+ add $r1,$h0 -+ adc $d2,$h1 -+ -+ mov $h2,$d1 -+ shl \$40,$d1 -+ shr \$24,$h2 -+ add $d1,$h1 -+ adc \$0,$h2 # can be partially reduced... -+ -+ mov \$-4,$d2 # ... so reduce -+ mov $h2,$d1 -+ and $h2,$d2 -+ shr \$2,$d1 -+ and \$3,$h2 -+ add $d2,$d1 # =*5 -+ add $d1,$h0 -+ adc \$0,$h1 -+ adc \$0,$h2 -+ -+ mov $s1,$r1 -+ mov $s1,%rax -+ shr \$2,$s1 -+ add $r1,$s1 # s1 = r1 + (r1 >> 2) -+ -+ add 0($inp),$h0 # accumulate input -+ adc 8($inp),$h1 -+ lea 16($inp),$inp -+ adc $padbit,$h2 -+ -+ call __poly1305_block -+ -+ test $padbit,$padbit # if $padbit is zero, -+ jz .Lstore_base2_64_avx # store hash in base 2^64 format -+ -+ ################################# base 2^64 -> base 2^26 -+ mov $h0,%rax -+ mov $h0,%rdx -+ shr \$52,$h0 -+ mov $h1,$r0 -+ mov $h1,$r1 -+ shr \$26,%rdx -+ and \$0x3ffffff,%rax # h[0] -+ shl \$12,$r0 -+ and \$0x3ffffff,%rdx # h[1] -+ shr \$14,$h1 -+ or $r0,$h0 -+ shl \$24,$h2 -+ and \$0x3ffffff,$h0 # h[2] -+ shr \$40,$r1 -+ and \$0x3ffffff,$h1 # h[3] -+ or $r1,$h2 # h[4] -+ -+ sub \$16,%r15 -+ jz .Lstore_base2_26_avx -+ -+ vmovd %rax#d,$H0 -+ vmovd %rdx#d,$H1 -+ vmovd $h0#d,$H2 -+ vmovd $h1#d,$H3 -+ vmovd $h2#d,$H4 -+ jmp .Lproceed_avx -+ -+.align 32 -+.Lstore_base2_64_avx: -+ mov $h0,0($ctx) -+ mov $h1,8($ctx) -+ mov $h2,16($ctx) # note that is_base2_26 is zeroed -+ jmp .Ldone_avx -+ -+.align 16 -+.Lstore_base2_26_avx: -+ mov %rax#d,0($ctx) # store hash value base 2^26 -+ mov %rdx#d,4($ctx) -+ mov $h0#d,8($ctx) -+ mov $h1#d,12($ctx) -+ mov $h2#d,16($ctx) -+.align 16 -+.Ldone_avx: -+ pop %r15 -+.cfi_restore %r15 -+ pop %r14 -+.cfi_restore %r14 -+ pop %r13 -+.cfi_restore %r13 -+ pop %r12 -+.cfi_restore %r12 -+ pop %rbx -+.cfi_restore %rbx -+ pop %rbp -+.cfi_restore %rbp -+.Lno_data_avx: -+.Lblocks_avx_epilogue: -+ ret -+.cfi_endproc -+ -+.align 32 -+.Lbase2_64_avx: -+.cfi_startproc -+ push %rbp -+.cfi_push %rbp -+ mov %rsp,%rbp -+ push %rbx -+.cfi_push %rbx -+ push %r12 -+.cfi_push %r12 -+ push %r13 -+.cfi_push %r13 -+ push %r14 -+.cfi_push %r14 -+ push %r15 -+.cfi_push %r15 -+.Lbase2_64_avx_body: -+ -+ mov $len,%r15 # reassign $len -+ -+ mov 24($ctx),$r0 # load r -+ mov 32($ctx),$s1 -+ -+ mov 0($ctx),$h0 # load hash value -+ mov 8($ctx),$h1 -+ mov 16($ctx),$h2#d -+ -+ mov $s1,$r1 -+ mov $s1,%rax -+ shr \$2,$s1 -+ add $r1,$s1 # s1 = r1 + (r1 >> 2) -+ -+ test \$31,$len -+ jz .Linit_avx -+ -+ add 0($inp),$h0 # accumulate input -+ adc 8($inp),$h1 -+ lea 16($inp),$inp -+ adc $padbit,$h2 -+ sub \$16,%r15 -+ -+ call __poly1305_block -+ -+.Linit_avx: -+ ################################# base 2^64 -> base 2^26 -+ mov $h0,%rax -+ mov $h0,%rdx -+ shr \$52,$h0 -+ mov $h1,$d1 -+ mov $h1,$d2 -+ shr \$26,%rdx -+ and \$0x3ffffff,%rax # h[0] -+ shl \$12,$d1 -+ and \$0x3ffffff,%rdx # h[1] -+ shr \$14,$h1 -+ or $d1,$h0 -+ shl \$24,$h2 -+ and \$0x3ffffff,$h0 # h[2] -+ shr \$40,$d2 -+ and \$0x3ffffff,$h1 # h[3] -+ or $d2,$h2 # h[4] -+ -+ vmovd %rax#d,$H0 -+ vmovd %rdx#d,$H1 -+ vmovd $h0#d,$H2 -+ vmovd $h1#d,$H3 -+ vmovd $h2#d,$H4 -+ movl \$1,20($ctx) # set is_base2_26 -+ -+ call __poly1305_init_avx -+ -+.Lproceed_avx: -+ mov %r15,$len -+ pop %r15 -+.cfi_restore %r15 -+ pop %r14 -+.cfi_restore %r14 -+ pop %r13 -+.cfi_restore %r13 -+ pop %r12 -+.cfi_restore %r12 -+ pop %rbx -+.cfi_restore %rbx -+ pop %rbp -+.cfi_restore %rbp -+.Lbase2_64_avx_epilogue: -+ jmp .Ldo_avx -+.cfi_endproc -+ -+.align 32 -+.Leven_avx: -+.cfi_startproc -+ vmovd 4*0($ctx),$H0 # load hash value -+ vmovd 4*1($ctx),$H1 -+ vmovd 4*2($ctx),$H2 -+ vmovd 4*3($ctx),$H3 -+ vmovd 4*4($ctx),$H4 -+ -+.Ldo_avx: -+___ -+$code.=<<___ if (!$win64); -+ lea 8(%rsp),%r10 -+.cfi_def_cfa_register %r10 -+ and \$-32,%rsp -+ sub \$-8,%rsp -+ lea -0x58(%rsp),%r11 -+ sub \$0x178,%rsp -+ -+___ -+$code.=<<___ if ($win64); -+ lea -0xf8(%rsp),%r11 -+ sub \$0x218,%rsp -+ vmovdqa %xmm6,0x50(%r11) -+ vmovdqa %xmm7,0x60(%r11) -+ vmovdqa %xmm8,0x70(%r11) -+ vmovdqa %xmm9,0x80(%r11) -+ vmovdqa %xmm10,0x90(%r11) -+ vmovdqa %xmm11,0xa0(%r11) -+ vmovdqa %xmm12,0xb0(%r11) -+ vmovdqa %xmm13,0xc0(%r11) -+ vmovdqa %xmm14,0xd0(%r11) -+ vmovdqa %xmm15,0xe0(%r11) -+.Ldo_avx_body: -+___ -+$code.=<<___; -+ sub \$64,$len -+ lea -32($inp),%rax -+ cmovc %rax,$inp -+ -+ vmovdqu `16*3`($ctx),$D4 # preload r0^2 -+ lea `16*3+64`($ctx),$ctx # size optimization -+ lea .Lconst(%rip),%rcx -+ -+ ################################################################ -+ # load input -+ vmovdqu 16*2($inp),$T0 -+ vmovdqu 16*3($inp),$T1 -+ vmovdqa 64(%rcx),$MASK # .Lmask26 -+ -+ vpsrldq \$6,$T0,$T2 # splat input -+ vpsrldq \$6,$T1,$T3 -+ vpunpckhqdq $T1,$T0,$T4 # 4 -+ vpunpcklqdq $T1,$T0,$T0 # 0:1 -+ vpunpcklqdq $T3,$T2,$T3 # 2:3 -+ -+ vpsrlq \$40,$T4,$T4 # 4 -+ vpsrlq \$26,$T0,$T1 -+ vpand $MASK,$T0,$T0 # 0 -+ vpsrlq \$4,$T3,$T2 -+ vpand $MASK,$T1,$T1 # 1 -+ vpsrlq \$30,$T3,$T3 -+ vpand $MASK,$T2,$T2 # 2 -+ vpand $MASK,$T3,$T3 # 3 -+ vpor 32(%rcx),$T4,$T4 # padbit, yes, always -+ -+ jbe .Lskip_loop_avx -+ -+ # expand and copy pre-calculated table to stack -+ vmovdqu `16*1-64`($ctx),$D1 -+ vmovdqu `16*2-64`($ctx),$D2 -+ vpshufd \$0xEE,$D4,$D3 # 34xx -> 3434 -+ vpshufd \$0x44,$D4,$D0 # xx12 -> 1212 -+ vmovdqa $D3,-0x90(%r11) -+ vmovdqa $D0,0x00(%rsp) -+ vpshufd \$0xEE,$D1,$D4 -+ vmovdqu `16*3-64`($ctx),$D0 -+ vpshufd \$0x44,$D1,$D1 -+ vmovdqa $D4,-0x80(%r11) -+ vmovdqa $D1,0x10(%rsp) -+ vpshufd \$0xEE,$D2,$D3 -+ vmovdqu `16*4-64`($ctx),$D1 -+ vpshufd \$0x44,$D2,$D2 -+ vmovdqa $D3,-0x70(%r11) -+ vmovdqa $D2,0x20(%rsp) -+ vpshufd \$0xEE,$D0,$D4 -+ vmovdqu `16*5-64`($ctx),$D2 -+ vpshufd \$0x44,$D0,$D0 -+ vmovdqa $D4,-0x60(%r11) -+ vmovdqa $D0,0x30(%rsp) -+ vpshufd \$0xEE,$D1,$D3 -+ vmovdqu `16*6-64`($ctx),$D0 -+ vpshufd \$0x44,$D1,$D1 -+ vmovdqa $D3,-0x50(%r11) -+ vmovdqa $D1,0x40(%rsp) -+ vpshufd \$0xEE,$D2,$D4 -+ vmovdqu `16*7-64`($ctx),$D1 -+ vpshufd \$0x44,$D2,$D2 -+ vmovdqa $D4,-0x40(%r11) -+ vmovdqa $D2,0x50(%rsp) -+ vpshufd \$0xEE,$D0,$D3 -+ vmovdqu `16*8-64`($ctx),$D2 -+ vpshufd \$0x44,$D0,$D0 -+ vmovdqa $D3,-0x30(%r11) -+ vmovdqa $D0,0x60(%rsp) -+ vpshufd \$0xEE,$D1,$D4 -+ vpshufd \$0x44,$D1,$D1 -+ vmovdqa $D4,-0x20(%r11) -+ vmovdqa $D1,0x70(%rsp) -+ vpshufd \$0xEE,$D2,$D3 -+ vmovdqa 0x00(%rsp),$D4 # preload r0^2 -+ vpshufd \$0x44,$D2,$D2 -+ vmovdqa $D3,-0x10(%r11) -+ vmovdqa $D2,0x80(%rsp) -+ -+ jmp .Loop_avx -+ -+.align 32 -+.Loop_avx: -+ ################################################################ -+ # ((inp[0]*r^4+inp[2]*r^2+inp[4])*r^4+inp[6]*r^2 -+ # ((inp[1]*r^4+inp[3]*r^2+inp[5])*r^3+inp[7]*r -+ # \___________________/ -+ # ((inp[0]*r^4+inp[2]*r^2+inp[4])*r^4+inp[6]*r^2+inp[8])*r^2 -+ # ((inp[1]*r^4+inp[3]*r^2+inp[5])*r^4+inp[7]*r^2+inp[9])*r -+ # \___________________/ \____________________/ -+ # -+ # Note that we start with inp[2:3]*r^2. This is because it -+ # doesn't depend on reduction in previous iteration. -+ ################################################################ -+ # d4 = h4*r0 + h3*r1 + h2*r2 + h1*r3 + h0*r4 -+ # d3 = h3*r0 + h2*r1 + h1*r2 + h0*r3 + h4*5*r4 -+ # d2 = h2*r0 + h1*r1 + h0*r2 + h4*5*r3 + h3*5*r4 -+ # d1 = h1*r0 + h0*r1 + h4*5*r2 + h3*5*r3 + h2*5*r4 -+ # d0 = h0*r0 + h4*5*r1 + h3*5*r2 + h2*5*r3 + h1*5*r4 -+ # -+ # though note that $Tx and $Hx are "reversed" in this section, -+ # and $D4 is preloaded with r0^2... -+ -+ vpmuludq $T0,$D4,$D0 # d0 = h0*r0 -+ vpmuludq $T1,$D4,$D1 # d1 = h1*r0 -+ vmovdqa $H2,0x20(%r11) # offload hash -+ vpmuludq $T2,$D4,$D2 # d3 = h2*r0 -+ vmovdqa 0x10(%rsp),$H2 # r1^2 -+ vpmuludq $T3,$D4,$D3 # d3 = h3*r0 -+ vpmuludq $T4,$D4,$D4 # d4 = h4*r0 -+ -+ vmovdqa $H0,0x00(%r11) # -+ vpmuludq 0x20(%rsp),$T4,$H0 # h4*s1 -+ vmovdqa $H1,0x10(%r11) # -+ vpmuludq $T3,$H2,$H1 # h3*r1 -+ vpaddq $H0,$D0,$D0 # d0 += h4*s1 -+ vpaddq $H1,$D4,$D4 # d4 += h3*r1 -+ vmovdqa $H3,0x30(%r11) # -+ vpmuludq $T2,$H2,$H0 # h2*r1 -+ vpmuludq $T1,$H2,$H1 # h1*r1 -+ vpaddq $H0,$D3,$D3 # d3 += h2*r1 -+ vmovdqa 0x30(%rsp),$H3 # r2^2 -+ vpaddq $H1,$D2,$D2 # d2 += h1*r1 -+ vmovdqa $H4,0x40(%r11) # -+ vpmuludq $T0,$H2,$H2 # h0*r1 -+ vpmuludq $T2,$H3,$H0 # h2*r2 -+ vpaddq $H2,$D1,$D1 # d1 += h0*r1 -+ -+ vmovdqa 0x40(%rsp),$H4 # s2^2 -+ vpaddq $H0,$D4,$D4 # d4 += h2*r2 -+ vpmuludq $T1,$H3,$H1 # h1*r2 -+ vpmuludq $T0,$H3,$H3 # h0*r2 -+ vpaddq $H1,$D3,$D3 # d3 += h1*r2 -+ vmovdqa 0x50(%rsp),$H2 # r3^2 -+ vpaddq $H3,$D2,$D2 # d2 += h0*r2 -+ vpmuludq $T4,$H4,$H0 # h4*s2 -+ vpmuludq $T3,$H4,$H4 # h3*s2 -+ vpaddq $H0,$D1,$D1 # d1 += h4*s2 -+ vmovdqa 0x60(%rsp),$H3 # s3^2 -+ vpaddq $H4,$D0,$D0 # d0 += h3*s2 -+ -+ vmovdqa 0x80(%rsp),$H4 # s4^2 -+ vpmuludq $T1,$H2,$H1 # h1*r3 -+ vpmuludq $T0,$H2,$H2 # h0*r3 -+ vpaddq $H1,$D4,$D4 # d4 += h1*r3 -+ vpaddq $H2,$D3,$D3 # d3 += h0*r3 -+ vpmuludq $T4,$H3,$H0 # h4*s3 -+ vpmuludq $T3,$H3,$H1 # h3*s3 -+ vpaddq $H0,$D2,$D2 # d2 += h4*s3 -+ vmovdqu 16*0($inp),$H0 # load input -+ vpaddq $H1,$D1,$D1 # d1 += h3*s3 -+ vpmuludq $T2,$H3,$H3 # h2*s3 -+ vpmuludq $T2,$H4,$T2 # h2*s4 -+ vpaddq $H3,$D0,$D0 # d0 += h2*s3 -+ -+ vmovdqu 16*1($inp),$H1 # -+ vpaddq $T2,$D1,$D1 # d1 += h2*s4 -+ vpmuludq $T3,$H4,$T3 # h3*s4 -+ vpmuludq $T4,$H4,$T4 # h4*s4 -+ vpsrldq \$6,$H0,$H2 # splat input -+ vpaddq $T3,$D2,$D2 # d2 += h3*s4 -+ vpaddq $T4,$D3,$D3 # d3 += h4*s4 -+ vpsrldq \$6,$H1,$H3 # -+ vpmuludq 0x70(%rsp),$T0,$T4 # h0*r4 -+ vpmuludq $T1,$H4,$T0 # h1*s4 -+ vpunpckhqdq $H1,$H0,$H4 # 4 -+ vpaddq $T4,$D4,$D4 # d4 += h0*r4 -+ vmovdqa -0x90(%r11),$T4 # r0^4 -+ vpaddq $T0,$D0,$D0 # d0 += h1*s4 -+ -+ vpunpcklqdq $H1,$H0,$H0 # 0:1 -+ vpunpcklqdq $H3,$H2,$H3 # 2:3 -+ -+ #vpsrlq \$40,$H4,$H4 # 4 -+ vpsrldq \$`40/8`,$H4,$H4 # 4 -+ vpsrlq \$26,$H0,$H1 -+ vpand $MASK,$H0,$H0 # 0 -+ vpsrlq \$4,$H3,$H2 -+ vpand $MASK,$H1,$H1 # 1 -+ vpand 0(%rcx),$H4,$H4 # .Lmask24 -+ vpsrlq \$30,$H3,$H3 -+ vpand $MASK,$H2,$H2 # 2 -+ vpand $MASK,$H3,$H3 # 3 -+ vpor 32(%rcx),$H4,$H4 # padbit, yes, always -+ -+ vpaddq 0x00(%r11),$H0,$H0 # add hash value -+ vpaddq 0x10(%r11),$H1,$H1 -+ vpaddq 0x20(%r11),$H2,$H2 -+ vpaddq 0x30(%r11),$H3,$H3 -+ vpaddq 0x40(%r11),$H4,$H4 -+ -+ lea 16*2($inp),%rax -+ lea 16*4($inp),$inp -+ sub \$64,$len -+ cmovc %rax,$inp -+ -+ ################################################################ -+ # Now we accumulate (inp[0:1]+hash)*r^4 -+ ################################################################ -+ # d4 = h4*r0 + h3*r1 + h2*r2 + h1*r3 + h0*r4 -+ # d3 = h3*r0 + h2*r1 + h1*r2 + h0*r3 + h4*5*r4 -+ # d2 = h2*r0 + h1*r1 + h0*r2 + h4*5*r3 + h3*5*r4 -+ # d1 = h1*r0 + h0*r1 + h4*5*r2 + h3*5*r3 + h2*5*r4 -+ # d0 = h0*r0 + h4*5*r1 + h3*5*r2 + h2*5*r3 + h1*5*r4 -+ -+ vpmuludq $H0,$T4,$T0 # h0*r0 -+ vpmuludq $H1,$T4,$T1 # h1*r0 -+ vpaddq $T0,$D0,$D0 -+ vpaddq $T1,$D1,$D1 -+ vmovdqa -0x80(%r11),$T2 # r1^4 -+ vpmuludq $H2,$T4,$T0 # h2*r0 -+ vpmuludq $H3,$T4,$T1 # h3*r0 -+ vpaddq $T0,$D2,$D2 -+ vpaddq $T1,$D3,$D3 -+ vpmuludq $H4,$T4,$T4 # h4*r0 -+ vpmuludq -0x70(%r11),$H4,$T0 # h4*s1 -+ vpaddq $T4,$D4,$D4 -+ -+ vpaddq $T0,$D0,$D0 # d0 += h4*s1 -+ vpmuludq $H2,$T2,$T1 # h2*r1 -+ vpmuludq $H3,$T2,$T0 # h3*r1 -+ vpaddq $T1,$D3,$D3 # d3 += h2*r1 -+ vmovdqa -0x60(%r11),$T3 # r2^4 -+ vpaddq $T0,$D4,$D4 # d4 += h3*r1 -+ vpmuludq $H1,$T2,$T1 # h1*r1 -+ vpmuludq $H0,$T2,$T2 # h0*r1 -+ vpaddq $T1,$D2,$D2 # d2 += h1*r1 -+ vpaddq $T2,$D1,$D1 # d1 += h0*r1 -+ -+ vmovdqa -0x50(%r11),$T4 # s2^4 -+ vpmuludq $H2,$T3,$T0 # h2*r2 -+ vpmuludq $H1,$T3,$T1 # h1*r2 -+ vpaddq $T0,$D4,$D4 # d4 += h2*r2 -+ vpaddq $T1,$D3,$D3 # d3 += h1*r2 -+ vmovdqa -0x40(%r11),$T2 # r3^4 -+ vpmuludq $H0,$T3,$T3 # h0*r2 -+ vpmuludq $H4,$T4,$T0 # h4*s2 -+ vpaddq $T3,$D2,$D2 # d2 += h0*r2 -+ vpaddq $T0,$D1,$D1 # d1 += h4*s2 -+ vmovdqa -0x30(%r11),$T3 # s3^4 -+ vpmuludq $H3,$T4,$T4 # h3*s2 -+ vpmuludq $H1,$T2,$T1 # h1*r3 -+ vpaddq $T4,$D0,$D0 # d0 += h3*s2 -+ -+ vmovdqa -0x10(%r11),$T4 # s4^4 -+ vpaddq $T1,$D4,$D4 # d4 += h1*r3 -+ vpmuludq $H0,$T2,$T2 # h0*r3 -+ vpmuludq $H4,$T3,$T0 # h4*s3 -+ vpaddq $T2,$D3,$D3 # d3 += h0*r3 -+ vpaddq $T0,$D2,$D2 # d2 += h4*s3 -+ vmovdqu 16*2($inp),$T0 # load input -+ vpmuludq $H3,$T3,$T2 # h3*s3 -+ vpmuludq $H2,$T3,$T3 # h2*s3 -+ vpaddq $T2,$D1,$D1 # d1 += h3*s3 -+ vmovdqu 16*3($inp),$T1 # -+ vpaddq $T3,$D0,$D0 # d0 += h2*s3 -+ -+ vpmuludq $H2,$T4,$H2 # h2*s4 -+ vpmuludq $H3,$T4,$H3 # h3*s4 -+ vpsrldq \$6,$T0,$T2 # splat input -+ vpaddq $H2,$D1,$D1 # d1 += h2*s4 -+ vpmuludq $H4,$T4,$H4 # h4*s4 -+ vpsrldq \$6,$T1,$T3 # -+ vpaddq $H3,$D2,$H2 # h2 = d2 + h3*s4 -+ vpaddq $H4,$D3,$H3 # h3 = d3 + h4*s4 -+ vpmuludq -0x20(%r11),$H0,$H4 # h0*r4 -+ vpmuludq $H1,$T4,$H0 -+ vpunpckhqdq $T1,$T0,$T4 # 4 -+ vpaddq $H4,$D4,$H4 # h4 = d4 + h0*r4 -+ vpaddq $H0,$D0,$H0 # h0 = d0 + h1*s4 -+ -+ vpunpcklqdq $T1,$T0,$T0 # 0:1 -+ vpunpcklqdq $T3,$T2,$T3 # 2:3 -+ -+ #vpsrlq \$40,$T4,$T4 # 4 -+ vpsrldq \$`40/8`,$T4,$T4 # 4 -+ vpsrlq \$26,$T0,$T1 -+ vmovdqa 0x00(%rsp),$D4 # preload r0^2 -+ vpand $MASK,$T0,$T0 # 0 -+ vpsrlq \$4,$T3,$T2 -+ vpand $MASK,$T1,$T1 # 1 -+ vpand 0(%rcx),$T4,$T4 # .Lmask24 -+ vpsrlq \$30,$T3,$T3 -+ vpand $MASK,$T2,$T2 # 2 -+ vpand $MASK,$T3,$T3 # 3 -+ vpor 32(%rcx),$T4,$T4 # padbit, yes, always -+ -+ ################################################################ -+ # lazy reduction as discussed in "NEON crypto" by D.J. Bernstein -+ # and P. Schwabe -+ -+ vpsrlq \$26,$H3,$D3 -+ vpand $MASK,$H3,$H3 -+ vpaddq $D3,$H4,$H4 # h3 -> h4 -+ -+ vpsrlq \$26,$H0,$D0 -+ vpand $MASK,$H0,$H0 -+ vpaddq $D0,$D1,$H1 # h0 -> h1 -+ -+ vpsrlq \$26,$H4,$D0 -+ vpand $MASK,$H4,$H4 -+ -+ vpsrlq \$26,$H1,$D1 -+ vpand $MASK,$H1,$H1 -+ vpaddq $D1,$H2,$H2 # h1 -> h2 -+ -+ vpaddq $D0,$H0,$H0 -+ vpsllq \$2,$D0,$D0 -+ vpaddq $D0,$H0,$H0 # h4 -> h0 -+ -+ vpsrlq \$26,$H2,$D2 -+ vpand $MASK,$H2,$H2 -+ vpaddq $D2,$H3,$H3 # h2 -> h3 -+ -+ vpsrlq \$26,$H0,$D0 -+ vpand $MASK,$H0,$H0 -+ vpaddq $D0,$H1,$H1 # h0 -> h1 -+ -+ vpsrlq \$26,$H3,$D3 -+ vpand $MASK,$H3,$H3 -+ vpaddq $D3,$H4,$H4 # h3 -> h4 -+ -+ ja .Loop_avx -+ -+.Lskip_loop_avx: -+ ################################################################ -+ # multiply (inp[0:1]+hash) or inp[2:3] by r^2:r^1 -+ -+ vpshufd \$0x10,$D4,$D4 # r0^n, xx12 -> x1x2 -+ add \$32,$len -+ jnz .Long_tail_avx -+ -+ vpaddq $H2,$T2,$T2 -+ vpaddq $H0,$T0,$T0 -+ vpaddq $H1,$T1,$T1 -+ vpaddq $H3,$T3,$T3 -+ vpaddq $H4,$T4,$T4 -+ -+.Long_tail_avx: -+ vmovdqa $H2,0x20(%r11) -+ vmovdqa $H0,0x00(%r11) -+ vmovdqa $H1,0x10(%r11) -+ vmovdqa $H3,0x30(%r11) -+ vmovdqa $H4,0x40(%r11) -+ -+ # d4 = h4*r0 + h3*r1 + h2*r2 + h1*r3 + h0*r4 -+ # d3 = h3*r0 + h2*r1 + h1*r2 + h0*r3 + h4*5*r4 -+ # d2 = h2*r0 + h1*r1 + h0*r2 + h4*5*r3 + h3*5*r4 -+ # d1 = h1*r0 + h0*r1 + h4*5*r2 + h3*5*r3 + h2*5*r4 -+ # d0 = h0*r0 + h4*5*r1 + h3*5*r2 + h2*5*r3 + h1*5*r4 -+ -+ vpmuludq $T2,$D4,$D2 # d2 = h2*r0 -+ vpmuludq $T0,$D4,$D0 # d0 = h0*r0 -+ vpshufd \$0x10,`16*1-64`($ctx),$H2 # r1^n -+ vpmuludq $T1,$D4,$D1 # d1 = h1*r0 -+ vpmuludq $T3,$D4,$D3 # d3 = h3*r0 -+ vpmuludq $T4,$D4,$D4 # d4 = h4*r0 -+ -+ vpmuludq $T3,$H2,$H0 # h3*r1 -+ vpaddq $H0,$D4,$D4 # d4 += h3*r1 -+ vpshufd \$0x10,`16*2-64`($ctx),$H3 # s1^n -+ vpmuludq $T2,$H2,$H1 # h2*r1 -+ vpaddq $H1,$D3,$D3 # d3 += h2*r1 -+ vpshufd \$0x10,`16*3-64`($ctx),$H4 # r2^n -+ vpmuludq $T1,$H2,$H0 # h1*r1 -+ vpaddq $H0,$D2,$D2 # d2 += h1*r1 -+ vpmuludq $T0,$H2,$H2 # h0*r1 -+ vpaddq $H2,$D1,$D1 # d1 += h0*r1 -+ vpmuludq $T4,$H3,$H3 # h4*s1 -+ vpaddq $H3,$D0,$D0 # d0 += h4*s1 -+ -+ vpshufd \$0x10,`16*4-64`($ctx),$H2 # s2^n -+ vpmuludq $T2,$H4,$H1 # h2*r2 -+ vpaddq $H1,$D4,$D4 # d4 += h2*r2 -+ vpmuludq $T1,$H4,$H0 # h1*r2 -+ vpaddq $H0,$D3,$D3 # d3 += h1*r2 -+ vpshufd \$0x10,`16*5-64`($ctx),$H3 # r3^n -+ vpmuludq $T0,$H4,$H4 # h0*r2 -+ vpaddq $H4,$D2,$D2 # d2 += h0*r2 -+ vpmuludq $T4,$H2,$H1 # h4*s2 -+ vpaddq $H1,$D1,$D1 # d1 += h4*s2 -+ vpshufd \$0x10,`16*6-64`($ctx),$H4 # s3^n -+ vpmuludq $T3,$H2,$H2 # h3*s2 -+ vpaddq $H2,$D0,$D0 # d0 += h3*s2 -+ -+ vpmuludq $T1,$H3,$H0 # h1*r3 -+ vpaddq $H0,$D4,$D4 # d4 += h1*r3 -+ vpmuludq $T0,$H3,$H3 # h0*r3 -+ vpaddq $H3,$D3,$D3 # d3 += h0*r3 -+ vpshufd \$0x10,`16*7-64`($ctx),$H2 # r4^n -+ vpmuludq $T4,$H4,$H1 # h4*s3 -+ vpaddq $H1,$D2,$D2 # d2 += h4*s3 -+ vpshufd \$0x10,`16*8-64`($ctx),$H3 # s4^n -+ vpmuludq $T3,$H4,$H0 # h3*s3 -+ vpaddq $H0,$D1,$D1 # d1 += h3*s3 -+ vpmuludq $T2,$H4,$H4 # h2*s3 -+ vpaddq $H4,$D0,$D0 # d0 += h2*s3 -+ -+ vpmuludq $T0,$H2,$H2 # h0*r4 -+ vpaddq $H2,$D4,$D4 # h4 = d4 + h0*r4 -+ vpmuludq $T4,$H3,$H1 # h4*s4 -+ vpaddq $H1,$D3,$D3 # h3 = d3 + h4*s4 -+ vpmuludq $T3,$H3,$H0 # h3*s4 -+ vpaddq $H0,$D2,$D2 # h2 = d2 + h3*s4 -+ vpmuludq $T2,$H3,$H1 # h2*s4 -+ vpaddq $H1,$D1,$D1 # h1 = d1 + h2*s4 -+ vpmuludq $T1,$H3,$H3 # h1*s4 -+ vpaddq $H3,$D0,$D0 # h0 = d0 + h1*s4 -+ -+ jz .Lshort_tail_avx -+ -+ vmovdqu 16*0($inp),$H0 # load input -+ vmovdqu 16*1($inp),$H1 -+ -+ vpsrldq \$6,$H0,$H2 # splat input -+ vpsrldq \$6,$H1,$H3 -+ vpunpckhqdq $H1,$H0,$H4 # 4 -+ vpunpcklqdq $H1,$H0,$H0 # 0:1 -+ vpunpcklqdq $H3,$H2,$H3 # 2:3 -+ -+ vpsrlq \$40,$H4,$H4 # 4 -+ vpsrlq \$26,$H0,$H1 -+ vpand $MASK,$H0,$H0 # 0 -+ vpsrlq \$4,$H3,$H2 -+ vpand $MASK,$H1,$H1 # 1 -+ vpsrlq \$30,$H3,$H3 -+ vpand $MASK,$H2,$H2 # 2 -+ vpand $MASK,$H3,$H3 # 3 -+ vpor 32(%rcx),$H4,$H4 # padbit, yes, always -+ -+ vpshufd \$0x32,`16*0-64`($ctx),$T4 # r0^n, 34xx -> x3x4 -+ vpaddq 0x00(%r11),$H0,$H0 -+ vpaddq 0x10(%r11),$H1,$H1 -+ vpaddq 0x20(%r11),$H2,$H2 -+ vpaddq 0x30(%r11),$H3,$H3 -+ vpaddq 0x40(%r11),$H4,$H4 -+ -+ ################################################################ -+ # multiply (inp[0:1]+hash) by r^4:r^3 and accumulate -+ -+ vpmuludq $H0,$T4,$T0 # h0*r0 -+ vpaddq $T0,$D0,$D0 # d0 += h0*r0 -+ vpmuludq $H1,$T4,$T1 # h1*r0 -+ vpaddq $T1,$D1,$D1 # d1 += h1*r0 -+ vpmuludq $H2,$T4,$T0 # h2*r0 -+ vpaddq $T0,$D2,$D2 # d2 += h2*r0 -+ vpshufd \$0x32,`16*1-64`($ctx),$T2 # r1^n -+ vpmuludq $H3,$T4,$T1 # h3*r0 -+ vpaddq $T1,$D3,$D3 # d3 += h3*r0 -+ vpmuludq $H4,$T4,$T4 # h4*r0 -+ vpaddq $T4,$D4,$D4 # d4 += h4*r0 -+ -+ vpmuludq $H3,$T2,$T0 # h3*r1 -+ vpaddq $T0,$D4,$D4 # d4 += h3*r1 -+ vpshufd \$0x32,`16*2-64`($ctx),$T3 # s1 -+ vpmuludq $H2,$T2,$T1 # h2*r1 -+ vpaddq $T1,$D3,$D3 # d3 += h2*r1 -+ vpshufd \$0x32,`16*3-64`($ctx),$T4 # r2 -+ vpmuludq $H1,$T2,$T0 # h1*r1 -+ vpaddq $T0,$D2,$D2 # d2 += h1*r1 -+ vpmuludq $H0,$T2,$T2 # h0*r1 -+ vpaddq $T2,$D1,$D1 # d1 += h0*r1 -+ vpmuludq $H4,$T3,$T3 # h4*s1 -+ vpaddq $T3,$D0,$D0 # d0 += h4*s1 -+ -+ vpshufd \$0x32,`16*4-64`($ctx),$T2 # s2 -+ vpmuludq $H2,$T4,$T1 # h2*r2 -+ vpaddq $T1,$D4,$D4 # d4 += h2*r2 -+ vpmuludq $H1,$T4,$T0 # h1*r2 -+ vpaddq $T0,$D3,$D3 # d3 += h1*r2 -+ vpshufd \$0x32,`16*5-64`($ctx),$T3 # r3 -+ vpmuludq $H0,$T4,$T4 # h0*r2 -+ vpaddq $T4,$D2,$D2 # d2 += h0*r2 -+ vpmuludq $H4,$T2,$T1 # h4*s2 -+ vpaddq $T1,$D1,$D1 # d1 += h4*s2 -+ vpshufd \$0x32,`16*6-64`($ctx),$T4 # s3 -+ vpmuludq $H3,$T2,$T2 # h3*s2 -+ vpaddq $T2,$D0,$D0 # d0 += h3*s2 -+ -+ vpmuludq $H1,$T3,$T0 # h1*r3 -+ vpaddq $T0,$D4,$D4 # d4 += h1*r3 -+ vpmuludq $H0,$T3,$T3 # h0*r3 -+ vpaddq $T3,$D3,$D3 # d3 += h0*r3 -+ vpshufd \$0x32,`16*7-64`($ctx),$T2 # r4 -+ vpmuludq $H4,$T4,$T1 # h4*s3 -+ vpaddq $T1,$D2,$D2 # d2 += h4*s3 -+ vpshufd \$0x32,`16*8-64`($ctx),$T3 # s4 -+ vpmuludq $H3,$T4,$T0 # h3*s3 -+ vpaddq $T0,$D1,$D1 # d1 += h3*s3 -+ vpmuludq $H2,$T4,$T4 # h2*s3 -+ vpaddq $T4,$D0,$D0 # d0 += h2*s3 -+ -+ vpmuludq $H0,$T2,$T2 # h0*r4 -+ vpaddq $T2,$D4,$D4 # d4 += h0*r4 -+ vpmuludq $H4,$T3,$T1 # h4*s4 -+ vpaddq $T1,$D3,$D3 # d3 += h4*s4 -+ vpmuludq $H3,$T3,$T0 # h3*s4 -+ vpaddq $T0,$D2,$D2 # d2 += h3*s4 -+ vpmuludq $H2,$T3,$T1 # h2*s4 -+ vpaddq $T1,$D1,$D1 # d1 += h2*s4 -+ vpmuludq $H1,$T3,$T3 # h1*s4 -+ vpaddq $T3,$D0,$D0 # d0 += h1*s4 -+ -+.Lshort_tail_avx: -+ ################################################################ -+ # horizontal addition -+ -+ vpsrldq \$8,$D4,$T4 -+ vpsrldq \$8,$D3,$T3 -+ vpsrldq \$8,$D1,$T1 -+ vpsrldq \$8,$D0,$T0 -+ vpsrldq \$8,$D2,$T2 -+ vpaddq $T3,$D3,$D3 -+ vpaddq $T4,$D4,$D4 -+ vpaddq $T0,$D0,$D0 -+ vpaddq $T1,$D1,$D1 -+ vpaddq $T2,$D2,$D2 -+ -+ ################################################################ -+ # lazy reduction -+ -+ vpsrlq \$26,$D3,$H3 -+ vpand $MASK,$D3,$D3 -+ vpaddq $H3,$D4,$D4 # h3 -> h4 -+ -+ vpsrlq \$26,$D0,$H0 -+ vpand $MASK,$D0,$D0 -+ vpaddq $H0,$D1,$D1 # h0 -> h1 -+ -+ vpsrlq \$26,$D4,$H4 -+ vpand $MASK,$D4,$D4 -+ -+ vpsrlq \$26,$D1,$H1 -+ vpand $MASK,$D1,$D1 -+ vpaddq $H1,$D2,$D2 # h1 -> h2 -+ -+ vpaddq $H4,$D0,$D0 -+ vpsllq \$2,$H4,$H4 -+ vpaddq $H4,$D0,$D0 # h4 -> h0 -+ -+ vpsrlq \$26,$D2,$H2 -+ vpand $MASK,$D2,$D2 -+ vpaddq $H2,$D3,$D3 # h2 -> h3 -+ -+ vpsrlq \$26,$D0,$H0 -+ vpand $MASK,$D0,$D0 -+ vpaddq $H0,$D1,$D1 # h0 -> h1 -+ -+ vpsrlq \$26,$D3,$H3 -+ vpand $MASK,$D3,$D3 -+ vpaddq $H3,$D4,$D4 # h3 -> h4 -+ -+ vmovd $D0,`4*0-48-64`($ctx) # save partially reduced -+ vmovd $D1,`4*1-48-64`($ctx) -+ vmovd $D2,`4*2-48-64`($ctx) -+ vmovd $D3,`4*3-48-64`($ctx) -+ vmovd $D4,`4*4-48-64`($ctx) -+___ -+$code.=<<___ if ($win64); -+ vmovdqa 0x50(%r11),%xmm6 -+ vmovdqa 0x60(%r11),%xmm7 -+ vmovdqa 0x70(%r11),%xmm8 -+ vmovdqa 0x80(%r11),%xmm9 -+ vmovdqa 0x90(%r11),%xmm10 -+ vmovdqa 0xa0(%r11),%xmm11 -+ vmovdqa 0xb0(%r11),%xmm12 -+ vmovdqa 0xc0(%r11),%xmm13 -+ vmovdqa 0xd0(%r11),%xmm14 -+ vmovdqa 0xe0(%r11),%xmm15 -+ lea 0xf8(%r11),%rsp -+.Ldo_avx_epilogue: -+___ -+$code.=<<___ if (!$win64); -+ lea -8(%r10),%rsp -+.cfi_def_cfa_register %rsp -+___ -+$code.=<<___; -+ vzeroupper -+ ret -+.cfi_endproc -+___ -+&end_function("poly1305_blocks_avx"); -+ -+&declare_function("poly1305_emit_avx", 32, 3); -+$code.=<<___; -+ cmpl \$0,20($ctx) # is_base2_26? -+ je .Lemit -+ -+ mov 0($ctx),%eax # load hash value base 2^26 -+ mov 4($ctx),%ecx -+ mov 8($ctx),%r8d -+ mov 12($ctx),%r11d -+ mov 16($ctx),%r10d -+ -+ shl \$26,%rcx # base 2^26 -> base 2^64 -+ mov %r8,%r9 -+ shl \$52,%r8 -+ add %rcx,%rax -+ shr \$12,%r9 -+ add %rax,%r8 # h0 -+ adc \$0,%r9 -+ -+ shl \$14,%r11 -+ mov %r10,%rax -+ shr \$24,%r10 -+ add %r11,%r9 -+ shl \$40,%rax -+ add %rax,%r9 # h1 -+ adc \$0,%r10 # h2 -+ -+ mov %r10,%rax # could be partially reduced, so reduce -+ mov %r10,%rcx -+ and \$3,%r10 -+ shr \$2,%rax -+ and \$-4,%rcx -+ add %rcx,%rax -+ add %rax,%r8 -+ adc \$0,%r9 -+ adc \$0,%r10 -+ -+ mov %r8,%rax -+ add \$5,%r8 # compare to modulus -+ mov %r9,%rcx -+ adc \$0,%r9 -+ adc \$0,%r10 -+ shr \$2,%r10 # did 130-bit value overflow? -+ cmovnz %r8,%rax -+ cmovnz %r9,%rcx -+ -+ add 0($nonce),%rax # accumulate nonce -+ adc 8($nonce),%rcx -+ mov %rax,0($mac) # write result -+ mov %rcx,8($mac) -+ -+ ret -+___ -+&end_function("poly1305_emit_avx"); -+ -+if ($kernel) { -+ $code .= "#endif\n"; -+} -+ -+if ($avx>1) { -+ -+if ($kernel) { -+ $code .= "#ifdef CONFIG_AS_AVX2\n"; -+} -+ -+my ($H0,$H1,$H2,$H3,$H4, $MASK, $T4,$T0,$T1,$T2,$T3, $D0,$D1,$D2,$D3,$D4) = -+ map("%ymm$_",(0..15)); -+my $S4=$MASK; -+ -+sub poly1305_blocks_avxN { -+ my ($avx512) = @_; -+ my $suffix = $avx512 ? "_avx512" : ""; -+$code.=<<___; -+.cfi_startproc -+ mov 20($ctx),%r8d # is_base2_26 -+ cmp \$128,$len -+ jae .Lblocks_avx2$suffix -+ test %r8d,%r8d -+ jz .Lblocks -+ -+.Lblocks_avx2$suffix: -+ and \$-16,$len -+ jz .Lno_data_avx2$suffix -+ -+ vzeroupper -+ -+ test %r8d,%r8d -+ jz .Lbase2_64_avx2$suffix -+ -+ test \$63,$len -+ jz .Leven_avx2$suffix -+ -+ push %rbp -+.cfi_push %rbp -+ mov %rsp,%rbp -+ push %rbx -+.cfi_push %rbx -+ push %r12 -+.cfi_push %r12 -+ push %r13 -+.cfi_push %r13 -+ push %r14 -+.cfi_push %r14 -+ push %r15 -+.cfi_push %r15 -+.Lblocks_avx2_body$suffix: -+ -+ mov $len,%r15 # reassign $len -+ -+ mov 0($ctx),$d1 # load hash value -+ mov 8($ctx),$d2 -+ mov 16($ctx),$h2#d -+ -+ mov 24($ctx),$r0 # load r -+ mov 32($ctx),$s1 -+ -+ ################################# base 2^26 -> base 2^64 -+ mov $d1#d,$h0#d -+ and \$`-1*(1<<31)`,$d1 -+ mov $d2,$r1 # borrow $r1 -+ mov $d2#d,$h1#d -+ and \$`-1*(1<<31)`,$d2 -+ -+ shr \$6,$d1 -+ shl \$52,$r1 -+ add $d1,$h0 -+ shr \$12,$h1 -+ shr \$18,$d2 -+ add $r1,$h0 -+ adc $d2,$h1 -+ -+ mov $h2,$d1 -+ shl \$40,$d1 -+ shr \$24,$h2 -+ add $d1,$h1 -+ adc \$0,$h2 # can be partially reduced... -+ -+ mov \$-4,$d2 # ... so reduce -+ mov $h2,$d1 -+ and $h2,$d2 -+ shr \$2,$d1 -+ and \$3,$h2 -+ add $d2,$d1 # =*5 -+ add $d1,$h0 -+ adc \$0,$h1 -+ adc \$0,$h2 -+ -+ mov $s1,$r1 -+ mov $s1,%rax -+ shr \$2,$s1 -+ add $r1,$s1 # s1 = r1 + (r1 >> 2) -+ -+.Lbase2_26_pre_avx2$suffix: -+ add 0($inp),$h0 # accumulate input -+ adc 8($inp),$h1 -+ lea 16($inp),$inp -+ adc $padbit,$h2 -+ sub \$16,%r15 -+ -+ call __poly1305_block -+ mov $r1,%rax -+ -+ test \$63,%r15 -+ jnz .Lbase2_26_pre_avx2$suffix -+ -+ test $padbit,$padbit # if $padbit is zero, -+ jz .Lstore_base2_64_avx2$suffix # store hash in base 2^64 format -+ -+ ################################# base 2^64 -> base 2^26 -+ mov $h0,%rax -+ mov $h0,%rdx -+ shr \$52,$h0 -+ mov $h1,$r0 -+ mov $h1,$r1 -+ shr \$26,%rdx -+ and \$0x3ffffff,%rax # h[0] -+ shl \$12,$r0 -+ and \$0x3ffffff,%rdx # h[1] -+ shr \$14,$h1 -+ or $r0,$h0 -+ shl \$24,$h2 -+ and \$0x3ffffff,$h0 # h[2] -+ shr \$40,$r1 -+ and \$0x3ffffff,$h1 # h[3] -+ or $r1,$h2 # h[4] -+ -+ test %r15,%r15 -+ jz .Lstore_base2_26_avx2$suffix -+ -+ vmovd %rax#d,%x#$H0 -+ vmovd %rdx#d,%x#$H1 -+ vmovd $h0#d,%x#$H2 -+ vmovd $h1#d,%x#$H3 -+ vmovd $h2#d,%x#$H4 -+ jmp .Lproceed_avx2$suffix -+ -+.align 32 -+.Lstore_base2_64_avx2$suffix: -+ mov $h0,0($ctx) -+ mov $h1,8($ctx) -+ mov $h2,16($ctx) # note that is_base2_26 is zeroed -+ jmp .Ldone_avx2$suffix -+ -+.align 16 -+.Lstore_base2_26_avx2$suffix: -+ mov %rax#d,0($ctx) # store hash value base 2^26 -+ mov %rdx#d,4($ctx) -+ mov $h0#d,8($ctx) -+ mov $h1#d,12($ctx) -+ mov $h2#d,16($ctx) -+.align 16 -+.Ldone_avx2$suffix: -+ pop %r15 -+.cfi_restore %r15 -+ pop %r14 -+.cfi_restore %r14 -+ pop %r13 -+.cfi_restore %r13 -+ pop %r12 -+.cfi_restore %r12 -+ pop %rbx -+.cfi_restore %rbx -+ pop %rbp -+.cfi_restore %rbp -+.Lno_data_avx2$suffix: -+.Lblocks_avx2_epilogue$suffix: -+ ret -+.cfi_endproc -+ -+.align 32 -+.Lbase2_64_avx2$suffix: -+.cfi_startproc -+ push %rbp -+.cfi_push %rbp -+ mov %rsp,%rbp -+ push %rbx -+.cfi_push %rbx -+ push %r12 -+.cfi_push %r12 -+ push %r13 -+.cfi_push %r13 -+ push %r14 -+.cfi_push %r14 -+ push %r15 -+.cfi_push %r15 -+.Lbase2_64_avx2_body$suffix: -+ -+ mov $len,%r15 # reassign $len -+ -+ mov 24($ctx),$r0 # load r -+ mov 32($ctx),$s1 -+ -+ mov 0($ctx),$h0 # load hash value -+ mov 8($ctx),$h1 -+ mov 16($ctx),$h2#d -+ -+ mov $s1,$r1 -+ mov $s1,%rax -+ shr \$2,$s1 -+ add $r1,$s1 # s1 = r1 + (r1 >> 2) -+ -+ test \$63,$len -+ jz .Linit_avx2$suffix -+ -+.Lbase2_64_pre_avx2$suffix: -+ add 0($inp),$h0 # accumulate input -+ adc 8($inp),$h1 -+ lea 16($inp),$inp -+ adc $padbit,$h2 -+ sub \$16,%r15 -+ -+ call __poly1305_block -+ mov $r1,%rax -+ -+ test \$63,%r15 -+ jnz .Lbase2_64_pre_avx2$suffix -+ -+.Linit_avx2$suffix: -+ ################################# base 2^64 -> base 2^26 -+ mov $h0,%rax -+ mov $h0,%rdx -+ shr \$52,$h0 -+ mov $h1,$d1 -+ mov $h1,$d2 -+ shr \$26,%rdx -+ and \$0x3ffffff,%rax # h[0] -+ shl \$12,$d1 -+ and \$0x3ffffff,%rdx # h[1] -+ shr \$14,$h1 -+ or $d1,$h0 -+ shl \$24,$h2 -+ and \$0x3ffffff,$h0 # h[2] -+ shr \$40,$d2 -+ and \$0x3ffffff,$h1 # h[3] -+ or $d2,$h2 # h[4] -+ -+ vmovd %rax#d,%x#$H0 -+ vmovd %rdx#d,%x#$H1 -+ vmovd $h0#d,%x#$H2 -+ vmovd $h1#d,%x#$H3 -+ vmovd $h2#d,%x#$H4 -+ movl \$1,20($ctx) # set is_base2_26 -+ -+ call __poly1305_init_avx -+ -+.Lproceed_avx2$suffix: -+ mov %r15,$len # restore $len -+___ -+$code.=<<___ if (!$kernel); -+ mov OPENSSL_ia32cap_P+8(%rip),%r9d -+ mov \$`(1<<31|1<<30|1<<16)`,%r11d -+___ -+$code.=<<___; -+ pop %r15 -+.cfi_restore %r15 -+ pop %r14 -+.cfi_restore %r14 -+ pop %r13 -+.cfi_restore %r13 -+ pop %r12 -+.cfi_restore %r12 -+ pop %rbx -+.cfi_restore %rbx -+ pop %rbp -+.cfi_restore %rbp -+.Lbase2_64_avx2_epilogue$suffix: -+ jmp .Ldo_avx2$suffix -+.cfi_endproc -+ -+.align 32 -+.Leven_avx2$suffix: -+.cfi_startproc -+___ -+$code.=<<___ if (!$kernel); -+ mov OPENSSL_ia32cap_P+8(%rip),%r9d -+___ -+$code.=<<___; -+ vmovd 4*0($ctx),%x#$H0 # load hash value base 2^26 -+ vmovd 4*1($ctx),%x#$H1 -+ vmovd 4*2($ctx),%x#$H2 -+ vmovd 4*3($ctx),%x#$H3 -+ vmovd 4*4($ctx),%x#$H4 -+ -+.Ldo_avx2$suffix: -+___ -+$code.=<<___ if (!$kernel && $avx>2); -+ cmp \$512,$len -+ jb .Lskip_avx512 -+ and %r11d,%r9d -+ test \$`1<<16`,%r9d # check for AVX512F -+ jnz .Lblocks_avx512 -+.Lskip_avx512$suffix: -+___ -+$code.=<<___ if ($avx > 2 && $avx512 && $kernel); -+ cmp \$512,$len -+ jae .Lblocks_avx512 -+___ -+$code.=<<___ if (!$win64); -+ lea 8(%rsp),%r10 -+.cfi_def_cfa_register %r10 -+ sub \$0x128,%rsp -+___ -+$code.=<<___ if ($win64); -+ lea 8(%rsp),%r10 -+ sub \$0x1c8,%rsp -+ vmovdqa %xmm6,-0xb0(%r10) -+ vmovdqa %xmm7,-0xa0(%r10) -+ vmovdqa %xmm8,-0x90(%r10) -+ vmovdqa %xmm9,-0x80(%r10) -+ vmovdqa %xmm10,-0x70(%r10) -+ vmovdqa %xmm11,-0x60(%r10) -+ vmovdqa %xmm12,-0x50(%r10) -+ vmovdqa %xmm13,-0x40(%r10) -+ vmovdqa %xmm14,-0x30(%r10) -+ vmovdqa %xmm15,-0x20(%r10) -+.Ldo_avx2_body$suffix: -+___ -+$code.=<<___; -+ lea .Lconst(%rip),%rcx -+ lea 48+64($ctx),$ctx # size optimization -+ vmovdqa 96(%rcx),$T0 # .Lpermd_avx2 -+ -+ # expand and copy pre-calculated table to stack -+ vmovdqu `16*0-64`($ctx),%x#$T2 -+ and \$-512,%rsp -+ vmovdqu `16*1-64`($ctx),%x#$T3 -+ vmovdqu `16*2-64`($ctx),%x#$T4 -+ vmovdqu `16*3-64`($ctx),%x#$D0 -+ vmovdqu `16*4-64`($ctx),%x#$D1 -+ vmovdqu `16*5-64`($ctx),%x#$D2 -+ lea 0x90(%rsp),%rax # size optimization -+ vmovdqu `16*6-64`($ctx),%x#$D3 -+ vpermd $T2,$T0,$T2 # 00003412 -> 14243444 -+ vmovdqu `16*7-64`($ctx),%x#$D4 -+ vpermd $T3,$T0,$T3 -+ vmovdqu `16*8-64`($ctx),%x#$MASK -+ vpermd $T4,$T0,$T4 -+ vmovdqa $T2,0x00(%rsp) -+ vpermd $D0,$T0,$D0 -+ vmovdqa $T3,0x20-0x90(%rax) -+ vpermd $D1,$T0,$D1 -+ vmovdqa $T4,0x40-0x90(%rax) -+ vpermd $D2,$T0,$D2 -+ vmovdqa $D0,0x60-0x90(%rax) -+ vpermd $D3,$T0,$D3 -+ vmovdqa $D1,0x80-0x90(%rax) -+ vpermd $D4,$T0,$D4 -+ vmovdqa $D2,0xa0-0x90(%rax) -+ vpermd $MASK,$T0,$MASK -+ vmovdqa $D3,0xc0-0x90(%rax) -+ vmovdqa $D4,0xe0-0x90(%rax) -+ vmovdqa $MASK,0x100-0x90(%rax) -+ vmovdqa 64(%rcx),$MASK # .Lmask26 -+ -+ ################################################################ -+ # load input -+ vmovdqu 16*0($inp),%x#$T0 -+ vmovdqu 16*1($inp),%x#$T1 -+ vinserti128 \$1,16*2($inp),$T0,$T0 -+ vinserti128 \$1,16*3($inp),$T1,$T1 -+ lea 16*4($inp),$inp -+ -+ vpsrldq \$6,$T0,$T2 # splat input -+ vpsrldq \$6,$T1,$T3 -+ vpunpckhqdq $T1,$T0,$T4 # 4 -+ vpunpcklqdq $T3,$T2,$T2 # 2:3 -+ vpunpcklqdq $T1,$T0,$T0 # 0:1 -+ -+ vpsrlq \$30,$T2,$T3 -+ vpsrlq \$4,$T2,$T2 -+ vpsrlq \$26,$T0,$T1 -+ vpsrlq \$40,$T4,$T4 # 4 -+ vpand $MASK,$T2,$T2 # 2 -+ vpand $MASK,$T0,$T0 # 0 -+ vpand $MASK,$T1,$T1 # 1 -+ vpand $MASK,$T3,$T3 # 3 -+ vpor 32(%rcx),$T4,$T4 # padbit, yes, always -+ -+ vpaddq $H2,$T2,$H2 # accumulate input -+ sub \$64,$len -+ jz .Ltail_avx2$suffix -+ jmp .Loop_avx2$suffix -+ -+.align 32 -+.Loop_avx2$suffix: -+ ################################################################ -+ # ((inp[0]*r^4+inp[4])*r^4+inp[ 8])*r^4 -+ # ((inp[1]*r^4+inp[5])*r^4+inp[ 9])*r^3 -+ # ((inp[2]*r^4+inp[6])*r^4+inp[10])*r^2 -+ # ((inp[3]*r^4+inp[7])*r^4+inp[11])*r^1 -+ # \________/\__________/ -+ ################################################################ -+ #vpaddq $H2,$T2,$H2 # accumulate input -+ vpaddq $H0,$T0,$H0 -+ vmovdqa `32*0`(%rsp),$T0 # r0^4 -+ vpaddq $H1,$T1,$H1 -+ vmovdqa `32*1`(%rsp),$T1 # r1^4 -+ vpaddq $H3,$T3,$H3 -+ vmovdqa `32*3`(%rsp),$T2 # r2^4 -+ vpaddq $H4,$T4,$H4 -+ vmovdqa `32*6-0x90`(%rax),$T3 # s3^4 -+ vmovdqa `32*8-0x90`(%rax),$S4 # s4^4 -+ -+ # d4 = h4*r0 + h3*r1 + h2*r2 + h1*r3 + h0*r4 -+ # d3 = h3*r0 + h2*r1 + h1*r2 + h0*r3 + h4*5*r4 -+ # d2 = h2*r0 + h1*r1 + h0*r2 + h4*5*r3 + h3*5*r4 -+ # d1 = h1*r0 + h0*r1 + h4*5*r2 + h3*5*r3 + h2*5*r4 -+ # d0 = h0*r0 + h4*5*r1 + h3*5*r2 + h2*5*r3 + h1*5*r4 -+ # -+ # however, as h2 is "chronologically" first one available pull -+ # corresponding operations up, so it's -+ # -+ # d4 = h2*r2 + h4*r0 + h3*r1 + h1*r3 + h0*r4 -+ # d3 = h2*r1 + h3*r0 + h1*r2 + h0*r3 + h4*5*r4 -+ # d2 = h2*r0 + h1*r1 + h0*r2 + h4*5*r3 + h3*5*r4 -+ # d1 = h2*5*r4 + h1*r0 + h0*r1 + h4*5*r2 + h3*5*r3 -+ # d0 = h2*5*r3 + h0*r0 + h4*5*r1 + h3*5*r2 + h1*5*r4 -+ -+ vpmuludq $H2,$T0,$D2 # d2 = h2*r0 -+ vpmuludq $H2,$T1,$D3 # d3 = h2*r1 -+ vpmuludq $H2,$T2,$D4 # d4 = h2*r2 -+ vpmuludq $H2,$T3,$D0 # d0 = h2*s3 -+ vpmuludq $H2,$S4,$D1 # d1 = h2*s4 -+ -+ vpmuludq $H0,$T1,$T4 # h0*r1 -+ vpmuludq $H1,$T1,$H2 # h1*r1, borrow $H2 as temp -+ vpaddq $T4,$D1,$D1 # d1 += h0*r1 -+ vpaddq $H2,$D2,$D2 # d2 += h1*r1 -+ vpmuludq $H3,$T1,$T4 # h3*r1 -+ vpmuludq `32*2`(%rsp),$H4,$H2 # h4*s1 -+ vpaddq $T4,$D4,$D4 # d4 += h3*r1 -+ vpaddq $H2,$D0,$D0 # d0 += h4*s1 -+ vmovdqa `32*4-0x90`(%rax),$T1 # s2 -+ -+ vpmuludq $H0,$T0,$T4 # h0*r0 -+ vpmuludq $H1,$T0,$H2 # h1*r0 -+ vpaddq $T4,$D0,$D0 # d0 += h0*r0 -+ vpaddq $H2,$D1,$D1 # d1 += h1*r0 -+ vpmuludq $H3,$T0,$T4 # h3*r0 -+ vpmuludq $H4,$T0,$H2 # h4*r0 -+ vmovdqu 16*0($inp),%x#$T0 # load input -+ vpaddq $T4,$D3,$D3 # d3 += h3*r0 -+ vpaddq $H2,$D4,$D4 # d4 += h4*r0 -+ vinserti128 \$1,16*2($inp),$T0,$T0 -+ -+ vpmuludq $H3,$T1,$T4 # h3*s2 -+ vpmuludq $H4,$T1,$H2 # h4*s2 -+ vmovdqu 16*1($inp),%x#$T1 -+ vpaddq $T4,$D0,$D0 # d0 += h3*s2 -+ vpaddq $H2,$D1,$D1 # d1 += h4*s2 -+ vmovdqa `32*5-0x90`(%rax),$H2 # r3 -+ vpmuludq $H1,$T2,$T4 # h1*r2 -+ vpmuludq $H0,$T2,$T2 # h0*r2 -+ vpaddq $T4,$D3,$D3 # d3 += h1*r2 -+ vpaddq $T2,$D2,$D2 # d2 += h0*r2 -+ vinserti128 \$1,16*3($inp),$T1,$T1 -+ lea 16*4($inp),$inp -+ -+ vpmuludq $H1,$H2,$T4 # h1*r3 -+ vpmuludq $H0,$H2,$H2 # h0*r3 -+ vpsrldq \$6,$T0,$T2 # splat input -+ vpaddq $T4,$D4,$D4 # d4 += h1*r3 -+ vpaddq $H2,$D3,$D3 # d3 += h0*r3 -+ vpmuludq $H3,$T3,$T4 # h3*s3 -+ vpmuludq $H4,$T3,$H2 # h4*s3 -+ vpsrldq \$6,$T1,$T3 -+ vpaddq $T4,$D1,$D1 # d1 += h3*s3 -+ vpaddq $H2,$D2,$D2 # d2 += h4*s3 -+ vpunpckhqdq $T1,$T0,$T4 # 4 -+ -+ vpmuludq $H3,$S4,$H3 # h3*s4 -+ vpmuludq $H4,$S4,$H4 # h4*s4 -+ vpunpcklqdq $T1,$T0,$T0 # 0:1 -+ vpaddq $H3,$D2,$H2 # h2 = d2 + h3*r4 -+ vpaddq $H4,$D3,$H3 # h3 = d3 + h4*r4 -+ vpunpcklqdq $T3,$T2,$T3 # 2:3 -+ vpmuludq `32*7-0x90`(%rax),$H0,$H4 # h0*r4 -+ vpmuludq $H1,$S4,$H0 # h1*s4 -+ vmovdqa 64(%rcx),$MASK # .Lmask26 -+ vpaddq $H4,$D4,$H4 # h4 = d4 + h0*r4 -+ vpaddq $H0,$D0,$H0 # h0 = d0 + h1*s4 -+ -+ ################################################################ -+ # lazy reduction (interleaved with tail of input splat) -+ -+ vpsrlq \$26,$H3,$D3 -+ vpand $MASK,$H3,$H3 -+ vpaddq $D3,$H4,$H4 # h3 -> h4 -+ -+ vpsrlq \$26,$H0,$D0 -+ vpand $MASK,$H0,$H0 -+ vpaddq $D0,$D1,$H1 # h0 -> h1 -+ -+ vpsrlq \$26,$H4,$D4 -+ vpand $MASK,$H4,$H4 -+ -+ vpsrlq \$4,$T3,$T2 -+ -+ vpsrlq \$26,$H1,$D1 -+ vpand $MASK,$H1,$H1 -+ vpaddq $D1,$H2,$H2 # h1 -> h2 -+ -+ vpaddq $D4,$H0,$H0 -+ vpsllq \$2,$D4,$D4 -+ vpaddq $D4,$H0,$H0 # h4 -> h0 -+ -+ vpand $MASK,$T2,$T2 # 2 -+ vpsrlq \$26,$T0,$T1 -+ -+ vpsrlq \$26,$H2,$D2 -+ vpand $MASK,$H2,$H2 -+ vpaddq $D2,$H3,$H3 # h2 -> h3 -+ -+ vpaddq $T2,$H2,$H2 # modulo-scheduled -+ vpsrlq \$30,$T3,$T3 -+ -+ vpsrlq \$26,$H0,$D0 -+ vpand $MASK,$H0,$H0 -+ vpaddq $D0,$H1,$H1 # h0 -> h1 -+ -+ vpsrlq \$40,$T4,$T4 # 4 -+ -+ vpsrlq \$26,$H3,$D3 -+ vpand $MASK,$H3,$H3 -+ vpaddq $D3,$H4,$H4 # h3 -> h4 -+ -+ vpand $MASK,$T0,$T0 # 0 -+ vpand $MASK,$T1,$T1 # 1 -+ vpand $MASK,$T3,$T3 # 3 -+ vpor 32(%rcx),$T4,$T4 # padbit, yes, always -+ -+ sub \$64,$len -+ jnz .Loop_avx2$suffix -+ -+ .byte 0x66,0x90 -+.Ltail_avx2$suffix: -+ ################################################################ -+ # while above multiplications were by r^4 in all lanes, in last -+ # iteration we multiply least significant lane by r^4 and most -+ # significant one by r, so copy of above except that references -+ # to the precomputed table are displaced by 4... -+ -+ #vpaddq $H2,$T2,$H2 # accumulate input -+ vpaddq $H0,$T0,$H0 -+ vmovdqu `32*0+4`(%rsp),$T0 # r0^4 -+ vpaddq $H1,$T1,$H1 -+ vmovdqu `32*1+4`(%rsp),$T1 # r1^4 -+ vpaddq $H3,$T3,$H3 -+ vmovdqu `32*3+4`(%rsp),$T2 # r2^4 -+ vpaddq $H4,$T4,$H4 -+ vmovdqu `32*6+4-0x90`(%rax),$T3 # s3^4 -+ vmovdqu `32*8+4-0x90`(%rax),$S4 # s4^4 -+ -+ vpmuludq $H2,$T0,$D2 # d2 = h2*r0 -+ vpmuludq $H2,$T1,$D3 # d3 = h2*r1 -+ vpmuludq $H2,$T2,$D4 # d4 = h2*r2 -+ vpmuludq $H2,$T3,$D0 # d0 = h2*s3 -+ vpmuludq $H2,$S4,$D1 # d1 = h2*s4 -+ -+ vpmuludq $H0,$T1,$T4 # h0*r1 -+ vpmuludq $H1,$T1,$H2 # h1*r1 -+ vpaddq $T4,$D1,$D1 # d1 += h0*r1 -+ vpaddq $H2,$D2,$D2 # d2 += h1*r1 -+ vpmuludq $H3,$T1,$T4 # h3*r1 -+ vpmuludq `32*2+4`(%rsp),$H4,$H2 # h4*s1 -+ vpaddq $T4,$D4,$D4 # d4 += h3*r1 -+ vpaddq $H2,$D0,$D0 # d0 += h4*s1 -+ -+ vpmuludq $H0,$T0,$T4 # h0*r0 -+ vpmuludq $H1,$T0,$H2 # h1*r0 -+ vpaddq $T4,$D0,$D0 # d0 += h0*r0 -+ vmovdqu `32*4+4-0x90`(%rax),$T1 # s2 -+ vpaddq $H2,$D1,$D1 # d1 += h1*r0 -+ vpmuludq $H3,$T0,$T4 # h3*r0 -+ vpmuludq $H4,$T0,$H2 # h4*r0 -+ vpaddq $T4,$D3,$D3 # d3 += h3*r0 -+ vpaddq $H2,$D4,$D4 # d4 += h4*r0 -+ -+ vpmuludq $H3,$T1,$T4 # h3*s2 -+ vpmuludq $H4,$T1,$H2 # h4*s2 -+ vpaddq $T4,$D0,$D0 # d0 += h3*s2 -+ vpaddq $H2,$D1,$D1 # d1 += h4*s2 -+ vmovdqu `32*5+4-0x90`(%rax),$H2 # r3 -+ vpmuludq $H1,$T2,$T4 # h1*r2 -+ vpmuludq $H0,$T2,$T2 # h0*r2 -+ vpaddq $T4,$D3,$D3 # d3 += h1*r2 -+ vpaddq $T2,$D2,$D2 # d2 += h0*r2 -+ -+ vpmuludq $H1,$H2,$T4 # h1*r3 -+ vpmuludq $H0,$H2,$H2 # h0*r3 -+ vpaddq $T4,$D4,$D4 # d4 += h1*r3 -+ vpaddq $H2,$D3,$D3 # d3 += h0*r3 -+ vpmuludq $H3,$T3,$T4 # h3*s3 -+ vpmuludq $H4,$T3,$H2 # h4*s3 -+ vpaddq $T4,$D1,$D1 # d1 += h3*s3 -+ vpaddq $H2,$D2,$D2 # d2 += h4*s3 -+ -+ vpmuludq $H3,$S4,$H3 # h3*s4 -+ vpmuludq $H4,$S4,$H4 # h4*s4 -+ vpaddq $H3,$D2,$H2 # h2 = d2 + h3*r4 -+ vpaddq $H4,$D3,$H3 # h3 = d3 + h4*r4 -+ vpmuludq `32*7+4-0x90`(%rax),$H0,$H4 # h0*r4 -+ vpmuludq $H1,$S4,$H0 # h1*s4 -+ vmovdqa 64(%rcx),$MASK # .Lmask26 -+ vpaddq $H4,$D4,$H4 # h4 = d4 + h0*r4 -+ vpaddq $H0,$D0,$H0 # h0 = d0 + h1*s4 -+ -+ ################################################################ -+ # horizontal addition -+ -+ vpsrldq \$8,$D1,$T1 -+ vpsrldq \$8,$H2,$T2 -+ vpsrldq \$8,$H3,$T3 -+ vpsrldq \$8,$H4,$T4 -+ vpsrldq \$8,$H0,$T0 -+ vpaddq $T1,$D1,$D1 -+ vpaddq $T2,$H2,$H2 -+ vpaddq $T3,$H3,$H3 -+ vpaddq $T4,$H4,$H4 -+ vpaddq $T0,$H0,$H0 -+ -+ vpermq \$0x2,$H3,$T3 -+ vpermq \$0x2,$H4,$T4 -+ vpermq \$0x2,$H0,$T0 -+ vpermq \$0x2,$D1,$T1 -+ vpermq \$0x2,$H2,$T2 -+ vpaddq $T3,$H3,$H3 -+ vpaddq $T4,$H4,$H4 -+ vpaddq $T0,$H0,$H0 -+ vpaddq $T1,$D1,$D1 -+ vpaddq $T2,$H2,$H2 -+ -+ ################################################################ -+ # lazy reduction -+ -+ vpsrlq \$26,$H3,$D3 -+ vpand $MASK,$H3,$H3 -+ vpaddq $D3,$H4,$H4 # h3 -> h4 -+ -+ vpsrlq \$26,$H0,$D0 -+ vpand $MASK,$H0,$H0 -+ vpaddq $D0,$D1,$H1 # h0 -> h1 -+ -+ vpsrlq \$26,$H4,$D4 -+ vpand $MASK,$H4,$H4 -+ -+ vpsrlq \$26,$H1,$D1 -+ vpand $MASK,$H1,$H1 -+ vpaddq $D1,$H2,$H2 # h1 -> h2 -+ -+ vpaddq $D4,$H0,$H0 -+ vpsllq \$2,$D4,$D4 -+ vpaddq $D4,$H0,$H0 # h4 -> h0 -+ -+ vpsrlq \$26,$H2,$D2 -+ vpand $MASK,$H2,$H2 -+ vpaddq $D2,$H3,$H3 # h2 -> h3 -+ -+ vpsrlq \$26,$H0,$D0 -+ vpand $MASK,$H0,$H0 -+ vpaddq $D0,$H1,$H1 # h0 -> h1 -+ -+ vpsrlq \$26,$H3,$D3 -+ vpand $MASK,$H3,$H3 -+ vpaddq $D3,$H4,$H4 # h3 -> h4 -+ -+ vmovd %x#$H0,`4*0-48-64`($ctx)# save partially reduced -+ vmovd %x#$H1,`4*1-48-64`($ctx) -+ vmovd %x#$H2,`4*2-48-64`($ctx) -+ vmovd %x#$H3,`4*3-48-64`($ctx) -+ vmovd %x#$H4,`4*4-48-64`($ctx) -+___ -+$code.=<<___ if ($win64); -+ vmovdqa -0xb0(%r10),%xmm6 -+ vmovdqa -0xa0(%r10),%xmm7 -+ vmovdqa -0x90(%r10),%xmm8 -+ vmovdqa -0x80(%r10),%xmm9 -+ vmovdqa -0x70(%r10),%xmm10 -+ vmovdqa -0x60(%r10),%xmm11 -+ vmovdqa -0x50(%r10),%xmm12 -+ vmovdqa -0x40(%r10),%xmm13 -+ vmovdqa -0x30(%r10),%xmm14 -+ vmovdqa -0x20(%r10),%xmm15 -+ lea -8(%r10),%rsp -+.Ldo_avx2_epilogue$suffix: -+___ -+$code.=<<___ if (!$win64); -+ lea -8(%r10),%rsp -+.cfi_def_cfa_register %rsp -+___ -+$code.=<<___; -+ vzeroupper -+ ret -+.cfi_endproc -+___ -+if($avx > 2 && $avx512) { -+my ($R0,$R1,$R2,$R3,$R4, $S1,$S2,$S3,$S4) = map("%zmm$_",(16..24)); -+my ($M0,$M1,$M2,$M3,$M4) = map("%zmm$_",(25..29)); -+my $PADBIT="%zmm30"; -+ -+map(s/%y/%z/,($T4,$T0,$T1,$T2,$T3)); # switch to %zmm domain -+map(s/%y/%z/,($D0,$D1,$D2,$D3,$D4)); -+map(s/%y/%z/,($H0,$H1,$H2,$H3,$H4)); -+map(s/%y/%z/,($MASK)); -+ -+$code.=<<___; -+.cfi_startproc -+.Lblocks_avx512: -+ mov \$15,%eax -+ kmovw %eax,%k2 -+___ -+$code.=<<___ if (!$win64); -+ lea 8(%rsp),%r10 -+.cfi_def_cfa_register %r10 -+ sub \$0x128,%rsp -+___ -+$code.=<<___ if ($win64); -+ lea 8(%rsp),%r10 -+ sub \$0x1c8,%rsp -+ vmovdqa %xmm6,-0xb0(%r10) -+ vmovdqa %xmm7,-0xa0(%r10) -+ vmovdqa %xmm8,-0x90(%r10) -+ vmovdqa %xmm9,-0x80(%r10) -+ vmovdqa %xmm10,-0x70(%r10) -+ vmovdqa %xmm11,-0x60(%r10) -+ vmovdqa %xmm12,-0x50(%r10) -+ vmovdqa %xmm13,-0x40(%r10) -+ vmovdqa %xmm14,-0x30(%r10) -+ vmovdqa %xmm15,-0x20(%r10) -+.Ldo_avx512_body: -+___ -+$code.=<<___; -+ lea .Lconst(%rip),%rcx -+ lea 48+64($ctx),$ctx # size optimization -+ vmovdqa 96(%rcx),%y#$T2 # .Lpermd_avx2 -+ -+ # expand pre-calculated table -+ vmovdqu `16*0-64`($ctx),%x#$D0 # will become expanded ${R0} -+ and \$-512,%rsp -+ vmovdqu `16*1-64`($ctx),%x#$D1 # will become ... ${R1} -+ mov \$0x20,%rax -+ vmovdqu `16*2-64`($ctx),%x#$T0 # ... ${S1} -+ vmovdqu `16*3-64`($ctx),%x#$D2 # ... ${R2} -+ vmovdqu `16*4-64`($ctx),%x#$T1 # ... ${S2} -+ vmovdqu `16*5-64`($ctx),%x#$D3 # ... ${R3} -+ vmovdqu `16*6-64`($ctx),%x#$T3 # ... ${S3} -+ vmovdqu `16*7-64`($ctx),%x#$D4 # ... ${R4} -+ vmovdqu `16*8-64`($ctx),%x#$T4 # ... ${S4} -+ vpermd $D0,$T2,$R0 # 00003412 -> 14243444 -+ vpbroadcastq 64(%rcx),$MASK # .Lmask26 -+ vpermd $D1,$T2,$R1 -+ vpermd $T0,$T2,$S1 -+ vpermd $D2,$T2,$R2 -+ vmovdqa64 $R0,0x00(%rsp){%k2} # save in case $len%128 != 0 -+ vpsrlq \$32,$R0,$T0 # 14243444 -> 01020304 -+ vpermd $T1,$T2,$S2 -+ vmovdqu64 $R1,0x00(%rsp,%rax){%k2} -+ vpsrlq \$32,$R1,$T1 -+ vpermd $D3,$T2,$R3 -+ vmovdqa64 $S1,0x40(%rsp){%k2} -+ vpermd $T3,$T2,$S3 -+ vpermd $D4,$T2,$R4 -+ vmovdqu64 $R2,0x40(%rsp,%rax){%k2} -+ vpermd $T4,$T2,$S4 -+ vmovdqa64 $S2,0x80(%rsp){%k2} -+ vmovdqu64 $R3,0x80(%rsp,%rax){%k2} -+ vmovdqa64 $S3,0xc0(%rsp){%k2} -+ vmovdqu64 $R4,0xc0(%rsp,%rax){%k2} -+ vmovdqa64 $S4,0x100(%rsp){%k2} -+ -+ ################################################################ -+ # calculate 5th through 8th powers of the key -+ # -+ # d0 = r0'*r0 + r1'*5*r4 + r2'*5*r3 + r3'*5*r2 + r4'*5*r1 -+ # d1 = r0'*r1 + r1'*r0 + r2'*5*r4 + r3'*5*r3 + r4'*5*r2 -+ # d2 = r0'*r2 + r1'*r1 + r2'*r0 + r3'*5*r4 + r4'*5*r3 -+ # d3 = r0'*r3 + r1'*r2 + r2'*r1 + r3'*r0 + r4'*5*r4 -+ # d4 = r0'*r4 + r1'*r3 + r2'*r2 + r3'*r1 + r4'*r0 -+ -+ vpmuludq $T0,$R0,$D0 # d0 = r0'*r0 -+ vpmuludq $T0,$R1,$D1 # d1 = r0'*r1 -+ vpmuludq $T0,$R2,$D2 # d2 = r0'*r2 -+ vpmuludq $T0,$R3,$D3 # d3 = r0'*r3 -+ vpmuludq $T0,$R4,$D4 # d4 = r0'*r4 -+ vpsrlq \$32,$R2,$T2 -+ -+ vpmuludq $T1,$S4,$M0 -+ vpmuludq $T1,$R0,$M1 -+ vpmuludq $T1,$R1,$M2 -+ vpmuludq $T1,$R2,$M3 -+ vpmuludq $T1,$R3,$M4 -+ vpsrlq \$32,$R3,$T3 -+ vpaddq $M0,$D0,$D0 # d0 += r1'*5*r4 -+ vpaddq $M1,$D1,$D1 # d1 += r1'*r0 -+ vpaddq $M2,$D2,$D2 # d2 += r1'*r1 -+ vpaddq $M3,$D3,$D3 # d3 += r1'*r2 -+ vpaddq $M4,$D4,$D4 # d4 += r1'*r3 -+ -+ vpmuludq $T2,$S3,$M0 -+ vpmuludq $T2,$S4,$M1 -+ vpmuludq $T2,$R1,$M3 -+ vpmuludq $T2,$R2,$M4 -+ vpmuludq $T2,$R0,$M2 -+ vpsrlq \$32,$R4,$T4 -+ vpaddq $M0,$D0,$D0 # d0 += r2'*5*r3 -+ vpaddq $M1,$D1,$D1 # d1 += r2'*5*r4 -+ vpaddq $M3,$D3,$D3 # d3 += r2'*r1 -+ vpaddq $M4,$D4,$D4 # d4 += r2'*r2 -+ vpaddq $M2,$D2,$D2 # d2 += r2'*r0 -+ -+ vpmuludq $T3,$S2,$M0 -+ vpmuludq $T3,$R0,$M3 -+ vpmuludq $T3,$R1,$M4 -+ vpmuludq $T3,$S3,$M1 -+ vpmuludq $T3,$S4,$M2 -+ vpaddq $M0,$D0,$D0 # d0 += r3'*5*r2 -+ vpaddq $M3,$D3,$D3 # d3 += r3'*r0 -+ vpaddq $M4,$D4,$D4 # d4 += r3'*r1 -+ vpaddq $M1,$D1,$D1 # d1 += r3'*5*r3 -+ vpaddq $M2,$D2,$D2 # d2 += r3'*5*r4 -+ -+ vpmuludq $T4,$S4,$M3 -+ vpmuludq $T4,$R0,$M4 -+ vpmuludq $T4,$S1,$M0 -+ vpmuludq $T4,$S2,$M1 -+ vpmuludq $T4,$S3,$M2 -+ vpaddq $M3,$D3,$D3 # d3 += r2'*5*r4 -+ vpaddq $M4,$D4,$D4 # d4 += r2'*r0 -+ vpaddq $M0,$D0,$D0 # d0 += r2'*5*r1 -+ vpaddq $M1,$D1,$D1 # d1 += r2'*5*r2 -+ vpaddq $M2,$D2,$D2 # d2 += r2'*5*r3 -+ -+ ################################################################ -+ # load input -+ vmovdqu64 16*0($inp),%z#$T3 -+ vmovdqu64 16*4($inp),%z#$T4 -+ lea 16*8($inp),$inp -+ -+ ################################################################ -+ # lazy reduction -+ -+ vpsrlq \$26,$D3,$M3 -+ vpandq $MASK,$D3,$D3 -+ vpaddq $M3,$D4,$D4 # d3 -> d4 -+ -+ vpsrlq \$26,$D0,$M0 -+ vpandq $MASK,$D0,$D0 -+ vpaddq $M0,$D1,$D1 # d0 -> d1 -+ -+ vpsrlq \$26,$D4,$M4 -+ vpandq $MASK,$D4,$D4 -+ -+ vpsrlq \$26,$D1,$M1 -+ vpandq $MASK,$D1,$D1 -+ vpaddq $M1,$D2,$D2 # d1 -> d2 -+ -+ vpaddq $M4,$D0,$D0 -+ vpsllq \$2,$M4,$M4 -+ vpaddq $M4,$D0,$D0 # d4 -> d0 -+ -+ vpsrlq \$26,$D2,$M2 -+ vpandq $MASK,$D2,$D2 -+ vpaddq $M2,$D3,$D3 # d2 -> d3 -+ -+ vpsrlq \$26,$D0,$M0 -+ vpandq $MASK,$D0,$D0 -+ vpaddq $M0,$D1,$D1 # d0 -> d1 -+ -+ vpsrlq \$26,$D3,$M3 -+ vpandq $MASK,$D3,$D3 -+ vpaddq $M3,$D4,$D4 # d3 -> d4 -+ -+ ################################################################ -+ # at this point we have 14243444 in $R0-$S4 and 05060708 in -+ # $D0-$D4, ... -+ -+ vpunpcklqdq $T4,$T3,$T0 # transpose input -+ vpunpckhqdq $T4,$T3,$T4 -+ -+ # ... since input 64-bit lanes are ordered as 73625140, we could -+ # "vperm" it to 76543210 (here and in each loop iteration), *or* -+ # we could just flow along, hence the goal for $R0-$S4 is -+ # 1858286838784888 ... -+ -+ vmovdqa32 128(%rcx),$M0 # .Lpermd_avx512: -+ mov \$0x7777,%eax -+ kmovw %eax,%k1 -+ -+ vpermd $R0,$M0,$R0 # 14243444 -> 1---2---3---4--- -+ vpermd $R1,$M0,$R1 -+ vpermd $R2,$M0,$R2 -+ vpermd $R3,$M0,$R3 -+ vpermd $R4,$M0,$R4 -+ -+ vpermd $D0,$M0,${R0}{%k1} # 05060708 -> 1858286838784888 -+ vpermd $D1,$M0,${R1}{%k1} -+ vpermd $D2,$M0,${R2}{%k1} -+ vpermd $D3,$M0,${R3}{%k1} -+ vpermd $D4,$M0,${R4}{%k1} -+ -+ vpslld \$2,$R1,$S1 # *5 -+ vpslld \$2,$R2,$S2 -+ vpslld \$2,$R3,$S3 -+ vpslld \$2,$R4,$S4 -+ vpaddd $R1,$S1,$S1 -+ vpaddd $R2,$S2,$S2 -+ vpaddd $R3,$S3,$S3 -+ vpaddd $R4,$S4,$S4 -+ -+ vpbroadcastq 32(%rcx),$PADBIT # .L129 -+ -+ vpsrlq \$52,$T0,$T2 # splat input -+ vpsllq \$12,$T4,$T3 -+ vporq $T3,$T2,$T2 -+ vpsrlq \$26,$T0,$T1 -+ vpsrlq \$14,$T4,$T3 -+ vpsrlq \$40,$T4,$T4 # 4 -+ vpandq $MASK,$T2,$T2 # 2 -+ vpandq $MASK,$T0,$T0 # 0 -+ #vpandq $MASK,$T1,$T1 # 1 -+ #vpandq $MASK,$T3,$T3 # 3 -+ #vporq $PADBIT,$T4,$T4 # padbit, yes, always -+ -+ vpaddq $H2,$T2,$H2 # accumulate input -+ sub \$192,$len -+ jbe .Ltail_avx512 -+ jmp .Loop_avx512 -+ -+.align 32 -+.Loop_avx512: -+ ################################################################ -+ # ((inp[0]*r^8+inp[ 8])*r^8+inp[16])*r^8 -+ # ((inp[1]*r^8+inp[ 9])*r^8+inp[17])*r^7 -+ # ((inp[2]*r^8+inp[10])*r^8+inp[18])*r^6 -+ # ((inp[3]*r^8+inp[11])*r^8+inp[19])*r^5 -+ # ((inp[4]*r^8+inp[12])*r^8+inp[20])*r^4 -+ # ((inp[5]*r^8+inp[13])*r^8+inp[21])*r^3 -+ # ((inp[6]*r^8+inp[14])*r^8+inp[22])*r^2 -+ # ((inp[7]*r^8+inp[15])*r^8+inp[23])*r^1 -+ # \________/\___________/ -+ ################################################################ -+ #vpaddq $H2,$T2,$H2 # accumulate input -+ -+ # d4 = h4*r0 + h3*r1 + h2*r2 + h1*r3 + h0*r4 -+ # d3 = h3*r0 + h2*r1 + h1*r2 + h0*r3 + h4*5*r4 -+ # d2 = h2*r0 + h1*r1 + h0*r2 + h4*5*r3 + h3*5*r4 -+ # d1 = h1*r0 + h0*r1 + h4*5*r2 + h3*5*r3 + h2*5*r4 -+ # d0 = h0*r0 + h4*5*r1 + h3*5*r2 + h2*5*r3 + h1*5*r4 -+ # -+ # however, as h2 is "chronologically" first one available pull -+ # corresponding operations up, so it's -+ # -+ # d3 = h2*r1 + h0*r3 + h1*r2 + h3*r0 + h4*5*r4 -+ # d4 = h2*r2 + h0*r4 + h1*r3 + h3*r1 + h4*r0 -+ # d0 = h2*5*r3 + h0*r0 + h1*5*r4 + h3*5*r2 + h4*5*r1 -+ # d1 = h2*5*r4 + h0*r1 + h1*r0 + h3*5*r3 + h4*5*r2 -+ # d2 = h2*r0 + h0*r2 + h1*r1 + h3*5*r4 + h4*5*r3 -+ -+ vpmuludq $H2,$R1,$D3 # d3 = h2*r1 -+ vpaddq $H0,$T0,$H0 -+ vpmuludq $H2,$R2,$D4 # d4 = h2*r2 -+ vpandq $MASK,$T1,$T1 # 1 -+ vpmuludq $H2,$S3,$D0 # d0 = h2*s3 -+ vpandq $MASK,$T3,$T3 # 3 -+ vpmuludq $H2,$S4,$D1 # d1 = h2*s4 -+ vporq $PADBIT,$T4,$T4 # padbit, yes, always -+ vpmuludq $H2,$R0,$D2 # d2 = h2*r0 -+ vpaddq $H1,$T1,$H1 # accumulate input -+ vpaddq $H3,$T3,$H3 -+ vpaddq $H4,$T4,$H4 -+ -+ vmovdqu64 16*0($inp),$T3 # load input -+ vmovdqu64 16*4($inp),$T4 -+ lea 16*8($inp),$inp -+ vpmuludq $H0,$R3,$M3 -+ vpmuludq $H0,$R4,$M4 -+ vpmuludq $H0,$R0,$M0 -+ vpmuludq $H0,$R1,$M1 -+ vpaddq $M3,$D3,$D3 # d3 += h0*r3 -+ vpaddq $M4,$D4,$D4 # d4 += h0*r4 -+ vpaddq $M0,$D0,$D0 # d0 += h0*r0 -+ vpaddq $M1,$D1,$D1 # d1 += h0*r1 -+ -+ vpmuludq $H1,$R2,$M3 -+ vpmuludq $H1,$R3,$M4 -+ vpmuludq $H1,$S4,$M0 -+ vpmuludq $H0,$R2,$M2 -+ vpaddq $M3,$D3,$D3 # d3 += h1*r2 -+ vpaddq $M4,$D4,$D4 # d4 += h1*r3 -+ vpaddq $M0,$D0,$D0 # d0 += h1*s4 -+ vpaddq $M2,$D2,$D2 # d2 += h0*r2 -+ -+ vpunpcklqdq $T4,$T3,$T0 # transpose input -+ vpunpckhqdq $T4,$T3,$T4 -+ -+ vpmuludq $H3,$R0,$M3 -+ vpmuludq $H3,$R1,$M4 -+ vpmuludq $H1,$R0,$M1 -+ vpmuludq $H1,$R1,$M2 -+ vpaddq $M3,$D3,$D3 # d3 += h3*r0 -+ vpaddq $M4,$D4,$D4 # d4 += h3*r1 -+ vpaddq $M1,$D1,$D1 # d1 += h1*r0 -+ vpaddq $M2,$D2,$D2 # d2 += h1*r1 -+ -+ vpmuludq $H4,$S4,$M3 -+ vpmuludq $H4,$R0,$M4 -+ vpmuludq $H3,$S2,$M0 -+ vpmuludq $H3,$S3,$M1 -+ vpaddq $M3,$D3,$D3 # d3 += h4*s4 -+ vpmuludq $H3,$S4,$M2 -+ vpaddq $M4,$D4,$D4 # d4 += h4*r0 -+ vpaddq $M0,$D0,$D0 # d0 += h3*s2 -+ vpaddq $M1,$D1,$D1 # d1 += h3*s3 -+ vpaddq $M2,$D2,$D2 # d2 += h3*s4 -+ -+ vpmuludq $H4,$S1,$M0 -+ vpmuludq $H4,$S2,$M1 -+ vpmuludq $H4,$S3,$M2 -+ vpaddq $M0,$D0,$H0 # h0 = d0 + h4*s1 -+ vpaddq $M1,$D1,$H1 # h1 = d2 + h4*s2 -+ vpaddq $M2,$D2,$H2 # h2 = d3 + h4*s3 -+ -+ ################################################################ -+ # lazy reduction (interleaved with input splat) -+ -+ vpsrlq \$52,$T0,$T2 # splat input -+ vpsllq \$12,$T4,$T3 -+ -+ vpsrlq \$26,$D3,$H3 -+ vpandq $MASK,$D3,$D3 -+ vpaddq $H3,$D4,$H4 # h3 -> h4 -+ -+ vporq $T3,$T2,$T2 -+ -+ vpsrlq \$26,$H0,$D0 -+ vpandq $MASK,$H0,$H0 -+ vpaddq $D0,$H1,$H1 # h0 -> h1 -+ -+ vpandq $MASK,$T2,$T2 # 2 -+ -+ vpsrlq \$26,$H4,$D4 -+ vpandq $MASK,$H4,$H4 -+ -+ vpsrlq \$26,$H1,$D1 -+ vpandq $MASK,$H1,$H1 -+ vpaddq $D1,$H2,$H2 # h1 -> h2 -+ -+ vpaddq $D4,$H0,$H0 -+ vpsllq \$2,$D4,$D4 -+ vpaddq $D4,$H0,$H0 # h4 -> h0 -+ -+ vpaddq $T2,$H2,$H2 # modulo-scheduled -+ vpsrlq \$26,$T0,$T1 -+ -+ vpsrlq \$26,$H2,$D2 -+ vpandq $MASK,$H2,$H2 -+ vpaddq $D2,$D3,$H3 # h2 -> h3 -+ -+ vpsrlq \$14,$T4,$T3 -+ -+ vpsrlq \$26,$H0,$D0 -+ vpandq $MASK,$H0,$H0 -+ vpaddq $D0,$H1,$H1 # h0 -> h1 -+ -+ vpsrlq \$40,$T4,$T4 # 4 -+ -+ vpsrlq \$26,$H3,$D3 -+ vpandq $MASK,$H3,$H3 -+ vpaddq $D3,$H4,$H4 # h3 -> h4 -+ -+ vpandq $MASK,$T0,$T0 # 0 -+ #vpandq $MASK,$T1,$T1 # 1 -+ #vpandq $MASK,$T3,$T3 # 3 -+ #vporq $PADBIT,$T4,$T4 # padbit, yes, always -+ -+ sub \$128,$len -+ ja .Loop_avx512 -+ -+.Ltail_avx512: -+ ################################################################ -+ # while above multiplications were by r^8 in all lanes, in last -+ # iteration we multiply least significant lane by r^8 and most -+ # significant one by r, that's why table gets shifted... -+ -+ vpsrlq \$32,$R0,$R0 # 0105020603070408 -+ vpsrlq \$32,$R1,$R1 -+ vpsrlq \$32,$R2,$R2 -+ vpsrlq \$32,$S3,$S3 -+ vpsrlq \$32,$S4,$S4 -+ vpsrlq \$32,$R3,$R3 -+ vpsrlq \$32,$R4,$R4 -+ vpsrlq \$32,$S1,$S1 -+ vpsrlq \$32,$S2,$S2 -+ -+ ################################################################ -+ # load either next or last 64 byte of input -+ lea ($inp,$len),$inp -+ -+ #vpaddq $H2,$T2,$H2 # accumulate input -+ vpaddq $H0,$T0,$H0 -+ -+ vpmuludq $H2,$R1,$D3 # d3 = h2*r1 -+ vpmuludq $H2,$R2,$D4 # d4 = h2*r2 -+ vpmuludq $H2,$S3,$D0 # d0 = h2*s3 -+ vpandq $MASK,$T1,$T1 # 1 -+ vpmuludq $H2,$S4,$D1 # d1 = h2*s4 -+ vpandq $MASK,$T3,$T3 # 3 -+ vpmuludq $H2,$R0,$D2 # d2 = h2*r0 -+ vporq $PADBIT,$T4,$T4 # padbit, yes, always -+ vpaddq $H1,$T1,$H1 # accumulate input -+ vpaddq $H3,$T3,$H3 -+ vpaddq $H4,$T4,$H4 -+ -+ vmovdqu 16*0($inp),%x#$T0 -+ vpmuludq $H0,$R3,$M3 -+ vpmuludq $H0,$R4,$M4 -+ vpmuludq $H0,$R0,$M0 -+ vpmuludq $H0,$R1,$M1 -+ vpaddq $M3,$D3,$D3 # d3 += h0*r3 -+ vpaddq $M4,$D4,$D4 # d4 += h0*r4 -+ vpaddq $M0,$D0,$D0 # d0 += h0*r0 -+ vpaddq $M1,$D1,$D1 # d1 += h0*r1 -+ -+ vmovdqu 16*1($inp),%x#$T1 -+ vpmuludq $H1,$R2,$M3 -+ vpmuludq $H1,$R3,$M4 -+ vpmuludq $H1,$S4,$M0 -+ vpmuludq $H0,$R2,$M2 -+ vpaddq $M3,$D3,$D3 # d3 += h1*r2 -+ vpaddq $M4,$D4,$D4 # d4 += h1*r3 -+ vpaddq $M0,$D0,$D0 # d0 += h1*s4 -+ vpaddq $M2,$D2,$D2 # d2 += h0*r2 -+ -+ vinserti128 \$1,16*2($inp),%y#$T0,%y#$T0 -+ vpmuludq $H3,$R0,$M3 -+ vpmuludq $H3,$R1,$M4 -+ vpmuludq $H1,$R0,$M1 -+ vpmuludq $H1,$R1,$M2 -+ vpaddq $M3,$D3,$D3 # d3 += h3*r0 -+ vpaddq $M4,$D4,$D4 # d4 += h3*r1 -+ vpaddq $M1,$D1,$D1 # d1 += h1*r0 -+ vpaddq $M2,$D2,$D2 # d2 += h1*r1 -+ -+ vinserti128 \$1,16*3($inp),%y#$T1,%y#$T1 -+ vpmuludq $H4,$S4,$M3 -+ vpmuludq $H4,$R0,$M4 -+ vpmuludq $H3,$S2,$M0 -+ vpmuludq $H3,$S3,$M1 -+ vpmuludq $H3,$S4,$M2 -+ vpaddq $M3,$D3,$H3 # h3 = d3 + h4*s4 -+ vpaddq $M4,$D4,$D4 # d4 += h4*r0 -+ vpaddq $M0,$D0,$D0 # d0 += h3*s2 -+ vpaddq $M1,$D1,$D1 # d1 += h3*s3 -+ vpaddq $M2,$D2,$D2 # d2 += h3*s4 -+ -+ vpmuludq $H4,$S1,$M0 -+ vpmuludq $H4,$S2,$M1 -+ vpmuludq $H4,$S3,$M2 -+ vpaddq $M0,$D0,$H0 # h0 = d0 + h4*s1 -+ vpaddq $M1,$D1,$H1 # h1 = d2 + h4*s2 -+ vpaddq $M2,$D2,$H2 # h2 = d3 + h4*s3 -+ -+ ################################################################ -+ # horizontal addition -+ -+ mov \$1,%eax -+ vpermq \$0xb1,$H3,$D3 -+ vpermq \$0xb1,$D4,$H4 -+ vpermq \$0xb1,$H0,$D0 -+ vpermq \$0xb1,$H1,$D1 -+ vpermq \$0xb1,$H2,$D2 -+ vpaddq $D3,$H3,$H3 -+ vpaddq $D4,$H4,$H4 -+ vpaddq $D0,$H0,$H0 -+ vpaddq $D1,$H1,$H1 -+ vpaddq $D2,$H2,$H2 -+ -+ kmovw %eax,%k3 -+ vpermq \$0x2,$H3,$D3 -+ vpermq \$0x2,$H4,$D4 -+ vpermq \$0x2,$H0,$D0 -+ vpermq \$0x2,$H1,$D1 -+ vpermq \$0x2,$H2,$D2 -+ vpaddq $D3,$H3,$H3 -+ vpaddq $D4,$H4,$H4 -+ vpaddq $D0,$H0,$H0 -+ vpaddq $D1,$H1,$H1 -+ vpaddq $D2,$H2,$H2 -+ -+ vextracti64x4 \$0x1,$H3,%y#$D3 -+ vextracti64x4 \$0x1,$H4,%y#$D4 -+ vextracti64x4 \$0x1,$H0,%y#$D0 -+ vextracti64x4 \$0x1,$H1,%y#$D1 -+ vextracti64x4 \$0x1,$H2,%y#$D2 -+ vpaddq $D3,$H3,${H3}{%k3}{z} # keep single qword in case -+ vpaddq $D4,$H4,${H4}{%k3}{z} # it's passed to .Ltail_avx2 -+ vpaddq $D0,$H0,${H0}{%k3}{z} -+ vpaddq $D1,$H1,${H1}{%k3}{z} -+ vpaddq $D2,$H2,${H2}{%k3}{z} -+___ -+map(s/%z/%y/,($T0,$T1,$T2,$T3,$T4, $PADBIT)); -+map(s/%z/%y/,($H0,$H1,$H2,$H3,$H4, $D0,$D1,$D2,$D3,$D4, $MASK)); -+$code.=<<___; -+ ################################################################ -+ # lazy reduction (interleaved with input splat) -+ -+ vpsrlq \$26,$H3,$D3 -+ vpand $MASK,$H3,$H3 -+ vpsrldq \$6,$T0,$T2 # splat input -+ vpsrldq \$6,$T1,$T3 -+ vpunpckhqdq $T1,$T0,$T4 # 4 -+ vpaddq $D3,$H4,$H4 # h3 -> h4 -+ -+ vpsrlq \$26,$H0,$D0 -+ vpand $MASK,$H0,$H0 -+ vpunpcklqdq $T3,$T2,$T2 # 2:3 -+ vpunpcklqdq $T1,$T0,$T0 # 0:1 -+ vpaddq $D0,$H1,$H1 # h0 -> h1 -+ -+ vpsrlq \$26,$H4,$D4 -+ vpand $MASK,$H4,$H4 -+ -+ vpsrlq \$26,$H1,$D1 -+ vpand $MASK,$H1,$H1 -+ vpsrlq \$30,$T2,$T3 -+ vpsrlq \$4,$T2,$T2 -+ vpaddq $D1,$H2,$H2 # h1 -> h2 -+ -+ vpaddq $D4,$H0,$H0 -+ vpsllq \$2,$D4,$D4 -+ vpsrlq \$26,$T0,$T1 -+ vpsrlq \$40,$T4,$T4 # 4 -+ vpaddq $D4,$H0,$H0 # h4 -> h0 -+ -+ vpsrlq \$26,$H2,$D2 -+ vpand $MASK,$H2,$H2 -+ vpand $MASK,$T2,$T2 # 2 -+ vpand $MASK,$T0,$T0 # 0 -+ vpaddq $D2,$H3,$H3 # h2 -> h3 -+ -+ vpsrlq \$26,$H0,$D0 -+ vpand $MASK,$H0,$H0 -+ vpaddq $H2,$T2,$H2 # accumulate input for .Ltail_avx2 -+ vpand $MASK,$T1,$T1 # 1 -+ vpaddq $D0,$H1,$H1 # h0 -> h1 -+ -+ vpsrlq \$26,$H3,$D3 -+ vpand $MASK,$H3,$H3 -+ vpand $MASK,$T3,$T3 # 3 -+ vpor 32(%rcx),$T4,$T4 # padbit, yes, always -+ vpaddq $D3,$H4,$H4 # h3 -> h4 -+ -+ lea 0x90(%rsp),%rax # size optimization for .Ltail_avx2 -+ add \$64,$len -+ jnz .Ltail_avx2$suffix -+ -+ vpsubq $T2,$H2,$H2 # undo input accumulation -+ vmovd %x#$H0,`4*0-48-64`($ctx)# save partially reduced -+ vmovd %x#$H1,`4*1-48-64`($ctx) -+ vmovd %x#$H2,`4*2-48-64`($ctx) -+ vmovd %x#$H3,`4*3-48-64`($ctx) -+ vmovd %x#$H4,`4*4-48-64`($ctx) -+ vzeroall -+___ -+$code.=<<___ if ($win64); -+ movdqa -0xb0(%r10),%xmm6 -+ movdqa -0xa0(%r10),%xmm7 -+ movdqa -0x90(%r10),%xmm8 -+ movdqa -0x80(%r10),%xmm9 -+ movdqa -0x70(%r10),%xmm10 -+ movdqa -0x60(%r10),%xmm11 -+ movdqa -0x50(%r10),%xmm12 -+ movdqa -0x40(%r10),%xmm13 -+ movdqa -0x30(%r10),%xmm14 -+ movdqa -0x20(%r10),%xmm15 -+ lea -8(%r10),%rsp -+.Ldo_avx512_epilogue: -+___ -+$code.=<<___ if (!$win64); -+ lea -8(%r10),%rsp -+.cfi_def_cfa_register %rsp -+___ -+$code.=<<___; -+ ret -+.cfi_endproc -+___ -+ -+} -+ -+} -+ -+&declare_function("poly1305_blocks_avx2", 32, 4); -+poly1305_blocks_avxN(0); -+&end_function("poly1305_blocks_avx2"); -+ -+if($kernel) { -+ $code .= "#endif\n"; -+} -+ -+####################################################################### -+if ($avx>2) { -+# On entry we have input length divisible by 64. But since inner loop -+# processes 128 bytes per iteration, cases when length is not divisible -+# by 128 are handled by passing tail 64 bytes to .Ltail_avx2. For this -+# reason stack layout is kept identical to poly1305_blocks_avx2. If not -+# for this tail, we wouldn't have to even allocate stack frame... -+ -+if($kernel) { -+ $code .= "#ifdef CONFIG_AS_AVX512\n"; -+} -+ -+&declare_function("poly1305_blocks_avx512", 32, 4); -+poly1305_blocks_avxN(1); -+&end_function("poly1305_blocks_avx512"); -+ -+if ($kernel) { -+ $code .= "#endif\n"; -+} -+ -+if (!$kernel && $avx>3) { -+######################################################################## -+# VPMADD52 version using 2^44 radix. -+# -+# One can argue that base 2^52 would be more natural. Well, even though -+# some operations would be more natural, one has to recognize couple of -+# things. Base 2^52 doesn't provide advantage over base 2^44 if you look -+# at amount of multiply-n-accumulate operations. Secondly, it makes it -+# impossible to pre-compute multiples of 5 [referred to as s[]/sN in -+# reference implementations], which means that more such operations -+# would have to be performed in inner loop, which in turn makes critical -+# path longer. In other words, even though base 2^44 reduction might -+# look less elegant, overall critical path is actually shorter... -+ -+######################################################################## -+# Layout of opaque area is following. -+# -+# unsigned __int64 h[3]; # current hash value base 2^44 -+# unsigned __int64 s[2]; # key value*20 base 2^44 -+# unsigned __int64 r[3]; # key value base 2^44 -+# struct { unsigned __int64 r^1, r^3, r^2, r^4; } R[4]; -+# # r^n positions reflect -+# # placement in register, not -+# # memory, R[3] is R[1]*20 -+ -+$code.=<<___; -+.type poly1305_init_base2_44,\@function,3 -+.align 32 -+poly1305_init_base2_44: -+ xor %rax,%rax -+ mov %rax,0($ctx) # initialize hash value -+ mov %rax,8($ctx) -+ mov %rax,16($ctx) -+ -+.Linit_base2_44: -+ lea poly1305_blocks_vpmadd52(%rip),%r10 -+ lea poly1305_emit_base2_44(%rip),%r11 -+ -+ mov \$0x0ffffffc0fffffff,%rax -+ mov \$0x0ffffffc0ffffffc,%rcx -+ and 0($inp),%rax -+ mov \$0x00000fffffffffff,%r8 -+ and 8($inp),%rcx -+ mov \$0x00000fffffffffff,%r9 -+ and %rax,%r8 -+ shrd \$44,%rcx,%rax -+ mov %r8,40($ctx) # r0 -+ and %r9,%rax -+ shr \$24,%rcx -+ mov %rax,48($ctx) # r1 -+ lea (%rax,%rax,4),%rax # *5 -+ mov %rcx,56($ctx) # r2 -+ shl \$2,%rax # magic <<2 -+ lea (%rcx,%rcx,4),%rcx # *5 -+ shl \$2,%rcx # magic <<2 -+ mov %rax,24($ctx) # s1 -+ mov %rcx,32($ctx) # s2 -+ movq \$-1,64($ctx) # write impossible value -+___ -+$code.=<<___ if ($flavour !~ /elf32/); -+ mov %r10,0(%rdx) -+ mov %r11,8(%rdx) -+___ -+$code.=<<___ if ($flavour =~ /elf32/); -+ mov %r10d,0(%rdx) -+ mov %r11d,4(%rdx) -+___ -+$code.=<<___; -+ mov \$1,%eax -+ ret -+.size poly1305_init_base2_44,.-poly1305_init_base2_44 -+___ -+{ -+my ($H0,$H1,$H2,$r2r1r0,$r1r0s2,$r0s2s1,$Dlo,$Dhi) = map("%ymm$_",(0..5,16,17)); -+my ($T0,$inp_permd,$inp_shift,$PAD) = map("%ymm$_",(18..21)); -+my ($reduc_mask,$reduc_rght,$reduc_left) = map("%ymm$_",(22..25)); -+ -+$code.=<<___; -+.type poly1305_blocks_vpmadd52,\@function,4 -+.align 32 -+poly1305_blocks_vpmadd52: -+ shr \$4,$len -+ jz .Lno_data_vpmadd52 # too short -+ -+ shl \$40,$padbit -+ mov 64($ctx),%r8 # peek on power of the key -+ -+ # if powers of the key are not calculated yet, process up to 3 -+ # blocks with this single-block subroutine, otherwise ensure that -+ # length is divisible by 2 blocks and pass the rest down to next -+ # subroutine... -+ -+ mov \$3,%rax -+ mov \$1,%r10 -+ cmp \$4,$len # is input long -+ cmovae %r10,%rax -+ test %r8,%r8 # is power value impossible? -+ cmovns %r10,%rax -+ -+ and $len,%rax # is input of favourable length? -+ jz .Lblocks_vpmadd52_4x -+ -+ sub %rax,$len -+ mov \$7,%r10d -+ mov \$1,%r11d -+ kmovw %r10d,%k7 -+ lea .L2_44_inp_permd(%rip),%r10 -+ kmovw %r11d,%k1 -+ -+ vmovq $padbit,%x#$PAD -+ vmovdqa64 0(%r10),$inp_permd # .L2_44_inp_permd -+ vmovdqa64 32(%r10),$inp_shift # .L2_44_inp_shift -+ vpermq \$0xcf,$PAD,$PAD -+ vmovdqa64 64(%r10),$reduc_mask # .L2_44_mask -+ -+ vmovdqu64 0($ctx),${Dlo}{%k7}{z} # load hash value -+ vmovdqu64 40($ctx),${r2r1r0}{%k7}{z} # load keys -+ vmovdqu64 32($ctx),${r1r0s2}{%k7}{z} -+ vmovdqu64 24($ctx),${r0s2s1}{%k7}{z} -+ -+ vmovdqa64 96(%r10),$reduc_rght # .L2_44_shift_rgt -+ vmovdqa64 128(%r10),$reduc_left # .L2_44_shift_lft -+ -+ jmp .Loop_vpmadd52 -+ -+.align 32 -+.Loop_vpmadd52: -+ vmovdqu32 0($inp),%x#$T0 # load input as ----3210 -+ lea 16($inp),$inp -+ -+ vpermd $T0,$inp_permd,$T0 # ----3210 -> --322110 -+ vpsrlvq $inp_shift,$T0,$T0 -+ vpandq $reduc_mask,$T0,$T0 -+ vporq $PAD,$T0,$T0 -+ -+ vpaddq $T0,$Dlo,$Dlo # accumulate input -+ -+ vpermq \$0,$Dlo,${H0}{%k7}{z} # smash hash value -+ vpermq \$0b01010101,$Dlo,${H1}{%k7}{z} -+ vpermq \$0b10101010,$Dlo,${H2}{%k7}{z} -+ -+ vpxord $Dlo,$Dlo,$Dlo -+ vpxord $Dhi,$Dhi,$Dhi -+ -+ vpmadd52luq $r2r1r0,$H0,$Dlo -+ vpmadd52huq $r2r1r0,$H0,$Dhi -+ -+ vpmadd52luq $r1r0s2,$H1,$Dlo -+ vpmadd52huq $r1r0s2,$H1,$Dhi -+ -+ vpmadd52luq $r0s2s1,$H2,$Dlo -+ vpmadd52huq $r0s2s1,$H2,$Dhi -+ -+ vpsrlvq $reduc_rght,$Dlo,$T0 # 0 in topmost qword -+ vpsllvq $reduc_left,$Dhi,$Dhi # 0 in topmost qword -+ vpandq $reduc_mask,$Dlo,$Dlo -+ -+ vpaddq $T0,$Dhi,$Dhi -+ -+ vpermq \$0b10010011,$Dhi,$Dhi # 0 in lowest qword -+ -+ vpaddq $Dhi,$Dlo,$Dlo # note topmost qword :-) -+ -+ vpsrlvq $reduc_rght,$Dlo,$T0 # 0 in topmost word -+ vpandq $reduc_mask,$Dlo,$Dlo -+ -+ vpermq \$0b10010011,$T0,$T0 -+ -+ vpaddq $T0,$Dlo,$Dlo -+ -+ vpermq \$0b10010011,$Dlo,${T0}{%k1}{z} -+ -+ vpaddq $T0,$Dlo,$Dlo -+ vpsllq \$2,$T0,$T0 -+ -+ vpaddq $T0,$Dlo,$Dlo -+ -+ dec %rax # len-=16 -+ jnz .Loop_vpmadd52 -+ -+ vmovdqu64 $Dlo,0($ctx){%k7} # store hash value -+ -+ test $len,$len -+ jnz .Lblocks_vpmadd52_4x -+ -+.Lno_data_vpmadd52: -+ ret -+.size poly1305_blocks_vpmadd52,.-poly1305_blocks_vpmadd52 -+___ -+} -+{ -+######################################################################## -+# As implied by its name 4x subroutine processes 4 blocks in parallel -+# (but handles even 4*n+2 blocks lengths). It takes up to 4th key power -+# and is handled in 256-bit %ymm registers. -+ -+my ($H0,$H1,$H2,$R0,$R1,$R2,$S1,$S2) = map("%ymm$_",(0..5,16,17)); -+my ($D0lo,$D0hi,$D1lo,$D1hi,$D2lo,$D2hi) = map("%ymm$_",(18..23)); -+my ($T0,$T1,$T2,$T3,$mask44,$mask42,$tmp,$PAD) = map("%ymm$_",(24..31)); -+ -+$code.=<<___; -+.type poly1305_blocks_vpmadd52_4x,\@function,4 -+.align 32 -+poly1305_blocks_vpmadd52_4x: -+ shr \$4,$len -+ jz .Lno_data_vpmadd52_4x # too short -+ -+ shl \$40,$padbit -+ mov 64($ctx),%r8 # peek on power of the key -+ -+.Lblocks_vpmadd52_4x: -+ vpbroadcastq $padbit,$PAD -+ -+ vmovdqa64 .Lx_mask44(%rip),$mask44 -+ mov \$5,%eax -+ vmovdqa64 .Lx_mask42(%rip),$mask42 -+ kmovw %eax,%k1 # used in 2x path -+ -+ test %r8,%r8 # is power value impossible? -+ js .Linit_vpmadd52 # if it is, then init R[4] -+ -+ vmovq 0($ctx),%x#$H0 # load current hash value -+ vmovq 8($ctx),%x#$H1 -+ vmovq 16($ctx),%x#$H2 -+ -+ test \$3,$len # is length 4*n+2? -+ jnz .Lblocks_vpmadd52_2x_do -+ -+.Lblocks_vpmadd52_4x_do: -+ vpbroadcastq 64($ctx),$R0 # load 4th power of the key -+ vpbroadcastq 96($ctx),$R1 -+ vpbroadcastq 128($ctx),$R2 -+ vpbroadcastq 160($ctx),$S1 -+ -+.Lblocks_vpmadd52_4x_key_loaded: -+ vpsllq \$2,$R2,$S2 # S2 = R2*5*4 -+ vpaddq $R2,$S2,$S2 -+ vpsllq \$2,$S2,$S2 -+ -+ test \$7,$len # is len 8*n? -+ jz .Lblocks_vpmadd52_8x -+ -+ vmovdqu64 16*0($inp),$T2 # load data -+ vmovdqu64 16*2($inp),$T3 -+ lea 16*4($inp),$inp -+ -+ vpunpcklqdq $T3,$T2,$T1 # transpose data -+ vpunpckhqdq $T3,$T2,$T3 -+ -+ # at this point 64-bit lanes are ordered as 3-1-2-0 -+ -+ vpsrlq \$24,$T3,$T2 # splat the data -+ vporq $PAD,$T2,$T2 -+ vpaddq $T2,$H2,$H2 # accumulate input -+ vpandq $mask44,$T1,$T0 -+ vpsrlq \$44,$T1,$T1 -+ vpsllq \$20,$T3,$T3 -+ vporq $T3,$T1,$T1 -+ vpandq $mask44,$T1,$T1 -+ -+ sub \$4,$len -+ jz .Ltail_vpmadd52_4x -+ jmp .Loop_vpmadd52_4x -+ ud2 -+ -+.align 32 -+.Linit_vpmadd52: -+ vmovq 24($ctx),%x#$S1 # load key -+ vmovq 56($ctx),%x#$H2 -+ vmovq 32($ctx),%x#$S2 -+ vmovq 40($ctx),%x#$R0 -+ vmovq 48($ctx),%x#$R1 -+ -+ vmovdqa $R0,$H0 -+ vmovdqa $R1,$H1 -+ vmovdqa $H2,$R2 -+ -+ mov \$2,%eax -+ -+.Lmul_init_vpmadd52: -+ vpxorq $D0lo,$D0lo,$D0lo -+ vpmadd52luq $H2,$S1,$D0lo -+ vpxorq $D0hi,$D0hi,$D0hi -+ vpmadd52huq $H2,$S1,$D0hi -+ vpxorq $D1lo,$D1lo,$D1lo -+ vpmadd52luq $H2,$S2,$D1lo -+ vpxorq $D1hi,$D1hi,$D1hi -+ vpmadd52huq $H2,$S2,$D1hi -+ vpxorq $D2lo,$D2lo,$D2lo -+ vpmadd52luq $H2,$R0,$D2lo -+ vpxorq $D2hi,$D2hi,$D2hi -+ vpmadd52huq $H2,$R0,$D2hi -+ -+ vpmadd52luq $H0,$R0,$D0lo -+ vpmadd52huq $H0,$R0,$D0hi -+ vpmadd52luq $H0,$R1,$D1lo -+ vpmadd52huq $H0,$R1,$D1hi -+ vpmadd52luq $H0,$R2,$D2lo -+ vpmadd52huq $H0,$R2,$D2hi -+ -+ vpmadd52luq $H1,$S2,$D0lo -+ vpmadd52huq $H1,$S2,$D0hi -+ vpmadd52luq $H1,$R0,$D1lo -+ vpmadd52huq $H1,$R0,$D1hi -+ vpmadd52luq $H1,$R1,$D2lo -+ vpmadd52huq $H1,$R1,$D2hi -+ -+ ################################################################ -+ # partial reduction -+ vpsrlq \$44,$D0lo,$tmp -+ vpsllq \$8,$D0hi,$D0hi -+ vpandq $mask44,$D0lo,$H0 -+ vpaddq $tmp,$D0hi,$D0hi -+ -+ vpaddq $D0hi,$D1lo,$D1lo -+ -+ vpsrlq \$44,$D1lo,$tmp -+ vpsllq \$8,$D1hi,$D1hi -+ vpandq $mask44,$D1lo,$H1 -+ vpaddq $tmp,$D1hi,$D1hi -+ -+ vpaddq $D1hi,$D2lo,$D2lo -+ -+ vpsrlq \$42,$D2lo,$tmp -+ vpsllq \$10,$D2hi,$D2hi -+ vpandq $mask42,$D2lo,$H2 -+ vpaddq $tmp,$D2hi,$D2hi -+ -+ vpaddq $D2hi,$H0,$H0 -+ vpsllq \$2,$D2hi,$D2hi -+ -+ vpaddq $D2hi,$H0,$H0 -+ -+ vpsrlq \$44,$H0,$tmp # additional step -+ vpandq $mask44,$H0,$H0 -+ -+ vpaddq $tmp,$H1,$H1 -+ -+ dec %eax -+ jz .Ldone_init_vpmadd52 -+ -+ vpunpcklqdq $R1,$H1,$R1 # 1,2 -+ vpbroadcastq %x#$H1,%x#$H1 # 2,2 -+ vpunpcklqdq $R2,$H2,$R2 -+ vpbroadcastq %x#$H2,%x#$H2 -+ vpunpcklqdq $R0,$H0,$R0 -+ vpbroadcastq %x#$H0,%x#$H0 -+ -+ vpsllq \$2,$R1,$S1 # S1 = R1*5*4 -+ vpsllq \$2,$R2,$S2 # S2 = R2*5*4 -+ vpaddq $R1,$S1,$S1 -+ vpaddq $R2,$S2,$S2 -+ vpsllq \$2,$S1,$S1 -+ vpsllq \$2,$S2,$S2 -+ -+ jmp .Lmul_init_vpmadd52 -+ ud2 -+ -+.align 32 -+.Ldone_init_vpmadd52: -+ vinserti128 \$1,%x#$R1,$H1,$R1 # 1,2,3,4 -+ vinserti128 \$1,%x#$R2,$H2,$R2 -+ vinserti128 \$1,%x#$R0,$H0,$R0 -+ -+ vpermq \$0b11011000,$R1,$R1 # 1,3,2,4 -+ vpermq \$0b11011000,$R2,$R2 -+ vpermq \$0b11011000,$R0,$R0 -+ -+ vpsllq \$2,$R1,$S1 # S1 = R1*5*4 -+ vpaddq $R1,$S1,$S1 -+ vpsllq \$2,$S1,$S1 -+ -+ vmovq 0($ctx),%x#$H0 # load current hash value -+ vmovq 8($ctx),%x#$H1 -+ vmovq 16($ctx),%x#$H2 -+ -+ test \$3,$len # is length 4*n+2? -+ jnz .Ldone_init_vpmadd52_2x -+ -+ vmovdqu64 $R0,64($ctx) # save key powers -+ vpbroadcastq %x#$R0,$R0 # broadcast 4th power -+ vmovdqu64 $R1,96($ctx) -+ vpbroadcastq %x#$R1,$R1 -+ vmovdqu64 $R2,128($ctx) -+ vpbroadcastq %x#$R2,$R2 -+ vmovdqu64 $S1,160($ctx) -+ vpbroadcastq %x#$S1,$S1 -+ -+ jmp .Lblocks_vpmadd52_4x_key_loaded -+ ud2 -+ -+.align 32 -+.Ldone_init_vpmadd52_2x: -+ vmovdqu64 $R0,64($ctx) # save key powers -+ vpsrldq \$8,$R0,$R0 # 0-1-0-2 -+ vmovdqu64 $R1,96($ctx) -+ vpsrldq \$8,$R1,$R1 -+ vmovdqu64 $R2,128($ctx) -+ vpsrldq \$8,$R2,$R2 -+ vmovdqu64 $S1,160($ctx) -+ vpsrldq \$8,$S1,$S1 -+ jmp .Lblocks_vpmadd52_2x_key_loaded -+ ud2 -+ -+.align 32 -+.Lblocks_vpmadd52_2x_do: -+ vmovdqu64 128+8($ctx),${R2}{%k1}{z}# load 2nd and 1st key powers -+ vmovdqu64 160+8($ctx),${S1}{%k1}{z} -+ vmovdqu64 64+8($ctx),${R0}{%k1}{z} -+ vmovdqu64 96+8($ctx),${R1}{%k1}{z} -+ -+.Lblocks_vpmadd52_2x_key_loaded: -+ vmovdqu64 16*0($inp),$T2 # load data -+ vpxorq $T3,$T3,$T3 -+ lea 16*2($inp),$inp -+ -+ vpunpcklqdq $T3,$T2,$T1 # transpose data -+ vpunpckhqdq $T3,$T2,$T3 -+ -+ # at this point 64-bit lanes are ordered as x-1-x-0 -+ -+ vpsrlq \$24,$T3,$T2 # splat the data -+ vporq $PAD,$T2,$T2 -+ vpaddq $T2,$H2,$H2 # accumulate input -+ vpandq $mask44,$T1,$T0 -+ vpsrlq \$44,$T1,$T1 -+ vpsllq \$20,$T3,$T3 -+ vporq $T3,$T1,$T1 -+ vpandq $mask44,$T1,$T1 -+ -+ jmp .Ltail_vpmadd52_2x -+ ud2 -+ -+.align 32 -+.Loop_vpmadd52_4x: -+ #vpaddq $T2,$H2,$H2 # accumulate input -+ vpaddq $T0,$H0,$H0 -+ vpaddq $T1,$H1,$H1 -+ -+ vpxorq $D0lo,$D0lo,$D0lo -+ vpmadd52luq $H2,$S1,$D0lo -+ vpxorq $D0hi,$D0hi,$D0hi -+ vpmadd52huq $H2,$S1,$D0hi -+ vpxorq $D1lo,$D1lo,$D1lo -+ vpmadd52luq $H2,$S2,$D1lo -+ vpxorq $D1hi,$D1hi,$D1hi -+ vpmadd52huq $H2,$S2,$D1hi -+ vpxorq $D2lo,$D2lo,$D2lo -+ vpmadd52luq $H2,$R0,$D2lo -+ vpxorq $D2hi,$D2hi,$D2hi -+ vpmadd52huq $H2,$R0,$D2hi -+ -+ vmovdqu64 16*0($inp),$T2 # load data -+ vmovdqu64 16*2($inp),$T3 -+ lea 16*4($inp),$inp -+ vpmadd52luq $H0,$R0,$D0lo -+ vpmadd52huq $H0,$R0,$D0hi -+ vpmadd52luq $H0,$R1,$D1lo -+ vpmadd52huq $H0,$R1,$D1hi -+ vpmadd52luq $H0,$R2,$D2lo -+ vpmadd52huq $H0,$R2,$D2hi -+ -+ vpunpcklqdq $T3,$T2,$T1 # transpose data -+ vpunpckhqdq $T3,$T2,$T3 -+ vpmadd52luq $H1,$S2,$D0lo -+ vpmadd52huq $H1,$S2,$D0hi -+ vpmadd52luq $H1,$R0,$D1lo -+ vpmadd52huq $H1,$R0,$D1hi -+ vpmadd52luq $H1,$R1,$D2lo -+ vpmadd52huq $H1,$R1,$D2hi -+ -+ ################################################################ -+ # partial reduction (interleaved with data splat) -+ vpsrlq \$44,$D0lo,$tmp -+ vpsllq \$8,$D0hi,$D0hi -+ vpandq $mask44,$D0lo,$H0 -+ vpaddq $tmp,$D0hi,$D0hi -+ -+ vpsrlq \$24,$T3,$T2 -+ vporq $PAD,$T2,$T2 -+ vpaddq $D0hi,$D1lo,$D1lo -+ -+ vpsrlq \$44,$D1lo,$tmp -+ vpsllq \$8,$D1hi,$D1hi -+ vpandq $mask44,$D1lo,$H1 -+ vpaddq $tmp,$D1hi,$D1hi -+ -+ vpandq $mask44,$T1,$T0 -+ vpsrlq \$44,$T1,$T1 -+ vpsllq \$20,$T3,$T3 -+ vpaddq $D1hi,$D2lo,$D2lo -+ -+ vpsrlq \$42,$D2lo,$tmp -+ vpsllq \$10,$D2hi,$D2hi -+ vpandq $mask42,$D2lo,$H2 -+ vpaddq $tmp,$D2hi,$D2hi -+ -+ vpaddq $T2,$H2,$H2 # accumulate input -+ vpaddq $D2hi,$H0,$H0 -+ vpsllq \$2,$D2hi,$D2hi -+ -+ vpaddq $D2hi,$H0,$H0 -+ vporq $T3,$T1,$T1 -+ vpandq $mask44,$T1,$T1 -+ -+ vpsrlq \$44,$H0,$tmp # additional step -+ vpandq $mask44,$H0,$H0 -+ -+ vpaddq $tmp,$H1,$H1 -+ -+ sub \$4,$len # len-=64 -+ jnz .Loop_vpmadd52_4x -+ -+.Ltail_vpmadd52_4x: -+ vmovdqu64 128($ctx),$R2 # load all key powers -+ vmovdqu64 160($ctx),$S1 -+ vmovdqu64 64($ctx),$R0 -+ vmovdqu64 96($ctx),$R1 -+ -+.Ltail_vpmadd52_2x: -+ vpsllq \$2,$R2,$S2 # S2 = R2*5*4 -+ vpaddq $R2,$S2,$S2 -+ vpsllq \$2,$S2,$S2 -+ -+ #vpaddq $T2,$H2,$H2 # accumulate input -+ vpaddq $T0,$H0,$H0 -+ vpaddq $T1,$H1,$H1 -+ -+ vpxorq $D0lo,$D0lo,$D0lo -+ vpmadd52luq $H2,$S1,$D0lo -+ vpxorq $D0hi,$D0hi,$D0hi -+ vpmadd52huq $H2,$S1,$D0hi -+ vpxorq $D1lo,$D1lo,$D1lo -+ vpmadd52luq $H2,$S2,$D1lo -+ vpxorq $D1hi,$D1hi,$D1hi -+ vpmadd52huq $H2,$S2,$D1hi -+ vpxorq $D2lo,$D2lo,$D2lo -+ vpmadd52luq $H2,$R0,$D2lo -+ vpxorq $D2hi,$D2hi,$D2hi -+ vpmadd52huq $H2,$R0,$D2hi -+ -+ vpmadd52luq $H0,$R0,$D0lo -+ vpmadd52huq $H0,$R0,$D0hi -+ vpmadd52luq $H0,$R1,$D1lo -+ vpmadd52huq $H0,$R1,$D1hi -+ vpmadd52luq $H0,$R2,$D2lo -+ vpmadd52huq $H0,$R2,$D2hi -+ -+ vpmadd52luq $H1,$S2,$D0lo -+ vpmadd52huq $H1,$S2,$D0hi -+ vpmadd52luq $H1,$R0,$D1lo -+ vpmadd52huq $H1,$R0,$D1hi -+ vpmadd52luq $H1,$R1,$D2lo -+ vpmadd52huq $H1,$R1,$D2hi -+ -+ ################################################################ -+ # horizontal addition -+ -+ mov \$1,%eax -+ kmovw %eax,%k1 -+ vpsrldq \$8,$D0lo,$T0 -+ vpsrldq \$8,$D0hi,$H0 -+ vpsrldq \$8,$D1lo,$T1 -+ vpsrldq \$8,$D1hi,$H1 -+ vpaddq $T0,$D0lo,$D0lo -+ vpaddq $H0,$D0hi,$D0hi -+ vpsrldq \$8,$D2lo,$T2 -+ vpsrldq \$8,$D2hi,$H2 -+ vpaddq $T1,$D1lo,$D1lo -+ vpaddq $H1,$D1hi,$D1hi -+ vpermq \$0x2,$D0lo,$T0 -+ vpermq \$0x2,$D0hi,$H0 -+ vpaddq $T2,$D2lo,$D2lo -+ vpaddq $H2,$D2hi,$D2hi -+ -+ vpermq \$0x2,$D1lo,$T1 -+ vpermq \$0x2,$D1hi,$H1 -+ vpaddq $T0,$D0lo,${D0lo}{%k1}{z} -+ vpaddq $H0,$D0hi,${D0hi}{%k1}{z} -+ vpermq \$0x2,$D2lo,$T2 -+ vpermq \$0x2,$D2hi,$H2 -+ vpaddq $T1,$D1lo,${D1lo}{%k1}{z} -+ vpaddq $H1,$D1hi,${D1hi}{%k1}{z} -+ vpaddq $T2,$D2lo,${D2lo}{%k1}{z} -+ vpaddq $H2,$D2hi,${D2hi}{%k1}{z} -+ -+ ################################################################ -+ # partial reduction -+ vpsrlq \$44,$D0lo,$tmp -+ vpsllq \$8,$D0hi,$D0hi -+ vpandq $mask44,$D0lo,$H0 -+ vpaddq $tmp,$D0hi,$D0hi -+ -+ vpaddq $D0hi,$D1lo,$D1lo -+ -+ vpsrlq \$44,$D1lo,$tmp -+ vpsllq \$8,$D1hi,$D1hi -+ vpandq $mask44,$D1lo,$H1 -+ vpaddq $tmp,$D1hi,$D1hi -+ -+ vpaddq $D1hi,$D2lo,$D2lo -+ -+ vpsrlq \$42,$D2lo,$tmp -+ vpsllq \$10,$D2hi,$D2hi -+ vpandq $mask42,$D2lo,$H2 -+ vpaddq $tmp,$D2hi,$D2hi -+ -+ vpaddq $D2hi,$H0,$H0 -+ vpsllq \$2,$D2hi,$D2hi -+ -+ vpaddq $D2hi,$H0,$H0 -+ -+ vpsrlq \$44,$H0,$tmp # additional step -+ vpandq $mask44,$H0,$H0 -+ -+ vpaddq $tmp,$H1,$H1 -+ # at this point $len is -+ # either 4*n+2 or 0... -+ sub \$2,$len # len-=32 -+ ja .Lblocks_vpmadd52_4x_do -+ -+ vmovq %x#$H0,0($ctx) -+ vmovq %x#$H1,8($ctx) -+ vmovq %x#$H2,16($ctx) -+ vzeroall -+ -+.Lno_data_vpmadd52_4x: -+ ret -+.size poly1305_blocks_vpmadd52_4x,.-poly1305_blocks_vpmadd52_4x -+___ -+} -+{ -+######################################################################## -+# As implied by its name 8x subroutine processes 8 blocks in parallel... -+# This is intermediate version, as it's used only in cases when input -+# length is either 8*n, 8*n+1 or 8*n+2... -+ -+my ($H0,$H1,$H2,$R0,$R1,$R2,$S1,$S2) = map("%ymm$_",(0..5,16,17)); -+my ($D0lo,$D0hi,$D1lo,$D1hi,$D2lo,$D2hi) = map("%ymm$_",(18..23)); -+my ($T0,$T1,$T2,$T3,$mask44,$mask42,$tmp,$PAD) = map("%ymm$_",(24..31)); -+my ($RR0,$RR1,$RR2,$SS1,$SS2) = map("%ymm$_",(6..10)); -+ -+$code.=<<___; -+.type poly1305_blocks_vpmadd52_8x,\@function,4 -+.align 32 -+poly1305_blocks_vpmadd52_8x: -+ shr \$4,$len -+ jz .Lno_data_vpmadd52_8x # too short -+ -+ shl \$40,$padbit -+ mov 64($ctx),%r8 # peek on power of the key -+ -+ vmovdqa64 .Lx_mask44(%rip),$mask44 -+ vmovdqa64 .Lx_mask42(%rip),$mask42 -+ -+ test %r8,%r8 # is power value impossible? -+ js .Linit_vpmadd52 # if it is, then init R[4] -+ -+ vmovq 0($ctx),%x#$H0 # load current hash value -+ vmovq 8($ctx),%x#$H1 -+ vmovq 16($ctx),%x#$H2 -+ -+.Lblocks_vpmadd52_8x: -+ ################################################################ -+ # fist we calculate more key powers -+ -+ vmovdqu64 128($ctx),$R2 # load 1-3-2-4 powers -+ vmovdqu64 160($ctx),$S1 -+ vmovdqu64 64($ctx),$R0 -+ vmovdqu64 96($ctx),$R1 -+ -+ vpsllq \$2,$R2,$S2 # S2 = R2*5*4 -+ vpaddq $R2,$S2,$S2 -+ vpsllq \$2,$S2,$S2 -+ -+ vpbroadcastq %x#$R2,$RR2 # broadcast 4th power -+ vpbroadcastq %x#$R0,$RR0 -+ vpbroadcastq %x#$R1,$RR1 -+ -+ vpxorq $D0lo,$D0lo,$D0lo -+ vpmadd52luq $RR2,$S1,$D0lo -+ vpxorq $D0hi,$D0hi,$D0hi -+ vpmadd52huq $RR2,$S1,$D0hi -+ vpxorq $D1lo,$D1lo,$D1lo -+ vpmadd52luq $RR2,$S2,$D1lo -+ vpxorq $D1hi,$D1hi,$D1hi -+ vpmadd52huq $RR2,$S2,$D1hi -+ vpxorq $D2lo,$D2lo,$D2lo -+ vpmadd52luq $RR2,$R0,$D2lo -+ vpxorq $D2hi,$D2hi,$D2hi -+ vpmadd52huq $RR2,$R0,$D2hi -+ -+ vpmadd52luq $RR0,$R0,$D0lo -+ vpmadd52huq $RR0,$R0,$D0hi -+ vpmadd52luq $RR0,$R1,$D1lo -+ vpmadd52huq $RR0,$R1,$D1hi -+ vpmadd52luq $RR0,$R2,$D2lo -+ vpmadd52huq $RR0,$R2,$D2hi -+ -+ vpmadd52luq $RR1,$S2,$D0lo -+ vpmadd52huq $RR1,$S2,$D0hi -+ vpmadd52luq $RR1,$R0,$D1lo -+ vpmadd52huq $RR1,$R0,$D1hi -+ vpmadd52luq $RR1,$R1,$D2lo -+ vpmadd52huq $RR1,$R1,$D2hi -+ -+ ################################################################ -+ # partial reduction -+ vpsrlq \$44,$D0lo,$tmp -+ vpsllq \$8,$D0hi,$D0hi -+ vpandq $mask44,$D0lo,$RR0 -+ vpaddq $tmp,$D0hi,$D0hi -+ -+ vpaddq $D0hi,$D1lo,$D1lo -+ -+ vpsrlq \$44,$D1lo,$tmp -+ vpsllq \$8,$D1hi,$D1hi -+ vpandq $mask44,$D1lo,$RR1 -+ vpaddq $tmp,$D1hi,$D1hi -+ -+ vpaddq $D1hi,$D2lo,$D2lo -+ -+ vpsrlq \$42,$D2lo,$tmp -+ vpsllq \$10,$D2hi,$D2hi -+ vpandq $mask42,$D2lo,$RR2 -+ vpaddq $tmp,$D2hi,$D2hi -+ -+ vpaddq $D2hi,$RR0,$RR0 -+ vpsllq \$2,$D2hi,$D2hi -+ -+ vpaddq $D2hi,$RR0,$RR0 -+ -+ vpsrlq \$44,$RR0,$tmp # additional step -+ vpandq $mask44,$RR0,$RR0 -+ -+ vpaddq $tmp,$RR1,$RR1 -+ -+ ################################################################ -+ # At this point Rx holds 1324 powers, RRx - 5768, and the goal -+ # is 15263748, which reflects how data is loaded... -+ -+ vpunpcklqdq $R2,$RR2,$T2 # 3748 -+ vpunpckhqdq $R2,$RR2,$R2 # 1526 -+ vpunpcklqdq $R0,$RR0,$T0 -+ vpunpckhqdq $R0,$RR0,$R0 -+ vpunpcklqdq $R1,$RR1,$T1 -+ vpunpckhqdq $R1,$RR1,$R1 -+___ -+######## switch to %zmm -+map(s/%y/%z/, $H0,$H1,$H2,$R0,$R1,$R2,$S1,$S2); -+map(s/%y/%z/, $D0lo,$D0hi,$D1lo,$D1hi,$D2lo,$D2hi); -+map(s/%y/%z/, $T0,$T1,$T2,$T3,$mask44,$mask42,$tmp,$PAD); -+map(s/%y/%z/, $RR0,$RR1,$RR2,$SS1,$SS2); -+ -+$code.=<<___; -+ vshufi64x2 \$0x44,$R2,$T2,$RR2 # 15263748 -+ vshufi64x2 \$0x44,$R0,$T0,$RR0 -+ vshufi64x2 \$0x44,$R1,$T1,$RR1 -+ -+ vmovdqu64 16*0($inp),$T2 # load data -+ vmovdqu64 16*4($inp),$T3 -+ lea 16*8($inp),$inp -+ -+ vpsllq \$2,$RR2,$SS2 # S2 = R2*5*4 -+ vpsllq \$2,$RR1,$SS1 # S1 = R1*5*4 -+ vpaddq $RR2,$SS2,$SS2 -+ vpaddq $RR1,$SS1,$SS1 -+ vpsllq \$2,$SS2,$SS2 -+ vpsllq \$2,$SS1,$SS1 -+ -+ vpbroadcastq $padbit,$PAD -+ vpbroadcastq %x#$mask44,$mask44 -+ vpbroadcastq %x#$mask42,$mask42 -+ -+ vpbroadcastq %x#$SS1,$S1 # broadcast 8th power -+ vpbroadcastq %x#$SS2,$S2 -+ vpbroadcastq %x#$RR0,$R0 -+ vpbroadcastq %x#$RR1,$R1 -+ vpbroadcastq %x#$RR2,$R2 -+ -+ vpunpcklqdq $T3,$T2,$T1 # transpose data -+ vpunpckhqdq $T3,$T2,$T3 -+ -+ # at this point 64-bit lanes are ordered as 73625140 -+ -+ vpsrlq \$24,$T3,$T2 # splat the data -+ vporq $PAD,$T2,$T2 -+ vpaddq $T2,$H2,$H2 # accumulate input -+ vpandq $mask44,$T1,$T0 -+ vpsrlq \$44,$T1,$T1 -+ vpsllq \$20,$T3,$T3 -+ vporq $T3,$T1,$T1 -+ vpandq $mask44,$T1,$T1 -+ -+ sub \$8,$len -+ jz .Ltail_vpmadd52_8x -+ jmp .Loop_vpmadd52_8x -+ -+.align 32 -+.Loop_vpmadd52_8x: -+ #vpaddq $T2,$H2,$H2 # accumulate input -+ vpaddq $T0,$H0,$H0 -+ vpaddq $T1,$H1,$H1 -+ -+ vpxorq $D0lo,$D0lo,$D0lo -+ vpmadd52luq $H2,$S1,$D0lo -+ vpxorq $D0hi,$D0hi,$D0hi -+ vpmadd52huq $H2,$S1,$D0hi -+ vpxorq $D1lo,$D1lo,$D1lo -+ vpmadd52luq $H2,$S2,$D1lo -+ vpxorq $D1hi,$D1hi,$D1hi -+ vpmadd52huq $H2,$S2,$D1hi -+ vpxorq $D2lo,$D2lo,$D2lo -+ vpmadd52luq $H2,$R0,$D2lo -+ vpxorq $D2hi,$D2hi,$D2hi -+ vpmadd52huq $H2,$R0,$D2hi -+ -+ vmovdqu64 16*0($inp),$T2 # load data -+ vmovdqu64 16*4($inp),$T3 -+ lea 16*8($inp),$inp -+ vpmadd52luq $H0,$R0,$D0lo -+ vpmadd52huq $H0,$R0,$D0hi -+ vpmadd52luq $H0,$R1,$D1lo -+ vpmadd52huq $H0,$R1,$D1hi -+ vpmadd52luq $H0,$R2,$D2lo -+ vpmadd52huq $H0,$R2,$D2hi -+ -+ vpunpcklqdq $T3,$T2,$T1 # transpose data -+ vpunpckhqdq $T3,$T2,$T3 -+ vpmadd52luq $H1,$S2,$D0lo -+ vpmadd52huq $H1,$S2,$D0hi -+ vpmadd52luq $H1,$R0,$D1lo -+ vpmadd52huq $H1,$R0,$D1hi -+ vpmadd52luq $H1,$R1,$D2lo -+ vpmadd52huq $H1,$R1,$D2hi -+ -+ ################################################################ -+ # partial reduction (interleaved with data splat) -+ vpsrlq \$44,$D0lo,$tmp -+ vpsllq \$8,$D0hi,$D0hi -+ vpandq $mask44,$D0lo,$H0 -+ vpaddq $tmp,$D0hi,$D0hi -+ -+ vpsrlq \$24,$T3,$T2 -+ vporq $PAD,$T2,$T2 -+ vpaddq $D0hi,$D1lo,$D1lo -+ -+ vpsrlq \$44,$D1lo,$tmp -+ vpsllq \$8,$D1hi,$D1hi -+ vpandq $mask44,$D1lo,$H1 -+ vpaddq $tmp,$D1hi,$D1hi -+ -+ vpandq $mask44,$T1,$T0 -+ vpsrlq \$44,$T1,$T1 -+ vpsllq \$20,$T3,$T3 -+ vpaddq $D1hi,$D2lo,$D2lo -+ -+ vpsrlq \$42,$D2lo,$tmp -+ vpsllq \$10,$D2hi,$D2hi -+ vpandq $mask42,$D2lo,$H2 -+ vpaddq $tmp,$D2hi,$D2hi -+ -+ vpaddq $T2,$H2,$H2 # accumulate input -+ vpaddq $D2hi,$H0,$H0 -+ vpsllq \$2,$D2hi,$D2hi -+ -+ vpaddq $D2hi,$H0,$H0 -+ vporq $T3,$T1,$T1 -+ vpandq $mask44,$T1,$T1 -+ -+ vpsrlq \$44,$H0,$tmp # additional step -+ vpandq $mask44,$H0,$H0 -+ -+ vpaddq $tmp,$H1,$H1 -+ -+ sub \$8,$len # len-=128 -+ jnz .Loop_vpmadd52_8x -+ -+.Ltail_vpmadd52_8x: -+ #vpaddq $T2,$H2,$H2 # accumulate input -+ vpaddq $T0,$H0,$H0 -+ vpaddq $T1,$H1,$H1 -+ -+ vpxorq $D0lo,$D0lo,$D0lo -+ vpmadd52luq $H2,$SS1,$D0lo -+ vpxorq $D0hi,$D0hi,$D0hi -+ vpmadd52huq $H2,$SS1,$D0hi -+ vpxorq $D1lo,$D1lo,$D1lo -+ vpmadd52luq $H2,$SS2,$D1lo -+ vpxorq $D1hi,$D1hi,$D1hi -+ vpmadd52huq $H2,$SS2,$D1hi -+ vpxorq $D2lo,$D2lo,$D2lo -+ vpmadd52luq $H2,$RR0,$D2lo -+ vpxorq $D2hi,$D2hi,$D2hi -+ vpmadd52huq $H2,$RR0,$D2hi -+ -+ vpmadd52luq $H0,$RR0,$D0lo -+ vpmadd52huq $H0,$RR0,$D0hi -+ vpmadd52luq $H0,$RR1,$D1lo -+ vpmadd52huq $H0,$RR1,$D1hi -+ vpmadd52luq $H0,$RR2,$D2lo -+ vpmadd52huq $H0,$RR2,$D2hi -+ -+ vpmadd52luq $H1,$SS2,$D0lo -+ vpmadd52huq $H1,$SS2,$D0hi -+ vpmadd52luq $H1,$RR0,$D1lo -+ vpmadd52huq $H1,$RR0,$D1hi -+ vpmadd52luq $H1,$RR1,$D2lo -+ vpmadd52huq $H1,$RR1,$D2hi -+ -+ ################################################################ -+ # horizontal addition -+ -+ mov \$1,%eax -+ kmovw %eax,%k1 -+ vpsrldq \$8,$D0lo,$T0 -+ vpsrldq \$8,$D0hi,$H0 -+ vpsrldq \$8,$D1lo,$T1 -+ vpsrldq \$8,$D1hi,$H1 -+ vpaddq $T0,$D0lo,$D0lo -+ vpaddq $H0,$D0hi,$D0hi -+ vpsrldq \$8,$D2lo,$T2 -+ vpsrldq \$8,$D2hi,$H2 -+ vpaddq $T1,$D1lo,$D1lo -+ vpaddq $H1,$D1hi,$D1hi -+ vpermq \$0x2,$D0lo,$T0 -+ vpermq \$0x2,$D0hi,$H0 -+ vpaddq $T2,$D2lo,$D2lo -+ vpaddq $H2,$D2hi,$D2hi -+ -+ vpermq \$0x2,$D1lo,$T1 -+ vpermq \$0x2,$D1hi,$H1 -+ vpaddq $T0,$D0lo,$D0lo -+ vpaddq $H0,$D0hi,$D0hi -+ vpermq \$0x2,$D2lo,$T2 -+ vpermq \$0x2,$D2hi,$H2 -+ vpaddq $T1,$D1lo,$D1lo -+ vpaddq $H1,$D1hi,$D1hi -+ vextracti64x4 \$1,$D0lo,%y#$T0 -+ vextracti64x4 \$1,$D0hi,%y#$H0 -+ vpaddq $T2,$D2lo,$D2lo -+ vpaddq $H2,$D2hi,$D2hi -+ -+ vextracti64x4 \$1,$D1lo,%y#$T1 -+ vextracti64x4 \$1,$D1hi,%y#$H1 -+ vextracti64x4 \$1,$D2lo,%y#$T2 -+ vextracti64x4 \$1,$D2hi,%y#$H2 -+___ -+######## switch back to %ymm -+map(s/%z/%y/, $H0,$H1,$H2,$R0,$R1,$R2,$S1,$S2); -+map(s/%z/%y/, $D0lo,$D0hi,$D1lo,$D1hi,$D2lo,$D2hi); -+map(s/%z/%y/, $T0,$T1,$T2,$T3,$mask44,$mask42,$tmp,$PAD); -+ -+$code.=<<___; -+ vpaddq $T0,$D0lo,${D0lo}{%k1}{z} -+ vpaddq $H0,$D0hi,${D0hi}{%k1}{z} -+ vpaddq $T1,$D1lo,${D1lo}{%k1}{z} -+ vpaddq $H1,$D1hi,${D1hi}{%k1}{z} -+ vpaddq $T2,$D2lo,${D2lo}{%k1}{z} -+ vpaddq $H2,$D2hi,${D2hi}{%k1}{z} -+ -+ ################################################################ -+ # partial reduction -+ vpsrlq \$44,$D0lo,$tmp -+ vpsllq \$8,$D0hi,$D0hi -+ vpandq $mask44,$D0lo,$H0 -+ vpaddq $tmp,$D0hi,$D0hi -+ -+ vpaddq $D0hi,$D1lo,$D1lo -+ -+ vpsrlq \$44,$D1lo,$tmp -+ vpsllq \$8,$D1hi,$D1hi -+ vpandq $mask44,$D1lo,$H1 -+ vpaddq $tmp,$D1hi,$D1hi -+ -+ vpaddq $D1hi,$D2lo,$D2lo -+ -+ vpsrlq \$42,$D2lo,$tmp -+ vpsllq \$10,$D2hi,$D2hi -+ vpandq $mask42,$D2lo,$H2 -+ vpaddq $tmp,$D2hi,$D2hi -+ -+ vpaddq $D2hi,$H0,$H0 -+ vpsllq \$2,$D2hi,$D2hi -+ -+ vpaddq $D2hi,$H0,$H0 -+ -+ vpsrlq \$44,$H0,$tmp # additional step -+ vpandq $mask44,$H0,$H0 -+ -+ vpaddq $tmp,$H1,$H1 -+ -+ ################################################################ -+ -+ vmovq %x#$H0,0($ctx) -+ vmovq %x#$H1,8($ctx) -+ vmovq %x#$H2,16($ctx) -+ vzeroall -+ -+.Lno_data_vpmadd52_8x: -+ ret -+.size poly1305_blocks_vpmadd52_8x,.-poly1305_blocks_vpmadd52_8x -+___ -+} -+$code.=<<___; -+.type poly1305_emit_base2_44,\@function,3 -+.align 32 -+poly1305_emit_base2_44: -+ mov 0($ctx),%r8 # load hash value -+ mov 8($ctx),%r9 -+ mov 16($ctx),%r10 -+ -+ mov %r9,%rax -+ shr \$20,%r9 -+ shl \$44,%rax -+ mov %r10,%rcx -+ shr \$40,%r10 -+ shl \$24,%rcx -+ -+ add %rax,%r8 -+ adc %rcx,%r9 -+ adc \$0,%r10 -+ -+ mov %r8,%rax -+ add \$5,%r8 # compare to modulus -+ mov %r9,%rcx -+ adc \$0,%r9 -+ adc \$0,%r10 -+ shr \$2,%r10 # did 130-bit value overflow? -+ cmovnz %r8,%rax -+ cmovnz %r9,%rcx -+ -+ add 0($nonce),%rax # accumulate nonce -+ adc 8($nonce),%rcx -+ mov %rax,0($mac) # write result -+ mov %rcx,8($mac) -+ -+ ret -+.size poly1305_emit_base2_44,.-poly1305_emit_base2_44 -+___ -+} } } -+} -+ -+if (!$kernel) -+{ # chacha20-poly1305 helpers -+my ($out,$inp,$otp,$len)=$win64 ? ("%rcx","%rdx","%r8", "%r9") : # Win64 order -+ ("%rdi","%rsi","%rdx","%rcx"); # Unix order -+$code.=<<___; -+.globl xor128_encrypt_n_pad -+.type xor128_encrypt_n_pad,\@abi-omnipotent -+.align 16 -+xor128_encrypt_n_pad: -+ sub $otp,$inp -+ sub $otp,$out -+ mov $len,%r10 # put len aside -+ shr \$4,$len # len / 16 -+ jz .Ltail_enc -+ nop -+.Loop_enc_xmm: -+ movdqu ($inp,$otp),%xmm0 -+ pxor ($otp),%xmm0 -+ movdqu %xmm0,($out,$otp) -+ movdqa %xmm0,($otp) -+ lea 16($otp),$otp -+ dec $len -+ jnz .Loop_enc_xmm -+ -+ and \$15,%r10 # len % 16 -+ jz .Ldone_enc -+ -+.Ltail_enc: -+ mov \$16,$len -+ sub %r10,$len -+ xor %eax,%eax -+.Loop_enc_byte: -+ mov ($inp,$otp),%al -+ xor ($otp),%al -+ mov %al,($out,$otp) -+ mov %al,($otp) -+ lea 1($otp),$otp -+ dec %r10 -+ jnz .Loop_enc_byte -+ -+ xor %eax,%eax -+.Loop_enc_pad: -+ mov %al,($otp) -+ lea 1($otp),$otp -+ dec $len -+ jnz .Loop_enc_pad -+ -+.Ldone_enc: -+ mov $otp,%rax -+ ret -+.size xor128_encrypt_n_pad,.-xor128_encrypt_n_pad -+ -+.globl xor128_decrypt_n_pad -+.type xor128_decrypt_n_pad,\@abi-omnipotent -+.align 16 -+xor128_decrypt_n_pad: -+ sub $otp,$inp -+ sub $otp,$out -+ mov $len,%r10 # put len aside -+ shr \$4,$len # len / 16 -+ jz .Ltail_dec -+ nop -+.Loop_dec_xmm: -+ movdqu ($inp,$otp),%xmm0 -+ movdqa ($otp),%xmm1 -+ pxor %xmm0,%xmm1 -+ movdqu %xmm1,($out,$otp) -+ movdqa %xmm0,($otp) -+ lea 16($otp),$otp -+ dec $len -+ jnz .Loop_dec_xmm -+ -+ pxor %xmm1,%xmm1 -+ and \$15,%r10 # len % 16 -+ jz .Ldone_dec -+ -+.Ltail_dec: -+ mov \$16,$len -+ sub %r10,$len -+ xor %eax,%eax -+ xor %r11,%r11 -+.Loop_dec_byte: -+ mov ($inp,$otp),%r11b -+ mov ($otp),%al -+ xor %r11b,%al -+ mov %al,($out,$otp) -+ mov %r11b,($otp) -+ lea 1($otp),$otp -+ dec %r10 -+ jnz .Loop_dec_byte -+ -+ xor %eax,%eax -+.Loop_dec_pad: -+ mov %al,($otp) -+ lea 1($otp),$otp -+ dec $len -+ jnz .Loop_dec_pad -+ -+.Ldone_dec: -+ mov $otp,%rax -+ ret -+.size xor128_decrypt_n_pad,.-xor128_decrypt_n_pad -+___ -+} -+ -+# EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, -+# CONTEXT *context,DISPATCHER_CONTEXT *disp) -+if ($win64) { -+$rec="%rcx"; -+$frame="%rdx"; -+$context="%r8"; -+$disp="%r9"; -+ -+$code.=<<___; -+.extern __imp_RtlVirtualUnwind -+.type se_handler,\@abi-omnipotent -+.align 16 -+se_handler: -+ push %rsi -+ push %rdi -+ push %rbx -+ push %rbp -+ push %r12 -+ push %r13 -+ push %r14 -+ push %r15 -+ pushfq -+ sub \$64,%rsp -+ -+ mov 120($context),%rax # pull context->Rax -+ mov 248($context),%rbx # pull context->Rip -+ -+ mov 8($disp),%rsi # disp->ImageBase -+ mov 56($disp),%r11 # disp->HandlerData -+ -+ mov 0(%r11),%r10d # HandlerData[0] -+ lea (%rsi,%r10),%r10 # prologue label -+ cmp %r10,%rbx # context->Rip<.Lprologue -+ jb .Lcommon_seh_tail -+ -+ mov 152($context),%rax # pull context->Rsp -+ -+ mov 4(%r11),%r10d # HandlerData[1] -+ lea (%rsi,%r10),%r10 # epilogue label -+ cmp %r10,%rbx # context->Rip>=.Lepilogue -+ jae .Lcommon_seh_tail -+ -+ lea 48(%rax),%rax -+ -+ mov -8(%rax),%rbx -+ mov -16(%rax),%rbp -+ mov -24(%rax),%r12 -+ mov -32(%rax),%r13 -+ mov -40(%rax),%r14 -+ mov -48(%rax),%r15 -+ mov %rbx,144($context) # restore context->Rbx -+ mov %rbp,160($context) # restore context->Rbp -+ mov %r12,216($context) # restore context->R12 -+ mov %r13,224($context) # restore context->R13 -+ mov %r14,232($context) # restore context->R14 -+ mov %r15,240($context) # restore context->R14 -+ -+ jmp .Lcommon_seh_tail -+.size se_handler,.-se_handler -+ -+.type avx_handler,\@abi-omnipotent -+.align 16 -+avx_handler: -+ push %rsi -+ push %rdi -+ push %rbx -+ push %rbp -+ push %r12 -+ push %r13 -+ push %r14 -+ push %r15 -+ pushfq -+ sub \$64,%rsp -+ -+ mov 120($context),%rax # pull context->Rax -+ mov 248($context),%rbx # pull context->Rip -+ -+ mov 8($disp),%rsi # disp->ImageBase -+ mov 56($disp),%r11 # disp->HandlerData -+ -+ mov 0(%r11),%r10d # HandlerData[0] -+ lea (%rsi,%r10),%r10 # prologue label -+ cmp %r10,%rbx # context->RipRsp -+ -+ mov 4(%r11),%r10d # HandlerData[1] -+ lea (%rsi,%r10),%r10 # epilogue label -+ cmp %r10,%rbx # context->Rip>=epilogue label -+ jae .Lcommon_seh_tail -+ -+ mov 208($context),%rax # pull context->R11 -+ -+ lea 0x50(%rax),%rsi -+ lea 0xf8(%rax),%rax -+ lea 512($context),%rdi # &context.Xmm6 -+ mov \$20,%ecx -+ .long 0xa548f3fc # cld; rep movsq -+ -+.Lcommon_seh_tail: -+ mov 8(%rax),%rdi -+ mov 16(%rax),%rsi -+ mov %rax,152($context) # restore context->Rsp -+ mov %rsi,168($context) # restore context->Rsi -+ mov %rdi,176($context) # restore context->Rdi -+ -+ mov 40($disp),%rdi # disp->ContextRecord -+ mov $context,%rsi # context -+ mov \$154,%ecx # sizeof(CONTEXT) -+ .long 0xa548f3fc # cld; rep movsq -+ -+ mov $disp,%rsi -+ xor %rcx,%rcx # arg1, UNW_FLAG_NHANDLER -+ mov 8(%rsi),%rdx # arg2, disp->ImageBase -+ mov 0(%rsi),%r8 # arg3, disp->ControlPc -+ mov 16(%rsi),%r9 # arg4, disp->FunctionEntry -+ mov 40(%rsi),%r10 # disp->ContextRecord -+ lea 56(%rsi),%r11 # &disp->HandlerData -+ lea 24(%rsi),%r12 # &disp->EstablisherFrame -+ mov %r10,32(%rsp) # arg5 -+ mov %r11,40(%rsp) # arg6 -+ mov %r12,48(%rsp) # arg7 -+ mov %rcx,56(%rsp) # arg8, (NULL) -+ call *__imp_RtlVirtualUnwind(%rip) -+ -+ mov \$1,%eax # ExceptionContinueSearch -+ add \$64,%rsp -+ popfq -+ pop %r15 -+ pop %r14 -+ pop %r13 -+ pop %r12 -+ pop %rbp -+ pop %rbx -+ pop %rdi -+ pop %rsi -+ ret -+.size avx_handler,.-avx_handler -+ -+.section .pdata -+.align 4 -+ .rva .LSEH_begin_poly1305_init_x86_64 -+ .rva .LSEH_end_poly1305_init_x86_64 -+ .rva .LSEH_info_poly1305_init_x86_64 -+ -+ .rva .LSEH_begin_poly1305_blocks_x86_64 -+ .rva .LSEH_end_poly1305_blocks_x86_64 -+ .rva .LSEH_info_poly1305_blocks_x86_64 -+ -+ .rva .LSEH_begin_poly1305_emit_x86_64 -+ .rva .LSEH_end_poly1305_emit_x86_64 -+ .rva .LSEH_info_poly1305_emit_x86_64 -+___ -+$code.=<<___ if ($avx); -+ .rva .LSEH_begin_poly1305_blocks_avx -+ .rva .Lbase2_64_avx -+ .rva .LSEH_info_poly1305_blocks_avx_1 -+ -+ .rva .Lbase2_64_avx -+ .rva .Leven_avx -+ .rva .LSEH_info_poly1305_blocks_avx_2 -+ -+ .rva .Leven_avx -+ .rva .LSEH_end_poly1305_blocks_avx -+ .rva .LSEH_info_poly1305_blocks_avx_3 -+ -+ .rva .LSEH_begin_poly1305_emit_avx -+ .rva .LSEH_end_poly1305_emit_avx -+ .rva .LSEH_info_poly1305_emit_avx -+___ -+$code.=<<___ if ($avx>1); -+ .rva .LSEH_begin_poly1305_blocks_avx2 -+ .rva .Lbase2_64_avx2 -+ .rva .LSEH_info_poly1305_blocks_avx2_1 -+ -+ .rva .Lbase2_64_avx2 -+ .rva .Leven_avx2 -+ .rva .LSEH_info_poly1305_blocks_avx2_2 -+ -+ .rva .Leven_avx2 -+ .rva .LSEH_end_poly1305_blocks_avx2 -+ .rva .LSEH_info_poly1305_blocks_avx2_3 -+___ -+$code.=<<___ if ($avx>2); -+ .rva .LSEH_begin_poly1305_blocks_avx512 -+ .rva .LSEH_end_poly1305_blocks_avx512 -+ .rva .LSEH_info_poly1305_blocks_avx512 -+___ -+$code.=<<___; -+.section .xdata -+.align 8 -+.LSEH_info_poly1305_init_x86_64: -+ .byte 9,0,0,0 -+ .rva se_handler -+ .rva .LSEH_begin_poly1305_init_x86_64,.LSEH_begin_poly1305_init_x86_64 -+ -+.LSEH_info_poly1305_blocks_x86_64: -+ .byte 9,0,0,0 -+ .rva se_handler -+ .rva .Lblocks_body,.Lblocks_epilogue -+ -+.LSEH_info_poly1305_emit_x86_64: -+ .byte 9,0,0,0 -+ .rva se_handler -+ .rva .LSEH_begin_poly1305_emit_x86_64,.LSEH_begin_poly1305_emit_x86_64 -+___ -+$code.=<<___ if ($avx); -+.LSEH_info_poly1305_blocks_avx_1: -+ .byte 9,0,0,0 -+ .rva se_handler -+ .rva .Lblocks_avx_body,.Lblocks_avx_epilogue # HandlerData[] -+ -+.LSEH_info_poly1305_blocks_avx_2: -+ .byte 9,0,0,0 -+ .rva se_handler -+ .rva .Lbase2_64_avx_body,.Lbase2_64_avx_epilogue # HandlerData[] -+ -+.LSEH_info_poly1305_blocks_avx_3: -+ .byte 9,0,0,0 -+ .rva avx_handler -+ .rva .Ldo_avx_body,.Ldo_avx_epilogue # HandlerData[] -+ -+.LSEH_info_poly1305_emit_avx: -+ .byte 9,0,0,0 -+ .rva se_handler -+ .rva .LSEH_begin_poly1305_emit_avx,.LSEH_begin_poly1305_emit_avx -+___ -+$code.=<<___ if ($avx>1); -+.LSEH_info_poly1305_blocks_avx2_1: -+ .byte 9,0,0,0 -+ .rva se_handler -+ .rva .Lblocks_avx2_body,.Lblocks_avx2_epilogue # HandlerData[] -+ -+.LSEH_info_poly1305_blocks_avx2_2: -+ .byte 9,0,0,0 -+ .rva se_handler -+ .rva .Lbase2_64_avx2_body,.Lbase2_64_avx2_epilogue # HandlerData[] -+ -+.LSEH_info_poly1305_blocks_avx2_3: -+ .byte 9,0,0,0 -+ .rva avx_handler -+ .rva .Ldo_avx2_body,.Ldo_avx2_epilogue # HandlerData[] -+___ -+$code.=<<___ if ($avx>2); -+.LSEH_info_poly1305_blocks_avx512: -+ .byte 9,0,0,0 -+ .rva avx_handler -+ .rva .Ldo_avx512_body,.Ldo_avx512_epilogue # HandlerData[] -+___ -+} -+ -+open SELF,$0; -+while() { -+ next if (/^#!/); -+ last if (!s/^#/\/\// and !/^$/); -+ print; -+} -+close SELF; -+ -+foreach (split('\n',$code)) { -+ s/\`([^\`]*)\`/eval($1)/ge; -+ s/%r([a-z]+)#d/%e$1/g; -+ s/%r([0-9]+)#d/%r$1d/g; -+ s/%x#%[yz]/%x/g or s/%y#%z/%y/g or s/%z#%[yz]/%z/g; -+ -+ if ($kernel) { -+ s/(^\.type.*),[0-9]+$/\1/; -+ s/(^\.type.*),\@abi-omnipotent+$/\1,\@function/; -+ next if /^\.cfi.*/; -+ } -+ -+ print $_,"\n"; -+} -+close STDOUT; ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/compat/Makefile.include 2019-08-20 20:26:42.392341425 +0000 -@@ -0,0 +1,94 @@ -+# SPDX-License-Identifier: GPL-2.0 -+# -+# Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ -+kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) -+ -+ccflags-y += -include $(kbuild-dir)/compat/compat.h -+asflags-y += -include $(kbuild-dir)/compat/compat-asm.h -+ -+ifeq ($(wildcard $(srctree)/include/linux/ptr_ring.h),) -+ccflags-y += -I$(kbuild-dir)/compat/ptr_ring/include -+endif -+ -+ifeq ($(wildcard $(srctree)/include/linux/siphash.h),) -+ccflags-y += -I$(kbuild-dir)/compat/siphash/include -+wireguard-y += compat/siphash/siphash.o -+endif -+ -+ifeq ($(wildcard $(srctree)/include/net/dst_cache.h),) -+ccflags-y += -I$(kbuild-dir)/compat/dst_cache/include -+wireguard-y += compat/dst_cache/dst_cache.o -+endif -+ -+ifeq ($(wildcard $(srctree)/arch/x86/include/asm/intel-family.h)$(CONFIG_X86),y) -+ccflags-y += -I$(kbuild-dir)/compat/intel-family-x86/include -+endif -+ -+ifeq ($(wildcard $(srctree)/arch/x86/include/asm/fpu/api.h)$(CONFIG_X86),y) -+ccflags-y += -I$(kbuild-dir)/compat/fpu-x86/include -+endif -+ -+ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/simd.h)$(shell grep -s -F "generic-y += simd.h" "$(srctree)/arch/$(SRCARCH)/Makefile" "$(srctree)/arch/$(SRCARCH)/Makefile"),) -+ccflags-y += -I$(kbuild-dir)/compat/simd-asm/include -+endif -+ -+ifeq ($(wildcard $(srctree)/include/linux/simd.h),) -+ccflags-y += -I$(kbuild-dir)/compat/simd/include -+endif -+ -+ifeq ($(wildcard $(srctree)/include/net/udp_tunnel.h),) -+ccflags-y += -I$(kbuild-dir)/compat/udp_tunnel/include -+wireguard-y += compat/udp_tunnel/udp_tunnel.o -+endif -+ -+ifeq ($(shell grep -s -F "int crypto_memneq" "$(srctree)/include/crypto/algapi.h"),) -+ccflags-y += -include $(kbuild-dir)/compat/memneq/include.h -+wireguard-y += compat/memneq/memneq.o -+endif -+ -+ifdef CONFIG_HZ -+ifeq ($(wildcard $(srctree)/include/generated/timeconst.h),) -+ccflags-y += $(shell echo 'define gcd(a,b){auto t;while(b){t=b;b=a%b;a=t;};return a;};hz=$(CONFIG_HZ);cd=gcd(hz,1000000);print "-DHZ_TO_USEC_NUM=",1000000/cd," -DHZ_TO_USEC_DEN=",hz/cd;halt;' | bc -q) -+endif -+endif -+ -+ifeq ($(wildcard $(srctree)/arch/arm/include/asm/neon.h)$(CONFIG_ARM),y) -+ccflags-y += -I$(kbuild-dir)/compat/neon-arm/include -+endif -+ifeq ($(wildcard $(srctree)/arch/arm64/include/asm/neon.h)$(CONFIG_ARM64),y) -+ccflags-y += -I$(kbuild-dir)/compat/neon-arm/include -+endif -+ -+ifeq ($(CONFIG_X86_64),y) -+ ifeq ($(ssse3_instr),) -+ ssse3_instr := $(call as-instr,pshufb %xmm0$(comma)%xmm0,-DCONFIG_AS_SSSE3=1) -+ ccflags-y += $(ssse3_instr) -+ asflags-y += $(ssse3_instr) -+ endif -+ ifeq ($(avx_instr),) -+ avx_instr := $(call as-instr,vxorps %ymm0$(comma)%ymm1$(comma)%ymm2,-DCONFIG_AS_AVX=1) -+ ccflags-y += $(avx_instr) -+ asflags-y += $(avx_instr) -+ endif -+ ifeq ($(avx2_instr),) -+ avx2_instr := $(call as-instr,vpbroadcastb %xmm0$(comma)%ymm1,-DCONFIG_AS_AVX2=1) -+ ccflags-y += $(avx2_instr) -+ asflags-y += $(avx2_instr) -+ endif -+ ifeq ($(avx512_instr),) -+ avx512_instr := $(call as-instr,vpmovm2b %k1$(comma)%zmm5,-DCONFIG_AS_AVX512=1) -+ ccflags-y += $(avx512_instr) -+ asflags-y += $(avx512_instr) -+ endif -+ ifeq ($(bmi2_instr),) -+ bmi2_instr :=$(call as-instr,mulx %rax$(comma)%rax$(comma)%rax,-DCONFIG_AS_BMI2=1) -+ ccflags-y += $(bmi2_instr) -+ asflags-y += $(bmi2_instr) -+ endif -+ ifeq ($(adx_instr),) -+ adx_instr :=$(call as-instr,adcx %rax$(comma)%rax,-DCONFIG_AS_ADX=1) -+ ccflags-y += $(adx_instr) -+ asflags-y += $(adx_instr) -+ endif -+endif ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/crypto/Makefile.include 2019-08-20 20:26:42.395341425 +0000 -@@ -0,0 +1,57 @@ -+ifeq ($(CONFIG_X86_64)$(if $(CONFIG_UML),y,n),yn) -+CONFIG_ZINC_ARCH_X86_64 := y -+endif -+ifeq ($(CONFIG_ARM)$(if $(CONFIG_CPU_32v3),y,n),yn) -+CONFIG_ZINC_ARCH_ARM := y -+endif -+ifeq ($(CONFIG_ARM64),y) -+CONFIG_ZINC_ARCH_ARM64 := y -+endif -+ifeq ($(CONFIG_MIPS)$(CONFIG_CPU_MIPS32_R2),yy) -+CONFIG_ZINC_ARCH_MIPS := y -+endif -+ifeq ($(CONFIG_MIPS)$(CONFIG_64BIT),yy) -+CONFIG_ZINC_ARCH_MIPS64 := y -+endif -+ -+zinc-y += chacha20/chacha20.o -+zinc-$(CONFIG_ZINC_ARCH_X86_64) += chacha20/chacha20-x86_64.o -+zinc-$(CONFIG_ZINC_ARCH_ARM) += chacha20/chacha20-arm.o chacha20/chacha20-unrolled-arm.o -+zinc-$(CONFIG_ZINC_ARCH_ARM64) += chacha20/chacha20-arm64.o -+zinc-$(CONFIG_ZINC_ARCH_MIPS) += chacha20/chacha20-mips.o -+AFLAGS_chacha20-mips.o += -O2 # This is required to fill the branch delay slots -+ -+zinc-y += poly1305/poly1305.o -+zinc-$(CONFIG_ZINC_ARCH_X86_64) += poly1305/poly1305-x86_64.o -+zinc-$(CONFIG_ZINC_ARCH_ARM) += poly1305/poly1305-arm.o -+zinc-$(CONFIG_ZINC_ARCH_ARM64) += poly1305/poly1305-arm64.o -+zinc-$(CONFIG_ZINC_ARCH_MIPS) += poly1305/poly1305-mips.o -+AFLAGS_poly1305-mips.o += -O2 # This is required to fill the branch delay slots -+zinc-$(CONFIG_ZINC_ARCH_MIPS64) += poly1305/poly1305-mips64.o -+ -+zinc-y += chacha20poly1305.o -+ -+zinc-y += blake2s/blake2s.o -+zinc-$(CONFIG_ZINC_ARCH_X86_64) += blake2s/blake2s-x86_64.o -+ -+zinc-y += curve25519/curve25519.o -+zinc-$(CONFIG_ZINC_ARCH_ARM) += curve25519/curve25519-arm.o -+ -+quiet_cmd_perlasm = PERLASM $@ -+ cmd_perlasm = $(PERL) $< > $@ -+$(obj)/%.S: $(src)/%.pl FORCE -+ $(call if_changed,perlasm) -+kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) -+targets := $(patsubst $(kbuild-dir)/%.pl,%.S,$(wildcard $(patsubst %.o,$(kbuild-dir)/crypto/zinc/%.pl,$(zinc-y) $(zinc-m) $(zinc-)))) -+ -+# Old kernels don't set this, which causes trouble. -+.SECONDARY: -+ -+wireguard-y += $(addprefix crypto/zinc/,$(zinc-y)) -+ccflags-y += -I$(kbuild-dir)/crypto/include -+ccflags-$(CONFIG_ZINC_ARCH_X86_64) += -DCONFIG_ZINC_ARCH_X86_64 -+ccflags-$(CONFIG_ZINC_ARCH_ARM) += -DCONFIG_ZINC_ARCH_ARM -+ccflags-$(CONFIG_ZINC_ARCH_ARM64) += -DCONFIG_ZINC_ARCH_ARM64 -+ccflags-$(CONFIG_ZINC_ARCH_MIPS) += -DCONFIG_ZINC_ARCH_MIPS -+ccflags-$(CONFIG_ZINC_ARCH_MIPS64) += -DCONFIG_ZINC_ARCH_MIPS64 -+ccflags-$(CONFIG_WIREGUARD_DEBUG) += -DCONFIG_ZINC_SELFTEST ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/Makefile 2019-08-20 20:26:42.392341425 +0000 -@@ -0,0 +1,14 @@ -+# SPDX-License-Identifier: GPL-2.0 -+# -+# Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved. -+ -+ccflags-y := -O3 -fvisibility=hidden -+ccflags-$(CONFIG_WIREGUARD_DEBUG) += -DDEBUG -g -+ccflags-y += -D'pr_fmt(fmt)=KBUILD_MODNAME ": " fmt' -+ -+wireguard-y := main.o noise.o device.o peer.o timers.o queueing.o send.o receive.o socket.o peerlookup.o allowedips.o ratelimiter.o cookie.o netlink.o -+ -+include $(src)/crypto/Makefile.include -+include $(src)/compat/Makefile.include -+ -+obj-$(if $(KBUILD_EXTMOD),m,$(CONFIG_WIREGUARD)) := wireguard.o ---- /dev/null 2019-08-08 06:40:53.862527576 +0000 -+++ b/net/wireguard/Kconfig 2019-08-20 20:26:42.392341425 +0000 -@@ -0,0 +1,34 @@ -+config WIREGUARD -+ tristate "IP: WireGuard secure network tunnel" -+ depends on NET && INET -+ depends on IPV6 || !IPV6 -+ select NET_UDP_TUNNEL -+ select DST_CACHE -+ select CRYPTO -+ select CRYPTO_BLKCIPHER -+ select XOR_BLOCKS -+ select VFP -+ select VFPv3 if CPU_V7 -+ select NEON if CPU_V7 -+ select KERNEL_MODE_NEON if CPU_V7 -+ default m -+ help -+ WireGuard is a secure, fast, and easy to use replacement for IPsec -+ that uses modern cryptography and clever networking tricks. It's -+ designed to be fairly general purpose and abstract enough to fit most -+ use cases, while at the same time remaining extremely simple to -+ configure. See www.wireguard.com for more info. -+ -+ It's safe to say Y or M here, as the driver is very lightweight and -+ is only in use when an administrator chooses to add an interface. -+ -+config WIREGUARD_DEBUG -+ bool "Debugging checks and verbose messages" -+ depends on WIREGUARD -+ help -+ This will write log messages for handshake and other events -+ that occur for a WireGuard interface. It will also perform some -+ extra validation checks and unit tests at various points. This is -+ only useful for debugging. -+ -+ Say N here unless you know what you're doing. ---- a/net/Kconfig -+++ b/net/Kconfig -@@ -85,2 +85,3 @@ config INET - if INET -+source "net/wireguard/Kconfig" - source "net/ipv4/Kconfig" ---- a/net/Makefile -+++ b/net/Makefile -@@ -16,2 +16,3 @@ - obj-$(CONFIG_NETFILTER) += netfilter/ -+obj-$(CONFIG_WIREGUARD) += wireguard/ - obj-$(CONFIG_INET) += ipv4/ diff --git a/meta-citadel/recipes-kernel/citadel-kernel/files/defconfig b/meta-citadel/recipes-kernel/citadel-kernel/files/defconfig index 5907a84..2b5fd86 100644 --- a/meta-citadel/recipes-kernel/citadel-kernel/files/defconfig +++ b/meta-citadel/recipes-kernel/citadel-kernel/files/defconfig @@ -1,18 +1,20 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 5.2.9 Kernel Configuration +# Linux/x86 5.6.2 Kernel Configuration # # -# Compiler: gcc (Debian 9.2.1-1) 9.2.1 20190813 +# Compiler: gcc (Debian 8.3.0-6) 8.3.0 # CONFIG_CC_IS_GCC=y -CONFIG_GCC_VERSION=90201 +CONFIG_GCC_VERSION=80300 CONFIG_CLANG_VERSION=0 +CONFIG_CC_CAN_LINK=y CONFIG_CC_HAS_ASM_GOTO=y +CONFIG_CC_HAS_ASM_INLINE=y CONFIG_CC_HAS_WARN_MAYBE_UNINITIALIZED=y CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y +CONFIG_BUILDTIME_TABLE_SORT=y CONFIG_THREAD_INFO_IN_TASK=y # @@ -59,6 +61,7 @@ CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_GENERIC_MSI_IRQ=y CONFIG_GENERIC_MSI_IRQ_DOMAIN=y +CONFIG_IRQ_MSI_IOMMU=y CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y CONFIG_GENERIC_IRQ_RESERVATION_MODE=y CONFIG_IRQ_FORCED_THREADING=y @@ -94,6 +97,7 @@ CONFIG_HIGH_RES_TIMERS=y # CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREEMPT=y CONFIG_PREEMPT_COUNT=y +CONFIG_PREEMPTION=y # # CPU/Task time and stats accounting @@ -116,6 +120,7 @@ CONFIG_CPU_ISOLATION=y # # RCU Subsystem # +CONFIG_TREE_RCU=y CONFIG_PREEMPT_RCU=y CONFIG_RCU_EXPERT=y CONFIG_SRCU=y @@ -137,8 +142,15 @@ CONFIG_LOG_BUF_SHIFT=18 CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y + +# +# Scheduler features +# +# end of Scheduler features + CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y +CONFIG_CC_HAS_INT128=y CONFIG_ARCH_SUPPORTS_INT128=y # CONFIG_NUMA_BALANCING is not set CONFIG_CGROUPS=y @@ -166,6 +178,7 @@ CONFIG_CGROUP_PERF=y CONFIG_SOCK_CGROUP_DATA=y CONFIG_NAMESPACES=y CONFIG_UTS_NS=y +CONFIG_TIME_NS=y CONFIG_IPC_NS=y CONFIG_USER_NS=y CONFIG_PID_NS=y @@ -182,6 +195,7 @@ CONFIG_INITRAMFS_SOURCE="" # CONFIG_RD_XZ is not set # CONFIG_RD_LZO is not set CONFIG_RD_LZ4=y +# CONFIG_BOOT_CONFIG is not set CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SYSCTL=y @@ -192,7 +206,6 @@ CONFIG_EXPERT=y CONFIG_MULTIUSER=y CONFIG_SGETMASK_SYSCALL=y # CONFIG_SYSFS_SYSCALL is not set -# CONFIG_SYSCTL_SYSCALL is not set CONFIG_FHANDLE=y CONFIG_POSIX_TIMERS=y CONFIG_PRINTK=y @@ -217,6 +230,7 @@ CONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_ABSOLUTE_PERCPU=y CONFIG_KALLSYMS_BASE_RELATIVE=y CONFIG_BPF_SYSCALL=y +CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y # CONFIG_USERFAULTFD is not set CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y CONFIG_RSEQ=y @@ -275,7 +289,6 @@ CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y CONFIG_ARCH_WANT_GENERAL_HUGETLB=y CONFIG_ZONE_DMA32=y CONFIG_AUDIT_ARCH=y @@ -311,11 +324,13 @@ CONFIG_PARAVIRT=y # CONFIG_PARAVIRT_SPINLOCKS is not set # CONFIG_XEN is not set CONFIG_KVM_GUEST=y +CONFIG_ARCH_CPUIDLE_HALTPOLL=y # CONFIG_PVH is not set # CONFIG_KVM_DEBUG_FS is not set # CONFIG_PARAVIRT_TIME_ACCOUNTING is not set CONFIG_PARAVIRT_CLOCK=y # CONFIG_JAILHOUSE_GUEST is not set +# CONFIG_ACRN_GUEST is not set # CONFIG_MK8 is not set # CONFIG_MPSC is not set CONFIG_MCORE2=y @@ -331,16 +346,18 @@ CONFIG_X86_CMPXCHG64=y CONFIG_X86_CMOV=y CONFIG_X86_MINIMUM_CPU_FAMILY=64 CONFIG_X86_DEBUGCTLMSR=y +CONFIG_IA32_FEAT_CTL=y +CONFIG_X86_VMX_FEATURE_NAMES=y CONFIG_PROCESSOR_SELECT=y CONFIG_CPU_SUP_INTEL=y CONFIG_CPU_SUP_AMD=y CONFIG_CPU_SUP_HYGON=y # CONFIG_CPU_SUP_CENTAUR is not set +# CONFIG_CPU_SUP_ZHAOXIN is not set CONFIG_HPET_TIMER=y CONFIG_HPET_EMULATE_RTC=y CONFIG_DMI=y # CONFIG_GART_IOMMU is not set -# CONFIG_CALGARY_IOMMU is not set # CONFIG_MAXSMP is not set CONFIG_NR_CPUS_RANGE_BEGIN=2 CONFIG_NR_CPUS_RANGE_END=512 @@ -370,6 +387,7 @@ CONFIG_PERF_EVENTS_AMD_POWER=m # end of Performance monitoring # CONFIG_X86_VSYSCALL_EMULATION is not set +# CONFIG_X86_IOPL_IOPERM is not set # CONFIG_I8K is not set CONFIG_MICROCODE=y CONFIG_MICROCODE_INTEL=y @@ -380,7 +398,6 @@ CONFIG_X86_CPUID=y # CONFIG_X86_5LEVEL is not set CONFIG_X86_DIRECT_GBPAGES=y # CONFIG_X86_CPA_STATISTICS is not set -CONFIG_ARCH_HAS_MEM_ENCRYPT=y # CONFIG_AMD_MEM_ENCRYPT is not set CONFIG_NUMA=y # CONFIG_AMD_NUMA is not set @@ -404,9 +421,11 @@ CONFIG_X86_PAT=y CONFIG_ARCH_USES_PG_UNCACHED=y CONFIG_ARCH_RANDOM=y CONFIG_X86_SMAP=y -CONFIG_X86_INTEL_UMIP=y -# CONFIG_X86_INTEL_MPX is not set +# CONFIG_X86_UMIP is not set # CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS is not set +CONFIG_X86_INTEL_TSX_MODE_OFF=y +# CONFIG_X86_INTEL_TSX_MODE_ON is not set +# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set CONFIG_EFI=y CONFIG_EFI_STUB=y # CONFIG_EFI_MIXED is not set @@ -432,6 +451,7 @@ CONFIG_HOTPLUG_CPU=y # CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set # CONFIG_DEBUG_HOTPLUG_CPU0 is not set # CONFIG_LEGACY_VSYSCALL_EMULATE is not set +# CONFIG_LEGACY_VSYSCALL_XONLY is not set CONFIG_LEGACY_VSYSCALL_NONE=y # CONFIG_CMDLINE_BOOL is not set # CONFIG_MODIFY_LDT_SYSCALL is not set @@ -496,7 +516,6 @@ CONFIG_ACPI_IPMI=m CONFIG_ACPI_HOTPLUG_CPU=y CONFIG_ACPI_PROCESSOR_AGGREGATOR=y CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_NUMA=y CONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y # CONFIG_ACPI_TABLE_UPGRADE is not set # CONFIG_ACPI_DEBUG is not set @@ -510,6 +529,7 @@ CONFIG_ACPI_HED=y # CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set CONFIG_ACPI_NFIT=m # CONFIG_NFIT_SECURITY_DEBUG is not set +CONFIG_ACPI_NUMA=y # CONFIG_ACPI_HMAT is not set CONFIG_HAVE_ACPI_APEI=y CONFIG_HAVE_ACPI_APEI_NMI=y @@ -567,6 +587,8 @@ CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y # CONFIG_CPU_IDLE_GOV_TEO is not set +# CONFIG_CPU_IDLE_GOV_HALTPOLL is not set +# CONFIG_HALTPOLL_CPUIDLE is not set # end of CPU Idle CONFIG_INTEL_IDLE=y @@ -592,8 +614,6 @@ CONFIG_AMD_NB=y # CONFIG_X86_X32 is not set # end of Binary Emulations -CONFIG_HAVE_GENERIC_GUP=y - # # Firmware Drivers # @@ -621,6 +641,8 @@ CONFIG_EFI_CAPSULE_LOADER=y # CONFIG_EFI_TEST is not set # CONFIG_APPLE_PROPERTIES is not set # CONFIG_RESET_ATTACK_MITIGATION is not set +# CONFIG_EFI_RCI2_TABLE is not set +# CONFIG_EFI_DISABLE_PCI_DMA is not set # end of EFI (Extensible Firmware Interface) Support CONFIG_UEFI_CPER=y @@ -645,8 +667,10 @@ CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y CONFIG_KVM_VFIO=y CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y CONFIG_HAVE_KVM_IRQ_BYPASS=y +CONFIG_HAVE_KVM_NO_POLL=y CONFIG_VIRTUALIZATION=y CONFIG_KVM=y +CONFIG_KVM_WERROR=y CONFIG_KVM_INTEL=m CONFIG_KVM_AMD=m # CONFIG_KVM_MMU_AUDIT is not set @@ -686,6 +710,7 @@ CONFIG_ARCH_HAS_SET_MEMORY=y CONFIG_ARCH_HAS_SET_DIRECT_MAP=y CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y +CONFIG_HAVE_ASM_MODVERSIONS=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_RSEQ=y CONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y @@ -699,7 +724,8 @@ CONFIG_HAVE_PERF_REGS=y CONFIG_HAVE_PERF_USER_STACK_DUMP=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y -CONFIG_HAVE_RCU_TABLE_FREE=y +CONFIG_MMU_GATHER_TABLE_FREE=y +CONFIG_MMU_GATHER_RCU_TABLE_FREE=y CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y CONFIG_HAVE_CMPXCHG_LOCAL=y @@ -719,6 +745,7 @@ CONFIG_HAVE_MOVE_PMD=y CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD=y CONFIG_HAVE_ARCH_HUGE_VMAP=y +CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y CONFIG_HAVE_ARCH_SOFT_DIRTY=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_MODULES_USE_ELF_RELA=y @@ -730,18 +757,17 @@ CONFIG_ARCH_MMAP_RND_BITS=28 CONFIG_HAVE_COPY_THREAD_TLS=y CONFIG_HAVE_STACK_VALIDATION=y CONFIG_HAVE_RELIABLE_STACKTRACE=y -CONFIG_64BIT_TIME=y +# CONFIG_COMPAT_32BIT_TIME is not set CONFIG_HAVE_ARCH_VMAP_STACK=y CONFIG_VMAP_STACK=y CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y CONFIG_STRICT_KERNEL_RWX=y CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y CONFIG_STRICT_MODULE_RWX=y -CONFIG_ARCH_HAS_REFCOUNT=y -# CONFIG_REFCOUNT_FULL is not set CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y CONFIG_ARCH_USE_MEMREMAP_PROT=y # CONFIG_LOCK_EVENT_COUNTS is not set +CONFIG_ARCH_HAS_MEM_ENCRYPT=y # # GCOV-based kernel profiling @@ -764,6 +790,8 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_MODULE_SIG is not set # CONFIG_MODULE_COMPRESS is not set +# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set +# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_TRIM_UNUSED_KSYMS is not set CONFIG_MODULES_TREE_LOOKUP=y CONFIG_BLOCK=y @@ -771,6 +799,7 @@ CONFIG_BLK_SCSI_REQUEST=y CONFIG_BLK_DEV_BSG=y CONFIG_BLK_DEV_BSGLIB=y CONFIG_BLK_DEV_INTEGRITY=y +CONFIG_BLK_DEV_INTEGRITY_T10=y # CONFIG_BLK_DEV_ZONED is not set # CONFIG_BLK_CMDLINE_PARSER is not set # CONFIG_BLK_WBT is not set @@ -853,6 +882,7 @@ CONFIG_SPARSEMEM_EXTREME=y CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y CONFIG_SPARSEMEM_VMEMMAP=y CONFIG_HAVE_MEMBLOCK_NODE_MAP=y +CONFIG_HAVE_FAST_GUP=y # CONFIG_MEMORY_HOTPLUG is not set CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_MEMORY_BALLOON=y @@ -886,12 +916,14 @@ CONFIG_ZSMALLOC=y CONFIG_GENERIC_EARLY_IOREMAP=y # CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set # CONFIG_IDLE_PAGE_TRACKING is not set -CONFIG_ARCH_HAS_ZONE_DEVICE=y -CONFIG_ARCH_HAS_HMM_MIRROR=y +CONFIG_ARCH_HAS_PTE_DEVMAP=y +CONFIG_HMM_MIRROR=y CONFIG_FRAME_VECTOR=y # CONFIG_PERCPU_STATS is not set # CONFIG_GUP_BENCHMARK is not set +# CONFIG_READ_ONLY_THP_FOR_FS is not set CONFIG_ARCH_HAS_PTE_SPECIAL=y +CONFIG_MAPPING_DIRTY_HELPERS=y # end of Memory Management options CONFIG_NET=y @@ -911,8 +943,6 @@ CONFIG_UNIX_DIAG=y # CONFIG_NET_KEY is not set # CONFIG_XDP_SOCKETS is not set CONFIG_INET=y -CONFIG_WIREGUARD=y -# CONFIG_WIREGUARD_DEBUG is not set # CONFIG_IP_MULTICAST is not set CONFIG_IP_ADVANCED_ROUTER=y # CONFIG_IP_FIB_TRIE_STATS is not set @@ -959,6 +989,7 @@ CONFIG_IPV6_NDISC_NODETYPE=y # CONFIG_IPV6_SEG6_LWTUNNEL is not set # CONFIG_IPV6_SEG6_HMAC is not set CONFIG_NETLABEL=y +# CONFIG_MPTCP is not set CONFIG_NETWORK_SECMARK=y CONFIG_NET_PTP_CLASSIFY=y # CONFIG_NETWORK_PHY_TIMESTAMPING is not set @@ -1031,6 +1062,7 @@ CONFIG_NFT_REJECT=y # CONFIG_NFT_SOCKET is not set # CONFIG_NFT_OSF is not set # CONFIG_NFT_TPROXY is not set +# CONFIG_NFT_SYNPROXY is not set # CONFIG_NF_FLOW_TABLE is not set CONFIG_NETFILTER_XTABLES=y @@ -1172,7 +1204,9 @@ CONFIG_IP_NF_SECURITY=y CONFIG_NF_DEFRAG_IPV6=y CONFIG_NF_TABLES_BRIDGE=y +# CONFIG_NFT_BRIDGE_META is not set CONFIG_NF_LOG_BRIDGE=y +# CONFIG_NF_CONNTRACK_BRIDGE is not set CONFIG_BRIDGE_NF_EBTABLES=y CONFIG_BRIDGE_EBT_BROUTE=y CONFIG_BRIDGE_EBT_T_FILTER=y @@ -1223,6 +1257,7 @@ CONFIG_LLC=y # CONFIG_OPENVSWITCH is not set CONFIG_VSOCKETS=y CONFIG_VSOCKETS_DIAG=y +# CONFIG_VSOCKETS_LOOPBACK is not set CONFIG_VIRTIO_VSOCKETS=y CONFIG_VIRTIO_VSOCKETS_COMMON=y CONFIG_NETLINK_DIAG=y @@ -1273,6 +1308,7 @@ CONFIG_BT_RTL=m CONFIG_BT_HCIBTUSB=m # CONFIG_BT_HCIBTUSB_AUTOSUSPEND is not set CONFIG_BT_HCIBTUSB_BCM=y +# CONFIG_BT_HCIBTUSB_MTK is not set CONFIG_BT_HCIBTUSB_RTL=y # CONFIG_BT_HCIBTSDIO is not set # CONFIG_BT_HCIUART is not set @@ -1337,6 +1373,7 @@ CONFIG_GRO_CELLS=y CONFIG_NET_DEVLINK=y CONFIG_PAGE_POOL=y CONFIG_FAILOVER=y +# CONFIG_ETHTOOL_NETLINK is not set CONFIG_HAVE_EBPF_JIT=y # @@ -1351,7 +1388,6 @@ CONFIG_PCIEPORTBUS=y CONFIG_HOTPLUG_PCI_PCIE=y # CONFIG_PCIEAER is not set CONFIG_PCIEASPM=y -# CONFIG_PCIEASPM_DEBUG is not set # CONFIG_PCIEASPM_DEFAULT is not set CONFIG_PCIEASPM_POWERSAVE=y # CONFIG_PCIEASPM_POWER_SUPERSAVE is not set @@ -1381,12 +1417,6 @@ CONFIG_HOTPLUG_PCI_ACPI_IBM=m # # PCI controller drivers # - -# -# Cadence PCIe controllers support -# -# end of Cadence PCIe controllers support - # CONFIG_VMD is not set # @@ -1395,6 +1425,11 @@ CONFIG_HOTPLUG_PCI_ACPI_IBM=m # CONFIG_PCIE_DW_PLAT_HOST is not set # CONFIG_PCI_MESON is not set # end of DesignWare PCI Core Support + +# +# Cadence PCIe controllers support +# +# end of Cadence PCIe controllers support # end of PCI controller drivers # @@ -1427,6 +1462,8 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y CONFIG_EXTRA_FIRMWARE="" # CONFIG_FW_LOADER_USER_HELPER is not set +# CONFIG_FW_LOADER_COMPRESS is not set +# CONFIG_FW_CACHE is not set # end of Firmware loader CONFIG_WANT_DEV_COREDUMP=y @@ -1440,7 +1477,7 @@ CONFIG_GENERIC_CPU_AUTOPROBE=y CONFIG_GENERIC_CPU_VULNERABILITIES=y CONFIG_REGMAP=y CONFIG_REGMAP_I2C=y -CONFIG_REGMAP_SPI=y +CONFIG_REGMAP_SPI=m CONFIG_REGMAP_IRQ=y CONFIG_DMA_SHARED_BUFFER=y # CONFIG_DMA_FENCE_TRACE is not set @@ -1484,7 +1521,6 @@ CONFIG_BLK_DEV_NBD=m # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set CONFIG_VIRTIO_BLK=y -# CONFIG_VIRTIO_BLK_SCSI is not set # CONFIG_BLK_DEV_RBD is not set # CONFIG_BLK_DEV_RSXX is not set @@ -1494,6 +1530,7 @@ CONFIG_VIRTIO_BLK=y CONFIG_NVME_CORE=y CONFIG_BLK_DEV_NVME=y # CONFIG_NVME_MULTIPATH is not set +# CONFIG_NVME_HWMON is not set # CONFIG_NVME_FC is not set # CONFIG_NVME_TCP is not set # CONFIG_NVME_TARGET is not set @@ -1506,7 +1543,6 @@ CONFIG_BLK_DEV_NVME=y # CONFIG_DUMMY_IRQ is not set # CONFIG_IBM_ASM is not set # CONFIG_PHANTOM is not set -# CONFIG_SGI_IOC4 is not set CONFIG_TIFM_CORE=m # CONFIG_TIFM_7XX1 is not set # CONFIG_ICS932S401 is not set @@ -1520,10 +1556,10 @@ CONFIG_TIFM_CORE=m # CONFIG_SENSORS_APDS990X is not set # CONFIG_HMC6352 is not set # CONFIG_DS1682 is not set -# CONFIG_USB_SWITCH_FSA9480 is not set # CONFIG_LATTICE_ECP3_CONFIG is not set # CONFIG_SRAM is not set # CONFIG_PCI_ENDPOINT_TEST is not set +# CONFIG_XILINX_SDFEC is not set # CONFIG_PVPANIC is not set # CONFIG_C2PORT is not set @@ -1561,41 +1597,9 @@ CONFIG_INTEL_MEI_HDCP=m # # Intel MIC & related support # - -# -# Intel MIC Bus Driver -# # CONFIG_INTEL_MIC_BUS is not set - -# -# SCIF Bus Driver -# # CONFIG_SCIF_BUS is not set - -# -# VOP Bus Driver -# # CONFIG_VOP_BUS is not set - -# -# Intel MIC Host Driver -# - -# -# Intel MIC Card Driver -# - -# -# SCIF Driver -# - -# -# Intel MIC Coprocessor State Management (COSM) Drivers -# - -# -# VOP Driver -# # end of Intel MIC & related support # CONFIG_GENWQE is not set @@ -1623,7 +1627,6 @@ CONFIG_SCSI_DMA=y # CONFIG_BLK_DEV_SD=y # CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set # CONFIG_BLK_DEV_SR is not set CONFIG_CHR_DEV_SG=y # CONFIG_CHR_DEV_SCH is not set @@ -1682,6 +1685,7 @@ CONFIG_SCSI_MPT3SAS_MAX_SGE=128 # CONFIG_VMWARE_PVSCSI is not set # CONFIG_SCSI_SNIC is not set # CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_FDOMAIN_PCI is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_ISCI is not set # CONFIG_SCSI_IPS is not set @@ -1814,6 +1818,7 @@ CONFIG_DM_THIN_PROVISIONING=y # CONFIG_DM_CACHE is not set # CONFIG_DM_WRITECACHE is not set # CONFIG_DM_ERA is not set +# CONFIG_DM_CLONE is not set # CONFIG_DM_MIRROR is not set # CONFIG_DM_RAID is not set # CONFIG_DM_ZERO is not set @@ -1824,6 +1829,7 @@ CONFIG_DM_THIN_PROVISIONING=y CONFIG_DM_UEVENT=y # CONFIG_DM_FLAKEY is not set CONFIG_DM_VERITY=y +# CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG is not set CONFIG_DM_VERITY_FEC=y # CONFIG_DM_SWITCH is not set # CONFIG_DM_LOG_WRITES is not set @@ -1847,6 +1853,8 @@ CONFIG_MII=m CONFIG_NET_CORE=y # CONFIG_BONDING is not set # CONFIG_DUMMY is not set +CONFIG_WIREGUARD=y +CONFIG_WIREGUARD_DEBUG=y # CONFIG_EQUALIZER is not set # CONFIG_NET_FC is not set # CONFIG_NET_TEAM is not set @@ -1865,10 +1873,6 @@ CONFIG_VIRTIO_NET=y # CONFIG_VSOCKMON is not set # CONFIG_ARCNET is not set -# -# CAIF transport drivers -# - # # Distributed Switch Architecture drivers # @@ -1931,7 +1935,7 @@ CONFIG_SUNDANCE=m CONFIG_SUNDANCE_MMIO=y # CONFIG_NET_VENDOR_EMULEX is not set # CONFIG_NET_VENDOR_EZCHIP is not set -# CONFIG_NET_VENDOR_HP is not set +# CONFIG_NET_VENDOR_GOOGLE is not set CONFIG_NET_VENDOR_HUAWEI=y # CONFIG_HINIC is not set # CONFIG_NET_VENDOR_I825XX is not set @@ -1974,6 +1978,7 @@ CONFIG_MLX5_EN_RXNFC=y CONFIG_MLX5_MPFS=y CONFIG_MLX5_ESWITCH=y # CONFIG_MLX5_CORE_IPOIB is not set +# CONFIG_MLX5_SW_STEERING is not set # CONFIG_MLXSW_CORE is not set # CONFIG_MLXFW is not set # CONFIG_NET_VENDOR_MICREL is not set @@ -1995,6 +2000,7 @@ CONFIG_NET_VENDOR_NI=y CONFIG_NET_VENDOR_PACKET_ENGINES=y # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set +# CONFIG_NET_VENDOR_PENSANDO is not set # CONFIG_NET_VENDOR_QLOGIC is not set # CONFIG_NET_VENDOR_QUALCOMM is not set # CONFIG_NET_VENDOR_RDC is not set @@ -2025,6 +2031,7 @@ CONFIG_NET_VENDOR_SOCIONEXT=y # CONFIG_NET_VENDOR_VIA is not set # CONFIG_NET_VENDOR_WIZNET is not set CONFIG_NET_VENDOR_XILINX=y +# CONFIG_XILINX_AXI_EMAC is not set # CONFIG_XILINX_LL_TEMAC is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set @@ -2042,14 +2049,15 @@ CONFIG_SWPHY=y # # MII PHY device drivers # +# CONFIG_ADIN_PHY is not set # CONFIG_AMD_PHY is not set # CONFIG_AQUANTIA_PHY is not set # CONFIG_AX88796B_PHY is not set -# CONFIG_AT803X_PHY is not set CONFIG_BCM7XXX_PHY=m CONFIG_BCM87XX_PHY=m CONFIG_BCM_NET_PHYLIB=m CONFIG_BROADCOM_PHY=m +# CONFIG_BCM84881_PHY is not set # CONFIG_CICADA_PHY is not set # CONFIG_CORTINA_PHY is not set # CONFIG_DAVICOM_PHY is not set @@ -2057,6 +2065,7 @@ CONFIG_BROADCOM_PHY=m # CONFIG_DP83TC811_PHY is not set # CONFIG_DP83848_PHY is not set # CONFIG_DP83867_PHY is not set +# CONFIG_DP83869_PHY is not set CONFIG_FIXED_PHY=y # CONFIG_ICPLUS_PHY is not set # CONFIG_INTEL_XWAY_PHY is not set @@ -2069,6 +2078,7 @@ CONFIG_MICROCHIP_PHY=m # CONFIG_MICROCHIP_T1_PHY is not set # CONFIG_MICROSEMI_PHY is not set # CONFIG_NATIONAL_PHY is not set +# CONFIG_NXP_TJA11XX_PHY is not set # CONFIG_QSEMI_PHY is not set CONFIG_REALTEK_PHY=m # CONFIG_RENESAS_PHY is not set @@ -2140,6 +2150,7 @@ CONFIG_ATH9K_PCI=y CONFIG_ATH9K_RFKILL=y # CONFIG_ATH9K_CHANNEL_CONTEXT is not set CONFIG_ATH9K_PCOEM=y +# CONFIG_ATH9K_PCI_NO_EEPROM is not set CONFIG_ATH9K_HTC=m # CONFIG_ATH9K_HTC_DEBUGFS is not set CONFIG_ATH9K_HWRNG=y @@ -2215,7 +2226,6 @@ CONFIG_IWLDVM=m CONFIG_IWLMVM=m CONFIG_IWLWIFI_OPMODE_MODULAR=y # CONFIG_IWLWIFI_BCAST_FILTERING is not set -CONFIG_IWLWIFI_PCIE_RTPM=y # # Debugging Options @@ -2275,6 +2285,7 @@ CONFIG_INPUT_KEYBOARD=y # CONFIG_KEYBOARD_ADC is not set # CONFIG_KEYBOARD_ADP5588 is not set # CONFIG_KEYBOARD_ADP5589 is not set +# CONFIG_KEYBOARD_APPLESPI is not set CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_QT1050 is not set # CONFIG_KEYBOARD_QT1070 is not set @@ -2508,6 +2519,7 @@ CONFIG_SERIAL_EARLYCON=y CONFIG_SERIAL_8250=y # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_PNP=y +# CONFIG_SERIAL_8250_16550A_VARIANTS is not set # CONFIG_SERIAL_8250_FINTEK is not set CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DMA=y @@ -2516,11 +2528,11 @@ CONFIG_SERIAL_8250_EXAR=y CONFIG_SERIAL_8250_NR_UARTS=32 CONFIG_SERIAL_8250_RUNTIME_UARTS=32 # CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_DWLIB=y # CONFIG_SERIAL_8250_DW is not set # CONFIG_SERIAL_8250_RT288X is not set CONFIG_SERIAL_8250_LPSS=y # CONFIG_SERIAL_8250_MID is not set -# CONFIG_SERIAL_8250_MOXA is not set # # Non-8250 serial port support @@ -2539,8 +2551,10 @@ CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_ARC is not set # CONFIG_SERIAL_RP2 is not set # CONFIG_SERIAL_FSL_LPUART is not set +# CONFIG_SERIAL_FSL_LINFLEXUART is not set # end of Serial drivers +CONFIG_SERIAL_MCTRL_GPIO=y # CONFIG_SERIAL_DEV_BUS is not set # CONFIG_TTY_PRINTK is not set CONFIG_HVC_DRIVER=y @@ -2554,6 +2568,7 @@ CONFIG_IPMI_SI=m CONFIG_IPMI_SSIF=m CONFIG_IPMI_WATCHDOG=m CONFIG_IPMI_POWEROFF=m +# CONFIG_IPMB_DEVICE_INTERFACE is not set CONFIG_HW_RANDOM=y # CONFIG_HW_RANDOM_TIMERIOMEM is not set CONFIG_HW_RANDOM_INTEL=m @@ -2589,6 +2604,7 @@ CONFIG_DEVPORT=y # end of Character devices # CONFIG_RANDOM_TRUST_CPU is not set +# CONFIG_RANDOM_TRUST_BOOTLOADER is not set # # I2C support @@ -2666,7 +2682,6 @@ CONFIG_I2C_DESIGNWARE_BAYTRAIL=y # External I2C/SMBus adapter drivers # # CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_ROBOTFUZZ_OSIF is not set # CONFIG_I2C_TAOS_EVM is not set # CONFIG_I2C_TINY_USB is not set @@ -2747,6 +2762,7 @@ CONFIG_PTP_1588_CLOCK=m # Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. # CONFIG_PTP_1588_CLOCK_KVM=m +# CONFIG_PTP_1588_CLOCK_IDTCM is not set # end of PTP clock support CONFIG_PINCTRL=y @@ -2759,6 +2775,7 @@ CONFIG_PINCTRL_AMD=m # CONFIG_PINCTRL_SX150X is not set CONFIG_PINCTRL_BAYTRAIL=y CONFIG_PINCTRL_CHERRYVIEW=y +# CONFIG_PINCTRL_LYNXPOINT is not set CONFIG_PINCTRL_INTEL=m CONFIG_PINCTRL_BROXTON=m # CONFIG_PINCTRL_CANNONLAKE is not set @@ -2768,6 +2785,7 @@ CONFIG_PINCTRL_BROXTON=m # CONFIG_PINCTRL_ICELAKE is not set # CONFIG_PINCTRL_LEWISBURG is not set CONFIG_PINCTRL_SUNRISEPOINT=m +# CONFIG_PINCTRL_TIGERLAKE is not set CONFIG_GPIOLIB=y CONFIG_GPIOLIB_FASTPATH_LIMIT=512 CONFIG_GPIO_ACPI=y @@ -2783,9 +2801,9 @@ CONFIG_GPIOLIB_IRQCHIP=y # CONFIG_GPIO_EXAR is not set # CONFIG_GPIO_GENERIC_PLATFORM is not set CONFIG_GPIO_ICH=m -CONFIG_GPIO_LYNXPOINT=m # CONFIG_GPIO_MB86S7X is not set # CONFIG_GPIO_VX855 is not set +# CONFIG_GPIO_XILINX is not set CONFIG_GPIO_AMD_FCH=m # end of Memory mapped GPIO drivers @@ -2849,6 +2867,7 @@ CONFIG_GPIO_AMD_FCH=m # CONFIG_POWER_RESET is not set CONFIG_POWER_SUPPLY=y # CONFIG_POWER_SUPPLY_DEBUG is not set +# CONFIG_POWER_SUPPLY_HWMON is not set # CONFIG_PDA_POWER is not set # CONFIG_GENERIC_ADC_BATTERY is not set # CONFIG_TEST_POWER is not set @@ -2890,6 +2909,7 @@ CONFIG_SENSORS_AD7314=m # CONFIG_SENSORS_ADM1026 is not set # CONFIG_SENSORS_ADM1029 is not set # CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM1177 is not set # CONFIG_SENSORS_ADM9240 is not set # CONFIG_SENSORS_ADT7310 is not set # CONFIG_SENSORS_ADT7410 is not set @@ -2897,6 +2917,7 @@ CONFIG_SENSORS_AD7314=m # CONFIG_SENSORS_ADT7462 is not set # CONFIG_SENSORS_ADT7470 is not set # CONFIG_SENSORS_ADT7475 is not set +# CONFIG_SENSORS_AS370 is not set # CONFIG_SENSORS_ASC7621 is not set # CONFIG_SENSORS_K8TEMP is not set # CONFIG_SENSORS_K10TEMP is not set @@ -2905,6 +2926,7 @@ CONFIG_SENSORS_APPLESMC=m # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_ASPEED is not set # CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DRIVETEMP is not set # CONFIG_SENSORS_DS620 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_DELL_SMM is not set @@ -2928,6 +2950,8 @@ CONFIG_SENSORS_CORETEMP=m # CONFIG_SENSORS_POWR1220 is not set # CONFIG_SENSORS_LINEAGE is not set # CONFIG_SENSORS_LTC2945 is not set +# CONFIG_SENSORS_LTC2947_I2C is not set +# CONFIG_SENSORS_LTC2947_SPI is not set # CONFIG_SENSORS_LTC2990 is not set # CONFIG_SENSORS_LTC4151 is not set # CONFIG_SENSORS_LTC4215 is not set @@ -2941,6 +2965,7 @@ CONFIG_SENSORS_CORETEMP=m # CONFIG_SENSORS_MAX1668 is not set # CONFIG_SENSORS_MAX197 is not set # CONFIG_SENSORS_MAX31722 is not set +# CONFIG_SENSORS_MAX31730 is not set # CONFIG_SENSORS_MAX6621 is not set # CONFIG_SENSORS_MAX6639 is not set # CONFIG_SENSORS_MAX6642 is not set @@ -2991,7 +3016,6 @@ CONFIG_SENSORS_CORETEMP=m # CONFIG_SENSORS_STTS751 is not set # CONFIG_SENSORS_SMM665 is not set # CONFIG_SENSORS_ADC128D818 is not set -# CONFIG_SENSORS_ADS1015 is not set # CONFIG_SENSORS_ADS7828 is not set # CONFIG_SENSORS_ADS7871 is not set # CONFIG_SENSORS_AMC6821 is not set @@ -3005,6 +3029,7 @@ CONFIG_SENSORS_CORETEMP=m # CONFIG_SENSORS_TMP108 is not set # CONFIG_SENSORS_TMP401 is not set # CONFIG_SENSORS_TMP421 is not set +# CONFIG_SENSORS_TMP513 is not set # CONFIG_SENSORS_VIA_CPUTEMP is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_VT1211 is not set @@ -3034,12 +3059,10 @@ CONFIG_THERMAL_WRITABLE_TRIPS=y CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y # CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set # CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -# CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR is not set CONFIG_THERMAL_GOV_FAIR_SHARE=y CONFIG_THERMAL_GOV_STEP_WISE=y CONFIG_THERMAL_GOV_BANG_BANG=y CONFIG_THERMAL_GOV_USER_SPACE=y -# CONFIG_THERMAL_GOV_POWER_ALLOCATOR is not set # CONFIG_CLOCK_THERMAL is not set # CONFIG_DEVFREQ_THERMAL is not set CONFIG_THERMAL_EMULATION=y @@ -3058,6 +3081,7 @@ CONFIG_INTEL_SOC_DTS_THERMAL=m CONFIG_INT340X_THERMAL=m CONFIG_ACPI_THERMAL_REL=m CONFIG_INT3406_THERMAL=m +CONFIG_PROC_THERMAL_MMIO_RAPL=y # end of ACPI INT340X thermal drivers CONFIG_INTEL_PCH_THERMAL=m @@ -3098,7 +3122,6 @@ CONFIG_MFD_CORE=y # CONFIG_MFD_BCM590XX is not set # CONFIG_MFD_BD9571MWV is not set # CONFIG_MFD_AXP20X_I2C is not set -# CONFIG_MFD_CROS_EC is not set # CONFIG_MFD_MADERA is not set # CONFIG_PMIC_DA903X is not set # CONFIG_MFD_DA9052_SPI is not set @@ -3198,6 +3221,7 @@ CONFIG_MEDIA_CAMERA_SUPPORT=y # CONFIG_MEDIA_CONTROLLER is not set CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L2=m +CONFIG_VIDEO_V4L2_I2C=y # CONFIG_VIDEO_ADV_DEBUG is not set # CONFIG_VIDEO_FIXED_MINOR_RANGES is not set @@ -3257,29 +3281,91 @@ CONFIG_VIDEOBUF2_DMA_SG=m # CONFIG_MEDIA_SUBDRV_AUTOSELECT=y +# +# I2C Encoders, decoders, sensors and other helper chips +# + # # Audio decoders, processors and mixers # +# CONFIG_VIDEO_TVAUDIO is not set +# CONFIG_VIDEO_TDA7432 is not set +# CONFIG_VIDEO_TDA9840 is not set +# CONFIG_VIDEO_TEA6415C is not set +# CONFIG_VIDEO_TEA6420 is not set +# CONFIG_VIDEO_MSP3400 is not set +# CONFIG_VIDEO_CS3308 is not set +# CONFIG_VIDEO_CS5345 is not set +# CONFIG_VIDEO_CS53L32A is not set +# CONFIG_VIDEO_TLV320AIC23B is not set +# CONFIG_VIDEO_UDA1342 is not set +# CONFIG_VIDEO_WM8775 is not set +# CONFIG_VIDEO_WM8739 is not set +# CONFIG_VIDEO_VP27SMPX is not set +# CONFIG_VIDEO_SONY_BTF_MPX is not set # # RDS decoders # +# CONFIG_VIDEO_SAA6588 is not set # # Video decoders # +# CONFIG_VIDEO_ADV7183 is not set +# CONFIG_VIDEO_BT819 is not set +# CONFIG_VIDEO_BT856 is not set +# CONFIG_VIDEO_BT866 is not set +# CONFIG_VIDEO_KS0127 is not set +# CONFIG_VIDEO_ML86V7667 is not set +# CONFIG_VIDEO_SAA7110 is not set +# CONFIG_VIDEO_SAA711X is not set +# CONFIG_VIDEO_TVP514X is not set +# CONFIG_VIDEO_TVP5150 is not set +# CONFIG_VIDEO_TVP7002 is not set +# CONFIG_VIDEO_TW2804 is not set +# CONFIG_VIDEO_TW9903 is not set +# CONFIG_VIDEO_TW9906 is not set +# CONFIG_VIDEO_TW9910 is not set +# CONFIG_VIDEO_VPX3220 is not set # # Video and audio decoders # +# CONFIG_VIDEO_SAA717X is not set +# CONFIG_VIDEO_CX25840 is not set # # Video encoders # +# CONFIG_VIDEO_SAA7127 is not set +# CONFIG_VIDEO_SAA7185 is not set +# CONFIG_VIDEO_ADV7170 is not set +# CONFIG_VIDEO_ADV7175 is not set +# CONFIG_VIDEO_ADV7343 is not set +# CONFIG_VIDEO_ADV7393 is not set +# CONFIG_VIDEO_AK881X is not set +# CONFIG_VIDEO_THS8200 is not set # # Camera sensor devices # +# CONFIG_VIDEO_OV2640 is not set +# CONFIG_VIDEO_OV2659 is not set +# CONFIG_VIDEO_OV6650 is not set +# CONFIG_VIDEO_OV5695 is not set +# CONFIG_VIDEO_OV772X is not set +# CONFIG_VIDEO_OV7640 is not set +# CONFIG_VIDEO_OV7670 is not set +# CONFIG_VIDEO_OV7740 is not set +# CONFIG_VIDEO_OV9640 is not set +# CONFIG_VIDEO_VS6624 is not set +# CONFIG_VIDEO_MT9M111 is not set +# CONFIG_VIDEO_MT9T112 is not set +# CONFIG_VIDEO_MT9V011 is not set +# CONFIG_VIDEO_MT9V111 is not set +# CONFIG_VIDEO_SR030PC30 is not set +# CONFIG_VIDEO_RJ54N1 is not set # # Lens drivers @@ -3292,10 +3378,13 @@ CONFIG_MEDIA_SUBDRV_AUTOSELECT=y # # Video improvement chips # +# CONFIG_VIDEO_UPD64031A is not set +# CONFIG_VIDEO_UPD64083 is not set # # Audio/Video compression chips # +# CONFIG_VIDEO_SAA6752HS is not set # # SDR tuner chips @@ -3304,15 +3393,29 @@ CONFIG_MEDIA_SUBDRV_AUTOSELECT=y # # Miscellaneous helper chips # +# CONFIG_VIDEO_THS7303 is not set +# CONFIG_VIDEO_M52790 is not set +# CONFIG_VIDEO_I2C is not set +# end of I2C Encoders, decoders, sensors and other helper chips + +# +# SPI helper chips +# +# end of SPI helper chips # # Media SPI Adapters # # end of Media SPI Adapters +# +# Customise DVB Frontends +# + # # Tools to develop new frontends # +# end of Customise DVB Frontends # # Graphics support @@ -3333,12 +3436,16 @@ CONFIG_DRM_MIPI_DSI=y # CONFIG_DRM_DEBUG_SELFTEST is not set CONFIG_DRM_KMS_HELPER=y CONFIG_DRM_KMS_FB_HELPER=y +# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set CONFIG_DRM_FBDEV_EMULATION=y CONFIG_DRM_FBDEV_OVERALLOC=100 # CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set # CONFIG_DRM_LOAD_EDID_FIRMWARE is not set # CONFIG_DRM_DP_CEC is not set CONFIG_DRM_TTM=y +CONFIG_DRM_TTM_DMA_PAGE_POOL=y +CONFIG_DRM_VRAM_HELPER=y +CONFIG_DRM_TTM_HELPER=y CONFIG_DRM_GEM_SHMEM_HELPER=y CONFIG_DRM_SCHED=m @@ -3374,8 +3481,8 @@ CONFIG_DRM_AMD_ACP=y # Display Engine Configuration # CONFIG_DRM_AMD_DC=y -CONFIG_DRM_AMD_DC_DCN1_0=y -CONFIG_DRM_AMD_DC_DCN1_01=y +CONFIG_DRM_AMD_DC_DCN=y +# CONFIG_DRM_AMD_DC_HDCP is not set # CONFIG_DEBUG_KERNEL_DC is not set # end of Display Engine Configuration @@ -3388,6 +3495,7 @@ CONFIG_NOUVEAU_DEBUG_DEFAULT=3 CONFIG_DRM_NOUVEAU_BACKLIGHT=y CONFIG_DRM_I915=y # CONFIG_DRM_I915_ALPHA_SUPPORT is not set +CONFIG_DRM_I915_FORCE_PROBE="" CONFIG_DRM_I915_CAPTURE_ERROR=y CONFIG_DRM_I915_COMPRESS_ERROR=y CONFIG_DRM_I915_USERPTR=y @@ -3398,6 +3506,7 @@ CONFIG_DRM_I915_GVT=y # # CONFIG_DRM_I915_WERROR is not set # CONFIG_DRM_I915_DEBUG is not set +# CONFIG_DRM_I915_DEBUG_MMIO is not set # CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set # CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set # CONFIG_DRM_I915_DEBUG_GUC is not set @@ -3407,6 +3516,17 @@ CONFIG_DRM_I915_GVT=y # CONFIG_DRM_I915_DEBUG_RUNTIME_PM is not set # end of drm/i915 Debugging +# +# drm/i915 Profile Guided Optimisation +# +CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250 +CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500 +CONFIG_DRM_I915_PREEMPT_TIMEOUT=640 +CONFIG_DRM_I915_SPIN_REQUEST=5 +CONFIG_DRM_I915_STOP_TIMEOUT=100 +CONFIG_DRM_I915_TIMESLICE_DURATION=1 +# end of drm/i915 Profile Guided Optimisation + # CONFIG_DRM_VGEM is not set # CONFIG_DRM_VKMS is not set CONFIG_DRM_VMWGFX=m @@ -3437,8 +3557,14 @@ CONFIG_DRM_PANEL_BRIDGE=y # end of Display Interface Bridges # CONFIG_DRM_ETNAVIV is not set -# CONFIG_DRM_HISI_HIBMC is not set -# CONFIG_DRM_TINYDRM is not set +# CONFIG_DRM_GM12U320 is not set +# CONFIG_TINYDRM_HX8357D is not set +# CONFIG_TINYDRM_ILI9225 is not set +# CONFIG_TINYDRM_ILI9341 is not set +# CONFIG_TINYDRM_MI0283QT is not set +# CONFIG_TINYDRM_REPAPER is not set +# CONFIG_TINYDRM_ST7586 is not set +# CONFIG_TINYDRM_ST7735R is not set # CONFIG_DRM_VBOXVIDEO is not set # CONFIG_DRM_LEGACY is not set CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y @@ -3523,7 +3649,7 @@ CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_BACKLIGHT_GENERIC is not set # CONFIG_BACKLIGHT_PWM is not set CONFIG_BACKLIGHT_APPLE=m -# CONFIG_BACKLIGHT_PM8941_WLED is not set +# CONFIG_BACKLIGHT_QCOM_WLED is not set # CONFIG_BACKLIGHT_SAHARA is not set # CONFIG_BACKLIGHT_ADP8860 is not set # CONFIG_BACKLIGHT_ADP8870 is not set @@ -3690,7 +3816,9 @@ CONFIG_SND_HDA_DSP_LOADER=y CONFIG_SND_HDA_COMPONENT=y CONFIG_SND_HDA_I915=y CONFIG_SND_HDA_EXT_CORE=m -CONFIG_SND_HDA_PREALLOC_SIZE=4096 +CONFIG_SND_HDA_PREALLOC_SIZE=0 +CONFIG_SND_INTEL_NHLT=y +CONFIG_SND_INTEL_DSP_CONFIG=m # CONFIG_SND_SPI is not set CONFIG_SND_USB=y CONFIG_SND_USB_AUDIO=m @@ -3752,12 +3880,16 @@ CONFIG_SND_SOC_INTEL_KBL=m CONFIG_SND_SOC_INTEL_GLK=m CONFIG_SND_SOC_INTEL_CNL=m CONFIG_SND_SOC_INTEL_CFL=m +# CONFIG_SND_SOC_INTEL_CML_H is not set +# CONFIG_SND_SOC_INTEL_CML_LP is not set CONFIG_SND_SOC_INTEL_SKYLAKE_FAMILY=m # CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC is not set CONFIG_SND_SOC_INTEL_SKYLAKE_COMMON=m CONFIG_SND_SOC_ACPI_INTEL_MATCH=m CONFIG_SND_SOC_INTEL_MACH=y +# CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES is not set CONFIG_SND_SOC_INTEL_HASWELL_MACH=m +# CONFIG_SND_SOC_INTEL_BDW_RT5650_MACH is not set CONFIG_SND_SOC_INTEL_BDW_RT5677_MACH=m CONFIG_SND_SOC_INTEL_BROADWELL_MACH=m CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m @@ -3766,12 +3898,15 @@ CONFIG_SND_SOC_INTEL_CHT_BSW_RT5672_MACH=m CONFIG_SND_SOC_INTEL_CHT_BSW_RT5645_MACH=m CONFIG_SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH=m # CONFIG_SND_SOC_INTEL_CHT_BSW_NAU8824_MACH is not set +# CONFIG_SND_SOC_INTEL_BYT_CHT_CX2072X_MACH is not set # CONFIG_SND_SOC_INTEL_BYT_CHT_DA7213_MACH is not set # CONFIG_SND_SOC_INTEL_BYT_CHT_ES8316_MACH is not set # CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH is not set CONFIG_SND_SOC_INTEL_SKL_RT286_MACH=m CONFIG_SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH=m CONFIG_SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH=m +CONFIG_SND_SOC_INTEL_DA7219_MAX98357A_GENERIC=m +CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_COMMON=m CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH=m CONFIG_SND_SOC_INTEL_BXT_RT298_MACH=m # CONFIG_SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH is not set @@ -3779,6 +3914,7 @@ CONFIG_SND_SOC_INTEL_BXT_RT298_MACH=m # CONFIG_SND_SOC_INTEL_KBL_DA7219_MAX98357A_MACH is not set # CONFIG_SND_SOC_INTEL_KBL_DA7219_MAX98927_MACH is not set # CONFIG_SND_SOC_INTEL_KBL_RT5660_MACH is not set +# CONFIG_SND_SOC_INTEL_GLK_DA7219_MAX98357A_MACH is not set # CONFIG_SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH is not set # CONFIG_SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH is not set # CONFIG_SND_SOC_INTEL_SOF_RT5682_MACH is not set @@ -3786,22 +3922,13 @@ CONFIG_SND_SOC_INTEL_BXT_RT298_MACH=m CONFIG_SND_SOC_SOF_TOPLEVEL=y CONFIG_SND_SOC_SOF_PCI=m CONFIG_SND_SOC_SOF_ACPI=m -CONFIG_SND_SOC_SOF_OPTIONS=m -# CONFIG_SND_SOC_SOF_NOCODEC_SUPPORT is not set -# CONFIG_SND_SOC_SOF_STRICT_ABI_CHECKS is not set -# CONFIG_SND_SOC_SOF_DEBUG is not set +# CONFIG_SND_SOC_SOF_DEVELOPER_SUPPORT is not set CONFIG_SND_SOC_SOF=m CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE=y CONFIG_SND_SOC_SOF_INTEL_TOPLEVEL=y CONFIG_SND_SOC_SOF_INTEL_ACPI=m CONFIG_SND_SOC_SOF_INTEL_PCI=m -CONFIG_SND_SOC_SOF_INTEL_HIFI_EP_IPC=m -CONFIG_SND_SOC_SOF_INTEL_ATOM_HIFI_EP=m CONFIG_SND_SOC_SOF_INTEL_COMMON=m -CONFIG_SND_SOC_SOF_BAYTRAIL_SUPPORT=y -CONFIG_SND_SOC_SOF_BAYTRAIL=m -CONFIG_SND_SOC_SOF_BROADWELL_SUPPORT=y -CONFIG_SND_SOC_SOF_BROADWELL=m # CONFIG_SND_SOC_SOF_MERRIFIELD_SUPPORT is not set CONFIG_SND_SOC_SOF_APOLLOLAKE_SUPPORT=y CONFIG_SND_SOC_SOF_APOLLOLAKE=m @@ -3813,9 +3940,16 @@ CONFIG_SND_SOC_SOF_COFFEELAKE_SUPPORT=y CONFIG_SND_SOC_SOF_COFFEELAKE=m CONFIG_SND_SOC_SOF_ICELAKE_SUPPORT=y CONFIG_SND_SOC_SOF_ICELAKE=m +# CONFIG_SND_SOC_SOF_COMETLAKE_LP_SUPPORT is not set +# CONFIG_SND_SOC_SOF_COMETLAKE_H_SUPPORT is not set +# CONFIG_SND_SOC_SOF_TIGERLAKE_SUPPORT is not set +# CONFIG_SND_SOC_SOF_ELKHARTLAKE_SUPPORT is not set +# CONFIG_SND_SOC_SOF_JASPERLAKE_SUPPORT is not set CONFIG_SND_SOC_SOF_HDA_COMMON=m CONFIG_SND_SOC_SOF_HDA_LINK=y CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC=y +# CONFIG_SND_SOC_SOF_HDA_ALWAYS_ENABLE_DMI_L1 is not set +# CONFIG_SND_SOC_SOF_HDA_COMMON_HDMI_CODEC is not set CONFIG_SND_SOC_SOF_HDA_LINK_BASELINE=m CONFIG_SND_SOC_SOF_HDA=m CONFIG_SND_SOC_SOF_XTENSA=m @@ -3840,6 +3974,8 @@ CONFIG_SND_SOC_AC97_CODEC=m # CONFIG_SND_SOC_ADAU1761_I2C is not set # CONFIG_SND_SOC_ADAU1761_SPI is not set # CONFIG_SND_SOC_ADAU7002 is not set +# CONFIG_SND_SOC_ADAU7118_HW is not set +# CONFIG_SND_SOC_ADAU7118_I2C is not set # CONFIG_SND_SOC_AK4104 is not set # CONFIG_SND_SOC_AK4118 is not set # CONFIG_SND_SOC_AK4458 is not set @@ -3870,6 +4006,8 @@ CONFIG_SND_SOC_AC97_CODEC=m # CONFIG_SND_SOC_CS4341 is not set # CONFIG_SND_SOC_CS4349 is not set # CONFIG_SND_SOC_CS53L30 is not set +# CONFIG_SND_SOC_CX2072X is not set +# CONFIG_SND_SOC_DA7213 is not set CONFIG_SND_SOC_DA7219=m CONFIG_SND_SOC_DMIC=m CONFIG_SND_SOC_HDMI_CODEC=m @@ -3928,6 +4066,8 @@ CONFIG_SND_SOC_SSM4567=m # CONFIG_SND_SOC_STA350 is not set # CONFIG_SND_SOC_STI_SAS is not set # CONFIG_SND_SOC_TAS2552 is not set +# CONFIG_SND_SOC_TAS2562 is not set +# CONFIG_SND_SOC_TAS2770 is not set # CONFIG_SND_SOC_TAS5086 is not set # CONFIG_SND_SOC_TAS571X is not set # CONFIG_SND_SOC_TAS5720 is not set @@ -3943,6 +4083,7 @@ CONFIG_SND_SOC_SSM4567=m CONFIG_SND_SOC_TS3A227E=m # CONFIG_SND_SOC_TSCS42XX is not set # CONFIG_SND_SOC_TSCS454 is not set +# CONFIG_SND_SOC_UDA1334 is not set # CONFIG_SND_SOC_WM8510 is not set # CONFIG_SND_SOC_WM8523 is not set # CONFIG_SND_SOC_WM8524 is not set @@ -3970,6 +4111,7 @@ CONFIG_SND_SOC_TS3A227E=m # CONFIG_SND_SOC_MAX9759 is not set # CONFIG_SND_SOC_MT6351 is not set # CONFIG_SND_SOC_MT6358 is not set +# CONFIG_SND_SOC_MT6660 is not set # CONFIG_SND_SOC_NAU8540 is not set # CONFIG_SND_SOC_NAU8810 is not set # CONFIG_SND_SOC_NAU8822 is not set @@ -4014,6 +4156,7 @@ CONFIG_HID_CORSAIR=m # CONFIG_HID_PRODIKEYS is not set CONFIG_HID_CMEDIA=m # CONFIG_HID_CP2112 is not set +# CONFIG_HID_CREATIVE_SB0540 is not set # CONFIG_HID_CYPRESS is not set # CONFIG_HID_DRAGONRISE is not set # CONFIG_HID_EMS_FF is not set @@ -4115,6 +4258,9 @@ CONFIG_INTEL_ISH_FIRMWARE_DOWNLOADER=m CONFIG_USB_OHCI_LITTLE_ENDIAN=y CONFIG_USB_SUPPORT=y CONFIG_USB_COMMON=y +# CONFIG_USB_LED_TRIG is not set +# CONFIG_USB_ULPI_BUS is not set +# CONFIG_USB_CONN_GPIO is not set CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB=y CONFIG_USB_PCI=y @@ -4131,7 +4277,6 @@ CONFIG_USB_DEFAULT_PERSIST=y CONFIG_USB_LEDS_TRIGGER_USBPORT=m CONFIG_USB_AUTOSUSPEND_DELAY=2 CONFIG_USB_MON=y -# CONFIG_USB_WUSB_CBAF is not set # # USB Host Controller Drivers @@ -4197,6 +4342,7 @@ CONFIG_USB_STORAGE=y # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set # CONFIG_USBIP_CORE is not set +# CONFIG_USB_CDNS3 is not set # CONFIG_USB_MUSB_HDRC is not set # CONFIG_USB_DWC3 is not set # CONFIG_USB_DWC2 is not set @@ -4268,7 +4414,6 @@ CONFIG_USB_SERIAL_FTDI_SIO=m # CONFIG_USB_EMI26 is not set # CONFIG_USB_ADUTUX is not set # CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_CYPRESS_CY7C63 is not set @@ -4302,9 +4447,6 @@ CONFIG_USB_APPLEDISPLAY=m # CONFIG_USB_GADGET is not set # CONFIG_TYPEC is not set # CONFIG_USB_ROLE_SWITCH is not set -# CONFIG_USB_LED_TRIG is not set -# CONFIG_USB_ULPI_BUS is not set -# CONFIG_UWB is not set CONFIG_MMC=y CONFIG_MMC_BLOCK=y CONFIG_MMC_BLOCK_MINORS=8 @@ -4316,6 +4458,7 @@ CONFIG_MMC_BLOCK_MINORS=8 # # CONFIG_MMC_DEBUG is not set CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_PCI=y CONFIG_MMC_RICOH_MMC=y CONFIG_MMC_SDHCI_ACPI=y @@ -4373,6 +4516,7 @@ CONFIG_LEDS_CLASS=y # CONFIG_LEDS_MLXREG is not set # CONFIG_LEDS_USER is not set # CONFIG_LEDS_NIC78BX is not set +# CONFIG_LEDS_TI_LMU_COMMON is not set # # LED Triggers @@ -4515,12 +4659,17 @@ CONFIG_DMA_VIRTUAL_CHANNELS=m CONFIG_DMA_ACPI=y # CONFIG_ALTERA_MSGDMA is not set CONFIG_INTEL_IDMA64=m +# CONFIG_INTEL_IDXD is not set # CONFIG_INTEL_IOATDMA is not set +# CONFIG_PLX_DMA is not set # CONFIG_QCOM_HIDMA_MGMT is not set # CONFIG_QCOM_HIDMA is not set CONFIG_DW_DMAC_CORE=y # CONFIG_DW_DMAC is not set CONFIG_DW_DMAC_PCI=y +# CONFIG_DW_EDMA is not set +# CONFIG_DW_EDMA_PCIE is not set +# CONFIG_SF_PDMA is not set # # DMA Clients @@ -4534,6 +4683,8 @@ CONFIG_DW_DMAC_PCI=y CONFIG_SYNC_FILE=y # CONFIG_SW_SYNC is not set # CONFIG_UDMABUF is not set +# CONFIG_DMABUF_SELFTESTS is not set +# CONFIG_DMABUF_HEAPS is not set # end of DMABUF options # CONFIG_AUXDISPLAY is not set @@ -4554,6 +4705,7 @@ CONFIG_VIRTIO=y CONFIG_VIRTIO_MENU=y CONFIG_VIRTIO_PCI=y # CONFIG_VIRTIO_PCI_LEGACY is not set +# CONFIG_VIRTIO_PMEM is not set CONFIG_VIRTIO_BALLOON=y CONFIG_VIRTIO_INPUT=y # CONFIG_VIRTIO_MMIO is not set @@ -4564,6 +4716,7 @@ CONFIG_VIRTIO_INPUT=y # CONFIG_HYPERV is not set # end of Microsoft Hyper-V guest support +# CONFIG_GREYBUS is not set CONFIG_STAGING=y # CONFIG_PRISM2_USB is not set # CONFIG_COMEDI is not set @@ -4667,7 +4820,6 @@ CONFIG_STAGING_MEDIA=y # CONFIG_WILC1000_SPI is not set # CONFIG_MOST is not set # CONFIG_KS7010 is not set -# CONFIG_GREYBUS is not set # CONFIG_PI433 is not set # @@ -4676,9 +4828,14 @@ CONFIG_STAGING_MEDIA=y # CONFIG_STAGING_GASKET_FRAMEWORK is not set # end of Gasket devices -# CONFIG_EROFS_FS is not set # CONFIG_FIELDBUS_DEV is not set # CONFIG_KPC2000 is not set +# CONFIG_USB_WUSB_CBAF is not set +# CONFIG_UWB is not set +# CONFIG_STAGING_EXFAT_FS is not set +# CONFIG_QLGE is not set +# CONFIG_NET_VENDOR_HP is not set +# CONFIG_WFX is not set CONFIG_X86_PLATFORM_DEVICES=y CONFIG_ACER_WMI=m # CONFIG_ACER_WIRELESS is not set @@ -4728,6 +4885,7 @@ CONFIG_ASUS_WIRELESS=m CONFIG_ACPI_WMI=m CONFIG_WMI_BMOF=m # CONFIG_INTEL_WMI_THUNDERBOLT is not set +# CONFIG_XIAOMI_WMI is not set CONFIG_MSI_WMI=m # CONFIG_PEAQ_WMI is not set # CONFIG_TOPSTAR_LAPTOP is not set @@ -4735,6 +4893,7 @@ CONFIG_ACPI_TOSHIBA=m CONFIG_TOSHIBA_BT_RFKILL=m CONFIG_TOSHIBA_HAPS=m CONFIG_TOSHIBA_WMI=m +# CONFIG_ACPI_CMPC is not set # CONFIG_INTEL_INT0002_VGPIO is not set CONFIG_INTEL_HID_EVENT=m # CONFIG_INTEL_VBTN is not set @@ -4744,6 +4903,7 @@ CONFIG_INTEL_PMC_CORE=y CONFIG_SAMSUNG_LAPTOP=m CONFIG_MXM_WMI=m # CONFIG_INTEL_OAKTRAIL is not set +# CONFIG_SAMSUNG_Q10 is not set CONFIG_APPLE_GMUX=m CONFIG_INTEL_RST=m CONFIG_INTEL_SMARTCONNECT=y @@ -4757,11 +4917,22 @@ CONFIG_INTEL_PUNIT_IPC=m # CONFIG_INTEL_ATOMISP2_PM is not set # CONFIG_HUAWEI_WMI is not set # CONFIG_PCENGINES_APU2 is not set +# CONFIG_INTEL_UNCORE_FREQ_CONTROL is not set + +# +# Intel Speed Select Technology interface support +# +# CONFIG_INTEL_SPEED_SELECT_INTERFACE is not set +# end of Intel Speed Select Technology interface support + +# CONFIG_SYSTEM76_ACPI is not set CONFIG_PMC_ATOM=y +# CONFIG_MFD_CROS_EC is not set CONFIG_CHROME_PLATFORMS=y CONFIG_CHROMEOS_LAPTOP=m CONFIG_CHROMEOS_PSTORE=m # CONFIG_CHROMEOS_TBMC is not set +# CONFIG_CROS_EC is not set CONFIG_CROS_KBD_LED_BACKLIGHT=m # CONFIG_MELLANOX_PLATFORM is not set CONFIG_CLKDEV_LOOKUP=y @@ -4772,6 +4943,7 @@ CONFIG_COMMON_CLK=y # Common Clock Framework # # CONFIG_COMMON_CLK_MAX9485 is not set +# CONFIG_COMMON_CLK_SI5341 is not set # CONFIG_COMMON_CLK_SI5351 is not set # CONFIG_COMMON_CLK_SI544 is not set # CONFIG_COMMON_CLK_CDCE706 is not set @@ -4802,6 +4974,7 @@ CONFIG_IOMMU_SUPPORT=y # CONFIG_IOMMU_DEBUGFS is not set # CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set +CONFIG_IOMMU_DMA=y CONFIG_AMD_IOMMU=y CONFIG_AMD_IOMMU_V2=m CONFIG_DMAR_TABLE=y @@ -4809,6 +4982,7 @@ CONFIG_INTEL_IOMMU=y # CONFIG_INTEL_IOMMU_SVM is not set CONFIG_INTEL_IOMMU_DEFAULT_ON=y CONFIG_INTEL_IOMMU_FLOPPY_WA=y +# CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON is not set CONFIG_IRQ_REMAP=y # @@ -4855,13 +5029,6 @@ CONFIG_IRQ_REMAP=y # # end of i.MX SoC drivers -# -# IXP4xx SoC drivers -# -# CONFIG_IXP4XX_QMGR is not set -# CONFIG_IXP4XX_NPE is not set -# end of IXP4xx SoC drivers - # # Qualcomm SoC drivers # @@ -4897,6 +5064,7 @@ CONFIG_EXTCON=y # Extcon Device Drivers # # CONFIG_EXTCON_ADC_JACK is not set +# CONFIG_EXTCON_FSA9480 is not set # CONFIG_EXTCON_GPIO is not set # CONFIG_EXTCON_INTEL_INT3496 is not set # CONFIG_EXTCON_MAX3355 is not set @@ -4928,13 +5096,13 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 # CONFIG_ADXL372_I2C is not set # CONFIG_BMA180 is not set # CONFIG_BMA220 is not set +# CONFIG_BMA400 is not set # CONFIG_BMC150_ACCEL is not set # CONFIG_DA280 is not set # CONFIG_DA311 is not set # CONFIG_DMARD09 is not set # CONFIG_DMARD10 is not set # CONFIG_HID_SENSOR_ACCEL_3D is not set -# CONFIG_IIO_CROS_EC_ACCEL_LEGACY is not set # CONFIG_IIO_ST_ACCEL_3AXIS is not set # CONFIG_KXSD9 is not set # CONFIG_KXCJK1013 is not set @@ -4955,9 +5123,11 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 # # Analog to digital converters # +# CONFIG_AD7091R5 is not set # CONFIG_AD7124 is not set # CONFIG_AD7266 is not set # CONFIG_AD7291 is not set +# CONFIG_AD7292 is not set # CONFIG_AD7298 is not set # CONFIG_AD7476 is not set # CONFIG_AD7606_IFACE_PARALLEL is not set @@ -4976,6 +5146,7 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 # CONFIG_INA2XX_ADC is not set # CONFIG_LTC2471 is not set # CONFIG_LTC2485 is not set +# CONFIG_LTC2496 is not set # CONFIG_LTC2497 is not set # CONFIG_MAX1027 is not set # CONFIG_MAX11100 is not set @@ -4996,6 +5167,7 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 # CONFIG_TI_ADS1015 is not set # CONFIG_TI_ADS7950 is not set # CONFIG_TI_TLC4541 is not set +# CONFIG_XILINX_XADC is not set # end of Analog to digital converters # @@ -5088,6 +5260,7 @@ CONFIG_HID_SENSOR_IIO_TRIGGER=m # Phase-Locked Loop (PLL) frequency synthesizers # # CONFIG_ADF4350 is not set +# CONFIG_ADF4371 is not set # end of Phase-Locked Loop (PLL) frequency synthesizers # end of Frequency Synthesizers DDS/PLL @@ -5138,9 +5311,12 @@ CONFIG_HID_SENSOR_GYRO_3D=m # Inertial measurement units # # CONFIG_ADIS16400 is not set +# CONFIG_ADIS16460 is not set # CONFIG_ADIS16480 is not set # CONFIG_BMI160_I2C is not set # CONFIG_BMI160_SPI is not set +# CONFIG_FXOS8700_I2C is not set +# CONFIG_FXOS8700_SPI is not set # CONFIG_KMX61 is not set # CONFIG_INV_MPU6050_I2C is not set # CONFIG_INV_MPU6050_SPI is not set @@ -5152,6 +5328,7 @@ CONFIG_HID_SENSOR_GYRO_3D=m # CONFIG_ACPI_ALS=m # CONFIG_ADJD_S311 is not set +# CONFIG_ADUX1020 is not set # CONFIG_AL3320A is not set # CONFIG_APDS9300 is not set # CONFIG_APDS9960 is not set @@ -5173,6 +5350,7 @@ CONFIG_HID_SENSOR_PROX=m # CONFIG_LV0104CS is not set # CONFIG_MAX44000 is not set # CONFIG_MAX44009 is not set +# CONFIG_NOA1305 is not set # CONFIG_OPT3001 is not set # CONFIG_PA12203001 is not set # CONFIG_SI1133 is not set @@ -5188,6 +5366,7 @@ CONFIG_HID_SENSOR_PROX=m # CONFIG_US5182D is not set # CONFIG_VCNL4000 is not set # CONFIG_VCNL4035 is not set +# CONFIG_VEML6030 is not set # CONFIG_VEML6070 is not set # CONFIG_VL6180 is not set # CONFIG_ZOPT2201 is not set @@ -5234,6 +5413,7 @@ CONFIG_IIO_SYSFS_TRIGGER=m # # CONFIG_AD5272 is not set # CONFIG_DS1803 is not set +# CONFIG_MAX5432 is not set # CONFIG_MAX5481 is not set # CONFIG_MAX5487 is not set # CONFIG_MCP4018 is not set @@ -5254,6 +5434,8 @@ CONFIG_IIO_SYSFS_TRIGGER=m # # CONFIG_ABP060MG is not set # CONFIG_BMP280 is not set +# CONFIG_DLHL60D is not set +# CONFIG_DPS310 is not set CONFIG_HID_SENSOR_PRESS=m # CONFIG_HP03 is not set # CONFIG_MPL115_I2C is not set @@ -5279,6 +5461,7 @@ CONFIG_HID_SENSOR_PRESS=m # CONFIG_ISL29501 is not set # CONFIG_LIDAR_LITE_V2 is not set # CONFIG_MB1232 is not set +# CONFIG_PING is not set # CONFIG_RFD77402 is not set # CONFIG_SRF04 is not set # CONFIG_SX9500 is not set @@ -5296,6 +5479,7 @@ CONFIG_HID_SENSOR_PRESS=m # # Temperature sensors # +# CONFIG_LTC2983 is not set # CONFIG_MAXIM_THERMOCOUPLE is not set # CONFIG_HID_SENSOR_TEMP is not set # CONFIG_MLX90614 is not set @@ -5320,12 +5504,10 @@ CONFIG_PWM_LPSS_PLATFORM=m # # IRQ chip support # -CONFIG_ARM_GIC_MAX_NR=1 # end of IRQ chip support # CONFIG_IPACK_BUS is not set # CONFIG_RESET_CONTROLLER is not set -# CONFIG_FMC is not set # # PHY Subsystem @@ -5335,9 +5517,11 @@ CONFIG_GENERIC_PHY=y # CONFIG_PHY_PXA_28NM_HSIC is not set # CONFIG_PHY_PXA_28NM_USB2 is not set # CONFIG_PHY_CPCAP_USB is not set +# CONFIG_PHY_INTEL_EMMC is not set # end of PHY Subsystem CONFIG_POWERCAP=y +CONFIG_INTEL_RAPL_CORE=y CONFIG_INTEL_RAPL=y # CONFIG_IDLE_INJECT is not set # CONFIG_MCB is not set @@ -5348,7 +5532,7 @@ CONFIG_INTEL_RAPL=y # end of Performance monitor support # CONFIG_RAS is not set -# CONFIG_THUNDERBOLT is not set +# CONFIG_USB4 is not set # # Android @@ -5377,6 +5561,7 @@ CONFIG_NVMEM=y # end of HW tracing support # CONFIG_FPGA is not set +# CONFIG_TEE is not set CONFIG_PM_OPP=y # CONFIG_UNISYS_VISORBUS is not set # CONFIG_SIOX is not set @@ -5426,6 +5611,8 @@ CONFIG_EXPORTFS_BLOCK_OPS=y CONFIG_FILE_LOCKING=y # CONFIG_MANDATORY_FILE_LOCKING is not set CONFIG_FS_ENCRYPTION=y +CONFIG_FS_ENCRYPTION_ALGS=y +# CONFIG_FS_VERITY is not set CONFIG_FSNOTIFY=y CONFIG_DNOTIFY=y CONFIG_INOTIFY_USER=y @@ -5436,6 +5623,7 @@ CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y CONFIG_AUTOFS_FS=y CONFIG_FUSE_FS=y CONFIG_CUSE=m +# CONFIG_VIRTIO_FS is not set CONFIG_OVERLAY_FS=y CONFIG_OVERLAY_FS_REDIRECT_DIR=y # CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW is not set @@ -5485,6 +5673,7 @@ CONFIG_PROC_FS=y CONFIG_PROC_SYSCTL=y CONFIG_PROC_PAGE_MONITOR=y CONFIG_PROC_CHILDREN=y +CONFIG_PROC_PID_ARCH_STATUS=y CONFIG_KERNFS=y CONFIG_SYSFS=y CONFIG_TMPFS=y @@ -5532,6 +5721,7 @@ CONFIG_PSTORE_COMPRESS_DEFAULT="deflate" CONFIG_PSTORE_RAM=m # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set +# CONFIG_EROFS_FS is not set # CONFIG_NETWORK_FILESYSTEMS is not set CONFIG_NLS=y CONFIG_NLS_DEFAULT="utf8" @@ -5592,11 +5782,12 @@ CONFIG_NLS_UTF8=m # Security options # CONFIG_KEYS=y +# CONFIG_KEYS_REQUEST_CACHE is not set # CONFIG_PERSISTENT_KEYRINGS is not set # CONFIG_BIG_KEYS is not set # CONFIG_TRUSTED_KEYS is not set CONFIG_ENCRYPTED_KEYS=y -# CONFIG_KEY_DH_OPERATIONS is not set +CONFIG_KEY_DH_OPERATIONS=y # CONFIG_SECURITY_DMESG_RESTRICT is not set CONFIG_SECURITY=y CONFIG_SECURITYFS=y @@ -5620,6 +5811,7 @@ CONFIG_SECURITY_APPARMOR_HASH_DEFAULT=y # CONFIG_SECURITY_LOADPIN is not set # CONFIG_SECURITY_YAMA is not set # CONFIG_SECURITY_SAFESETID is not set +# CONFIG_SECURITY_LOCKDOWN_LSM is not set # CONFIG_INTEGRITY is not set # CONFIG_DEFAULT_SECURITY_APPARMOR is not set CONFIG_DEFAULT_SECURITY_DAC=y @@ -5633,12 +5825,14 @@ CONFIG_LSM="yama,loadpin,safesetid,integrity" # Memory initialization # CONFIG_INIT_STACK_NONE=y +# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set +# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set # end of Memory initialization # end of Kernel hardening options # end of Security options CONFIG_XOR_BLOCKS=y -CONFIG_CRYPTO=y + # # Crypto core or helper @@ -5647,8 +5841,8 @@ CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_ALGAPI2=y CONFIG_CRYPTO_AEAD=y CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_SKCIPHER=y +CONFIG_CRYPTO_SKCIPHER2=y CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_RNG=y @@ -5667,9 +5861,8 @@ CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_NULL=y CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_PCRYPT=m -CONFIG_CRYPTO_WORKQUEUE=y CONFIG_CRYPTO_CRYPTD=y -CONFIG_CRYPTO_AUTHENC=m +CONFIG_CRYPTO_AUTHENC=y CONFIG_CRYPTO_TEST=m CONFIG_CRYPTO_SIMD=y CONFIG_CRYPTO_GLUE_HELPER_X86=y @@ -5683,6 +5876,8 @@ CONFIG_CRYPTO_DH=y CONFIG_CRYPTO_ECC=m CONFIG_CRYPTO_ECDH=m # CONFIG_CRYPTO_ECRDSA is not set +# CONFIG_CRYPTO_CURVE25519 is not set +CONFIG_CRYPTO_CURVE25519_X86=y # # Authenticated Encryption with Associated Data @@ -5691,16 +5886,7 @@ CONFIG_CRYPTO_CCM=m CONFIG_CRYPTO_GCM=y CONFIG_CRYPTO_CHACHA20POLY1305=m # CONFIG_CRYPTO_AEGIS128 is not set -# CONFIG_CRYPTO_AEGIS128L is not set -# CONFIG_CRYPTO_AEGIS256 is not set # CONFIG_CRYPTO_AEGIS128_AESNI_SSE2 is not set -# CONFIG_CRYPTO_AEGIS128L_AESNI_SSE2 is not set -# CONFIG_CRYPTO_AEGIS256_AESNI_SSE2 is not set -# CONFIG_CRYPTO_MORUS640 is not set -# CONFIG_CRYPTO_MORUS640_SSE2 is not set -# CONFIG_CRYPTO_MORUS1280 is not set -# CONFIG_CRYPTO_MORUS1280_SSE2 is not set -# CONFIG_CRYPTO_MORUS1280_AVX2 is not set CONFIG_CRYPTO_SEQIV=y CONFIG_CRYPTO_ECHAINIV=m @@ -5720,6 +5906,7 @@ CONFIG_CRYPTO_KEYWRAP=m # CONFIG_CRYPTO_NHPOLY1305_SSE2 is not set # CONFIG_CRYPTO_NHPOLY1305_AVX2 is not set # CONFIG_CRYPTO_ADIANTUM is not set +CONFIG_CRYPTO_ESSIV=y # # Hash modes @@ -5736,11 +5923,15 @@ CONFIG_CRYPTO_CRC32C=y CONFIG_CRYPTO_CRC32C_INTEL=m CONFIG_CRYPTO_CRC32=m CONFIG_CRYPTO_CRC32_PCLMUL=m +CONFIG_CRYPTO_XXHASH=y +CONFIG_CRYPTO_BLAKE2B=y +# CONFIG_CRYPTO_BLAKE2S is not set +CONFIG_CRYPTO_BLAKE2S_X86=y CONFIG_CRYPTO_CRCT10DIF=y CONFIG_CRYPTO_CRCT10DIF_PCLMUL=m CONFIG_CRYPTO_GHASH=y CONFIG_CRYPTO_POLY1305=m -CONFIG_CRYPTO_POLY1305_X86_64=m +CONFIG_CRYPTO_POLY1305_X86_64=y CONFIG_CRYPTO_MD4=m CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_MICHAEL_MIC=m @@ -5753,7 +5944,7 @@ CONFIG_CRYPTO_SHA1_SSSE3=m CONFIG_CRYPTO_SHA256_SSSE3=m CONFIG_CRYPTO_SHA512_SSSE3=m CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_SHA512=y CONFIG_CRYPTO_SHA3=m # CONFIG_CRYPTO_SM3 is not set # CONFIG_CRYPTO_STREEBOG is not set @@ -5766,7 +5957,6 @@ CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=m # CONFIG_CRYPTO_AES=y # CONFIG_CRYPTO_AES_TI is not set -CONFIG_CRYPTO_AES_X86_64=y CONFIG_CRYPTO_AES_NI_INTEL=y CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_ARC4=m @@ -5787,7 +5977,7 @@ CONFIG_CRYPTO_FCRYPT=m CONFIG_CRYPTO_KHAZAD=m CONFIG_CRYPTO_SALSA20=m CONFIG_CRYPTO_CHACHA20=m -CONFIG_CRYPTO_CHACHA20_X86_64=m +CONFIG_CRYPTO_CHACHA20_X86_64=y CONFIG_CRYPTO_SEED=m CONFIG_CRYPTO_SERPENT=m CONFIG_CRYPTO_SERPENT_SSE2_X86_64=m @@ -5828,8 +6018,32 @@ CONFIG_CRYPTO_USER_API_RNG=y CONFIG_CRYPTO_USER_API_AEAD=y # CONFIG_CRYPTO_STATS is not set CONFIG_CRYPTO_HASH_INFO=y + +# +# Crypto library routines +# +CONFIG_CRYPTO_LIB_AES=y +CONFIG_CRYPTO_LIB_ARC4=m +CONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S=y +CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y +CONFIG_CRYPTO_LIB_BLAKE2S=y +CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y +CONFIG_CRYPTO_LIB_CHACHA_GENERIC=y +CONFIG_CRYPTO_LIB_CHACHA=y +CONFIG_CRYPTO_ARCH_HAVE_LIB_CURVE25519=y +CONFIG_CRYPTO_LIB_CURVE25519_GENERIC=y +CONFIG_CRYPTO_LIB_CURVE25519=y +CONFIG_CRYPTO_LIB_DES=m +CONFIG_CRYPTO_LIB_POLY1305_RSIZE=11 +CONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=y +CONFIG_CRYPTO_LIB_POLY1305_GENERIC=y +CONFIG_CRYPTO_LIB_POLY1305=y +CONFIG_CRYPTO_LIB_CHACHA20POLY1305=y +CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_HW=y # CONFIG_CRYPTO_DEV_PADLOCK is not set +# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set +# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set # CONFIG_CRYPTO_DEV_CCP is not set # CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set # CONFIG_CRYPTO_DEV_QAT_C3XXX is not set @@ -5839,10 +6053,12 @@ CONFIG_CRYPTO_HW=y # CONFIG_CRYPTO_DEV_QAT_C62XVF is not set # CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set CONFIG_CRYPTO_DEV_VIRTIO=m +# CONFIG_CRYPTO_DEV_SAFEXCEL is not set +# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set CONFIG_ASYMMETRIC_KEY_TYPE=y CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y CONFIG_X509_CERTIFICATE_PARSER=y -# CONFIG_PKCS8_PRIVATE_KEY_PARSER is not set +CONFIG_PKCS8_PRIVATE_KEY_PARSER=y CONFIG_PKCS7_MESSAGE_PARSER=y # CONFIG_PKCS7_TEST_KEY is not set CONFIG_SIGNED_PE_FILE_VERIFICATION=y @@ -5937,17 +6153,21 @@ CONFIG_GLOB=y # CONFIG_GLOB_SELFTEST is not set CONFIG_NLATTR=y CONFIG_CLZ_TAB=y -# CONFIG_DDR is not set CONFIG_IRQ_POLL=y CONFIG_MPILIB=y +CONFIG_DIMLIB=y CONFIG_OID_REGISTRY=y CONFIG_UCS2_STRING=y +CONFIG_HAVE_GENERIC_VDSO=y +CONFIG_GENERIC_GETTIMEOFDAY=y +CONFIG_GENERIC_VDSO_TIME_NS=y CONFIG_FONT_SUPPORT=y # CONFIG_FONTS is not set CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y CONFIG_SG_POOL=y CONFIG_ARCH_HAS_PMEM_API=y +CONFIG_MEMREGION=y CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE=y CONFIG_ARCH_HAS_UACCESS_MCSAFE=y CONFIG_ARCH_STACKWALK=y @@ -5969,6 +6189,8 @@ CONFIG_CONSOLE_LOGLEVEL_QUIET=4 CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 CONFIG_BOOT_PRINTK_DELAY=y # CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_SYMBOLIC_ERRNAME is not set +CONFIG_DEBUG_BUGVERBOSE=y # end of printk and dmesg options # @@ -5979,19 +6201,28 @@ CONFIG_ENABLE_MUST_CHECK=y CONFIG_FRAME_WARN=2048 # CONFIG_STRIP_ASM_SYMS is not set # CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_OPTIMIZE_INLINING is not set +# CONFIG_HEADERS_INSTALL is not set +CONFIG_OPTIMIZE_INLINING=y # CONFIG_DEBUG_SECTION_MISMATCH is not set # CONFIG_SECTION_MISMATCH_WARN_ONLY is not set CONFIG_STACK_VALIDATION=y # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set # end of Compile-time checks and compiler options +# +# Generic Kernel Debugging Instruments +# CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x0 CONFIG_MAGIC_SYSRQ_SERIAL=y +CONFIG_DEBUG_FS=y +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y +# CONFIG_UBSAN is not set +CONFIG_UBSAN_ALIGNMENT=y +# end of Generic Kernel Debugging Instruments + CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_MISC=y @@ -6004,31 +6235,35 @@ CONFIG_DEBUG_MISC=y # CONFIG_PAGE_POISONING is not set # CONFIG_DEBUG_PAGE_REF is not set # CONFIG_DEBUG_RODATA_TEST is not set +CONFIG_GENERIC_PTDUMP=y +# CONFIG_PTDUMP_DEBUGFS is not set # CONFIG_DEBUG_OBJECTS is not set # CONFIG_SLUB_DEBUG_ON is not set # CONFIG_SLUB_STATS is not set CONFIG_HAVE_DEBUG_KMEMLEAK=y # CONFIG_DEBUG_KMEMLEAK is not set # CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_SCHED_STACK_END_CHECK is not set # CONFIG_DEBUG_VM is not set CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y # CONFIG_DEBUG_VIRTUAL is not set # CONFIG_DEBUG_MEMORY_INIT is not set # CONFIG_DEBUG_PER_CPU_MAPS is not set CONFIG_HAVE_ARCH_KASAN=y +CONFIG_HAVE_ARCH_KASAN_VMALLOC=y CONFIG_CC_HAS_KASAN_GENERIC=y # CONFIG_KASAN is not set CONFIG_KASAN_STACK=1 # end of Memory Debugging -CONFIG_ARCH_HAS_KCOV=y -CONFIG_CC_HAS_SANCOV_TRACE_PC=y -# CONFIG_KCOV is not set CONFIG_DEBUG_SHIRQ=y # -# Debug Lockups and Hangs +# Debug Oops, Lockups and Hangs # +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_PANIC_TIMEOUT=0 CONFIG_LOCKUP_DETECTOR=y CONFIG_SOFTLOCKUP_DETECTOR=y # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set @@ -6040,15 +6275,16 @@ CONFIG_HARDLOCKUP_DETECTOR=y CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0 # CONFIG_DETECT_HUNG_TASK is not set # CONFIG_WQ_WATCHDOG is not set -# end of Debug Lockups and Hangs +# end of Debug Oops, Lockups and Hangs -# CONFIG_PANIC_ON_OOPS is not set -CONFIG_PANIC_ON_OOPS_VALUE=0 -CONFIG_PANIC_TIMEOUT=0 +# +# Scheduler Debugging +# CONFIG_SCHED_DEBUG=y CONFIG_SCHED_INFO=y CONFIG_SCHEDSTATS=y -# CONFIG_SCHED_STACK_END_CHECK is not set +# end of Scheduler Debugging + # CONFIG_DEBUG_TIMEKEEPING is not set CONFIG_DEBUG_PREEMPT=y @@ -6073,11 +6309,17 @@ CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_STACKTRACE=y # CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set # CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_BUGVERBOSE=y + +# +# Debug kernel data structures +# CONFIG_DEBUG_LIST=y # CONFIG_DEBUG_PLIST is not set # CONFIG_DEBUG_SG is not set # CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_BUG_ON_DATA_CORRUPTION is not set +# end of Debug kernel data structures + # CONFIG_DEBUG_CREDENTIALS is not set # @@ -6093,9 +6335,6 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=60 # CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set # CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -CONFIG_FUNCTION_ERROR_INJECTION=y -# CONFIG_FAULT_INJECTION is not set # CONFIG_LATENCYTOP is not set CONFIG_USER_STACKTRACE_SUPPORT=y CONFIG_NOP_TRACER=y @@ -6103,6 +6342,7 @@ CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y +CONFIG_HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_FENTRY=y @@ -6114,19 +6354,21 @@ CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_TRACING=y CONFIG_TRACING_SUPPORT=y CONFIG_FTRACE=y +# CONFIG_BOOTTIME_TRACING is not set # CONFIG_FUNCTION_TRACER is not set +# CONFIG_STACK_TRACER is not set # CONFIG_PREEMPTIRQ_EVENTS is not set # CONFIG_IRQSOFF_TRACER is not set # CONFIG_PREEMPT_TRACER is not set # CONFIG_SCHED_TRACER is not set # CONFIG_HWLAT_TRACER is not set +# CONFIG_MMIOTRACE is not set # CONFIG_ENABLE_DEFAULT_TRACERS is not set # CONFIG_FTRACE_SYSCALLS is not set # CONFIG_TRACER_SNAPSHOT is not set CONFIG_BRANCH_PROFILE_NONE=y # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set # CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set # CONFIG_BLK_DEV_IO_TRACE is not set CONFIG_KPROBE_EVENTS=y CONFIG_UPROBE_EVENTS=y @@ -6134,14 +6376,57 @@ CONFIG_BPF_EVENTS=y CONFIG_DYNAMIC_EVENTS=y CONFIG_PROBE_EVENTS=y # CONFIG_BPF_KPROBE_OVERRIDE is not set -# CONFIG_MMIOTRACE is not set # CONFIG_HIST_TRIGGERS is not set +# CONFIG_TRACE_EVENT_INJECT is not set # CONFIG_TRACEPOINT_BENCHMARK is not set # CONFIG_RING_BUFFER_BENCHMARK is not set +# CONFIG_TRACE_EVAL_MAP_FILE is not set # CONFIG_RING_BUFFER_STARTUP_TEST is not set # CONFIG_PREEMPTIRQ_DELAY_TEST is not set -# CONFIG_TRACE_EVAL_MAP_FILE is not set +# CONFIG_KPROBE_EVENT_GEN_TEST is not set # CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set +# CONFIG_SAMPLES is not set +CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y + +# +# x86 Debugging +# +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_X86_VERBOSE_BOOTUP=y +CONFIG_EARLY_PRINTK=y +# CONFIG_EARLY_PRINTK_DBGP is not set +# CONFIG_EARLY_PRINTK_USB_XDBC is not set +# CONFIG_EFI_PGT_DUMP is not set +# CONFIG_DEBUG_WX is not set +CONFIG_DOUBLEFAULT=y +# CONFIG_DEBUG_TLBFLUSH is not set +CONFIG_HAVE_MMIOTRACE_SUPPORT=y +# CONFIG_X86_DECODER_SELFTEST is not set +CONFIG_IO_DELAY_0X80=y +# CONFIG_IO_DELAY_0XED is not set +# CONFIG_IO_DELAY_UDELAY is not set +# CONFIG_IO_DELAY_NONE is not set +# CONFIG_DEBUG_BOOT_PARAMS is not set +# CONFIG_CPA_DEBUG is not set +# CONFIG_DEBUG_ENTRY is not set +# CONFIG_DEBUG_NMI_SELFTEST is not set +# CONFIG_X86_DEBUG_FPU is not set +# CONFIG_PUNIT_ATOM_DEBUG is not set +CONFIG_UNWINDER_ORC=y +# CONFIG_UNWINDER_FRAME_POINTER is not set +# CONFIG_UNWINDER_GUESS is not set +# end of x86 Debugging + +# +# Kernel Testing and Coverage +# +# CONFIG_KUNIT is not set +# CONFIG_NOTIFIER_ERROR_INJECTION is not set +CONFIG_FUNCTION_ERROR_INJECTION=y +# CONFIG_FAULT_INJECTION is not set +CONFIG_ARCH_HAS_KCOV=y +CONFIG_CC_HAS_SANCOV_TRACE_PC=y +# CONFIG_KCOV is not set CONFIG_RUNTIME_TESTING_MENU=y # CONFIG_LKDTM is not set # CONFIG_TEST_LIST_SORT is not set @@ -6149,6 +6434,7 @@ CONFIG_RUNTIME_TESTING_MENU=y # CONFIG_KPROBES_SANITY_TEST is not set # CONFIG_BACKTRACE_SELF_TEST is not set # CONFIG_RBTREE_TEST is not set +# CONFIG_REED_SOLOMON_TEST is not set # CONFIG_INTERVAL_TREE_TEST is not set # CONFIG_PERCPU_TEST is not set # CONFIG_ATOMIC64_SELFTEST is not set @@ -6169,6 +6455,7 @@ CONFIG_RUNTIME_TESTING_MENU=y # CONFIG_TEST_VMALLOC is not set # CONFIG_TEST_USER_COPY is not set # CONFIG_TEST_BPF is not set +# CONFIG_TEST_BLACKHOLE_DEV is not set # CONFIG_FIND_BIT_BENCHMARK is not set # CONFIG_TEST_FIRMWARE is not set # CONFIG_TEST_SYSCTL is not set @@ -6177,43 +6464,7 @@ CONFIG_RUNTIME_TESTING_MENU=y # CONFIG_TEST_KMOD is not set # CONFIG_TEST_MEMCAT_P is not set # CONFIG_TEST_STACKINIT is not set +# CONFIG_TEST_MEMINIT is not set # CONFIG_MEMTEST is not set -# CONFIG_BUG_ON_DATA_CORRUPTION is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_KGDB is not set -CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y -# CONFIG_UBSAN is not set -CONFIG_UBSAN_ALIGNMENT=y -CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_X86_VERBOSE_BOOTUP=y -CONFIG_EARLY_PRINTK=y -# CONFIG_EARLY_PRINTK_DBGP is not set -# CONFIG_EARLY_PRINTK_USB_XDBC is not set -# CONFIG_X86_PTDUMP is not set -# CONFIG_EFI_PGT_DUMP is not set -# CONFIG_DEBUG_WX is not set -CONFIG_DOUBLEFAULT=y -# CONFIG_DEBUG_TLBFLUSH is not set -CONFIG_HAVE_MMIOTRACE_SUPPORT=y -# CONFIG_X86_DECODER_SELFTEST is not set -CONFIG_IO_DELAY_TYPE_0X80=0 -CONFIG_IO_DELAY_TYPE_0XED=1 -CONFIG_IO_DELAY_TYPE_UDELAY=2 -CONFIG_IO_DELAY_TYPE_NONE=3 -CONFIG_IO_DELAY_0X80=y -# CONFIG_IO_DELAY_0XED is not set -# CONFIG_IO_DELAY_UDELAY is not set -# CONFIG_IO_DELAY_NONE is not set -CONFIG_DEFAULT_IO_DELAY_TYPE=0 -# CONFIG_DEBUG_BOOT_PARAMS is not set -# CONFIG_CPA_DEBUG is not set -# CONFIG_DEBUG_ENTRY is not set -# CONFIG_DEBUG_NMI_SELFTEST is not set -# CONFIG_X86_DEBUG_FPU is not set -# CONFIG_PUNIT_ATOM_DEBUG is not set -CONFIG_UNWINDER_ORC=y -# CONFIG_UNWINDER_FRAME_POINTER is not set -# CONFIG_UNWINDER_GUESS is not set +# end of Kernel Testing and Coverage # end of Kernel hacking diff --git a/meta-citadel/recipes-support/efibootmgr/efibootmgr_17.bb b/meta-citadel/recipes-support/efibootmgr/efibootmgr_17.bb index 4edb2e6..b072069 100644 --- a/meta-citadel/recipes-support/efibootmgr/efibootmgr_17.bb +++ b/meta-citadel/recipes-support/efibootmgr/efibootmgr_17.bb @@ -6,7 +6,7 @@ SECTION = "base" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" -DEPENDS = "pciutils zlib efivar" +DEPENDS = "pciutils zlib efivar popt" COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" diff --git a/meta-citadel/recipes-support/efivar/efivar/0001-efivar-fix-for-cross-compile.patch b/meta-citadel/recipes-support/efivar/efivar/0001-efivar-fix-for-cross-compile.patch deleted file mode 100644 index 251e50c..0000000 --- a/meta-citadel/recipes-support/efivar/efivar/0001-efivar-fix-for-cross-compile.patch +++ /dev/null @@ -1,32 +0,0 @@ -From a9115d9e6f0f62d6bb735ce3698858d1f89f8d73 Mon Sep 17 00:00:00 2001 -From: Kai Kang -Date: Fri, 25 Sep 2015 18:14:31 +0800 -Subject: [PATCH] efivar: fix for cross compile - -It builds and calls elf file makeguids to generate a header file which -doesn't work for cross compile. Fix it. - -Signed-off-by: Kai Kang - -Upstream-Status: Pending -Signed-off-by: Hongxu Jia - ---- - src/Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/Makefile b/src/Makefile -index 0c16597..dcc7fc8 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -40,8 +40,8 @@ abicheck : $(patsubst %.so,%.abicheck,$(LIBTARGETS)) - ./guid-symbols.c : include/efivar/efivar-guids.h - ./guids.bin : include/efivar/efivar-guids.h - ./names.bin : include/efivar/efivar-guids.h --include/efivar/efivar-guids.h : makeguids guids.txt -- ./makeguids guids.txt guids.bin names.bin \ -+include/efivar/efivar-guids.h : guids.txt -+ makeguids guids.txt guids.bin names.bin \ - guid-symbols.c include/efivar/efivar-guids.h - - makeguids : CPPFLAGS+=-DEFIVAR_BUILD_ENVIRONMENT diff --git a/meta-citadel/recipes-support/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch b/meta-citadel/recipes-support/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch deleted file mode 100644 index 96d0c6b..0000000 --- a/meta-citadel/recipes-support/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch +++ /dev/null @@ -1,35 +0,0 @@ -From b3d35e7dd27a755df5acbe050837885914dbb28b Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Tue, 10 May 2016 11:34:50 -0400 -Subject: [PATCH] fix unknow option for gold linker - -- Revert the following patch, since oe-core work with gcc 5 -... -commit 3055a3797f16693dfdd855fa68bc57fd900dc408 -Author: Peter Jones -Date: Mon Feb 15 14:15:40 2016 -0500 - - Make gcc.specs work with gcc 6 / binutils 2.26 - - Apparently binutils 2.26 gets real picky about "ld -PIC" vs "ld -fPIC". - - Signed-off-by: Peter Jones -... - -- Remove unknown option '--add-needed' - -Signed-off-by: Hongxu Jia ---- - gcc.specs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: git/gcc.specs -=================================================================== ---- git.orig/gcc.specs -+++ git/gcc.specs -@@ -14,4 +14,4 @@ - + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now} - - *link: --+ %{!static:--fatal-warnings} --no-undefined-version --no-allow-shlib-undefined --add-needed -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:% -Date: Tue, 31 Jul 2018 14:18:35 +0800 -Subject: [PATCH] allow multi definitions for native - -Upstream-Status: Pending - -It fails to create .so file when build efivar-native: - -| lib.o:(*IND*+0x0): multiple definition of `efi_set_variable' -| lib.o:lib.c:(.text+0xa0): first defined here - -Add link option '-z muldefs' to fix it. - -Signed-off-by: Kai Kang - -Signed-off-by: Hongxu Jia ---- - Make.rules | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Make.rules b/Make.rules -index 042585b..257ba45 100644 ---- a/Make.rules -+++ b/Make.rules -@@ -20,6 +20,7 @@ include $(TOPDIR)/Make.version - $(CCLD) $(ccldflags) $(CPPFLAGS) $(SOFLAGS) \ - -Wl,-soname,$@.1 \ - -Wl,--version-script=$(MAP) \ -+ -Wl,-z,muldefs \ - -o $@ $^ $(LDLIBS) - ln -vfs $@ $@.1 - --- -2.7.4 - diff --git a/meta-citadel/recipes-support/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch b/meta-citadel/recipes-support/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch deleted file mode 100644 index dbc9a57..0000000 --- a/meta-citadel/recipes-support/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 3edce6a0019bcb90febc1f654b5b2e2bad5c59bd Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Thu, 26 May 2016 21:50:01 -0400 -Subject: [PATCH] fix compile failure with older host gcc (<=4.6) - -While host gcc version is 4.6.3 in ubuntu 1204, it -did not recognize -std=gnu11 and -Wmaybe-uninitialized. - -While host gcc version is 4.4.7 in centos6, it -did not recognize -std=gnu11, -Wmaybe-uninitialized, -and -flto. - -For native build, use -std=gnu99 to replace -std=gnu11, -and directly remove -Wmaybe-uninitialized and -flto. - -Upstream-Status: Pending - -Signed-off-by: Hongxu Jia - ---- - gcc.specs | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/gcc.specs b/gcc.specs -index 45d43d1..f1c6944 100644 ---- a/gcc.specs -+++ b/gcc.specs -@@ -2,13 +2,13 @@ - + -D_GNU_SOURCE - - *efivar_cpp_options: -- -Werror -Wall -std=gnu11 -Wextra -+ -Werror -Wall -std=gnu99 -Wextra - - *cpp_options: - + %(efivar_cpp_options) - - *cc1_options: --+ %(efivar_cpp_options) -Wmaybe-uninitialized -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}} -++ %(efivar_cpp_options) -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}} - - *self_spec: - + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now} diff --git a/meta-citadel/recipes-support/efivar/efivar/no-werror.patch b/meta-citadel/recipes-support/efivar/efivar/no-werror.patch new file mode 100644 index 0000000..50a0b10 --- /dev/null +++ b/meta-citadel/recipes-support/efivar/efivar/no-werror.patch @@ -0,0 +1,18 @@ +Don't use -Werror because newer compilers introduce newer warnings. + +Upstream-Status: Inappropriate [https://github.com/rhboot/efivar/issues/131] +Signed-off-by: Ross Burton + +diff --git a/gcc.specs b/gcc.specs +index 45d43d1..1baf11a 100644 +--- a/gcc.specs ++++ b/gcc.specs +@@ -2,7 +2,7 @@ + + -D_GNU_SOURCE + + *efivar_cpp_options: +- -Werror -Wall -std=gnu11 -Wextra ++ -Wall -std=gnu11 -Wextra + + *cpp_options: + + %(efivar_cpp_options) diff --git a/meta-citadel/recipes-support/efivar/efivar_37.bb b/meta-citadel/recipes-support/efivar/efivar_37.bb index a038716..9b95721 100644 --- a/meta-citadel/recipes-support/efivar/efivar_37.bb +++ b/meta-citadel/recipes-support/efivar/efivar_37.bb @@ -1,43 +1,40 @@ SUMMARY = "Tools to manipulate UEFI variables" DESCRIPTION = "efivar provides a simple command line interface to the UEFI variable facility" -HOMEPAGE = "https://github.com/rhinstaller/efivar" +HOMEPAGE = "https://github.com/rhboot/efivar" -LICENSE = "LGPLv2.1" +LICENSE = "LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING;md5=6626bb1e20189cfa95f2c508ba286393" -DEPENDS = "popt" -DEPENDS_append_class-target = " efivar-native" - -inherit pkgconfig - COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" -SRCREV = "c1d6b10e1ed4ba2be07f385eae5bceb694478a10" SRC_URI = "git://github.com/rhinstaller/efivar.git \ - file://allow-multi-definitions-for-native.patch \ - " -SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch \ - ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'file://0004-fix-unknow-option-for-gold-linker.patch', '', d)} \ - " -SRC_URI_append_class-native = " file://fix-compile-failure-with-host-gcc-4.6.patch \ - " + file://no-werror.patch" +SRCREV = "c1d6b10e1ed4ba2be07f385eae5bceb694478a10" S = "${WORKDIR}/git" -do_compile_prepend() { - sed -i -e s:-Werror::g ${S}/gcc.specs -} +inherit pkgconfig -do_compile_class-native() { - oe_runmake -C src makeguids CC_FOR_BUILD="${BUILD_CC}" +export CCLD_FOR_BUILD = "${BUILD_CCLD}" + +# Upstream uses --add-needed in gcc.specs which gold doesn't support, so +# enforce BFD. +LDFLAGS += "-fuse-ld=bfd" + +do_compile_prepend() { + # Remove when https://github.com/rhboot/efivar/issues/130 is fixed + oe_runmake \ + CFLAGS="${BUILD_CFLAGS}" \ + LDFLAGS="${BUILD_LDFLAGS}" \ + -C src makeguids } do_install() { oe_runmake install DESTDIR=${D} } -do_install_class-native() { - install -D -m 0755 ${B}/src/makeguids ${D}${bindir}/makeguids -} - BBCLASSEXTEND = "native" + +RRECOMMENDS_${PN}_class-target = "kernel-module-efivarfs" + +CLEANBROKEN = "1" diff --git a/meta-citadel/recipes-support/udisks/udisks2_2.7.8.bb b/meta-citadel/recipes-support/udisks/udisks2_git.bb similarity index 68% rename from meta-citadel/recipes-support/udisks/udisks2_2.7.8.bb rename to meta-citadel/recipes-support/udisks/udisks2_git.bb index 64b338f..cffdedb 100644 --- a/meta-citadel/recipes-support/udisks/udisks2_2.7.8.bb +++ b/meta-citadel/recipes-support/udisks/udisks2_git.bb @@ -10,8 +10,6 @@ DEPENDS = " \ dbus-glib \ glib-2.0 \ libblockdev \ - intltool-native \ - gnome-common-native \ libxslt-native \ " DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" @@ -19,18 +17,25 @@ DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" RDEPENDS_${PN} = "acl" SRC_URI = " \ - git://github.com/storaged-project/udisks.git;branch=2.7.x-branch \ - file://non-gnu-libc.patch \ + git://github.com/storaged-project/udisks.git;branch=master \ " -SRCREV = "47bc0141cb84624ba1e2242d596a89a30df1f5ea" +PV = "2.8.4+git${SRCREV}" +SRCREV = "db5f487345da2eaa87976450ea51c2c465d9b82e" S = "${WORKDIR}/git" CVE_PRODUCT = "udisks" -inherit autotools systemd gtk-doc gobject-introspection +inherit autotools systemd gtk-doc gobject-introspection gettext + EXTRA_OECONF = "--disable-man --disable-gtk-doc" +do_configure_prepend() { + # | configure.ac:656: error: required file 'build-aux/config.rpath' not found + mkdir -p ${S}/build-aux + touch ${S}/build-aux/config.rpath +} + FILES_${PN} += " \ ${datadir}/dbus-1/ \ ${datadir}/polkit-1 \ @@ -43,6 +48,7 @@ FILES_${PN} += " \ PACKAGES =+ "${PN}-libs" FILES_${PN}-libs = "${libdir}/lib*${SOLIBS}" +FILES_${PN} += "${nonarch_libdir}/tmpfiles.d" SYSTEMD_SERVICE_${PN} = "${BPN}.service" SYSTEMD_AUTO_ENABLE = "disable" diff --git a/meta-citadel/recipes-support/wireguard-tools/wireguard-tools_0.0.20191219.bb b/meta-citadel/recipes-support/wireguard-tools/wireguard-tools_0.0.20191219.bb new file mode 100644 index 0000000..88bfb4d --- /dev/null +++ b/meta-citadel/recipes-support/wireguard-tools/wireguard-tools_0.0.20191219.bb @@ -0,0 +1,27 @@ +require wireguard.inc + +inherit bash-completion systemd pkgconfig + +DEPENDS = "libmnl" + +do_compile_prepend () { + cd ${S}/tools +} + +do_install () { + cd ${S}/tools + oe_runmake DESTDIR="${D}" PREFIX="${prefix}" SYSCONFDIR="${sysconfdir}" \ + SYSTEMDUNITDIR="${systemd_unitdir}" \ + WITH_SYSTEMDUNITS=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'yes', '', d)} \ + WITH_BASHCOMPLETION=yes \ + WITH_WGQUICK=yes \ + install +} + +FILES_${PN} = " \ + ${sysconfdir} \ + ${systemd_unitdir} \ + ${bindir} \ +" + +RDEPENDS_${PN} = "bash" diff --git a/meta-citadel/recipes-support/wireguard-tools/wireguard-tools_1.0.20200319.bb b/meta-citadel/recipes-support/wireguard-tools/wireguard-tools_1.0.20200319.bb new file mode 100644 index 0000000..cbde5e0 --- /dev/null +++ b/meta-citadel/recipes-support/wireguard-tools/wireguard-tools_1.0.20200319.bb @@ -0,0 +1,27 @@ +require wireguard.inc + +inherit bash-completion systemd pkgconfig + +DEPENDS = "libmnl" + +do_compile_prepend () { + cd ${S} +} + +do_install () { + cd ${S} + oe_runmake DESTDIR="${D}" PREFIX="${prefix}" SYSCONFDIR="${sysconfdir}" \ + SYSTEMDUNITDIR="${systemd_unitdir}" \ + WITH_SYSTEMDUNITS=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'yes', '', d)} \ + WITH_BASHCOMPLETION=yes \ + WITH_WGQUICK=yes \ + install +} + +FILES_${PN} = " \ + ${sysconfdir} \ + ${systemd_unitdir} \ + ${bindir} \ +" + +RDEPENDS_${PN} = "bash" diff --git a/meta-citadel/recipes-support/wireguard-tools/wireguard.inc b/meta-citadel/recipes-support/wireguard-tools/wireguard.inc new file mode 100644 index 0000000..7b54d99 --- /dev/null +++ b/meta-citadel/recipes-support/wireguard-tools/wireguard.inc @@ -0,0 +1,16 @@ +SUMMARY = "WireGuard is an extremely simple yet fast and modern VPN" +DESCRIPTION="WireGuard is a secure network tunnel, operating at layer 3, \ +implemented as a kernel virtual network interface for Linux, which aims to \ +replace both IPsec for most use cases, as well as popular user space and/or \ +TLS-based solutions like OpenVPN, while being more secure, more performant, \ +and easier to use." +SECTION = "networking" +HOMEPAGE = "https://www.wireguard.io/" +LICENSE = "GPLv2" + +LIC_FILES_CHKSUM = "file://../COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" +SRC_URI = "https://git.zx2c4.com/wireguard-tools/snapshot/wireguard-tools-${PV}.tar.xz" +SRC_URI[md5sum] = "36cd9411f56bc5dcaac29bbab6fd9c67" +SRC_URI[sha256sum] = "757ed31d4d48d5fd7853bfd9bfa6a3a1b53c24a94fe617439948784a2c0ed987" + +S = "${WORKDIR}/wireguard-tools-${PV}/src/" diff --git a/meta-citadel/recipes-support/xdg-dbus-proxy/xdg-dbus-proxy_0.1.1.bb b/meta-citadel/recipes-support/xdg-dbus-proxy/xdg-dbus-proxy_0.1.1.bb index 3ac9081..9b5c024 100644 --- a/meta-citadel/recipes-support/xdg-dbus-proxy/xdg-dbus-proxy_0.1.1.bb +++ b/meta-citadel/recipes-support/xdg-dbus-proxy/xdg-dbus-proxy_0.1.1.bb @@ -7,9 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" DEPENDS = "autoconf-archive-native glib-2.0" -inherit autotools gnomebase +inherit autotools gnomebase gtk-icon-cache mime -SRCREV = "7531b44424f834f193fe7f83fe572084d9c77ad9" +SRCREV = "9f6c5624f0dd57a8e301cd84c5525298bb754ed8" SRC_URI = "git://github.com/flatpak/xdg-dbus-proxy.git;protocol=https" S = "${WORKDIR}/git" diff --git a/meta-clang b/meta-clang new file mode 160000 index 0000000..ee1dcdf --- /dev/null +++ b/meta-clang @@ -0,0 +1 @@ +Subproject commit ee1dcdfbb8d31f168b26c2e3e5be97efea6537df diff --git a/meta-gnome/conf/layer.conf b/meta-gnome/conf/layer.conf index 9740958..b5f4598 100644 --- a/meta-gnome/conf/layer.conf +++ b/meta-gnome/conf/layer.conf @@ -1,7 +1,7 @@ # We have a conf and classes directory, add to BBPATH BBPATH .= ":${LAYERDIR}" -LAYERSERIES_COMPAT_meta-gnome = "thud warrior" +LAYERSERIES_COMPAT_meta-gnome = "thud warrior zeus" # We have recipes-* directories, add to BBFILES BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ diff --git a/meta-gnome/recipes-connectivity/iwd/iwd/0001-Remove-config-dir-from-unit-file.patch b/meta-gnome/recipes-connectivity/iwd/iwd/0001-Remove-config-dir-from-unit-file.patch new file mode 100644 index 0000000..a72504e --- /dev/null +++ b/meta-gnome/recipes-connectivity/iwd/iwd/0001-Remove-config-dir-from-unit-file.patch @@ -0,0 +1,21 @@ +From b8687182b9103a1209a6cb553821bb4e4cda5591 Mon Sep 17 00:00:00 2001 +From: David McKinney +Date: Thu, 2 Jul 2020 15:46:40 +0000 +Subject: [PATCH] Remove config dir from unit file + +--- + src/iwd.service.in | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/iwd.service.in b/src/iwd.service.in +index 77819eaf..e33b2f0b 100644 +--- a/src/iwd.service.in ++++ b/src/iwd.service.in +@@ -19,7 +19,6 @@ ProtectHome=yes + ProtectSystem=strict + ProtectControlGroups=yes + ProtectKernelModules=yes +-ConfigurationDirectory=iwd + StateDirectory=iwd + StateDirectoryMode=0700 + diff --git a/meta-gnome/recipes-connectivity/iwd/iwd_1.7.bb b/meta-gnome/recipes-connectivity/iwd/iwd_1.7.bb new file mode 100644 index 0000000..06606cd --- /dev/null +++ b/meta-gnome/recipes-connectivity/iwd/iwd_1.7.bb @@ -0,0 +1,56 @@ +SUMMARY = "Wireless daemon for Linux" +HOMEPAGE = "https://iwd.wiki.kernel.org/" +LICENSE = "LGPL-2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09" + +DEPENDS = "ell" + +SRC_URI = "git://git.kernel.org/pub/scm/network/wireless/iwd.git \ + file://0001-Remove-config-dir-from-unit-file.patch \ + " +SRCREV = "ef6084dcb4fe2e00327bb9c7b113ece204042c22" +S = "${WORKDIR}/git" + +inherit autotools manpages pkgconfig python3native systemd + +PACKAGECONFIG ??= " \ + client \ + monitor \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ +" +PACKAGECONFIG[client] = "--enable-client,--disable-client,readline" +PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor" +PACKAGECONFIG[manpages] = "--enable-manual-pages,--disable-manual-pages,python3-docutils-native" +PACKAGECONFIG[wired] = "--enable-wired,--disable-wired" +PACKAGECONFIG[ofono] = "--enable-ofono,--disable-ofono" +PACKAGECONFIG[systemd] = "--with-systemd-unitdir=${systemd_system_unitdir},--disable-systemd-service,systemd" + +EXTRA_OECONF = "--enable-external-ell" + +SYSTEMD_SERVICE_${PN} = " \ + iwd.service \ + ${@bb.utils.contains('PACKAGECONFIG', 'wired', 'ead.service', '', d)} \ +" + +do_configure_prepend() { + install -d ${S}/build-aux +} + +do_install_append() { + # If client and monitor are disabled, bindir is empty, causing a QA error + rmdir --ignore-fail-on-non-empty ${D}/${bindir} +} + +FILES_${PN} += " \ + ${datadir}/dbus-1 \ + ${nonarch_libdir}/modules-load.d \ + ${systemd_unitdir}/network \ +" + +RDEPENDS_${PN} = "dbus" + +RRECOMMENDS_${PN} = "\ + kernel-module-pkcs7-message \ + kernel-module-pkcs8-key-parser \ + kernel-module-x509-key-parser \ +" diff --git a/meta-gnome/recipes-connectivity/networkmanager/files/NetworkManager.conf b/meta-gnome/recipes-connectivity/networkmanager/files/NetworkManager.conf new file mode 100644 index 0000000..1a1bb47 --- /dev/null +++ b/meta-gnome/recipes-connectivity/networkmanager/files/NetworkManager.conf @@ -0,0 +1,8 @@ +[main] +plugins=keyfile + +[keyfile] +path=/var/lib/NetworkManager/system-connections + +[device] +wifi.backend=iwd diff --git a/meta-gnome/recipes-connectivity/networkmanager/networkmanager/0002-Do-not-create-settings-settings-property-documentati.patch b/meta-gnome/recipes-connectivity/networkmanager/networkmanager/0002-Do-not-create-settings-settings-property-documentati.patch index 5581dd3..446637b 100644 --- a/meta-gnome/recipes-connectivity/networkmanager/networkmanager/0002-Do-not-create-settings-settings-property-documentati.patch +++ b/meta-gnome/recipes-connectivity/networkmanager/networkmanager/0002-Do-not-create-settings-settings-property-documentati.patch @@ -1,4 +1,4 @@ -From 4f000a4a19975d6aba71427e693cd1ed080abda9 Mon Sep 17 00:00:00 2001 +From 9eab96351a726e9ce6a15d158f743e35d73a8900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Thu, 22 Mar 2018 11:08:30 +0100 Subject: [PATCH] Do not create settings settings/property documentation @@ -6,23 +6,29 @@ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + It was tried to get this work but gi / GirRepository could not be found by python. Anyway it is not necessary for us to have the settings/property docs. Upstream-Status: Inappropriate [OE specific] Signed-off-by: Andreas Müller + --- Makefile.am | 11 ----------- configure.ac | 5 ----- 2 files changed, 16 deletions(-) diff --git a/Makefile.am b/Makefile.am -index b180466..1ab4658 100644 +index d5cbcf5..2a1819a 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -1298,9 +1298,7 @@ EXTRA_DIST += \ - if HAVE_INTROSPECTION +@@ -1473,9 +1473,7 @@ libnm/libnm.typelib: libnm/libnm.gir + INTROSPECTION_GIRS += libnm/NM-1.0.gir libnm_noinst_data = \ - libnm/nm-property-docs.xml \ @@ -31,7 +37,7 @@ index b180466..1ab4658 100644 libnm/nm-settings-keyfile-docs.xml \ libnm/nm-settings-ifcfg-rh-docs.xml -@@ -3930,18 +3928,9 @@ $(clients_common_libnmc_base_la_OBJECTS): $(libnm_lib_h_pub_mkenums) +@@ -4236,18 +4234,9 @@ $(clients_common_libnmc_base_la_OBJECTS): $(libnm_lib_h_pub_mkenums) $(clients_common_libnmc_base_la_OBJECTS): clients/common/.dirstamp clients_common_settings_doc_h = clients/common/settings-docs.h @@ -51,10 +57,10 @@ index b180466..1ab4658 100644 $(clients_common_settings_doc_h) \ $(clients_common_settings_doc_h).in diff --git a/configure.ac b/configure.ac -index b914219..872c292 100644 +index ad4b0fc..0092092 100644 --- a/configure.ac +++ b/configure.ac -@@ -1215,11 +1215,6 @@ GTK_DOC_CHECK(1.0) +@@ -1201,11 +1201,6 @@ GTK_DOC_CHECK(1.0) # check if we can build setting property documentation build_docs=no if test -n "$INTROSPECTION_MAKEFILE"; then @@ -66,6 +72,3 @@ index b914219..872c292 100644 AC_PATH_PROG(PERL, perl) if test -z "$PERL"; then AC_MSG_ERROR([--enable-introspection requires perl]) --- -2.20.1 - diff --git a/meta-gnome/recipes-connectivity/networkmanager/networkmanager/networkmanager.initd b/meta-gnome/recipes-connectivity/networkmanager/networkmanager/networkmanager.initd new file mode 100644 index 0000000..4fdd80d --- /dev/null +++ b/meta-gnome/recipes-connectivity/networkmanager/networkmanager/networkmanager.initd @@ -0,0 +1,110 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: network-manager +# Required-Start: $remote_fs dbus udev +# Required-Stop: $remote_fs dbus udev +# Should-Start: $syslog +# Should-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: network connection manager +# Description: Daemon for automatically switching network +# connections to the best available connection. +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DESC="network connection manager" +NAME="NetworkManager" + +DAEMON=/usr/sbin/$NAME + +PIDFILE=/run/$NAME/$NAME.pid + +SCRIPTNAME=/etc/init.d/network-manager + +. /etc/init.d/functions || exit 1 + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +log_daemon_msg() { + echo -n $* +} + +log_end_msg() { + if [ $1 -eq 0 ]; then + success + else + failure + fi + echo +} + +log_progress_msg () { + if [ -z "${1:-}" ]; then + return 1 + fi + echo -n " $@" +} + +# +# Function that starts the daemon/service. +# +d_start() { + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --exec $DAEMON -- $DAEMON_OPTS +} + +# +# Function that stops the daemon/service. +# +d_stop() { + start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \ + --exec $DAEMON +} + +d_reload() { + start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE \ + --exec $DAEMON +} + +case "$1" in + start) + log_daemon_msg "Starting $DESC" "$NAME" + d_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_progress_msg "already started" + log_end_msg 0 ;; + *) log_end_msg 1 ;; + esac + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + d_stop + case "$?" in + 0) log_end_msg 0 ;; + 1) log_progress_msg "already stopped" + log_end_msg 0 ;; + *) log_end_msg 1 ;; + esac + ;; + reload|force-reload) + log_daemon_msg "Reloading $DESC" "$NAME" + d_reload + log_end_msg $? + ;; + restart) + $0 stop + $0 start + ;; + status) + status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $? + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/meta-gnome/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb b/meta-gnome/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb deleted file mode 100644 index bdf60ee..0000000 --- a/meta-gnome/recipes-connectivity/networkmanager/networkmanager_1.16.0.bb +++ /dev/null @@ -1,143 +0,0 @@ -SUMMARY = "NetworkManager" -HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager" -SECTION = "net/misc" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b \ - file://libnm-util/COPYING;md5=1c4fa765d6eb3cd2fbd84344a1b816cd \ - file://docs/api/html/license.html;md5=233931303ef80eded167add1f60a50c1 \ -" - -DEPENDS = " \ - intltool-native \ - libxslt-native \ - libnl \ - libgudev \ - util-linux \ - libndp \ - libnewt \ - jansson \ - curl \ -" - -inherit gnomebase gettext systemd bluetooth bash-completion vala gobject-introspection gtk-doc - -SRC_URI = " \ - ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ - file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \ - file://0002-Do-not-create-settings-settings-property-documentati.patch \ - file://musl/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch \ - file://musl/0002-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch \ - file://musl/0003-musl-basic.patch \ - file://musl/0004-musl-dlopen-configure-ac.patch \ - file://musl/0005-musl-network-support.patch \ - file://musl/0006-musl-process-util.patch \ - file://musl/0007-musl-avoid-further-conflicts-by-including-net-ethern.patch \ - file://musl/0008-Add-a-strndupa-replacement-for-musl.patch \ -" -SRC_URI[md5sum] = "10abacaafb162a67d2942adf03e7e9e4" -SRC_URI[sha256sum] = "8e962833b6ca03edda1bc57ed6614a7b8c2339531b44acef098d05f2324c5d2c" - -UPSTREAM_CHECK_URI = "${GNOME_MIRROR}/NetworkManager/1.10/" -UPSTREAM_CHECK_REGEX = "NetworkManager\-(?P1\.10(\.\d+)+).tar.xz" - -S = "${WORKDIR}/NetworkManager-${PV}" - -EXTRA_OECONF = " \ - --disable-ifcfg-rh \ - --disable-more-warnings \ - --with-iptables=${sbindir}/iptables \ - --with-tests \ - --with-nmtui=yes \ - --with-udev-dir=${nonarch_base_libdir}/udev \ -" - -# gobject-introspection related -GI_DATA_ENABLED_libc-musl = "False" - -# stolen from https://github.com/voidlinux/void-packages/blob/master/srcpkgs/NetworkManager/template -CFLAGS_libc-musl_append = " \ - -DHAVE_SECURE_GETENV -Dsecure_getenv=getenv \ - -D__USE_POSIX199309 -DRTLD_DEEPBIND=0 \ -" - -do_compile_prepend() { - export GIR_EXTRA_LIBS_PATH="${B}/libnm/.libs:${B}/libnm-glib/.libs:${B}/libnm-util/.libs" -} - -PACKAGECONFIG ??= "nss ifupdown dhclient dnsmasq \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'wifi polkit', d)} \ -" -PACKAGECONFIG[systemd] = " \ - --with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd, \ - --without-systemdsystemunitdir, \ -" -PACKAGECONFIG[polkit] = "--enable-polkit --enable-polkit-agent,--disable-polkit --disable-polkit-agent,polkit" -PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5" -# consolekit is not picked by shlibs, so add it to RDEPENDS too -PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit" -PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager" -PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp" -# Use full featured dhcp client instead of internal one -PACKAGECONFIG[dhclient] = "--with-dhclient=${base_sbindir}/dhclient,,,dhcp-client" -PACKAGECONFIG[dnsmasq] = "--with-dnsmasq=${bindir}/dnsmasq" -PACKAGECONFIG[nss] = "--with-crypto=nss,,nss" -PACKAGECONFIG[glib] = "--with-libnm-glib,,dbus-glib-native dbus-glib" -PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls" -PACKAGECONFIG[wifi] = "--enable-wifi=yes,--enable-wifi=no,,wpa-supplicant" -PACKAGECONFIG[ifupdown] = "--enable-ifupdown,--disable-ifupdown" -PACKAGECONFIG[qt4-x11-free] = "--enable-qt,--disable-qt,qt4-x11-free" - -PACKAGES =+ "libnmutil libnmglib libnmglib-vpn \ - ${PN}-nmtui ${PN}-nmtui-doc \ - ${PN}-adsl \ -" - -FILES_libnmutil += "${libdir}/libnm-util.so.*" -FILES_libnmglib += "${libdir}/libnm-glib.so.*" -FILES_libnmglib-vpn += "${libdir}/libnm-glib-vpn.so.*" - -FILES_${PN}-adsl = "${libdir}/NetworkManager/libnm-device-plugin-adsl.so" - -FILES_${PN} += " \ - ${libexecdir} \ - ${libdir}/NetworkManager/${PV}/*.so \ - ${nonarch_libdir}/NetworkManager/VPN \ - ${nonarch_libdir}/NetworkManager/conf.d \ - ${datadir}/polkit-1 \ - ${datadir}/dbus-1 \ - ${noarch_base_libdir}/udev/* \ - ${systemd_unitdir}/system \ - ${libdir}/pppd \ -" - -RRECOMMENDS_${PN} += "iptables \ - ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \ -" -RCONFLICTS_${PN} = "connman" - -FILES_${PN}-dev += " \ - ${datadir}/NetworkManager/gdb-cmd \ - ${libdir}/pppd/*/*.la \ - ${libdir}/NetworkManager/*.la \ - ${libdir}/NetworkManager/${PV}/*.la \ -" - -FILES_${PN}-nmtui = " \ - ${bindir}/nmtui \ - ${bindir}/nmtui-edit \ - ${bindir}/nmtui-connect \ - ${bindir}/nmtui-hostname \ -" - -FILES_${PN}-nmtui-doc = " \ - ${mandir}/man1/nmtui* \ -" - -SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'NetworkManager.service NetworkManager-dispatcher.service', '', d)}" - -do_install_append() { - rm -rf ${D}/run ${D}${localstatedir}/run -} diff --git a/meta-gnome/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb b/meta-gnome/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb new file mode 100644 index 0000000..53bb870 --- /dev/null +++ b/meta-gnome/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb @@ -0,0 +1,170 @@ +SUMMARY = "NetworkManager" +HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager" +SECTION = "net/misc" + +LICENSE = "GPLv2+ & LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \ +" + +DEPENDS = " \ + intltool-native \ + libxslt-native \ + libnl \ + libgudev \ + util-linux \ + libndp \ + libnewt \ + jansson \ + curl \ +" + +inherit gnomebase gettext update-rc.d systemd bash-completion vala gobject-introspection gtk-doc update-alternatives upstream-version-is-even + +SRC_URI = " \ + ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ + file://${BPN}.initd \ + file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \ + file://0002-Do-not-create-settings-settings-property-documentati.patch \ + file://NetworkManager.conf \ +" +SRC_URI_append_libc-musl = " \ + file://musl/0001-Fix-build-with-musl-systemd-specific.patch \ + file://musl/0002-Fix-build-with-musl.patch \ + file://musl/0003-Fix-build-with-musl-for-n-dhcp4.patch \ + file://musl/0004-Fix-build-with-musl-systemd-specific.patch \ +" +SRC_URI[sha256sum] = "2b29ccc1531ba7ebba95a97f40c22b963838e8b6833745efe8e6fb71fd8fca77" + +S = "${WORKDIR}/NetworkManager-${PV}" + +EXTRA_OECONF = " \ + --disable-ifcfg-rh \ + --disable-more-warnings \ + --with-iptables=${sbindir}/iptables \ + --with-tests \ + --with-nmtui=no \ + --with-udev-dir=${nonarch_base_libdir}/udev \ + --with-iwd \ +" + +# stolen from https://github.com/void-linux/void-packages/blob/master/srcpkgs/NetworkManager/template +# avoids: +# | ../NetworkManager-1.16.0/libnm-core/nm-json.c:106:50: error: 'RTLD_DEEPBIND' undeclared (first use in this function); did you mean 'RTLD_DEFAULT'? +CFLAGS_append_libc-musl = " \ + -DRTLD_DEEPBIND=0 \ +" + +do_compile_prepend() { + export GIR_EXTRA_LIBS_PATH="${B}/libnm/.libs:${B}/libnm-glib/.libs:${B}/libnm-util/.libs" +} + +PACKAGECONFIG ??= "nss ifupdown dhclient dnsmasq \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'wifi polkit', d)} \ +" +PACKAGECONFIG[systemd] = " \ + --with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd, \ + --without-systemdsystemunitdir, \ +" +PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit" +PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5" +# consolekit is not picked by shlibs, so add it to RDEPENDS too +PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit" +PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager" +PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp" +# Use full featured dhcp client instead of internal one +PACKAGECONFIG[dhclient] = "--with-dhclient=${base_sbindir}/dhclient,,,dhcp-client" +PACKAGECONFIG[dnsmasq] = "--with-dnsmasq=${bindir}/dnsmasq" +PACKAGECONFIG[nss] = "--with-crypto=nss,,nss" +PACKAGECONFIG[resolvconf] = "--with-resolvconf=${base_sbindir}/resolvconf,,,resolvconf" +PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls" +PACKAGECONFIG[wifi] = "--enable-wifi=yes,--enable-wifi=no,,iwd" +PACKAGECONFIG[ifupdown] = "--enable-ifupdown,--disable-ifupdown" +PACKAGECONFIG[qt4-x11-free] = "--enable-qt,--disable-qt,qt4-x11-free" +PACKAGECONFIG[cloud-setup] = "--with-nm-cloud-setup=yes,--with-nm-cloud-setup=no" + +PACKAGES =+ " \ + ${PN}-nmtui ${PN}-nmtui-doc \ + ${PN}-adsl ${PN}-cloud-setup \ +" + +SYSTEMD_PACKAGES = "${PN} ${PN}-cloud-setup" + +FILES_${PN}-adsl = "${libdir}/NetworkManager/${PV}/libnm-device-plugin-adsl.so" + +FILES_${PN}-cloud-setup = " \ + ${libexecdir}/nm-cloud-setup \ + ${systemd_system_unitdir}/nm-cloud-setup.service \ + ${systemd_system_unitdir}/nm-cloud-setup.timer \ + ${libdir}/NetworkManager/dispatcher.d/90-nm-cloud-setup.sh \ + ${libdir}/NetworkManager/dispatcher.d/no-wait.d/90-nm-cloud-setup.sh \ +" +ALLOW_EMPTY_${PN}-cloud-setup = "1" +SYSTEMD_SERVICE_${PN}-cloud-setup = "${@bb.utils.contains('PACKAGECONFIG', 'cloud-setup', 'nm-cloud-setup.service nm-cloud-setup.timer', '', d)}" + +FILES_${PN} += " \ + ${libexecdir} \ + ${libdir}/NetworkManager/${PV}/*.so \ + ${libdir}/NetworkManager \ + ${nonarch_libdir}/NetworkManager/conf.d \ + ${nonarch_libdir}/NetworkManager/dispatcher.d \ + ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-down.d \ + ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-up.d \ + ${nonarch_libdir}/NetworkManager/dispatcher.d/no-wait.d \ + ${nonarch_libdir}/NetworkManager/VPN \ + ${nonarch_libdir}/NetworkManager/system-connections \ + ${datadir}/polkit-1 \ + ${datadir}/dbus-1 \ + ${nonarch_base_libdir}/udev/* \ + ${systemd_system_unitdir} \ + ${libdir}/pppd \ +" + +RRECOMMENDS_${PN} += "iptables \ + ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \ +" +RCONFLICTS_${PN} = "connman" + +FILES_${PN}-dev += " \ + ${datadir}/NetworkManager/gdb-cmd \ + ${libdir}/pppd/*/*.la \ + ${libdir}/NetworkManager/*.la \ + ${libdir}/NetworkManager/${PV}/*.la \ +" + +FILES_${PN}-nmtui = " \ + ${bindir}/nmtui \ + ${bindir}/nmtui-edit \ + ${bindir}/nmtui-connect \ + ${bindir}/nmtui-hostname \ +" + +FILES_${PN}-nmtui-doc = " \ + ${mandir}/man1/nmtui* \ +" + +INITSCRIPT_NAME = "network-manager" +SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'NetworkManager.service NetworkManager-dispatcher.service', '', d)}" + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" +ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.NetworkManager','',d)}" +ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}" + +do_install_append() { + install -Dm 0755 ${WORKDIR}/${BPN}.initd ${D}${sysconfdir}/init.d/network-manager + + rm -rf ${D}/run ${D}${localstatedir}/run + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + # For read-only filesystem, do not create links during bootup + ln -sf ../run/NetworkManager/resolv.conf ${D}${sysconfdir}/resolv-conf.NetworkManager + + # systemd v210 and newer do not need this rule file + rm ${D}/${nonarch_base_libdir}/udev/rules.d/84-nm-drivers.rules + fi + install -d ${D}${sysconfdir}/NetworkManager/ + install -m 0644 ${WORKDIR}/NetworkManager.conf ${D}${sysconfdir}/NetworkManager/ +} diff --git a/meta-gnome/recipes-devtools/cbindgen/cbindgen_0.8.7.bb b/meta-gnome/recipes-devtools/cbindgen/cbindgen_0.8.7.bb new file mode 100644 index 0000000..8553dd6 --- /dev/null +++ b/meta-gnome/recipes-devtools/cbindgen/cbindgen_0.8.7.bb @@ -0,0 +1,82 @@ +# Auto-Generated by cargo-bitbake 0.3.10 +# +inherit cargo + +# If this is git based prefer versioned ones if they exist +# DEFAULT_PREFERENCE = "-1" + +# how to get cbindgen could be as easy as but default to a git checkout: +# SRC_URI += "crate://crates.io/cbindgen/0.8.7" +SRC_URI += "git://github.com/eqrion/cbindgen.git;protocol=https" +SRCREV = "7b9ea991bdabb442093014d21fde6a192f574f21" +S = "${WORKDIR}/git" +CARGO_SRC_DIR="" +PV_append = ".AUTOINC+7b9ea991bd" + +BBCLASSEXTEND = "native" + +# please note if you have entries that do not begin with crate:// +# you must change them to how that package can be fetched +SRC_URI += " \ +crate://crates.io/ansi_term/0.11.0 \ +crate://crates.io/atty/0.2.11 \ +crate://crates.io/autocfg/0.1.2 \ +crate://crates.io/bitflags/1.0.4 \ +crate://crates.io/cfg-if/0.1.6 \ +crate://crates.io/clap/2.32.0 \ +crate://crates.io/cloudabi/0.0.3 \ +crate://crates.io/fuchsia-zircon-sys/0.3.3 \ +crate://crates.io/fuchsia-zircon/0.3.3 \ +crate://crates.io/itoa/0.4.3 \ +crate://crates.io/libc/0.2.47 \ +crate://crates.io/log/0.4.6 \ +crate://crates.io/proc-macro2/0.4.25 \ +crate://crates.io/quote/0.6.10 \ +crate://crates.io/rand/0.6.4 \ +crate://crates.io/rand_chacha/0.1.1 \ +crate://crates.io/rand_core/0.3.0 \ +crate://crates.io/rand_hc/0.1.0 \ +crate://crates.io/rand_isaac/0.1.1 \ +crate://crates.io/rand_os/0.1.1 \ +crate://crates.io/rand_pcg/0.1.1 \ +crate://crates.io/rand_xorshift/0.1.1 \ +crate://crates.io/rdrand/0.4.0 \ +crate://crates.io/redox_syscall/0.1.50 \ +crate://crates.io/redox_termios/0.1.1 \ +crate://crates.io/remove_dir_all/0.5.1 \ +crate://crates.io/rustc_version/0.2.3 \ +crate://crates.io/ryu/0.2.7 \ +crate://crates.io/semver-parser/0.7.0 \ +crate://crates.io/semver/0.9.0 \ +crate://crates.io/serde/1.0.84 \ +crate://crates.io/serde_derive/1.0.84 \ +crate://crates.io/serde_json/1.0.36 \ +crate://crates.io/strsim/0.7.0 \ +crate://crates.io/syn/0.15.26 \ +crate://crates.io/tempfile/3.0.5 \ +crate://crates.io/termion/1.5.1 \ +crate://crates.io/textwrap/0.10.0 \ +crate://crates.io/toml/0.5.1 \ +crate://crates.io/unicode-width/0.1.5 \ +crate://crates.io/unicode-xid/0.1.0 \ +crate://crates.io/vec_map/0.8.1 \ +crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ +crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ +crate://crates.io/winapi/0.3.6 \ +" + + + +LIC_FILES_CHKSUM=" \ +file://LICENSE;md5=9741c346eef56131163e13b9db1241b3 \ +" + +SUMMARY = "A tool for generating C bindings to Rust code." +HOMEPAGE = "https://github.com/eqrion/cbindgen/" +LICENSE = "MPL-2.0" + +# includes this file if it exists but does not fail +# this is useful for anything you may want to override from +# what cargo-bitbake generates. +include cbindgen-${PV}.inc +include cbindgen.inc diff --git a/meta-gnome/recipes-devtools/meson/meson_%.bbappend b/meta-gnome/recipes-devtools/meson/meson_%.bbappend index 8248ccb..23dbaba 100644 --- a/meta-gnome/recipes-devtools/meson/meson_%.bbappend +++ b/meta-gnome/recipes-devtools/meson/meson_%.bbappend @@ -1,6 +1,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/meson:" -SRC_URI += "\ - file://0001-use-exe-wrapper-for-custom-targets.patch \ -" +#SRC_URI += "\ +# file://0001-use-exe-wrapper-for-custom-targets.patch \ +#" diff --git a/meta-gnome/recipes-devtools/yasm/yasm_git.bb b/meta-gnome/recipes-devtools/yasm/yasm_git.bb new file mode 100644 index 0000000..5385626 --- /dev/null +++ b/meta-gnome/recipes-devtools/yasm/yasm_git.bb @@ -0,0 +1,22 @@ +SUMMARY = "x86 (SSE) assembler supporting NASM and GAS-syntaxes" +LICENSE = "MIT" +HOMEPAGE = "http://www.tortall.net/projects/yasm/" + +LIC_FILES_CHKSUM = "file://COPYING;md5=a12d8903508fb6bfd49d8d82c6170dd9" + +DEPENDS += "flex-native bison-native xmlto-native" + +PV = "1.3.0+git${SRCPV}" +# v1.3.0 +SRCREV = "ba463d3c26c0ece2e797b8d6381b161633b5971a" +SRC_URI = "git://github.com/yasm/yasm.git" + +S = "${WORKDIR}/git" + +inherit autotools gettext python3native + +CACHED_CONFIGUREVARS = "CCLD_FOR_BUILD='${CC_FOR_BUILD}'" + +BBCLASSEXTEND = "native" + +PARALLEL_MAKE = "" diff --git a/meta-gnome/recipes-freedesktop/accountsservice/accountsservice_0.6.55.bb b/meta-gnome/recipes-freedesktop/accountsservice/accountsservice_0.6.55.bb new file mode 100644 index 0000000..01d8328 --- /dev/null +++ b/meta-gnome/recipes-freedesktop/accountsservice/accountsservice_0.6.55.bb @@ -0,0 +1,22 @@ +SUMMARY = "D-Bus service for accessing the list of user accounts and information attached to those accounts." +HOMEPAGE = "https://www.freedesktop.org/wiki/Software/AccountsService" + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "https://www.freedesktop.org/software/accountsservice/accountsservice-${PV}.tar.xz" +SRC_URI[md5sum] = "6e4c6fbd490260cfe17de2e76f5d803a" +SRC_URI[sha256sum] = "ff2b2419a7e06bd9cb335ffe391c7409b49a0f0130b890bd54692a3986699c9b" + +DEPENDS = "glib-2.0 intltool-native polkit systemd glib-2.0-native dbus" + +inherit meson pkgconfig gettext gobject-introspection + +FILES_${PN} += "\ + ${datadir}/dbus-1/interfaces/*.xml \ + ${datadir}/dbus-1/system-services/org.freedesktop.Accounts.service \ + ${datadir}/polkit-1/actions/org.freedesktop.accounts.policy \ + ${systemd_system_unitdir} \ +" +EXTRA_OEMESON = "-Dsystemd=true" + diff --git a/meta-gnome/recipes-freedesktop/colord/colord-native.bb b/meta-gnome/recipes-freedesktop/colord/colord-native.bb new file mode 100644 index 0000000..845041c --- /dev/null +++ b/meta-gnome/recipes-freedesktop/colord/colord-native.bb @@ -0,0 +1,64 @@ +require ${BPN}.inc + +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}-native:" + +inherit meson native + +DEPENDS += " \ + meson-native \ + glib-2.0-native \ + lcms-native \ +" + +SRC_URI += " \ + file://0001-Move-the-function-cd_icc_create_from_edid-to-avoid-u.patch \ + file://Makefile;subdir=${BPN}-${PV} \ +" + +do_configure() { + # we expect meson to fail - but before it extracts project's version in log file + meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" ${MESON_CROSS_FILE} ${EXTRA_OEMESON} > /dev/null 2>&1 || true + + # extract and split version + version=`grep 'Project version:' ${B}/meson-logs/meson-log.txt | sed 's|Project version: ||'` + major=`echo $version | cut -d. -f1` + minor=`echo $version | cut -d. -f2` + micro=`echo $version | cut -d. -f3` + echo "Project version: $major.$minor.$micro" + + # extract project name + proj_name=`grep 'Project name:' ${B}/meson-logs/meson-log.txt | sed 's|Project name: ||'` + + # create cd-version.h + mkdir -p ${B}/colord + sed ${S}/lib/colord/cd-version.h.in \ + -e 's:@CD_MAJOR_VERSION_PRIVATE@:1:g' \ + -e 's:@CD_MINOR_VERSION_PRIVATE@:4:g' \ + -e 's:@CD_MICRO_VERSION_PRIVATE@:4:g' \ + > ${B}/colord/cd-version.h + + # create config.h based on target build and add what's necessary only + localedir=`echo ${datadir}/locale | sed 's:${prefix}/::g'` + echo "#define LOCALEDIR \"$localedir\"" >> ${B}/config.h + echo "#define GETTEXT_PACKAGE \"colord\"" >> ${B}/config.h + echo "#define PACKAGE_NAME \"$proj_name\"" >> ${B}/config.h + echo "#define PACKAGE_VERSION \"$version\"" >> ${B}/config.h +} + +do_compile() { + oe_runmake -C${S} DESTDIR=${B} +} + +do_install() { + version=`grep 'Project version:' ${B}/meson-logs/meson-log.txt | sed 's|Project version: ||'` + major=`echo $version | cut -d. -f1` + + install -d ${D}${libdir} + install -m 755 ${B}/libcolord.so ${D}${libdir}/libcolord.so.$version + ln -s libcolord.so.$version "${D}/${libdir}/libcolord.so" + ln -s libcolord.so.$version "${D}/${libdir}/libcolord.so.$major" + + install -d ${D}${bindir} + install -m 755 ${B}/cd_create_profile ${D}${bindir}/ + install -m 755 ${B}/cd_idt8 ${D}${bindir}/ +} diff --git a/meta-gnome/recipes-freedesktop/colord/colord-native/0001-Move-the-function-cd_icc_create_from_edid-to-avoid-u.patch b/meta-gnome/recipes-freedesktop/colord/colord-native/0001-Move-the-function-cd_icc_create_from_edid-to-avoid-u.patch new file mode 100644 index 0000000..278b90e --- /dev/null +++ b/meta-gnome/recipes-freedesktop/colord/colord-native/0001-Move-the-function-cd_icc_create_from_edid-to-avoid-u.patch @@ -0,0 +1,166 @@ +From cbb8f5c05fce1d56ae2e5fa9f57fc49c47bed5ab Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Sun, 12 May 2019 21:58:02 +0200 +Subject: [PATCH] Move the function cd_icc_create_from_edid to avoid udev + dependeny +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We do not have udev-native so it is a dependeny we cannot satisfy + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Andreas Müller +--- + lib/colord/cd-edid.c | 63 ++++++++++++++++++++++++++++++++++++++++++++ + lib/colord/cd-icc.c | 62 ------------------------------------------- + 2 files changed, 63 insertions(+), 62 deletions(-) + +diff --git a/lib/colord/cd-edid.c b/lib/colord/cd-edid.c +index a5e2328..dec509a 100644 +--- a/lib/colord/cd-edid.c ++++ b/lib/colord/cd-edid.c +@@ -687,3 +687,66 @@ cd_edid_new (void) + edid = g_object_new (CD_TYPE_EDID, NULL); + return CD_EDID (edid); + } ++ ++/** ++ * cd_icc_create_from_edid_data: ++ * @icc: A valid #CdIcc ++ * @edid: EDID data ++ * @error: A #GError, or %NULL ++ * ++ * Creates an ICC profile from EDID data. ++ * ++ * Return value: %TRUE for success ++ * ++ * Since: 1.1.2 ++ **/ ++gboolean ++cd_icc_create_from_edid_data (CdIcc *icc, CdEdid *edid, GError **error) ++{ ++ CdIccPrivate *priv = GET_PRIVATE (icc); ++ const gchar *data; ++ ++ /* not loaded */ ++ if (priv->lcms_profile != NULL) { ++ g_set_error_literal (error, ++ CD_ICC_ERROR, ++ CD_ICC_ERROR_FAILED_TO_CREATE, ++ "already loaded or generated"); ++ return FALSE; ++ } ++ ++ /* create from parsed object */ ++ if (!cd_icc_create_from_edid (icc, ++ cd_edid_get_gamma (edid), ++ cd_edid_get_red (edid), ++ cd_edid_get_green (edid), ++ cd_edid_get_blue (edid), ++ cd_edid_get_white (edid), ++ error)) { ++ return FALSE; ++ } ++ ++ /* set copyright */ ++ cd_icc_set_copyright (icc, NULL, ++ /* deliberately not translated */ ++ "This profile is free of known copyright restrictions."); ++ ++ /* set 'ICC meta Tag for Monitor Profiles' data */ ++ data = cd_edid_get_checksum (edid); ++ if (data != NULL) ++ cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_MD5, data); ++ data = cd_edid_get_monitor_name (edid); ++ if (data != NULL) ++ cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_MODEL, data); ++ data = cd_edid_get_serial_number (edid); ++ if (data != NULL) ++ cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_SERIAL, data); ++ data = cd_edid_get_pnp_id (edid); ++ if (data != NULL) ++ cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_MNFT, data); ++ data = cd_edid_get_vendor_name (edid); ++ if (data != NULL) ++ cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_VENDOR, data); ++ return TRUE; ++} ++ +diff --git a/lib/colord/cd-icc.c b/lib/colord/cd-icc.c +index f231814..2c8fe77 100644 +--- a/lib/colord/cd-icc.c ++++ b/lib/colord/cd-icc.c +@@ -3094,68 +3094,6 @@ out: + return ret; + } + +-/** +- * cd_icc_create_from_edid_data: +- * @icc: A valid #CdIcc +- * @edid: EDID data +- * @error: A #GError, or %NULL +- * +- * Creates an ICC profile from EDID data. +- * +- * Return value: %TRUE for success +- * +- * Since: 1.1.2 +- **/ +-gboolean +-cd_icc_create_from_edid_data (CdIcc *icc, CdEdid *edid, GError **error) +-{ +- CdIccPrivate *priv = GET_PRIVATE (icc); +- const gchar *data; +- +- /* not loaded */ +- if (priv->lcms_profile != NULL) { +- g_set_error_literal (error, +- CD_ICC_ERROR, +- CD_ICC_ERROR_FAILED_TO_CREATE, +- "already loaded or generated"); +- return FALSE; +- } +- +- /* create from parsed object */ +- if (!cd_icc_create_from_edid (icc, +- cd_edid_get_gamma (edid), +- cd_edid_get_red (edid), +- cd_edid_get_green (edid), +- cd_edid_get_blue (edid), +- cd_edid_get_white (edid), +- error)) { +- return FALSE; +- } +- +- /* set copyright */ +- cd_icc_set_copyright (icc, NULL, +- /* deliberately not translated */ +- "This profile is free of known copyright restrictions."); +- +- /* set 'ICC meta Tag for Monitor Profiles' data */ +- data = cd_edid_get_checksum (edid); +- if (data != NULL) +- cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_MD5, data); +- data = cd_edid_get_monitor_name (edid); +- if (data != NULL) +- cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_MODEL, data); +- data = cd_edid_get_serial_number (edid); +- if (data != NULL) +- cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_SERIAL, data); +- data = cd_edid_get_pnp_id (edid); +- if (data != NULL) +- cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_MNFT, data); +- data = cd_edid_get_vendor_name (edid); +- if (data != NULL) +- cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_VENDOR, data); +- return TRUE; +-} +- + /** + * cd_icc_create_from_edid: + * @icc: A valid #CdIcc +-- +2.20.1 + diff --git a/meta-gnome/recipes-freedesktop/colord/colord-native/Makefile b/meta-gnome/recipes-freedesktop/colord/colord-native/Makefile new file mode 100644 index 0000000..1e29e4f --- /dev/null +++ b/meta-gnome/recipes-freedesktop/colord/colord-native/Makefile @@ -0,0 +1,48 @@ +# For native build cd_idt8, cd_create_profile and a tiny version of libcolord.so +# only. By reducing the library to what's necessary, we avoid dependencies on +# naitve udev and libgudev + +CFLAGS+=$(shell pkg-config-native --cflags gio-2.0) +CFLAGS+=$(shell pkg-config-native --cflags lcms2) +CFLAGS+=-std=c99 -I./lib -I./lib/colord -I$(DESTDIR) -DCD_COMPILATION + +LDFLAGS+=$(shell pkg-config-native --libs gio-2.0) +LDFLAGS+=$(shell pkg-config-native --libs lcms2) +LDFLAGS+=-lm + +all: cd_idt8 cd_create_profile + +LIBSOURCES = \ + lib/colord/cd-it8.c \ + lib/colord/cd-color.c \ + lib/colord/cd-spectrum.c \ + lib/colord/cd-math.c \ + lib/colord/cd-interp-akima.c \ + lib/colord/cd-context-lcms.c \ + lib/colord/cd-interp.c \ + lib/colord/cd-interp-linear.c \ + lib/colord/cd-it8-utils.c \ + lib/colord/cd-enum.c \ + lib/colord/cd-icc.c \ + lib/colord/cd-icc-utils.c \ + lib/colord/cd-dom.c + +libcolord.so: $(LIBSOURCES) + $(CC) $(CFLAGS) -L$(DESTDIR) -fPIC -shared -Wl,-soname,$@ $^ -o $(DESTDIR)/$@ $(LDFLAGS) + +cd_idt8.o: client/cd-it8.c + $(CC) $(CFLAGS) -c $^ -o $(DESTDIR)/$@ + +cd_idt8: libcolord.so cd_idt8.o + $(CC) $(DESTDIR)/cd_idt8.o -o $(DESTDIR)/$@ -L$(DESTDIR) -lcolord $(LDFLAGS) + +cd_create_profile.o: client/cd-create-profile.c + $(CC) $(CFLAGS) -c $^ -o $(DESTDIR)/$@ + +cd_create_profile: libcolord.so cd_create_profile.o + $(CC) $(DESTDIR)/cd_create_profile.o -o $(DESTDIR)/$@ -L$(DESTDIR) -lcolord $(LDFLAGS) + +.PHONY: clean + +clean: + rm -f $(DESTDIR)/libcolord.so $(DESTDIR)/*.o $(DESTDIR)/cd_idt8 $(DESTDIR)/cd_create_profile diff --git a/meta-gnome/recipes-freedesktop/colord/colord.bb b/meta-gnome/recipes-freedesktop/colord/colord.bb new file mode 100644 index 0000000..214338e --- /dev/null +++ b/meta-gnome/recipes-freedesktop/colord/colord.bb @@ -0,0 +1,44 @@ +require ${BPN}.inc + +inherit meson gobject-introspection gsettings gettext bash-completion systemd useradd + +# polkit and gobject-introspection are mandatory and cannot be configured +UNKNOWN_CONFIGURE_WHITELIST_append = " introspection" + +DEPENDS += " \ + ${BPN}-native \ + glib-2.0 \ + lcms \ + sqlite3 \ + libgusb \ + libgudev \ + polkit \ +" + +SRC_URI += " \ + file://0001-Run-native-cd_idt8-cd_create_profile.patch \ +" + +EXTRA_OEMESON = " \ + -Dman=false \ + -Ddocs=false \ +" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[systemd] = "-Dsystemd=true, -Dsystemd=false, systemd" + +SYSTEMD_SERVICE_${PN} = "colord.service" + +FILES_${PN} += " \ + ${datadir}/dbus-1 \ + ${datadir}/polkit-1 \ + ${datadir}/glib-2.0 \ + ${datadir}/color \ + ${systemd_user_unitdir} \ + ${libdir}/tmpfiles.d \ + ${libdir}/colord-plugins \ + ${libdir}/colord-sensors \ +" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system --user-group -d /var/lib/colord -s /bin/false colord" diff --git a/meta-gnome/recipes-freedesktop/colord/colord.inc b/meta-gnome/recipes-freedesktop/colord/colord.inc new file mode 100644 index 0000000..7497fed --- /dev/null +++ b/meta-gnome/recipes-freedesktop/colord/colord.inc @@ -0,0 +1,13 @@ +SUMMARY = "Making color management just work" +HOMEPAGE = "https://www.freedesktop.org/software/colord/" +LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://meson.build;beginline=3;endline=3;md5=f42198707d793be58b274d34fd5238c3 \ +" + +PV = "1.4.4" +SRC_URI = "https://www.freedesktop.org/software/colord/releases/${BPN}-${PV}.tar.xz" +SRC_URI[md5sum] = "32c2709a6002d9ee750483aaed6379c8" +SRC_URI[sha256sum] = "9a0fe80160bf88efddb582a9fc0169f56065276dc3882c47dddb9eecd048c0a5" + diff --git a/meta-gnome/recipes-freedesktop/colord/colord/0001-Run-native-cd_idt8-cd_create_profile.patch b/meta-gnome/recipes-freedesktop/colord/colord/0001-Run-native-cd_idt8-cd_create_profile.patch new file mode 100644 index 0000000..4b52aa3 --- /dev/null +++ b/meta-gnome/recipes-freedesktop/colord/colord/0001-Run-native-cd_idt8-cd_create_profile.patch @@ -0,0 +1,59 @@ +From 5aad8831c0fb71940d6c4f982b0b30ffb6ae33b3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Sun, 12 May 2019 22:47:05 +0200 +Subject: [PATCH] Run native cd_idt8/cd_create_profile +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Andreas Müller +--- + data/cmf/meson.build | 2 +- + data/illuminant/meson.build | 2 +- + data/profiles/meson.build | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/data/cmf/meson.build b/data/cmf/meson.build +index a693cd7..1ae3613 100644 +--- a/data/cmf/meson.build ++++ b/data/cmf/meson.build +@@ -2,7 +2,7 @@ foreach arg: [ 'CIE1964-10deg-XYZ', 'CIE1931-2deg-XYZ' ] + custom_target(arg, + input: arg + '.csv', + output: arg + '.cmf', +- command: [ cd_idt8, 'create-cmf', '@OUTPUT@', '@INPUT@', '1.0' ], ++ command: [ 'cd_idt8', 'create-cmf', '@OUTPUT@', '@INPUT@', '1.0' ], + install: true, + install_dir: join_paths(datadir, 'colord', 'cmf') + ) +diff --git a/data/illuminant/meson.build b/data/illuminant/meson.build +index f8dfa07..ad7dced 100644 +--- a/data/illuminant/meson.build ++++ b/data/illuminant/meson.build +@@ -24,7 +24,7 @@ foreach arg: generated_spectra + custom_target(arg, + input: arg + '.csv', + output: arg + '.sp', +- command: [ cd_idt8, 'create-sp', '@OUTPUT@', '@INPUT@', '100.0' ], ++ command: [ 'cd_idt8', 'create-sp', '@OUTPUT@', '@INPUT@', '100.0' ], + install: true, + install_dir: join_paths(datadir, 'colord', 'illuminant') + ) +diff --git a/data/profiles/meson.build b/data/profiles/meson.build +index 591b97d..2cef011 100644 +--- a/data/profiles/meson.build ++++ b/data/profiles/meson.build +@@ -59,7 +59,7 @@ foreach arg: icc_profiles + generated_icc = custom_target(arg + '.icc', + input: xml_i18n, + output: arg + '.icc', +- command: [ cd_create_profile, '--output=@OUTPUT@', '@INPUT@' ], ++ command: [ 'cd_create_profile', '--output=@OUTPUT@', '@INPUT@' ], + install: true, + install_dir: join_paths(datadir, 'color', 'icc', 'colord'), + ) +-- +2.20.1 + diff --git a/meta-gnome/recipes-freedesktop/colord/colord_1.4.4.bb b/meta-gnome/recipes-freedesktop/colord/colord_1.4.4.bb deleted file mode 100644 index 775353b..0000000 --- a/meta-gnome/recipes-freedesktop/colord/colord_1.4.4.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "System service to manage, install and generate color profiles to color manage input and output devices" -HOMEPAGE ="https://www.freedesktop.org/software/colord/" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRC_URI = "https://www.freedesktop.org/software/colord/releases/colord-${PV}.tar.xz" -SRC_URI[md5sum] = "32c2709a6002d9ee750483aaed6379c8" -SRC_URI[sha256sum] = "9a0fe80160bf88efddb582a9fc0169f56065276dc3882c47dddb9eecd048c0a5" - -inherit python3native meson meson-exe-wrapper pkgconfig systemd useradd gettext gobject-introspection - -WARN_QA_remove = "unknown-configure-option" - -DEPENDS = "glib-2.0-native lcms libgusb libgudev polkit" -EXTRA_OEMESON = "-Dargyllcms_sensor=false -Dman=false -Ddocs=false -Ddaemon_user=colord -Dbash_completion=false -Dtests=false --buildtype=release" - -PACKAGES += "${PN}-plugins" - -FILES_${PN} += "\ - ${datadir}/glib-2.0/schemas \ - ${datadir}/polkit-1 \ - ${datadir}/dbus-1 \ - ${datadir}/color/icc/colord \ - ${libdir}/tmpfiles.d \ - ${systemd_user_unitdir}/colord-session.service \ -" -SYSTEMD_SERVICE_${PN} = "colord.service" - -FILES_${PN}-plugins = "\ - ${libdir}/colord-plugins \ - ${libdir}/colord-sensors \ -" -USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "--system --home /var/lib/colord --no-create-home --shell /bin/false --user-group colord" - diff --git a/meta-gnome/recipes-freedesktop/polkit/polkit-gnome_0.105.bb b/meta-gnome/recipes-freedesktop/polkit/polkit-gnome_0.105.bb index a23180c..e880bf3 100644 --- a/meta-gnome/recipes-freedesktop/polkit/polkit-gnome_0.105.bb +++ b/meta-gnome/recipes-freedesktop/polkit/polkit-gnome_0.105.bb @@ -2,7 +2,7 @@ SUMMARY = "GNOME Authentication Agent for PolicyKit" DESCRIPTION = "PolicyKit-gnome provides an Authentication Agent for PolicyKit that integrates well with the GNOME desktop environment" HOMEPAGE = "http://www.packagekit.org/" BUGTRACKER = "http://bugzilla.gnome.org/" -DEPENDS = "polkit dbus-glib gconf gtk+ intltool-native gnome-common" +DEPENDS = "polkit dbus-glib gconf gtk+3 glib-2.0-native intltool-native gnome-common" LICENSE = "LGPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=74579fab173e4c5e12aac0cd83ee98ec \ file://src/main.c;beginline=1;endline=20;md5=aba145d1802f2329ba561e3e48ecb795" @@ -17,8 +17,6 @@ EXTRA_OECONF = "\ --disable-static \ " -DEPENDS += "gtk+3 glib-2.0-native" - inherit autotools gtk-doc pkgconfig FILES_${PN} += " ${datadir}/dbus-1 \ diff --git a/meta-gnome/recipes-freedesktop/polkit/polkit/0003-make-netgroup-support-optional.patch b/meta-gnome/recipes-freedesktop/polkit/polkit/0003-make-netgroup-support-optional.patch new file mode 100644 index 0000000..fd72513 --- /dev/null +++ b/meta-gnome/recipes-freedesktop/polkit/polkit/0003-make-netgroup-support-optional.patch @@ -0,0 +1,232 @@ +From 21aa2747e8f0048759aab184b07dd6389666d5e6 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 22 May 2019 13:18:55 -0700 +Subject: [PATCH] make netgroup support optional + +On at least Linux/musl and Linux/uclibc, netgroup +support is not available. PolKit fails to compile on these systems +for that reason. + +This change makes netgroup support conditional on the presence of the +setnetgrent(3) function which is required for the support to work. If +that function is not available on the system, an error will be returned +to the administrator if unix-netgroup: is specified in configuration. + +Fixes bug 50145. + +Closes polkit/polkit#14. +Signed-off-by: A. Wilcox +Signed-off-by: Khem Raj +--- + configure.ac | 2 +- + src/polkit/polkitidentity.c | 16 ++++++++++++++++ + src/polkit/polkitunixnetgroup.c | 3 +++ + .../polkitbackendinteractiveauthority.c | 14 ++++++++------ + src/polkitbackend/polkitbackendjsauthority.cpp | 2 ++ + test/polkit/polkitidentitytest.c | 9 ++++++++- + test/polkit/polkitunixnetgrouptest.c | 3 +++ + .../test-polkitbackendjsauthority.c | 2 ++ + 8 files changed, 43 insertions(+), 8 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -99,7 +99,7 @@ AC_CHECK_LIB(expat,XML_ParserCreate,[EXP + [AC_MSG_ERROR([Can't find expat library. Please install expat.])]) + AC_SUBST(EXPAT_LIBS) + +-AC_CHECK_FUNCS(clearenv fdatasync) ++AC_CHECK_FUNCS(clearenv fdatasync setnetgrent) + + if test "x$GCC" = "xyes"; then + LDFLAGS="-Wl,--as-needed $LDFLAGS" +--- a/src/polkit/polkitidentity.c ++++ b/src/polkit/polkitidentity.c +@@ -182,7 +182,15 @@ polkit_identity_from_string (const gcha + } + else if (g_str_has_prefix (str, "unix-netgroup:")) + { ++#ifndef HAVE_SETNETGRENT ++ g_set_error (error, ++ POLKIT_ERROR, ++ POLKIT_ERROR_FAILED, ++ "Netgroups are not available on this machine ('%s')", ++ str); ++#else + identity = polkit_unix_netgroup_new (str + sizeof "unix-netgroup:" - 1); ++#endif + } + + if (identity == NULL && (error != NULL && *error == NULL)) +@@ -344,6 +352,13 @@ polkit_identity_new_for_gvariant (GVaria + GVariant *v; + const char *name; + ++#ifndef HAVE_SETNETGRENT ++ g_set_error (error, ++ POLKIT_ERROR, ++ POLKIT_ERROR_FAILED, ++ "Netgroups are not available on this machine"); ++ goto out; ++#else + v = lookup_asv (details_gvariant, "name", G_VARIANT_TYPE_STRING, error); + if (v == NULL) + { +@@ -353,6 +368,7 @@ polkit_identity_new_for_gvariant (GVaria + name = g_variant_get_string (v, NULL); + ret = polkit_unix_netgroup_new (name); + g_variant_unref (v); ++#endif + } + else + { +--- a/src/polkit/polkitunixnetgroup.c ++++ b/src/polkit/polkitunixnetgroup.c +@@ -194,6 +194,9 @@ polkit_unix_netgroup_set_name (PolkitUni + PolkitIdentity * + polkit_unix_netgroup_new (const gchar *name) + { ++#ifndef HAVE_SETNETGRENT ++ g_assert_not_reached(); ++#endif + g_return_val_if_fail (name != NULL, NULL); + return POLKIT_IDENTITY (g_object_new (POLKIT_TYPE_UNIX_NETGROUP, + "name", name, +--- a/src/polkitbackend/polkitbackendinteractiveauthority.c ++++ b/src/polkitbackend/polkitbackendinteractiveauthority.c +@@ -2233,25 +2233,26 @@ get_users_in_net_group (PolkitIdentity + GList *ret; + + ret = NULL; ++#ifdef HAVE_SETNETGRENT + name = polkit_unix_netgroup_get_name (POLKIT_UNIX_NETGROUP (group)); + +-#ifdef HAVE_SETNETGRENT_RETURN ++# ifdef HAVE_SETNETGRENT_RETURN + if (setnetgrent (name) == 0) + { + g_warning ("Error looking up net group with name %s: %s", name, g_strerror (errno)); + goto out; + } +-#else ++# else + setnetgrent (name); +-#endif ++# endif /* HAVE_SETNETGRENT_RETURN */ + + for (;;) + { +-#if defined(HAVE_NETBSD) || defined(HAVE_OPENBSD) ++# if defined(HAVE_NETBSD) || defined(HAVE_OPENBSD) + const char *hostname, *username, *domainname; +-#else ++# else + char *hostname, *username, *domainname; +-#endif ++# endif /* defined(HAVE_NETBSD) || defined(HAVE_OPENBSD) */ + PolkitIdentity *user; + GError *error = NULL; + +@@ -2282,6 +2283,7 @@ get_users_in_net_group (PolkitIdentity + + out: + endnetgrent (); ++#endif /* HAVE_SETNETGRENT */ + return ret; + } + +--- a/src/polkitbackend/polkitbackendjsauthority.cpp ++++ b/src/polkitbackend/polkitbackendjsauthority.cpp +@@ -1502,6 +1502,7 @@ js_polkit_user_is_in_netgroup (JSContext + + JS::CallArgs args = JS::CallArgsFromVp (argc, vp); + ++#ifdef HAVE_SETNETGRENT + JS::RootedString usrstr (authority->priv->cx); + usrstr = args[0].toString(); + user = JS_EncodeStringToUTF8 (cx, usrstr); +@@ -1519,6 +1520,7 @@ js_polkit_user_is_in_netgroup (JSContext + + JS_free (cx, netgroup); + JS_free (cx, user); ++#endif + + ret = true; + +--- a/test/polkit/polkitidentitytest.c ++++ b/test/polkit/polkitidentitytest.c +@@ -19,6 +19,7 @@ + * Author: Nikki VonHollen + */ + ++#include "config.h" + #include "glib.h" + #include + #include +@@ -145,11 +146,15 @@ struct ComparisonTestData comparison_tes + {"unix-group:root", "unix-group:jane", FALSE}, + {"unix-group:jane", "unix-group:jane", TRUE}, + ++#ifdef HAVE_SETNETGRENT + {"unix-netgroup:foo", "unix-netgroup:foo", TRUE}, + {"unix-netgroup:foo", "unix-netgroup:bar", FALSE}, ++#endif + + {"unix-user:root", "unix-group:root", FALSE}, ++#ifdef HAVE_SETNETGRENT + {"unix-user:jane", "unix-netgroup:foo", FALSE}, ++#endif + + {NULL}, + }; +@@ -181,11 +186,13 @@ main (int argc, char *argv[]) + g_test_add_data_func ("/PolkitIdentity/group_string_2", "unix-group:jane", test_string); + g_test_add_data_func ("/PolkitIdentity/group_string_3", "unix-group:users", test_string); + ++#ifdef HAVE_SETNETGRENT + g_test_add_data_func ("/PolkitIdentity/netgroup_string", "unix-netgroup:foo", test_string); ++ g_test_add_data_func ("/PolkitIdentity/netgroup_gvariant", "unix-netgroup:foo", test_gvariant); ++#endif + + g_test_add_data_func ("/PolkitIdentity/user_gvariant", "unix-user:root", test_gvariant); + g_test_add_data_func ("/PolkitIdentity/group_gvariant", "unix-group:root", test_gvariant); +- g_test_add_data_func ("/PolkitIdentity/netgroup_gvariant", "unix-netgroup:foo", test_gvariant); + + add_comparison_tests (); + +--- a/test/polkit/polkitunixnetgrouptest.c ++++ b/test/polkit/polkitunixnetgrouptest.c +@@ -19,6 +19,7 @@ + * Author: Nikki VonHollen + */ + ++#include "config.h" + #include "glib.h" + #include + #include +@@ -69,7 +70,9 @@ int + main (int argc, char *argv[]) + { + g_test_init (&argc, &argv, NULL); ++#ifdef HAVE_SETNETGRENT + g_test_add_func ("/PolkitUnixNetgroup/new", test_new); + g_test_add_func ("/PolkitUnixNetgroup/set_name", test_set_name); ++#endif + return g_test_run (); + } +--- a/test/polkitbackend/test-polkitbackendjsauthority.c ++++ b/test/polkitbackend/test-polkitbackendjsauthority.c +@@ -137,12 +137,14 @@ test_get_admin_identities (void) + "unix-group:users" + } + }, ++#ifdef HAVE_SETNETGRENT + { + "net.company.action3", + { + "unix-netgroup:foo" + } + }, ++#endif + }; + guint n; + diff --git a/meta-gnome/recipes-freedesktop/polkit/polkit_0.115.bb b/meta-gnome/recipes-freedesktop/polkit/polkit_0.116.bb similarity index 80% rename from meta-gnome/recipes-freedesktop/polkit/polkit_0.115.bb rename to meta-gnome/recipes-freedesktop/polkit/polkit_0.116.bb index 6f7fee7..d7ec010 100644 --- a/meta-gnome/recipes-freedesktop/polkit/polkit_0.115.bb +++ b/meta-gnome/recipes-freedesktop/polkit/polkit_0.116.bb @@ -7,7 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \ DEPENDS = "expat glib-2.0 intltool-native mozjs" -inherit autotools gtk-doc pkgconfig useradd systemd gobject-introspection +inherit autotools gtk-doc pkgconfig useradd systemd gobject-introspection + +REQUIRED_DISTRO_FEATURES = "polkit" PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', \ @@ -20,18 +22,17 @@ PACKAGECONFIG[systemd] = "--enable-libsystemd-login=yes --with-systemdsystemunit PACKAGECONFIG[consolekit] = ",,,consolekit" PAM_SRC_URI = "file://polkit-1_pam.patch" -SRC_URI = "git://gitlab.freedesktop.org/polkit/polkit.git;protocol=https \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ -" -SRCREV = "2e756da8b6517ffa52a58674b6800b0b444b13c2" -S = "${WORKDIR}/git" - -#SRC_URI[md5sum] = "f03b055d6ae5fc8eac76838c7d83d082" -#SRC_URI[sha256sum] = "2f87ecdabfbd415c6306673ceadc59846f059b18ef2fce42bac63fe283f12131" +SRC_URI = "http://www.freedesktop.org/software/polkit/releases/polkit-${PV}.tar.gz \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ + file://0003-make-netgroup-support-optional.patch \ + " +SRC_URI[md5sum] = "4b37258583393e83069a0e2e89c0162a" +SRC_URI[sha256sum] = "88170c9e711e8db305a12fdb8234fac5706c61969b94e084d0f117d8ec5d34b1" EXTRA_OECONF = "--with-os-type=moblin \ --disable-man-pages \ --disable-libelogind \ + --enable-libsystemd-login \ " do_compile_prepend () { diff --git a/meta-gnome/recipes-gnome/atk/at-spi2-atk_2.34.2.bb b/meta-gnome/recipes-gnome/atk/at-spi2-atk_2.34.2.bb new file mode 100644 index 0000000..02a4d47 --- /dev/null +++ b/meta-gnome/recipes-gnome/atk/at-spi2-atk_2.34.2.bb @@ -0,0 +1,19 @@ +SUMMARY = "AT-SPI 2 Toolkit Bridge" +HOMEPAGE = "https://wiki.linuxfoundation.org/accessibility/d-bus" +LICENSE = "LGPL-2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI[archive.md5sum] = "58cd278574e101363b18d9a8b7053d67" +SRC_URI[archive.sha256sum] = "901323cee0eef05c01ec4dee06c701aeeca81a314a7d60216fa363005e27f4f0" + +DEPENDS = "dbus glib-2.0 glib-2.0-native atk at-spi2-core libxml2" + +GNOMEBASEBUILDCLASS = "meson" +inherit gnomebase upstream-version-is-even + +PACKAGES =+ "${PN}-gnome ${PN}-gtk2" + +FILES_${PN}-gnome = "${libdir}/gnome-settings-daemon-3.0/gtk-modules" +FILES_${PN}-gtk2 = "${libdir}/gtk-2.0/modules/libatk-bridge.*" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-gnome/recipes-gnome/atk/at-spi2-core_2.36.0.bb b/meta-gnome/recipes-gnome/atk/at-spi2-core_2.36.0.bb new file mode 100644 index 0000000..c5d01c9 --- /dev/null +++ b/meta-gnome/recipes-gnome/atk/at-spi2-core_2.36.0.bb @@ -0,0 +1,36 @@ +SUMMARY = "Assistive Technology Service Provider Interface (dbus core)" +HOMEPAGE = "https://wiki.linuxfoundation.org/accessibility/d-bus" +LICENSE = "LGPL-2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" + +SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz" + +SRC_URI[md5sum] = "f101d111b06293d15738afc904c1d931" +SRC_URI[sha256sum] = "88da57de0a7e3c60bc341a974a80fdba091612db3547c410d6deab039ca5c05a" + +X11DEPENDS = "virtual/libx11 libxi libxtst" + +DEPENDS = "dbus glib-2.0" +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}" + +inherit meson gtk-doc gettext systemd pkgconfig upstream-version-is-even gobject-introspection + +EXTRA_OEMESON = " -Dsystemd_user_dir=${systemd_user_unitdir} \ + -Ddbus_daemon=${bindir}/dbus-daemon \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '-Dx11=yes', '-Dx11=no', d)} \ +" + +GTKDOC_MESON_OPTION = "docs" + +GIR_MESON_OPTION = 'introspection' +GIR_MESON_ENABLE_FLAG = 'yes' +GIR_MESON_DISABLE_FLAG = 'no' + +FILES_${PN} += "${datadir}/dbus-1/services/*.service \ + ${datadir}/dbus-1/accessibility-services/*.service \ + ${datadir}/defaults/at-spi2 \ + ${systemd_user_unitdir}/at-spi-dbus-bus.service \ + " +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-gnome/recipes-gnome/atk/atk_2.36.0.bb b/meta-gnome/recipes-gnome/atk/atk_2.36.0.bb new file mode 100644 index 0000000..0786eee --- /dev/null +++ b/meta-gnome/recipes-gnome/atk/atk_2.36.0.bb @@ -0,0 +1,21 @@ +SUMMARY = "Accessibility toolkit for GNOME" +HOMEPAGE = "http://live.gnome.org/GAP/" +BUGTRACKER = "https://bugzilla.gnome.org/" +SECTION = "x11/libs" + +LICENSE = "GPLv2+ & LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \ + file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9b30f619ca8d819bc12d3 \ + file://atk/atk.h;endline=18;md5=fcd7710187e0eae485e356c30d1b0c3b" + +# Need gettext-native as Meson can't turn off i18n +DEPENDS = "gettext-native glib-2.0" + +GNOMEBASEBUILDCLASS = "meson" +inherit gnomebase gtk-doc gettext upstream-version-is-even gobject-introspection + +SRC_URI[archive.md5sum] = "01aa5ec5138f5f8c9b3a4e3196ed2900" +SRC_URI[archive.sha256sum] = "fb76247e369402be23f1f5c65d38a9639c1164d934e40f6a9cf3c9e96b652788" + +BBCLASSEXTEND = "native nativesdk" + diff --git a/meta-gnome/recipes-gnome/dconf/dconf_0.36.0.bb b/meta-gnome/recipes-gnome/dconf/dconf_0.36.0.bb new file mode 100644 index 0000000..dcd13d6 --- /dev/null +++ b/meta-gnome/recipes-gnome/dconf/dconf_0.36.0.bb @@ -0,0 +1,24 @@ +SUMMARY = "configuation database system" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1" +SECTION = "x11/gnome" + +SRC_URI[archive.md5sum] = "1a50c988d9f0206f74a44f7c6d09cead" +SRC_URI[archive.sha256sum] = "9fe6bb22191fc2a036ad86fd8e7d165e9983c687b9fedccf85d46c799301da2d" + +DEPENDS = "dbus glib-2.0 xmlto-native glib-2.0-native" + +GNOMEBASEBUILDCLASS = "meson" + +inherit gnomebase bash-completion vala + +SRC_URI += "file://0001-meson.build-do-not-compile-docs.patch" + +FILES_${PN} += " \ + ${datadir}/dbus-1 \ + ${libdir}/gio/modules/*.so \ +" + +EXTRA_OEMESON_append_class-native = "-Dbash_completion=false" + +BBCLASSEXTEND= "native" diff --git a/meta-gnome/recipes-gnome/gcr/gcr/0001-meson.build-correctly-set-internal-vapi-dependencies.patch b/meta-gnome/recipes-gnome/gcr/gcr/0001-meson.build-correctly-set-internal-vapi-dependencies.patch new file mode 100644 index 0000000..b484a1b --- /dev/null +++ b/meta-gnome/recipes-gnome/gcr/gcr/0001-meson.build-correctly-set-internal-vapi-dependencies.patch @@ -0,0 +1,45 @@ +From ebb77dad4563b882b449cbc5e882f36ac8c2de71 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Mon, 11 May 2020 22:19:16 +0000 +Subject: [PATCH] meson.build: correctly set internal vapi dependencies + +If they are set as strings, meson will supply the right +arguments to vapigen, but will not set the ninja dependencies +to ensure they get built first, and so races will occur: +https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/1881/steps/8/logs/step1b + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gcr/-/merge_requests/55] +Signed-off-by: Alexander Kanavin +--- + gcr/meson.build | 2 +- + ui/meson.build | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gcr/meson.build b/gcr/meson.build +index 254a933..199452f 100644 +--- a/gcr/meson.build ++++ b/gcr/meson.build +@@ -203,7 +203,7 @@ if get_option('introspection') + + gcr_vapi = gnome.generate_vapi('gcr-@0@'.format(gcr_major_version), + sources: gcr_gir[0], +- packages: [ 'glib-2.0', 'gio-2.0', 'gck-@0@'.format(gck_major_version) ], ++ packages: [ 'glib-2.0', 'gio-2.0', gck_vapi ], + metadata_dirs: meson.current_source_dir(), + vapi_dirs: [ + build_root / 'gck', +diff --git a/ui/meson.build b/ui/meson.build +index 5ca3753..477412d 100644 +--- a/ui/meson.build ++++ b/ui/meson.build +@@ -174,8 +174,8 @@ if get_option('introspection') + packages: [ + 'glib-2.0', + 'gio-2.0', +- 'gck-@0@'.format(gck_major_version), +- 'gcr-@0@'.format(gcr_major_version), ++ gck_vapi, ++ gcr_vapi, + 'gtk+-3.0' + ], + metadata_dirs: meson.current_source_dir(), diff --git a/meta-gnome/recipes-gnome/gcr/gcr_3.28.1.bb b/meta-gnome/recipes-gnome/gcr/gcr_3.28.1.bb deleted file mode 100644 index 7a58ca2..0000000 --- a/meta-gnome/recipes-gnome/gcr/gcr_3.28.1.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "A library for bits of crypto UI and parsing etc" -HOMEPAGE = "http://www.gnome.org/" -BUGTRACKER = "https://bugzilla.gnome.org/" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605" - -DEPENDS = "intltool-native gtk+3 p11-kit glib-2.0 libgcrypt \ - ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'libxslt-native', '', d)}" - -inherit autotools gnomebase gtk-icon-cache gtk-doc distro_features_check upstream-version-is-even vala gobject-introspection -# depends on gtk+3, but also x11 through gtk+-x11 -REQUIRED_DISTRO_FEATURES = "x11" - -SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \ - file://0001-Use-pkgconfig-to-find-libgcrypt.patch \ - " -SRC_URI[archive.md5sum] = "afd88cacfd54c1ac5b3e0eb35e3aa674" -SRC_URI[archive.sha256sum] = "95204aa2111c301778ebfbe60975ce3ed698c958430ffcc2a785ac5e593d168b" - -FILES_${PN} += " \ - ${datadir}/dbus-1 \ - ${datadir}/gcr-3 \ -" - -# http://errors.yoctoproject.org/Errors/Details/20229/ -ARM_INSTRUCTION_SET = "arm" - -do_install_append () { - rm ${D}${datadir}/applications/gcr-prompter.desktop - rm ${D}${datadir}/applications/gcr-viewer.desktop -} diff --git a/meta-gnome/recipes-gnome/gcr/gcr_3.36.0.bb b/meta-gnome/recipes-gnome/gcr/gcr_3.36.0.bb new file mode 100644 index 0000000..7e1c213 --- /dev/null +++ b/meta-gnome/recipes-gnome/gcr/gcr_3.36.0.bb @@ -0,0 +1,32 @@ +SUMMARY = "A library for bits of crypto UI and parsing etc" +DESCRIPTION = "GCR is a library for displaying certificates, and crypto UI, \ +accessing key stores. It also provides the viewer for crypto files on the \ +GNOME desktop." +HOMEPAGE = "https://gitlab.gnome.org/GNOME/gcr" +BUGTRACKER = "https://gitlab.gnome.org/GNOME/gcr/issues" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605" + +DEPENDS = "gtk+3 p11-kit glib-2.0 libgcrypt gnupg-native \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'libxslt-native', '', d)}" + +GNOMEBASEBUILDCLASS = "meson" +GTKDOC_MESON_OPTION = "gtk_doc" +inherit gnomebase gtk-icon-cache gtk-doc distro_features_check upstream-version-is-even vala gobject-introspection gettext mime +# depends on gtk+3, but also x11 through gtk+-x11 +REQUIRED_DISTRO_FEATURES = "x11" + +SRC_URI += " file://0001-meson.build-correctly-set-internal-vapi-dependencies.patch" +SRC_URI[archive.md5sum] = "adc65563b6b458507b9a578a8b68fb61" +SRC_URI[archive.sha256sum] = "aaf9bed017a2263c6145c89a1a84178f9f40f238426463e4ae486694ef5f6601" + +FILES_${PN} += " \ + ${datadir}/dbus-1 \ + ${datadir}/gcr-3 \ +" + +# http://errors.yoctoproject.org/Errors/Details/20229/ +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" +ARM_INSTRUCTION_SET_armv6 = "arm" diff --git a/meta-gnome/recipes-gnome/gdm/files/0001-Ensure-pam-file-installation.patch b/meta-gnome/recipes-gnome/gdm/files/0001-Ensure-pam-file-installation.patch new file mode 100644 index 0000000..6362d5e --- /dev/null +++ b/meta-gnome/recipes-gnome/gdm/files/0001-Ensure-pam-file-installation.patch @@ -0,0 +1,48 @@ +From f7bba53adf8a26f900442a05bb98326747c392b4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Tue, 3 Dec 2019 00:24:27 +0100 +Subject: [PATCH] Ensure pam-file installation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +All the detection magic does not work for us + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Andreas Müller +--- + data/Makefile.am | 12 +----------- + 1 file changed, 1 insertion(+), 11 deletions(-) + +diff --git a/data/Makefile.am b/data/Makefile.am +index bda9160..dbc3ea3 100644 +--- a/data/Makefile.am ++++ b/data/Makefile.am +@@ -296,22 +296,12 @@ endif + chown root:root $(DESTDIR)$(logdir) || : ; \ + fi + +- system=`uname`; \ +- if test -f /usr/include/security/pam_appl.h; then \ +- if test '!' -d $(DESTDIR)$(PAM_PREFIX)/pam.d; then \ + $(mkinstalldirs) $(DESTDIR)$(PAM_PREFIX)/pam.d; \ + chmod 755 $(DESTDIR)$(PAM_PREFIX)/pam.d; \ +- fi; \ +- if test $$system = Linux; then \ + for pamfile in $(pam_files); do \ + bn=$$(basename $$pamfile .pam); \ + $(INSTALL_DATA) $(srcdir)/$$pamfile $(DESTDIR)$(PAM_PREFIX)/pam.d/$$bn; \ +- done; \ +- fi; \ +- if test $$system = SunOS; then \ +- echo "Please add PAM authentication for gdm, gdm-autologin and gdm-welcome in $(PAM_PREFIX)/pam.conf!"; \ +- fi; \ +- fi ++ done; + + if test '!' -d $(DESTDIR)$(xauthdir); then \ + $(mkinstalldirs) $(DESTDIR)$(xauthdir); \ +-- +2.21.0 + diff --git a/meta-gnome/recipes-gnome/gdm/gdm_3.31.91.bb b/meta-gnome/recipes-gnome/gdm/gdm_3.31.91.bb deleted file mode 100644 index 8bf8e15..0000000 --- a/meta-gnome/recipes-gnome/gdm/gdm_3.31.91.bb +++ /dev/null @@ -1,43 +0,0 @@ -SUMMARY = "GNOME display manager" -HOMEPAGE = "https://wiki.gnome.org/Projects/GDM" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -inherit gnomebase useradd gettext pkgconfig autotools gobject-introspection systemd - -SRC_URI[archive.md5sum] = "3af260a278e99ff4b17b999fd6c44465" -SRC_URI[archive.sha256sum] = "791f24f0e15d7dcd747efa2957f2bad3d5c9aeab185b0090bfba19bcc57b958a" - -SRC_URI += "\ - file://gdm.conf \ - file://0001-replace-absolute-path-with-staging-path.patch \ -" - -DEPENDS = "libxcb libxinerama libxau libxdmcp intltool-native glib-2.0 accountsservice libpam libcheck libcanberra gtk+3 libx11 libxi systemd libxext glib-2.0-native dconf-native plymouth" - -FILES_${PN} += "\ - ${libdir}/systemd/system/gdm.service \ - ${libdir}/security/pam_gdm.so \ - ${datadir}/gnome-session/sessions \ - ${datadir}/dconf/profile \ - /run/gdm/greeter \ -" - -do_install_append() { - install -d ${D}${sysconfdir}/default/volatiles - echo "d gdm gdm 755 ${localstatedir}/run/gdm/greeter none" > ${D}${sysconfdir}/default/volatiles/99_gdm - rm -rf ${D}/run/gdm - rm ${D}${sysconfdir}/gdm/custom.conf - rm ${D}${libdir}/udev/rules.d/61-gdm.rules - install -m 644 ${WORKDIR}/gdm.conf ${D}${sysconfdir}/gdm/custom.conf -} - - -SYSTEMD_SERVICE_${PN} = "gdm.service" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "--system --home /var/lib/gdm -u 21 -s /bin/false --user-group gdm" - -EXTRA_OECONF = "--enable-introspection --enable-systemd-journal --enable-wayland-support --with-xdmcp=no --disable-static --with-default-pam-config=openembedded --with-plymouth=yes" - diff --git a/meta-gnome/recipes-gnome/gdm/gdm_3.34.1.bb b/meta-gnome/recipes-gnome/gdm/gdm_3.34.1.bb new file mode 100644 index 0000000..c6df343 --- /dev/null +++ b/meta-gnome/recipes-gnome/gdm/gdm_3.34.1.bb @@ -0,0 +1,75 @@ +SUMMARY = "GNOME Display Manager" +LICENSE="GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = " \ + dconf-native \ + gtk+3 \ + glib-2.0 \ + accountsservice \ + libcanberra \ + libxinerama \ + libpam \ + plymouth \ +" + +REQUIRED_DISTRO_FEATURES = "x11 systemd pam" + +inherit gnomebase gsettings gobject-introspection gettext systemd useradd upstream-version-is-even distro_features_check + +SRC_URI[archive.md5sum] = "65d1fd4bb85e8b133d1cbffb80ecf62e" +SRC_URI[archive.sha256sum] = "e85df657aa8d9361af4fb122014d8f123a93bfe45a7662fba2b373d839dbd8d3" + +SRC_URI += "\ + file://gdm.conf \ + file://0001-replace-absolute-path-with-staging-path.patch \ + " + +# Some gnome components - as gnome-panel and gnome-shell (!!) - require gdm +# components. To allow gnome-images using different display-manager, split them +# out into a seperate package. +#PACKAGE_BEFORE_PN = "${PN}-base" +#FILES_${PN}-base = " \ +# ${datadir}/glib-2.0 \ +# ${datadir}/gnome-session \ +# ${libdir}/lib*${SOLIBS} \ +# ${libdir}/girepository-1.0 \ +#" + +#CONFFILES_${PN} += "${sysconfdir}/gdm/custom.conf" +FILES_${PN} += " \ + ${libdir}/systemd/system/gdm.service \ + ${base_libdir}/security/pam_gdm.so \ + ${datadir}/gnome-session/sessions \ + ${datadir}/dconf/profile \ + /run/gdm/greeter \ +" + +do_install_append() { + install -d ${D}${sysconfdir}/default/volatiles + echo "d gdm gdm 755 ${localstatedir}/run/gdm/greeter none" > ${D}${sysconfdir}/default/volatiles/99_gdm + rm ${D}${sysconfdir}/gdm/custom.conf + rm -rf ${D}/run/gdm + rm ${D}${libdir}/udev/rules.d/61-gdm.rules + install -m 644 ${WORKDIR}/gdm.conf ${D}${sysconfdir}/gdm/custom.conf +} + + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system --home /var/lib/gdm -u 21 -s /bin/false --user-group gdm" + +SYSTEMD_SERVICE_${PN} = "${BPN}.service" + +EXTRA_OECONF = " \ + --with-plymouth \ + --with-default-pam-config=openembedded \ + --with-pam-mod-dir=${base_libdir}/security \ + --enable-introspection \ + --enable-systemd-journal \ + --enable-wayland-support \ + --with-xdmcp=no \ + --disable-static \ + --enable-gdm-xsession \ + --with-initial-vt=7 \ +" + diff --git a/meta-gnome/recipes-gnome/gjs/gjs/0001-Fix-tests-that-cannot-run.patch b/meta-gnome/recipes-gnome/gjs/gjs/0001-Fix-tests-that-cannot-run.patch new file mode 100644 index 0000000..c0d9e92 --- /dev/null +++ b/meta-gnome/recipes-gnome/gjs/gjs/0001-Fix-tests-that-cannot-run.patch @@ -0,0 +1,63 @@ +From 462ed3afdfc6988daf79448558f5433ea773e64c Mon Sep 17 00:00:00 2001 +From: David McKinney +Date: Thu, 2 Jul 2020 14:52:35 +0000 +Subject: [PATCH] Fix tests that cannot run + +--- + meson.build | 36 ++++++++++++++++++------------------ + 1 file changed, 18 insertions(+), 18 deletions(-) + +diff --git a/meson.build b/meson.build +index 2ffbf28..6679e45 100644 +--- a/meson.build ++++ b/meson.build +@@ -221,23 +221,23 @@ endif + # Check if a minimal SpiderMonkey program compiles, links, and runs. If not, + # it's most likely the case that SpiderMonkey was configured incorrectly, for + # example by building mozglue as a shared library. +-minimal_program = cxx.run(''' +-#include +-int main(void) { +- if (!JS_Init()) return 1; +- JS_ShutDown(); +- return 0; +-} +-''', +- args: debug_arg, dependencies: spidermonkey, +- name: 'SpiderMonkey sanity check') +- +-if not minimal_program.compiled() or minimal_program.returncode() != 0 +- error('''A minimal SpiderMonkey program +-could not be compiled, linked, or run. Most likely you should build it with a +-different configuration. Check the recommended configuration: +-https://github.com/spidermonkey-embedders/spidermonkey-embedding-examples/blob/esr60/docs/Building%20SpiderMonkey.md''') +-endif ++#minimal_program = cxx.run(''' ++##include ++#int main(void) { ++# if (!JS_Init()) return 1; ++# JS_ShutDown(); ++# return 0; ++#} ++#''', ++# args: debug_arg, dependencies: spidermonkey, ++# name: 'SpiderMonkey sanity check') ++ ++#if not minimal_program.compiled() or minimal_program.returncode() != 0 ++# error('''A minimal SpiderMonkey program ++#could not be compiled, linked, or run. Most likely you should build it with a ++#different configuration. Check the recommended configuration: ++#https://github.com/spidermonkey-embedders/spidermonkey-embedding-examples/blob/esr60/docs/Building%20SpiderMonkey.md''') ++#endif + + have_printf_alternative_int = cc.compiles(''' + #include +@@ -610,7 +610,7 @@ if not get_option('skip_gtk_tests') + have_gtk4 = dependency('gtk4', required: false).found() + endif + +-subdir('installed-tests') ++#subdir('installed-tests') + + valgrind_environment = environment() + valgrind_environment.set('G_SLICE', 'always-malloc,debug-blocks') diff --git a/meta-gnome/recipes-gnome/gjs/gjs_1.64.2.bb b/meta-gnome/recipes-gnome/gjs/gjs_1.64.2.bb new file mode 100644 index 0000000..3a4d159 --- /dev/null +++ b/meta-gnome/recipes-gnome/gjs/gjs_1.64.2.bb @@ -0,0 +1,24 @@ +SUMMARY = "GNOME javascript bindings based on the Spidermonkey javascript engine" +HOMEPAGE = "https://wiki.gnome.org/Projects/Gjs" + +LICENSE = "MIT & LGPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=beb29cf17fabe736f0639b09ee6e76fa \ + file://COPYING.LGPL;md5=3bf50002aefd002f49e7bb854063f7e7" + +inherit gnomebase gettext gobject-introspection meson + +WARN_QA_remove = "unknown-configure-option" + +export GIDATADIR="${STAGING_DATADIR_NATIVE}/gobject-introspection-1.0" + +DEPENDS = "glib-2.0 gobject-introspection gobject-introspection-native cairo gtk+3 mozjs68 glib-2.0-native" + +EXTRA_OEMESON = " -Dskip_dbus_tests=true -Dskip_gtk_tests=true -Dinstalled_tests=false -Dpkgconfig-sysroot-path=${GIDATADIR}" + +SRC_URI += " file://0001-Fix-tests-that-cannot-run.patch" +SRC_URI[archive.md5sum] = "bd2f7f411b46016e8ee2d2c8d3c140d9" +SRC_URI[archive.sha256sum] = "15ff834d374df19595d955f03e6b60631a3bb14fabda36d00f81ab3eabd3997b" + +RDEPENDS_${PN} += "libmozjs-68" + +FILES_${PN}-dbg += "${datadir}/gjs-1.0/lsan ${datadir}/gjs-1.0/valgrind" diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch new file mode 100644 index 0000000..0ebf138 --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch @@ -0,0 +1,39 @@ +From d250652782b65b071b7cc8f01f2db833df104e0e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 16 Apr 2016 13:28:59 -0700 +Subject: [PATCH] Do not ignore return value of write() + +gcc warns about ignoring return value when compiling +with fortify turned on. + +assert when write() fails + +Upstream-Status: Submitted +Signed-off-by: Khem Raj + +--- + glib/tests/unix.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/glib/tests/unix.c b/glib/tests/unix.c +index 9d55a6c..a07f945 100644 +--- a/glib/tests/unix.c ++++ b/glib/tests/unix.c +@@ -32,14 +32,15 @@ test_pipe (void) + GError *error = NULL; + int pipefd[2]; + char buf[1024]; +- gssize bytes_read; ++ gssize bytes_read, bytes_written; + gboolean res; + + res = g_unix_open_pipe (pipefd, FD_CLOEXEC, &error); + g_assert (res); + g_assert_no_error (error); + +- write (pipefd[1], "hello", sizeof ("hello")); ++ bytes_written = write (pipefd[1], "hello", sizeof ("hello")); ++ g_assert (bytes_written != -1 && "write() failed"); + memset (buf, 0, sizeof (buf)); + bytes_read = read (pipefd[0], buf, sizeof(buf) - 1); + g_assert_cmpint (bytes_read, >, 0); diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch new file mode 100644 index 0000000..edac4c9 --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch @@ -0,0 +1,61 @@ +From 60b36289ac314ad972cf81c1acd19f6f2e58ff25 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Fri, 15 Feb 2019 11:17:27 +0100 +Subject: [PATCH] Do not write $bindir into pkg-config files + +This would otherwise break when using the files to build other target +components (we need to rely on PATH containing the paths to utilities, +rather than use target paths). + +Upstream-Status: Inappropriate [upstream wants the paths in .pc files] +Signed-off-by: Alexander Kanavin + +--- + gio/meson.build | 16 ++++++++-------- + glib/meson.build | 6 +++--- + 2 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/gio/meson.build b/gio/meson.build +index 71e88c4..8ce3987 100644 +--- a/gio/meson.build ++++ b/gio/meson.build +@@ -831,14 +831,14 @@ pkg.generate(libgio, + 'schemasdir=' + join_paths('${datadir}', schemas_subdir), + 'bindir=' + join_paths('${prefix}', get_option('bindir')), + 'giomoduledir=' + giomodulesdir, +- 'gio=' + join_paths('${bindir}', 'gio'), +- 'gio_querymodules=' + join_paths('${bindir}', 'gio-querymodules'), +- 'glib_compile_schemas=' + join_paths('${bindir}', 'glib-compile-schemas'), +- 'glib_compile_resources=' + join_paths('${bindir}', 'glib-compile-resources'), +- 'gdbus=' + join_paths('${bindir}', 'gdbus'), +- 'gdbus_codegen=' + join_paths('${bindir}', 'gdbus-codegen'), +- 'gresource=' + join_paths('${bindir}', 'gresource'), +- 'gsettings=' + join_paths('${bindir}', 'gsettings')], ++ 'gio=gio', ++ 'gio_querymodules=gio-querymodules', ++ 'glib_compile_schemas=glib-compile-schemas', ++ 'glib_compile_resources=glib-compile-resources', ++ 'gdbus=gdbus', ++ 'gdbus_codegen=gdbus-codegen', ++ 'gresource=gresource', ++ 'gsettings=gsettings'], + version : glib_version, + install_dir : glib_pkgconfigreldir, + filebase : 'gio-2.0', +diff --git a/glib/meson.build b/glib/meson.build +index 91a48f1..978fb73 100644 +--- a/glib/meson.build ++++ b/glib/meson.build +@@ -375,9 +375,9 @@ pkg.generate(libglib, + subdirs : ['glib-2.0'], + extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags, + variables : ['bindir=' + join_paths('${prefix}', get_option('bindir')), +- 'glib_genmarshal=' + join_paths('${bindir}', 'glib-genmarshal'), +- 'gobject_query=' + join_paths('${bindir}', 'gobject-query'), +- 'glib_mkenums=' + join_paths('${bindir}', 'glib-mkenums')], ++ 'glib_genmarshal=glib-genmarshal', ++ 'gobject_query=gobject-query', ++ 'glib_mkenums=glib-mkenums'], + version : glib_version, + install_dir : glib_pkgconfigreldir, + filebase : 'glib-2.0', diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch new file mode 100644 index 0000000..d8cf269 --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch @@ -0,0 +1,34 @@ +From 15f807481de53942525b48952c5b6bbb9fb66542 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 15 Mar 2014 22:42:29 -0700 +Subject: [PATCH] Fix DATADIRNAME on uclibc/Linux + +translation files are always installed under PREFIX/share/locale in uclibc +based systems therefore lets set DATADIRNAME to "share". + +Signed-off-by: Khem Raj +Upstream-Status: Pending + +%% original patch: uclibc_musl_translation.patch +--- + m4macros/glib-gettext.m4 | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/m4macros/glib-gettext.m4 b/m4macros/glib-gettext.m4 +index df6fbf0..47db864 100644 +--- a/m4macros/glib-gettext.m4 ++++ b/m4macros/glib-gettext.m4 +@@ -293,6 +293,10 @@ msgstr "" + CATOBJEXT=.mo + DATADIRNAME=share + ;; ++ *-*-musl* | *-*-linux-uclibc*) ++ CATOBJEXT=.gmo ++ DATADIRNAME=share ++ ;; + *) + CATOBJEXT=.mo + DATADIRNAME=lib +-- +2.17.1 + diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch new file mode 100644 index 0000000..a3d71f2 --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch @@ -0,0 +1,27 @@ +From d29dfba67b1808eea6d428085f95b6e42cf2d1e4 Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen +Date: Tue, 22 Mar 2016 15:14:58 +0200 +Subject: [PATCH] Install gio-querymodules as libexec_PROGRAM + +We want to install this binary with the gio library, and debian +renamer does not cope with library packages with files in ${bindir} + +Signed-off-by: Jussi Kukkonen +Upstream-Status: Inappropriate [OE specific] + +--- + gio/meson.build | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gio/meson.build b/gio/meson.build +index 4e5e021..90a741a 100644 +--- a/gio/meson.build ++++ b/gio/meson.build +@@ -940,6 +940,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu + c_args : gio_c_args, + # intl.lib is not compatible with SAFESEH + link_args : noseh_link_args, ++ install_dir: glib_libexecdir, + dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) + + glib_compile_schemas = executable('glib-compile-schemas', diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch new file mode 100644 index 0000000..67ca624 --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch @@ -0,0 +1,43 @@ +From 2acf40361eecd17c6981743dabd06e25a9934258 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Fri, 12 Jun 2015 17:08:46 +0300 +Subject: [PATCH 05/10] Remove the warning about deprecated paths in schemas + +Some schemas in gsettings-desktop-schemas (such as proxy and locale) +are still using deprecated paths, as of 3.16.1. This causes warning +messages, and meta/lib/oe/rootfs.py complaints about them. + +Upstream-Status: Inappropriate +Signed-off-by: Alexander Kanavin + +--- + gio/glib-compile-schemas.c | 13 ------------- + 1 file changed, 13 deletions(-) + +diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c +index b8de090..130f89b 100644 +--- a/gio/glib-compile-schemas.c ++++ b/gio/glib-compile-schemas.c +@@ -1219,19 +1219,6 @@ parse_state_start_schema (ParseState *state, + return; + } + +- if (path && (g_str_has_prefix (path, "/apps/") || +- g_str_has_prefix (path, "/desktop/") || +- g_str_has_prefix (path, "/system/"))) +- { +- gchar *message = NULL; +- message = g_strdup_printf (_("Warning: Schema “%s” has path “%s”. " +- "Paths starting with " +- "“/apps/”, “/desktop/” or “/system/” are deprecated."), +- id, path); +- g_printerr ("%s\n", message); +- g_free (message); +- } +- + state->schema_state = schema_state_new (path, gettext_domain, + extends, extends_name, list_of); + +-- +2.14.1 + diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch new file mode 100644 index 0000000..b02169e --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch @@ -0,0 +1,95 @@ +From cfff734af6bff6a30a649f784ecf698658c01884 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Wed, 13 Feb 2019 15:32:05 +0100 +Subject: [PATCH] Set host_machine correctly when building with mingw32 + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin + +--- + gio/tests/meson.build | 8 ++++---- + glib/tests/meson.build | 2 +- + meson.build | 3 +++ + tests/meson.build | 2 +- + 4 files changed, 9 insertions(+), 6 deletions(-) + +diff --git a/gio/tests/meson.build b/gio/tests/meson.build +index 95aafc1..9025eb2 100644 +--- a/gio/tests/meson.build ++++ b/gio/tests/meson.build +@@ -13,7 +13,7 @@ test_c_args = [ + '-UG_DISABLE_ASSERT', + ] + +-if host_machine.system() == 'windows' ++if host_system == 'windows' + common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')] + endif + +@@ -120,7 +120,7 @@ if dbus1_dep.found() + endif + + # Test programs buildable on UNIX only +-if host_machine.system() != 'windows' ++if host_system != 'windows' + gio_tests += { + 'file' : {}, + 'gdbus-peer' : { +@@ -332,7 +332,7 @@ if host_machine.system() != 'windows' + endif # unix + + # Test programs buildable on Windows only +-if host_machine.system() == 'windows' ++if host_system == 'windows' + gio_tests += {'win32-streams' : {}} + endif + +@@ -397,7 +397,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl' + } + endif + +-if host_machine.system() != 'windows' ++if host_system != 'windows' + test_extra_programs += { + 'gdbus-example-unix-fd-client' : { + 'install' : false, +diff --git a/glib/tests/meson.build b/glib/tests/meson.build +index c47133f..cad975f 100644 +--- a/glib/tests/meson.build ++++ b/glib/tests/meson.build +@@ -132,7 +132,7 @@ if glib_conf.has('HAVE_EVENTFD') + } + endif + +-if host_machine.system() == 'windows' ++if host_system == 'windows' + if winsock2.found() + glib_tests += { + 'gpoll' : { +diff --git a/meson.build b/meson.build +index 717d1bc..2a3beb8 100644 +--- a/meson.build ++++ b/meson.build +@@ -32,6 +32,9 @@ else + endif + + host_system = host_machine.system() ++if host_system == 'mingw32' ++ host_system = 'windows' ++endif + + glib_version = meson.project_version() + glib_api_version = '2.0' +diff --git a/tests/meson.build b/tests/meson.build +index ce30442..5710f2c 100644 +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -66,7 +66,7 @@ test_extra_programs = { + 'unicode-collate' : {}, + } + +-if host_machine.system() != 'windows' ++if host_system != 'windows' + tests += { + 'timeloop' : {}, + 'iochannel-test' : {}, diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch new file mode 100644 index 0000000..3dfef17 --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch @@ -0,0 +1,27 @@ +From 730803f2bc3f2f1a74f4db809a224066e7eae114 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Wed, 8 Jan 2020 18:22:46 +0100 +Subject: [PATCH] gio/tests/resources.c: comment out a build host-only test + +This test requires building resources in a way that is +not cross-compatible (hardcodes ld and objcopy). + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin +--- + gio/tests/resources.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gio/tests/resources.c b/gio/tests/resources.c +index c44d214..e289a01 100644 +--- a/gio/tests/resources.c ++++ b/gio/tests/resources.c +@@ -993,7 +993,7 @@ main (int argc, + g_test_add_func ("/resource/automatic", test_resource_automatic); + /* This only uses automatic resources too, so it tests the constructors and destructors */ + g_test_add_func ("/resource/module", test_resource_module); +- g_test_add_func ("/resource/binary-linked", test_resource_binary_linked); ++ /* g_test_add_func ("/resource/binary-linked", test_resource_binary_linked); */ + #endif + g_test_add_func ("/resource/uri/query-info", test_uri_query_info); + g_test_add_func ("/resource/uri/file", test_uri_file); diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch new file mode 100644 index 0000000..833ad25 --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch @@ -0,0 +1,31 @@ +From cce617bec254e327ed7bcad60f58208024c6dc42 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 12 Oct 2019 17:46:26 -0700 +Subject: [PATCH] meson: Run atomics test on clang as well + +Fixes +./glib-2.62.1/glib/gatomic.c:675:2: error: G_ATOMIC_LOCK_FREE defined, but incapable of lock-free atomics. +^ + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 9731de4..c678931 100644 +--- a/meson.build ++++ b/meson.build +@@ -1634,7 +1634,7 @@ atomicdefine = ''' + # We know that we can always use real ("lock free") atomic operations with MSVC + if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' or cc.links(atomictest, name : 'atomic ops') + have_atomic_lock_free = true +- if cc.get_id() == 'gcc' and not cc.compiles(atomicdefine, name : 'atomic ops define') ++ if (cc.get_id() == 'gcc' or cc.get_id() == 'clang') and not cc.compiles(atomicdefine, name : 'atomic ops define') + # Old gcc release may provide + # __sync_bool_compare_and_swap but doesn't define + # __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 +-- +2.23.0 + diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch new file mode 100644 index 0000000..872340d --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch @@ -0,0 +1,46 @@ +From b9160d951b9af647b97766c57295ca4f45cf9521 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 3 Oct 2017 10:45:55 +0300 +Subject: [PATCH 10/10] Do not hardcode python path into various tools + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin +--- + gio/gdbus-2.0/codegen/gdbus-codegen.in | 2 +- + gobject/glib-genmarshal.in | 2 +- + gobject/glib-mkenums.in | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in +index 8050981..e693ef3 100755 +--- a/gio/gdbus-2.0/codegen/gdbus-codegen.in ++++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in +@@ -1,4 +1,4 @@ +-#!/usr/bin/env @PYTHON@ ++#!/usr/bin/env python3 + + # GDBus - GLib D-Bus Library + # +diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in +index 09e8408..b2f9d99 100755 +--- a/gobject/glib-genmarshal.in ++++ b/gobject/glib-genmarshal.in +@@ -1,4 +1,4 @@ +-#!/usr/bin/env @PYTHON@ ++#!/usr/bin/env python3 + + # pylint: disable=too-many-lines, missing-docstring, invalid-name + +diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in +index d4bfd11..051fce4 100755 +--- a/gobject/glib-mkenums.in ++++ b/gobject/glib-mkenums.in +@@ -1,4 +1,4 @@ +-#!/usr/bin/env @PYTHON@ ++#!/usr/bin/env python3 + + # If the code below looks horrible and unpythonic, do not panic. + # +-- +2.14.1 + diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0011-GMainContext-Fix-GSource-iterator-if-iteration-can-m.patch b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0011-GMainContext-Fix-GSource-iterator-if-iteration-can-m.patch new file mode 100644 index 0000000..37b77d5 --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0011-GMainContext-Fix-GSource-iterator-if-iteration-can-m.patch @@ -0,0 +1,43 @@ +From ef2be42998e3fc10299055a5a01f7c791538174c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= +Date: Mon, 3 Feb 2020 15:38:28 +0200 +Subject: [PATCH] GMainContext - Fix GSource iterator if iteration can modify + the list + +We first have to ref the next source and then unref the previous one. +This might be the last reference to the previous source, and freeing the +previous source might unref and free the next one which would then leave +use with a dangling pointer here. + +Fixes https://gitlab.gnome.org/GNOME/glib/issues/2031 + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/b06c48de7554607ff3fb58d6c0510cfa5088e909] + +--- + glib/gmain.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/glib/gmain.c b/glib/gmain.c +index af979c8..a9a287d 100644 +--- a/glib/gmain.c ++++ b/glib/gmain.c +@@ -969,13 +969,17 @@ g_source_iter_next (GSourceIter *iter, GSource **source) + * GSourceList to be removed from source_lists (if iter->source is + * the only source in its list, and it is destroyed), so we have to + * keep it reffed until after we advance iter->current_list, above. ++ * ++ * Also we first have to ref the next source before unreffing the ++ * previous one as unreffing the previous source can potentially ++ * free the next one. + */ ++ if (next_source && iter->may_modify) ++ g_source_ref (next_source); + + if (iter->source && iter->may_modify) + g_source_unref_internal (iter->source, iter->context, TRUE); + iter->source = next_source; +- if (iter->source && iter->may_modify) +- g_source_ref (iter->source); + + *source = iter->source; + return *source != NULL; diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0012-GMainContext-Fix-memory-leaks-and-memory-corruption-.patch b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0012-GMainContext-Fix-memory-leaks-and-memory-corruption-.patch new file mode 100644 index 0000000..cf97d9d --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0012-GMainContext-Fix-memory-leaks-and-memory-corruption-.patch @@ -0,0 +1,109 @@ +From 611430a32a46d0dc806a829161e2dccf9c0196a8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= +Date: Mon, 3 Feb 2020 15:35:51 +0200 +Subject: [PATCH] GMainContext - Fix memory leaks and memory corruption when + freeing sources while freeing a context + +Instead of destroying sources directly while freeing the context, and +potentially freeing them if this was the last reference to them, collect +new references of all sources in a separate list before and at the same +time invalidate their context so that they can't access it anymore. Only +once all sources have their context invalidated, destroy them while +still keeping a reference to them. Once all sources are destroyed we get +rid of the additional references and free them if nothing else keeps a +reference to them anymore. + +This fixes a regression introduced by 26056558be in 2012. + +The previous code that invalidated the context of each source and then +destroyed it before going to the next source without keeping an +additional reference caused memory leaks or memory corruption depending +on the order of the sources in the sources lists. + +If a source was destroyed it might happen that this was the last +reference to this source, and it would then be freed. This would cause +the finalize function to be called, which might destroy and unref +another source and potentially free it. This other source would then +either +- go through the normal free logic and change the intern linked list + between the sources, while other sources that are unreffed as part of + the main context freeing would not. As such the list would be in an + inconsistent state and we might dereference freed memory. +- go through the normal destroy and free logic but because the context + pointer was already invalidated it would simply mark the source as + destroyed without actually removing it from the context. This would + then cause a memory leak because the reference owned by the context is + not freed. + +Fixes https://github.com/gtk-rs/glib/issues/583 while still keeping +https://bugzilla.gnome.org/show_bug.cgi?id=661767 fixes. + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/aa20167d419c649f34fed06a9463890b41b1eba0] + +--- + glib/gmain.c | 35 ++++++++++++++++++++++++++++++++++- + 1 file changed, 34 insertions(+), 1 deletion(-) + +diff --git a/glib/gmain.c b/glib/gmain.c +index a9a287d..10ba2f8 100644 +--- a/glib/gmain.c ++++ b/glib/gmain.c +@@ -538,6 +538,7 @@ g_main_context_unref (GMainContext *context) + GSourceIter iter; + GSource *source; + GList *sl_iter; ++ GSList *s_iter, *remaining_sources = NULL; + GSourceList *list; + guint i; + +@@ -557,10 +558,30 @@ g_main_context_unref (GMainContext *context) + + /* g_source_iter_next() assumes the context is locked. */ + LOCK_CONTEXT (context); +- g_source_iter_init (&iter, context, TRUE); ++ ++ /* First collect all remaining sources from the sources lists and store a ++ * new reference in a separate list. Also set the context of the sources ++ * to NULL so that they can't access a partially destroyed context anymore. ++ * ++ * We have to do this first so that we have a strong reference to all ++ * sources and destroying them below does not also free them, and so that ++ * none of the sources can access the context from their finalize/dispose ++ * functions. */ ++ g_source_iter_init (&iter, context, FALSE); + while (g_source_iter_next (&iter, &source)) + { + source->context = NULL; ++ remaining_sources = g_slist_prepend (remaining_sources, g_source_ref (source)); ++ } ++ g_source_iter_clear (&iter); ++ ++ /* Next destroy all sources. As we still hold a reference to all of them, ++ * this won't cause any of them to be freed yet and especially prevents any ++ * source that unrefs another source from its finalize function to be freed. ++ */ ++ for (s_iter = remaining_sources; s_iter; s_iter = s_iter->next) ++ { ++ source = s_iter->data; + g_source_destroy_internal (source, context, TRUE); + } + UNLOCK_CONTEXT (context); +@@ -585,6 +606,18 @@ g_main_context_unref (GMainContext *context) + g_cond_clear (&context->cond); + + g_free (context); ++ ++ /* And now finally get rid of our references to the sources. This will cause ++ * them to be freed unless something else still has a reference to them. Due ++ * to setting the context pointers in the sources to NULL above, this won't ++ * ever access the context or the internal linked list inside the GSource. ++ * We already removed the sources completely from the context above. */ ++ for (s_iter = remaining_sources; s_iter; s_iter = s_iter->next) ++ { ++ source = s_iter->data; ++ g_source_unref_internal (source, NULL, FALSE); ++ } ++ g_slist_free (remaining_sources); + } + + /* Helper function used by mainloop/overflow test. diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch new file mode 100644 index 0000000..4c9e9f5 --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch @@ -0,0 +1,36 @@ +From 3e9d85f1b75e2b1096d9643563d7d17380752fc7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= +Date: Tue, 11 Feb 2020 09:34:38 +0200 +Subject: [PATCH] GMainContext - Move mutex unlocking in destructor right + before freeing the mutex + +This does not have any behaviour changes but is cleaner. The mutex is +only unlocked now after all operations on the context are done and right +before freeing the mutex and the context itself. + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/730a75fc8e8271c38fbd5363d1f77a00876b9ddc] + +--- + glib/gmain.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/glib/gmain.c b/glib/gmain.c +index 10ba2f8..b1df470 100644 +--- a/glib/gmain.c ++++ b/glib/gmain.c +@@ -584,7 +584,6 @@ g_main_context_unref (GMainContext *context) + source = s_iter->data; + g_source_destroy_internal (source, context, TRUE); + } +- UNLOCK_CONTEXT (context); + + for (sl_iter = context->source_lists; sl_iter; sl_iter = sl_iter->next) + { +@@ -595,6 +594,7 @@ g_main_context_unref (GMainContext *context) + + g_hash_table_destroy (context->sources); + ++ UNLOCK_CONTEXT (context); + g_mutex_clear (&context->mutex); + + g_ptr_array_free (context->pending_dispatches, TRUE); diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch new file mode 100644 index 0000000..48899ce --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch @@ -0,0 +1,121 @@ +From 0061d66057dfd7e7267772df60b36474fb180eed Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen +Date: Mon, 9 Nov 2015 11:07:27 +0200 +Subject: [PATCH] Enable more tests while cross-compiling + +Upstream disables a few tests while cross-compiling because their build requires +running other built binaries. This usually makes sense but in the cross-compile +case we can depend on glib-2.0-native. + +Upstream-Status: Inappropriate [OE specific] +Signed-off-by: Jussi Kukkonen + +--- + gio/tests/meson.build | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/gio/tests/meson.build b/gio/tests/meson.build +index 382dfcc..c171717 100644 +--- a/gio/tests/meson.build ++++ b/gio/tests/meson.build +@@ -191,7 +191,7 @@ if host_machine.system() != 'windows' + + # Test programs that need to bring up a session bus (requires dbus-daemon) + have_dbus_daemon = find_program('dbus-daemon', required : false).found() +- if have_dbus_daemon ++ if true + annotate_args = [ + '--annotate', 'org.project.Bar', 'Key1', 'Value1', + '--annotate', 'org.project.Bar', 'org.gtk.GDBus.Internal', 'Value2', +@@ -465,12 +465,12 @@ if installed_tests_enabled + install_data('static-link.py', install_dir : installed_tests_execdir) + endif + +-if not meson.is_cross_build() or meson.has_exe_wrapper() ++if meson.is_cross_build() + + plugin_resources_c = custom_target('plugin-resources.c', + input : 'test4.gresource.xml', + output : 'plugin-resources.c', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--generate-source', +@@ -494,7 +494,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() + test_gresource = custom_target('test.gresource', + input : 'test.gresource.xml', + output : 'test.gresource', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--sourcedir=' + meson.current_build_dir(), +@@ -505,7 +505,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() + test_resources2_c = custom_target('test_resources2.c', + input : 'test3.gresource.xml', + output : 'test_resources2.c', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--generate', +@@ -516,7 +516,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() + test_resources2_h = custom_target('test_resources2.h', + input : 'test3.gresource.xml', + output : 'test_resources2.h', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--generate', +@@ -528,7 +528,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() + input : 'test2.gresource.xml', + depends : big_test_resource, + output : 'test_resources.c', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--sourcedir=' + meson.current_build_dir(), +@@ -539,7 +539,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() + digit_test_resources_c = custom_target('digit_test_resources.c', + input : '111_digit_test.gresource.xml', + output : 'digit_test_resources.c', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--sourcedir=' + meson.current_build_dir(), +@@ -550,7 +550,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() + digit_test_resources_h = custom_target('digit_test_resources.h', + input : '111_digit_test.gresource.xml', + output : 'digit_test_resources.h', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--generate', +@@ -579,11 +579,11 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() + # LLVM once that support is in a stable release. + objcopy = find_program('objcopy', required : false) + +- if build_machine.system() == 'linux' and cc.get_id() == 'gcc' and objcopy.found() ++ if not meson.is_cross_build() + test_gresource_binary = custom_target('test5.gresource', + input : 'test5.gresource.xml', + output : 'test5.gresource', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--sourcedir=' + meson.current_build_dir(), +@@ -595,7 +595,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() + test_resources_binary_c = custom_target('test_resources_binary.c', + input : 'test5.gresource.xml', + output : 'test_resources_binary.c', +- command : [glib_compile_resources, ++ command : ['glib-compile-resources', + '--target=@OUTPUT@', + '--sourcedir=' + meson.current_source_dir(), + '--sourcedir=' + meson.current_build_dir(), diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common new file mode 100644 index 0000000..0d7c5fa --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common @@ -0,0 +1,3 @@ +[properties] +# On all known supported architectures the stack grows down +growing_stack = false diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common-glibc b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common-glibc new file mode 100644 index 0000000..c4648f5 --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common-glibc @@ -0,0 +1,5 @@ +[properties] +have_c99_vsnprintf = true +have_c99_snprintf = true +have_unix98_printf = true +va_val_copy = true diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common-linux b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common-linux new file mode 100644 index 0000000..83596e0 --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common-linux @@ -0,0 +1,5 @@ +[properties] +have_proc_self_cmdline = true + +[binaries] +env = "/usr/bin/env" diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common-mingw b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common-mingw new file mode 100644 index 0000000..75f911b --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common-mingw @@ -0,0 +1,6 @@ +[properties] +have_c99_vsnprintf = false +have_c99_snprintf = false +have_unix98_printf = false +va_val_copy = true +have_proc_self_cmdline = false diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common-musl b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common-musl new file mode 100644 index 0000000..3049e51 --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/meson.cross.d/common-musl @@ -0,0 +1,6 @@ +[properties] +have_c99_vsnprintf = true +have_c99_snprintf = true +have_unix98_printf = true +va_val_copy = true +have_strlcpy = true diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/relocate-modules.patch b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/relocate-modules.patch new file mode 100644 index 0000000..fc320dc --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/relocate-modules.patch @@ -0,0 +1,50 @@ +From 8c623acdbea3ecc2812bbaafcfc892758fa978da Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Fri, 11 Mar 2016 15:35:55 +0000 +Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds + +Instead of hard-coding GIO_MODULE_PATH when glib is built, use dladdr() to +determine where libglib.so is and use that path to calculate GIO_MODULES_DIR. + +This solves relocation problems with GIOModule for native builds of glib. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton + +Port patch to 2.48 +Signed-off-by: Jussi Kukkonen + +--- + gio/giomodule.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/gio/giomodule.c b/gio/giomodule.c +index 1007abd..5380982 100644 +--- a/gio/giomodule.c ++++ b/gio/giomodule.c +@@ -44,6 +44,8 @@ + #include "gnetworkmonitor.h" + #ifdef G_OS_WIN32 + #include "gregistrysettingsbackend.h" ++#else ++#include + #endif + #include + +@@ -1158,7 +1160,15 @@ get_gio_module_dir (void) + #endif + g_free (install_dir); + #else +- module_dir = g_strdup (GIO_MODULE_DIR); ++ Dl_info info; ++ ++ if (dladdr (g_io_module_new, &info)) { ++ char *libdir = g_path_get_dirname (info.dli_fname); ++ module_dir = g_build_filename (libdir, "gio", "modules", NULL); ++ g_free (libdir); ++ } else { ++ module_dir = g_strdup (GIO_MODULE_DIR); ++ } + #endif + } + diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/run-ptest b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/run-ptest new file mode 100644 index 0000000..7a231b5 --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0/run-ptest @@ -0,0 +1,9 @@ +#! /bin/sh + +set -eux +if id -u glib2-test; then + userdel glib2-test +fi +useradd glib2-test +su glib2-test -c 'gnome-desktop-testing-runner glib' +userdel glib2-test diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib-2.0_2.62.4.bb b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0_2.62.4.bb new file mode 100644 index 0000000..d496235 --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib-2.0_2.62.4.bb @@ -0,0 +1,53 @@ +require glib.inc + +PE = "1" + +SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" + +SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ + file://run-ptest \ + file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \ + file://Enable-more-tests-while-cross-compiling.patch \ + file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ + file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ + file://0001-Do-not-ignore-return-value-of-write.patch \ + file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ + file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \ + file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ + file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ + file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ + file://0011-GMainContext-Fix-GSource-iterator-if-iteration-can-m.patch \ + file://0012-GMainContext-Fix-memory-leaks-and-memory-corruption-.patch \ + file://0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch \ + " + +SRC_URI_append_class-native = " file://relocate-modules.patch" + +SRC_URI[md5sum] = "d52234ecba128932bed90bbc3553bfe5" +SRC_URI[sha256sum] = "4c84030d77fa9712135dfa8036ad663925655ae95b1d19399b6200e869925bbc" + +# Find any meson cross files in FILESPATH that are relevant for the current +# build (using siteinfo) and add them to EXTRA_OEMESON. +inherit siteinfo +def find_meson_cross_files(d): + if bb.data.inherits_class('native', d): + return "" + + corebase = d.getVar("COREBASE") + import collections + sitedata = siteinfo_data(d) + # filename -> found + files = collections.OrderedDict() + for path in d.getVar("FILESPATH").split(":"): + for element in sitedata: + filename = os.path.normpath(os.path.join(path, "meson.cross.d", element)) + files[filename.replace(corebase, "${COREBASE}")] = os.path.exists(filename) + + items = ["--cross-file=" + k for k,v in files.items() if v] + d.appendVar("EXTRA_OEMESON", " " + " ".join(items)) + items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()] + d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items)) + +python () { + find_meson_cross_files(d) +} diff --git a/meta-gnome/recipes-gnome/glib-2.0/glib.inc b/meta-gnome/recipes-gnome/glib-2.0/glib.inc new file mode 100644 index 0000000..61bb319 --- /dev/null +++ b/meta-gnome/recipes-gnome/glib-2.0/glib.inc @@ -0,0 +1,199 @@ +SUMMARY = "A general-purpose utility library" +DESCRIPTION = "GLib is a general-purpose utility library, which provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on." +HOMEPAGE = "https://developer.gnome.org/glib/" + +# pcre is under BSD; +# docs/reference/COPYING is with a 'public domain'-like license! +LICENSE = "LGPLv2.1+ & BSD & PD" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ + file://glib/glib.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \ + file://gmodule/COPYING;md5=4fbd65380cdd255951079008b364516c \ + file://gmodule/gmodule.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \ + file://glib/pcre/pcre.h;beginline=8;endline=36;md5=3e2977dae4ad05217f58c446237298fc \ + file://docs/reference/COPYING;md5=f51a5100c17af6bae00735cd791e1fcc" +BUGTRACKER = "http://bugzilla.gnome.org" +SECTION = "libs" + +CVE_PRODUCT = "glib" + +BBCLASSEXTEND = "native nativesdk" + +DEPENDS = "glib-2.0-native \ + virtual/libintl \ + virtual/libiconv \ + libffi \ + zlib" + +PACKAGES += "${PN}-codegen ${PN}-utils" + +LEAD_SONAME = "libglib-2.0.*" + +inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages + +GTKDOC_MESON_OPTION = "gtk_doc" + +# This avoids the need to depend on target python3, which in case of mingw is not even possible. +# meson's python configuration pokes into python3 configuration, so this provides the native config to it. +unset _PYTHON_SYSCONFIGDATA_NAME + +S = "${WORKDIR}/glib-${PV}" + +PACKAGECONFIG ??= "system-pcre libmount \ + ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" +# To use the system pcre it must be configured with --enable-unicode-properties +PACKAGECONFIG[system-pcre] = "-Dinternal_pcre=false,-Dinternal_pcre=true,libpcre" +PACKAGECONFIG[libmount] = "-Dlibmount=true,-Dlibmount=false,util-linux" +PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native" +# libelf is auto-detected without a configuration option +PACKAGECONFIG[libelf] = ",,elfutils" +PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false,dbus" + +EXTRA_OEMESON = "-Ddtrace=false -Dfam=false -Dsystemtap=false -Dselinux=disabled" + +do_configure_prepend() { + sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in +} + +FILES_${PN} = "${libdir}/lib*${SOLIBS} \ + ${libdir}/gio \ + ${libexecdir}/*gio-querymodules \ + ${datadir}/glib-2.0/schemas" + +FILES_${PN}-utils += "${bindir}/glib-genmarshal \ + ${bindir}/glib-gettextize \ + ${bindir}/glib-mkenums \ + ${bindir}/glib-compile-resources" + +FILES_${PN}-dev += "${libdir}/glib-2.0/include \ + ${libdir}/gio/modules/lib*${SOLIBSDEV} \ + ${libdir}/gio/modules/*.la \ + ${datadir}/glib-2.0/gettext/po/Makefile.in.in \ + ${datadir}/glib-2.0/schemas/gschema.dtd \ + ${datadir}/glib-2.0/valgrind/glib.supp \ + ${datadir}/gettext/its" +FILES_${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb" +FILES_${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \ + ${bindir}/gdbus-codegen" +FILES_${PN}-utils = "${bindir}/*" + +SHAREDMIMEDEP = "shared-mime-info" +SHAREDMIMEDEP_class-native = "" +# When cross compiling for Windows we don't want to include this +SHAREDMIMEDEP_mingw32 = "" + +RRECOMMENDS_${PN} += "${SHAREDMIMEDEP}" + +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" +# Valgrind runtime detection works using hand-written assembly, which +# doesn't support mips16e +CPPFLAGS_append_class-target_mips16e = " -DNVALGRIND=1" + +# GLib generally requires gettext to be present so for USE_NLS to yes. For +# native builds as i18n is disabled globally we have to add a gettext-native dependency. +USE_NLS_class-target = "yes" +USE_NLS_class-nativesdk = "yes" +DEPENDS_append_class-native = " gettext-native" + +EXEEXT = "" +EXEEXT_mingw32 = ".exe" + +do_install_append () { + if [ -f ${D}${bindir}/gtester-report ]; then + sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python3|' + fi + + # Remove some unpackaged files + rm -rf ${D}${datadir}/glib-2.0/codegen/__pycache__ + rm -f ${D}${datadir}/glib-2.0/codegen/*.pyc + rm -f ${D}${datadir}/glib-2.0/codegen/*.pyo + + if [ -e ${D}${libdir}/charset.alias ]; then + rm -f ${D}${libdir}/charset.alias + fi + + # Make sure gio-querymodules is unique among multilibs + if test "x${MLPREFIX}" != "x"; then + mv ${D}${libexecdir}/gio-querymodules${EXEEXT} ${D}${libexecdir}/${MLPREFIX}gio-querymodules${EXEEXT} + fi + # Autotools does this, meson does not + mkdir -p ${D}${libdir}/gio/modules +} + +do_install_append_class-target () { + # Tests are only installed on targets, not native builds. Separating this out + # keeps glib-2.0-native from depending on DISTRO_FEATURES + if [ -f ${D}${datadir}/installed-tests/glib/gdbus-serialization.test ]; then + if ${@bb.utils.contains("DISTRO_FEATURES", "x11", "false", "true", d)}; then + rm ${D}${datadir}/installed-tests/glib/gdbus-serialization.test + fi + fi + if [ -f ${D}${datadir}/installed-tests/glib/static-link.test ]; then + if test "x${MLPREFIX}" != "x"; then + mv ${D}${datadir}/installed-tests/glib/static-link.test ${D}${datadir}/installed-tests/glib/${MLPREFIX}static-link.test + fi + fi +} + +# As we do not build python3 for windows, makes no sense to ship the script that's using it +do_install_append_mingw32() { + rm -f ${D}${bindir}/gtester-report +} + +CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml" +CODEGEN_PYTHON_RDEPENDS_mingw32 = "" + +RDEPENDS_${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}" + +RDEPENDS_${PN}-ptest += "${PN}-utils" + +RDEPENDS_${PN}-ptest += "\ + coreutils \ + libgcc \ + dbus \ + gnome-desktop-testing \ + tzdata \ + tzdata-americas \ + tzdata-asia \ + tzdata-europe \ + tzdata-posix \ + shared-mime-info \ + ${PN}-locale-ja \ + ${PN}-locale-fr \ + ${PN}-locale-el \ + ${PN}-locale-hr \ + ${PN}-locale-lt \ + ${PN}-locale-pl \ + ${PN}-locale-ru \ + ${PN}-locale-th \ + python3-core \ + python3-modules \ + " + +RDEPENDS_${PN}-ptest_append_libc-glibc = "\ + glibc-gconv-utf-16 \ + glibc-charmap-utf-8 \ + glibc-gconv-cp1255 \ + glibc-charmap-cp1255 \ + glibc-gconv-utf-32 \ + glibc-gconv-utf-7 \ + glibc-gconv-euc-jp \ + glibc-gconv-iso8859-1 \ + glibc-gconv-iso8859-15 \ + glibc-charmap-invariant \ + glibc-localedata-translit-cjk-variants \ + locale-base-tr-tr \ + locale-base-lt-lt \ + locale-base-ja-jp.euc-jp \ + locale-base-fa-ir \ + locale-base-ru-ru \ + locale-base-de-de \ + locale-base-hr-hr \ + locale-base-el-gr \ + locale-base-fr-fr \ + locale-base-es-es \ + locale-base-en-gb \ + locale-base-en-us \ + locale-base-pl-pl \ + locale-base-pl-pl.iso-8859-2 \ + " diff --git a/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Add-meson-option-to-pass-sysroot.patch b/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Add-meson-option-to-pass-sysroot.patch new file mode 100644 index 0000000..7f82a15 --- /dev/null +++ b/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Add-meson-option-to-pass-sysroot.patch @@ -0,0 +1,45 @@ +From ba8aebe1259ae3f7f5a4827e5a47bb95c568b218 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Tue, 21 May 2019 16:07:46 +0200 +Subject: [PATCH] Add meson option to pass sysroot +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We need to pass this to meson to help it finding gdesktop-enums.h: + +| panels/background/meson.build:38:0: ERROR: File /usr/include/gsettings-desktop-schemas/gdesktop-enums.h does not exist. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Andreas Müller +--- + meson_options.txt | 1 + + panels/background/meson.build | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/meson_options.txt b/meson_options.txt +index a347168..2cd8121 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -1,3 +1,4 @@ ++option('oe_sysroot', type: 'string', value: '', description: 'Directory for OE-sysroot') + option('cheese', type: 'boolean', value: true, description: 'build with cheese webcam support') + option('documentation', type: 'boolean', value: false, description: 'build documentation') + option('gnome_session_libexecdir', type: 'string', value: '', description: 'Directory for gnome-session\'s libexecdir') +diff --git a/panels/background/meson.build b/panels/background/meson.build +index bb34b69..f22722e 100644 +--- a/panels/background/meson.build ++++ b/panels/background/meson.build +@@ -36,7 +36,7 @@ common_sources = [] + + enums = 'gdesktop-enums-types' + enums_header = files( +- gsettings_desktop_dep.get_pkgconfig_variable('prefix') + '/include/gsettings-desktop-schemas/gdesktop-enums.h', ++ get_option('oe_sysroot') + gsettings_desktop_dep.get_pkgconfig_variable('prefix') + '/include/gsettings-desktop-schemas/gdesktop-enums.h', + 'cc-background-item.h' + ) + +-- +2.20.1 + diff --git a/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Add-options-for-Citadel-and-disabling-GOA-CUPS.patch b/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Add-options-for-Citadel-and-disabling-GOA-CUPS.patch new file mode 100644 index 0000000..202338d --- /dev/null +++ b/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Add-options-for-Citadel-and-disabling-GOA-CUPS.patch @@ -0,0 +1,460 @@ +From 94a5f59e39861ae98e305cca96dc296f6e44e28a Mon Sep 17 00:00:00 2001 +From: David McKinney +Date: Mon, 6 Jul 2020 12:30:21 +0000 +Subject: [PATCH] Add options for Citadel and disabling GOA/CUPS + +--- + meson.build | 14 +++++++++++++ + meson_options.txt | 5 +++++ + panels/background/bg-pictures-source.c | 21 ++++++++++++++++--- + panels/background/meson.build | 15 ++++++++++---- + panels/meson.build | 23 ++++++++++++++------- + shell/cc-panel-list.c | 15 +++++++++++++- + shell/cc-panel-loader.c | 28 ++++++++++++++++++++++++++ + tests/meson.build | 2 +- + 8 files changed, 107 insertions(+), 16 deletions(-) + +diff --git a/meson.build b/meson.build +index 79a8053..db2f328 100644 +--- a/meson.build ++++ b/meson.build +@@ -115,6 +115,15 @@ if not libhandy_dep.found() + libhandy_dep = libhandy.get_variable('libhandy_dep') + endif + ++enable_goa = get_option('online_accounts') ++enable_cups = get_option('cups') ++enable_user_accounts = get_option('user_accounts') ++enable_citadel = get_option('citadel') ++config_h.set('WITH_GOA', enable_goa, description: 'Define to enable support for Gnome Online Accounts') ++config_h.set('WITH_CUPS', enable_goa, description: 'Define to enable support for CUPS') ++config_h.set('WITH_USER_ACCOUNTS', enable_user_accounts, description: 'Define to enable user accounts panel') ++config_h.set('CITADEL', enable_citadel, description: 'Define to enable the removal of components unneeded in Citadel') ++ + goa_req_version = '>= 3.25.3' + pulse_req_version = '>= 2.0' + +@@ -125,7 +134,9 @@ gio_dep = dependency('gio-2.0') + glib_dep = dependency('glib-2.0', version: '>= 2.56.0') + gnome_desktop_dep = dependency('gnome-desktop-3.0', version: '>= 3.27.90') + gnome_settings_dep = dependency('gnome-settings-daemon', version: '>= 3.27.90') ++if enable_goa + goa_dep = dependency('goa-1.0', version: goa_req_version) ++endif + gsettings_desktop_dep = dependency('gsettings-desktop-schemas', version: '>= 3.31.0') + libxml_dep = dependency('libxml-2.0') + polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.114') +@@ -150,6 +161,8 @@ common_deps = [ + ] + + # Check for CUPS 1.4 or newer ++ ++if enable_cups + cups_dep = dependency('cups', version : '>= 1.4', required: false) + assert(cups_dep.found(), 'CUPS 1.4 or newer not found') + +@@ -172,6 +185,7 @@ endforeach + config_h.set10('HAVE_CUPS_HTTPCONNECT2', + cc.has_function('httpConnect2', dependencies: cups_dep), + description: 'Define if httpConnect2() is available in CUPS') ++endif + + # Optional dependency for the user accounts panel + enable_cheese = get_option('cheese') +diff --git a/meson_options.txt b/meson_options.txt +index e76308e..4bb77cd 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -7,3 +7,8 @@ option('tests', type: 'boolean', value: true, description: 'build tests') + option('tracing', type: 'boolean', value: false, description: 'add extra debugging information') + option('wayland', type: 'boolean', value: true, description: 'build with Wayland support') + option('profile', type: 'combo', choices: ['default','development'], value: 'default') ++option('staging_dir', type: 'string', description: 'set staging directory for cross-compile') ++option('online_accounts', type: 'boolean', value: false, description: 'build with support for gnome-online-accounts') ++option('cups', type: 'boolean', value: false, description: 'build with support for CUPS') ++option('user_accounts', type: 'boolean', value: false, description: 'build with support for user accounts panel') ++option('citadel', type: 'boolean', value: true, description: 'build with Citadel support, which removes unneeded components') +diff --git a/panels/background/bg-pictures-source.c b/panels/background/bg-pictures-source.c +index faafd93..841fa66 100644 +--- a/panels/background/bg-pictures-source.c ++++ b/panels/background/bg-pictures-source.c +@@ -29,7 +29,9 @@ + #include + #include + #include ++#ifdef WITH_GOA + #include ++#endif + #include + #include + +@@ -43,8 +45,9 @@ struct _BgPicturesSource + + GCancellable *cancellable; + ++#ifdef WITH_GOA + CcBackgroundGriloMiner *grl_miner; +- ++#endif + GFileMonitor *picture_dir_monitor; + GFileMonitor *cache_dir_monitor; + +@@ -83,8 +86,9 @@ bg_pictures_source_dispose (GObject *object) + g_clear_object (&source->cancellable); + } + ++#ifdef WITH_GOA + g_clear_object (&source->grl_miner); +- ++#endif + G_OBJECT_CLASS (bg_pictures_source_parent_class)->dispose (object); + } + +@@ -392,7 +396,9 @@ add_single_file (BgPicturesSource *bg_source, + const gchar *pictures_path; + g_autoptr(GFile) pictures_dir = NULL; + g_autoptr(GFile) cache_dir = NULL; ++#ifdef WITH_GOA + GrlMedia *media; ++#endif + + /* find png and jpeg files */ + if (!content_type) +@@ -432,13 +438,16 @@ add_single_file (BgPicturesSource *bg_source, + "source-url", source_uri, + NULL); + ++#ifdef WITH_GOA + media = g_object_get_data (G_OBJECT (file), "grl-media"); + if (media == NULL) + { ++#endif + g_object_set_data_full (G_OBJECT (file), "item", g_object_ref (item), g_object_unref); + g_file_read_async (file, G_PRIORITY_DEFAULT, + bg_source->cancellable, + picture_opened_for_read, bg_source); ++#ifdef WITH_GOA + } + else + { +@@ -476,7 +485,7 @@ add_single_file (BgPicturesSource *bg_source, + picture_copied_for_read, + bg_source); + } +- ++#endif + retval = TRUE; + + out: +@@ -496,6 +505,7 @@ add_single_file_from_info (BgPicturesSource *bg_source, + return add_single_file (bg_source, file, content_type, mtime); + } + ++#ifdef WITH_GOA + static gboolean + add_single_file_from_media (BgPicturesSource *bg_source, + GFile *file, +@@ -520,6 +530,7 @@ add_single_file_from_media (BgPicturesSource *bg_source, + + return add_single_file (bg_source, file, content_type, (guint64) mtime_unix); + } ++#endif + + gboolean + bg_pictures_source_add (BgPicturesSource *bg_source, +@@ -806,6 +817,7 @@ monitor_path (BgPicturesSource *self, + return monitor; + } + ++#ifdef WITH_GOA + static void + media_found_cb (BgPicturesSource *self, GrlMedia *media) + { +@@ -817,6 +829,7 @@ media_found_cb (BgPicturesSource *self, GrlMedia *media) + g_object_set_data_full (G_OBJECT (file), "grl-media", g_object_ref (media), g_object_unref); + add_single_file_from_media (self, file, media); + } ++#endif + + static void + bg_pictures_source_init (BgPicturesSource *self) +@@ -839,9 +852,11 @@ bg_pictures_source_init (BgPicturesSource *self) + cache_path = bg_pictures_source_get_cache_path (); + self->cache_dir_monitor = monitor_path (self, cache_path); + ++#ifdef WITH_GOA + self->grl_miner = cc_background_grilo_miner_new (); + g_signal_connect_swapped (self->grl_miner, "media-found", G_CALLBACK (media_found_cb), self); + cc_background_grilo_miner_start (self->grl_miner); ++#endif + } + + BgPicturesSource * +diff --git a/panels/background/meson.build b/panels/background/meson.build +index e9fa398..534b999 100644 +--- a/panels/background/meson.build ++++ b/panels/background/meson.build +@@ -34,9 +34,11 @@ install_data( + + common_sources = [] + ++staging = get_option('staging_dir') ++ + enums = 'gdesktop-enums-types' + enums_header = files( +- gsettings_desktop_dep.get_pkgconfig_variable('prefix') + '/include/gsettings-desktop-schemas/gdesktop-enums.h', ++ staging + gsettings_desktop_dep.get_pkgconfig_variable('prefix') + '/include/gsettings-desktop-schemas/gdesktop-enums.h', + 'cc-background-item.h' + ) + +@@ -81,22 +83,27 @@ sources = common_sources + files( + 'bg-source.c', + 'bg-wallpapers-source.c', + 'cc-background-chooser.c', +- 'cc-background-grilo-miner.c', + 'cc-background-item.c', + 'cc-background-panel.c', + 'cc-background-preview.c', + 'cc-background-xml.c', + ) + ++if enable_goa ++sources += files('cc-background-grilo-miner.c') ++endif ++ + deps = common_deps + [ + gdk_pixbuf_dep, + gnome_desktop_dep, +- goa_dep, + libxml_dep, + dependency('cairo-gobject'), +- dependency('grilo-0.3', version: '>= 0.3.0') + ] + ++if enable_goa ++deps += [ goa_dep, dependency('grilo-0.3', version: '>= 0.3.0') ] ++endif ++ + cflags += [ + '-DDATADIR="@0@"'.format(control_center_datadir), + '-DGNOME_DESKTOP_USE_UNSTABLE_API' +diff --git a/panels/meson.build b/panels/meson.build +index 2f4fdc5..82f54bd 100644 +--- a/panels/meson.build ++++ b/panels/meson.build +@@ -1,12 +1,10 @@ + subdir('common') + + panels = [ +- 'applications', + 'background', + 'camera', + 'color', + 'datetime', +- 'default-apps', + 'diagnostics', + 'display', + 'info-overview', +@@ -16,17 +14,12 @@ panels = [ + 'microphone', + 'mouse', + 'notifications', +- 'online-accounts', + 'power', +- 'printers', + 'region', +- 'removable-media', + 'search', +- 'sharing', + 'sound', + 'universal-access', + 'usage', +- 'user-accounts' + ] + + if host_is_linux +@@ -41,6 +34,22 @@ if host_is_linux_not_s390 + ] + endif + ++if enable_goa ++ panels += ['online-accounts'] ++endif ++ ++if enable_cups ++ panels += ['printers'] ++endif ++ ++if enable_user_accounts ++ panels += ['user-accounts'] ++endif ++ ++if not enable_citadel ++ panel_names += ['applications', 'default-apps', 'removable-media', 'sharing'] ++endif ++ + panels_list = [] + panels_libs = [] + foreach cappletname: panels +diff --git a/shell/cc-panel-list.c b/shell/cc-panel-list.c +index 2578590..28251a9 100644 +--- a/shell/cc-panel-list.c ++++ b/shell/cc-panel-list.c +@@ -392,11 +392,16 @@ static const gchar * const panel_order[] = { + "background", + "notifications", + "search", ++#ifndef CITADEL + "applications", ++#endif + "privacy", ++#ifndef WITH_GOA + "online-accounts", ++#endif ++#ifndef CITADEL + "sharing", +- ++#endif + /* Privacy page */ + "location", + "camera", +@@ -412,16 +417,24 @@ static const gchar * const panel_order[] = { + "display", + "mouse", + "keyboard", ++#ifndef WITH_CUPS + "printers", ++#endif ++#ifndef CITADEL + "removable-media", ++#endif + "wacom", + "color", + + /* Details page */ + "region", + "universal-access", ++#ifndef WITH_USER_ACCOUNTS + "user-accounts", ++#endif ++#ifndef CITADEL + "default-apps", ++#endif + "reset-settings", + "datetime", + "info-overview", +diff --git a/shell/cc-panel-loader.c b/shell/cc-panel-loader.c +index f203843..cad01f5 100644 +--- a/shell/cc-panel-loader.c ++++ b/shell/cc-panel-loader.c +@@ -31,14 +31,18 @@ + #ifndef CC_PANEL_LOADER_NO_GTYPES + + /* Extension points */ ++#ifndef CITADEL + extern GType cc_applications_panel_get_type (void); ++#endif + extern GType cc_background_panel_get_type (void); + #ifdef BUILD_BLUETOOTH + extern GType cc_bluetooth_panel_get_type (void); + #endif /* BUILD_BLUETOOTH */ + extern GType cc_color_panel_get_type (void); + extern GType cc_date_time_panel_get_type (void); ++#ifndef CITADEL + extern GType cc_default_apps_panel_get_type (void); ++#endif + extern GType cc_display_panel_get_type (void); + extern GType cc_info_overview_panel_get_type (void); + extern GType cc_keyboard_panel_get_type (void); +@@ -48,19 +52,29 @@ extern GType cc_network_panel_get_type (void); + extern GType cc_wifi_panel_get_type (void); + #endif /* BUILD_NETWORK */ + extern GType cc_notifications_panel_get_type (void); ++#ifdef WITH_GOA + extern GType cc_goa_panel_get_type (void); ++#endif + extern GType cc_power_panel_get_type (void); ++#ifdef WITH_CUPS + extern GType cc_printers_panel_get_type (void); ++#endif + extern GType cc_region_panel_get_type (void); ++#ifndef CITADEL + extern GType cc_removable_media_panel_get_type (void); ++#endif + extern GType cc_search_panel_get_type (void); ++#ifndef CITADEL + extern GType cc_sharing_panel_get_type (void); ++#endif + extern GType cc_sound_panel_get_type (void); + #ifdef BUILD_THUNDERBOLT + extern GType cc_bolt_panel_get_type (void); + #endif /* BUILD_THUNDERBOLT */ + extern GType cc_ua_panel_get_type (void); ++#ifdef WITH_USER_ACCOUNTS + extern GType cc_user_panel_get_type (void); ++#endif + #ifdef BUILD_WACOM + extern GType cc_wacom_panel_get_type (void); + #endif /* BUILD_WACOM */ +@@ -90,7 +104,9 @@ extern void cc_wacom_panel_static_init_func (void); + + static CcPanelLoaderVtable default_panels[] = + { ++#ifndef CITADEL + PANEL_TYPE("applications", cc_applications_panel_get_type, NULL), ++#endif + PANEL_TYPE("background", cc_background_panel_get_type, NULL), + #ifdef BUILD_BLUETOOTH + PANEL_TYPE("bluetooth", cc_bluetooth_panel_get_type, NULL), +@@ -98,7 +114,9 @@ static CcPanelLoaderVtable default_panels[] = + PANEL_TYPE("camera", cc_camera_panel_get_type, NULL), + PANEL_TYPE("color", cc_color_panel_get_type, NULL), + PANEL_TYPE("datetime", cc_date_time_panel_get_type, NULL), ++#ifndef CITADEL + PANEL_TYPE("default-apps", cc_default_apps_panel_get_type, NULL), ++#endif + PANEL_TYPE("diagnostics", cc_diagnostics_panel_get_type, cc_diagnostics_panel_static_init_func), + PANEL_TYPE("display", cc_display_panel_get_type, NULL), + PANEL_TYPE("info-overview", cc_info_overview_panel_get_type, NULL), +@@ -112,20 +130,30 @@ static CcPanelLoaderVtable default_panels[] = + PANEL_TYPE("wifi", cc_wifi_panel_get_type, cc_wifi_panel_static_init_func), + #endif + PANEL_TYPE("notifications", cc_notifications_panel_get_type, NULL), ++#ifdef WITH_GOA + PANEL_TYPE("online-accounts", cc_goa_panel_get_type, NULL), ++#endif + PANEL_TYPE("power", cc_power_panel_get_type, NULL), ++#ifdef WITH_CUPS + PANEL_TYPE("printers", cc_printers_panel_get_type, NULL), ++#endif + PANEL_TYPE("region", cc_region_panel_get_type, NULL), ++#ifndef CITADEL + PANEL_TYPE("removable-media", cc_removable_media_panel_get_type, NULL), ++#endif + PANEL_TYPE("search", cc_search_panel_get_type, NULL), ++#ifndef CITADEL + PANEL_TYPE("sharing", cc_sharing_panel_get_type, NULL), ++#endif + PANEL_TYPE("sound", cc_sound_panel_get_type, NULL), + #ifdef BUILD_THUNDERBOLT + PANEL_TYPE("thunderbolt", cc_bolt_panel_get_type, NULL), + #endif + PANEL_TYPE("universal-access", cc_ua_panel_get_type, NULL), + PANEL_TYPE("usage", cc_usage_panel_get_type, NULL), ++#ifdef WITH_USER_ACCOUNTS + PANEL_TYPE("user-accounts", cc_user_panel_get_type, NULL), ++#endif + #ifdef BUILD_WACOM + PANEL_TYPE("wacom", cc_wacom_panel_get_type, cc_wacom_panel_static_init_func), + #endif +diff --git a/tests/meson.build b/tests/meson.build +index d4fe361..b879160 100644 +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -6,5 +6,5 @@ endif + + subdir('interactive-panels') + +-subdir('printers') ++#subdir('printers') + subdir('info') diff --git a/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Make-GOA-CUPS-and-User-Accounts-optional.patch b/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Make-GOA-CUPS-and-User-Accounts-optional.old similarity index 100% rename from meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Make-GOA-CUPS-and-User-Accounts-optional.patch rename to meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Make-GOA-CUPS-and-User-Accounts-optional.old diff --git a/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Remove-unneeded-panels-make-GOA-CUPS-optional.orig b/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Remove-unneeded-panels-make-GOA-CUPS-optional.orig new file mode 100644 index 0000000..c3f9ffc --- /dev/null +++ b/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Remove-unneeded-panels-make-GOA-CUPS-optional.orig @@ -0,0 +1,502 @@ +From a5c21a082006e940cf8802123439292beb967f83 Mon Sep 17 00:00:00 2001 +From: David McKinney +Date: Thu, 2 Jul 2020 15:18:05 +0000 +Subject: [PATCH] Remove unneeded panels, make GOA/CUPS optional + +--- + meson.build | 52 +++++++++++++++----------- + meson_options.txt | 5 +++ + panels/background/bg-pictures-source.c | 30 ++++++++++----- + panels/background/meson.build | 14 +++++-- + panels/meson.build | 23 ++++++++---- + shell/cc-panel-list.c | 15 +++++++- + shell/cc-panel-loader.c | 28 ++++++++++++++ + tests/meson.build | 1 - + 8 files changed, 124 insertions(+), 44 deletions(-) + +diff --git a/meson.build b/meson.build +index 6534dba..2db99bb 100644 +--- a/meson.build ++++ b/meson.build +@@ -115,6 +115,15 @@ if not libhandy_dep.found() + libhandy_dep = libhandy.get_variable('libhandy_dep') + endif + ++enable_goa = get_option('online_accounts') ++enable_cups = get_option('cups') ++enable_user_accounts = get_option('user_accounts') ++enable_citadel = get_option('citadel') ++config_h.set('WITH_GOA', enable_goa, description: 'Define to enable support for Gnome Online Accounts') ++config_h.set('WITH_CUPS', enable_goa, description: 'Define to enable support for CUPS') ++config_h.set('WITH_USER_ACCOUNTS', enable_user_accounts, description: 'Define to enable user accounts panel') ++config_h.set('CITADEL', enable_citadel, description: 'Define to enable the removal of components unneeded in Citadel') ++ + goa_req_version = '>= 3.25.3' + pulse_req_version = '>= 2.0' + +@@ -125,7 +134,9 @@ gio_dep = dependency('gio-2.0') + glib_dep = dependency('glib-2.0', version: '>= 2.56.0') + gnome_desktop_dep = dependency('gnome-desktop-3.0', version: '>= 3.27.90') + gnome_settings_dep = dependency('gnome-settings-daemon', version: '>= 3.27.90') +-goa_dep = dependency('goa-1.0', version: goa_req_version) ++if enable_goa ++ goa_dep = dependency('goa-1.0', version: goa_req_version) ++endif + gsettings_desktop_dep = dependency('gsettings-desktop-schemas', version: '>= 3.31.0') + libxml_dep = dependency('libxml-2.0') + polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.114') +@@ -149,29 +160,28 @@ common_deps = [ + dependency('gtk+-3.0', version: '>= 3.22.20') + ] + +-# Check for CUPS 1.4 or newer +-cups_dep = dependency('cups', version : '>= 1.4', required: false) +-assert(cups_dep.found(), 'CUPS 1.4 or newer not found') +- ++if enable_cups ++ # Check for CUPS 1.4 or newer ++ cups_dep = dependency('cups', version : '>= 1.4', required: false) ++ assert(cups_dep.found(), 'CUPS 1.4 or newer not found') + # https://bugzilla.gnome.org/show_bug.cgi?id=696766 +-cups_cflags = [] +-if cups_dep.version().version_compare('>= 1.6') +- cups_cflags += '-D_PPD_DEPRECATED=' +-endif +- +-# cups headers +-check_headers = [ +- ['HAVE_CUPS_CUPS_H', 'cups/cups.h'], +- ['HAVE_CUPS_PPD_H', 'cups/ppd.h'] +-] +- +-foreach header: check_headers +- assert(cc.has_header(header[1], args: cups_cflags), 'CUPS headers not found: ' + header[1]) +-endforeach +- +-config_h.set10('HAVE_CUPS_HTTPCONNECT2', ++ cups_cflags = [] ++ if cups_dep.version().version_compare('>= 1.6') ++ cups_cflags += '-D_PPD_DEPRECATED=' ++ endif ++ ++ # cups headers ++ check_headers = [ ++ ['HAVE_CUPS_CUPS_H', 'cups/cups.h'], ++ ['HAVE_CUPS_PPD_H', 'cups/ppd.h'] ++ ] ++ foreach header: check_headers ++ assert(cc.has_header(header[1], args: cups_cflags), 'CUPS headers not found: ' + header[1]) ++ endforeach ++ config_h.set10('HAVE_CUPS_HTTPCONNECT2', + cc.has_function('httpConnect2', dependencies: cups_dep), + description: 'Define if httpConnect2() is available in CUPS') ++endif + + # Optional dependency for the user accounts panel + enable_cheese = get_option('cheese') +diff --git a/meson_options.txt b/meson_options.txt +index 0df930c..ccb45c5 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -8,3 +8,8 @@ option('tests', type: 'boolean', value: true, description: 'build tests') + option('tracing', type: 'boolean', value: false, description: 'add extra debugging information') + option('wayland', type: 'boolean', value: true, description: 'build with Wayland support') + option('profile', type: 'combo', choices: ['default','development'], value: 'default') ++option('staging_dir', type: 'string', description: 'set staging directory for cross-compile') ++option('online_accounts', type: 'boolean', value: false, description: 'build with support for gnome-online-accounts') ++option('cups', type: 'boolean', value: false, description: 'build with support for CUPS') ++option('user_accounts', type: 'boolean', value: false, description: 'build with support for user accounts panel') ++option('citadel', type: 'boolean', value: true, description: 'build with Citadel support, which removes unneeded components') +diff --git a/panels/background/bg-pictures-source.c b/panels/background/bg-pictures-source.c +index faafd93..3df8277 100644 +--- a/panels/background/bg-pictures-source.c ++++ b/panels/background/bg-pictures-source.c +@@ -23,13 +23,17 @@ + + #include "bg-pictures-source.h" + ++#ifdef WITH_GOA + #include "cc-background-grilo-miner.h" ++#endif + #include "cc-background-item.h" + + #include + #include + #include ++#ifdef WITH_GOA + #include ++#endif + #include + #include + +@@ -43,8 +47,9 @@ struct _BgPicturesSource + + GCancellable *cancellable; + ++#ifdef WITH_GOA + CcBackgroundGriloMiner *grl_miner; +- ++#endif + GFileMonitor *picture_dir_monitor; + GFileMonitor *cache_dir_monitor; + +@@ -82,9 +87,9 @@ bg_pictures_source_dispose (GObject *object) + g_cancellable_cancel (source->cancellable); + g_clear_object (&source->cancellable); + } +- ++#ifdef WITH_GOA + g_clear_object (&source->grl_miner); +- ++#endif + G_OBJECT_CLASS (bg_pictures_source_parent_class)->dispose (object); + } + +@@ -392,7 +397,9 @@ add_single_file (BgPicturesSource *bg_source, + const gchar *pictures_path; + g_autoptr(GFile) pictures_dir = NULL; + g_autoptr(GFile) cache_dir = NULL; ++#ifdef WITH_GOA + GrlMedia *media; ++#endif + + /* find png and jpeg files */ + if (!content_type) +@@ -431,14 +438,16 @@ add_single_file (BgPicturesSource *bg_source, + "needs-download", needs_download, + "source-url", source_uri, + NULL); +- ++#ifdef WITH_GOA + media = g_object_get_data (G_OBJECT (file), "grl-media"); + if (media == NULL) + { ++#endif + g_object_set_data_full (G_OBJECT (file), "item", g_object_ref (item), g_object_unref); + g_file_read_async (file, G_PRIORITY_DEFAULT, + bg_source->cancellable, + picture_opened_for_read, bg_source); ++#ifdef WITH_GOA + } + else + { +@@ -477,8 +486,8 @@ add_single_file (BgPicturesSource *bg_source, + bg_source); + } + ++#endif + retval = TRUE; +- + out: + return retval; + } +@@ -495,7 +504,7 @@ add_single_file_from_info (BgPicturesSource *bg_source, + mtime = g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED); + return add_single_file (bg_source, file, content_type, mtime); + } +- ++#ifdef WITH_GOA + static gboolean + add_single_file_from_media (BgPicturesSource *bg_source, + GFile *file, +@@ -520,7 +529,7 @@ add_single_file_from_media (BgPicturesSource *bg_source, + + return add_single_file (bg_source, file, content_type, (guint64) mtime_unix); + } +- ++#endif + gboolean + bg_pictures_source_add (BgPicturesSource *bg_source, + const char *uri, +@@ -805,7 +814,7 @@ monitor_path (BgPicturesSource *self, + + return monitor; + } +- ++#ifdef WITH_GOA + static void + media_found_cb (BgPicturesSource *self, GrlMedia *media) + { +@@ -817,7 +826,7 @@ media_found_cb (BgPicturesSource *self, GrlMedia *media) + g_object_set_data_full (G_OBJECT (file), "grl-media", g_object_ref (media), g_object_unref); + add_single_file_from_media (self, file, media); + } +- ++#endif + static void + bg_pictures_source_init (BgPicturesSource *self) + { +@@ -838,10 +847,11 @@ bg_pictures_source_init (BgPicturesSource *self) + + cache_path = bg_pictures_source_get_cache_path (); + self->cache_dir_monitor = monitor_path (self, cache_path); +- ++#ifdef WITH_GOA + self->grl_miner = cc_background_grilo_miner_new (); + g_signal_connect_swapped (self->grl_miner, "media-found", G_CALLBACK (media_found_cb), self); + cc_background_grilo_miner_start (self->grl_miner); ++#endif + } + + BgPicturesSource * +diff --git a/panels/background/meson.build b/panels/background/meson.build +index 5a2efc0..6d4a394 100644 +--- a/panels/background/meson.build ++++ b/panels/background/meson.build +@@ -34,9 +34,11 @@ install_data( + + common_sources = [] + ++staging = get_option('staging_dir') ++ + enums = 'gdesktop-enums-types' + enums_header = files( +- get_option('oe_sysroot') + gsettings_desktop_dep.get_pkgconfig_variable('prefix') + '/include/gsettings-desktop-schemas/gdesktop-enums.h', ++ staging + gsettings_desktop_dep.get_pkgconfig_variable('prefix') + '/include/gsettings-desktop-schemas/gdesktop-enums.h', + 'cc-background-item.h' + ) + +@@ -81,22 +83,26 @@ sources = common_sources + files( + 'bg-source.c', + 'bg-wallpapers-source.c', + 'cc-background-chooser.c', +- 'cc-background-grilo-miner.c', + 'cc-background-item.c', + 'cc-background-panel.c', + 'cc-background-preview.c', + 'cc-background-xml.c', + ) + ++if enable_goa ++ sources += files('cc-background-grilo-miner.c') ++endif ++ + deps = common_deps + [ + gdk_pixbuf_dep, + gnome_desktop_dep, +- goa_dep, + libxml_dep, + dependency('cairo-gobject'), +- dependency('grilo-0.3', version: '>= 0.3.0') + ] + ++if enable_goa ++ sources += files('cc-background-grilo-miner.c') ++endif + cflags += [ + '-DDATADIR="@0@"'.format(control_center_datadir), + '-DGNOME_DESKTOP_USE_UNSTABLE_API' +diff --git a/panels/meson.build b/panels/meson.build +index 2f4fdc5..48bffdf 100644 +--- a/panels/meson.build ++++ b/panels/meson.build +@@ -1,12 +1,10 @@ + subdir('common') + + panels = [ +- 'applications', + 'background', + 'camera', + 'color', + 'datetime', +- 'default-apps', + 'diagnostics', + 'display', + 'info-overview', +@@ -16,19 +14,30 @@ panels = [ + 'microphone', + 'mouse', + 'notifications', +- 'online-accounts', + 'power', +- 'printers', + 'region', +- 'removable-media', + 'search', +- 'sharing', + 'sound', + 'universal-access', + 'usage', +- 'user-accounts' + ] + ++if enable_goa ++ panels += ['online-accounts'] ++endif ++ ++if enable_cups ++ panels += ['printers'] ++endif ++ ++if enable_user_accounts ++ panels += ['user-accounts'] ++endif ++ ++if not enable_citadel ++ panel_names += ['applications', 'default-apps', 'removable-media', 'sharing'] ++endif ++ + if host_is_linux + panels += ['network'] + endif +diff --git a/shell/cc-panel-list.c b/shell/cc-panel-list.c +index 2578590..28251a9 100644 +--- a/shell/cc-panel-list.c ++++ b/shell/cc-panel-list.c +@@ -392,11 +392,16 @@ static const gchar * const panel_order[] = { + "background", + "notifications", + "search", ++#ifndef CITADEL + "applications", ++#endif + "privacy", ++#ifndef WITH_GOA + "online-accounts", ++#endif ++#ifndef CITADEL + "sharing", +- ++#endif + /* Privacy page */ + "location", + "camera", +@@ -412,16 +417,24 @@ static const gchar * const panel_order[] = { + "display", + "mouse", + "keyboard", ++#ifndef WITH_CUPS + "printers", ++#endif ++#ifndef CITADEL + "removable-media", ++#endif + "wacom", + "color", + + /* Details page */ + "region", + "universal-access", ++#ifndef WITH_USER_ACCOUNTS + "user-accounts", ++#endif ++#ifndef CITADEL + "default-apps", ++#endif + "reset-settings", + "datetime", + "info-overview", +diff --git a/shell/cc-panel-loader.c b/shell/cc-panel-loader.c +index f203843..652afe3 100644 +--- a/shell/cc-panel-loader.c ++++ b/shell/cc-panel-loader.c +@@ -31,14 +31,18 @@ + #ifndef CC_PANEL_LOADER_NO_GTYPES + + /* Extension points */ ++#ifndef CITADEL + extern GType cc_applications_panel_get_type (void); ++#endif + extern GType cc_background_panel_get_type (void); + #ifdef BUILD_BLUETOOTH + extern GType cc_bluetooth_panel_get_type (void); + #endif /* BUILD_BLUETOOTH */ + extern GType cc_color_panel_get_type (void); + extern GType cc_date_time_panel_get_type (void); ++#ifndef CITADEL + extern GType cc_default_apps_panel_get_type (void); ++#endif + extern GType cc_display_panel_get_type (void); + extern GType cc_info_overview_panel_get_type (void); + extern GType cc_keyboard_panel_get_type (void); +@@ -48,19 +52,29 @@ extern GType cc_network_panel_get_type (void); + extern GType cc_wifi_panel_get_type (void); + #endif /* BUILD_NETWORK */ + extern GType cc_notifications_panel_get_type (void); ++#ifdef WITH_GOA + extern GType cc_goa_panel_get_type (void); ++#endif + extern GType cc_power_panel_get_type (void); ++#ifdef WITH_CUPS + extern GType cc_printers_panel_get_type (void); ++#endif + extern GType cc_region_panel_get_type (void); ++#ifndef CITADEL + extern GType cc_removable_media_panel_get_type (void); ++#endif + extern GType cc_search_panel_get_type (void); ++#ifndef CITADEL + extern GType cc_sharing_panel_get_type (void); ++#endif + extern GType cc_sound_panel_get_type (void); + #ifdef BUILD_THUNDERBOLT + extern GType cc_bolt_panel_get_type (void); + #endif /* BUILD_THUNDERBOLT */ + extern GType cc_ua_panel_get_type (void); ++#ifdef WITH_USER_ACCOUNTS + extern GType cc_user_panel_get_type (void); ++#endif + #ifdef BUILD_WACOM + extern GType cc_wacom_panel_get_type (void); + #endif /* BUILD_WACOM */ +@@ -90,7 +104,9 @@ extern void cc_wacom_panel_static_init_func (void); + + static CcPanelLoaderVtable default_panels[] = + { ++#ifndef CITADEL + PANEL_TYPE("applications", cc_applications_panel_get_type, NULL), ++#endif + PANEL_TYPE("background", cc_background_panel_get_type, NULL), + #ifdef BUILD_BLUETOOTH + PANEL_TYPE("bluetooth", cc_bluetooth_panel_get_type, NULL), +@@ -98,7 +114,9 @@ static CcPanelLoaderVtable default_panels[] = + PANEL_TYPE("camera", cc_camera_panel_get_type, NULL), + PANEL_TYPE("color", cc_color_panel_get_type, NULL), + PANEL_TYPE("datetime", cc_date_time_panel_get_type, NULL), ++#ifndef CITADEL + PANEL_TYPE("default-apps", cc_default_apps_panel_get_type, NULL), ++#endif + PANEL_TYPE("diagnostics", cc_diagnostics_panel_get_type, cc_diagnostics_panel_static_init_func), + PANEL_TYPE("display", cc_display_panel_get_type, NULL), + PANEL_TYPE("info-overview", cc_info_overview_panel_get_type, NULL), +@@ -112,20 +130,30 @@ static CcPanelLoaderVtable default_panels[] = + PANEL_TYPE("wifi", cc_wifi_panel_get_type, cc_wifi_panel_static_init_func), + #endif + PANEL_TYPE("notifications", cc_notifications_panel_get_type, NULL), ++#ifdef WITH_GOA + PANEL_TYPE("online-accounts", cc_goa_panel_get_type, NULL), ++#endif + PANEL_TYPE("power", cc_power_panel_get_type, NULL), ++#ifdef WITH_CUPS + PANEL_TYPE("printers", cc_printers_panel_get_type, NULL), ++#endif + PANEL_TYPE("region", cc_region_panel_get_type, NULL), ++#ifndef CITADEL + PANEL_TYPE("removable-media", cc_removable_media_panel_get_type, NULL), ++#endif + PANEL_TYPE("search", cc_search_panel_get_type, NULL), ++#ifndef CITADEL + PANEL_TYPE("sharing", cc_sharing_panel_get_type, NULL), ++#endif + PANEL_TYPE("sound", cc_sound_panel_get_type, NULL), + #ifdef BUILD_THUNDERBOLT + PANEL_TYPE("thunderbolt", cc_bolt_panel_get_type, NULL), + #endif + PANEL_TYPE("universal-access", cc_ua_panel_get_type, NULL), + PANEL_TYPE("usage", cc_usage_panel_get_type, NULL), ++#ifdef WITH_USER_ACCOUNTS + PANEL_TYPE("user-accounts", cc_user_panel_get_type, NULL), ++#endif + #ifdef BUILD_WACOM + PANEL_TYPE("wacom", cc_wacom_panel_get_type, cc_wacom_panel_static_init_func), + #endif +diff --git a/tests/meson.build b/tests/meson.build +index d4fe361..01f7c92 100644 +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -6,5 +6,4 @@ endif + + subdir('interactive-panels') + +-subdir('printers') + subdir('info') diff --git a/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Remove-unneeded-panels.patch b/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Remove-unneeded-panels.old similarity index 100% rename from meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Remove-unneeded-panels.patch rename to meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center/0001-Remove-unneeded-panels.old diff --git a/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_3.32.0.1.bb b/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_3.32.0.1.bb deleted file mode 100644 index 07963cf..0000000 --- a/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_3.32.0.1.bb +++ /dev/null @@ -1,51 +0,0 @@ -SUMMARY = "GNOME desktop configuration UI" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=75859989545e37968a99b631ef42722e" - -SRC_URI[archive.md5sum] = "31728ca3e3dc8d2e3a6cbdfd987b7901" -SRC_URI[archive.sha256sum] = "86795715bf439aafb5b74a42065ac1d86cac53075b1cc8044bc27a964e15c012" - -GNOMEBASEBUILDCLASS = "meson" -inherit gnomebase gettext - - -DEPENDS = "pulseaudio colord-gtk networkmanager ibus colord gnome-desktop gnome-settings-daemon polkit libcanberra gdk-pixbuf fontconfig gtk+3 glib-2.0 intltool-native upower libpwquality cairo libxml2 libgudev libsoup-2.4 libxi libwacom libx11 libgtop gnome-common-native autoconf-archive-native wayland accountsservice modemmanager network-manager-applet gnome-bluetooth clutter-1.0 clutter-gtk gsettings-desktop-schemas glib-2.0-native libxml2-native udisks2 gsound" - -# -# Extra options have been added to meson_options.txt to make some components of the control -# center optional. One reason is that these components drag in heavy dependencies, and some -# of these dependencies have not been packaged and tested yet. -# -# Gnome Online Accounts support -# -# EXTRA_OEMESON += "-Donline_accounts=true" -# DEPENDS += "grilo gnome-online-accounts webkitgtk rest" -# -# Printer Panel -# -# EXTRA_OEMESON += "-Dcups=true" -# DEPENDS += "cups samba" (only smbclient needed from samba) -# -# User Accounts Panel -# -# EXTRA_OEMESON += "-Duser_accounts=true" -# DEPENDS += "accountsservice krb5" -# Citadel -# -# This option disables some things in gnome-control-center such as certain -# panels that are not used in Citadel, defaults to true in meson_options. -# To re-enable these things, set the option to false: -# -# EXTRA_OEMESON += "-Dcitadel=false" -SRC_URI += " file://0001-Make-GOA-CUPS-and-User-Accounts-optional.patch \ - file://0001-Remove-unneeded-panels.patch" - -FILES_${PN} += "\ - ${datadir}/bash-completion \ - ${datadir}/gettext \ - ${datadir}/dbus-1 \ - ${datadir}/gnome-shell/search-providers \ - ${datadir}/metainfo \ -" - -EXTRA_OEMESON = "--buildtype=release -Dcheese=false -Ddocumentation=false -Dstaging_dir=${STAGING_DIR_TARGET}" diff --git a/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_3.36.3.bb b/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_3.36.3.bb new file mode 100644 index 0000000..f7341d1 --- /dev/null +++ b/meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_3.36.3.bb @@ -0,0 +1,77 @@ +SUMMARY = "GNOME Settings" +DESCRIPTION = "GNOME Settings is GNOME's main interface for configuration of various aspects of your desktop" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=75859989545e37968a99b631ef42722e" + +GNOMEBASEBUILDCLASS = "meson" + +inherit gnomebase gsettings gettext vala upstream-version-is-even bash-completion distro_features_check + +DEPENDS = " \ + gdk-pixbuf-native \ + colord-gtk \ + udisks2 \ + upower \ + polkit \ + pulseaudio \ + accountsservice \ + gsettings-desktop-schemas \ + gnome-settings-daemon \ + gnome-desktop \ + networkmanager \ + network-manager-applet \ + gnome-bluetooth \ + libgtop \ + libgudev \ + gsound \ + libpwquality \ + ibus \ +" + +REQUIRED_DISTRO_FEATURES += " pulseaudio systemd x11" +SRC_URI += " file://0001-Add-options-for-Citadel-and-disabling-GOA-CUPS.patch" +SRC_URI[archive.md5sum] = "fd99a8df0cc656e971415f2a1b310019" +SRC_URI[archive.sha256sum] = "bc174d970dbeca3ee19c26019de31e9edf78dc9c4abde16e763566ee38c3691c" + +#SRC_URI += " file://0001-Remove-unneeded-panels-make-GOA-CUPS-optional.patch" + +# +# Extra options have been added to meson_options.txt to make some components of the control +# center optional. One reason is that these components drag in heavy dependencies, and some +# of these dependencies have not been packaged and tested yet. +# +# Gnome Online Accounts support +# +# EXTRA_OEMESON += "-Donline_accounts=true" +# DEPENDS += "grilo gnome-online-accounts webkitgtk rest" +# +# Printer Panel +# +# EXTRA_OEMESON += "-Dcups=true" +# DEPENDS += "cups samba" (only smbclient needed from samba) +# +# User Accounts Panel +# +# EXTRA_OEMESON += "-Duser_accounts=true" +# DEPENDS += "accountsservice krb5" +# Citadel +# +# This option disables some things in gnome-control-center such as certain +# panels that are not used in Citadel, defaults to true in meson_options. +# To re-enable these things, set the option to false: +# +# EXTRA_OEMESON += "-Dcitadel=false" +#SRC_URI += " file://0001-Make-GOA-CUPS-and-User-Accounts-optional.patch \ +# file://0001-Remove-unneeded-panels.patch" + +FILES_${PN} += " \ + ${datadir}/dbus-1 \ + ${datadir}/gnome-shell \ + ${datadir}/metainfo \ +" + +FILES_${PN}-dev += "${datadir}/gettext" + +RDEPENDS_${PN} += "gsettings-desktop-schemas" +EXTRA_OEMESON = "--buildtype=release -Dcheese=false -Ddocumentation=false -Dstaging_dir=${STAGING_DIR_TARGET}" + diff --git a/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_3.32.0.bb b/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_3.36.2.bb similarity index 75% rename from meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_3.32.0.bb rename to meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_3.36.2.bb index 53e72d0..2e4a902 100644 --- a/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_3.32.0.bb +++ b/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_3.36.2.bb @@ -5,13 +5,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2" GNOMEBASEBUILDCLASS = "meson" -inherit gnome pkgconfig upstream-version-is-even gobject-introspection +inherit gnomebase gtk-icon-cache gconf mime pkgconfig upstream-version-is-even gobject-introspection WARN_QA_remove = "unknown-configure-option" -SRC_URI[archive.md5sum] = "e423ed6d648c6c4f9798fa9cd9ea8d99" -SRC_URI[archive.sha256sum] = "a6393dc5fc29fc0652ac84c73b3da205d0b0168128c4cf6d27797a08f3d07b54" - +SRC_URI[archive.md5sum] = "9fa17a6e2eacde3f9dd0df6be10091b2" +SRC_URI[archive.sha256sum] = "38f994dcb1e1ae093d1c929c7acc4f88e39111e43b5fdc13125b0f6e2311c789" DEPENDS += "itstool-native gsettings-desktop-schemas gconf virtual/libx11 gtk+3 glib-2.0 startup-notification xkeyboard-config iso-codes udev libseccomp" diff --git a/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_3.31.91.bb b/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_3.31.91.bb deleted file mode 100644 index 74ea1ef..0000000 --- a/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_3.31.91.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "GNOME management of secrets, passwords, keys, and certificates" -HOMEPAGE = "https://wiki.gnome.org/Projects/GnomeKeyring" - -LICENSE = "GPLv2 & LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" - -inherit gettext gnome - -SRC_URI[archive.md5sum] = "8b6c33409fc62f1431647c74c34a9c6b" -SRC_URI[archive.sha256sum] = "a4d90afc4dabe77c6ff8b606588ad782621df8efeb114cbdc619dc4e38a65eba" - -DEPENDS = "gcr intltool-native glib-2.0-native libpam" -RDEPENDS_${PN} = "gcr libpam" -FILES_${PN} += "\ - ${libdir}/pkcs11 \ - ${libdir}/security \ - ${datadir}/p11-kit \ - ${datadir}/dbus-1 \ -" - -EXTRA_OECONF = "--disable-doc --disable-ssh-agent" - diff --git a/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_3.36.0.bb b/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_3.36.0.bb new file mode 100644 index 0000000..908add7 --- /dev/null +++ b/meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_3.36.0.bb @@ -0,0 +1,45 @@ +SUMMARY = "Password and keyring managing daemon" +HOMEPAGE = "http://www.gnome.org/" +BUGTRACKER = "https://bugzilla.gnome.org/" +SECTION = "x11/gnome" + +LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+" +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ +" + +DEPENDS = " \ + glib-2.0-native \ + gtk+3 \ + gcr \ + libgcrypt \ +" + +inherit gnomebase gsettings distro_features_check remove-libtool gettext upstream-version-is-even + +REQUIRED_DISTRO_FEATURES = "x11" + +SRC_URI[archive.md5sum] = "38f0732845a510a8dff4f154c3406f65" +SRC_URI[archive.sha256sum] = "a264b57a8d1a71fdf0d66e8cd6033d013fb828be279c35766545eb9bb3734f87" + + +EXTRA_OECONF = " \ + --disable-doc \ + --disable-ssh-agent \ +" + + +FILES_${PN} += " \ + ${datadir}/dbus-1/services \ + ${datadir}/p11-kit \ + ${base_libdir}/security/*${SOLIBSDEV} \ + ${libdir}/pkcs11/gnome-keyring-pkcs11.so \ +" + +# fix | gnome-keyring-daemon: insufficient process capabilities, unsecure memory might get used +# This does not make it through pseudo so perform on-target - sigh +#pkg_postinst_ontarget_${PN} () { +# setcap cap_ipc_lock+ep `which gnome-keyring-daemon` +#} +#RDEPENDS_${PN} += "libcap-bin" diff --git a/meta-gnome/recipes-gnome/gnome-session/gnome-session/0001-Disable-sharing-USB-protection-add-systemd-to-.deskt.patch b/meta-gnome/recipes-gnome/gnome-session/gnome-session/0001-Disable-sharing-USB-protection-add-systemd-to-.deskt.patch new file mode 100644 index 0000000..cf222d8 --- /dev/null +++ b/meta-gnome/recipes-gnome/gnome-session/gnome-session/0001-Disable-sharing-USB-protection-add-systemd-to-.deskt.patch @@ -0,0 +1,62 @@ +From d85a2f316b8bba505d24173484e43bd5abededa0 Mon Sep 17 00:00:00 2001 +From: David McKinney +Date: Fri, 3 Jul 2020 12:09:35 +0000 +Subject: [PATCH] Disable sharing/USB protection, add --systemd to .desktops + +--- + data/gnome-wayland.desktop.in.in | 4 +++- + data/gnome-xorg.desktop.in.in | 2 +- + data/gnome.desktop.in.in | 2 +- + data/gnome.session.desktop.in.in | 2 +- + 4 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/data/gnome-wayland.desktop.in.in b/data/gnome-wayland.desktop.in.in +index 516c211..14b5f5a 100644 +--- a/data/gnome-wayland.desktop.in.in ++++ b/data/gnome-wayland.desktop.in.in +@@ -1,7 +1,9 @@ + [Desktop Entry] + Name=GNOME + Comment=This session logs you into GNOME +-Exec=@bindir@/gnome-session ++Exec=@bindir@/gnome-session --systemd --session=gnome + TryExec=@bindir@/gnome-session + Type=Application + DesktopNames=GNOME ++X-GDM-SessionRegisters=true ++ +diff --git a/data/gnome-xorg.desktop.in.in b/data/gnome-xorg.desktop.in.in +index 9a76fac..40ec660 100644 +--- a/data/gnome-xorg.desktop.in.in ++++ b/data/gnome-xorg.desktop.in.in +@@ -1,7 +1,7 @@ + [Desktop Entry] + Name=GNOME on Xorg + Comment=This session logs you into GNOME +-Exec=@bindir@/gnome-session ++Exec=@bindir@/gnome-session --systemd --session=gnome + TryExec=@bindir@/gnome-session + Type=Application + DesktopNames=GNOME +diff --git a/data/gnome.desktop.in.in b/data/gnome.desktop.in.in +index 7eec1de..d83655e 100644 +--- a/data/gnome.desktop.in.in ++++ b/data/gnome.desktop.in.in +@@ -1,7 +1,7 @@ + [Desktop Entry] + Name=GNOME + Comment=This session logs you into GNOME +-Exec=@bindir@/gnome-session ++Exec=@bindir@/gnome-session --systemd --session=gnome + TryExec=@bindir@/gnome-session + Type=Application + DesktopNames=GNOME +diff --git a/data/gnome.session.desktop.in.in b/data/gnome.session.desktop.in.in +index 6c70f54..5841b97 100644 +--- a/data/gnome.session.desktop.in.in ++++ b/data/gnome.session.desktop.in.in +@@ -1,3 +1,3 @@ + [GNOME Session] + Name=GNOME +-RequiredComponents=org.gnome.Shell;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.UsbProtection;org.gnome.SettingsDaemon.Wacom;org.gnome.SettingsDaemon.XSettings; ++RequiredComponents=org.gnome.Shell;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;org.gnome.SettingsDaemon.XSettings; diff --git a/meta-gnome/recipes-gnome/gnome-session/gnome-session_3.31.4.bb b/meta-gnome/recipes-gnome/gnome-session/gnome-session_3.31.4.bb deleted file mode 100644 index 41d4a9c..0000000 --- a/meta-gnome/recipes-gnome/gnome-session/gnome-session_3.31.4.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "GNOME session management" -HOMEPAGE = "https://wiki.gnome.org/Projects/SessionManagement" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -GNOMEBASEBUILDCLASS = "meson" -inherit gnomebase meson - -WARN_QA_remove = "unknown-configure-option" - -SRC_URI += " file://0001-Remove-org.gnome.SettingsDaemon.Sharing-from-require.patch" -SRC_URI[archive.md5sum] = "f2d548a79732f0db9f6148de908c68ce" -SRC_URI[archive.sha256sum] = "5279776b9f8b74e348507fedb062ef303172fbb1f3a16979a8cb9321c396878e" - -DEPENDS = "glib-2.0-native intltool-native xmlto-native glib-2.0 gnome-desktop json-glib" -RDEPENDS_${PN} = "gnome-settings-daemon" - -FILES_${PN} += "\ - ${datadir}/xsessions \ - ${datadir}/glib-2.0/schemas \ - ${datadir}/GConf \ - ${datadir}/wayland-sessions \ -" -EXTRA_OEMESON = "-Denable-docbook=false -Denable-man=false" - diff --git a/meta-gnome/recipes-gnome/gnome-session/gnome-session_3.36.0.bb b/meta-gnome/recipes-gnome/gnome-session/gnome-session_3.36.0.bb new file mode 100644 index 0000000..e722da9 --- /dev/null +++ b/meta-gnome/recipes-gnome/gnome-session/gnome-session_3.36.0.bb @@ -0,0 +1,38 @@ +SUMMARY = "GNOME session" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = " \ + glib-2.0-native \ + libxslt-native \ + xmlto-native \ + xtrans \ + libice \ + libsm \ + virtual/libx11 \ + gtk+3 \ + gnome-desktop \ + gsettings-desktop-schemas \ + json-glib \ +" + +GNOMEBASEBUILDCLASS = "meson" + +inherit gnomebase gettext gsettings upstream-version-is-even distro_features_check + +REQUIRED_DISTRO_FEATURES = "x11 systemd pam gobject-introspection-data" + +SRC_URI += " file://0001-Disable-sharing-USB-protection-add-systemd-to-.deskt.patch" +SRC_URI[archive.md5sum] = "cd23e30c4991ca1f477020c67ea3a540" +SRC_URI[archive.sha256sum] = "d54b38b818c812f64b82cc6a1279e3ca5a6e391ee662793322a38cab5670bb7a" + +EXTRA_OEMESON += "-Dsystemd=true -Dsystemd_session=enable -Dsystemd_journal=true -Ddocbook=false -Dman=false" +FILES_${PN} += " \ + ${bindir}/gnome-session \ + ${libexecdir}/gnome-session-ctl \ + ${datadir}/xsessions \ + ${datadir}/wayland-sessions \ + ${systemd_user_unitdir} \ +" + +RDEPENDS_${PN} += "gnome-shell gnome-settings-daemon gsettings-desktop-schemas" diff --git a/meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon/0001-Disable-gsd-sharing-plugin.patch b/meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon/0001-Disable-gsd-sharing-plugin.patch index 7309e57..0111797 100644 --- a/meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon/0001-Disable-gsd-sharing-plugin.patch +++ b/meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon/0001-Disable-gsd-sharing-plugin.patch @@ -1,4 +1,4 @@ -From d7bc4ecd5731378dea34a1ea9c7f8819a9a3cd12 Mon Sep 17 00:00:00 2001 +From 5b9ba7cbf744ed5e87041c894d3b3f967215b7be Mon Sep 17 00:00:00 2001 From: David McKinney Date: Mon, 22 Apr 2019 15:14:19 +0000 Subject: [PATCH] Disable gsd-sharing plugin @@ -8,14 +8,14 @@ Subject: [PATCH] Disable gsd-sharing plugin 1 file changed, 1 deletion(-) diff --git a/plugins/meson.build b/plugins/meson.build -index 3db69da..f35ce03 100644 +index ce7d86f..3246456 100644 --- a/plugins/meson.build +++ b/plugins/meson.build -@@ -10,7 +10,6 @@ enabled_plugins = [ +@@ -8,7 +8,6 @@ enabled_plugins = [ + ['keyboard', 'Keyboard'], ['media-keys', 'MediaKeys'], - ['mouse', 'Mouse'], ['screensaver-proxy', 'ScreensaverProxy'], - ['sharing', 'Sharing'], ['sound', 'Sound'], + ['usb-protection', 'UsbProtection'], ['xsettings', 'XSettings'] - ] diff --git a/meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon/0001-Disable-power-tests-and-USB-protection.patch b/meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon/0001-Disable-power-tests-and-USB-protection.patch new file mode 100644 index 0000000..b448a15 --- /dev/null +++ b/meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon/0001-Disable-power-tests-and-USB-protection.patch @@ -0,0 +1,77 @@ +From a86f5783018fb551701ff0f46dc67adec493a68b Mon Sep 17 00:00:00 2001 +From: David McKinney +Date: Thu, 2 Jul 2020 15:38:19 +0000 +Subject: [PATCH] Disable power tests and USB protection + +--- + plugins/meson.build | 2 +- + plugins/power/meson.build | 46 --------------------------------------- + 2 files changed, 1 insertion(+), 47 deletions(-) + +diff --git a/plugins/meson.build b/plugins/meson.build +index 3246456..d38fc18 100644 +--- a/plugins/meson.build ++++ b/plugins/meson.build +@@ -9,7 +9,7 @@ enabled_plugins = [ + ['media-keys', 'MediaKeys'], + ['screensaver-proxy', 'ScreensaverProxy'], + ['sound', 'Sound'], +- ['usb-protection', 'UsbProtection'], ++# ['usb-protection', 'UsbProtection'], + ['xsettings', 'XSettings'] + ] + +diff --git a/plugins/power/meson.build b/plugins/power/meson.build +index 69e619f..801c011 100644 +--- a/plugins/power/meson.build ++++ b/plugins/power/meson.build +@@ -102,49 +102,3 @@ if host_is_linux + ) + endif + +-output = 'gsdpowerconstants.py' +- +-gsdpowerconstants_py = custom_target( +- output, +- input: 'gsd-power-constants.h', +- output: output, +- build_by_default: true, +- command: [join_paths(meson.current_source_dir(), 'gsd-power-constants-update.pl'), '@INPUT@', '@OUTPUT@'] +-) +- +-output = 'gsdpowerenums.py' +- +-gsdpowerenums_py = custom_target( +- output, +- output: output, +- capture: true, +- build_by_default: true, +- command: [gsd_power_enums_update] +-) +- +-test_py = find_program('test.py') +- +-envs = environment() +-#envs.prepend('G_DEBUG', 'fatal-warnings') +-envs.set('BUILDDIR', meson.current_build_dir()) +-envs.set('TOP_BUILDDIR', meson.build_root()) +-envs.set('LD_PRELOAD', 'libumockdev-preload.so.0') +-envs.set('NO_AT_BRIDGE', '1') +-envs.set('HAVE_SYSFS_BACKLIGHT', host_is_linux ? '1' : '0') +- +-if get_option('b_sanitize').split(',').contains('address') +- # libasan needs to be loaded first; so we need to explicitly preload it +- envs.set('POWER_LD_PRELOAD', 'libasan.so.5') +-endif +- +-foreach i : [ 1, 2, 3, 4, 5, 6, 7, 8 ] +- test( +- 'test-power @0@/8'.format(i), +- test_py, +- args: [ 'PowerPluginTest@0@'.format(i) ], +- env: envs, +- # The first set of tests takes very long because of SCREENSAVER_TIMEOUT_BLANK +- timeout: i == 1 ? 180 : 120 +- ) +-endforeach +- diff --git a/meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon_3.32.0.bb b/meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon_3.36.0.bb similarity index 59% rename from meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon_3.32.0.bb rename to meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon_3.36.0.bb index aecd559..5918701 100644 --- a/meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon_3.32.0.bb +++ b/meta-gnome/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon_3.36.0.bb @@ -8,13 +8,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ DEPENDS = "pango gnome-desktop xorgproto libnotify fontconfig libgudev libxext wayland glib-2.0 libxi libx11 libwacom libxtst gsettings-desktop-schemas intltool-native gtk+3 polkit upower lcms glib-2.0-native wayland colord geoclue libcanberra geocode-glib libgweather pulseaudio networkmanager" FILES_${PN} += "\ + ${systemd_user_unitdir} \ ${libdir}/gnome-settings-daemon-3.0 \ " FILES_${PN}-staticdev += "${libdir}/gnome-settings-daemon-3.0/libgsd.a" -SRC_URI[archive.md5sum] = "d1f55fb2059a2c52b1ce9af71f949961" -SRC_URI[archive.sha256sum] = "c3b8035aced4971ac49d3f3a5faa301a0825607e73248666a5f8078793d58397" +SRC_URI[archive.md5sum] = "e28f11174ca0bafc56fb7a766591d786" +SRC_URI[archive.sha256sum] = "fa2ff032ec6c59e4c4ca66c61a29f4ba4b9820496625fc343bfa12291cfaad49" GNOMEBASEBUILDCLASS = "meson" @@ -22,8 +23,16 @@ inherit gnomebase gobject-introspection gettext meson-exe-wrapper WARN_QA_remove = "unknown-configure-option" -SRC_URI += " file://0001-Disable-gsd-sharing-plugin.patch \ - file://0001-don-t-run-power-module-tests.patch" +SRC_URI += "file://0001-Disable-gsd-sharing-plugin.patch \ + file://0001-Disable-power-tests-and-USB-protection.patch \ + " +# allow cross build mixed with build of native tools +do_write_config_append() { + cat >${WORKDIR}/meson.native < +Date: Wed, 8 Jul 2020 14:07:06 +0000 +Subject: [PATCH] Remove calendar server, fix build + +--- + js/dbusServices/meson.build | 2 +- + meson.build | 10 +++++----- + src/meson.build | 2 +- + subprojects/extensions-app/js/meson.build | 2 +- + subprojects/extensions-app/meson.build | 2 +- + 5 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/js/dbusServices/meson.build b/js/dbusServices/meson.build +index c749f45..8669b0b 100644 +--- a/js/dbusServices/meson.build ++++ b/js/dbusServices/meson.build +@@ -20,7 +20,7 @@ foreach service, dir : dbus_services + + serviceconf = configuration_data() + serviceconf.set('service', service) +- serviceconf.set('gjs', gjs.path()) ++ serviceconf.set('gjs', gjs) + serviceconf.set('pkgdatadir', pkgdatadir) + + configure_file( +diff --git a/meson.build b/meson.build +index 6868d8e..caebf94 100644 +--- a/meson.build ++++ b/meson.build +@@ -18,8 +18,8 @@ cogl_pc = 'mutter-cogl-' + mutter_api_version + cogl_pango_pc = 'mutter-cogl-pango-' + mutter_api_version + libmutter_pc = 'libmutter-' + mutter_api_version + +-ecal_req = '>= 3.33.1' +-eds_req = '>= 3.17.2' ++#ecal_req = '>= 3.33.1' ++#eds_req = '>= 3.17.2' + gcr_req = '>= 3.7.5' + gio_req = '>= 2.56.0' + gi_req = '>= 1.49.1' +@@ -78,8 +78,8 @@ else + endif + + atk_bridge_dep = dependency('atk-bridge-2.0') +-ecal_dep = dependency('libecal-2.0', version: ecal_req) +-eds_dep = dependency('libedataserver-1.2', version: eds_req) ++#ecal_dep = dependency('libecal-2.0', version: ecal_req) ++#eds_dep = dependency('libedataserver-1.2', version: eds_req) + gcr_dep = dependency('gcr-base-3', version: gcr_req) + gdk_x11_dep = dependency('gdk-x11-3.0') + gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0') +@@ -139,7 +139,7 @@ endif + mutter_typelibdir = mutter_dep.get_pkgconfig_variable('typelibdir') + python = find_program('python3') + sassc = find_program('sassc') +-gjs = find_program('gjs') ++gjs = '/usr/bin/gjs' + + cc = meson.get_compiler('c') + +diff --git a/src/meson.build b/src/meson.build +index 46680d5..6769de7 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -1,7 +1,7 @@ + service_data = configuration_data() + service_data.set('libexecdir', libexecdir) + +-subdir('calendar-server') ++#subdir('calendar-server') + subdir('hotplug-sniffer') + subdir('st') + subdir('tray') +diff --git a/subprojects/extensions-app/js/meson.build b/subprojects/extensions-app/js/meson.build +index a378a7e..f2a37ba 100644 +--- a/subprojects/extensions-app/js/meson.build ++++ b/subprojects/extensions-app/js/meson.build +@@ -5,7 +5,7 @@ launcherconf.set('PACKAGE_VERSION', meson.project_version()) + launcherconf.set('prefix', prefix) + launcherconf.set('libdir', libdir) + launcherconf.set('pkgdatadir', pkgdatadir) +-launcherconf.set('gjs', gjs.path()) ++launcherconf.set('gjs', gjs) + + configure_file( + input: prgname + '.in', +diff --git a/subprojects/extensions-app/meson.build b/subprojects/extensions-app/meson.build +index 20f938f..a13ff5e 100644 +--- a/subprojects/extensions-app/meson.build ++++ b/subprojects/extensions-app/meson.build +@@ -35,7 +35,7 @@ localedir = join_paths(datadir, 'locale') + metainfodir = join_paths(datadir, 'metainfo') + servicedir = join_paths(datadir, 'dbus-1', 'services') + +-gjs = find_program('gjs') ++gjs = '/usr/bin/gjs' + appstream_util = find_program('appstream-util', required: false) + + subdir('data') diff --git a/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_3.32.1.bb b/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_3.32.1.bb deleted file mode 100644 index 2ca20b2..0000000 --- a/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_3.32.1.bb +++ /dev/null @@ -1,46 +0,0 @@ -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -GNOMEBASEBUILDCLASS = "meson" - -inherit gnomebase gobject-introspection gettext - -WARN_QA_remove = "unknown-configure-option" - -SRC_URI[archive.md5sum] = "059529c91a3d84e6542f662be47a657f" -SRC_URI[archive.sha256sum] = "0874ded4498e960b264baa54b6407a5a75dac54fc5b7cd60db91133e9c0260dd" - -SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \ - file://0001-Disabled-calendar-events-from-user-session.patch \ - file://0001-do-not-use-python-path-from-build-environment.patch \ - file://0001-do-not-build-calendar-server.patch \ - file://0001-Patch-gnome-shell-to-disable-logging-out.patch \ - " - -DEPENDS = "glib-2.0-native systemd libcanberra gtk+3 glib-2.0 libxml2 libcroco mutter libsoup-2.4 gsettings-desktop-schemas gcr atk polkit startup-notification libx11 gnome-bluetooth libsecret networkmanager gjs mozjs network-manager-applet pulseaudio libxml2-native paxctl-native ibus xmlto-native sassc-native" - -RDEPENDS_${PN} = "xserver-xorg-xwayland cantarell-fonts gnome-theme-adwaita gnome-theme-adwaita-dark gnome-control-center gnome-session dconf" - -FILES_${PN} += "\ - ${datadir}/dbus-1 \ - ${datadir}/xdg-desktop-portal \ - ${datadir}/gnome-control-center/keybindings \ - ${systemd_user_unitdir} \ -" - -PACKAGES =+ "${PN}-tools" -FILES_${PN}-tools += "\ - /usr/bin/gnome-shell-perf-tool \ - /usr/bin/gnome-shell-extension-tool \ -" - -do_configure_append () { - MUTTER_DIR="/usr/lib/mutter" - sed --in-place=.old1 "s;=${MUTTER_DIR};=${PKG_CONFIG_SYSROOT_DIR}${MUTTER_DIR};" ${B}/build.ninja -} - -do_install_append() { - paxctl -cm ${D}${bindir}/gnome-shell -} - -EXTRA_OEMESON += "-Dbrowser_plugin=false -Dman=false -Dsystemd=true -Dnetworkmanager=true" diff --git a/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_3.36.2.bb b/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_3.36.2.bb new file mode 100644 index 0000000..f594b9f --- /dev/null +++ b/meta-gnome/recipes-gnome/gnome-shell/gnome-shell_3.36.2.bb @@ -0,0 +1,64 @@ +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +GNOMEBASEBUILDCLASS = "meson" + +inherit gnomebase gsettings gettext gobject-introspection gobject-introspection-data distro_features_check bash-completion + +REQUIRED_DISTRO_FEATURES = "x11 systemd pam" + +WARN_QA_remove = "unknown-configure-option" + +SRC_URI[archive.md5sum] = "f0cd44e573a82531b4556afa624b1193" +SRC_URI[archive.sha256sum] = "3b129b2a1f1f1654a101098ea8b91a73a836aad7d166f52dd46b1c6037ec1753" + + +SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \ + file://0001-Disabled-calendar-events-from-user-session.patch \ + file://0001-do-not-use-python-path-from-build-environment.patch \ + file://0001-Remove-calendar-server-fix-build.patch \ + " + +DEPENDS = " \ + libxml2-native \ + sassc-native \ + gtk+3 \ + mutter \ + gcr \ + gjs \ + mozjs68 \ + network-manager-applet \ + gnome-autoar \ + polkit \ + libcroco \ + startup-notification \ + ibus \ + gsettings-desktop-schemas \ +" + +RDEPENDS_${PN} = "gsettings-desktop-schemas librsvg-gtk" + +FILES_${PN} += "\ + ${datadir}/dbus-1 \ + ${datadir}/xdg-desktop-portal \ + ${datadir}/gnome-control-center \ + ${datadir}/bash-completion/completions/gnome-extensions \ + ${systemd_user_unitdir} \ +" + +PACKAGES =+ "${PN}-tools" +FILES_${PN}-tools += "\ + /usr/bin/gnome-shell-perf-tool \ + /usr/bin/gnome-shell-extension-tool \ +" + +do_configure_append () { + MUTTER_DIR="/usr/lib/mutter" + sed --in-place=.old1 "s;=${MUTTER_DIR};=${PKG_CONFIG_SYSROOT_DIR}${MUTTER_DIR};" ${B}/build.ninja +} + +#do_install_append() { +# paxctl -cm ${D}${bindir}/gnome-shell +#} + +EXTRA_OEMESON += "-Dman=false -Dsystemd=true -Dnetworkmanager=true -Dextensions_app=false" diff --git a/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.32.0.bb b/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.36.2.bb similarity index 50% rename from meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.32.0.bb rename to meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.36.2.bb index e65d77a..779b259 100644 --- a/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.32.0.bb +++ b/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.36.2.bb @@ -3,13 +3,22 @@ HOMEPAGE = "https://wiki.gnome.org/Apps/Terminal" LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" -DEPENDS = "intltool-native dconf gconf glib-2.0 util-linux gsettings-desktop-schemas glib-2.0-native vte libpcre gtk+3 vala-native libxml2-native desktop-file-utils-native yelp-tools-native" +DEPENDS = " \ + glib-2.0-native \ + intltool-native \ + yelp-tools-native \ + desktop-file-utils-native \ + gtk+3 \ + gsettings-desktop-schemas \ + vte \ + dconf \ + libpcre2 \ +" -# python3native is needed to run itstool during build -inherit gettext gnome python3native +inherit gnomebase gsettings gettext upstream-version-is-even -SRC_URI[archive.md5sum] = "7f329d387bf047f6a4f742014aa5c813" -SRC_URI[archive.sha256sum] = "240742574974b694ad5c7643684838d28f3dff65be34e478edf92a36cc1495dc" +SRC_URI[archive.md5sum] = "08150cbf2e23dd4f60f959a6eca8ef0c" +SRC_URI[archive.sha256sum] = "41d1b6a3dc97c066e294acdb7f36931e81668638dcc92ffa25bca3ddebacdf46" EXTRA_OECONF = "--disable-search-provider --without-nautilus-extension" diff --git a/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-Fix-build-reproducibility.patch b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-Fix-build-reproducibility.patch new file mode 100644 index 0000000..9e1f79e --- /dev/null +++ b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-Fix-build-reproducibility.patch @@ -0,0 +1,50 @@ +From 59d2cbb54c012b25adeb965a94b6585d911a4539 Mon Sep 17 00:00:00 2001 +From: Joshua Watt +Date: Wed, 20 Nov 2019 09:03:47 -0600 +Subject: [PATCH] Fix build reproducibility + +ba744068 ("Make meson.override_find_program working on more complex use +cases") made the build no longer reproducible by encoding a build system +path into the output. This shouldn't be necessary anyway, since it +should be possible to add new paths to search for gir files by setting +the XDG_DATA_DIR environment variable. + +Closes #318 + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/192] +Signed-off-by: Joshua Watt +--- + girepository/girparser.c | 4 ---- + meson.build | 1 - + 2 files changed, 5 deletions(-) + +diff --git a/girepository/girparser.c b/girepository/girparser.c +index fb47e75c..53450baf 100644 +--- a/girepository/girparser.c ++++ b/girepository/girparser.c +@@ -309,10 +309,6 @@ locate_gir (GIrParser *parser, + if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) + return path; + g_free (path); +- path = g_build_filename (UNINSTALLED_GIR_DIR, girname, NULL); +- if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) +- return path; +- g_free (path); + return NULL; + } + +diff --git a/meson.build b/meson.build +index d6231c5f..2f248579 100644 +--- a/meson.build ++++ b/meson.build +@@ -90,7 +90,6 @@ endif + girdir = join_paths(gir_dir_prefix, 'gir-1.0') + config.set_quoted('GIR_DIR', girdir) + config.set_quoted('GOBJECT_INTROSPECTION_LIBDIR', join_paths(get_option('prefix'), get_option('libdir'))) +-config.set_quoted('UNINSTALLED_GIR_DIR', join_paths(meson.current_build_dir(), 'gir')) + + foreach type : ['char', 'short', 'int', 'long'] + size = cc.sizeof(type) +-- +2.23.0 + diff --git a/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-Port-cross-compilation-support-to-meson.patch b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-Port-cross-compilation-support-to-meson.patch new file mode 100644 index 0000000..639f9c8 --- /dev/null +++ b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-Port-cross-compilation-support-to-meson.patch @@ -0,0 +1,163 @@ +From 0417a1bb08745f2bf5310d20b342c2b3b9b212d3 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Thu, 15 Nov 2018 15:10:05 +0100 +Subject: [PATCH] Port cross-compilation support to meson + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin + +--- + gir/meson.build | 62 ++++++++++++++++++++++++++++++++++------------- + meson.build | 4 ++- + meson_options.txt | 20 +++++++++++++++ + 3 files changed, 68 insertions(+), 18 deletions(-) + +diff --git a/gir/meson.build b/gir/meson.build +index c312100..a028033 100644 +--- a/gir/meson.build ++++ b/gir/meson.build +@@ -41,16 +41,29 @@ gir_files = [ + typelibdir = join_paths(get_option('libdir'), 'girepository-1.0') + install_data(gir_files, install_dir: girdir) + +-scanner_command = [ +- python, +- girscanner, +- '--output=@OUTPUT@', +- '--no-libtool', +- '--quiet', +- '--reparse-validate', +- '--add-include-path', join_paths(meson.current_build_dir()), +- '--add-include-path', join_paths(meson.current_source_dir()), +-] ++if get_option('enable-host-gi') ++ scanner_command = [ ++ 'g-ir-scanner', ++ '--output=@OUTPUT@', ++ '--no-libtool', ++ '--quiet', ++ '--reparse-validate', ++ '--add-include-path', join_paths(meson.current_build_dir()), ++ '--add-include-path', join_paths(meson.current_source_dir()), ++ ] ++else ++ scanner_command = [ ++ python, ++ girscanner, ++ '--output=@OUTPUT@', ++ '--no-libtool', ++ '--quiet', ++ '--reparse-validate', ++ '--add-include-path', join_paths(meson.current_build_dir()), ++ '--add-include-path', join_paths(meson.current_source_dir()), ++ ] ++endif ++ + + dep_type = glib_dep.type_name() + if dep_type == 'internal' +@@ -63,6 +76,12 @@ if dep_type == 'internal' + '--extra-library=glib-2.0', '--extra-library=gobject-2.0'] + endif + ++if get_option('enable-gi-cross-wrapper') != '' ++ scanner_command += ['--use-binary-wrapper=' + get_option('enable-gi-cross-wrapper')] ++endif ++if get_option('enable-gi-ldd-wrapper') != '' ++ scanner_command += ['--use-ldd-wrapper=' + get_option('enable-gi-ldd-wrapper')] ++endif + # Take a glob and print to newlines + globber = ''' + from glob import glob +@@ -89,8 +108,8 @@ glib_command = scanner_command + [ + + if dep_type == 'pkgconfig' + glib_command += ['--external-library', '--pkg=glib-2.0'] +- glib_libdir = glib_dep.get_pkgconfig_variable('libdir') +- glib_incdir = join_paths(glib_dep.get_pkgconfig_variable('includedir'), 'glib-2.0') ++ glib_libdir = get_option('pkgconfig-sysroot-path') + glib_dep.get_pkgconfig_variable('libdir') ++ glib_incdir = get_option('pkgconfig-sysroot-path') + join_paths(glib_dep.get_pkgconfig_variable('includedir'), 'glib-2.0') + glib_libincdir = join_paths(glib_libdir, 'glib-2.0', 'include') + glib_files += join_paths(glib_incdir, 'gobject', 'glib-types.h') + glib_files += join_paths(glib_libincdir, 'glibconfig.h') +@@ -345,7 +364,7 @@ if giounix_dep.found() + dep_type = giounix_dep.type_name() + if dep_type == 'pkgconfig' + gio_command += ['--pkg=gio-unix-2.0'] +- giounix_includedir = join_paths(giounix_dep.get_pkgconfig_variable('includedir'), 'gio-unix-2.0') ++ giounix_includedir = get_option('pkgconfig-sysroot-path') + join_paths(giounix_dep.get_pkgconfig_variable('includedir'), 'gio-unix-2.0') + # Get the installed gio-unix header list + ret = run_command(python, '-c', globber.format(join_paths(giounix_includedir, 'gio', '*.h'))) + if ret.returncode() != 0 +@@ -428,15 +447,24 @@ gir_files += custom_target('gir-girepository', + ) + + typelibs = [] ++if get_option('enable-gi-cross-wrapper') != '' ++ gircompiler_command = [get_option('enable-gi-cross-wrapper'), gircompiler.full_path(), '-o', '@OUTPUT@', '@INPUT@', ++ '--includedir', meson.current_build_dir(), ++ '--includedir', meson.current_source_dir(), ++ ] ++else ++ gircompiler_command = [gircompiler, '-o', '@OUTPUT@', '@INPUT@', ++ '--includedir', meson.current_build_dir(), ++ '--includedir', meson.current_source_dir(), ++ ] ++endif ++ + foreach gir : gir_files + typelibs += custom_target('generate-typelib-@0@'.format(gir).underscorify(), + input: gir, + output: '@BASENAME@.typelib', + depends: [gobject_gir, ], +- command: [gircompiler, '-o', '@OUTPUT@', '@INPUT@', +- '--includedir', meson.current_build_dir(), +- '--includedir', meson.current_source_dir(), +- ], ++ command: gircompiler_command, + install: true, + install_dir: typelibdir, + ) +diff --git a/meson.build b/meson.build +index a5e825f..a28490a 100644 +--- a/meson.build ++++ b/meson.build +@@ -168,7 +168,9 @@ endif + subdir('girepository') + subdir('tools') + subdir('giscanner') +-subdir('gir') ++if get_option('enable-introspection-data') == true ++ subdir('gir') ++endif + subdir('examples') + subdir('docs') + subdir('tests') +diff --git a/meson_options.txt b/meson_options.txt +index 445a68a..a325511 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -25,3 +25,23 @@ option('python', type: 'string', value: 'python3', + option('gir_dir_prefix', type: 'string', + description: 'Intermediate prefix for gir installation under ${prefix}' + ) ++ ++option('enable-host-gi', type: 'boolean', value : false, ++ description: 'Use gobject introspection tools installed in the host system (useful when cross-compiling)' ++) ++ ++option('enable-gi-cross-wrapper', type: 'string', ++ description: 'Use a wrapper to run gicompiler and binaries produced by giscanner (useful when cross-compiling)' ++) ++ ++option('enable-gi-ldd-wrapper', type: 'string', ++ description: 'Use a ldd wrapper instead of system ldd command in giscanner (useful when cross-compiling)' ++) ++ ++option('enable-introspection-data', type: 'boolean', value : true, ++ description: 'Build introspection data (.gir and .typelib files) in addition to library and tools' ++) ++ ++option('pkgconfig-sysroot-path', type: 'string', ++ description: 'Specify a sysroot path to prepend to pkgconfig output (useful when cross-compiling)' ++) diff --git a/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch new file mode 100644 index 0000000..a15401a --- /dev/null +++ b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch @@ -0,0 +1,76 @@ +From 673623851fb70c0e43cf79cef67b3751432ebe72 Mon Sep 17 00:00:00 2001 +From: Sascha Silbe +Date: Fri, 8 Jun 2018 13:55:10 +0200 +Subject: [PATCH] Relocate the repository directory for native builds + +Instead of hard-coding GOBJECT_INTROSPECTION_LIBDIR when +gobject-introspection is built, use dladdr() to determine where +GOBJECT_INTROSPECTION_LIBDIR is and use that path to calculate the +repository directory. + +This fixes gobject-introspection-native accessing paths across build +directories (e.g. if the build directories use the same shared state +cache or sstate mirror). + +Upstream-Status: Inappropriate +Signed-off-by: Sascha Silbe + +--- + girepository/girepository.c | 15 +++++++++++++-- + girepository/meson.build | 2 +- + 2 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/girepository/girepository.c b/girepository/girepository.c +index ca5dc2b..7a4d17f 100644 +--- a/girepository/girepository.c ++++ b/girepository/girepository.c +@@ -21,6 +21,8 @@ + * Boston, MA 02111-1307, USA. + */ + ++#define _GNU_SOURCE ++ + #include "config.h" + + #include +@@ -34,6 +36,8 @@ + #include "gitypelib-internal.h" + #include "girepository-private.h" + ++#include ++ + /** + * SECTION:girepository + * @short_description: GObject Introspection repository manager +@@ -212,9 +216,16 @@ init_globals (void) + g_free (custom_dirs); + } + +- libdir = GOBJECT_INTROSPECTION_LIBDIR; ++ Dl_info gi_lib_info; + +- typelib_dir = g_build_filename (libdir, "girepository-1.0", NULL); ++ if (dladdr (g_irepository_get_default, &gi_lib_info)) { ++ char *libdir = g_path_get_dirname (gi_lib_info.dli_fname); ++ typelib_dir = g_build_filename (libdir, "girepository-1.0", NULL); ++ g_free (libdir); ++ } else { ++ libdir = GOBJECT_INTROSPECTION_LIBDIR; ++ typelib_dir = g_build_filename (libdir, "girepository-1.0", NULL); ++ } + + typelib_search_path = g_slist_prepend (typelib_search_path, typelib_dir); + +diff --git a/girepository/meson.build b/girepository/meson.build +index 1d7aed6..5637fb5 100644 +--- a/girepository/meson.build ++++ b/girepository/meson.build +@@ -44,7 +44,7 @@ girepo_internals_lib = static_library('girepository-internals', + ], + c_args: gi_hidden_visibility_cflags + custom_c_args, + include_directories : configinc, +- dependencies: [girepo_gthash_dep, libffi_dep], ++ dependencies: [girepo_gthash_dep, libffi_dep, cc.find_library('dl')], + ) + + girepo_internals_dep = declare_dependency( diff --git a/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch new file mode 100644 index 0000000..ddd9553 --- /dev/null +++ b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch @@ -0,0 +1,70 @@ +From 6653c28f0b76aad86e26c512b03efcec6d9d9e95 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Wed, 3 Jan 2018 17:02:01 +0200 +Subject: [PATCH] giscanner: add a --lib-dirs-envvar option + +By default LD_LIBRARY_PATH is set to the list of target library paths; +this breaks down in cross-compilation environment, as we need to run a +native emulation wrapper rather than the target binary itself. This patch +allows exporting those paths to a different environment variable +which can be picked up and used by the wrapper. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin + +--- + giscanner/ccompiler.py | 4 ++-- + giscanner/dumper.py | 3 ++- + giscanner/scannermain.py | 3 +++ + 3 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py +index 32c9296..3fb262b 100644 +--- a/giscanner/ccompiler.py ++++ b/giscanner/ccompiler.py +@@ -174,7 +174,7 @@ class CCompiler(object): + + self._cflags_no_deprecation_warnings = "-Wno-deprecated-declarations" + +- def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths): ++ def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths, lib_dirs_envvar): + # An "internal" link is where the library to be introspected + # is being built in the current directory. + +@@ -184,7 +184,7 @@ class CCompiler(object): + if os.name == 'nt': + runtime_path_envvar = ['LIB', 'PATH'] + else: +- runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_FALLBACK_LIBRARY_PATH'] ++ runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_FALLBACK_LIBRARY_PATH'] if not lib_dirs_envvar else [lib_dirs_envvar] + # Search the current directory first + # (This flag is not supported nor needed for Visual C++) + args.append('-L.') +diff --git a/giscanner/dumper.py b/giscanner/dumper.py +index 2b851a5..10a7c39 100644 +--- a/giscanner/dumper.py ++++ b/giscanner/dumper.py +@@ -244,7 +244,8 @@ class DumpCompiler(object): + libtool, + self._options.libraries, + self._options.extra_libraries, +- self._options.library_paths) ++ self._options.library_paths, ++ self._options.lib_dirs_envvar) + args.extend(pkg_config_libs) + + else: +diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py +index 9013562..9c9fe12 100644 +--- a/giscanner/scannermain.py ++++ b/giscanner/scannermain.py +@@ -126,6 +126,9 @@ def _get_option_parser(): + parser.add_option("", "--use-ldd-wrapper", + action="store", dest="ldd_wrapper", default=None, + help="wrapper to use instead of ldd (useful when cross-compiling)") ++ parser.add_option("", "--lib-dirs-envvar", ++ action="store", dest="lib_dirs_envvar", default=None, ++ help="environment variable to write a list of library directories to (for running the transient binary), instead of standard LD_LIBRARY_PATH") + parser.add_option("", "--program-arg", + action="append", dest="program_args", default=[], + help="extra arguments to program") diff --git a/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch new file mode 100644 index 0000000..b484b5e --- /dev/null +++ b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch @@ -0,0 +1,28 @@ +From f742da8b3913f4818d3f419117076afe62f4dbf4 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Wed, 5 Sep 2018 16:46:52 +0200 +Subject: [PATCH] giscanner: ignore error return codes from ldd-wrapper + +prelink-rtld, which we use instead of ldd returns 127 when it can't find a library. +It is not an error per se, but it breaks subprocess.check_output(). + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin + +--- + giscanner/shlibs.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py +index d67df95..80352a6 100644 +--- a/giscanner/shlibs.py ++++ b/giscanner/shlibs.py +@@ -102,7 +102,7 @@ def _resolve_non_libtool(options, binary, libraries): + args.extend(['otool', '-L', binary.args[0]]) + else: + args.extend(['ldd', binary.args[0]]) +- output = subprocess.check_output(args) ++ output = subprocess.run(args, check=False, stdout=subprocess.PIPE).stdout + if isinstance(output, bytes): + output = output.decode("utf-8", "replace") + diff --git a/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-disable-tests-when-cross-compiling.patch b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-disable-tests-when-cross-compiling.patch new file mode 100644 index 0000000..c4951b2 --- /dev/null +++ b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-disable-tests-when-cross-compiling.patch @@ -0,0 +1,26 @@ +From 2c384187cc22113c0c9b1cd233948118f7c085ef Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Mon, 25 Mar 2019 13:28:48 +0100 +Subject: [PATCH] meson.build: disable tests when cross-compiling + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/64] +Signed-off-by: Alexander Kanavin +--- + meson.build | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 2544ff3..4c16fe5 100644 +--- a/meson.build ++++ b/meson.build +@@ -168,7 +168,9 @@ if get_option('enable-introspection-data') == true + endif + subdir('examples') + subdir('docs') +-subdir('tests') ++if not meson.is_cross_build() ++ subdir('tests') ++endif + + install_data('Makefile.introspection', install_dir: join_paths(get_option('datadir'), 'gobject-introspection-1.0')) + install_data('m4/introspection.m4', install_dir: join_paths(get_option('datadir'), 'aclocal')) diff --git a/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch new file mode 100644 index 0000000..b954dce --- /dev/null +++ b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch @@ -0,0 +1,49 @@ +From 5f985fd8a24764ccb38af6335d4584d7e33fc3a1 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Mon, 19 Oct 2015 18:26:40 +0300 +Subject: [PATCH] giscanner: add --use-binary-wrapper option + +With this option, giscanner will use a wrapper executable to run +binaries it's producing, instead of running them directly. This +is useful when binaries are cross-compiled and cannot be run directly, +but they can be run using for example QEMU emulation. + +Upstream-Status: Pending [review on oe-core list] +Signed-off-by: Alexander Kanavin + +--- + giscanner/scannermain.py | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py +index c004fb1..0b6a2d2 100644 +--- a/giscanner/scannermain.py ++++ b/giscanner/scannermain.py +@@ -120,6 +120,9 @@ def _get_option_parser(): + parser.add_option("", "--program", + action="store", dest="program", default=None, + help="program to execute") ++ parser.add_option("", "--use-binary-wrapper", ++ action="store", dest="wrapper", default=None, ++ help="wrapper to use for running programs (useful when cross-compiling)") + parser.add_option("", "--program-arg", + action="append", dest="program_args", default=[], + help="extra arguments to program") +@@ -417,6 +420,17 @@ def create_binary(transformer, options, args): + gdump_parser.get_error_quark_functions()) + + shlibs = resolve_shlibs(options, binary, options.libraries) ++ if options.wrapper: ++ # The wrapper needs the binary itself, not the libtool wrapper script, ++ # so we check if libtool has sneaked the binary into .libs subdirectory ++ # and adjust the path accordingly ++ import os.path ++ dir_name, binary_name = os.path.split(binary.args[0]) ++ libtool_binary = os.path.join(dir_name, '.libs', binary_name) ++ if os.path.exists(libtool_binary): ++ binary.args[0] = libtool_binary ++ # Then prepend the wrapper to the command line to execute ++ binary.args = [options.wrapper] + binary.args + gdump_parser.set_introspection_binary(binary) + gdump_parser.parse() + return shlibs diff --git a/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch new file mode 100644 index 0000000..79264ed --- /dev/null +++ b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch @@ -0,0 +1,45 @@ +From cba7807888a4a1f1d630d16c51c89859209334b3 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Fri, 30 Oct 2015 16:28:46 +0200 +Subject: [PATCH] giscanner: add a --use-ldd-wrapper option + +This is useful in cross-compile environments where system's ldd +command does not work on binaries built for a different architecture + +Upstream-Status: Pending [review in oe-core] +Signed-off-by: Alexander Kanavin + +--- + giscanner/scannermain.py | 3 +++ + giscanner/shlibs.py | 4 +++- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py +index 0b6a2d2..9013562 100644 +--- a/giscanner/scannermain.py ++++ b/giscanner/scannermain.py +@@ -123,6 +123,9 @@ def _get_option_parser(): + parser.add_option("", "--use-binary-wrapper", + action="store", dest="wrapper", default=None, + help="wrapper to use for running programs (useful when cross-compiling)") ++ parser.add_option("", "--use-ldd-wrapper", ++ action="store", dest="ldd_wrapper", default=None, ++ help="wrapper to use instead of ldd (useful when cross-compiling)") + parser.add_option("", "--program-arg", + action="append", dest="program_args", default=[], + help="extra arguments to program") +diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py +index 2c61f2f..d67df95 100644 +--- a/giscanner/shlibs.py ++++ b/giscanner/shlibs.py +@@ -96,7 +96,9 @@ def _resolve_non_libtool(options, binary, libraries): + args.extend(libtool) + args.append('--mode=execute') + platform_system = platform.system() +- if platform_system == 'Darwin': ++ if options.ldd_wrapper: ++ args.extend([options.ldd_wrapper, binary.args[0]]) ++ elif platform_system == 'Darwin': + args.extend(['otool', '-L', binary.args[0]]) + else: + args.extend(['ldd', binary.args[0]]) diff --git a/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch new file mode 100644 index 0000000..26f8da6 --- /dev/null +++ b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch @@ -0,0 +1,39 @@ +From 740d91151ffe576e0c08513af9d7bc8133eb9dfb Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Thu, 8 Oct 2015 18:30:35 +0300 +Subject: [PATCH] Prefix pkg-config paths with PKG_CONFIG_SYSROOT_DIR + environment variable + +This environment variable sets the location of sysroot directory in cross-compilation +environments; if the variable is not set, the prefix will be empty. + +Upstream-Status: Pending [review on oe-core list] +Signed-off-by: Alexander Kanavin + +--- + m4/introspection.m4 | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/m4/introspection.m4 b/m4/introspection.m4 +index d89c3d9..b562266 100644 +--- a/m4/introspection.m4 ++++ b/m4/introspection.m4 +@@ -56,14 +56,14 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], + INTROSPECTION_GIRDIR= + INTROSPECTION_TYPELIBDIR= + if test "x$found_introspection" = "xyes"; then +- INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` +- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` +- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` ++ INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` ++ INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` ++ INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` + INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` + INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" + INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` + INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` +- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection ++ INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection + fi + AC_SUBST(INTROSPECTION_SCANNER) + AC_SUBST(INTROSPECTION_COMPILER) diff --git a/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb new file mode 100644 index 0000000..b137177 --- /dev/null +++ b/meta-gnome/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb @@ -0,0 +1,209 @@ +SUMMARY = "Middleware layer between GObject-using C libraries and language bindings" +DESCRIPTION = "GObject Introspection is a project for providing machine \ +readable introspection data of the API of C libraries. This introspection \ +data can be used in several different use cases, for example automatic code \ +generation for bindings, API verification and documentation generation." +HOMEPAGE = "https://wiki.gnome.org/action/show/Projects/GObjectIntrospection" +BUGTRACKER = "https://gitlab.gnome.org/GNOME/gobject-introspection/issues" +SECTION = "libs" +LICENSE = "LGPLv2+ & GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \ + file://tools/compiler.c;endline=20;md5=fc5007fc20022720e6c0b0cdde41fabd \ + file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39 \ + file://girepository/giregisteredtypeinfo.c;endline=21;md5=661847611ae6979465415f31a759ba27 \ + " + +SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}", 2)}/${BPN}-${PV}.tar.xz \ + file://0003-giscanner-add-use-binary-wrapper-option.patch \ + file://0004-giscanner-add-a-use-ldd-wrapper-option.patch \ + file://0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \ + file://0001-giscanner-add-a-lib-dirs-envvar-option.patch \ + file://0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch \ + file://0001-Port-cross-compilation-support-to-meson.patch \ + file://0001-meson.build-disable-tests-when-cross-compiling.patch \ + file://0001-Fix-build-reproducibility.patch \ + " + +SRC_URI[md5sum] = "37278eab3704e42234b6080b8cf241f1" +SRC_URI[sha256sum] = "b1ee7ed257fdbc008702bdff0ff3e78a660e7e602efa8f211dc89b9d1e7d90a2" + +SRC_URI_append_class-native = " file://0001-Relocate-the-repository-directory-for-native-builds.patch" + +inherit meson pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even multilib_script + +GTKDOC_MESON_OPTION = "gtk_doc" + +MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner" + +DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native autoconf-archive" + +# target build needs qemu to run temporary introspection binaries created +# on the fly by g-ir-scanner and a native version of itself to run +# native versions of its own tools during build. +# Also prelink-rtld is used to find out library dependencies of introspection binaries +# (standard ldd doesn't work when cross-compiling). +DEPENDS_class-target_append = " gobject-introspection-native qemu-native prelink-native" + +# needed for writing out the qemu wrapper script +export STAGING_DIR_HOST +export B + +PACKAGECONFIG ?= "" +PACKAGECONFIG[doctool] = "-Ddoctool=true,-Ddoctool=false,python3-mako," + +# Configure target build to use native tools of itself and to use a qemu wrapper +# and optionally to generate introspection data +EXTRA_OEMESON_class-target = " \ + -Denable-host-gi=true \ + -Denable-gi-cross-wrapper=${B}/g-ir-scanner-qemuwrapper \ + -Denable-gi-ldd-wrapper=${B}/g-ir-scanner-lddwrapper \ + -Dpkgconfig-sysroot-path=${PKG_CONFIG_SYSROOT_DIR} \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Denable-introspection-data=true', '-Denable-introspection-data=false', d)} \ + ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''} \ +" + +# Need to ensure ld.so.conf exists so prelink-native works +# both before we build and if we install from sstate +do_configure[prefuncs] += "gobject_introspection_preconfigure" +python gobject_introspection_preconfigure () { + oe.utils.write_ld_so_conf(d) +} + +do_configure_prepend_class-native() { + # Tweak the native python scripts so that they don't refer to the + # full path of native python binary (the solution is taken from glib-2.0 recipe) + # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes) + sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in +} + +do_configure_prepend_class-target() { + # Write out a qemu wrapper that will be given to gi-scanner so that it + # can run target helper binaries through that. + qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}" + cat > ${B}/g-ir-scanner-qemuwrapper << EOF +#!/bin/sh +# Use a modules directory which doesn't exist so we don't load random things +# which may then get deleted (or their dependencies) and potentially segfault +export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy + +$qemu_binary "\$@" +if [ \$? -ne 0 ]; then + echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help." + echo "(typically like this: GIR_EXTRA_LIBS_PATH=\"$""{B}/something/.libs\" )" + exit 1 +fi +EOF + chmod +x ${B}/g-ir-scanner-qemuwrapper + + # Write out a wrapper for g-ir-scanner itself, which will be used when building introspection files + # for glib-based packages. This wrapper calls the native version of the scanner, and tells it to use + # a qemu wrapper for running transient target binaries produced by the scanner, and an include directory + # from the target sysroot. + cat > ${B}/g-ir-scanner-wrapper << EOF +#!/bin/sh +# This prevents g-ir-scanner from writing cache data to $HOME +export GI_SCANNER_DISABLE_CACHE=1 + +g-ir-scanner --lib-dirs-envvar=GIR_EXTRA_LIBS_PATH --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 --add-include-path=${STAGING_LIBDIR}/gir-1.0 "\$@" +EOF + chmod +x ${B}/g-ir-scanner-wrapper + + # Write out a wrapper for g-ir-compiler, which runs the target version of it through qemu. + # g-ir-compiler writes out the raw content of a C struct to disk, and therefore is architecture dependent. + cat > ${B}/g-ir-compiler-wrapper << EOF +#!/bin/sh +${STAGING_BINDIR}/g-ir-scanner-qemuwrapper ${STAGING_BINDIR}/g-ir-compiler "\$@" +EOF + chmod +x ${B}/g-ir-compiler-wrapper + + # Write out a wrapper to use instead of ldd, which does not work when a binary is built + # for a different architecture + cat > ${B}/g-ir-scanner-lddwrapper << EOF +#!/bin/sh +prelink-rtld --root=$STAGING_DIR_HOST "\$@" +EOF + chmod +x ${B}/g-ir-scanner-lddwrapper + + # Also tweak the target python scripts so that they don't refer to the + # native version of python binary (the solution is taken from glib-2.0 recipe) + sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in +} + +do_compile_prepend() { + # This prevents g-ir-scanner from writing cache data to $HOME + export GI_SCANNER_DISABLE_CACHE=1 + + # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise + export GIR_EXTRA_LIBS_PATH=$B/.libs +} + +# Our wrappers need to be available system-wide, because they will be used +# to build introspection files for all other gobject-based packages +do_install_append_class-target() { + install -d ${D}${bindir}/ + install ${B}/g-ir-scanner-qemuwrapper ${D}${bindir}/ + install ${B}/g-ir-scanner-wrapper ${D}${bindir}/ + install ${B}/g-ir-compiler-wrapper ${D}${bindir}/ + install ${B}/g-ir-scanner-lddwrapper ${D}${bindir}/ +} + +# we need target versions of introspection tools in sysroot so that they can be run via qemu +# when building introspection files in other packages +SYSROOT_DIRS_append_class-target = " ${bindir}" + +SYSROOT_PREPROCESS_FUNCS_append_class-target = " gi_binaries_sysroot_preprocess" +gi_binaries_sysroot_preprocess() { + # Tweak the binary names in the introspection pkgconfig file, so that it + # picks up our wrappers which do the cross-compile and qemu magic. + sed -i \ + -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \ + -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \ + ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc +} + +SYSROOT_PREPROCESS_FUNCS_append = " gi_ldsoconf_sysroot_preprocess" +gi_ldsoconf_sysroot_preprocess () { + mkdir -p ${SYSROOT_DESTDIR}${bindir} + dest=${SYSROOT_DESTDIR}${bindir}/postinst-ldsoconf-${PN} + echo "#!/bin/sh" > $dest + echo "mkdir -p ${STAGING_DIR_TARGET}${sysconfdir}" >> $dest + echo "echo ${base_libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest + echo "echo ${libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest + chmod 755 $dest +} + +# Remove wrapper files from the package, only used for cross-compiling +PACKAGE_PREPROCESS_FUNCS += "gi_package_preprocess" +gi_package_preprocess() { + rm -f ${PKGD}${bindir}/g-ir-scanner-qemuwrapper + rm -f ${PKGD}${bindir}/g-ir-scanner-wrapper + rm -f ${PKGD}${bindir}/g-ir-compiler-wrapper + rm -f ${PKGD}${bindir}/g-ir-scanner-lddwrapper +} + +SSTATE_SCAN_FILES += "g-ir-scanner-qemuwrapper g-ir-scanner-wrapper g-ir-compiler-wrapper g-ir-scanner-lddwrapper Gio-2.0.gir postinst-ldsoconf-${PN}" + +# .typelib files are needed at runtime and so they go to the main package +FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib" + +# .gir files go to dev package, as they're needed for developing (but not for running) +# things that depends on introspection. +FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir" +FILES_${PN}-dev_append = " ${datadir}/gir-*/*.rnc" + +# These are used by gobject-based packages +# to generate transient introspection binaries +FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/gdump.c \ + ${datadir}/gobject-introspection-1.0/Makefile.introspection" + +# These are used by dependent packages (e.g. pygobject) to build their +# testsuites. +FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/tests/*.c \ + ${datadir}/gobject-introspection-1.0/tests/*.h" + +FILES_${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/" +FILES_${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a" + +RDEPENDS_${PN} = "python3-pickle python3-xml" + +BBCLASSEXTEND = "native" diff --git a/meta-gnome/recipes-gnome/gsettings-desktop-schema/gsettings-desktop-schemas_3.36.1.bb b/meta-gnome/recipes-gnome/gsettings-desktop-schema/gsettings-desktop-schemas_3.36.1.bb new file mode 100644 index 0000000..168f920 --- /dev/null +++ b/meta-gnome/recipes-gnome/gsettings-desktop-schema/gsettings-desktop-schemas_3.36.1.bb @@ -0,0 +1,20 @@ +SUMMARY = "GNOME desktop-wide GSettings schemas" +HOMEPAGE = "http://live.gnome.org/gsettings-desktop-schemas" +BUGTRACKER = "https://bugzilla.gnome.org/" + +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "glib-2.0 intltool-native" + +GNOMEBASEBUILDCLASS = "meson" +inherit gnomebase gsettings gettext gobject-introspection upstream-version-is-even + +EXTRA_OEMESON = "-Dintrospection=true" + +SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \ + file://0001-remove-cross-compile-check.patch \ + " +SRC_URI[archive.md5sum] = "708ddd8dec388ebda5539667604197c3" +SRC_URI[archive.sha256sum] = "004bdbe43cf8290f2de7d8537e14d8957610ca479a4fa368e34dbd03f03ec9d9" + diff --git a/meta-gnome/recipes-gnome/gtk+/gtk+3.inc b/meta-gnome/recipes-gnome/gtk+/gtk+3.inc new file mode 100644 index 0000000..f0b38a1 --- /dev/null +++ b/meta-gnome/recipes-gnome/gtk+/gtk+3.inc @@ -0,0 +1,159 @@ +SUMMARY = "Multi-platform toolkit for creating GUIs" +DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \ +set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites." +HOMEPAGE = "http://www.gtk.org" +BUGTRACKER = "https://bugzilla.gnome.org/" +SECTION = "libs" + +DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf \ + gdk-pixbuf-native" + +LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+" + +inherit autotools gettext pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings distro_features_check gobject-introspection + +BBCLASSEXTEND = "native nativesdk" + +GSETTINGS_PACKAGE_class-native = "" + +# versions >= 3.90 are development versions, otherwise like upstream-version-is-even +UPSTREAM_CHECK_REGEX = "[^\d\.](?P3\.([1-8]?[02468])+(\.\d+)+)\.tar" + +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" + +# This should be in autotools.bbclass, but until something elses uses it putting +# it here avoids rebuilding everything. +export PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native" + +do_configure_prepend() { + # Do this because the configure script is running ./libtool directly + rm -f libtool + ln -s ${TARGET_PREFIX}libtool libtool + #delete a file that will get confused with generated one in ${B} + rm -f ${S}/gtk/gtktypefuncs.c +} + +EXTRA_OECONF += " \ + --disable-glibtest \ + --disable-xinerama \ + --enable-modules \ + ${@bb.utils.contains("DISTRO_FEATURES", "x11", "", "--disable-gtk-doc", d)} \ + " + +do_compile_prepend() { + export GIR_EXTRA_LIBS_PATH="${B}/gdk/.libs" +} + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl wayland x11', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'glx', '', d)}" + +PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes" +# this is provided by oe-core patch that removes epoxy/gl dependency from a X11 build +PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,libepoxy" +PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,,libgl" +PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon virtual/egl virtual/libgles2 wayland-native" +PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups" +PACKAGECONFIG[cloudprint] = "--enable-cloudprint,--disable-cloudprint,rest json-glib" +PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" + +prepare_gtk_scripts() { + mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0 + + # duplicate gtk-query-immodules for post install script update_gtk_immodules_cache + mkdir -p ${D}${libexecdir} + ln ${D}${bindir}/gtk-query-immodules-3.0 ${D}${libexecdir}/${MLPREFIX}gtk-query-immodules-3.0 +} + +do_install_append_class-target() { + prepare_gtk_scripts +} + +do_install_append_class-nativesdk() { + prepare_gtk_scripts +} + +do_install_append_class-native() { + create_wrapper ${D}/${bindir}/gtk-update-icon-cache \ + GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache + create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \ + GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache +} + +PROVIDES += "gtk-icon-utils" +PACKAGES =+ "${PN}-demo" +LIBV = "3.0.0" + +FILES_${PN}-demo = "${bindir}/gtk3-demo \ + ${bindir}/gtk3-demo-application \ + ${bindir}/gtk3-icon-browser \ + ${bindir}/gtk3-widget-factory \ + ${datadir}/gtk-3.0/demo \ + ${datadir}/applications/gtk3-demo.desktop \ + ${datadir}/applications/gtk3-icon-browser.desktop \ + ${datadir}/applications/gtk3-widget-factory.desktop \ + ${datadir}/icons/hicolor/*/apps/gtk3-demo*.png \ + ${datadir}/icons/hicolor/*/apps/gtk3-widget-factory*.png" + +FILES_${PN}_append = " ${bindir}/gtk-update-icon-cache-3.0 \ + ${bindir}/gtk-query-immodules-3.0 \ + ${bindir}/gtk-launch \ + ${datadir}/themes ${sysconfdir} ${datadir}/glib-2.0/schemas/ \ + ${libdir}/gtk-3.0/${LIBV}/engines/libpixmap.so \ + ${libdir}/gtk-3.0/modules/*.so" + +FILES_${PN}-dev += " \ + ${datadir}/gtk-3.0/gtkbuilder.rng \ + ${datadir}/gtk-3.0/include \ + ${datadir}/gettext/its \ + ${libdir}/gtk-3.0/include \ + ${libdir}/gtk-3.0/${LIBV}/loaders/*.la \ + ${libdir}/gtk-3.0/${LIBV}/immodules/*.la \ + ${libdir}/gtk-3.0/3.0.0/printbackends/*.la \ + ${libdir}/gtk-3.0/${LIBV}/engines/*.la \ + ${libdir}/gtk-3.0/modules/*.la \ + ${bindir}/gtk-builder-convert \ + ${bindir}/gtk-encode-symbolic-svg \ + ${bindir}/gtk-builder-tool \ + ${bindir}/gtk-query-settings \ + " + +GTKBASE_RRECOMMENDS ?= "liberation-fonts \ + gdk-pixbuf-loader-png \ + gdk-pixbuf-loader-jpeg \ + gdk-pixbuf-loader-gif \ + gdk-pixbuf-loader-xpm \ + shared-mime-info \ + adwaita-icon-theme-symbolic \ + " + +GTKBASE_RRECOMMENDS_class-native ?= "\ + " + +GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1" + +RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}" +RRECOMMENDS_${PN}_libc-glibc = "${GTKGLIBC_RRECOMMENDS}" +RDEPENDS_${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG", "wayland", "wayland-protocols", "", d)}" + +PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*" + +ALTERNATIVE_${PN} = "gtk-update-icon-cache" +ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-3.0" +ALTERNATIVE_PRIORITY = "30" + +python populate_packages_prepend () { + import os.path + + gtk_libdir = d.expand('${libdir}/gtk-3.0/${LIBV}') + immodules_root = os.path.join(gtk_libdir, 'immodules') + printmodules_root = os.path.join(gtk_libdir, 'printbackends'); + + immodules = do_split_packages(d, immodules_root, r'^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s') + if immodules: + d.setVar("GTKIMMODULES_PACKAGES", " ".join(immodules)) + + do_split_packages(d, printmodules_root, r'^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s') + + if (d.getVar('DEBIAN_NAMES')): + d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-3.0') +} diff --git a/meta-gnome/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch b/meta-gnome/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch new file mode 100644 index 0000000..c210bbc --- /dev/null +++ b/meta-gnome/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch @@ -0,0 +1,47 @@ +From 0ecaa5bab162abf0cb2057d77beeb7b89d5873b4 Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen +Date: Tue, 21 Jun 2016 14:53:56 +0300 +Subject: [PATCH 1/4] Hardcoded libtool + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Marko Lindqvist +Signed-off-by: Jussi Kukkonen +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 6628e21..f43ac09 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -617,7 +617,7 @@ AC_MSG_CHECKING([whether to write dependencies into .pc files]) + case $enable_explicit_deps in + auto) + export SED +- deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh` ++ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh` + if test "x$deplibs_check_method" != xpass_all || test "x$enable_static" = xyes ; then + enable_explicit_deps=yes + else +@@ -895,7 +895,7 @@ else + dnl Now we check to see if our libtool supports shared lib deps + dnl (in a rather ugly way even) + if $dynworks; then +- module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config" ++ module_libtool_config="${CONFIG_SHELL-/bin/sh} ./$host_alias-libtool --config" + module_deplibs_check=`$module_libtool_config | \ + grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \ + sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'` +@@ -1649,7 +1649,7 @@ AC_SUBST(GTK_PRINT_BACKENDS) + # We are using gmodule-no-export now, but I'm leaving the stripping + # code in place for now, since pango and atk still require gmodule. + export SED +-export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` ++export_dynamic=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` + if test -n "$export_dynamic"; then + GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"` + GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"` +-- +2.12.0 + diff --git a/meta-gnome/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch b/meta-gnome/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch new file mode 100644 index 0000000..80dc2d7 --- /dev/null +++ b/meta-gnome/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch @@ -0,0 +1,57 @@ +From 6575ab0f0e8c1bba033ad1616511e37a2ec995ff Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen +Date: Fri, 16 Oct 2015 16:35:16 +0300 +Subject: [PATCH] Do not try to initialize GL without libGL + +_gdk_x11_screen_update_visuals_for_gl() will end up calling epoxys +GLX api which will exit() if libGL.so.1 is not present. We do not +want that to happen and we don't want every app to have to set +"GDK_GL=disabled" environment variable: so use #ifdef set based on +opengl distro feature. + +Upstream is not interested in the fix as it is: Either epoxy should be +fixed (to not exit) or GTK+ possibly could do some additional probing +before calling epoxy APIs. + +Upstream-Status: Denied +Signed-off-by: Jussi Kukkonen + +--- + configure.ac | 6 ++++++ + gdk/x11/gdkvisual-x11.c | 5 +++++ + 2 files changed, 11 insertions(+) + +diff --git a/configure.ac b/configure.ac +index e9f5583..bd651bb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -346,6 +346,12 @@ AC_ARG_ENABLE(cloudproviders, + [AS_HELP_STRING([--enable-cloudproviders], + [enable libcloudproviders integration])], + [cloudproviders_set=yes]) ++AC_ARG_ENABLE(glx, ++ [AS_HELP_STRING([--enable-glx], ++ [When enabled Gdk will try to initialize GLX])]) ++AS_IF([test "x$enable_glx" != "xno"], [ ++ AC_DEFINE([HAVE_GLX], [], [GLX will be available at runtime]) ++]) + + AC_ARG_ENABLE(profiler, + [AS_HELP_STRING([--enable-profiler], +diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c +index 81479d8..3c8c5c0 100644 +--- a/gdk/x11/gdkvisual-x11.c ++++ b/gdk/x11/gdkvisual-x11.c +@@ -306,7 +306,12 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen) + /* If GL is available we want to pick better default/rgba visuals, + as we care about glx details such as alpha/depth/stencil depth, + stereo and double buffering */ ++ /* update_visuals_for_gl() will end up calling epoxy GLX api which ++ will exit if libgl is not there: so only do this if we know GL ++ is available */ ++#ifdef HAVE_GLX + _gdk_x11_screen_update_visuals_for_gl (screen); ++#endif + } + + gint diff --git a/meta-gnome/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch b/meta-gnome/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch new file mode 100644 index 0000000..398c9bc --- /dev/null +++ b/meta-gnome/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch @@ -0,0 +1,872 @@ +From f83fcf1991afad6d9c15546b2ccd775dad4e314c Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen +Date: Tue, 21 Jun 2016 15:11:39 +0300 +Subject: [PATCH] Add --disable-opengl configure option + +--disable-opengl will remove the dependency on libepoxy and on the +OpenGL APIs. This is useful for those who want to keep using gtk+3 +without the "opengl" distro feature. + +GtkGLArea is still part of the API (it just doesn't work) even when +OpenGL is disabled. GdkX11GLContext was removed from the Gtk API +completely: that object exposes GL API elements so it had to be at +the very least modified. + +The patch is _not_ great from a maintenance point of view and +modifying the library API is also a fairly nasty thing to do. +Next long term release (4.0) will require alternative solutions +as it actually will depend on OpenGL. + +Upstream-Status: Inappropriate [Evil eye expected from upstream] +Signed-off-by: Jussi Kukkonen + +--- + configure.ac | 13 ++++- + demos/gtk-demo/glarea.c | 14 ++++++ + docs/tools/Makefile.am | 9 +++- + docs/tools/widgets.c | 4 +- + gdk/Makefile.am | 8 ++- + gdk/gdkdisplay.c | 4 +- + gdk/gdkgl.c | 10 ++++ + gdk/gdkglcontext.c | 6 +++ + gdk/gdkwindow.c | 13 +++++ + gdk/x11/Makefile.am | 30 +++++++++-- + gdk/x11/gdkdisplay-x11.c | 6 ++- + gdk/x11/gdkscreen-x11.c | 5 ++ + gdk/x11/gdkwindow-x11.c | 4 ++ + gdk/x11/gdkx-autocleanups.h | 2 + + gdk/x11/{gdkx.h => gdkx-with-gl-context.h} | 1 - + gdk/x11/gdkx-without-gl-context.h | 58 ++++++++++++++++++++++ + gtk/Makefile.am | 2 +- + gtk/gtkglarea.c | 20 +++++++- + gtk/inspector/general.c | 6 +++ + tests/Makefile.am | 10 ++-- + testsuite/gtk/objects-finalize.c | 2 + + 21 files changed, 208 insertions(+), 19 deletions(-) + rename gdk/x11/{gdkx.h => gdkx-with-gl-context.h} (98%) + create mode 100644 gdk/x11/gdkx-without-gl-context.h + +diff --git a/configure.ac b/configure.ac +index bd651bb..b4c061f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -346,6 +346,15 @@ AC_ARG_ENABLE(cloudproviders, + [AS_HELP_STRING([--enable-cloudproviders], + [enable libcloudproviders integration])], + [cloudproviders_set=yes]) ++AC_ARG_ENABLE(opengl, ++ [AS_HELP_STRING([--enable-opengl], ++ [When enabled, Gtk+ will use libepoxy and exposes GtkGLArea widget ])]) ++AS_IF([test "x$enable_opengl" != "xno"], [ ++ AC_DEFINE([HAVE_OPENGL], [1], [libepoxy and opengl APIs are available at buildtime]) ++ EPOXY_PACKAGES="epoxy >= epoxy_required_version" ++]) ++AM_CONDITIONAL([HAVE_OPENGL],[test "x$enable_opengl" != "xno"]) ++ + AC_ARG_ENABLE(glx, + [AS_HELP_STRING([--enable-glx], + [When enabled Gdk will try to initialize GLX])]) +@@ -1345,7 +1354,7 @@ CFLAGS="$saved_cflags" + LDFLAGS="$saved_ldflags" + + GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0 >= gdk_pixbuf_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version" +-GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $cairo_backends epoxy >= epoxy_required_version $CLOUDPROVIDER_PACKAGES $PROFILER_PACKAGES fribidi >= fribidi_required_version" ++GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $cairo_backends $EPOXY_PACKAGES $CLOUDPROVIDER_PACKAGES $PROFILER_PACKAGES fribidi >= fribidi_required_version" + + PKG_CHECK_MODULES(GDK_DEP, $GDK_PACKAGES $GDK_PRIVATE_PACKAGES) + GDK_DEP_LIBS="$GDK_EXTRA_LIBS $GDK_DEP_LIBS $MATH_LIB" +@@ -1379,7 +1388,7 @@ fi + PKG_CHECK_MODULES(ATK, $ATK_PACKAGES) + + GTK_PACKAGES="atk >= atk_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version gdk-pixbuf-2.0 >= gdk_pixbuf_required_version gio-2.0 >= glib_required_version" +-GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES epoxy >= epoxy_required_version fribidi >= fribidi_required_version" ++GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $EPOXY_PACKAGES fribidi >= fribidi_required_version" + if test "x$enable_x11_backend" = xyes -o "x$enable_wayland_backend" = xyes; then + GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2" + fi +diff --git a/demos/gtk-demo/glarea.c b/demos/gtk-demo/glarea.c +index b51e4ae..82409c7 100644 +--- a/demos/gtk-demo/glarea.c ++++ b/demos/gtk-demo/glarea.c +@@ -3,9 +3,12 @@ + * GtkGLArea is a widget that allows custom drawing using OpenGL calls. + */ + ++#include "config.h" + #include + #include ++#if HAVE_OPENGL + #include ++#endif + + static GtkWidget *demo_window = NULL; + +@@ -23,6 +26,8 @@ enum { + /* Rotation angles on each axis */ + static float rotation_angles[N_AXIS] = { 0.0 }; + ++#ifdef HAVE_OPENGL ++ + /* The object we are drawing */ + static const GLfloat vertex_data[] = { + 0.f, 0.5f, 0.f, 1.f, +@@ -215,6 +220,7 @@ compute_mvp (float *res, + static GLuint position_buffer; + static GLuint program; + static GLuint mvp_location; ++#endif + + /* We need to set up our state when we realize the GtkGLArea widget */ + static void +@@ -241,8 +247,10 @@ realize (GtkWidget *widget) + fragment_path = "/glarea/glarea-gl.fs.glsl"; + } + ++#ifdef HAVE_OPENGL + init_buffers (&position_buffer, NULL); + init_shaders (vertex_path, fragment_path, &program, &mvp_location); ++#endif + } + + /* We should tear down the state when unrealizing */ +@@ -254,10 +262,13 @@ unrealize (GtkWidget *widget) + if (gtk_gl_area_get_error (GTK_GL_AREA (widget)) != NULL) + return; + ++#ifdef HAVE_OPENGL + glDeleteBuffers (1, &position_buffer); + glDeleteProgram (program); ++#endif + } + ++#ifdef HAVE_OPENGL + static void + draw_triangle (void) + { +@@ -290,6 +301,7 @@ draw_triangle (void) + glBindBuffer (GL_ARRAY_BUFFER, 0); + glUseProgram (0); + } ++#endif + + static gboolean + render (GtkGLArea *area, +@@ -298,6 +310,7 @@ render (GtkGLArea *area, + if (gtk_gl_area_get_error (area) != NULL) + return FALSE; + ++#ifdef HAVE_OPENGL + /* Clear the viewport */ + glClearColor (0.5, 0.5, 0.5, 1.0); + glClear (GL_COLOR_BUFFER_BIT); +@@ -307,6 +320,7 @@ render (GtkGLArea *area, + + /* Flush the contents of the pipeline */ + glFlush (); ++#endif + + return TRUE; + } +diff --git a/docs/tools/Makefile.am b/docs/tools/Makefile.am +index bec43e3..189e8fc 100644 +--- a/docs/tools/Makefile.am ++++ b/docs/tools/Makefile.am +@@ -9,13 +9,18 @@ AM_CPPFLAGS = \ + $(GTK_DEBUG_FLAGS) \ + $(GTK_DEP_CFLAGS) + ++if HAVE_OPENGL ++GEARS_LDADD = $(top_builddir)/tests/gtkgears.o ++endif ++ + DEPS = \ +- $(top_builddir)/gtk/libgtk-3.la ++ $(top_builddir)/gtk/libgtk-3.la \ ++ $(GEARS_LDADD) + + LDADDS = \ + $(top_builddir)/gtk/libgtk-3.la \ + $(top_builddir)/gdk/libgdk-3.la \ +- $(top_builddir)/tests/gtkgears.o \ ++ $(GEARS_LDADD) \ + $(GTK_DEP_LIBS) \ + $(GDK_DEP_LIBS) \ + -lm +diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c +index 932daf1..54239d6 100644 +--- a/docs/tools/widgets.c ++++ b/docs/tools/widgets.c +@@ -1526,9 +1526,11 @@ create_gl_area (void) + widget = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME (widget), GTK_SHADOW_IN); + ++#ifdef HAVE_OPENGL + gears = gtk_gears_new (); + gtk_container_add (GTK_CONTAINER (widget), gears); +- ++#endif ++ + info = new_widget_info ("glarea", widget, MEDIUM); + + return info; +diff --git a/gdk/Makefile.am b/gdk/Makefile.am +index 479d6a1..7edbee8 100644 +--- a/gdk/Makefile.am ++++ b/gdk/Makefile.am +@@ -274,7 +274,6 @@ x11_introspection_files = \ + x11/gdkeventsource.c \ + x11/gdkeventtranslator.c \ + x11/gdkgeometry-x11.c \ +- x11/gdkglcontext-x11.c \ + x11/gdkkeys-x11.c \ + x11/gdkmain-x11.c \ + x11/gdkmonitor-x11.c \ +@@ -300,7 +299,6 @@ x11_introspection_files = \ + x11/gdkx11display.h \ + x11/gdkx11displaymanager.h \ + x11/gdkx11dnd.h \ +- x11/gdkx11glcontext.h \ + x11/gdkx11keys.h \ + x11/gdkx11monitor.h \ + x11/gdkx11property.h \ +@@ -310,6 +308,12 @@ x11_introspection_files = \ + x11/gdkx11visual.h \ + x11/gdkx11window.h + ++if HAVE_OPENGL ++x11_introspection_files += \ ++ x11/gdkglcontext-x11.c \ ++ x11/gdkx11glcontext.h ++endif ++ + GdkX11-3.0.gir: libgdk-3.la Gdk-3.0.gir Makefile + GdkX11_3_0_gir_SCANNERFLAGS = \ + --identifier-prefix=Gdk \ +diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c +index 240c99f..9eb49bf 100644 +--- a/gdk/gdkdisplay.c ++++ b/gdk/gdkdisplay.c +@@ -2419,7 +2419,9 @@ gboolean + gdk_display_make_gl_context_current (GdkDisplay *display, + GdkGLContext *context) + { +- return GDK_DISPLAY_GET_CLASS (display)->make_gl_context_current (display, context); ++ if (GDK_DISPLAY_GET_CLASS (display)->make_gl_context_current) ++ return GDK_DISPLAY_GET_CLASS (display)->make_gl_context_current (display, context); ++ return FALSE; + } + + GdkRenderingMode +diff --git a/gdk/gdkgl.c b/gdk/gdkgl.c +index 933e204..1767508 100644 +--- a/gdk/gdkgl.c ++++ b/gdk/gdkgl.c +@@ -26,7 +26,9 @@ + # include "win32/gdkwin32.h" + #endif + ++#ifdef HAVE_OPENGL + #include ++#endif + #include + #include + +@@ -40,6 +42,7 @@ gdk_cairo_surface_mark_as_direct (cairo_surface_t *surface, + g_object_ref (window), g_object_unref); + } + ++#ifdef HAVE_OPENGL + static const char * + get_vertex_type_name (int type) + { +@@ -212,6 +215,7 @@ use_texture_rect_program (GdkGLContextPaintData *paint_data) + glUseProgram (paint_data->current_program->program); + } + } ++#endif + + void + gdk_gl_texture_quads (GdkGLContext *paint_context, +@@ -220,6 +224,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context, + GdkTexturedQuad *quads, + gboolean flip_colors) + { ++#ifdef HAVE_OPENGL + GdkGLContextPaintData *paint_data = gdk_gl_context_get_paint_data (paint_context); + GdkGLContextProgram *program; + GdkWindow *window = gdk_gl_context_get_window (paint_context); +@@ -293,6 +298,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context, + + glDisableVertexAttribArray (program->position_location); + glDisableVertexAttribArray (program->uv_location); ++#endif + } + + /* x,y,width,height describes a rectangle in the gl render buffer +@@ -341,6 +347,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr, + int width, + int height) + { ++#ifdef HAVE_OPENGL + GdkGLContext *paint_context; + cairo_surface_t *image; + cairo_matrix_t matrix; +@@ -718,6 +725,7 @@ out: + if (clip_region) + cairo_region_destroy (clip_region); + ++#endif + } + + /* This is always called with the paint context current */ +@@ -725,6 +733,7 @@ void + gdk_gl_texture_from_surface (cairo_surface_t *surface, + cairo_region_t *region) + { ++#ifdef HAVE_OPENGL + GdkGLContext *paint_context; + cairo_surface_t *image; + double device_x_offset, device_y_offset; +@@ -825,4 +834,5 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface, + + glDisable (GL_SCISSOR_TEST); + glDeleteTextures (1, &texture_id); ++#endif + } +diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c +index dfbed63..556f0a3 100644 +--- a/gdk/gdkglcontext.c ++++ b/gdk/gdkglcontext.c +@@ -85,7 +85,9 @@ + #include "gdkintl.h" + #include "gdk-private.h" + ++#ifdef HAVE_OPENGL + #include ++#endif + + typedef struct { + GdkDisplay *display; +@@ -243,6 +245,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context, + int height, + guint texture_target) + { ++#ifdef HAVE_OPENGL + GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context); + + g_return_if_fail (GDK_IS_GL_CONTEXT (context)); +@@ -286,6 +289,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context, + glTexSubImage2D (texture_target, 0, 0, i, width, 1, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, (unsigned char*) data + (i * stride)); + } + } ++#endif + } + + static gboolean +@@ -774,6 +778,7 @@ gdk_gl_context_realize (GdkGLContext *context, + static void + gdk_gl_context_check_extensions (GdkGLContext *context) + { ++#ifdef HAVE_OPENGL + GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context); + gboolean has_npot, has_texture_rectangle; + +@@ -853,6 +858,7 @@ gdk_gl_context_check_extensions (GdkGLContext *context) + priv->use_texture_rectangle ? "yes" : "no")); + + priv->extensions_checked = TRUE; ++#endif + } + + /** +diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c +index 6ae0f86..4e48a2a 100644 +--- a/gdk/gdkwindow.c ++++ b/gdk/gdkwindow.c +@@ -45,7 +45,9 @@ + + #include + ++#ifdef HAVE_OPENGL + #include ++#endif + + /* for the use of round() */ + #include "fallback-c89.c" +@@ -2844,6 +2846,13 @@ gdk_window_get_paint_gl_context (GdkWindow *window, + { + GError *internal_error = NULL; + ++#ifndef HAVE_OPENGL ++ g_set_error_literal (error, GDK_GL_ERROR, ++ GDK_GL_ERROR_NOT_AVAILABLE, ++ _("GL support disabled with --disable-opengl")); ++ return NULL; ++#endif ++ + if (_gdk_gl_flags & GDK_GL_DISABLE) + { + g_set_error_literal (error, GDK_GL_ERROR, +@@ -2979,6 +2988,7 @@ gdk_window_begin_paint_internal (GdkWindow *window, + } + else + { ++#ifdef HAVE_OPENGL + gdk_gl_context_make_current (context); + /* With gl we always need a surface to combine the gl + drawing with the native drawing. */ +@@ -2993,6 +3003,7 @@ gdk_window_begin_paint_internal (GdkWindow *window, + glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + + glViewport (0, 0, ww, wh); ++#endif + } + } + +@@ -3056,6 +3067,7 @@ gdk_window_end_paint_internal (GdkWindow *window) + + gdk_gl_context_make_current (window->gl_paint_context); + ++#ifdef HAVE_OPENGL + if (!cairo_region_is_empty (opaque_region)) + gdk_gl_texture_from_surface (window->current_paint.surface, + opaque_region); +@@ -3066,6 +3078,7 @@ gdk_window_end_paint_internal (GdkWindow *window) + window->current_paint.need_blend_region); + glDisable(GL_BLEND); + } ++#endif + + cairo_region_destroy (opaque_region); + +diff --git a/gdk/x11/Makefile.am b/gdk/x11/Makefile.am +index 32b1f24..6352313 100644 +--- a/gdk/x11/Makefile.am ++++ b/gdk/x11/Makefile.am +@@ -40,8 +40,6 @@ libgdk_x11_la_SOURCES = \ + gdkeventtranslator.c \ + gdkeventtranslator.h \ + gdkgeometry-x11.c \ +- gdkglcontext-x11.c \ +- gdkglcontext-x11.h \ + gdkkeys-x11.c \ + gdkmain-x11.c \ + gdkmonitor-x11.c \ +@@ -56,14 +54,32 @@ libgdk_x11_la_SOURCES = \ + gdkwindow-x11.h \ + gdkxftdefaults.c \ + gdkxid.c \ +- gdkx.h \ + gdkprivate-x11.h \ + xsettings-client.h \ + xsettings-client.c + ++if HAVE_OPENGL ++libgdk_x11_la_SOURCES += \ ++ gdkglcontext-x11.c \ ++ gdkglcontext-x11.h ++endif ++ + libgdkinclude_HEADERS = \ + gdkx.h + ++if HAVE_OPENGL ++GDKX_HEADER = gdkx-with-gl-context.h ++else ++GDKX_HEADER = gdkx-without-gl-context.h ++endif ++ ++BUILT_SOURCES = gdkx.h ++ ++.PHONY: gdkx.h ++gdkx.h: ++ $(AM_V_GEN) cd $(srcdir) \ ++ && (cmp -s $(GDKX_HEADER) gdkx.h || cp $(GDKX_HEADER) gdkx.h ) ++ + libgdkx11include_HEADERS = \ + gdkx-autocleanups.h \ + gdkx11applaunchcontext.h \ +@@ -77,7 +93,6 @@ libgdkx11include_HEADERS = \ + gdkx11display.h \ + gdkx11displaymanager.h \ + gdkx11dnd.h \ +- gdkx11glcontext.h \ + gdkx11keys.h \ + gdkx11monitor.h \ + gdkx11property.h \ +@@ -87,10 +102,17 @@ libgdkx11include_HEADERS = \ + gdkx11visual.h \ + gdkx11window.h + ++if HAVE_OPENGL ++libgdkx11include_HEADERS += gdkx11glcontext.h ++endif ++ + # We need to include all these C files here since the conditionals + # don't seem to be correctly expanded for the dist files. + EXTRA_DIST += \ ++ gdkx.h \ + gdksettings.c \ + meson.build + ++MAINTAINERCLEANFILES = gdkx.h ++ + -include $(top_srcdir)/git.mk +diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c +index 817944e..e7a2947 100644 +--- a/gdk/x11/gdkdisplay-x11.c ++++ b/gdk/x11/gdkdisplay-x11.c +@@ -37,7 +37,9 @@ + #include "gdkdisplay-x11.h" + #include "gdkprivate-x11.h" + #include "gdkscreen-x11.h" ++#ifdef HAVE_OPENGL + #include "gdkglcontext-x11.h" ++#endif + #include "gdk-private.h" + #include "gdkprofilerprivate.h" + +@@ -3188,7 +3190,9 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class) + display_class->text_property_to_utf8_list = _gdk_x11_display_text_property_to_utf8_list; + display_class->utf8_to_string_target = _gdk_x11_display_utf8_to_string_target; + +- display_class->make_gl_context_current = gdk_x11_display_make_gl_context_current; ++#ifdef HAVE_OPENGL ++ display_class->make_gl_context_current = gdk_x11_display_make_gl_context_current; ++#endif + + display_class->get_default_seat = gdk_x11_display_get_default_seat; + +diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c +index 8939ae9..931bff9 100644 +--- a/gdk/x11/gdkscreen-x11.c ++++ b/gdk/x11/gdkscreen-x11.c +@@ -1723,3 +1723,8 @@ gdk_x11_screen_get_current_desktop (GdkScreen *screen) + { + return get_netwm_cardinal_property (screen, "_NET_CURRENT_DESKTOP"); + } ++ ++#ifndef HAVE_OPENGL ++/* Function from in gdk/x11/gdkglcontext-x11.c */ ++void _gdk_x11_screen_update_visuals_for_gl (GdkScreen *screen) {} ++#endif +diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c +index 1fe7b90..d23a347 100644 +--- a/gdk/x11/gdkwindow-x11.c ++++ b/gdk/x11/gdkwindow-x11.c +@@ -36,7 +36,9 @@ + #include "gdkasync.h" + #include "gdkeventsource.h" + #include "gdkdisplay-x11.h" ++#ifdef HAVE_OPENGL + #include "gdkglcontext-x11.h" ++#endif + #include "gdkprivate-x11.h" + #include "gdk-private.h" + +@@ -5861,7 +5863,9 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass) + impl_class->set_opaque_region = gdk_x11_window_set_opaque_region; + impl_class->set_shadow_width = gdk_x11_window_set_shadow_width; + impl_class->show_window_menu = gdk_x11_window_show_window_menu; ++#ifdef HAVE_OPENGL + impl_class->create_gl_context = gdk_x11_window_create_gl_context; + impl_class->invalidate_for_new_frame = gdk_x11_window_invalidate_for_new_frame; ++#endif + impl_class->get_unscaled_size = gdk_x11_window_get_unscaled_size; + } +diff --git a/gdk/x11/gdkx-autocleanups.h b/gdk/x11/gdkx-autocleanups.h +index edb0ea7..a317d61 100644 +--- a/gdk/x11/gdkx-autocleanups.h ++++ b/gdk/x11/gdkx-autocleanups.h +@@ -30,7 +30,9 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11DeviceXI2, g_object_unref) + G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Display, g_object_unref) + G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11DisplayManager, g_object_unref) + G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11DragContext, g_object_unref) ++#ifdef HAVE_OPENGL + G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11GLContext, g_object_unref) ++#endif + G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Keymap, g_object_unref) + G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Screen, g_object_unref) + G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Visual, g_object_unref) +diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx-with-gl-context.h +similarity index 98% +rename from gdk/x11/gdkx.h +rename to gdk/x11/gdkx-with-gl-context.h +index 1f64bcc..ae05fa6 100644 +--- a/gdk/x11/gdkx.h ++++ b/gdk/x11/gdkx-with-gl-context.h +@@ -45,7 +45,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff --git a/gdk/x11/gdkx-without-gl-context.h b/gdk/x11/gdkx-without-gl-context.h +new file mode 100644 +index 0000000..c9e2617 +--- /dev/null ++++ b/gdk/x11/gdkx-without-gl-context.h +@@ -0,0 +1,58 @@ ++/* GDK - The GIMP Drawing Kit ++ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library. If not, see . ++ */ ++ ++/* ++ * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS ++ * file for a list of people on the GTK+ Team. See the ChangeLog ++ * files for a list of changes. These files are distributed with ++ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. ++ */ ++ ++#ifndef __GDK_X_H__ ++#define __GDK_X_H__ ++ ++#include ++ ++#include ++#include ++ ++#define __GDKX_H_INSIDE__ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#undef __GDKX_H_INSIDE__ ++ ++#endif /* __GDK_X_H__ */ +diff --git a/gtk/Makefile.am b/gtk/Makefile.am +index eaca473..99352d1 100644 +--- a/gtk/Makefile.am ++++ b/gtk/Makefile.am +@@ -1449,7 +1449,7 @@ gtktypefuncs.inc: stamp-gtktypebuiltins.h stamp-gtkprivatetypebuiltins.h $(top_s + ${CPP} $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) xgen-gtfsrc.c | \ + $(GREP) -o '\bg[td]k_[a-zA-Z0-9_]*_get_type\b' | \ + sort | uniq | \ +- $(SED) '{ s/^/*tp++ = /; s/$$/();/; s/^.*\(gdk_x11\|gtk_plug_\|gtk_socket_\).*$$/#ifdef GDK_WINDOWING_X11\n&\n#endif/; }' >> xgen-gtf \ ++ $(SED) '{ s/^/*tp++ = /; s/$$/();/; s/^.*\(gdk_x11\|gtk_plug_\|gtk_socket_\).*$$/#ifdef GDK_WINDOWING_X11\n&\n#endif/; s/^.*gdk_x11_gl.*$$/#ifdef HAVE_OPENGL\n&\n#endif/; }' >> xgen-gtf \ + && cp xgen-gtf $@ && rm -f xgen-gtf + $(srcdir)/gtktestutils.c: gtktypefuncs.inc + +diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c +index 9a56443..7de0db2 100644 +--- a/gtk/gtkglarea.c ++++ b/gtk/gtkglarea.c +@@ -29,7 +29,9 @@ + #include "gtkprivate.h" + #include "gtkrender.h" + ++#ifdef HAVE_OPENGL + #include ++#endif + + /** + * SECTION:gtkglarea +@@ -369,9 +371,12 @@ gtk_gl_area_real_create_context (GtkGLArea *area) + static void + gtk_gl_area_resize (GtkGLArea *area, int width, int height) + { ++#ifdef HAVE_OPENGL + glViewport (0, 0, width, height); ++#endif + } + ++#ifdef HAVE_OPENGL + /* + * Creates all the buffer objects needed for rendering the scene + */ +@@ -483,6 +488,7 @@ gtk_gl_area_allocate_buffers (GtkGLArea *area) + + priv->needs_render = TRUE; + } ++#endif + + /** + * gtk_gl_area_attach_buffers: +@@ -501,6 +507,7 @@ gtk_gl_area_allocate_buffers (GtkGLArea *area) + void + gtk_gl_area_attach_buffers (GtkGLArea *area) + { ++#ifdef HAVE_OPENGL + GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area); + + g_return_if_fail (GTK_IS_GL_AREA (area)); +@@ -533,11 +540,13 @@ gtk_gl_area_attach_buffers (GtkGLArea *area) + glFramebufferRenderbufferEXT (GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, + GL_RENDERBUFFER_EXT, priv->depth_stencil_buffer); + } ++#endif + } + + static void + gtk_gl_area_delete_buffers (GtkGLArea *area) + { ++#ifdef HAVE_OPENGL + GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area); + + if (priv->context == NULL) +@@ -569,6 +578,7 @@ gtk_gl_area_delete_buffers (GtkGLArea *area) + glDeleteFramebuffersEXT (1, &priv->frame_buffer); + priv->frame_buffer = 0; + } ++#endif + } + + static void +@@ -679,6 +689,7 @@ gtk_gl_area_draw (GtkWidget *widget, + GtkGLArea *area = GTK_GL_AREA (widget); + GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area); + gboolean unused; ++#ifdef HAVE_OPENGL + int w, h, scale; + GLenum status; + +@@ -690,7 +701,6 @@ gtk_gl_area_draw (GtkWidget *widget, + gtk_widget_get_allocated_height (widget)); + return FALSE; + } +- + if (priv->context == NULL) + return FALSE; + +@@ -736,6 +746,14 @@ gtk_gl_area_draw (GtkWidget *widget, + } + + return TRUE; ++#else ++ if (priv->error != NULL) ++ gtk_gl_area_draw_error_screen (area, ++ cr, ++ gtk_widget_get_allocated_width (widget), ++ gtk_widget_get_allocated_height (widget)); ++ return FALSE; ++#endif + } + + static gboolean +diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c +index c241ec8..24576dd 100644 +--- a/gtk/inspector/general.c ++++ b/gtk/inspector/general.c +@@ -33,8 +33,10 @@ + + #ifdef GDK_WINDOWING_X11 + #include "x11/gdkx.h" ++#ifdef HAVE_OPENGL + #include + #endif ++#endif + + #ifdef GDK_WINDOWING_WIN32 + #include "win32/gdkwin32.h" +@@ -196,6 +198,7 @@ add_label_row (GtkInspectorGeneral *gen, + gtk_size_group_add_widget (GTK_SIZE_GROUP (gen->priv->labels), label); + } + ++#ifdef HAVE_OPENGL + #ifdef GDK_WINDOWING_X11 + static void + append_glx_extension_row (GtkInspectorGeneral *gen, +@@ -205,6 +208,7 @@ append_glx_extension_row (GtkInspectorGeneral *gen, + add_check_row (gen, GTK_LIST_BOX (gen->priv->gl_box), ext, epoxy_has_glx_extension (dpy, 0, ext), 0); + } + #endif ++#endif + + #ifdef GDK_WINDOWING_WAYLAND + static void +@@ -254,6 +258,7 @@ wayland_get_display (struct wl_display *wl_display) + static void + init_gl (GtkInspectorGeneral *gen) + { ++#ifdef HAVE_OPENGL + #ifdef GDK_WINDOWING_X11 + if (GDK_IS_X11_DISPLAY (gdk_display_get_default ())) + { +@@ -280,6 +285,7 @@ init_gl (GtkInspectorGeneral *gen) + } + else + #endif ++#endif + #ifdef GDK_WINDOWING_WAYLAND + if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ())) + { +diff --git a/tests/Makefile.am b/tests/Makefile.am +index ee1e8b5..e6c6502 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -80,8 +80,6 @@ noinst_PROGRAMS = $(TEST_PROGS) \ + testfullscreen \ + testgeometry \ + testgiconpixbuf \ +- testglarea \ +- testglblending \ + testgrid \ + testgtk \ + testheaderbar \ +@@ -172,12 +170,18 @@ noinst_PROGRAMS = $(TEST_PROGS) \ + testactionbar \ + testwindowsize \ + testpopover \ +- gdkgears \ + listmodel \ + testpopup \ + testpopupat \ + $(NULL) + ++if HAVE_OPENGL ++noinst_PROGRAMS += ++ testglarea \ ++ testglblending \ ++ gdkgears ++endif ++ + if USE_WAYLAND + noinst_PROGRAMS += testforeign + endif +diff --git a/testsuite/gtk/objects-finalize.c b/testsuite/gtk/objects-finalize.c +index 24540e3..e0f863a 100644 +--- a/testsuite/gtk/objects-finalize.c ++++ b/testsuite/gtk/objects-finalize.c +@@ -116,7 +116,9 @@ main (int argc, char **argv) + all_types[i] != GDK_TYPE_X11_DEVICE_MANAGER_CORE && + all_types[i] != GDK_TYPE_X11_DEVICE_MANAGER_XI2 && + all_types[i] != GDK_TYPE_X11_DISPLAY_MANAGER && ++#ifdef HAVE_OPENGL + all_types[i] != GDK_TYPE_X11_GL_CONTEXT && ++#endif + #endif + /* Not allowed to finalize a GdkPixbufLoader without calling gdk_pixbuf_loader_close() */ + all_types[i] != GDK_TYPE_PIXBUF_LOADER && diff --git a/meta-gnome/recipes-gnome/gtk+/gtk+3/link_fribidi.patch b/meta-gnome/recipes-gnome/gtk+/gtk+3/link_fribidi.patch new file mode 100644 index 0000000..e4bbd79 --- /dev/null +++ b/meta-gnome/recipes-gnome/gtk+/gtk+3/link_fribidi.patch @@ -0,0 +1,19 @@ +Link with libfribidi, this is to avoid under linking where these functions are +used but the library is not linked in, and they are marked undefined by BFD linker +but gold linker refuses to link + +| ./.libs/libgdk-3.so: error: undefined reference to 'fribidi_get_bidi_type' + +Signed-off-by: Khem Raj +Upstream-Status: Pending + +--- a/gdk/Makefile.am ++++ b/gdk/Makefile.am +@@ -55,6 +55,7 @@ LDADD = \ + -version-info $(LT_VERSION_INFO) \ + -export-dynamic \ + -rpath $(libdir) \ ++ -lfribidi \ + $(no_undefined) + + # diff --git a/meta-gnome/recipes-gnome/gtk+/gtk+3/sort-resources.patch b/meta-gnome/recipes-gnome/gtk+/gtk+3/sort-resources.patch new file mode 100644 index 0000000..7f87372 --- /dev/null +++ b/meta-gnome/recipes-gnome/gtk+/gtk+3/sort-resources.patch @@ -0,0 +1,19 @@ +If the resources file isn't sorted in some way then libgdk.so will differ +depending on the inode order of the resource files. + +Upstream-Status: Pending +Signed-off-by: Ross Burton + +diff --git a/gdk/Makefile.am b/gdk/Makefile.am +index e25b57ba50..26f2d57c6e 100644 +--- a/gdk/Makefile.am ++++ b/gdk/Makefile.am +@@ -465,7 +465,7 @@ stamp-gc-h: $(top_builddir)/config.status + # Resources + # + +-glsl_sources := $(wildcard $(srcdir)/resources/glsl/*.glsl) ++glsl_sources := $(sort $(wildcard $(srcdir)/resources/glsl/*.glsl)) + + gdk.gresource.xml: Makefile.am + $(AM_V_GEN) echo "" > $@; \ diff --git a/meta-gnome/recipes-gnome/gtk+/gtk+3_3.24.14.bad b/meta-gnome/recipes-gnome/gtk+/gtk+3_3.24.14.bad new file mode 100644 index 0000000..ab1f87c --- /dev/null +++ b/meta-gnome/recipes-gnome/gtk+/gtk+3_3.24.14.bad @@ -0,0 +1,20 @@ +require gtk+3.inc + +MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" + +SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \ + file://0001-Hardcoded-libtool.patch \ + file://0002-Do-not-try-to-initialize-GL-without-libGL.patch \ + file://0003-Add-disable-opengl-configure-option.patch \ + file://link_fribidi.patch \ + file://sort-resources.patch \ + " +SRC_URI[md5sum] = "62e39212fa0a84016a3392a9d291faf8" +SRC_URI[sha256sum] = "1c4d69f93ab884fd80c6b95115bfbc12d51ecd029178b6dad3672fdc5ff91e88" + +S = "${WORKDIR}/gtk+-${PV}" + +LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ + file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \ + file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \ + file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1" diff --git a/meta-gnome/recipes-gnome/gtk+/gtk+3_3.24.20.bb b/meta-gnome/recipes-gnome/gtk+/gtk+3_3.24.20.bb new file mode 100644 index 0000000..0b949b3 --- /dev/null +++ b/meta-gnome/recipes-gnome/gtk+/gtk+3_3.24.20.bb @@ -0,0 +1,20 @@ +require gtk+3.inc + +MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" + +SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \ + file://0001-Hardcoded-libtool.patch \ + file://0002-Do-not-try-to-initialize-GL-without-libGL.patch \ + file://0003-Add-disable-opengl-configure-option.patch \ + file://link_fribidi.patch \ + " + +SRC_URI[md5sum] = "b302acc0a4b42e2980ef18628f9ce951" +SRC_URI[sha256sum] = "2dac69f716e8d04ba7a95091589e2baaec95dcace932cb15839163db479b1df3" + +S = "${WORKDIR}/gtk+-${PV}" + +LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ + file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \ + file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \ + file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1" diff --git a/meta-gnome/recipes-gnome/gvfs/gvfs_1.40.1.bb b/meta-gnome/recipes-gnome/gvfs/gvfs_1.44.1.bb similarity index 87% rename from meta-gnome/recipes-gnome/gvfs/gvfs_1.40.1.bb rename to meta-gnome/recipes-gnome/gvfs/gvfs_1.44.1.bb index 036c13e..e3c39bd 100644 --- a/meta-gnome/recipes-gnome/gvfs/gvfs_1.40.1.bb +++ b/meta-gnome/recipes-gnome/gvfs/gvfs_1.44.1.bb @@ -3,14 +3,14 @@ LICENSE = "LGPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=05df38dd77c35ec8431f212410a3329e" GNOMEBASEBUILDCLASS = "meson" -inherit gnome bash-completion gettext upstream-version-is-even +inherit gnomebase gtk-icon-cache gconf mime bash-completion gettext upstream-version-is-even -DEPENDS += "libsecret glib-2.0 gconf libgudev udisks2 polkit shadow-native libusb1" +DEPENDS += "libsecret glib-2.0 gconf libgudev udisks2 polkit shadow-native libusb1 gsettings-desktop-schemas" SRC_URI = "https://download.gnome.org/sources/${BPN}/${@gnome_verdir("${PV}")}/${BPN}-${PV}.tar.xz;name=archive" -SRC_URI[archive.md5sum] = "78496947d11a330d5435d669eade70ad" -SRC_URI[archive.sha256sum] = "927af496efee4767f1ba12694190f9c93bc512a44854e88dbb6f5792abfad6b1" +SRC_URI[archive.md5sum] = "72383474f52d05c21ef2be96d0b91974" +SRC_URI[archive.sha256sum] = "50ef3245d1b03666a40455109169a2a1bd51419fd2d51f9fa6cfd4f89f04fb46" EXTRA_OEMESON = " \ -Dadmin=false \ diff --git a/meta-gnome/recipes-gnome/mutter/mutter_3.32.1.bb b/meta-gnome/recipes-gnome/mutter/mutter_3.32.1.bb deleted file mode 100644 index bcb82df..0000000 --- a/meta-gnome/recipes-gnome/mutter/mutter_3.32.1.bb +++ /dev/null @@ -1,27 +0,0 @@ -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRC_URI[archive.md5sum] = "6748ec4afdef5e06a9d5639cba3a5cdb" -SRC_URI[archive.sha256sum] = "520082efae0f60f252eed2d0e45e174524f7d7ee1e6bbdbaf5c06f0456a6e4e0" - -DEPENDS = "libxrandr libsm libx11 libxi glib-2.0 wayland-protocols libwacom mesa gtk+3 pango cairo gsettings-desktop-schemas gnome-settings-daemon xcomposite upower gnome-desktop libxkbfile json-glib wayland-native xinerama zenity libinput libcanberra" -RDEPENDS_${PN} = "zenity" - -GNOMEBASEBUILDCLASS = "meson" -inherit gettext pkgconfig autotools gobject-introspection gnome - -SRC_URI += "file://0001-dont-generate-default-modes-header.patch \ - file://0002-export-get_client_pid.patch \ - file://0001-remove-private-get_client_pid.patch \ - " -FILES_${PN} += "${datadir}/gnome-control-center ${libdir}/mutter-4/*" -FILES_${PN}-dbg += "${datadir}/mutter-4/tests ${datadir}/installed-tests" -FILES_SOLIBSDEV = "${libdir}/mutter-4/lib*.so ${libdir}/lib*.so" - -do_compile_prepend() { - export GIR_EXTRA_LIBS_PATH="${B}/cogl/cogl/.libs:${B}/cogl/cogl-pango/.libs:${B}/cogl/cogl-path/.libs:${B}/clutter/clutter/.libs" -} - -#EXTRA_OECONF = "--with-gudev --with-libwacom" -EXTRA_OEMESON = "-Dremote_desktop=false -Dxwayland_path=/usr/bin/Xwayland" - diff --git a/meta-gnome/recipes-gnome/mutter/mutter_3.36.2.bb b/meta-gnome/recipes-gnome/mutter/mutter_3.36.2.bb new file mode 100644 index 0000000..35f4c62 --- /dev/null +++ b/meta-gnome/recipes-gnome/mutter/mutter_3.36.2.bb @@ -0,0 +1,102 @@ +SUMMARY = "Window and compositing manager based on Clutter" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = " \ + xserver-xorg-cvt-native \ + libsm \ + virtual/libx11 \ + libxi \ + glib-2.0 \ + libwacom \ + xcomposite \ + libinput \ + libcanberra \ + mesa \ + upower \ + xserver-xorg \ + gtk+3 \ + gdk-pixbuf \ + cairo \ + pango \ + gsettings-desktop-schemas \ + json-glib \ + gnome-desktop \ + gnome-settings-daemon \ + libxtst \ + libxkbfile \ + xinerama \ + graphene \ + graphene-native \ + wayland-protocols \ + wayland-native \ + zenity \ + gobject-introspection \ + gobject-introspection-native \ +" + +RDEPENDS_${PN} += " xserver-xorg-xwayland zenity" + +GNOMEBASEBUILDCLASS = "meson" + +inherit gnomebase gsettings gobject-introspection gettext upstream-version-is-even distro_features_check + +SRC_URI[archive.md5sum] = "b9991b18071d6b1d0b1597702e3116c6" +SRC_URI[archive.sha256sum] = "75b3764eb059fc935a54523a62bec1bedb935284046b6daa50869b195adddaf4" + + +# x11 is still mandatory - see meson.build +REQUIRED_DISTRO_FEATURES = "x11 systemd" + +# systemd can be replaced by libelogind (not available atow - make systemd +# mandatory distro feature) +LOGIND ?= "systemd" + + +EXTRA_OEMESON += " \ + -Dremote_desktop=false \ + -Dprofiler=false \ + -Dcogl_tests=false \ + -Dlibwacom=true \ + -Dxwayland_initfd=disabled \ + -Dxwayland_path=/usr/bin/Xwayland \ + -Dgles2_libname=libGLESv2.so.2 \ +" + +MUTTER_API_NAME = "mutter-6" + +#do_compile_prepend() { +# export GIR_EXTRA_LIBS_PATH="${B}/cogl/cogl/.libs:${B}/cogl/cogl-pango/.libs:${B}/cogl/cogl-path/.libs:${B}/clutter/clutter/.libs" +#} + +do_install_append() { + # Add gir links in standard paths. That makes dependents life much easier + # to find them + install -d ${D}${datadir}/gir-1.0 + for gir_full in `find ${D}${libdir}/${MUTTER_API_NAME} -name '*.gir'`; do + gir=`basename "$gir_full"` + ln -sr "${D}${libdir}/${MUTTER_API_NAME}/$gir" "${D}${datadir}/gir-1.0/$gir" + done +} + +PACKAGES =+ "${PN}-tests" + +FILES_${PN} += " \ + ${datadir}/gnome-control-center \ + ${libdir}/${MUTTER_API_NAME}/lib*${SOLIBS} \ + ${libdir}/${MUTTER_API_NAME}/*.typelib \ + ${libdir}/${MUTTER_API_NAME}/plugins \ +" + +FILES_${PN}-tests += " \ + ${datadir}/installed-tests \ + ${datadir}/${MUTTER_API_NAME}/tests \ + ${libexecdir}/installed-tests/${MUTTER_API_NAME} \ +" + +FILES_${PN}-dev += " \ + ${libdir}/${MUTTER_API_NAME}/*.gir \ + ${libdir}/${MUTTER_API_NAME}/lib*.so \ +" + + diff --git a/meta-gnome/recipes-gnome/nautilus/nautilus_3.36.2.bb b/meta-gnome/recipes-gnome/nautilus/nautilus_3.36.2.bb new file mode 100644 index 0000000..e2bb63e --- /dev/null +++ b/meta-gnome/recipes-gnome/nautilus/nautilus_3.36.2.bb @@ -0,0 +1,29 @@ +SUMMARY = "GNOME file manager" +HOMEPAGE = "https://wiki.gnome.org/action/show/Apps/Files" + +LICENSE = "GPLv3 & LGPLv2.1" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504 \ + file://libnautilus-extension/LICENSE;md5=321bf41f280cf805086dd5a720b37785" + +GNOMEBASEBUILDCLASS = "meson" +inherit gnomebase gobject-introspection gettext + +SRC_URI[archive.md5sum] = "232e60565be545d4aca737f6a89514c9" +SRC_URI[archive.sha256sum] = "26673c9599502452cf299358729be8b554066a9b670d89b24e245160d15776fa" + + +FILES_${PN} += "\ + ${datadir}/glib-2.0/schemas \ + ${datadir}/gnome-shell/search-providers \ + ${datadir}/metainfo/org.gnome.Nautilus.appdata.xml \ + ${datadir}/icons/hicolor/ \ + ${datadir}/dbus-1/services \ +" + +DEPENDS += "gtk+3 glib-2.0 pango gnome-autoar libxml2 gnome-desktop tracker gexiv2" + +EXTRA_OEMESON = "-Dselinux=false -Dpackagekit=false -Dextensions=false -Dintrospection=true" + +do_install_append () { + rm ${D}${datadir}/applications/nautilus-autorun-software.desktop +} diff --git a/meta-gnome/recipes-gnome/network-manager-applet/network-manager-applet_1.8.18.bb b/meta-gnome/recipes-gnome/network-manager-applet/network-manager-applet_1.8.24.bb similarity index 79% rename from meta-gnome/recipes-gnome/network-manager-applet/network-manager-applet_1.8.18.bb rename to meta-gnome/recipes-gnome/network-manager-applet/network-manager-applet_1.8.24.bb index d46966c..e6da1ab 100644 --- a/meta-gnome/recipes-gnome/network-manager-applet/network-manager-applet_1.8.18.bb +++ b/meta-gnome/recipes-gnome/network-manager-applet/network-manager-applet_1.8.24.bb @@ -8,8 +8,8 @@ DEPENDS = "gcr iso-codes networkmanager libgudev gtk+3 intltool-native modemmana GNOMEBASEBUILDCLASS = "meson" inherit gnomebase gettext gobject-introspection -SRC_URI[archive.md5sum] = "34923579b39360db64649342ee6735d8" -SRC_URI[archive.sha256sum] = "23dc1404f1e0622b7c4718b6d978b101d5e4d9be0b92133b3863a4dc29786178" +SRC_URI[archive.md5sum] = "5c1bf351fde5adc12200345550516050" +SRC_URI[archive.sha256sum] = "118bbb8a5027634b62e8b45b16ceafce74441529c99bf230654e3bec38f9fbbf" FILES_${PN} += "${datadir}/metainfo" diff --git a/meta-gnome/recipes-gnome/rest/rest_0.8.1.bb b/meta-gnome/recipes-gnome/rest/rest_0.8.1.bb index a43985d..49cc46d 100644 --- a/meta-gnome/recipes-gnome/rest/rest_0.8.1.bb +++ b/meta-gnome/recipes-gnome/rest/rest_0.8.1.bb @@ -6,7 +6,7 @@ SRC_URI[archive.sha256sum] = "0513aad38e5d3cedd4ae3c551634e3be1b9baaa79775e53b2d DEPENDS = "glib-2.0 libsoup-2.4 libxml2" -inherit gnome +inherit gnomebase gtk-icon-cache gconf mime EXTRA_OECONF = "--enable-introspection=no" diff --git a/meta-gnome/recipes-gnome/vte/vte_0.56.0.bb b/meta-gnome/recipes-gnome/vte/vte_0.56.0.bb deleted file mode 100644 index 6f817ce..0000000 --- a/meta-gnome/recipes-gnome/vte/vte_0.56.0.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "Virtual terminal emulator GTK+ widget library" -BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte" -LICENSE = "LGPLv2.1+" -DEPENDS = "glib-2.0 gtk+3 libpcre2 intltool-native libxml2-native gperf-native gnutls" - -LIC_FILES_CHKSUM = "file://COPYING.GPL3;md5=2f31b266d3440dd7ee50f92cf67d8e6c" - -inherit gnomebase gtk-doc distro_features_check upstream-version-is-even gobject-introspection vala - -SRC_URI[archive.md5sum] = "67d3c07cfd59bfe1872a95dcc22feeff" -SRC_URI[archive.sha256sum] = "5fab50e66b9d5bb7dfc6a1a9c334ed10d60b63f4a222f11281bba977ae11b7f0" - -ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" - -# Help g-ir-scanner find the .so for linking -do_compile_prepend() { - export GIR_EXTRA_LIBS_PATH="${B}/src/.libs" -} - -CFLAGS += "-D_GNU_SOURCE" - -EXTRA_OECONF = "--with-gnutls" - -# libtool adds "-nostdlib" when g++ is used. This breaks PIE builds. -# Use libtool-cross (which has a hack to prevent that) instead. -EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" - -PACKAGES =+ "libvte" -FILES_libvte = "${libdir}/*.so.* ${libdir}/girepository-1.0/*" diff --git a/meta-gnome/recipes-gnome/vte/vte_0.60.3.bb b/meta-gnome/recipes-gnome/vte/vte_0.60.3.bb new file mode 100644 index 0000000..3783973 --- /dev/null +++ b/meta-gnome/recipes-gnome/vte/vte_0.60.3.bb @@ -0,0 +1,57 @@ +SUMMARY = "Virtual terminal emulator GTK+ widget library" +BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte" +LICENSE = "GPLv3 & LGPLv3+ & LGPLv2.1+" +LICENSE_libvte = "LGPLv3+" + +LIC_FILES_CHKSUM = " \ + file://COPYING.GPL3;md5=2f31b266d3440dd7ee50f92cf67d8e6c \ + file://COPYING.LGPL2;md5=4fbd65380cdd255951079008b364516c \ + file://COPYING.LGPL3;md5=b52f2d57d10c4f7ee67a7eb9615d5d24 \ +" + +DEPENDS = "glib-2.0 gtk+3 libpcre2 libxml2-native gperf-native icu" + +GNOMEBASEBUILDCLASS = "meson" +GIR_MESON_OPTION = 'gir' + +inherit gnomebase gtk-doc distro_features_check upstream-version-is-even gobject-introspection + +SRC_URI[archive.md5sum] = "4214712ecab2d50e2a3a07897c3ada49" +SRC_URI[archive.sha256sum] = "feb76e1181a357d86112d447a08d127e2081438df76ece83243b18609dd9822a" + +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" + +# Instead of "inherit vala" we do the relevant settings here so we can +# set DEPENDS based on PACKAGECONFIG. + +# Our patched version of Vala looks in STAGING_DATADIR for .vapi files +export STAGING_DATADIR +# Upstream Vala >= 0.11 looks in XDG_DATA_DIRS for .vapi files +export XDG_DATA_DIRS = "${STAGING_DATADIR}" + +# Help g-ir-scanner find the .so for linking +do_compile_prepend() { + export GIR_EXTRA_LIBS_PATH="${B}/src/.libs" +} + +# Package additional files +FILES_${PN}-dev += "${datadir}/vala/vapi/*" + +PACKAGECONFIG ??= "gnutls" +PACKAGECONFIG[vala] = "-Dvapi=true,-Dvapi=false,vala-native vala" +PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls" +PACKAGECONFIG[systemd] = "-D_systemd=true,-D_systemd=false,systemd" +# vala requires gir +PACKAGECONFIG_remove_class-native = "vala" +EXTRA_OECONF = "--with-gnutls" + +CFLAGS += "-D_GNU_SOURCE" + +PACKAGES =+ "libvte ${PN}-prompt" +FILES_libvte = "${libdir}/*.so.* ${libdir}/girepository-1.0/*" +FILES_${PN}-prompt = " \ + ${sysconfdir}/profile.d \ + ${libexecdir}/vte-urlencode-cwd \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-gnome/recipes-gnome/wayland/libinput/determinism.patch b/meta-gnome/recipes-gnome/wayland/libinput/determinism.patch new file mode 100644 index 0000000..cb55403 --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/libinput/determinism.patch @@ -0,0 +1,21 @@ +This finds our outer git tree and that version information breaks +determinism of this recipe. Disable it. + +RP 2020/2/6 + +Upstream-Status: Pending +Signed-off-by: Richard Purdie + +Index: libinput-1.14.3/meson.build +=================================================================== +--- libinput-1.14.3.orig/meson.build ++++ libinput-1.14.3/meson.build +@@ -387,7 +387,7 @@ pkgconfig.generate( + libraries : lib_libinput + ) + +-git_version_h = vcs_tag(command : ['git', 'describe'], ++git_version_h = vcs_tag(command : ['false'], + fallback : 'unknown', + input : 'src/libinput-git-version.h.in', + output :'libinput-git-version.h') diff --git a/meta-gnome/recipes-gnome/wayland/libinput_1.15.2.bb b/meta-gnome/recipes-gnome/wayland/libinput_1.15.2.bb new file mode 100644 index 0000000..8105327 --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/libinput_1.15.2.bb @@ -0,0 +1,40 @@ +SUMMARY = "Library to handle input devices in Wayland compositors" +DESCRIPTION = "libinput is a library to handle input devices in Wayland \ +compositors and to provide a generic X.Org input driver. It provides \ +device detection, device handling, input device event processing and \ +abstraction so minimize the amount of custom input code compositors need to \ +provide the common set of functionality that users expect." +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=1f2ea9ebff3a2c6d458faf58492efb63" + +DEPENDS = "libevdev udev mtdev" + +SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \ + file://determinism.patch \ + " +SRC_URI[md5sum] = "eb6bd2907ad33d53954d70dfb881a643" +SRC_URI[sha256sum] = "971c3fbfb624f95c911adeb2803c372e4e3647d1b98f278f660051f834597747" + +UPSTREAM_CHECK_REGEX = "libinput-(?P\d+\.\d+\.(?!9\d+)\d+)" + +inherit meson pkgconfig lib_package + +PACKAGECONFIG ??= "" +PACKAGECONFIG[libwacom] = "-Dlibwacom=true,-Dlibwacom=false,libwacom" +PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3" + +UDEVDIR = "`pkg-config --variable=udevdir udev`" + +EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} \ + -Ddocumentation=false \ + -Dtests=false \ + -Dzshcompletiondir=no" + +# package name changed in 1.8.1 upgrade: make sure package upgrades work +RPROVIDES_${PN} = "libinput" +RREPLACES_${PN} = "libinput" +RCONFLICTS_${PN} = "libinput" + diff --git a/meta-gnome/recipes-gnome/wayland/mtdev_1.1.6.bb b/meta-gnome/recipes-gnome/wayland/mtdev_1.1.6.bb new file mode 100644 index 0000000..7c1cb5e --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/mtdev_1.1.6.bb @@ -0,0 +1,18 @@ +SUMMARY = "Multitouch Protocol Translation Library" + +DESCRIPTION = "mtdev is a library which transforms all variants of kernel \ +multitouch events to the slotted type B protocol. The events put into mtdev may \ +be from any MT device, specifically type A without contact tracking, type A with \ +contact tracking, or type B with contact tracking" + +HOMEPAGE = "http://bitmath.org/code/mtdev/" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=ea6bd0268bb0fcd6b27698616ceee5d6" + +SRC_URI = "http://bitmath.org/code/${BPN}/${BP}.tar.bz2" +SRC_URI[md5sum] = "bf8ef2482e84a00b5db8fbd3ce00e249" +SRC_URI[sha256sum] = "15d7b28da8ac71d8bc8c9287c2045fd174267bc740bec10cfda332dc1204e0e0" + +inherit autotools pkgconfig diff --git a/meta-gnome/recipes-gnome/wayland/wayland-protocols_1.20.bb b/meta-gnome/recipes-gnome/wayland/wayland-protocols_1.20.bb new file mode 100644 index 0000000..3fb78f6 --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/wayland-protocols_1.20.bb @@ -0,0 +1,22 @@ +SUMMARY = "Collection of additional Wayland protocols" +DESCRIPTION = "Wayland protocols that add functionality not \ +available in the Wayland core protocol. Such protocols either add \ +completely new functionality, or extend the functionality of some other \ +protocol either in Wayland core, or some other protocol in \ +wayland-protocols." +HOMEPAGE = "http://wayland.freedesktop.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \ + file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53" + +SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ + " +SRC_URI[md5sum] = "b0836533a3f2dc6585b1dae00341157f" +SRC_URI[sha256sum] = "9782b7a1a863d82d7c92478497d13c758f52e7da4f197aa16443f73de77e4de7" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" + +inherit allarch autotools pkgconfig + +PACKAGES = "${PN}" +FILES_${PN} += "${datadir}/pkgconfig/wayland-protocols.pc" diff --git a/meta-gnome/recipes-gnome/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch b/meta-gnome/recipes-gnome/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch new file mode 100644 index 0000000..e445838 --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch @@ -0,0 +1,39 @@ +From e6783c99f051c6d8252db5f388d805cef0e16357 Mon Sep 17 00:00:00 2001 +From: Joshua Watt +Date: Thu, 20 Feb 2020 15:20:45 -0600 +Subject: [PATCH] build: Fix strndup detection on MinGW + +GCC and meson conspire together to incorrectly detect that strndup() +exists on MinGW as __builtin_strndup, when no such function exists. As a +work around, meson will skip looking for __builtin functions if an +'#include' is in the prefix, so add '#include ' when looking +for strndup(). + +See: https://github.com/mesonbuild/meson/issues/3672 + +Signed-off-by: Joshua Watt +Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/wayland/merge_requests/63] +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 26b084f..c05d019 100644 +--- a/meson.build ++++ b/meson.build +@@ -36,11 +36,11 @@ have_funcs = [ + 'posix_fallocate', + 'prctl', + 'memfd_create', +- 'strndup', + ] + foreach f: have_funcs + config_h.set('HAVE_' + f.underscorify().to_upper(), cc.has_function(f)) + endforeach ++config_h.set('HAVE_STRNDUP', cc.has_function('strndup', prefix:'#include ')) + + if get_option('libraries') + ffi_dep = dependency('libffi') +-- +2.17.1 + diff --git a/meta-gnome/recipes-gnome/wayland/wayland/0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch b/meta-gnome/recipes-gnome/wayland/wayland/0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch new file mode 100644 index 0000000..61de0e0 --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/wayland/0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch @@ -0,0 +1,115 @@ +From b2c74f6a3dbe0aee2413800837314136947a4985 Mon Sep 17 00:00:00 2001 +From: Jan Beich +Date: Sat, 15 Feb 2020 02:03:45 +0000 +Subject: [PATCH] meson/tests: add missing dependencies on protocol headers + +In file included from ../tests/connection-test.c:43: +In file included from ../tests/test-compositor.h:30: +../src/wayland-client.h:40:10: fatal error: 'wayland-client-protocol.h' file not found + #include "wayland-client-protocol.h" + ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +In file included from ../tests/display-test.c:45: +In file included from ../src/wayland-server.h:104: +src/wayland-server-protocol.h:4454:2: error: unterminated /* comment + /** + ^ +In file included from ../tests/cpp-compile-test.cpp:2: +In file included from src/wayland-server-protocol.h:8: +In file included from ../src/wayland-server.h:104: +src/wayland-server-protocol.h:3:2: error: unterminated conditional directive + #ifndef WAYLAND_SERVER_PROTOCOL_H + ^ +../tests/headers-protocol-test.c:33:2: error: including wayland-server-protocol.h did not include wayland-server.h! + #error including wayland-server-protocol.h did not include wayland-server.h! + ^ +In file included from ../tests/headers-protocol-test.c:26: +In file included from src/wayland-client-protocol.h:8: +In file included from ../src/wayland-client.h:40: +src/wayland-client-protocol.h:1358:2: error: unterminated conditional directive + #ifndef WL_SHM_FORMAT_ENUM + ^ +In file included from ../tests/protocol-logger-test.c:34: +In file included from ../src/wayland-client.h:40: +src/wayland-client-protocol.h:2613:1: error: unterminated /* comment +/** +^ +../tests/resources-test.c:49:36: error: use of undeclared identifier 'wl_seat_interface' + res = wl_resource_create(client, &wl_seat_interface, 4, 0); + ^ +Upstream-Status: Backport +Signed-off-by: Alexander Kanavin +--- + tests/meson.build | 26 ++++++++++++++++++-------- + 1 file changed, 18 insertions(+), 8 deletions(-) + +diff --git a/tests/meson.build b/tests/meson.build +index c28a2a3..f1af7b4 100644 +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -69,7 +69,7 @@ test( + executable( + 'cpp-compile-test', + 'cpp-compile-test.cpp', +- wayland_server_protocol_core_h, ++ wayland_server_protocol_h, + include_directories: src_inc + ) + ) +@@ -91,17 +91,25 @@ tests = { + 'array-test': [], + 'client-test': [ wayland_server_protocol_h ], + 'display-test': [ ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, + tests_server_protocol_h, + tests_client_protocol_c, + tests_protocol_c, + ], +- 'connection-test': [ wayland_server_protocol_h ], ++ 'connection-test': [ ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, ++ ], + 'event-loop-test': [ wayland_server_protocol_h ], + 'fixed-test': [], + 'interface-test': [ wayland_client_protocol_h ], + 'list-test': [], + 'map-test': [], +- 'sanity-test' : [ wayland_server_protocol_h ], ++ 'sanity-test' : [ ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, ++ ], + 'socket-test': [ + wayland_client_protocol_h, + wayland_server_protocol_h, +@@ -116,7 +124,7 @@ tests = { + files('../src/wayland-server.c'), + wayland_server_protocol_h, + ], +- 'resources-test': [ wayland_server_protocol_core_h ], ++ 'resources-test': [ wayland_server_protocol_h ], + 'message-test': [ + wayland_client_protocol_h, + wayland_server_protocol_h, +@@ -126,14 +134,16 @@ tests = { + wayland_server_protocol_h, + ], + 'protocol-logger-test': [ +- wayland_server_protocol_core_h, +- wayland_client_protocol_core_h, ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, + ], + 'headers-test': [ ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, + 'headers-protocol-test.c', +- 'headers-protocol-core-test.c', +- wayland_server_protocol_core_h, + wayland_client_protocol_core_h, ++ wayland_server_protocol_core_h, ++ 'headers-protocol-core-test.c', + ], + 'os-wrappers-test': [], + } diff --git a/meta-gnome/recipes-gnome/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch b/meta-gnome/recipes-gnome/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch new file mode 100644 index 0000000..2199548 --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch @@ -0,0 +1,26 @@ +From cbb28635a1079d68e62dbaa1e21791a20dbbbaf4 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Mon, 17 Feb 2020 21:46:18 +0100 +Subject: [PATCH] Do not hardcode the path to wayland-scanner + +This results in host contamination during builds. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin +--- + src/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/meson.build b/src/meson.build +index 294aee0..7e410fa 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -49,7 +49,7 @@ pkgconfig.generate( + 'datarootdir=' + join_paths('${prefix}', get_option('datadir')), + 'pkgdatadir=' + join_paths('${datarootdir}', meson.project_name()), + 'bindir=' + join_paths('${prefix}', get_option('bindir')), +- 'wayland_scanner=${bindir}/wayland-scanner' ++ 'wayland_scanner=wayland-scanner' + ], + filebase: 'wayland-scanner' + ) diff --git a/meta-gnome/recipes-gnome/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch b/meta-gnome/recipes-gnome/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch new file mode 100644 index 0000000..f98037a --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch @@ -0,0 +1,27 @@ +From 2582d2653ba80917d7bc47088e1a5f49530fddaa Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Sun, 16 Feb 2020 16:29:53 +0100 +Subject: [PATCH] meson.build: find the native wayland-scanner directly in PATH + +Otherwise, meson attempts to use the target pkg-config and fails. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin +--- + src/meson.build | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/meson.build b/src/meson.build +index 3e8c9bf..294aee0 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -55,8 +55,7 @@ pkgconfig.generate( + ) + + if meson.is_cross_build() +- scanner_dep = dependency('wayland-scanner', native: true, version: '>=1.14.0') +- wayland_scanner_for_build = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner')) ++ wayland_scanner_for_build = find_program('wayland-scanner') + else + wayland_scanner_for_build = wayland_scanner + endif diff --git a/meta-gnome/recipes-gnome/wayland/wayland/run-ptest b/meta-gnome/recipes-gnome/wayland/wayland/run-ptest new file mode 100644 index 0000000..7e8d9de --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/wayland/run-ptest @@ -0,0 +1,17 @@ +#!/bin/sh + +export WAYLAND_SCANNER=wayland-scanner +export TEST_DATA_DIR=tests/data +export TEST_OUTPUT_DIR=tests/output +export SED=sed +export WAYLAND_EGL_LIB=/usr/lib/libwayland-egl.so.1 +export NM=nm + +for i in `ls tests/*-test tests/wayland-egl-symbols-check tests/scanner-test.sh`; do + $i + if [ $? -eq 0 ]; then + echo "PASS: $i" + else + echo "FAIL: $i" + fi +done diff --git a/meta-gnome/recipes-gnome/wayland/wayland_1.18.0.bad b/meta-gnome/recipes-gnome/wayland/wayland_1.18.0.bad new file mode 100644 index 0000000..00be3aa --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/wayland_1.18.0.bad @@ -0,0 +1,62 @@ +SUMMARY = "Wayland, a protocol between a compositor and clients" +DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \ +as well as a C library implementation of that protocol. The compositor can be \ +a standalone display server running on Linux kernel modesetting and evdev \ +input devices, an X application, or a wayland client itself. The clients can \ +be traditional applications, X servers (rootless or fullscreen) or other \ +display servers." +HOMEPAGE = "http://wayland.freedesktop.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \ + file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce" + +DEPENDS = "expat libffi wayland-native" + +SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ + file://run-ptest \ + file://0002-meson.build-find-the-native-wayland-scanner-directly.patch \ + file://0002-Do-not-hardcode-the-path-to-wayland-scanner.patch \ + file://0001-build-Fix-strndup-detection-on-MinGW.patch \ + file://0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch \ + " +SRC_URI[md5sum] = "23317697b6e3ff2e1ac8c5ba3ed57b65" +SRC_URI[sha256sum] = "4675a79f091020817a98fd0484e7208c8762242266967f55a67776936c2e294d" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" + +inherit meson pkgconfig ptest + +PACKAGECONFIG ??= "dtd-validation" +PACKAGECONFIG[dtd-validation] = "-Ddtd_validation=true,-Ddtd_validation=false,libxml2,," + +EXTRA_OEMESON = "-Ddocumentation=false" +EXTRA_OEMESON_class-native = "-Ddocumentation=false -Dlibraries=false" + +# Wayland installs a M4 macro for other projects to use, which uses the target +# pkg-config to find files. Replace pkg-config with pkg-config-native. +do_install_append_class-native() { + sed -e 's,PKG_CHECK_MODULES(.*),,g' \ + -e 's,$PKG_CONFIG,pkg-config-native,g' \ + -i ${D}/${datadir}/aclocal/wayland-scanner.m4 +} + +do_install_ptest() { + mkdir -p ${D}${PTEST_PATH}/tests/data + cp -rf ${B}/tests/*-test ${B}/tests/*-checker ${D}${PTEST_PATH}/tests + cp -rf ${B}/tests/*-checker ${D}${PTEST_PATH} + cp -rf ${S}/tests/scanner-test.sh ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/data/* ${D}${PTEST_PATH}/tests/data/ + cp -rf ${S}/egl/wayland-egl-symbols-check ${D}${PTEST_PATH}/tests/ +} + +sysroot_stage_all_append_class-target () { + rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4 + cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/ +} + +FILES_${PN} = "${libdir}/*${SOLIBS}" +FILES_${PN}-dev += "${bindir} ${datadir}/wayland" + +BBCLASSEXTEND = "native nativesdk" + +RDEPENDS_${PN}-ptest += "binutils sed" diff --git a/meta-gnome/recipes-gnome/wayland/weston-init.bb b/meta-gnome/recipes-gnome/wayland/weston-init.bb new file mode 100644 index 0000000..2ad165c --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/weston-init.bb @@ -0,0 +1,59 @@ +SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +SRC_URI = "file://init \ + file://weston.env \ + file://weston.ini \ + file://weston@.service \ + file://71-weston-drm.rules \ + file://weston-start" + +S = "${WORKDIR}" + +do_install() { + install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston + install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini + install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston + + # Install Weston systemd service and accompanying udev rule + install -D -p -m0644 ${WORKDIR}/weston@.service ${D}${systemd_system_unitdir}/weston@.service + sed -i -e s:/etc:${sysconfdir}:g \ + -e s:/usr/bin:${bindir}:g \ + -e s:/var:${localstatedir}:g \ + ${D}${systemd_unitdir}/system/weston@.service + install -D -p -m0644 ${WORKDIR}/71-weston-drm.rules \ + ${D}${sysconfdir}/udev/rules.d/71-weston-drm.rules + # Install weston-start script + install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start + sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start + sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start +} + +do_install_append_libc-musl_qemux86() { + echo "WESTON_DISABLE_ATOMIC=Y" >> ${D}${sysconfdir}/default/weston +} + +do_install_append_libc-musl_qemux86-64() { + echo "WESTON_DISABLE_ATOMIC=Y" >> ${D}${sysconfdir}/default/weston +} + +inherit update-rc.d distro_features_check systemd + +# rdepends on weston which depends on virtual/egl +REQUIRED_DISTRO_FEATURES = "opengl" + +RDEPENDS_${PN} = "weston kbd" + +INITSCRIPT_NAME = "weston" +INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." + +FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/weston@.service ${sysconfdir}/default/weston" + +CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston" + +SYSTEMD_SERVICE_${PN} = "weston@%i.service" +SYSTEMD_AUTO_ENABLE = "disable" + diff --git a/meta-gnome/recipes-gnome/wayland/weston-init/71-weston-drm.rules b/meta-gnome/recipes-gnome/wayland/weston-init/71-weston-drm.rules new file mode 100644 index 0000000..1a1b8bb --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/weston-init/71-weston-drm.rules @@ -0,0 +1,2 @@ +ACTION=="add", SUBSYSTEM=="graphics", KERNEL=="fb0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="weston@root.service" +ACTION=="add", SUBSYSTEM=="drm", KERNEL=="card0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="weston@root.service" diff --git a/meta-gnome/recipes-gnome/wayland/weston-init/init b/meta-gnome/recipes-gnome/wayland/weston-init/init new file mode 100644 index 0000000..d3e87c6 --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/weston-init/init @@ -0,0 +1,53 @@ +#!/bin/sh +# +### BEGIN INIT INFO +# Provides: weston +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO + +if test -e /etc/default/weston ; then + . /etc/default/weston +fi + +killproc() { + pid=`/bin/pidof $1` + [ "$pid" != "" ] && kill $pid +} + +read CMDLINE < /proc/cmdline +for x in $CMDLINE; do + case $x in + weston=false) + echo "Weston disabled" + exit 0; + ;; + esac +done + +case "$1" in + start) + . /etc/profile + + weston-start -- $OPTARGS + ;; + + stop) + echo "Stopping Weston" + killproc weston + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "usage: $0 { start | stop | restart }" + ;; +esac + +exit 0 diff --git a/meta-gnome/recipes-gnome/wayland/weston-init/qemuall/weston.ini b/meta-gnome/recipes-gnome/wayland/weston-init/qemuall/weston.ini new file mode 100644 index 0000000..17ebd7f --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/weston-init/qemuall/weston.ini @@ -0,0 +1,2 @@ +[core] +backend=fbdev-backend.so diff --git a/meta-gnome/recipes-gnome/wayland/weston-init/qemux86-64/weston.ini b/meta-gnome/recipes-gnome/wayland/weston-init/qemux86-64/weston.ini new file mode 100644 index 0000000..e69de29 diff --git a/meta-gnome/recipes-gnome/wayland/weston-init/qemux86/weston.ini b/meta-gnome/recipes-gnome/wayland/weston-init/qemux86/weston.ini new file mode 100644 index 0000000..e69de29 diff --git a/meta-gnome/recipes-gnome/wayland/weston-init/weston-start b/meta-gnome/recipes-gnome/wayland/weston-init/weston-start new file mode 100755 index 0000000..ccc7093 --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/weston-init/weston-start @@ -0,0 +1,82 @@ +#!/bin/sh +# Copyright (C) 2016 O.S. Systems Software LTDA. +# Copyright (C) 2016 Freescale Semiconductor + +export PATH="/sbin:/usr/sbin:/bin:/usr/bin" + +usage() { + cat <] [-- ] +EOF +} + +## Module support +modules_dir=@DATADIR@/weston-start + +# Add weston extra argument +add_weston_argument() { + weston_args="$weston_args $1" +} + +# Add openvt extra argument +add_openvt_argument() { + openvt_args="$openvt_args $1" +} + +if [ -n "$WAYLAND_DISPLAY" ]; then + echo "ERROR: A Wayland compositor is already running, nested Weston instance is not supported yet." + exit 1 +fi + +if [ -n "$WESTON_USER" ]; then + if [ -z "$WESTON_TTY" ]; then + echo "ERROR: If you have WESTON_USER variable set, you also need WESTON_TTY." + exit 1 + fi + weston_args_user="-u $WESTON_USER -t $WESTON_TTY" +fi + +if [ -n "$DISPLAY" ]; then + launcher="weston" +else + launcher="weston-launch $weston_args_user --" +fi + +openvt_args="-s" +while [ -n "$1" ]; do + if [ "$1" = "--" ]; then + shift + break + fi + openvt_args="$openvt_args $1" + shift +done + +weston_args=$* + +# Load and run modules +if [ -d "$modules_dir" ]; then + for m in "$modules_dir"/*; do + # Skip backup files + if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then + continue + fi + + # process module + . $m + done +fi + +if test -z "$XDG_RUNTIME_DIR"; then + export XDG_RUNTIME_DIR=/run/user/`id -u ${WESTON_USER}` + if ! test -d "$XDG_RUNTIME_DIR"; then + mkdir --parents $XDG_RUNTIME_DIR + chmod 0700 $XDG_RUNTIME_DIR + fi + if [ -n "$WESTON_USER" ] + then + chown $WESTON_USER:$WESTON_USER $XDG_RUNTIME_DIR + fi +fi + +exec openvt $openvt_args -- $launcher $weston_args --log=@LOCALSTATEDIR@/log/weston.log diff --git a/meta-gnome/recipes-gnome/wayland/weston-init/weston.env b/meta-gnome/recipes-gnome/wayland/weston-init/weston.env new file mode 100644 index 0000000..e69de29 diff --git a/meta-gnome/recipes-gnome/wayland/weston-init/weston.ini b/meta-gnome/recipes-gnome/wayland/weston-init/weston.ini new file mode 100644 index 0000000..1e6dff6 --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/weston-init/weston.ini @@ -0,0 +1,75 @@ +# configuration file for Weston + +[core] +#modules=xwayland.so,cms-colord.so +#shell=desktop-shell.so +#gbm-format=xrgb2101010 +require-input=false + +#[shell] +#background-image=/usr/share/backgrounds/gnome/Aqua.jpg +#background-color=0xff002244 +#background-type=tile +#clock-format=minutes +#panel-color=0x90ff0000 +#locking=true +#animation=zoom +#startup-animation=fade +#binding-modifier=ctrl +#num-workspaces=6 +#cursor-theme=whiteglass +#cursor-size=24 + +#lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png +#lockscreen=/usr/share/backgrounds/gnome/Garden.jpg +#homescreen=/usr/share/backgrounds/gnome/Blinds.jpg +#animation=fade + +#[launcher] +#icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png +#path=/usr/bin/gnome-terminal + +#[launcher] +#icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png +#path=/usr/bin/weston-terminal + +#[launcher] +#icon=/usr/share/icons/hicolor/24x24/apps/google-chrome.png +#path=/usr/bin/google-chrome + +#[launcher] +#icon=/usr/share/icons/gnome/24x24/apps/arts.png +#path=/build/weston-0lEgCh/weston-1.11.0/weston-flower + +#[input-method] +#path=/usr/lib/weston/weston-keyboard + +#[output] +#name=LVDS1 +#mode=1680x1050 +#transform=90 +#icc_profile=/usr/share/color/icc/colord/Bluish.icc + +#[output] +#name=VGA1 +#mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync +#transform=flipped + +#[output] +#name=X1 +#mode=1024x768 +#transform=flipped-90 + +#[libinput] +#enable_tap=true + +#[touchpad] +#constant_accel_factor = 50 +#min_accel_factor = 0.16 +#max_accel_factor = 1.0 + +#[screen-share] +#command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize + +#[xwayland] +#path=/usr/bin/Xwayland diff --git a/meta-gnome/recipes-gnome/wayland/weston-init/weston@.service b/meta-gnome/recipes-gnome/wayland/weston-init/weston@.service new file mode 100644 index 0000000..39e1930 --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/weston-init/weston@.service @@ -0,0 +1,15 @@ +[Unit] +Description=Weston Wayland Compositor +RequiresMountsFor=/run +Conflicts=plymouth-quit.service +After=systemd-user-sessions.service plymouth-quit-wait.service + +[Service] +User=%i +PAMName=login +EnvironmentFile=-/etc/default/weston +StandardError=journal +PermissionsStartOnly=true +IgnoreSIGPIPE=no + +ExecStart=/usr/bin/weston-start -v -e -- $OPTARGS diff --git a/meta-gnome/recipes-gnome/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta-gnome/recipes-gnome/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch new file mode 100644 index 0000000..62b864c --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch @@ -0,0 +1,198 @@ +From 5f2d71998eb77068cbaee2d468cbb296a42d5739 Mon Sep 17 00:00:00 2001 +From: Tom Hochstein +Date: Wed, 22 Feb 2017 15:53:30 +0200 +Subject: [PATCH] weston-launch: Provide a default version that doesn't require + PAM + +weston-launch requires PAM for starting weston as a non-root user. + +Since starting weston as root is a valid use case by itself, if +PAM is not available, provide a default version of weston-launch +without non-root-user support. + +Upstream-Status: Pending + +Signed-off-by: Tom Hochstein +Signed-off-by: Jussi Kukkonen +Signed-off-by: Denys Dmytriyenko +Signed-off-by: Ming Liu + +--- + libweston/meson.build | 16 ++++++++++++---- + libweston/weston-launch.c | 21 +++++++++++++++++++++ + meson_options.txt | 7 +++++++ + 3 files changed, 40 insertions(+), 4 deletions(-) + +diff --git a/libweston/meson.build b/libweston/meson.build +index 08d23ec..cb9fd3f 100644 +--- a/libweston/meson.build ++++ b/libweston/meson.build +@@ -216,16 +216,24 @@ dep_vertex_clipping = declare_dependency( + ) + + if get_option('weston-launch') +- dep_pam = cc.find_library('pam') ++ deps_weston_launch = [systemd_dep, dep_libdrm] + +- if not cc.has_function('pam_open_session', dependencies: dep_pam) +- error('pam_open_session not found for weston-launch') ++ if get_option('pam') ++ dep_pam = cc.find_library('pam') ++ if not cc.has_function('pam_open_session', dependencies: dep_pam) ++ error('pam_open_session not found for weston-launch') ++ endif ++ ++ if dep_pam.found() ++ deps_weston_launch += dep_pam ++ config_h.set('HAVE_PAM', '1') ++ endif + endif + + executable( + 'weston-launch', + 'weston-launch.c', +- dependencies: [dep_pam, systemd_dep, dep_libdrm], ++ dependencies: deps_weston_launch, + include_directories: common_inc, + install: true + ) +diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c +index 8a711b4..54c567a 100644 +--- a/libweston/weston-launch.c ++++ b/libweston/weston-launch.c +@@ -51,7 +51,9 @@ + + #include + #include ++#ifdef HAVE_PAM + #include ++#endif + + #ifdef HAVE_SYSTEMD_LOGIN + #include +@@ -100,8 +102,10 @@ drmSetMaster(int drm_fd) + #endif + + struct weston_launch { ++#ifdef HAVE_PAM + struct pam_conv pc; + pam_handle_t *ph; ++#endif + int tty; + int ttynr; + int sock[2]; +@@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl) + return false; + } + ++#ifdef HAVE_PAM + static int + pam_conversation_fn(int msg_count, + const struct pam_message **messages, +@@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl) + + return 0; + } ++#endif + + static int + setup_launcher_socket(struct weston_launch *wl) +@@ -431,6 +437,7 @@ quit(struct weston_launch *wl, int status) + close(wl->signalfd); + close(wl->sock[0]); + ++#ifdef HAVE_PAM + if (wl->new_user) { + err = pam_close_session(wl->ph, 0); + if (err) +@@ -438,6 +445,7 @@ quit(struct weston_launch *wl, int status) + err, pam_strerror(wl->ph, err)); + pam_end(wl->ph, err); + } ++#endif + + if (ioctl(wl->tty, KDSKBMUTE, 0) && + ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) +@@ -666,6 +674,7 @@ setup_session(struct weston_launch *wl, char **child_argv) + setenv("HOME", wl->pw->pw_dir, 1); + setenv("SHELL", wl->pw->pw_shell, 1); + ++#ifdef HAVE_PAM + env = pam_getenvlist(wl->ph); + if (env) { + for (i = 0; env[i]; ++i) { +@@ -674,6 +683,7 @@ setup_session(struct weston_launch *wl, char **child_argv) + } + free(env); + } ++#endif + + /* + * We open a new session, so it makes sense +@@ -745,8 +755,10 @@ static void + help(const char *name) + { + fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); ++#ifdef HAVE_PAM + fprintf(stderr, " -u, --user Start session as specified username,\n" + " e.g. -u joe, requires root.\n"); ++#endif + fprintf(stderr, " -t, --tty Start session on alternative tty,\n" + " e.g. -t /dev/tty4, requires -u option.\n"); + fprintf(stderr, " -v, --verbose Be verbose\n"); +@@ -760,7 +772,9 @@ main(int argc, char *argv[]) + int i, c; + char *tty = NULL; + struct option opts[] = { ++#ifdef HAVE_PAM + { "user", required_argument, NULL, 'u' }, ++#endif + { "tty", required_argument, NULL, 't' }, + { "verbose", no_argument, NULL, 'v' }, + { "help", no_argument, NULL, 'h' }, +@@ -772,11 +786,16 @@ main(int argc, char *argv[]) + while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { + switch (c) { + case 'u': ++#ifdef HAVE_PAM + wl.new_user = optarg; + if (getuid() != 0) { + fprintf(stderr, "weston: Permission denied. -u allowed for root only\n"); + exit(EXIT_FAILURE); + } ++#else ++ fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n"); ++ exit(EXIT_FAILURE); ++#endif + break; + case 't': + tty = optarg; +@@ -828,8 +847,10 @@ main(int argc, char *argv[]) + if (setup_tty(&wl, tty) < 0) + exit(EXIT_FAILURE); + ++#ifdef HAVE_PAM + if (wl.new_user && setup_pam(&wl) < 0) + exit(EXIT_FAILURE); ++#endif + + if (setup_launcher_socket(&wl) < 0) + exit(EXIT_FAILURE); +diff --git a/meson_options.txt b/meson_options.txt +index c862ecc..73ef2c3 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -73,6 +73,13 @@ option( + ) + + option( ++ 'pam', ++ type: 'boolean', ++ value: true, ++ description: 'Define if PAM is available' ++) ++ ++option( + 'xwayland', + type: 'boolean', + value: true, diff --git a/meta-gnome/recipes-gnome/wayland/weston/weston.desktop b/meta-gnome/recipes-gnome/wayland/weston/weston.desktop new file mode 100644 index 0000000..1086ae8 --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/weston/weston.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Application +Name=Weston +Comment=Wayland Compostitor +Exec=weston +Icon=weston +Terminal=false +Categories=Utility; diff --git a/meta-gnome/recipes-gnome/wayland/weston/weston.png b/meta-gnome/recipes-gnome/wayland/weston/weston.png new file mode 100644 index 0000000000000000000000000000000000000000..ea8b7e0e233c86301a88e5bc925f09b3de2f9dec GIT binary patch literal 2383 zcmV-V39$BwP)Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* z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W-9_@-A9 zP5@V6djYZ)|`OK z9lZv%3aLU)+{c%JF+=U}8}dOBK{D{W zNWcX$b5JrYEOxPeW@^NEcx`ivaBdIePgVzb3HT9mC`RoFfeNwp3h)?Sl~+jMp80-s zLuO5j>*7QqZV!K-ABE|C)qrf^7f9In7$Qtnx$!$bFf>d)2jjbgLYX@v?A5#MwdSGV zUQgILnE085LLe33IpBLhA!NJ8eIBq1@HDU+_ehPl1laKh;p`IM;*?=-ME);6 zEA9*?kOzJOd=r=p1M-ND759{*kWevaII={P{KphDM+LD?Pgu2mQSKH>guL3XT(c-1&a zK^y}P0DFNqfJ!|u%Yjlr7cd9d{uSdP-&}^)&6_Bm*?_&c205a&x)WIht^lWzg?`-C zqn88oZkY0~$Z9TQrB4E|smyC$?(h~gMd+&X-GW#aR1B~%z*x0&tFCOWlNI>MZcDkiHCXvpcpM70000bbVXQnWMOn=I&E)cX=Zr/dev/null 2>/dev/null; then + mkdir -p /tmp/.X11-unix + + add_weston_argument "--modules=xwayland.so" +fi diff --git a/meta-gnome/recipes-gnome/wayland/weston_8.0.0.bb b/meta-gnome/recipes-gnome/wayland/weston_8.0.0.bb new file mode 100644 index 0000000..53cf7c2 --- /dev/null +++ b/meta-gnome/recipes-gnome/wayland/weston_8.0.0.bb @@ -0,0 +1,112 @@ +SUMMARY = "Weston, a Wayland compositor" +DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" +HOMEPAGE = "http://wayland.freedesktop.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ + file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a" + +SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ + file://weston.png \ + file://weston.desktop \ + file://xwayland.weston-start \ + file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ +" +SRC_URI[md5sum] = "53e4810d852df0601d01fd986a5b22b3" +SRC_URI[sha256sum] = "7518b49b2eaa1c3091f24671bdcc124fd49fc8f1af51161927afa4329c027848" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" + +inherit meson pkgconfig useradd distro_features_check +# depends on virtual/egl +REQUIRED_DISTRO_FEATURES = "opengl" + +DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg" +DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" + +WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" + +EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ + ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ + launch" +# +# Compositor choices +# +# Weston on KMS +PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" +# Weston on Wayland (nested Weston) +PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" +# Weston on X11 +PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" +# Headless Weston +PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" +# Weston on framebuffer +PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" +# weston-launch +PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" +# VA-API desktop recorder +PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" +# Weston with EGL support +PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" +# Weston with lcms support +PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" +# Weston with webp support +PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" +# Weston with systemd-login support +PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" +# Weston with Xwayland support (requires X11 and Wayland) +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" +# colord CMS support +PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" +# Clients support +PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" +# Virtual remote output with GStreamer on DRM backend +PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer-1.0" +# Weston with PAM support +PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" + +do_install_append() { + # Weston doesn't need the .la files to load modules, so wipe them + rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la + + # If X11, ship a desktop file to launch it + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then + install -d ${D}${datadir}/applications + install ${WORKDIR}/weston.desktop ${D}${datadir}/applications + + install -d ${D}${datadir}/icons/hicolor/48x48/apps + install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then + install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then + chmod u+s ${D}${bindir}/weston-launch + fi +} + +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ + libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" + +FILES_${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" +FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" + +FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" +SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." + +FILES_${PN}-examples = "${bindir}/*" + +FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" +RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" + +RDEPENDS_${PN} += "xkeyboard-config" +RRECOMMENDS_${PN} = "weston-init liberation-fonts" +RRECOMMENDS_${PN}-dev += "wayland-protocols" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system weston-launch" diff --git a/meta-gnome/recipes-gnome/zenity/zenity_3.30.0.bb b/meta-gnome/recipes-gnome/zenity/zenity_3.30.0.bb index d36f6df..5d96c48 100644 --- a/meta-gnome/recipes-gnome/zenity/zenity_3.30.0.bb +++ b/meta-gnome/recipes-gnome/zenity/zenity_3.30.0.bb @@ -2,7 +2,7 @@ SUMMARY = "GNOME port of Dialog to display dialog boxes from shell scripts" LICENSE = "LGPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7" -inherit gnome perlnative gettext +inherit gnomebase gtk-icon-cache gconf mime perlnative gettext SRC_URI[archive.md5sum] = "b2180f4ef4fcb2ee90da8c65bd5241af" SRC_URI[archive.sha256sum] = "995ef696616492c40be6da99919851d41faed6643a97c9d24743b46bc8b537f2" diff --git a/meta-gnome/recipes-support/clutter/clutter-1.0.inc b/meta-gnome/recipes-support/clutter/clutter-1.0.inc new file mode 100644 index 0000000..9df1d1d --- /dev/null +++ b/meta-gnome/recipes-support/clutter/clutter-1.0.inc @@ -0,0 +1,48 @@ +SUMMARY = "Graphics library for creating hardware-accelerated user interfaces" +HOMEPAGE = "http://www.clutter-project.org/" +LICENSE = "LGPLv2.1+" + +inherit clutter ptest-gnome distro_features_check upstream-version-is-even gobject-introspection +# depends on cogl-1.0 which needs opengl +REQUIRED_DISTRO_FEATURES ?= "opengl" + +DEPENDS = "pango glib-2.0 json-glib atk udev cogl-1.0" +PACKAGE_BEFORE_PN += "${PN}-examples" +AUTOTOOLS_AUXDIR = "${S}/build-aux" + +EDEPENDS_X11 = "virtual/libx11 libxi libxfixes" +EDEPENDS_GLX = "virtual/libgl" +EDEPENDS_EGL = "virtual/egl" +EDEPENDS_WAYLAND = "wayland libxkbcommon gdk-pixbuf" + +EDEPENDS_EVDEV = "libxkbcommon" +ERDEPENDS_EVDEV = "xkeyboard-config" + +# Disable pretty much everything, override in platform specific set up +EXTRA_OECONF += "--disable-quartz-backend \ + --disable-win32-backend \ + --disable-cex100-backend \ + --disable-tslib-input \ + --enable-wayland-compositor \ + --enable-wayland-backend \ + " + +PACKAGECONFIG[gdk] = "--enable-gdk-backend,--disable-gdk-backend,gtk+3" +PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,${EDEPENDS_X11}" +PACKAGECONFIG[glx] = ",,${EDEPENDS_X11} ${EDEPENDS_GLX}" +PACKAGECONFIG[egl] = "--enable-egl-backend,--disable-egl-backend,${EDEPENDS_EGL}" +PACKAGECONFIG[evdev] = "--enable-evdev-input,--disable-evdev-input,${EDEPENDS_EVDEV},${ERDEPENDS_EVDEV}" +PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,${EDEPENDS_WAYLAND}" +PACKAGECONFIG[wayland-compositor] = "--enable-wayland-compositor,--disable-wayland-compositor,wayland" + +# Default configuration, distros might want to override +PACKAGECONFIG ??= "egl \ + ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx x11', '', d)}" + +FILES_${PN}-examples = "${libdir}/clutter/examples" + +do_configure_prepend() { + # see https://bugzilla.gnome.org/show_bug.cgi?id=661128 for this + touch -t 200001010000 ${S}/po/clutter-1.0.pot +} diff --git a/meta-gnome/recipes-support/clutter/clutter-1.0/0001-Remove-clutter.types-as-it-is-build-configuration-sp.patch b/meta-gnome/recipes-support/clutter/clutter-1.0/0001-Remove-clutter.types-as-it-is-build-configuration-sp.patch new file mode 100644 index 0000000..7b3c198 --- /dev/null +++ b/meta-gnome/recipes-support/clutter/clutter-1.0/0001-Remove-clutter.types-as-it-is-build-configuration-sp.patch @@ -0,0 +1,143 @@ +From 3a0404dfbc65c6a864e01d1200a48074e19d5def Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Fri, 2 Sep 2016 14:28:38 +0300 +Subject: [PATCH] Remove clutter.types as it is build configuration-specific. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin +--- + doc/reference/clutter.types | 122 -------------------------------------------- + 1 file changed, 122 deletions(-) + delete mode 100644 doc/reference/clutter.types + +diff --git a/doc/reference/clutter.types b/doc/reference/clutter.types +deleted file mode 100644 +index 0037acc..0000000 +--- a/doc/reference/clutter.types ++++ /dev/null +@@ -1,122 +0,0 @@ +-cally_actor_get_type +-cally_clone_get_type +-cally_group_get_type +-cally_rectangle_get_type +-cally_root_get_type +-cally_stage_get_type +-cally_text_get_type +-cally_texture_get_type +-cally_util_get_type +-clutter_action_get_type +-clutter_actor_box_get_type +-clutter_actor_get_type +-clutter_actor_meta_get_type +-clutter_align_constraint_get_type +-clutter_alpha_get_type +-clutter_animatable_get_type +-clutter_animation_get_type +-clutter_animator_get_type +-clutter_animator_key_get_type +-clutter_backend_get_type +-clutter_behaviour_depth_get_type +-clutter_behaviour_ellipse_get_type +-clutter_behaviour_get_type +-clutter_behaviour_opacity_get_type +-clutter_behaviour_path_get_type +-clutter_behaviour_rotate_get_type +-clutter_behaviour_scale_get_type +-clutter_bin_layout_get_type +-clutter_bind_constraint_get_type +-clutter_binding_pool_get_type +-clutter_blur_effect_get_type +-clutter_box_get_type +-clutter_box_layout_get_type +-clutter_brightness_contrast_effect_get_type +-clutter_cairo_texture_get_type +-clutter_canvas_get_type +-clutter_child_meta_get_type +-clutter_click_action_get_type +-clutter_clip_node_get_type +-clutter_clone_get_type +-clutter_color_get_type +-clutter_color_node_get_type +-clutter_colorize_effect_get_type +-clutter_constraint_get_type +-clutter_container_get_type +-clutter_content_get_type +-clutter_deform_effect_get_type +-clutter_desaturate_effect_get_type +-clutter_device_manager_get_type +-clutter_drag_action_get_type +-clutter_drop_action_get_type +-clutter_effect_get_type +-clutter_event_get_type +-clutter_event_sequence_get_type +-clutter_fixed_layout_get_type +-clutter_flow_layout_get_type +-clutter_fog_get_type +-clutter_geometry_get_type +-clutter_gesture_action_get_type +-clutter_glx_texture_pixmap_get_type +-clutter_grid_layout_get_type +-clutter_group_get_type +-clutter_image_get_type +-clutter_input_device_get_type +-clutter_interval_get_type +-clutter_keyframe_transition_get_type +-clutter_knot_get_type +-clutter_layout_manager_get_type +-clutter_layout_meta_get_type +-clutter_list_model_get_type +-clutter_margin_get_type +-clutter_media_get_type +-clutter_model_get_type +-clutter_model_iter_get_type +-clutter_offscreen_effect_get_type +-clutter_page_turn_effect_get_type +-clutter_paint_node_get_type +-clutter_paint_volume_get_type +-clutter_pan_action_get_type +-clutter_param_color_get_type +-clutter_param_fixed_get_type +-clutter_param_units_get_type +-clutter_path_constraint_get_type +-clutter_path_get_type +-clutter_path_node_get_type +-clutter_perspective_get_type +-clutter_pipeline_node_get_type +-clutter_point_get_type +-clutter_property_transition_get_type +-clutter_rect_get_type +-clutter_rectangle_get_type +-clutter_rotate_action_get_type +-clutter_score_get_type +-clutter_script_get_type +-clutter_scriptable_get_type +-clutter_scroll_actor_get_type +-clutter_settings_get_type +-clutter_shader_effect_get_type +-clutter_shader_float_get_type +-clutter_shader_get_type +-clutter_shader_int_get_type +-clutter_shader_matrix_get_type +-clutter_size_get_type +-clutter_snap_constraint_get_type +-clutter_stage_get_type +-clutter_stage_manager_get_type +-clutter_state_get_type +-clutter_state_key_get_type +-clutter_swipe_action_get_type +-clutter_table_layout_get_type +-clutter_tap_action_get_type +-clutter_text_buffer_get_type +-clutter_text_get_type +-clutter_text_node_get_type +-clutter_texture_get_type +-clutter_texture_node_get_type +-clutter_timeline_get_type +-clutter_transition_get_type +-clutter_transition_group_get_type +-clutter_units_get_type +-clutter_vertex_get_type +-clutter_zoom_action_get_type +-- +2.9.3 + diff --git a/meta-gnome/recipes-support/clutter/clutter-1.0/install-examples.patch b/meta-gnome/recipes-support/clutter/clutter-1.0/install-examples.patch new file mode 100644 index 0000000..ce9ab3a --- /dev/null +++ b/meta-gnome/recipes-support/clutter/clutter-1.0/install-examples.patch @@ -0,0 +1,19 @@ +Install the examples to $libdir/clutter/. + +Signed-off-by: Ross Burton +Upstream-Status: Inappropriate + +Index: clutter-1.26.2/examples/Makefile.am +=================================================================== +--- clutter-1.26.2.orig/examples/Makefile.am ++++ clutter-1.26.2/examples/Makefile.am +@@ -33,7 +33,8 @@ AM_CPPFLAGS = \ + -I$(top_srcdir)/clutter \ + -I$(top_builddir)/clutter + +-noinst_PROGRAMS = $(all_examples) ++exampledir = $(pkglibdir)/examples ++example_PROGRAMS = $(all_examples) + + EXTRA_DIST = redhand.png + diff --git a/meta-gnome/recipes-support/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch b/meta-gnome/recipes-support/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch new file mode 100644 index 0000000..fef82ea --- /dev/null +++ b/meta-gnome/recipes-support/clutter/clutter-1.0/run-installed-tests-with-tap-output.patch @@ -0,0 +1,30 @@ +From d6ceb5a44b28e0e50ede22b84984d8516897de4b Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen +Date: Mon, 27 Apr 2015 20:12:33 +0300 +Subject: [PATCH] Run installed tests with tap output + +Configure output from installed-tests to be TAP compliant such that +gnome-desktop-testing-runner properly interprets the results. + +Upstream-Status: Pending + +Signed-off-by: Tim Orling + +--- + build-aux/autotools/glib-tap.mk | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/build-aux/autotools/glib-tap.mk b/build-aux/autotools/glib-tap.mk +index a4f0dad..51cfa31 100644 +--- a/build-aux/autotools/glib-tap.mk ++++ b/build-aux/autotools/glib-tap.mk +@@ -127,7 +127,8 @@ installed_test_meta_DATA = $(installed_testcases:=.test) + %.test: %$(EXEEXT) Makefile + $(AM_V_GEN) (echo '[Test]' > $@.tmp; \ + echo 'Type=session' >> $@.tmp; \ +- echo 'Exec=env G_ENABLE_DIAGNOSTIC=0 CLUTTER_ENABLE_DIAGNOSTIC=0 $(installed_testdir)/$<' >> $@.tmp; \ ++ echo 'Exec=env G_ENABLE_DIAGNOSTIC=0 CLUTTER_ENABLE_DIAGNOSTIC=0 $(installed_testdir)/$< --tap' >> $@.tmp; \ ++ echo 'Output=TAP' >> $@.tmp; \ + mv $@.tmp $@) + + CLEANFILES += $(installed_test_meta_DATA) diff --git a/meta-gnome/recipes-support/clutter/clutter-1.0/run-ptest b/meta-gnome/recipes-support/clutter/clutter-1.0/run-ptest new file mode 100644 index 0000000..98877e5 --- /dev/null +++ b/meta-gnome/recipes-support/clutter/clutter-1.0/run-ptest @@ -0,0 +1,3 @@ +#! /bin/sh + +gnome-desktop-testing-runner clutter diff --git a/meta-gnome/recipes-support/clutter/clutter-1.0_1.26.4.bb b/meta-gnome/recipes-support/clutter/clutter-1.0_1.26.4.bb new file mode 100644 index 0000000..1f25e6f --- /dev/null +++ b/meta-gnome/recipes-support/clutter/clutter-1.0_1.26.4.bb @@ -0,0 +1,11 @@ +require clutter-1.0.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI[archive.md5sum] = "624dd776a5159de0267587b1df6b97b2" +SRC_URI[archive.sha256sum] = "8b48fac159843f556d0a6be3dbfc6b083fc6d9c58a20a49a6b4919ab4263c4e6" + +SRC_URI += "file://install-examples.patch \ + file://run-installed-tests-with-tap-output.patch \ + file://0001-Remove-clutter.types-as-it-is-build-configuration-sp.patch \ + file://run-ptest" diff --git a/meta-gnome/recipes-support/clutter/clutter-gst-3.0.inc b/meta-gnome/recipes-support/clutter/clutter-gst-3.0.inc new file mode 100644 index 0000000..4c87798 --- /dev/null +++ b/meta-gnome/recipes-support/clutter/clutter-gst-3.0.inc @@ -0,0 +1,17 @@ +SUMMARY = "GStreamer integration library for Clutter" +HOMEPAGE = "http://www.clutter-project.org/" +LICENSE = "LGPLv2+" + +inherit clutter distro_features_check upstream-version-is-even gobject-introspection +# depends on clutter-1.0 which depends on cogl-1.0 +REQUIRED_DISTRO_FEATURES ?= "opengl" + +SRC_URI += "file://0001-Install-example-binary-needed-for-core-image-clutter.patch" + +DEPENDS = "gstreamer1.0-plugins-base gstreamer1.0-plugins-bad clutter-1.0 libgudev" +RDEPENDS_${PN} += "gstreamer1.0-meta-base" +PACKAGES =+ "${PN}-examples" + +FILES_${PN} += "${libdir}/gstreamer-1.0/lib*.so" +FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la" +FILES_${PN}-examples = "${bindir}/video-player ${bindir}/video-sink" diff --git a/meta-gnome/recipes-support/clutter/clutter-gst-3.0/0001-Install-example-binary-needed-for-core-image-clutter.patch b/meta-gnome/recipes-support/clutter/clutter-gst-3.0/0001-Install-example-binary-needed-for-core-image-clutter.patch new file mode 100644 index 0000000..0b26b99 --- /dev/null +++ b/meta-gnome/recipes-support/clutter/clutter-gst-3.0/0001-Install-example-binary-needed-for-core-image-clutter.patch @@ -0,0 +1,33 @@ +From d77c711277bf075ce0545c19b322f040c49c778a Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Thu, 30 Apr 2015 12:19:13 +0300 +Subject: [PATCH] Install example binary needed for core-image-clutter + +Signed-off-by: Zhai Edwin + +Upstream-Status: Inappropriate [configuration] + +Imported from clutter-gst-1.8 package, git://git.openembedded.org/openembedded, +commit ae28ee3f7a060b9e0d13154a84f2444a98490b5b, updated for clutter-gst 3.0 + +Signed-off-by: Tomas Frydrych +Signed-off-by: Alexander Kanavin +--- + examples/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/examples/Makefile.am b/examples/Makefile.am +index bfbc1b5..09655e3 100644 +--- a/examples/Makefile.am ++++ b/examples/Makefile.am +@@ -1,6 +1,6 @@ + NULL = # + +-noinst_PROGRAMS = camera-player video-player video-sink video-sink-navigation video-content ++bin_PROGRAMS = camera-player video-player video-sink video-sink-navigation video-content + + AM_CPPFLAGS = -I$(top_srcdir) \ + $(MAINTAINER_CFLAGS) \ +-- +2.1.4 + diff --git a/meta-gnome/recipes-support/clutter/clutter-gst-3.0_3.0.27.bb b/meta-gnome/recipes-support/clutter/clutter-gst-3.0_3.0.27.bb new file mode 100644 index 0000000..3538245 --- /dev/null +++ b/meta-gnome/recipes-support/clutter/clutter-gst-3.0_3.0.27.bb @@ -0,0 +1,7 @@ +require clutter-gst-3.0.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ + file://clutter-gst/clutter-gst.h;beginline=1;endline=24;md5=95baacba194e814c110ea3bdf25ddbf4" + +SRC_URI[archive.md5sum] = "2bf9d7ca146c9d71e86c45cd00e9a28e" +SRC_URI[archive.sha256sum] = "fe69bd6c659d24ab30da3f091eb91cd1970026d431179b0724f13791e8ad9f9d" diff --git a/meta-gnome/recipes-support/clutter/clutter-gtk-1.0.inc b/meta-gnome/recipes-support/clutter/clutter-gtk-1.0.inc new file mode 100644 index 0000000..11826a6 --- /dev/null +++ b/meta-gnome/recipes-support/clutter/clutter-gtk-1.0.inc @@ -0,0 +1,18 @@ +SUMMARY = "Library for embedding a Clutter canvas in a GTK+ application" +HOMEPAGE = "http://www.clutter-project.org/" +LICENSE = "LGPLv2+" + +CLUTTERBASEBUILDCLASS = "meson" +inherit clutter distro_features_check upstream-version-is-even gobject-introspection gtk-doc + +# depends on clutter-1.0 which depends on cogl-1.0 +REQUIRED_DISTRO_FEATURES ?= "opengl" +# depends on gtk+3 +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" + +DEPENDS = "clutter-1.0 gtk+3" +PACKAGES =+ "${PN}-examples" + +GTKDOC_MESON_OPTION = "enable_docs" + +GIR_MESON_OPTION = 'enable_gi' diff --git a/meta-gnome/recipes-support/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch b/meta-gnome/recipes-support/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch new file mode 100644 index 0000000..e21c6fd --- /dev/null +++ b/meta-gnome/recipes-support/clutter/clutter-gtk-1.0/0001-Add-a-config-variable-for-enabling-disabling-introsp.patch @@ -0,0 +1,37 @@ +From 7233883c6bd4e80c0e91b29b5c76fe798023e9fe Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Mon, 11 Feb 2019 16:41:13 +0100 +Subject: [PATCH] Add a config variable for enabling/disabling introspection + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin +--- + clutter-gtk/meson.build | 2 +- + meson_options.txt | 4 ++++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/clutter-gtk/meson.build b/clutter-gtk/meson.build +index 5d6847d..5d934b6 100644 +--- a/clutter-gtk/meson.build ++++ b/clutter-gtk/meson.build +@@ -49,7 +49,7 @@ clutter_gtk_dep = declare_dependency(link_with: clutter_gtk, + dependencies: [ mathlib_dep, clutter_dep, gtk_dep ], + include_directories: include_directories('.')) + +-if not meson.is_cross_build() ++if get_option('enable_gi') + gnome.generate_gir(clutter_gtk, + sources: clutter_gtk_headers + clutter_gtk_sources, + namespace: 'GtkClutter', +diff --git a/meson_options.txt b/meson_options.txt +index aaf59f1..b7e51c3 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -2,3 +2,7 @@ option('enable_docs', + type: 'boolean', + value: false, + description: 'Enable generating the API reference (depends on GTK-Doc)') ++option('enable_gi', ++ type: 'boolean', ++ value: false, ++ description: 'Enable gobject introspection') diff --git a/meta-gnome/recipes-support/clutter/clutter-gtk-1.0_1.8.4.bb b/meta-gnome/recipes-support/clutter/clutter-gtk-1.0_1.8.4.bb new file mode 100644 index 0000000..53948c8 --- /dev/null +++ b/meta-gnome/recipes-support/clutter/clutter-gtk-1.0_1.8.4.bb @@ -0,0 +1,7 @@ +require clutter-gtk-1.0.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" + +SRC_URI += " file://0001-Add-a-config-variable-for-enabling-disabling-introsp.patch" +SRC_URI[archive.md5sum] = "b363ac9878e2337be887b8ee9e1da00e" +SRC_URI[archive.sha256sum] = "521493ec038973c77edcb8bc5eac23eed41645117894aaee7300b2487cb42b06" diff --git a/meta-gnome/recipes-support/cogl/cogl-1.0.inc b/meta-gnome/recipes-support/cogl/cogl-1.0.inc new file mode 100644 index 0000000..4436163 --- /dev/null +++ b/meta-gnome/recipes-support/cogl/cogl-1.0.inc @@ -0,0 +1,80 @@ +SUMMARY = "Modern 3D graphics API with associated utility APIs" +HOMEPAGE = "http://wiki.clutter-project.org/wiki/Cogl" +LICENSE = "MIT" + +inherit clutter distro_features_check upstream-version-is-even gobject-introspection +# cogl-1.0 needs opengl to build +REQUIRED_DISTRO_FEATURES ?= "opengl" + +DEPENDS = "glib-2.0 gdk-pixbuf" +PACKAGES =+ "${PN}-examples \ + libcogl libcogl-gles2 libcogl-pango libcogl-path \ + " +AUTOTOOLS_AUXDIR = "${S}/build" + +# Extra DEPENDS for PACKAGECONFIG +EDEPENDS_GL = "virtual/libgl libdrm" +EDEPENDS_GLES2 = "virtual/libgles2" +EDEPENDS_KMS = "libdrm virtual/egl" +EDEPENDS_EGL = "virtual/egl" +EDEPENDS_X11 = "virtual/libx11 libxcomposite libxfixes libxi libxrandr" +EDEPENDS_WAYLAND = "virtual/egl virtual/libgles2 wayland" + +# Extra RDEPENDS for PACKAGECONFIG +# This has to be explictly listed, because cogl dlopens the backends +ERDEPENDS_GL = "libgl" +ERDEPENDS_GLES2 = "libgles2" + +# GLESv1 is rarely tested, so disable it +EXTRA_OECONF += "--enable-examples-install \ + --enable-debug \ + --disable-gles1 \ + --disable-cairo \ + " +DEBUG_OPTIMIZATION_append = " -Wno-error=maybe-uninitialized" + +# OpenGL/GLX +PACKAGECONFIG[glx] = "--enable-gl --enable-glx,--disable-gl --disable-glx,${EDEPENDS_GL} ${EDEPENDS_X11},${ERDEPENDS_GL}" + +# GLESv2 +PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,${EDEPENDS_GLES2}, ${ERDEPENDS_GLES2}" + +# EGL backends +PACKAGECONFIG[egl-kms] = "--enable-kms-egl-platform,--disable-kms-egl-platform,${EDEPENDS_KMS}" +PACKAGECONFIG[egl-null] = "--enable-null-egl-platform,--disable-null-egl-platform" +PACKAGECONFIG[egl-x11] = "--enable-xlib-egl-platform,--disable-xlib-egl-platform,${EDEPENDS_X11} ${EDEPENDS_EGL}" +PACKAGECONFIG[egl-wayland] = "--enable-wayland-egl-platform,--disable-wayland-egl-platform,${EDEPENDS_WAYLAND}" + +# Wayland (server-side) +PACKAGECONFIG[wayland-server] = "--enable-wayland-egl-server,--disable-wayland-egl-server,${EDEPENDS_WAYLAND}" + +# Support rendering text directly with Pango +PACKAGECONFIG[cogl-pango] = "--enable-cogl-pango,--disable-cogl-pango,pango" + +# Respect the DISTRO_FEATURES to pull in GLX or Wayland as appropriate by +# default. +PACKAGECONFIG ??= "cogl-pango gles2 \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'egl-wayland', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx egl-x11', '', d)} \ + " + +do_compile_prepend() { + export GIR_EXTRA_LIBS_PATH="${B}/cogl/.libs" +} + +FILES_${PN} = "" +FILES_${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*" +FILES_libcogl = "${libdir}/libcogl${SOLIBS} ${libdir}/girepository-1.0/Cogl-*.typelib" +FILES_libcogl-gles2 = "${libdir}/libcogl-gles2${SOLIBS}" +FILES_libcogl-pango = "${libdir}/libcogl-pango${SOLIBS} ${libdir}/girepository-1.0/CoglPango*.typelib" + +FILES_libcogl-path = "${libdir}/libcogl-path${SOLIBS}" + +# For backwards compatibility after Debian-renaming +RPROVIDES_libcogl = "cogl-1.0" +RCONFLICTS_libcogl = "cogl-1.0" +RREPLACES_libcogl = "cogl-1.0" + +RDEPENDS_${PN}-dev = "libcogl" + +COMPATIBLE_HOST_armv4 = 'null' diff --git a/meta-gnome/recipes-support/cogl/cogl-1.0_1.22.6.bb b/meta-gnome/recipes-support/cogl/cogl-1.0_1.22.6.bb new file mode 100644 index 0000000..86bbdbf --- /dev/null +++ b/meta-gnome/recipes-support/cogl/cogl-1.0_1.22.6.bb @@ -0,0 +1,6 @@ +require cogl-1.0.inc + +SRC_URI[archive.md5sum] = "7bcc01edb5462d4d08d01bf893feddb0" +SRC_URI[archive.sha256sum] = "6d134bd3e48c067507167c001200b275997fb9c68b08b48ff038211c8c251b75" + +LIC_FILES_CHKSUM = "file://COPYING;md5=1b1a508d91d25ca607c83f92f3e31c84" diff --git a/meta-gnome/recipes-support/ell/ell_0.31.bb b/meta-gnome/recipes-support/ell/ell_0.31.bb new file mode 100644 index 0000000..1db7131 --- /dev/null +++ b/meta-gnome/recipes-support/ell/ell_0.31.bb @@ -0,0 +1,22 @@ +SUMMARY = "Embedded Linux Library" +DESCRIPTION = "The Embedded Linux Library (ELL) provides core, \ +low-level functionality for system daemons. It typically has no \ +dependencies other than the Linux kernel, C standard library, and \ +libdl (for dynamic linking). While ELL is designed to be efficient \ +and compact enough for use on embedded Linux platforms, it is not \ +limited to resource-constrained systems." +SECTION = "libs" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09" + +DEPENDS = "dbus" + +inherit autotools pkgconfig + +SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz" +SRC_URI[md5sum] = "3f670230be4d89d621b0508c70b1d36b" +SRC_URI[sha256sum] = "ae88617275452f9f5840b2365e33e6c7fb6fa3405d42cbf9367de642ee8b6701" + +do_configure_prepend () { + mkdir -p ${S}/build-aux +} diff --git a/meta-gnome/recipes-support/graphene/graphene_1.10.0.bb b/meta-gnome/recipes-support/graphene/graphene_1.10.0.bb new file mode 100644 index 0000000..3d38837 --- /dev/null +++ b/meta-gnome/recipes-support/graphene/graphene_1.10.0.bb @@ -0,0 +1,39 @@ +GNOMEBASEBUILDCLASS = "meson" + +inherit meson pkgconfig gnomebase gobject-introspection + +DESCRIPTION = "Graphene" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a7d871d9e23c450c421a85bb2819f648" + + +SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive" +SRC_URI[archive.md5sum] = "07f72436bc7a85d12f5edd9fcedd0184" +SRC_URI[archive.sha256sum] = "406d97f51dd4ca61e91f84666a00c3e976d3e667cd248b76d92fdb35ce876499" + +DEPENDS = "gobject-introspection gobject-introspection-native" +#RDEPENDS_${PN} = "gobject-introspection" +BBCLASSEXTEND = "native" + +EXTRA_OEMESON = "-Dintrospection=true -Dinstalled_tests=false -Dtests=false -Darm_neon=false" + +SOLIBS = ".so" +FILES_SOLIBSDEV = "" +INSANE_SKIP_${PN} += "dev-so" + +do_install() { + install -d ${D}${includedir}/graphene-1.0/ + install -m 0644 ${WORKDIR}/build/include/*.h ${D}${includedir}/graphene-1.0/ + install -m 0644 ${S}/include/*.h ${D}${includedir}/ + install -d ${D}${libdir}/pkgconfig + install -m 0644 ${WORKDIR}/build/meson-private/graphene-gobject-1.0.pc ${D}${libdir}/pkgconfig/ + install -m 0644 ${WORKDIR}/build/meson-private/graphene-1.0.pc ${D}${libdir}/pkgconfig/ + install -d ${D}${datadir}/gir-1.0/ + install -m 0644 ${WORKDIR}/build/src/Graphene-1.0.gir ${D}/${datadir}/gir-1.0/ + install -d ${D}${libdir}/girepository-1.0/ + install -m 0644 ${WORKDIR}/build/src/Graphene-1.0.typelib ${D}/${libdir}/girepository-1.0/ + install -m 0644 ${WORKDIR}/build/src/libgraphene-1.0.* ${D}/${libdir}/ +} + +FILES_${PN} += "${includedir}/graphene-1.0/graphene-config.h ${includedir}/graphene.h ${libdir}/*.so.*" +FILES_${PN}-dev += "${libdir}/pkgconfig/graphene-gobject-1.0.pc ${libdir}/pkgconfig/graphene-1.0.pc ${datadir}/Graphene-1.0.gir $[libdir}/girepository-1.0/Graphene-1.0.typelib" diff --git a/meta-gnome/recipes-support/ibus/ibus/0001-strip-out-dbus-build-dep.patch b/meta-gnome/recipes-support/ibus/ibus/0001-strip-out-dbus-build-dep.patch index 4319761..e0f3e4d 100644 --- a/meta-gnome/recipes-support/ibus/ibus/0001-strip-out-dbus-build-dep.patch +++ b/meta-gnome/recipes-support/ibus/ibus/0001-strip-out-dbus-build-dep.patch @@ -1,11 +1,18 @@ -ibus: Don't run dbus tests within the build. +From ca0f6d559dd8b8b0eea3ae4c6d8a62bb5d743a5b Mon Sep 17 00:00:00 2001 +From: Bruce Leidl +Date: Tue, 15 Jan 2019 12:02:49 -0500 +Subject: [PATCH] ibus: Don't run dbus tests within the build. Prevent a test requiring spawning a dbus session from running during the build. Upstream-status: Inappropriate [disable-feature] - Signed-off-by: Brendan Kerrigan + Signed-off-by: Brendan Kerrigan + +--- + data/dconf/make-dconf-override-db.sh | 5 ----- + 1 file changed, 5 deletions(-) diff --git a/data/dconf/make-dconf-override-db.sh b/data/dconf/make-dconf-override-db.sh index 9c650e9..d7320c3 100755 diff --git a/meta-gnome/recipes-support/ibus/ibus/0002-decorate-automake-for-valaflags.patch b/meta-gnome/recipes-support/ibus/ibus/0002-decorate-automake-for-valaflags.patch index b15fec1..1d5b431 100644 --- a/meta-gnome/recipes-support/ibus/ibus/0002-decorate-automake-for-valaflags.patch +++ b/meta-gnome/recipes-support/ibus/ibus/0002-decorate-automake-for-valaflags.patch @@ -1,4 +1,7 @@ -ibus: Add automake decorations to sed in appropriate paths +From ce4d251b4d5327051e764cb0693f699c8e584d94 Mon Sep 17 00:00:00 2001 +From: Bruce Leidl +Date: Tue, 15 Jan 2019 12:02:49 -0500 +Subject: [PATCH] ibus: Add automake decorations to sed in appropriate paths Multiple vapidir paths are required to build ibus correctly, so decorations are added to the automake files to allow for @@ -8,6 +11,12 @@ ibus: Add automake decorations to sed in appropriate paths Signed-off-by: Brendan Kerrigan +--- + engine/Makefile.am | 1 + + tools/Makefile.am | 1 + + ui/gtk3/Makefile.am | 1 + + 3 files changed, 3 insertions(+) + diff --git a/engine/Makefile.am b/engine/Makefile.am index 86f0e2b..7e922b5 100644 --- a/engine/Makefile.am @@ -33,14 +42,14 @@ index 5c18d3d..fe727c1 100644 bin_PROGRAMS = ibus diff --git a/ui/gtk3/Makefile.am b/ui/gtk3/Makefile.am -index aaba7a4..ba48175 100644 +index 667d51c..cdcbf5a 100644 --- a/ui/gtk3/Makefile.am +++ b/ui/gtk3/Makefile.am -@@ -80,6 +80,7 @@ AM_VALAFLAGS = \ +@@ -79,6 +79,7 @@ AM_VALAFLAGS = \ + --pkg=config \ --pkg=xi \ - --pkg=gdk-wayland \ --target-glib="$(VALA_TARGET_GLIB_VERSION)" \ + @EXTRA_AM_VALAFLAGS@ \ $(NULL) - if ENABLE_LIBNOTIFY + if ENABLE_APPINDICATOR diff --git a/meta-gnome/recipes-support/ibus/ibus/0003-use-wayland-display-on-wayland.patch b/meta-gnome/recipes-support/ibus/ibus/0003-use-wayland-display-on-wayland.patch new file mode 100644 index 0000000..a8ad2c2 --- /dev/null +++ b/meta-gnome/recipes-support/ibus/ibus/0003-use-wayland-display-on-wayland.patch @@ -0,0 +1,62 @@ +From 402c9536cb011c5b9ffcd2400c2fb33f458c809b Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho +Date: Wed, 11 Mar 2020 17:08:37 +0100 +Subject: [PATCH] src: Use WAYLAND_DISPLAY on Wayland sessions to make up IBus + socket name + +In Wayland sessions, GNOME Shell 3.36 is leveraging 2 X11 Display +connections so one is used to set up all services for a "X11 session" +before user applications connected to the other display might require it. +This allows seamlessly starting Xwayland on demand to X11 user applications. + +IBus here belongs to the first described connection, it is started +explicitly on that display by GNOME Shell as it is necessary to set up +ibus-x11 before any other X11 client might want to use it. + +However the use of this "secondary" display results in IBus daemon left +unable to talk to applications, as the socket name is dependent on the +DISPLAY envvar and ibus/applications don't agree on its content. + +For wayland sessions, make it look for WAYLAND_DISPLAY, as that'll have +the similar "per session bus" behavior that this seems to look after. + +Related: https://gitlab.gnome.org/GNOME/gnome-shell/issues/2341 + +--- + src/ibusshare.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/src/ibusshare.c b/src/ibusshare.c +index 0d50d3f..e0ef2ce 100644 +--- a/src/ibusshare.c ++++ b/src/ibusshare.c +@@ -100,6 +100,7 @@ ibus_get_socket_path (void) + gchar *display; + gchar *displaynumber = "0"; + /* gchar *screennumber = "0"; */ ++ gboolean is_wayland = FALSE; + gchar *p; + + path = g_strdup (g_getenv ("IBUS_ADDRESS_FILE")); +@@ -108,13 +109,19 @@ ibus_get_socket_path (void) + } + + if (_display == NULL) { +- display = g_strdup (g_getenv ("DISPLAY")); ++ display = g_strdup (g_getenv ("WAYLAND_DISPLAY")); ++ if (display) ++ is_wayland = TRUE; ++ else ++ display = g_strdup (g_getenv ("DISPLAY")); + } + else { + display = g_strdup (_display); + } + +- if (display) { ++ if (is_wayland) { ++ displaynumber = display; ++ } else if (display) { + p = display; + hostname = display; + for (; *p != ':' && *p != '\0'; p++); diff --git a/meta-gnome/recipes-support/ibus/ibus_1.5.19.bb b/meta-gnome/recipes-support/ibus/ibus_1.5.22.bb similarity index 81% rename from meta-gnome/recipes-support/ibus/ibus_1.5.19.bb rename to meta-gnome/recipes-support/ibus/ibus_1.5.22.bb index ea00afb..6f6ef10 100644 --- a/meta-gnome/recipes-support/ibus/ibus_1.5.19.bb +++ b/meta-gnome/recipes-support/ibus/ibus_1.5.22.bb @@ -10,7 +10,7 @@ DEPENDS = "prelink \ dconf \ libnotify \ gconf-native \ - gtk+ \ + gtk+3 \ " LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" @@ -19,10 +19,13 @@ SRC_URI = " \ https://github.com/ibus/ibus/releases/download/${PV}/${PN}-${PV}.tar.gz \ file://0001-strip-out-dbus-build-dep.patch \ file://0002-decorate-automake-for-valaflags.patch \ + file://0003-use-wayland-display-on-wayland.patch \ " -SRC_URI[md5sum] = "a2be6f200dd9ada2501474a6877a73ef" -SRC_URI[sha256sum] = "4b66c798dab093f0fa738e5c10688d395a463287d13678c208a81051af5d2429" +SRC_URI[md5sum] = "717975f7de5b7a6eb89a5966db3e6c2e" +SRC_URI[sha256sum] = "8170eba58c28aa4818970751ebdeada728ebb63d535967a5c5f5c21b0017be4a" + + S = "${WORKDIR}/${PN}-${PV}" inherit autotools pkgconfig gtk-doc distro_features_check vala gobject-introspection @@ -30,7 +33,7 @@ inherit autotools pkgconfig gtk-doc distro_features_check vala gobject-introspec FILES_${PN} += "${datadir}" FILES_${PN} += "${libdir}" -EXTRA_OECONF += " --disable-emoji-dict --disable-unicode-dict --disable-tests " +EXTRA_OECONF += " --disable-emoji-dict --disable-unicode-dict --disable-tests --disable-gtk2 " do_configure_prepend() { touch ${S}/ChangeLog @@ -39,6 +42,6 @@ do_configure_prepend() { sed -i "s^@EXTRA_AM_VALAFLAGS@^--vapidir=${RECIPE_SYSROOT_NATIVE}${datadir}/vala-0.38/vapi --vapidir=${B}/bindings/vala --pkg gio-2.0^g" ${S}/ui/gtk3/Makefile.am } -do_install_append () { - rm ${D}${datadir}/applications/ibus-setup.desktop -} +#do_install_append () { +# rm ${D}${datadir}/applications/ibus-setup.desktop +#} diff --git a/meta-gnome/recipes-support/libinput/libinput/determinism.patch b/meta-gnome/recipes-support/libinput/libinput/determinism.patch new file mode 100644 index 0000000..cb55403 --- /dev/null +++ b/meta-gnome/recipes-support/libinput/libinput/determinism.patch @@ -0,0 +1,21 @@ +This finds our outer git tree and that version information breaks +determinism of this recipe. Disable it. + +RP 2020/2/6 + +Upstream-Status: Pending +Signed-off-by: Richard Purdie + +Index: libinput-1.14.3/meson.build +=================================================================== +--- libinput-1.14.3.orig/meson.build ++++ libinput-1.14.3/meson.build +@@ -387,7 +387,7 @@ pkgconfig.generate( + libraries : lib_libinput + ) + +-git_version_h = vcs_tag(command : ['git', 'describe'], ++git_version_h = vcs_tag(command : ['false'], + fallback : 'unknown', + input : 'src/libinput-git-version.h.in', + output :'libinput-git-version.h') diff --git a/meta-gnome/recipes-support/libinput/libinput/run-ptest b/meta-gnome/recipes-support/libinput/libinput/run-ptest new file mode 100644 index 0000000..e32bd92 --- /dev/null +++ b/meta-gnome/recipes-support/libinput/libinput/run-ptest @@ -0,0 +1,153 @@ + + + +run-ptest\libinput\wayland\recipes-graphics\meta - openembedded-core - OpenEmbedded Core layer + + + + + + + + + +
+ + + + +
+summaryrefslogtreecommitdiffstats
+ + + +
+
+
blob: 5a84c568b976cbfb6f3d091c0db848e5d6850fba (plain) + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+
#!/bin/sh
+
+/usr/libexec/libinput/libinput-test-suite
+if [ $? -eq 0 ]; then
+  echo 'PASS: libinput-test-suite'
+else
+  echo 'FAIL: libinput-test-suite'
+fi
+
+
+
+ +
+ + diff --git a/meta-gnome/recipes-support/libinput/libinput_1.15.5.bb b/meta-gnome/recipes-support/libinput/libinput_1.15.5.bb new file mode 100644 index 0000000..e56f181 --- /dev/null +++ b/meta-gnome/recipes-support/libinput/libinput_1.15.5.bb @@ -0,0 +1,50 @@ +SUMMARY = "Library to handle input devices in Wayland compositors" +DESCRIPTION = "libinput is a library to handle input devices in Wayland \ +compositors and to provide a generic X.Org input driver. It provides \ +device detection, device handling, input device event processing and \ +abstraction so minimize the amount of custom input code compositors need to \ +provide the common set of functionality that users expect." +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=1f2ea9ebff3a2c6d458faf58492efb63" + +DEPENDS = "libevdev udev mtdev libcheck" + +SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \ + file://run-ptest \ + file://determinism.patch \ + " +SRC_URI[md5sum] = "c9a1b15bb932eaf22f840efe4c3f84eb" +SRC_URI[sha256sum] = "a90efc8f423c3094f2f9f372fb92381b2f3aad62e8b5882a8abe333aa8249c97" + +UPSTREAM_CHECK_REGEX = "libinput-(?P\d+\.\d+\.(?!9\d+)\d+)" + +inherit meson pkgconfig lib_package ptest + +# Patch out build directory, otherwise it leaks into ptest binary +do_configure_append() { + sed -i -e "s,${WORKDIR},,g" config.h + if [ -e "litest-config.h" ]; then + sed -i -e "s,${WORKDIR},,g" litest-config.h + fi +} + +PACKAGECONFIG ??= "" +PACKAGECONFIG[libwacom] = "-Dlibwacom=true,-Dlibwacom=false,libwacom" +PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3" + +UDEVDIR = "`pkg-config --variable=udevdir udev`" + +EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} \ + -Ddocumentation=false \ + ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dtests=true -Dinstall-tests=true', '-Dtests=false -Dinstall-tests=false', d)} \ + -Dzshcompletiondir=no" + +# package name changed in 1.8.1 upgrade: make sure package upgrades work +RPROVIDES_${PN} = "libinput" +RREPLACES_${PN} = "libinput" +RCONFLICTS_${PN} = "libinput" + +FILES_${PN}-ptest += "${libexecdir}/libinput/libinput-test-suite" diff --git a/meta-gnome/recipes-support/mozjs/mozjs/0001-do-not-create-python-environment-new.patch b/meta-gnome/recipes-support/mozjs/mozjs/0001-do-not-create-python-environment-new.patch index 8b39b7a..b42aff3 100644 --- a/meta-gnome/recipes-support/mozjs/mozjs/0001-do-not-create-python-environment-new.patch +++ b/meta-gnome/recipes-support/mozjs/mozjs/0001-do-not-create-python-environment-new.patch @@ -13,7 +13,7 @@ diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.confi index 83b8d705..79d04b60 100644 --- a/build/moz.configure/init.configure +++ b/build/moz.configure/init.configure -@@ -250,24 +250,6 @@ def virtualenv_python(env_python, build_env, mozconfig, help): +@@ -257,24 +257,6 @@ def virtualenv_python(env_python, build_env, mozconfig, help): else: python = sys.executable diff --git a/meta-gnome/recipes-support/mozjs/mozjs/avoid-running-autoconf2.13.patch b/meta-gnome/recipes-support/mozjs/mozjs/avoid-running-autoconf2.13.patch new file mode 100644 index 0000000..46d9a40 --- /dev/null +++ b/meta-gnome/recipes-support/mozjs/mozjs/avoid-running-autoconf2.13.patch @@ -0,0 +1,30 @@ +commit 88652e61a4cfaf20130b73713468c8dc1dcf224a +Author: Takuro Ashie +Date: Sun Jul 14 20:59:21 2019 +0900 + + Avoid running autoconf2.13 + + Use pre-generated old-configure instead. + + Upstream-Status: Inappropriate [OE-specific] + +diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure +index 7286b23ce86a..87702b520806 100644 +--- a/build/moz.configure/old.configure ++++ b/build/moz.configure/old.configure +@@ -20,6 +20,7 @@ option(env='AUTOCONF', nargs=1, help='Path to autoconf 2.13') + @imports(_from='os.path', _import='exists') + @imports('re') + def autoconf(mozconfig, autoconf): ++ return "autoconf2.13" + mozconfig_autoconf = None + if mozconfig['path']: + make_extra = mozconfig['make_extra'] +@@ -115,6 +116,7 @@ def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell, + break + else: + refresh = False ++ refresh = False + + if refresh: + log.info('Refreshing %s with %s', old_configure, autoconf) diff --git a/meta-gnome/recipes-support/mozjs/mozjs/pre-generated-old-configure.patch b/meta-gnome/recipes-support/mozjs/mozjs/pre-generated-old-configure.patch new file mode 100644 index 0000000..e5a5d5f --- /dev/null +++ b/meta-gnome/recipes-support/mozjs/mozjs/pre-generated-old-configure.patch @@ -0,0 +1,9047 @@ +diff -Nur '--exclude=mozconfig' '--exclude=firefox-build-dir' '--exclude=*.pyc' firefox-68.0-bak/js/src/old-configure firefox-68.0/js/src/old-configure +--- firefox-68.0-bak/js/src/old-configure 1970-01-01 09:00:00.000000000 +0900 ++++ firefox-68.0/js/src/old-configure 2019-07-14 20:32:27.318145584 +0900 +@@ -0,0 +1,8987 @@ ++#! /bin/sh ++ ++if test `uname -s | grep -c MINGW 2>/dev/null` != "0"; then ++ msyshost=1 ++fi ++ ++. ./old-configure.vars ++ ++# Guess values for system-dependent variables and create Makefiles. ++# Generated automatically using autoconf version 2.13 ++# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. ++# ++# This configure script is free software; the Free Software Foundation ++# gives unlimited permission to copy, distribute and modify it. ++ ++# Defaults: ++ac_help= ++ac_default_prefix=/usr/local ++# Any additions from configure.in: ++ac_help="$ac_help ++ --with-ios-sdk=TYPE ++ Type of iOS SDK to use (iphonesimulator, iphoneos) ++ and optionally version (like iphoneos8.2)" ++ac_help="$ac_help ++ --enable-ios-target=VER (default=8.0) ++ Set the minimum iOS version needed at runtime" ++ac_help="$ac_help ++ --with-x use the X Window System" ++ac_help="$ac_help ++ --enable-memory-sanitizer Enable Memory Sanitizer (default=no)" ++ac_help="$ac_help ++ --enable-thread-sanitizer Enable Thread Sanitizer (default=no)" ++ac_help="$ac_help ++ --enable-signed-overflow-sanitizer Enable UndefinedBehavior Sanitizer (Signed Integer Overflow Parts, default=no)" ++ac_help="$ac_help ++ --enable-unsigned-overflow-sanitizer Enable UndefinedBehavior Sanitizer (Unsigned Integer Overflow Parts, default=no)" ++ac_help="$ac_help ++ --with-debug-label=LABELS ++ Define DEBUG_ for each comma-separated ++ value given." ++ac_help="$ac_help ++ --enable-cpp-rtti Enable C++ RTTI " ++ac_help="$ac_help ++ --disable-icf Disable Identical Code Folding" ++ac_help="$ac_help ++ --enable-dtrace build with dtrace support if available (default=no)" ++ac_help="$ac_help ++ --with-nspr-cflags=FLAGS ++ Pass FLAGS to CC when building code that uses NSPR. ++ Use this when there's no accurate nspr-config ++ script available. This is the case when building ++ SpiderMonkey as part of the Mozilla tree: the ++ top-level configure script computes NSPR flags ++ that accomodate the quirks of that environment." ++ac_help="$ac_help ++ --with-nspr-libs=LIBS Pass LIBS to LD when linking code that uses NSPR. ++ See --with-nspr-cflags for more details." ++ac_help="$ac_help ++ --enable-nspr-build Build NSPR from source tree" ++ac_help="$ac_help ++ --with-system-nspr Use an NSPR that is already built and installed. ++ Use the 'nspr-config' script in the current path, ++ or look for the script in the directories given with ++ --with-nspr-exec-prefix or --with-nspr-prefix. ++ (Those flags are only checked if you specify ++ --with-system-nspr.)" ++ac_help="$ac_help ++ --enable-posix-nspr-emulation ++ Enable emulation of NSPR for POSIX systems" ++ac_help="$ac_help ++ --with-nspr-prefix=PFX Prefix where NSPR is installed" ++ac_help="$ac_help ++ --with-nspr-exec-prefix=PFX ++ Exec prefix where NSPR is installed" ++ac_help="$ac_help ++ --with-system-zlib[=PFX] ++ Use system libz [installed at prefix PFX]" ++ac_help="$ac_help ++ --with-sixgill=path/to/sixgill ++ Enable static checking of code using sixgill" ++ac_help="$ac_help ++ --enable-strip Enable stripping of libs & executables " ++ac_help="$ac_help ++ --enable-install-strip Enable stripping of libs & executables when packaging " ++ac_help="$ac_help ++ --jitreport-granularity=N ++ Default granularity at which to report JIT code ++ to external tools ++ 0 - no info ++ 1 - code ranges for whole functions only ++ 2 - per-line information ++ 3 - per-op information" ++ac_help="$ac_help ++ --enable-readline Link js shell to system readline library" ++ac_help="$ac_help ++ --with-qemu-exe=path Use path as an arm emulator on host platforms" ++ac_help="$ac_help ++ --with-cross-lib=dir Use dir as the location for arm libraries" ++ac_help="$ac_help ++ --with-system-icu ++ Use system ICU (located with pkgconfig)" ++ac_help="$ac_help ++ --with-intl-api, --with-intl-api=build, --without-intl-api ++ Determine the status of the ECMAScript Internationalization API. The first ++ (or lack of any of these) builds and exposes the API. The second builds it ++ but doesn't use ICU or expose the API to script. The third doesn't build ++ ICU at all." ++ ++# Initialize some variables set by options. ++# The variables have the same names as the options, with ++# dashes changed to underlines. ++build=NONE ++cache_file=./config.cache ++exec_prefix=NONE ++host=NONE ++no_create= ++nonopt=NONE ++no_recursion= ++prefix=NONE ++program_prefix=NONE ++program_suffix=NONE ++program_transform_name=s,x,x, ++silent= ++site= ++srcdir= ++target=NONE ++verbose= ++x_includes=NONE ++x_libraries=NONE ++bindir='${exec_prefix}/bin' ++sbindir='${exec_prefix}/sbin' ++libexecdir='${exec_prefix}/libexec' ++datadir='${prefix}/share' ++sysconfdir='${prefix}/etc' ++sharedstatedir='${prefix}/com' ++localstatedir='${prefix}/var' ++libdir='${exec_prefix}/lib' ++includedir='${prefix}/include' ++oldincludedir='/usr/include' ++infodir='${prefix}/info' ++mandir='${prefix}/man' ++ ++# Initialize some other variables. ++subdirs= ++MFLAGS= MAKEFLAGS= ++SHELL=${CONFIG_SHELL-/bin/sh} ++# Maximum number of lines to put in a shell here document. ++ac_max_here_lines=12 ++ ++ac_prev= ++for ac_option ++do ++ ++ # If the previous option needs an argument, assign it. ++ if test -n "$ac_prev"; then ++ eval "$ac_prev=\$ac_option" ++ ac_prev= ++ continue ++ fi ++ ++ case "$ac_option" in ++ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; ++ *) ac_optarg= ;; ++ esac ++ ++ # Accept the important Cygnus configure options, so we can diagnose typos. ++ ++ case "$ac_option" in ++ ++ -bindir | --bindir | --bindi | --bind | --bin | --bi) ++ ac_prev=bindir ;; ++ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) ++ bindir="$ac_optarg" ;; ++ ++ -build | --build | --buil | --bui | --bu) ++ ac_prev=build ;; ++ -build=* | --build=* | --buil=* | --bui=* | --bu=*) ++ build="$ac_optarg" ;; ++ ++ -cache-file | --cache-file | --cache-fil | --cache-fi \ ++ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ++ ac_prev=cache_file ;; ++ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ ++ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) ++ cache_file="$ac_optarg" ;; ++ ++ -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ++ ac_prev=datadir ;; ++ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ ++ | --da=*) ++ datadir="$ac_optarg" ;; ++ ++ -disable-* | --disable-*) ++ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` ++ # Reject names that are not valid shell variable names. ++ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then ++ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; echo "configure: error: $ac_feature: invalid feature name" 1>&5; exit 1; } ++ fi ++ ac_feature=`echo $ac_feature| sed 's/-/_/g'` ++ eval "enable_${ac_feature}=no" ;; ++ ++ -enable-* | --enable-*) ++ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` ++ # Reject names that are not valid shell variable names. ++ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then ++ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; echo "configure: error: $ac_feature: invalid feature name" 1>&5; exit 1; } ++ fi ++ ac_feature=`echo $ac_feature| sed 's/-/_/g'` ++ case "$ac_option" in ++ *=*) ;; ++ *) ac_optarg=yes ;; ++ esac ++ eval "enable_${ac_feature}='$ac_optarg'" ;; ++ ++ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ ++ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ ++ | --exec | --exe | --ex) ++ ac_prev=exec_prefix ;; ++ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ ++ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ ++ | --exec=* | --exe=* | --ex=*) ++ exec_prefix="$ac_optarg" ;; ++ ++ -gas | --gas | --ga | --g) ++ # Obsolete; use --with-gas. ++ with_gas=yes ;; ++ ++ -help | --help | --hel | --he) ++ # Omit some internal or obsolete options to make the list less imposing. ++ # This message is too long to be a string in the A/UX 3.1 sh. ++ cat << EOF ++Usage: configure [options] [host] ++Options: [defaults in brackets after descriptions] ++Configuration: ++ --cache-file=FILE cache test results in FILE ++ --help print this message ++ --no-create do not create output files ++ --quiet, --silent do not print \`checking...' messages ++ --version print the version of autoconf that created configure ++Directory and file names: ++ --prefix=PREFIX install architecture-independent files in PREFIX ++ [$ac_default_prefix] ++ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX ++ [same as prefix] ++ --bindir=DIR user executables in DIR [EPREFIX/bin] ++ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] ++ --libexecdir=DIR program executables in DIR [EPREFIX/libexec] ++ --datadir=DIR read-only architecture-independent data in DIR ++ [PREFIX/share] ++ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] ++ --sharedstatedir=DIR modifiable architecture-independent data in DIR ++ [PREFIX/com] ++ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] ++ --libdir=DIR object code libraries in DIR [EPREFIX/lib] ++ --includedir=DIR C header files in DIR [PREFIX/include] ++ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] ++ --infodir=DIR info documentation in DIR [PREFIX/info] ++ --mandir=DIR man documentation in DIR [PREFIX/man] ++ --srcdir=DIR find the sources in DIR [configure dir or ..] ++ --program-prefix=PREFIX prepend PREFIX to installed program names ++ --program-suffix=SUFFIX append SUFFIX to installed program names ++ --program-transform-name=PROGRAM ++ run sed PROGRAM on installed program names ++EOF ++ cat << EOF ++Host type: ++ --build=BUILD configure for building on BUILD [BUILD=HOST] ++ --host=HOST configure for HOST [guessed] ++ --target=TARGET configure for TARGET [TARGET=HOST] ++Features and packages: ++ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) ++ --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ++ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] ++ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ++ --x-includes=DIR X include files are in DIR ++ --x-libraries=DIR X library files are in DIR ++EOF ++ if test -n "$ac_help"; then ++ echo "--enable and --with options recognized:$ac_help" ++ fi ++ exit 0 ;; ++ ++ -host | --host | --hos | --ho) ++ ac_prev=host ;; ++ -host=* | --host=* | --hos=* | --ho=*) ++ host="$ac_optarg" ;; ++ ++ -includedir | --includedir | --includedi | --included | --include \ ++ | --includ | --inclu | --incl | --inc) ++ ac_prev=includedir ;; ++ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ ++ | --includ=* | --inclu=* | --incl=* | --inc=*) ++ includedir="$ac_optarg" ;; ++ ++ -infodir | --infodir | --infodi | --infod | --info | --inf) ++ ac_prev=infodir ;; ++ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) ++ infodir="$ac_optarg" ;; ++ ++ -libdir | --libdir | --libdi | --libd) ++ ac_prev=libdir ;; ++ -libdir=* | --libdir=* | --libdi=* | --libd=*) ++ libdir="$ac_optarg" ;; ++ ++ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ ++ | --libexe | --libex | --libe) ++ ac_prev=libexecdir ;; ++ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ ++ | --libexe=* | --libex=* | --libe=*) ++ libexecdir="$ac_optarg" ;; ++ ++ -localstatedir | --localstatedir | --localstatedi | --localstated \ ++ | --localstate | --localstat | --localsta | --localst \ ++ | --locals | --local | --loca | --loc | --lo) ++ ac_prev=localstatedir ;; ++ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ ++ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ ++ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) ++ localstatedir="$ac_optarg" ;; ++ ++ -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ++ ac_prev=mandir ;; ++ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) ++ mandir="$ac_optarg" ;; ++ ++ -nfp | --nfp | --nf) ++ # Obsolete; use --without-fp. ++ with_fp=no ;; ++ ++ -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ++ | --no-cr | --no-c) ++ no_create=yes ;; ++ ++ -no-recursion | --no-recursion | --no-recursio | --no-recursi \ ++ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ++ no_recursion=yes ;; ++ ++ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ ++ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ ++ | --oldin | --oldi | --old | --ol | --o) ++ ac_prev=oldincludedir ;; ++ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ ++ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ ++ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) ++ oldincludedir="$ac_optarg" ;; ++ ++ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ++ ac_prev=prefix ;; ++ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ++ prefix="$ac_optarg" ;; ++ ++ -program-prefix | --program-prefix | --program-prefi | --program-pref \ ++ | --program-pre | --program-pr | --program-p) ++ ac_prev=program_prefix ;; ++ -program-prefix=* | --program-prefix=* | --program-prefi=* \ ++ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) ++ program_prefix="$ac_optarg" ;; ++ ++ -program-suffix | --program-suffix | --program-suffi | --program-suff \ ++ | --program-suf | --program-su | --program-s) ++ ac_prev=program_suffix ;; ++ -program-suffix=* | --program-suffix=* | --program-suffi=* \ ++ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) ++ program_suffix="$ac_optarg" ;; ++ ++ -program-transform-name | --program-transform-name \ ++ | --program-transform-nam | --program-transform-na \ ++ | --program-transform-n | --program-transform- \ ++ | --program-transform | --program-transfor \ ++ | --program-transfo | --program-transf \ ++ | --program-trans | --program-tran \ ++ | --progr-tra | --program-tr | --program-t) ++ ac_prev=program_transform_name ;; ++ -program-transform-name=* | --program-transform-name=* \ ++ | --program-transform-nam=* | --program-transform-na=* \ ++ | --program-transform-n=* | --program-transform-=* \ ++ | --program-transform=* | --program-transfor=* \ ++ | --program-transfo=* | --program-transf=* \ ++ | --program-trans=* | --program-tran=* \ ++ | --progr-tra=* | --program-tr=* | --program-t=*) ++ program_transform_name="$ac_optarg" ;; ++ ++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ ++ | -silent | --silent | --silen | --sile | --sil) ++ silent=yes ;; ++ ++ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ++ ac_prev=sbindir ;; ++ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ ++ | --sbi=* | --sb=*) ++ sbindir="$ac_optarg" ;; ++ ++ -sharedstatedir | --sharedstatedir | --sharedstatedi \ ++ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ ++ | --sharedst | --shareds | --shared | --share | --shar \ ++ | --sha | --sh) ++ ac_prev=sharedstatedir ;; ++ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ ++ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ ++ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ ++ | --sha=* | --sh=*) ++ sharedstatedir="$ac_optarg" ;; ++ ++ -site | --site | --sit) ++ ac_prev=site ;; ++ -site=* | --site=* | --sit=*) ++ site="$ac_optarg" ;; ++ ++ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ++ ac_prev=srcdir ;; ++ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ++ srcdir="$ac_optarg" ;; ++ ++ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ ++ | --syscon | --sysco | --sysc | --sys | --sy) ++ ac_prev=sysconfdir ;; ++ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ ++ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) ++ sysconfdir="$ac_optarg" ;; ++ ++ -target | --target | --targe | --targ | --tar | --ta | --t) ++ ac_prev=target ;; ++ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) ++ target="$ac_optarg" ;; ++ ++ -v | -verbose | --verbose | --verbos | --verbo | --verb) ++ verbose=yes ;; ++ ++ -version | --version | --versio | --versi | --vers) ++ echo "configure generated by autoconf version 2.13" ++ exit 0 ;; ++ ++ -with-* | --with-*) ++ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` ++ # Reject names that are not valid shell variable names. ++ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then ++ { echo "configure: error: $ac_package: invalid package name" 1>&2; echo "configure: error: $ac_package: invalid package name" 1>&5; exit 1; } ++ fi ++ ac_package=`echo $ac_package| sed 's/-/_/g'` ++ case "$ac_option" in ++ *=*) ;; ++ *) ac_optarg=yes ;; ++ esac ++ eval "with_${ac_package}='$ac_optarg'" ;; ++ ++ -without-* | --without-*) ++ ac_package=`echo $ac_option|sed -e 's/-*without-//'` ++ # Reject names that are not valid shell variable names. ++ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then ++ { echo "configure: error: $ac_package: invalid package name" 1>&2; echo "configure: error: $ac_package: invalid package name" 1>&5; exit 1; } ++ fi ++ ac_package=`echo $ac_package| sed 's/-/_/g'` ++ eval "with_${ac_package}=no" ;; ++ ++ --x) ++ # Obsolete; use --with-x. ++ with_x=yes ;; ++ ++ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ ++ | --x-incl | --x-inc | --x-in | --x-i) ++ ac_prev=x_includes ;; ++ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ ++ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) ++ x_includes="$ac_optarg" ;; ++ ++ -x-libraries | --x-libraries | --x-librarie | --x-librari \ ++ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ++ ac_prev=x_libraries ;; ++ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ ++ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) ++ x_libraries="$ac_optarg" ;; ++ ++ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&5; exit 1; } ++ ;; ++ ++ *) ++ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then ++ echo "configure: warning: $ac_option: invalid host type" 1>&2 ++ fi ++ if test "x$nonopt" != xNONE; then ++ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; echo "configure: error: can only configure for one host and one target at a time" 1>&5; exit 1; } ++ fi ++ nonopt="$ac_option" ++ ;; ++ ++ esac ++done ++ ++if test -n "$ac_prev"; then ++ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&5; exit 1; } ++fi ++ ++if test -z "$srcdir"; then ++ srcdir=`dirname "$0"` ++fi ++srcdir="$srcdir/../.." ++trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 ++ ++# File descriptor usage: ++# 0 standard input ++# 1 file creation ++# 2 errors and warnings ++# 3 some systems may open it to /dev/tty ++# 4 used on the Kubota Titan ++# 6 checking for... messages and results ++# 5 compiler messages saved in config.log ++if test "$silent" = yes; then ++ exec 6>/dev/null ++else ++ exec 6>&1 ++fi ++exec 5>>${CONFIG_LOG=./config.log} ++ ++echo "\ ++This file contains any messages produced by compilers while ++running configure, to aid debugging if configure makes a mistake. ++" 1>&5 ++ ++# Strip out --no-create and --no-recursion so they do not pile up. ++# Also quote any args containing shell metacharacters. ++ac_configure_args= ++for ac_arg ++do ++ case "$ac_arg" in ++ -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ++ | --no-cr | --no-c) ;; ++ -no-recursion | --no-recursion | --no-recursio | --no-recursi \ ++ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; ++ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ++ ac_configure_args="$ac_configure_args '$ac_arg'" ;; ++ *) ac_configure_args="$ac_configure_args $ac_arg" ;; ++ esac ++done ++ ++# NLS nuisances. ++# Only set these to C if already set. These must not be set unconditionally ++# because not all systems understand e.g. LANG=C (notably SCO). ++# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! ++# Non-C LC_CTYPE values break the ctype check. ++if test "${LANG+set}" = set; then LANG=C; export LANG; fi ++if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi ++if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi ++if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi ++ ++# confdefs.h avoids OS command line length limits that DEFS can exceed. ++rm -rf conftest* confdefs.h ++# AIX cpp loses on an empty file, so make sure it contains at least a newline. ++echo > confdefs.h ++ ++# A filename unique to this package, relative to the directory that ++# configure is in, which we can look for to find out if srcdir is correct. ++ac_unique_file=js/src/jsapi.h ++ ++# Find the source files, if location was not specified. ++if test -z "$srcdir"; then ++ ac_srcdir_defaulted=yes ++ # Try the directory containing this script, then its parent. ++ ac_prog=$0 ++ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` ++ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. ++ srcdir=$ac_confdir ++ if test ! -r $srcdir/$ac_unique_file; then ++ srcdir=.. ++ fi ++else ++ ac_srcdir_defaulted=no ++fi ++if test ! -r $srcdir/$ac_unique_file; then ++ if test "$ac_srcdir_defaulted" = yes; then ++ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; echo "configure: error: can not find sources in $ac_confdir or .." 1>&5; exit 1; } ++ else ++ { echo "configure: error: can not find sources in $srcdir" 1>&2; echo "configure: error: can not find sources in $srcdir" 1>&5; exit 1; } ++ fi ++fi ++srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` ++ ++# Prefer explicitly selected file to automatically selected ones. ++if test -z "$CONFIG_SITE"; then ++ if test "x$prefix" != xNONE; then ++ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" ++ else ++ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" ++ fi ++fi ++for ac_site_file in $CONFIG_SITE; do ++ if test -r "$ac_site_file"; then ++ echo "loading site script $ac_site_file" ++ . "$ac_site_file" ++ fi ++done ++ ++if test -r "$cache_file"; then ++ echo "loading cache $cache_file" ++ . $cache_file ++else ++ echo "creating cache $cache_file" ++ > $cache_file ++fi ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ac_exeext= ++ac_objext=o ++if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then ++ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. ++ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ++ ac_n= ac_c=' ++' ac_t=' ' ++ else ++ ac_n=-n ac_c= ac_t= ++ fi ++else ++ ac_n= ac_c='\c' ac_t= ++fi ++ ++ ++ ++test "x$prefix" = xNONE && prefix=$ac_default_prefix ++# Let make expand exec_prefix. ++test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ++ ++ ++ac_aux_dir= ++for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do ++ if test -f $ac_dir/install-sh; then ++ ac_aux_dir=$ac_dir ++ ac_install_sh="$ac_aux_dir/install-sh -c" ++ break ++ elif test -f $ac_dir/install.sh; then ++ ac_aux_dir=$ac_dir ++ ac_install_sh="$ac_aux_dir/install.sh -c" ++ break ++ fi ++done ++if test -z "$ac_aux_dir"; then ++ { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&2; echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&5; exit 1; } ++fi ++ac_config_guess=$ac_aux_dir/config.guess ++ac_config_sub=$ac_aux_dir/config.sub ++ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. ++ ++ ++# Do some error checking and defaulting for the host and target type. ++# The inputs are: ++# configure --host=HOST --target=TARGET --build=BUILD NONOPT ++# ++# The rules are: ++# 1. You are not allowed to specify --host, --target, and nonopt at the ++# same time. ++# 2. Host defaults to nonopt. ++# 3. If nonopt is not specified, then host defaults to the current host, ++# as determined by config.guess. ++# 4. Target and build default to nonopt. ++# 5. If nonopt is not specified, then target and build default to host. ++ ++# The aliases save the names the user supplied, while $host etc. ++# will get canonicalized. ++case $host---$target---$nonopt in ++NONE---*---* | *---NONE---* | *---*---NONE) ;; ++*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; echo "configure: error: can only configure for one host and one target at a time" 1>&5; exit 1; } ;; ++esac ++ ++ ++# Make sure we can run config.sub. ++if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : ++else { echo "configure: error: can not run $ac_config_sub" 1>&2; echo "configure: error: can not run $ac_config_sub" 1>&5; exit 1; } ++fi ++ ++echo $ac_n "checking host system type""... $ac_c" 1>&6 ++echo "configure:680: checking host system type" >&5 ++ ++host_alias=$host ++case "$host_alias" in ++NONE) ++ case $nonopt in ++ NONE) ++ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : ++ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; echo "configure: error: can not guess host type; you must specify one" 1>&5; exit 1; } ++ fi ;; ++ *) host_alias=$nonopt ;; ++ esac ;; ++esac ++ ++host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` ++host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ++host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ++host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ++echo "$ac_t""$host" 1>&6 ++ ++echo $ac_n "checking target system type""... $ac_c" 1>&6 ++echo "configure:701: checking target system type" >&5 ++ ++target_alias=$target ++case "$target_alias" in ++NONE) ++ case $nonopt in ++ NONE) target_alias=$host_alias ;; ++ *) target_alias=$nonopt ;; ++ esac ;; ++esac ++ ++target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` ++target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ++target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ++target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ++echo "$ac_t""$target" 1>&6 ++ ++echo $ac_n "checking build system type""... $ac_c" 1>&6 ++echo "configure:719: checking build system type" >&5 ++ ++build_alias=$build ++case "$build_alias" in ++NONE) ++ case $nonopt in ++ NONE) build_alias=$host_alias ;; ++ *) build_alias=$nonopt ;; ++ esac ;; ++esac ++ ++build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` ++build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ++build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ++build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ++echo "$ac_t""$build" 1>&6 ++ ++test "$host_alias" != "$target_alias" && ++ test "$program_prefix$program_suffix$program_transform_name" = \ ++ NONENONEs,x,x, && ++ program_prefix=${target_alias}- ++ ++ ++CFLAGS="${CFLAGS=}" ++CPPFLAGS="${CPPFLAGS=}" ++CXXFLAGS="${CXXFLAGS=}" ++LDFLAGS="${LDFLAGS=}" ++HOST_CFLAGS="${HOST_CFLAGS=}" ++HOST_CXXFLAGS="${HOST_CXXFLAGS=}" ++HOST_LDFLAGS="${HOST_LDFLAGS=}" ++ ++_SUBDIR_CC="$CC" ++_SUBDIR_CXX="$CXX" ++_SUBDIR_CFLAGS="$CFLAGS" ++_SUBDIR_CPPFLAGS="$CPPFLAGS" ++_SUBDIR_CXXFLAGS="$CXXFLAGS" ++_SUBDIR_LDFLAGS="$LDFLAGS" ++_SUBDIR_HOST_CC="$HOST_CC" ++_SUBDIR_HOST_CFLAGS="$HOST_CFLAGS" ++_SUBDIR_HOST_CXXFLAGS="$HOST_CXXFLAGS" ++_SUBDIR_HOST_LDFLAGS="$HOST_LDFLAGS" ++_SUBDIR_CONFIG_ARGS="$ac_configure_args" ++ ++NSPR_VERSION=4 ++NSPR_MINVER=4.9.2 ++ ++W32API_VERSION=3.14 ++ ++MISSING_X= ++ ++USE_PTHREADS= ++_PTHREAD_LDFLAGS="" ++ ++LDFLAGS="$LDFLAGS $LINKER_LDFLAGS" ++ ++if test -z "$JS_STANDALONE"; then ++ autoconfmk=autoconf-js.mk ++fi ++ ++ ++if test -n "$JS_STANDALONE"; then ++ jsconfdefs=$_objdir/js/src/js-confdefs.h ++else ++ jsconfdefs=$_objdir/js-confdefs.h ++fi ++ ++ ++ ++case "$target" in ++*-android*|*-linuxandroid*) ++ directory_include_args="-isystem $android_system -isystem $android_sysroot/usr/include" ++ ++ # clang will do any number of interesting things with host tools unless we tell ++ # it to use the NDK tools. ++ extra_opts="-gcc-toolchain $(dirname $(dirname $TOOLCHAIN_PREFIX))" ++ CPPFLAGS="$extra_opts -D__ANDROID_API__=$android_version $CPPFLAGS" ++ ASFLAGS="$extra_opts $ASFLAGS" ++ LDFLAGS="$extra_opts $LDFLAGS" ++ ++ CPPFLAGS="$directory_include_args $CPPFLAGS" ++ CFLAGS="-fno-short-enums -fno-exceptions $CFLAGS" ++ CXXFLAGS="-fno-short-enums -fno-exceptions $CXXFLAGS $stlport_cppflags" ++ ASFLAGS="$directory_include_args -DANDROID $ASFLAGS" ++ ++ LDFLAGS="-L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS" ++ ANDROID_PLATFORM="${android_platform}" ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' ANDROID ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define ANDROID 1 ++EOF ++ ++ ++ ++ ;; ++esac ++ ++ ++ ++case "$target" in ++*-apple-darwin*) ++ ++ ++# Check whether --with-ios-sdk or --without-ios-sdk was given. ++if test "${with_ios_sdk+set}" = set; then ++ withval="$with_ios_sdk" ++ ios_sdk=$withval ++fi ++ ++ ++# Check whether --enable-ios-target or --disable-ios-target was given. ++if test "${enable_ios_target+set}" = set; then ++ enableval="$enable_ios_target" ++ _IOS_TARGET=$enableval ++fi ++ ++_IOS_TARGET_DEFAULT=8.0 ++ ++case "$target" in ++arm*-apple-darwin*) ++ if test -z "$ios_sdk" -o "$ios_sdk" = "yes"; then ++ ios_sdk=iphoneos ++ fi ++ case "$ios_sdk" in ++ iphoneos*) ++ ios_target_arg="-miphoneos-version-min" ++ ;; ++ *) ++ { echo "configure: error: Only 'iphoneos' SDKs are valid when targeting iOS device, don't know what to do with '$ios_sdk'." 1>&2; echo "configure: error: Only 'iphoneos' SDKs are valid when targeting iOS device, don't know what to do with '$ios_sdk'." 1>&5; exit 1; } ++ ;; ++ esac ++ ;; ++*-apple-darwin*) ++ ios_target_arg="-mios-simulator-version-min" ++ case "$ios_sdk" in ++ # Empty SDK is okay, this might be an OS X desktop build. ++ ""|iphonesimulator*) ++ ;; ++ # Default to iphonesimulator ++ yes) ++ ios_sdk=iphonesimulator ++ ;; ++ *) ++ { echo "configure: error: Only 'iphonesimulator' SDKs are valid when targeting iOS simulator." 1>&2; echo "configure: error: Only 'iphonesimulator' SDKs are valid when targeting iOS simulator." 1>&5; exit 1; } ++ ;; ++ esac ++ ;; ++esac ++ ++ ++if test -n "$ios_sdk"; then ++ if test -z "$_IOS_TARGET"; then ++ _IOS_TARGET=$_IOS_TARGET_DEFAULT ++ ios_target_arg="${ios_target_arg}=${_IOS_TARGET}" ++ fi ++ # Ensure that xcrun knows where this SDK is. ++ ios_sdk_path=`xcrun --sdk $ios_sdk --show-sdk-path 2>/dev/null` ++ _ret=$? ++ if test $_ret -ne 0; then ++ { echo "configure: error: iOS SDK '$ios_sdk' could not be found." 1>&2; echo "configure: error: iOS SDK '$ios_sdk' could not be found." 1>&5; exit 1; } ++ fi ++ MOZ_IOS=1 ++ export HOST_CC=clang ++ export HOST_CXX=clang++ ++ # Add isysroot, arch, and ios target arguments ++ case "$target_cpu" in ++ arm*) ++ ARGS="-arch armv7" ++ ;; ++ *) ++ # Unfortunately simulator builds need this. ++ export CROSS_COMPILE=1 ++ ;; ++ esac ++ ARGS=" $ARGS -isysroot $ios_sdk_path $ios_target_arg" ++ # Now find our tools ++ ++ ++_prog_name=clang ++ ++echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 ++echo "configure:902: checking for $_prog_name in iOS SDK" >&5 ++if eval "test \"`echo '$''{'ac_cv_ios_path_CC'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` ++_res=$? ++if test $_res -ne 0; then ++ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } ++fi ++ac_cv_ios_path_CC=$_path ++ ++fi ++ ++echo "$ac_t""$ac_cv_ios_path_CC" 1>&6 ++CC="${ac_cv_ios_path_CC}$ARGS" ++ ++ ++ ++_prog_name=clang++ ++ ++echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 ++echo "configure:924: checking for $_prog_name in iOS SDK" >&5 ++if eval "test \"`echo '$''{'ac_cv_ios_path_CXX'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` ++_res=$? ++if test $_res -ne 0; then ++ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } ++fi ++ac_cv_ios_path_CXX=$_path ++ ++fi ++ ++echo "$ac_t""$ac_cv_ios_path_CXX" 1>&6 ++CXX="${ac_cv_ios_path_CXX}$ARGS" ++ ++ export CPP="$CC -E" ++ ++ ++_prog_name=`echo AR | tr "[:upper:]" "[:lower:]"` ++ ++echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 ++echo "configure:947: checking for $_prog_name in iOS SDK" >&5 ++if eval "test \"`echo '$''{'ac_cv_ios_path_AR'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` ++_res=$? ++if test $_res -ne 0; then ++ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } ++fi ++ac_cv_ios_path_AR=$_path ++ ++fi ++ ++echo "$ac_t""$ac_cv_ios_path_AR" 1>&6 ++AR="${ac_cv_ios_path_AR}" ++ ++ ++ ++_prog_name=as ++ ++echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 ++echo "configure:969: checking for $_prog_name in iOS SDK" >&5 ++if eval "test \"`echo '$''{'ac_cv_ios_path_AS'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` ++_res=$? ++if test $_res -ne 0; then ++ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } ++fi ++ac_cv_ios_path_AS=$_path ++ ++fi ++ ++echo "$ac_t""$ac_cv_ios_path_AS" 1>&6 ++AS="${ac_cv_ios_path_AS}$ARGS" ++ ++ ++ ++_prog_name=`echo OTOOL | tr "[:upper:]" "[:lower:]"` ++ ++echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 ++echo "configure:991: checking for $_prog_name in iOS SDK" >&5 ++if eval "test \"`echo '$''{'ac_cv_ios_path_OTOOL'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` ++_res=$? ++if test $_res -ne 0; then ++ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } ++fi ++ac_cv_ios_path_OTOOL=$_path ++ ++fi ++ ++echo "$ac_t""$ac_cv_ios_path_OTOOL" 1>&6 ++OTOOL="${ac_cv_ios_path_OTOOL}" ++ ++ ++ ++_prog_name=`echo STRIP | tr "[:upper:]" "[:lower:]"` ++ ++echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 ++echo "configure:1013: checking for $_prog_name in iOS SDK" >&5 ++if eval "test \"`echo '$''{'ac_cv_ios_path_STRIP'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` ++_res=$? ++if test $_res -ne 0; then ++ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } ++fi ++ac_cv_ios_path_STRIP=$_path ++ ++fi ++ ++echo "$ac_t""$ac_cv_ios_path_STRIP" 1>&6 ++STRIP="${ac_cv_ios_path_STRIP}" ++ ++ export PKG_CONFIG_PATH=${ios_sdk_path}/usr/lib/pkgconfig/ ++fi ++ ++ ++ ++ ;; ++esac ++ ++ ++if test "$COMPILE_ENVIRONMENT"; then ++ ++# Note: ++# In Mozilla, we use the names $target, $host and $build incorrectly, but are ++# too far gone to back out now. See Bug 475488: ++# - When we say $target, we mean $host, that is, the system on which ++# Mozilla will be run. ++# - When we say $host, we mean $build, that is, the system on which Mozilla ++# is built. ++# - $target (in its correct usage) is for compilers who generate code for a ++# different platform than $host, so it would not be used by Mozilla. ++if test "$target" != "$host"; then ++ ++echo "cross compiling from $host to $target" ++ ++_SAVE_PATH=$PATH ++case "${TOOLCHAIN_PREFIX}" in ++/*) ++ PATH="/:$PATH" ++ ;; ++esac ++# Extract the first word of "gcc", so it can be a program name with args. ++set dummy gcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1063: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="gcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++if test -z "$CC"; then ++ # Extract the first word of "cc", so it can be a program name with args. ++set dummy cc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1093: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_prog_rejected=no ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ++ ac_prog_rejected=yes ++ continue ++ fi ++ ac_cv_prog_CC="cc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++if test $ac_prog_rejected = yes; then ++ # We found a bogon in the path, so make sure we never use it. ++ set dummy $ac_cv_prog_CC ++ shift ++ if test $# -gt 0; then ++ # We chose a different compiler from the bogus one. ++ # However, it has the same basename, so the bogon will be chosen ++ # first if we set CC to just the basename; use the full file name. ++ shift ++ set dummy "$ac_dir/$ac_word" "$@" ++ shift ++ ac_cv_prog_CC="$@" ++ fi ++fi ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test -z "$CC"; then ++ case "`uname -s`" in ++ *win32* | *WIN32*) ++ # Extract the first word of "cl", so it can be a program name with args. ++set dummy cl; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1144: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="cl" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ esac ++ fi ++ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; echo "configure: error: no acceptable cc found in \$PATH" 1>&5; exit 1; } ++fi ++ ++echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ++echo "configure:1176: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++if eval "test \"`echo '$''{'ac_cv_prog_cc_works'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext << EOF ++ ++#line 1194 "configure" ++#include "confdefs.h" ++ ++main(){return(0);} ++EOF ++if { (eval echo configure:1199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ ac_cv_prog_cc_works=yes ++ # If we can't run a trivial program, we are probably using a cross compiler. ++ if (./conftest; exit) 2>/dev/null; then ++ ac_cv_prog_cc_cross=no ++ else ++ ac_cv_prog_cc_cross=yes ++ fi ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ ac_cv_prog_cc_works=no ++fi ++rm -fr conftest* ++fi ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 ++if test $ac_cv_prog_cc_works = no; then ++ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&5; exit 1; } ++fi ++echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ++echo "configure:1231: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 ++cross_compiling=$ac_cv_prog_cc_cross ++ ++echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ++echo "configure:1236: checking whether we are using GNU C" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ++ ac_cv_prog_gcc=yes ++else ++ ac_cv_prog_gcc=no ++fi ++fi ++ ++echo "$ac_t""$ac_cv_prog_gcc" 1>&6 ++ ++if test $ac_cv_prog_gcc = yes; then ++ GCC=yes ++else ++ GCC= ++fi ++ ++ac_test_CFLAGS="${CFLAGS+set}" ++ac_save_CFLAGS="$CFLAGS" ++CFLAGS= ++echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ++echo "configure:1264: checking whether ${CC-cc} accepts -g" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ echo 'void f(){}' > conftest.c ++if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ++ ac_cv_prog_cc_g=yes ++else ++ ac_cv_prog_cc_g=no ++fi ++rm -f conftest* ++ ++fi ++ ++echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then ++ CFLAGS="-g -O2" ++ else ++ CFLAGS="-g" ++ fi ++else ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi ++fi ++ ++for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1300: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$CXX"; then ++ ac_cv_prog_CXX="$CXX" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CXX="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CXX="$ac_cv_prog_CXX" ++if test -n "$CXX"; then ++ echo "$ac_t""$CXX" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$CXX" && break ++done ++test -n "$CXX" || CXX="gcc" ++ ++ ++echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ++echo "configure:1332: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ++ ++ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++if eval "test \"`echo '$''{'ac_cv_prog_cxx_works'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext << EOF ++ ++#line 1350 "configure" ++#include "confdefs.h" ++ ++int main(){return(0);} ++EOF ++if { (eval echo configure:1355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ ac_cv_prog_cxx_works=yes ++ # If we can't run a trivial program, we are probably using a cross compiler. ++ if (./conftest; exit) 2>/dev/null; then ++ ac_cv_prog_cxx_cross=no ++ else ++ ac_cv_prog_cxx_cross=yes ++ fi ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ ac_cv_prog_cxx_works=no ++fi ++rm -fr conftest* ++fi ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 ++if test $ac_cv_prog_cxx_works = no; then ++ { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&5; exit 1; } ++fi ++echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ++echo "configure:1387: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 ++echo "configure:1392: checking whether we are using GNU C++" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.C <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ++ ac_cv_prog_gxx=yes ++else ++ ac_cv_prog_gxx=no ++fi ++fi ++ ++echo "$ac_t""$ac_cv_prog_gxx" 1>&6 ++ ++if test $ac_cv_prog_gxx = yes; then ++ GXX=yes ++else ++ GXX= ++fi ++ ++ac_test_CXXFLAGS="${CXXFLAGS+set}" ++ac_save_CXXFLAGS="$CXXFLAGS" ++CXXFLAGS= ++echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 ++echo "configure:1420: checking whether ${CXX-g++} accepts -g" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ echo 'void f(){}' > conftest.cc ++if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then ++ ac_cv_prog_cxx_g=yes ++else ++ ac_cv_prog_cxx_g=no ++fi ++rm -f conftest* ++ ++fi ++ ++echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 ++if test "$ac_test_CXXFLAGS" = set; then ++ CXXFLAGS="$ac_save_CXXFLAGS" ++elif test $ac_cv_prog_cxx_g = yes; then ++ if test "$GXX" = yes; then ++ CXXFLAGS="-g -O2" ++ else ++ CXXFLAGS="-g" ++ fi ++else ++ if test "$GXX" = yes; then ++ CXXFLAGS="-O2" ++ else ++ CXXFLAGS= ++ fi ++fi ++ ++ ++for ac_prog in "${TOOLCHAIN_PREFIX}ranlib" ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1457: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$RANLIB"; then ++ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_RANLIB="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++RANLIB="$ac_cv_prog_RANLIB" ++if test -n "$RANLIB"; then ++ echo "$ac_t""$RANLIB" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$RANLIB" && break ++done ++test -n "$RANLIB" || RANLIB=":" ++ ++for ac_prog in "${TOOLCHAIN_PREFIX}as" ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1492: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$AS"; then ++ ac_cv_prog_AS="$AS" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_AS="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++AS="$ac_cv_prog_AS" ++if test -n "$AS"; then ++ echo "$ac_t""$AS" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$AS" && break ++done ++test -n "$AS" || AS=":" ++ ++for ac_prog in "${TOOLCHAIN_PREFIX}lipo" ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1527: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$LIPO"; then ++ ac_cv_prog_LIPO="$LIPO" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_LIPO="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++LIPO="$ac_cv_prog_LIPO" ++if test -n "$LIPO"; then ++ echo "$ac_t""$LIPO" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$LIPO" && break ++done ++test -n "$LIPO" || LIPO=":" ++ ++for ac_prog in "${TOOLCHAIN_PREFIX}strip" ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1562: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$STRIP"; then ++ ac_cv_prog_STRIP="$STRIP" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_STRIP="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++STRIP="$ac_cv_prog_STRIP" ++if test -n "$STRIP"; then ++ echo "$ac_t""$STRIP" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$STRIP" && break ++done ++test -n "$STRIP" || STRIP=":" ++ ++for ac_prog in "${TOOLCHAIN_PREFIX}otool" ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1597: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_OTOOL'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$OTOOL"; then ++ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_OTOOL="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++OTOOL="$ac_cv_prog_OTOOL" ++if test -n "$OTOOL"; then ++ echo "$ac_t""$OTOOL" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$OTOOL" && break ++done ++test -n "$OTOOL" || OTOOL=":" ++ ++for ac_prog in "${TOOLCHAIN_PREFIX}install_name_tool" ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1632: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_INSTALL_NAME_TOOL'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$INSTALL_NAME_TOOL"; then ++ ac_cv_prog_INSTALL_NAME_TOOL="$INSTALL_NAME_TOOL" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_INSTALL_NAME_TOOL="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++INSTALL_NAME_TOOL="$ac_cv_prog_INSTALL_NAME_TOOL" ++if test -n "$INSTALL_NAME_TOOL"; then ++ echo "$ac_t""$INSTALL_NAME_TOOL" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$INSTALL_NAME_TOOL" && break ++done ++test -n "$INSTALL_NAME_TOOL" || INSTALL_NAME_TOOL=":" ++ ++for ac_prog in "${TOOLCHAIN_PREFIX}objcopy" ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1667: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$OBJCOPY"; then ++ ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_OBJCOPY="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++OBJCOPY="$ac_cv_prog_OBJCOPY" ++if test -n "$OBJCOPY"; then ++ echo "$ac_t""$OBJCOPY" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$OBJCOPY" && break ++done ++test -n "$OBJCOPY" || OBJCOPY=":" ++ ++PATH=$_SAVE_PATH ++ ++else ++ # Extract the first word of "gcc", so it can be a program name with args. ++set dummy gcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1703: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="gcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++if test -z "$CC"; then ++ # Extract the first word of "cc", so it can be a program name with args. ++set dummy cc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1733: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_prog_rejected=no ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ++ ac_prog_rejected=yes ++ continue ++ fi ++ ac_cv_prog_CC="cc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++if test $ac_prog_rejected = yes; then ++ # We found a bogon in the path, so make sure we never use it. ++ set dummy $ac_cv_prog_CC ++ shift ++ if test $# -gt 0; then ++ # We chose a different compiler from the bogus one. ++ # However, it has the same basename, so the bogon will be chosen ++ # first if we set CC to just the basename; use the full file name. ++ shift ++ set dummy "$ac_dir/$ac_word" "$@" ++ shift ++ ac_cv_prog_CC="$@" ++ fi ++fi ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test -z "$CC"; then ++ case "`uname -s`" in ++ *win32* | *WIN32*) ++ # Extract the first word of "cl", so it can be a program name with args. ++set dummy cl; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1784: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="cl" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ esac ++ fi ++ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; echo "configure: error: no acceptable cc found in \$PATH" 1>&5; exit 1; } ++fi ++ ++echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ++echo "configure:1816: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++if eval "test \"`echo '$''{'ac_cv_prog_cc_works'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext << EOF ++ ++#line 1834 "configure" ++#include "confdefs.h" ++ ++main(){return(0);} ++EOF ++if { (eval echo configure:1839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ ac_cv_prog_cc_works=yes ++ # If we can't run a trivial program, we are probably using a cross compiler. ++ if (./conftest; exit) 2>/dev/null; then ++ ac_cv_prog_cc_cross=no ++ else ++ ac_cv_prog_cc_cross=yes ++ fi ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ ac_cv_prog_cc_works=no ++fi ++rm -fr conftest* ++fi ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 ++if test $ac_cv_prog_cc_works = no; then ++ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&5; exit 1; } ++fi ++echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ++echo "configure:1871: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 ++cross_compiling=$ac_cv_prog_cc_cross ++ ++echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ++echo "configure:1876: checking whether we are using GNU C" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ++ ac_cv_prog_gcc=yes ++else ++ ac_cv_prog_gcc=no ++fi ++fi ++ ++echo "$ac_t""$ac_cv_prog_gcc" 1>&6 ++ ++if test $ac_cv_prog_gcc = yes; then ++ GCC=yes ++else ++ GCC= ++fi ++ ++ac_test_CFLAGS="${CFLAGS+set}" ++ac_save_CFLAGS="$CFLAGS" ++CFLAGS= ++echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ++echo "configure:1904: checking whether ${CC-cc} accepts -g" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ echo 'void f(){}' > conftest.c ++if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ++ ac_cv_prog_cc_g=yes ++else ++ ac_cv_prog_cc_g=no ++fi ++rm -f conftest* ++ ++fi ++ ++echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then ++ CFLAGS="-g -O2" ++ else ++ CFLAGS="-g" ++ fi ++else ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi ++fi ++ ++ for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1940: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$CXX"; then ++ ac_cv_prog_CXX="$CXX" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CXX="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CXX="$ac_cv_prog_CXX" ++if test -n "$CXX"; then ++ echo "$ac_t""$CXX" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$CXX" && break ++done ++test -n "$CXX" || CXX="gcc" ++ ++ ++echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ++echo "configure:1972: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ++ ++ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++if eval "test \"`echo '$''{'ac_cv_prog_cxx_works'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext << EOF ++ ++#line 1990 "configure" ++#include "confdefs.h" ++ ++int main(){return(0);} ++EOF ++if { (eval echo configure:1995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ ac_cv_prog_cxx_works=yes ++ # If we can't run a trivial program, we are probably using a cross compiler. ++ if (./conftest; exit) 2>/dev/null; then ++ ac_cv_prog_cxx_cross=no ++ else ++ ac_cv_prog_cxx_cross=yes ++ fi ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ ac_cv_prog_cxx_works=no ++fi ++rm -fr conftest* ++fi ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 ++if test $ac_cv_prog_cxx_works = no; then ++ { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&5; exit 1; } ++fi ++echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ++echo "configure:2027: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 ++echo "configure:2032: checking whether we are using GNU C++" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.C <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ++ ac_cv_prog_gxx=yes ++else ++ ac_cv_prog_gxx=no ++fi ++fi ++ ++echo "$ac_t""$ac_cv_prog_gxx" 1>&6 ++ ++if test $ac_cv_prog_gxx = yes; then ++ GXX=yes ++else ++ GXX= ++fi ++ ++ac_test_CXXFLAGS="${CXXFLAGS+set}" ++ac_save_CXXFLAGS="$CXXFLAGS" ++CXXFLAGS= ++echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 ++echo "configure:2060: checking whether ${CXX-g++} accepts -g" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ echo 'void f(){}' > conftest.cc ++if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then ++ ac_cv_prog_cxx_g=yes ++else ++ ac_cv_prog_cxx_g=no ++fi ++rm -f conftest* ++ ++fi ++ ++echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 ++if test "$ac_test_CXXFLAGS" = set; then ++ CXXFLAGS="$ac_save_CXXFLAGS" ++elif test $ac_cv_prog_cxx_g = yes; then ++ if test "$GXX" = yes; then ++ CXXFLAGS="-g -O2" ++ else ++ CXXFLAGS="-g" ++ fi ++else ++ if test "$GXX" = yes; then ++ CXXFLAGS="-O2" ++ else ++ CXXFLAGS= ++ fi ++fi ++ ++ # Extract the first word of "ranlib", so it can be a program name with args. ++set dummy ranlib; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:2094: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$RANLIB"; then ++ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_RANLIB="ranlib" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" ++fi ++fi ++RANLIB="$ac_cv_prog_RANLIB" ++if test -n "$RANLIB"; then ++ echo "$ac_t""$RANLIB" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ for ac_prog in $AS as ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:2126: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$AS" in ++ /*) ++ ac_cv_path_AS="$AS" # Let the user override the test with a path. ++ ;; ++ ?:/*) ++ ac_cv_path_AS="$AS" # Let the user override the test with a dos path. ++ ;; ++ *) ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_path_AS="$ac_dir/$ac_word" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac ++fi ++AS="$ac_cv_path_AS" ++if test -n "$AS"; then ++ echo "$ac_t""$AS" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$AS" && break ++done ++test -n "$AS" || AS="$CC" ++ ++ if test "$msyshost"; then ++ case "$AS" in ++ /*) ++ tmp_DIRNAME=`dirname "$AS"` ++ tmp_BASENAME=`basename "$AS"` ++ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` ++ AS="$tmp_PWD/$tmp_BASENAME" ++ if test -e "$AS.exe"; then ++ AS="$AS.exe" ++ fi ++ esac ++ fi ++ ++ for ac_prog in strip ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:2180: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$STRIP"; then ++ ac_cv_prog_STRIP="$STRIP" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_STRIP="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++STRIP="$ac_cv_prog_STRIP" ++if test -n "$STRIP"; then ++ echo "$ac_t""$STRIP" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$STRIP" && break ++done ++test -n "$STRIP" || STRIP=":" ++ ++ if test -z "$HOST_CC"; then ++ HOST_CC='$(CC)' ++ fi ++ if test -z "$HOST_CXX"; then ++ HOST_CXX='$(CXX)' ++ fi ++fi ++ ++ ++GNU_CC= ++GNU_CXX= ++if test "$CC_TYPE" = "gcc"; then ++ GNU_CC=1 ++ GNU_CXX=1 ++fi ++ ++CLANG_CC= ++CLANG_CXX= ++CLANG_CL= ++if test "$CC_TYPE" = "clang"; then ++ GNU_CC=1 ++ GNU_CXX=1 ++ CLANG_CC=1 ++ CLANG_CXX=1 ++fi ++if test "$CC_TYPE" = "clang-cl"; then ++ CLANG_CL=1 ++fi ++ ++ ++ ++ ++ ++ ++# Target the Windows 8.1 SDK by default ++WINVER=601 ++ ++case "$target" in ++*-mingw*) ++ if test "$GCC" != "yes"; then ++ # Check to see if we are really running in a msvc environemnt ++ _WIN32_MSVC=1 ++ ++ # Make sure compilers are valid ++ CFLAGS="$CFLAGS -nologo" ++ CXXFLAGS="$CXXFLAGS -TP -nologo" ++ if test -z "$CLANG_CL"; then ++ CPPFLAGS="$CPPFLAGS -utf-8" ++ fi ++ # _CRT_SECURE_NO_WARNINGS disables warnings about using MSVC-specific ++ # secure CRT functions. ++ CXXFLAGS="$CXXFLAGS -D_CRT_SECURE_NO_WARNINGS" ++ ++ ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ cat > conftest.$ac_ext < ++int main() { ++ printf("Hello World\n"); ++; return 0; } ++EOF ++if { (eval echo configure:2282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ : ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ { echo "configure: error: \$(CC) test failed. You must have MS VC++ in your path to build." 1>&2; echo "configure: error: \$(CC) test failed. You must have MS VC++ in your path to build." 1>&5; exit 1; } ++fi ++rm -f conftest* ++ ++ ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ cat > conftest.$ac_ext < ++int main() { ++ unsigned *test = new unsigned(42); ++; return 0; } ++EOF ++if { (eval echo configure:2311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ : ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ { echo "configure: error: \$(CXX) test failed. You must have MS VC++ in your path to build." 1>&2; echo "configure: error: \$(CXX) test failed. You must have MS VC++ in your path to build." 1>&5; exit 1; } ++fi ++rm -f conftest* ++ ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++ ++ _MSVC_VER_FILTER='s|.*[^!-~]([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*|\1|p' ++ ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' _CRT_SECURE_NO_WARNINGS ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _CRT_SECURE_NO_WARNINGS 1 ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' _CRT_NONSTDC_NO_WARNINGS ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _CRT_NONSTDC_NO_WARNINGS 1 ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' _USE_MATH_DEFINES ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _USE_MATH_DEFINES 1 ++EOF ++ # Otherwise MSVC's math.h doesn't #define M_PI. ++ ++ _CC_SUITE=14 ++ MSVC_C_RUNTIME_DLL=vcruntime140.dll ++ MSVC_CXX_RUNTIME_DLL=msvcp140.dll ++ ++ # -Zc:sizedDealloc- disables C++14 global sized deallocation (see bug 1160146) ++ CXXFLAGS="$CXXFLAGS -Zc:sizedDealloc-" ++ ++ ++ ++ ++ # Check linker version, except in lld builds ++ case "$LINKER" in ++ *lld*) ++ ;; ++ *) ++ _LD_FULL_VERSION=`"${LINKER}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"` ++ _LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'` ++ if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then ++ { echo "configure: error: The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE." 1>&2; echo "configure: error: The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE." 1>&5; exit 1; } ++ fi ++ ;; ++ esac ++ ++ INCREMENTAL_LINKER=1 ++ ++ unset _MSVC_VER_FILTER ++ ++ CFLAGS="$CFLAGS -D_HAS_EXCEPTIONS=0" ++ CXXFLAGS="$CXXFLAGS -D_HAS_EXCEPTIONS=0" ++ else ++ # Check w32api version ++ _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'` ++ _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'` ++ echo $ac_n "checking for w32api version >= $W32API_VERSION""... $ac_c" 1>&6 ++echo "configure:2392: checking for w32api version >= $W32API_VERSION" >&5 ++ cat > conftest.$ac_ext < ++int main() { ++#if (__W32API_MAJOR_VERSION < $_W32API_MAJOR_VERSION) || \ ++ (__W32API_MAJOR_VERSION == $_W32API_MAJOR_VERSION && \ ++ __W32API_MINOR_VERSION < $_W32API_MINOR_VERSION) ++ #error "test failed." ++ #endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:2406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ res=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ res=no ++fi ++rm -f conftest* ++ echo "$ac_t""$res" 1>&6 ++ if test "$res" != "yes"; then ++ { echo "configure: error: w32api version $W32API_VERSION or higher required." 1>&2; echo "configure: error: w32api version $W32API_VERSION or higher required." 1>&5; exit 1; } ++ fi ++ fi # !GNU_CC ++ ++ cat >> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <<\EOF ++ (''' HAVE_LOCALECONV ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_LOCALECONV 1 ++EOF ++ ++ for ac_func in _getc_nolock ++do ++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++echo "configure:2468: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef $ac_func ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:2500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++done ++ ++fi ++ ++fi # COMPILE_ENVIRONMENT ++ ++# Check to see if we are running in a broken QEMU scratchbox. ++# We know that anything below 1.0.16 is broken. ++for ac_prog in sb-conf ve ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:2538: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_SBCONF'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$SBCONF"; then ++ ac_cv_prog_SBCONF="$SBCONF" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_SBCONF="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++SBCONF="$ac_cv_prog_SBCONF" ++if test -n "$SBCONF"; then ++ echo "$ac_t""$SBCONF" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$SBCONF" && break ++done ++test -n "$SBCONF" || SBCONF="""" ++ ++if test -n "$SBCONF"; then ++ _sb_version=`$SBCONF ve` ++ _sb_version_major=`echo $_sb_version | cut -f1 -d.` ++ _sb_version_minor=`echo $_sb_version | cut -f2 -d.` ++ _sb_version_point=`echo $_sb_version | cut -f3 -d.` ++ if test $_sb_version_major -eq 1 -a $_sb_version_minor -eq 0 -a $_sb_version_point -le 16; then ++ QEMU_CANT_RUN_JS_SHELL=1 ++ fi ++fi ++ ++ ++ ++ ++ ++if test "$COMPILE_ENVIRONMENT"; then ++ ++ ++ ++# If we find X, set shell vars x_includes and x_libraries to the ++# paths, otherwise set no_x=yes. ++# Uses ac_ vars as temps to allow command line to override cache and checks. ++# --without-x overrides everything else, but does not touch the cache. ++echo $ac_n "checking for X""... $ac_c" 1>&6 ++echo "configure:2591: checking for X" >&5 ++ ++# Check whether --with-x or --without-x was given. ++if test "${with_x+set}" = set; then ++ withval="$with_x" ++ : ++fi ++ ++# $have_x is `yes', `no', `disabled', or empty when we do not yet know. ++if test "x$with_x" = xno; then ++ # The user explicitly disabled X. ++ have_x=disabled ++else ++ if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then ++ # Both variables are already set. ++ have_x=yes ++ else ++if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ # One or both of the vars are not set, and there is no cached value. ++ac_x_includes=NO ac_x_libraries=NO ++rm -fr conftestdir ++if mkdir conftestdir; then ++ cd conftestdir ++ # Make sure to not put "make" in the Imakefile rules, since we grep it out. ++ cat > Imakefile <<'EOF' ++acfindx: ++ @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' ++EOF ++ if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then ++ # GNU make sometimes prints "make[1]: Entering...", which would confuse us. ++ eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` ++ # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. ++ for ac_extension in a so sl; do ++ if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && ++ test -f $ac_im_libdir/libX11.$ac_extension; then ++ ac_im_usrlibdir=$ac_im_libdir; break ++ fi ++ done ++ # Screen out bogus values from the imake configuration. They are ++ # bogus both because they are the default anyway, and because ++ # using them would break gcc on systems where it needs fixed includes. ++ case "$ac_im_incroot" in ++ /usr/include) ;; ++ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; ++ esac ++ case "$ac_im_usrlibdir" in ++ /usr/lib | /lib) ;; ++ *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; ++ esac ++ fi ++ cd .. ++ rm -fr conftestdir ++fi ++ ++if test "$ac_x_includes" = NO; then ++ # Guess where to find include files, by looking for this one X11 .h file. ++ test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h ++ ++ # First, try using that file with no special directory specified. ++cat > conftest.$ac_ext < ++EOF ++ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ++{ (eval echo configure:2658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ++if test -z "$ac_err"; then ++ rm -rf conftest* ++ # We can compile using X headers with no special include directory. ++ac_x_includes= ++else ++ echo "$ac_err" >&5 ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ # Look for the header file in a standard set of common directories. ++# Check X11 before X11Rn because it is often a symlink to the current release. ++ for ac_dir in \ ++ /usr/X11/include \ ++ /usr/X11R6/include \ ++ /usr/X11R5/include \ ++ /usr/X11R4/include \ ++ \ ++ /usr/include/X11 \ ++ /usr/include/X11R6 \ ++ /usr/include/X11R5 \ ++ /usr/include/X11R4 \ ++ \ ++ /usr/local/X11/include \ ++ /usr/local/X11R6/include \ ++ /usr/local/X11R5/include \ ++ /usr/local/X11R4/include \ ++ \ ++ /usr/local/include/X11 \ ++ /usr/local/include/X11R6 \ ++ /usr/local/include/X11R5 \ ++ /usr/local/include/X11R4 \ ++ \ ++ /usr/X386/include \ ++ /usr/x386/include \ ++ /usr/XFree86/include/X11 \ ++ \ ++ /usr/include \ ++ /usr/local/include \ ++ /usr/unsupported/include \ ++ /usr/athena/include \ ++ /usr/local/x11r5/include \ ++ /usr/lpp/Xamples/include \ ++ \ ++ /usr/openwin/include \ ++ /usr/openwin/share/include \ ++ ; \ ++ do ++ if test -r "$ac_dir/$x_direct_test_include"; then ++ ac_x_includes=$ac_dir ++ break ++ fi ++ done ++fi ++rm -f conftest* ++fi # $ac_x_includes = NO ++ ++if test "$ac_x_libraries" = NO; then ++ # Check for the libraries. ++ ++ test -z "$x_direct_test_library" && x_direct_test_library=Xt ++ test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc ++ ++ # See if we find them without any special options. ++ # Don't add to $LIBS permanently. ++ ac_save_LIBS="$LIBS" ++ LIBS="-l$x_direct_test_library $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ LIBS="$ac_save_LIBS" ++# We can link X programs with no special library path. ++ac_x_libraries= ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ LIBS="$ac_save_LIBS" ++# First see if replacing the include by lib works. ++# Check X11 before X11Rn because it is often a symlink to the current release. ++for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ ++ /usr/X11/lib \ ++ /usr/X11R6/lib \ ++ /usr/X11R5/lib \ ++ /usr/X11R4/lib \ ++ \ ++ /usr/lib/X11 \ ++ /usr/lib/X11R6 \ ++ /usr/lib/X11R5 \ ++ /usr/lib/X11R4 \ ++ \ ++ /usr/local/X11/lib \ ++ /usr/local/X11R6/lib \ ++ /usr/local/X11R5/lib \ ++ /usr/local/X11R4/lib \ ++ \ ++ /usr/local/lib/X11 \ ++ /usr/local/lib/X11R6 \ ++ /usr/local/lib/X11R5 \ ++ /usr/local/lib/X11R4 \ ++ \ ++ /usr/X386/lib \ ++ /usr/x386/lib \ ++ /usr/XFree86/lib/X11 \ ++ \ ++ /usr/lib \ ++ /usr/local/lib \ ++ /usr/unsupported/lib \ ++ /usr/athena/lib \ ++ /usr/local/x11r5/lib \ ++ /usr/lpp/Xamples/lib \ ++ /lib/usr/lib/X11 \ ++ \ ++ /usr/openwin/lib \ ++ /usr/openwin/share/lib \ ++ ; \ ++do ++ for ac_extension in a so sl; do ++ if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then ++ ac_x_libraries=$ac_dir ++ break 2 ++ fi ++ done ++done ++fi ++rm -f conftest* ++fi # $ac_x_libraries = NO ++ ++if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then ++ # Didn't find X anywhere. Cache the known absence of X. ++ ac_cv_have_x="have_x=no" ++else ++ # Record where we found X for the cache. ++ ac_cv_have_x="have_x=yes \ ++ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" ++fi ++fi ++ fi ++ eval "$ac_cv_have_x" ++fi # $with_x != no ++ ++if test "$have_x" != yes; then ++ echo "$ac_t""$have_x" 1>&6 ++ no_x=yes ++else ++ # If each of the values was on the command line, it overrides each guess. ++ test "x$x_includes" = xNONE && x_includes=$ac_x_includes ++ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries ++ # Update the cache value to reflect the command line values. ++ ac_cv_have_x="have_x=yes \ ++ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" ++ echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 ++fi ++ ++if test "$no_x" = yes; then ++ # Not all programs may use this symbol, but it does not hurt to define it. ++ cat >> confdefs.pytmp <<\EOF ++ (''' X_DISPLAY_MISSING ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define X_DISPLAY_MISSING 1 ++EOF ++ ++ X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= ++else ++ if test -n "$x_includes"; then ++ X_CFLAGS="$X_CFLAGS -I$x_includes" ++ fi ++ ++ # It would also be nice to do this for all -L options, not just this one. ++ if test -n "$x_libraries"; then ++ X_LIBS="$X_LIBS -L$x_libraries" ++ # For Solaris; some versions of Sun CC require a space after -R and ++ # others require no space. Words are not sufficient . . . . ++ case "`(uname -sr) 2>/dev/null`" in ++ "SunOS 5"*) ++ echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 ++echo "configure:2843: checking whether -R must be followed by a space" >&5 ++ ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_R_nospace=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_R_nospace=no ++fi ++rm -f conftest* ++ if test $ac_R_nospace = yes; then ++ echo "$ac_t""no" 1>&6 ++ X_LIBS="$X_LIBS -R$x_libraries" ++ else ++ LIBS="$ac_xsave_LIBS -R $x_libraries" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_R_space=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_R_space=no ++fi ++rm -f conftest* ++ if test $ac_R_space = yes; then ++ echo "$ac_t""yes" 1>&6 ++ X_LIBS="$X_LIBS -R $x_libraries" ++ else ++ echo "$ac_t""neither works" 1>&6 ++ fi ++ fi ++ LIBS="$ac_xsave_LIBS" ++ esac ++ fi ++ ++ # Check for system-dependent libraries X programs must link with. ++ # Do this before checking for the system-independent R6 libraries ++ # (-lICE), since we may need -lsocket or whatever for X linking. ++ ++ if test "$ISC" = yes; then ++ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" ++ else ++ # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X ++ # libraries were built with DECnet support. And karl@cs.umb.edu says ++ # the Alpha needs dnet_stub (dnet does not exist). ++ echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 ++echo "configure:2908: checking for dnet_ntoa in -ldnet" >&5 ++ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-ldnet $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test $ac_cv_lib_dnet_dnet_ntoa = no; then ++ echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 ++echo "configure:2949: checking for dnet_ntoa in -ldnet_stub" >&5 ++ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-ldnet_stub $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ fi ++ ++ # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, ++ # to get the SysV transport functions. ++ # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) ++ # needs -lnsl. ++ # The nsl library prevents programs from opening the X display ++ # on Irix 5.2, according to dickey@clark.net. ++ echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 ++echo "configure:2997: checking for gethostbyname" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef gethostbyname ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char gethostbyname(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) ++choke me ++#else ++gethostbyname(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:3029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_gethostbyname=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_gethostbyname=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ : ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test $ac_cv_func_gethostbyname = no; then ++ echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 ++echo "configure:3050: checking for gethostbyname in -lnsl" >&5 ++ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lnsl $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ fi ++ ++ # lieder@skyler.mavd.honeywell.com says without -lsocket, ++ # socket/setsockopt and other routines are undefined under SCO ODT ++ # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary ++ # on later versions), says simon@lia.di.epfl.ch: it contains ++ # gethostby* variants that don't use the nameserver (or something). ++ # -lsocket must be given before -lnsl if both are needed. ++ # We assume that if connect needs -lnsl, so does gethostbyname. ++ echo $ac_n "checking for connect""... $ac_c" 1>&6 ++echo "configure:3099: checking for connect" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef connect ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char connect(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_connect) || defined (__stub___connect) ++choke me ++#else ++connect(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:3131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_connect=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_connect=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ : ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test $ac_cv_func_connect = no; then ++ echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 ++echo "configure:3152: checking for connect in -lsocket" >&5 ++ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lsocket $X_EXTRA_LIBS $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ fi ++ ++ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. ++ echo $ac_n "checking for remove""... $ac_c" 1>&6 ++echo "configure:3195: checking for remove" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef remove ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char remove(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_remove) || defined (__stub___remove) ++choke me ++#else ++remove(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:3227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_remove=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_remove=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ : ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test $ac_cv_func_remove = no; then ++ echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 ++echo "configure:3248: checking for remove in -lposix" >&5 ++ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lposix $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ fi ++ ++ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ++ echo $ac_n "checking for shmat""... $ac_c" 1>&6 ++echo "configure:3291: checking for shmat" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef shmat ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char shmat(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_shmat) || defined (__stub___shmat) ++choke me ++#else ++shmat(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:3323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_shmat=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_shmat=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ : ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test $ac_cv_func_shmat = no; then ++ echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 ++echo "configure:3344: checking for shmat in -lipc" >&5 ++ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lipc $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ fi ++ fi ++ ++ # Check for libraries that X11R6 Xt/Xaw programs need. ++ ac_save_LDFLAGS="$LDFLAGS" ++ test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" ++ # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to ++ # check for ICE first), but we must link in the order -lSM -lICE or ++ # we get undefined symbols. So assume we have SM if we have ICE. ++ # These have to be linked with before -lX11, unlike the other ++ # libraries we check for below, so use a different variable. ++ # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. ++ echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 ++echo "configure:3396: checking for IceConnectionNumber in -lICE" >&5 ++ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lICE $X_EXTRA_LIBS $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ LDFLAGS="$ac_save_LDFLAGS" ++ ++fi ++ ++ ++XCFLAGS="$X_CFLAGS" ++ ++fi # COMPILE_ENVIRONMENT ++ ++# Separate version into components for use in shared object naming etc ++ ++MOZJS_MAJOR_VERSION=`echo $MOZILLA_VERSION | sed "s|\(^[0-9]*\)\.[0-9]*.*|\1|"` ++MOZJS_MINOR_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.\([0-9]*\).*|\1|"` ++MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"` ++IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'` ++ ++JS_SHELL_NAME=js ++JS_CONFIG_NAME=js-config ++ ++ ++if test -n "$IS_ALPHA"; then ++ ++ MOZJS_ALPHA=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9\.]*\([^0-9]\).*|\1|"` ++ ++fi ++cat >> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <&2; echo "configure: error: Couldn't find path to llvm-libc++ in the android ndk" 1>&5; exit 1; } ++ fi ++ ++ STLPORT_LIBS="-L$cxx_libs -lc++_static" ++ # NDK r12 split the libc++ runtime libraries into pieces. ++ for lib in c++abi unwind android_support; do ++ if test -e "$cxx_libs/lib${lib}.a"; then ++ STLPORT_LIBS="$STLPORT_LIBS -l${lib}" ++ fi ++ done ++ fi ++fi ++ ++ ++ ++ ++WARNINGS_CFLAGS="$_WARNINGS_CFLAGS" ++if test -n "${CLANG_CC}${CLANG_CL}"; then ++ WARNINGS_CFLAGS="-Qunused-arguments $WARNINGS_CFLAGS" ++ CPPFLAGS="-Qunused-arguments ${CPPFLAGS}" ++fi ++if test -n "${CLANG_CXX}${CLANG_CL}"; then ++ _WARNINGS_CXXFLAGS="-Qunused-arguments ${_WARNINGS_CXXFLAGS}" ++fi ++ ++ ++ ++if test -n "$MOZ_ASAN"; then ++ if test -n "$CLANG_CL"; then ++ # Look for the ASan runtime binary ++ if test "$CPU_ARCH" = "x86_64"; then ++ MOZ_CLANG_RT_ASAN_LIB=clang_rt.asan_dynamic-x86_64.dll ++ else ++ MOZ_CLANG_RT_ASAN_LIB=clang_rt.asan_dynamic-i386.dll ++ fi ++ # We use MOZ_PATH_PROG in order to get a Windows style path. ++ # Extract the first word of "$MOZ_CLANG_RT_ASAN_LIB", so it can be a program name with args. ++set dummy $MOZ_CLANG_RT_ASAN_LIB; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:3571: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$MOZ_CLANG_RT_ASAN_LIB_PATH" in ++ /*) ++ ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH="$MOZ_CLANG_RT_ASAN_LIB_PATH" # Let the user override the test with a path. ++ ;; ++ ?:/*) ++ ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH="$MOZ_CLANG_RT_ASAN_LIB_PATH" # Let the user override the test with a dos path. ++ ;; ++ *) ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH="$ac_dir/$ac_word" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac ++fi ++MOZ_CLANG_RT_ASAN_LIB_PATH="$ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH" ++if test -n "$MOZ_CLANG_RT_ASAN_LIB_PATH"; then ++ echo "$ac_t""$MOZ_CLANG_RT_ASAN_LIB_PATH" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test "$msyshost"; then ++ case "$MOZ_CLANG_RT_ASAN_LIB_PATH" in ++ /*) ++ tmp_DIRNAME=`dirname "$MOZ_CLANG_RT_ASAN_LIB_PATH"` ++ tmp_BASENAME=`basename "$MOZ_CLANG_RT_ASAN_LIB_PATH"` ++ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` ++ MOZ_CLANG_RT_ASAN_LIB_PATH="$tmp_PWD/$tmp_BASENAME" ++ if test -e "$MOZ_CLANG_RT_ASAN_LIB_PATH.exe"; then ++ MOZ_CLANG_RT_ASAN_LIB_PATH="$MOZ_CLANG_RT_ASAN_LIB_PATH.exe" ++ fi ++ esac ++ fi ++ ++ if test -z "$MOZ_CLANG_RT_ASAN_LIB_PATH"; then ++ { echo "configure: error: Couldn't find $MOZ_CLANG_RT_ASAN_LIB. It should be available in the same location as clang-cl." 1>&2; echo "configure: error: Couldn't find $MOZ_CLANG_RT_ASAN_LIB. It should be available in the same location as clang-cl." 1>&5; exit 1; } ++ fi ++ ++ # Suppressing errors in recompiled code. ++ if test "$OS_ARCH" = "WINNT"; then ++ CFLAGS="-fsanitize-blacklist=$_topsrcdir/build/sanitizers/asan_blacklist_win.txt $CFLAGS" ++ CXXFLAGS="-fsanitize-blacklist=$_topsrcdir/build/sanitizers/asan_blacklist_win.txt $CXXFLAGS" ++ fi ++ fi ++ CFLAGS="-fsanitize=address $CFLAGS" ++ CXXFLAGS="-fsanitize=address $CXXFLAGS" ++ if test -z "$CLANG_CL"; then ++ LDFLAGS="-fsanitize=address -rdynamic $LDFLAGS" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_ASAN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_ASAN 1 ++EOF ++ ++ # Extract the first word of "llvm-symbolizer", so it can be a program name with args. ++set dummy llvm-symbolizer; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:3641: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. ++ ;; ++ ?:/*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a dos path. ++ ;; ++ *) ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_path_LLVM_SYMBOLIZER="$ac_dir/$ac_word" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac ++fi ++LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" ++if test -n "$LLVM_SYMBOLIZER"; then ++ echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test "$msyshost"; then ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` ++ tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` ++ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` ++ LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" ++ if test -e "$LLVM_SYMBOLIZER.exe"; then ++ LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" ++ fi ++ esac ++ fi ++ ++fi ++ ++ ++# Check whether --enable-memory-sanitizer or --disable-memory-sanitizer was given. ++if test "${enable_memory_sanitizer+set}" = set; then ++ enableval="$enable_memory_sanitizer" ++ if test "$enableval" = "yes"; then ++ MOZ_MSAN=1 ++ elif test "$enableval" = "no"; then ++ MOZ_MSAN= ++ else ++ { echo "configure: error: Option, memory-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, memory-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++if test -n "$MOZ_MSAN"; then ++ CFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $CFLAGS" ++ CXXFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $CXXFLAGS" ++ if test -z "$CLANG_CL"; then ++ LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins -rdynamic $LDFLAGS" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_MSAN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_MSAN 1 ++EOF ++ ++ # Extract the first word of "llvm-symbolizer", so it can be a program name with args. ++set dummy llvm-symbolizer; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:3717: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. ++ ;; ++ ?:/*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a dos path. ++ ;; ++ *) ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_path_LLVM_SYMBOLIZER="$ac_dir/$ac_word" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac ++fi ++LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" ++if test -n "$LLVM_SYMBOLIZER"; then ++ echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test "$msyshost"; then ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` ++ tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` ++ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` ++ LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" ++ if test -e "$LLVM_SYMBOLIZER.exe"; then ++ LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" ++ fi ++ esac ++ fi ++ ++fi ++ ++ ++# Check whether --enable-thread-sanitizer or --disable-thread-sanitizer was given. ++if test "${enable_thread_sanitizer+set}" = set; then ++ enableval="$enable_thread_sanitizer" ++ if test "$enableval" = "yes"; then ++ MOZ_TSAN=1 ++ elif test "$enableval" = "no"; then ++ MOZ_TSAN= ++ else ++ { echo "configure: error: Option, thread-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, thread-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++if test -n "$MOZ_TSAN"; then ++ CFLAGS="-fsanitize=thread $CFLAGS" ++ CXXFLAGS="-fsanitize=thread $CXXFLAGS" ++ if test -z "$CLANG_CL"; then ++ LDFLAGS="-fsanitize=thread -rdynamic $LDFLAGS" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_TSAN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_TSAN 1 ++EOF ++ ++ # Extract the first word of "llvm-symbolizer", so it can be a program name with args. ++set dummy llvm-symbolizer; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:3793: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. ++ ;; ++ ?:/*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a dos path. ++ ;; ++ *) ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_path_LLVM_SYMBOLIZER="$ac_dir/$ac_word" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac ++fi ++LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" ++if test -n "$LLVM_SYMBOLIZER"; then ++ echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test "$msyshost"; then ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` ++ tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` ++ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` ++ LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" ++ if test -e "$LLVM_SYMBOLIZER.exe"; then ++ LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" ++ fi ++ esac ++ fi ++ ++fi ++ ++ ++if test -n "$MOZ_UBSAN_CHECKS"; then ++ MOZ_UBSAN=1 ++ UBSAN_TXT="$_objdir/ubsan_blacklist.txt" ++ cat $_topsrcdir/build/sanitizers/ubsan_*_blacklist.txt > $UBSAN_TXT ++ UBSAN_FLAGS="-fsanitize=$MOZ_UBSAN_CHECKS -fno-sanitize-recover=$MOZ_UBSAN_CHECKS -fsanitize-blacklist=$UBSAN_TXT" ++ CFLAGS="$UBSAN_FLAGS $CFLAGS" ++ CXXFLAGS="$UBSAN_FLAGS $CXXFLAGS" ++ if test -z "$CLANG_CL"; then ++ LDFLAGS="-fsanitize=undefined -rdynamic $LDFLAGS" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_UBSAN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_UBSAN 1 ++EOF ++ ++ # Extract the first word of "llvm-symbolizer", so it can be a program name with args. ++set dummy llvm-symbolizer; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:3861: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. ++ ;; ++ ?:/*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a dos path. ++ ;; ++ *) ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_path_LLVM_SYMBOLIZER="$ac_dir/$ac_word" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac ++fi ++LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" ++if test -n "$LLVM_SYMBOLIZER"; then ++ echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test "$msyshost"; then ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` ++ tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` ++ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` ++ LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" ++ if test -e "$LLVM_SYMBOLIZER.exe"; then ++ LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" ++ fi ++ esac ++ fi ++ ++fi ++ ++ ++ ++# Check whether --enable-signed-overflow-sanitizer or --disable-signed-overflow-sanitizer was given. ++if test "${enable_signed_overflow_sanitizer+set}" = set; then ++ enableval="$enable_signed_overflow_sanitizer" ++ if test "$enableval" = "yes"; then ++ MOZ_SIGNED_OVERFLOW_SANITIZE=1 ++ elif test "$enableval" = "no"; then ++ MOZ_SIGNED_OVERFLOW_SANITIZE= ++ else ++ { echo "configure: error: Option, signed-overflow-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, signed-overflow-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++# Check whether --enable-unsigned-overflow-sanitizer or --disable-unsigned-overflow-sanitizer was given. ++if test "${enable_unsigned_overflow_sanitizer+set}" = set; then ++ enableval="$enable_unsigned_overflow_sanitizer" ++ if test "$enableval" = "yes"; then ++ MOZ_UNSIGNED_OVERFLOW_SANITIZE=1 ++ elif test "$enableval" = "no"; then ++ MOZ_UNSIGNED_OVERFLOW_SANITIZE= ++ else ++ { echo "configure: error: Option, unsigned-overflow-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, unsigned-overflow-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++if test -n "$MOZ_SIGNED_OVERFLOW_SANITIZE$MOZ_UNSIGNED_OVERFLOW_SANITIZE"; then ++ MOZ_UBSAN=1 ++ SANITIZER_BLACKLISTS="" ++ if test -n "$MOZ_SIGNED_OVERFLOW_SANITIZE"; then ++ SANITIZER_BLACKLISTS="-fsanitize-blacklist=$_topsrcdir/build/sanitizers/ubsan_signed_overflow_blacklist.txt $SANITIZER_BLACKLISTS" ++ CFLAGS="-fsanitize=signed-integer-overflow $CFLAGS" ++ CXXFLAGS="-fsanitize=signed-integer-overflow $CXXFLAGS" ++ if test -z "$CLANG_CL"; then ++ LDFLAGS="-fsanitize=signed-integer-overflow -rdynamic $LDFLAGS" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_SIGNED_OVERFLOW_SANITIZE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_SIGNED_OVERFLOW_SANITIZE 1 ++EOF ++ ++ fi ++ if test -n "$MOZ_UNSIGNED_OVERFLOW_SANITIZE"; then ++ SANITIZER_BLACKLISTS="-fsanitize-blacklist=$_topsrcdir/build/sanitizers/ubsan_unsigned_overflow_blacklist.txt $SANITIZER_BLACKLISTS" ++ CFLAGS="-fsanitize=unsigned-integer-overflow $CFLAGS" ++ CXXFLAGS="-fsanitize=unsigned-integer-overflow $CXXFLAGS" ++ if test -z "$CLANG_CL"; then ++ LDFLAGS="-fsanitize=unsigned-integer-overflow -rdynamic $LDFLAGS" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_UNSIGNED_OVERFLOW_SANITIZE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_UNSIGNED_OVERFLOW_SANITIZE 1 ++EOF ++ ++ fi ++ CFLAGS="$SANITIZER_BLACKLISTS $CFLAGS" ++ CXXFLAGS="$SANITIZER_BLACKLISTS $CXXFLAGS" ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_UBSAN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_UBSAN 1 ++EOF ++ ++ # Extract the first word of "llvm-symbolizer", so it can be a program name with args. ++set dummy llvm-symbolizer; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:3980: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. ++ ;; ++ ?:/*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a dos path. ++ ;; ++ *) ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_path_LLVM_SYMBOLIZER="$ac_dir/$ac_word" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac ++fi ++LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" ++if test -n "$LLVM_SYMBOLIZER"; then ++ echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test "$msyshost"; then ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` ++ tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` ++ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` ++ LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" ++ if test -e "$LLVM_SYMBOLIZER.exe"; then ++ LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" ++ fi ++ esac ++ fi ++ ++fi ++ ++ ++ ++ ++if test -n "$LIBFUZZER"; then ++ LDFLAGS="$LIBFUZZER_FLAGS -rdynamic $LDFLAGS" ++fi ++ ++# The LLVM symbolizer is used by all sanitizers ++ ++ ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ : ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ { echo "configure: error: compiler is incompatible with sanitize options" 1>&2; echo "configure: error: compiler is incompatible with sanitize options" 1>&5; exit 1; } ++fi ++rm -f conftest* ++ ++ ++ ++if test "$GNU_CC"; then ++ DSO_LDOPTS='-shared' ++ if test "$GCC_USE_GNU_LD"; then ++ # Some tools like ASan use a runtime library that is only ++ # linked against executables, so we must allow undefined ++ # symbols for shared objects in some cases. ++ if test -z "$MOZ_ASAN$MOZ_MSAN$MOZ_UBSAN$MOZ_TSAN$FUZZING_INTERFACES"; then ++ # Don't allow undefined symbols in libraries ++ DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs" ++ fi ++ fi ++ WARNINGS_AS_ERRORS='-Werror' ++ DSO_CFLAGS='' ++ ++ if test "$OS_ARCH" != "WINNT"; then ++ DSO_PIC_CFLAGS='-fPIC' ++ ASFLAGS="$ASFLAGS -fPIC" ++ fi ++ ++ echo $ac_n "checking for --noexecstack option to as""... $ac_c" 1>&6 ++echo "configure:4077: checking for --noexecstack option to as" >&5 ++ _SAVE_CFLAGS=$CFLAGS ++ CFLAGS="$CFLAGS -Wa,--noexecstack" ++ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6 ++ ASFLAGS="$ASFLAGS -Wa,--noexecstack" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++fi ++rm -f conftest* ++ CFLAGS=$_SAVE_CFLAGS ++ echo $ac_n "checking for -z noexecstack option to ld""... $ac_c" 1>&6 ++echo "configure:4101: checking for -z noexecstack option to ld" >&5 ++ _SAVE_LDFLAGS=$LDFLAGS ++ LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++ LDFLAGS=$_SAVE_LDFLAGS ++fi ++rm -f conftest* ++ ++ echo $ac_n "checking for -z text option to ld""... $ac_c" 1>&6 ++echo "configure:4125: checking for -z text option to ld" >&5 ++ _SAVE_LDFLAGS=$LDFLAGS ++ LDFLAGS="$LDFLAGS -Wl,-z,text" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++ LDFLAGS=$_SAVE_LDFLAGS ++fi ++rm -f conftest* ++ ++ echo $ac_n "checking for -z relro option to ld""... $ac_c" 1>&6 ++echo "configure:4149: checking for -z relro option to ld" >&5 ++ _SAVE_LDFLAGS=$LDFLAGS ++ LDFLAGS="$LDFLAGS -Wl,-z,relro" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++ LDFLAGS=$_SAVE_LDFLAGS ++fi ++rm -f conftest* ++ ++ echo $ac_n "checking for -z nocopyreloc option to ld""... $ac_c" 1>&6 ++echo "configure:4173: checking for -z nocopyreloc option to ld" >&5 ++ _SAVE_LDFLAGS=$LDFLAGS ++ LDFLAGS="$LDFLAGS -Wl,-z,nocopyreloc" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++ LDFLAGS=$_SAVE_LDFLAGS ++fi ++rm -f conftest* ++ ++ echo $ac_n "checking for -Bsymbolic-functions option to ld""... $ac_c" 1>&6 ++echo "configure:4197: checking for -Bsymbolic-functions option to ld" >&5 ++ _SAVE_LDFLAGS=$LDFLAGS ++ LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++ LDFLAGS=$_SAVE_LDFLAGS ++fi ++rm -f conftest* ++ ++ echo $ac_n "checking for --build-id=sha1 option to ld""... $ac_c" 1>&6 ++echo "configure:4221: checking for --build-id=sha1 option to ld" >&5 ++ _SAVE_LDFLAGS=$LDFLAGS ++ LDFLAGS="$LDFLAGS -Wl,--build-id=sha1" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++ LDFLAGS=$_SAVE_LDFLAGS ++fi ++rm -f conftest* ++ ++ _DEFINES_CFLAGS="-include $jsconfdefs -DMOZILLA_CLIENT" ++ _USE_CPP_INCLUDE_FLAG=1 ++fi ++ ++if test "$GNU_CXX"; then ++ _DEFINES_CXXFLAGS="-DMOZILLA_CLIENT -include $jsconfdefs" ++ _USE_CPP_INCLUDE_FLAG=1 ++fi ++ ++case "$host" in ++*mingw*) ++ if test -n "$_WIN32_MSVC"; then ++ HOST_CFLAGS="$HOST_CFLAGS -nologo" ++ else ++ HOST_CFLAGS="$HOST_CFLAGS -mwindows" ++ fi ++ HOST_CFLAGS="$HOST_CFLAGS -DXP_WIN -DWIN32 -D_WIN32 -D_CRT_SECURE_NO_WARNINGS" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}" ++ HOST_BIN_SUFFIX=.exe ++ ++ case "${host_cpu}" in ++ i*86) ++ if test -n "$_WIN32_MSVC"; then ++ HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X86" ++ fi ++ ;; ++ x86_64) ++ if test -n "$_WIN32_MSVC"; then ++ HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X64" ++ fi ++ HOST_CFLAGS="$HOST_CFLAGS -D_AMD64_" ++ ;; ++ esac ++ ;; ++ ++*-darwin*) ++ HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ++ ;; ++ ++*-linux*|*-kfreebsd*-gnu|*-gnu*) ++ HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ++ ;; ++ ++*) ++ HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}" ++ ;; ++esac ++ ++ ++CFLAGS="$CFLAGS $MOZ_HARDENING_CFLAGS_JS" ++CPPFLAGS="$CPPFLAGS $MOZ_HARDENING_CFLAGS_JS" ++CXXFLAGS="$CXXFLAGS $MOZ_HARDENING_CFLAGS_JS" ++LDFLAGS="$LDFLAGS $MOZ_HARDENING_LDFLAGS_JS" ++ ++ ++case "$target" in ++*-darwin*) ++ MOZ_OPTIMIZE_FLAGS="-O3" ++ CFLAGS="$CFLAGS -fno-common" ++ CXXFLAGS="$CXXFLAGS -fno-common -stdlib=libc++" ++ DSO_LDOPTS='' ++ STRIP="$STRIP -x -S" ++ LDFLAGS="$LDFLAGS -lobjc" ++ # The ExceptionHandling framework is needed for Objective-C exception ++ # logging code in nsObjCExceptions.h. Currently we only use that in debug ++ # builds. ++ _SAVE_LDFLAGS=$LDFLAGS ++ echo $ac_n "checking for -framework ExceptionHandling""... $ac_c" 1>&6 ++echo "configure:4315: checking for -framework ExceptionHandling" >&5 ++ LDFLAGS="$LDFLAGS -framework ExceptionHandling" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_cv_have_framework_exceptionhandling="yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_have_framework_exceptionhandling="no" ++fi ++rm -f conftest* ++ echo "$ac_t""$ac_cv_have_framework_exceptionhandling" 1>&6 ++ if test "$ac_cv_have_framework_exceptionhandling" = "yes"; then ++ MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling"; ++ fi ++ LDFLAGS=$_SAVE_LDFLAGS ++ ++ if test "x$enable_dtrace" = "xyes"; then ++ echo "Skipping -dead_strip because DTrace is enabled. See bug 403132." ++ else ++ echo $ac_n "checking for -dead_strip option to ld""... $ac_c" 1>&6 ++echo "configure:4345: checking for -dead_strip option to ld" >&5 ++ _SAVE_LDFLAGS=$LDFLAGS ++ LDFLAGS="$LDFLAGS -Wl,-dead_strip" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ _HAVE_DEAD_STRIP=1 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ _HAVE_DEAD_STRIP= ++fi ++rm -f conftest* ++ if test -n "$_HAVE_DEAD_STRIP" ; then ++ echo "$ac_t""yes" 1>&6 ++ MOZ_OPTIMIZE_LDFLAGS="-Wl,-dead_strip" ++ else ++ echo "$ac_t""no" 1>&6 ++ fi ++ ++ LDFLAGS=$_SAVE_LDFLAGS ++ fi ++ MOZ_FIX_LINK_PATHS="-Wl,-executable_path,${DIST}/bin" ++ ;; ++ ++*-android*|*-linuxandroid*) ++ cat >> confdefs.pytmp <<\EOF ++ (''' NO_PW_GECOS ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define NO_PW_GECOS 1 ++EOF ++ ++ MOZ_GFX_OPTIMIZE_MOBILE=1 ++ MOZ_OPTIMIZE_FLAGS="-O3" ++ if test -z "$CLANG_CC"; then ++ MOZ_OPTIMIZE_FLAGS="-freorder-blocks -fno-reorder-functions $MOZ_OPTIMIZE_FLAGS" ++ fi ++ ;; ++ ++*-*linux*) ++ if test "$GNU_CC" -o "$GNU_CXX"; then ++ MOZ_PGO_OPTIMIZE_FLAGS="-O3" ++ MOZ_OPTIMIZE_FLAGS="-O3" ++ if test -z "$CLANG_CC"; then ++ MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS" ++ fi ++ fi ++ ++ case "${target_cpu}" in ++ alpha*) ++ CFLAGS="$CFLAGS -mieee" ++ CXXFLAGS="$CXXFLAGS -mieee" ++ ;; ++ esac ++ ;; ++ ++*-mingw*) ++ DSO_CFLAGS= ++ DSO_PIC_CFLAGS= ++ if test -n "$GNU_CC" -o -n "$CLANG_CC"; then ++ CC="$CC -mwindows" ++ CXX="$CXX -mwindows" ++ CPP="$CPP -mwindows" ++ CFLAGS="$CFLAGS -mms-bitfields" ++ CXXFLAGS="$CXXFLAGS -mms-bitfields" ++ DSO_LDOPTS='-shared' ++ # Use temp file for windres (bug 213281) ++ RCFLAGS='-O coff --use-temp-file' ++ # mingw doesn't require kernel32, user32, and advapi32 explicitly ++ LIBS="$LIBS -lusp10 -lgdi32 -lwinmm -lwsock32" ++ MOZ_FIX_LINK_PATHS= ++ ++ if test -z "$CLANG_CC"; then ++ # Use static libgcc and libstdc++ ++ LDFLAGS="$LDFLAGS -static" ++ else ++ # Silence problematic clang warnings ++ CXXFLAGS="$CXXFLAGS -Wno-incompatible-ms-struct" ++ fi ++ ++ MOZ_OPTIMIZE_FLAGS="-O2" ++ ++ WIN32_CONSOLE_EXE_LDFLAGS=-mconsole ++ WIN32_GUI_EXE_LDFLAGS=-mwindows ++ else ++ TARGET_COMPILER_ABI=msvc ++ HOST_CC='$(CC)' ++ HOST_CXX='$(CXX)' ++ RANLIB='echo not_ranlib' ++ STRIP='echo not_strip' ++ PKG_SKIP_STRIP=1 ++ # aarch64 doesn't support subsystems below 6.02 ++ if test "$CPU_ARCH" = "aarch64"; then ++ WIN32_SUBSYSTEM_VERSION=6.02 ++ else ++ WIN32_SUBSYSTEM_VERSION=6.01 ++ fi ++ WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION ++ WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION ++ DSO_LDOPTS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION ++ _USE_CPP_INCLUDE_FLAG=1 ++ _DEFINES_CFLAGS="-FI $jsconfdefs -DMOZILLA_CLIENT" ++ _DEFINES_CXXFLAGS="-FI $jsconfdefs -DMOZILLA_CLIENT" ++ CFLAGS="$CFLAGS -W3 -Gy -Zc:inline" ++ CXXFLAGS="$CXXFLAGS -W3 -Gy -Zc:inline" ++ if test "$CPU_ARCH" = "x86";then ++ ++ if test -z `echo $CFLAGS | grep -i [-/]arch:` ; then ++ CFLAGS="$CFLAGS -arch:SSE2" ++ fi ++ if test -z `echo $CXXFLAGS | grep -i [-/]arch:` ; then ++ CXXFLAGS="$CXXFLAGS -arch:SSE2" ++ fi ++ ++ fi ++ if test -z "$MOZ_ASAN"; then ++ CFLAGS="$CFLAGS -Gw" ++ CXXFLAGS="$CXXFLAGS -Gw" ++ else ++ # String tail merging doesn't play nice with ASan's ODR checker. ++ LDFLAGS="$LDFLAGS -opt:nolldtailmerge" ++ fi ++ if test -n "$CLANG_CL"; then ++ # XXX We should combine some of these with our generic GCC-style ++ # warning checks. ++ # ++ # Suppress the clang-cl warning for the inline 'new' and 'delete' in mozalloc ++ CXXFLAGS="$CXXFLAGS -Wno-inline-new-delete" ++ # We use offsetof on non-POD objects all the time. ++ # We also suppress this warning on other platforms. ++ CXXFLAGS="$CXXFLAGS -Wno-invalid-offsetof" ++ # This warns for reasonable things like: ++ # enum { X = 0xffffffffU }; ++ # which is annoying for IDL headers. ++ CXXFLAGS="$CXXFLAGS -Wno-microsoft-enum-value" ++ # This warns for cases that would be reached by the Microsoft ++ # #include rules, but also currently warns on cases that would ++ # *also* be reached by standard C++ include rules. That ++ # behavior doesn't seem useful, so we turn it off. ++ CXXFLAGS="$CXXFLAGS -Wno-microsoft-include" ++ # We normally error out on unknown pragmas, but since clang-cl ++ # claims to be MSVC, it would be difficult to add ++ # #if defined(_MSC_VER) && !defined(__clang__) everywhere we ++ # use such pragmas, so just ignore them. ++ CFLAGS="$CFLAGS -Wno-unknown-pragmas" ++ CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas" ++ # We get errors about various #pragma intrinsic directives from ++ # clang-cl, and we don't need to hear about those. ++ CFLAGS="$CFLAGS -Wno-ignored-pragmas" ++ CXXFLAGS="$CXXFLAGS -Wno-ignored-pragmas" ++ # clang-cl's Intrin.h marks things like _ReadWriteBarrier ++ # as __attribute((__deprecated__)). This is nice to know, ++ # but since we don't get the equivalent warning from MSVC, ++ # let's just ignore it. ++ CFLAGS="$CFLAGS -Wno-deprecated-declarations" ++ CXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations" ++ # We use a function like: ++ # __declspec(noreturn) __inline void f() {} ++ # which -Winvalid-noreturn complains about. Again, MSVC seems ++ # OK with it, so let's silence the warning. ++ CFLAGS="$CFLAGS -Wno-invalid-noreturn" ++ CXXFLAGS="$CXXFLAGS -Wno-invalid-noreturn" ++ # Missing |override| on virtual function declarations isn't ++ # something that MSVC currently warns about. ++ CXXFLAGS="$CXXFLAGS -Wno-inconsistent-missing-override" ++ # We use -DHAS_EXCEPTIONS=0, which removes the |throw()| ++ # declaration on |operator delete(void*)|. However, clang-cl ++ # must internally declare |operator delete(void*)| differently, ++ # which causes this warning for virtually every file in the ++ # tree. clang-cl doesn't support -fno-exceptions or equivalent, ++ # so there doesn't seem to be any way to convince clang-cl to ++ # declare |delete| differently. Therefore, suppress this ++ # warning. ++ CXXFLAGS="$CXXFLAGS -Wno-implicit-exception-spec-mismatch" ++ # At least one MSVC header and several headers in-tree have ++ # unused typedefs, so turn this on. ++ CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedef" ++ # jemalloc uses __declspec(allocator) as a profiler hint, ++ # which clang-cl doesn't understand. ++ CXXFLAGS="$CXXFLAGS -Wno-ignored-attributes" ++ # __attribute__((unused)) really means "might be unused" and ++ # we use it to avoid warnings about things that are unused ++ # in some compilation units, but used in many others. This ++ # warning insists on complaining about the latter case, which ++ # is annoying, and rather noisy. ++ CXXFLAGS="$CXXFLAGS -Wno-used-but-marked-unused" ++ fi ++ LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib" ++ MOZ_DEBUG_LDFLAGS='-DEBUG' ++ WARNINGS_AS_ERRORS='-WX' ++ MOZ_OPTIMIZE_FLAGS="-O2" ++ MOZ_FIX_LINK_PATHS= ++ LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE" ++ if test -z "$DEVELOPER_OPTIONS"; then ++ LDFLAGS="$LDFLAGS -RELEASE" ++ fi ++ RCFLAGS="-nologo" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE__MSIZE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE__MSIZE 1 ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' WIN32_LEAN_AND_MEAN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define WIN32_LEAN_AND_MEAN 1 ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' NOMINMAX ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define NOMINMAX 1 ++EOF ++ ++ BIN_SUFFIX='.exe' ++ MOZ_USER_DIR="Mozilla" ++ ++ case "$host_os" in ++ cygwin*|msvc*|mks*) ++ { echo "configure: error: Using a Cygwin build environment is unsupported. Configure cannot check for presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&2; echo "configure: error: Using a Cygwin build environment is unsupported. Configure cannot check for presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&5; exit 1; } ++ ;; ++ esac ++ ++ if test -n "$GNU_CC" -a -z "$CLANG_CC"; then ++ CFLAGS="$CFLAGS -fno-keep-inline-dllexport" ++ CXXFLAGS="$CXXFLAGS -fno-keep-inline-dllexport" ++ fi ++ ++ case "$target" in ++ i*86-*) ++ if test -n "$GNU_CC"; then ++ CFLAGS="$CFLAGS -mstackrealign" ++ CXXFLAGS="$CXXFLAGS -mstackrealign" ++ LDFLAGS="$LDFLAGS -Wl,--large-address-aware" ++ else ++ DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X86" ++ LDFLAGS="$LDFLAGS -SAFESEH" ++ fi ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' _X86_ ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _X86_ 1 ++EOF ++ ++ ;; ++ x86_64-*) ++ if test -n "$_WIN32_MSVC"; then ++ DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X64" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' _AMD64_ ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _AMD64_ 1 ++EOF ++ ++ ;; ++ aarch64-*) ++ if test -n "$_WIN32_MSVC"; then ++ DSO_LDOPTS="$DSO_LDOPTS -MACHINE:ARM64" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' _ARM64_ ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _ARM64_ 1 ++EOF ++ ++ ;; ++ *) ++ cat >> confdefs.pytmp <<\EOF ++ (''' _CPU_ARCH_NOT_DEFINED ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _CPU_ARCH_NOT_DEFINED 1 ++EOF ++ ++ ;; ++ esac ++ ;; ++ ++*-netbsd*) ++ DSO_CFLAGS='' ++ CFLAGS="$CFLAGS -Dunix" ++ CXXFLAGS="$CXXFLAGS -Dunix" ++ if $CC -E - -dM /dev/null; then ++ DSO_PIC_CFLAGS='-fPIC -DPIC' ++ DSO_LDOPTS='-shared' ++ MOZ_PROGRAM_LDFLAGS="$MOZ_PROGRAM_LDFLAGS -Wl,--export-dynamic" ++ else ++ DSO_PIC_CFLAGS='-fPIC -DPIC' ++ DSO_LDOPTS='-shared' ++ fi ++ # This will fail on a.out systems prior to 1.5.1_ALPHA. ++ if test "$LIBRUNPATH"; then ++ DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS" ++ fi ++ ;; ++ ++*-openbsd*) ++ DSO_CFLAGS='' ++ DSO_PIC_CFLAGS='-fPIC' ++ DSO_LDOPTS='-shared -fPIC' ++ if test "$LIBRUNPATH"; then ++ DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS" ++ fi ++ ;; ++ ++*-solaris*) ++ MOZ_FIX_LINK_PATHS="-L${DIST}/bin" ++ ;; ++ ++esac ++ ++if test -z "$MOZ_OPTIMIZE_FLAGS"; then ++ MOZ_OPTIMIZE_FLAGS="-O" ++fi ++ ++if test -z "$COMPILE_ENVIRONMENT"; then ++ SKIP_COMPILER_CHECKS=1 ++ SKIP_LIBRARY_CHECKS=1 ++fi ++ ++if test -n "$COMPILE_ENVIRONMENT"; then ++ ++ ++ ++if test -z "$MOZ_DEBUG" -o -n "$MOZ_ASAN"; then ++ MOZ_NO_DEBUG_RTL=1 ++fi ++ ++ ++ ++MOZ_DEBUG_ENABLE_DEFS="DEBUG" ++# Check whether --with-debug-label or --without-debug-label was given. ++if test "${with_debug_label+set}" = set; then ++ withval="$with_debug_label" ++ for option in `echo $withval | sed 's/,/ /g'`; do ++ MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS DEBUG_${option}" ++done ++fi ++ ++ ++if test -n "$MOZ_DEBUG"; then ++ if test -n "$COMPILE_ENVIRONMENT"; then ++ echo $ac_n "checking for valid debug flags""... $ac_c" 1>&6 ++echo "configure:4707: checking for valid debug flags" >&5 ++ _SAVE_CFLAGS=$CFLAGS ++ CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS" ++ cat > conftest.$ac_ext < ++int main() { ++printf("Hello World\n"); ++; return 0; } ++EOF ++if { (eval echo configure:4718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ _results=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ _results=no ++fi ++rm -f conftest* ++ echo "$ac_t""$_results" 1>&6 ++ if test "$_results" = "no"; then ++ { echo "configure: error: These compiler flags are invalid: $MOZ_DEBUG_FLAGS" 1>&2; echo "configure: error: These compiler flags are invalid: $MOZ_DEBUG_FLAGS" 1>&5; exit 1; } ++ fi ++ CFLAGS=$_SAVE_CFLAGS ++ fi ++ ++ MOZ_DEBUG_DEFINES="$MOZ_DEBUG_ENABLE_DEFS" ++else ++ MOZ_DEBUG_DEFINES="NDEBUG TRIMMED" ++fi ++ ++ ++ ++ ++ ++# Check whether --enable-cpp-rtti or --disable-cpp-rtti was given. ++if test "${enable_cpp_rtti+set}" = set; then ++ enableval="$enable_cpp_rtti" ++ if test "$enableval" = "yes"; then ++ _MOZ_USE_RTTI=1 ++ elif test "$enableval" = "no"; then ++ _MOZ_USE_RTTI= ++ else ++ { echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++if test -z "$_MOZ_USE_RTTI"; then ++ if test "$GNU_CC"; then ++ CXXFLAGS="$CXXFLAGS -fno-rtti" ++ else ++ case "$target" in ++ *-mingw*) ++ CXXFLAGS="$CXXFLAGS -GR-" ++ esac ++ fi ++fi ++ ++if test "$CLANG_CXX"; then ++ ## We disable return-type-c-linkage because jsval is defined as a C++ type but is ++ ## returned by C functions. This is possible because we use knowledge about the ABI ++ ## to typedef it to a C type with the same layout when the headers are included ++ ## from C. ++ _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-unknown-warning-option -Wno-return-type-c-linkage" ++fi ++ ++if test "$GNU_CC"; then ++ if test -z "$DEVELOPER_OPTIONS"; then ++ CFLAGS="$CFLAGS -ffunction-sections -fdata-sections" ++ CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections" ++ fi ++ ++ # For MinGW, we need big-obj otherwise we create too many sections in Unified builds ++ if test "${OS_ARCH}" = "WINNT"; then ++ CFLAGS="$CFLAGS -Wa,-mbig-obj" ++ CXXFLAGS="$CXXFLAGS -Wa,-mbig-obj" ++ fi ++ ++ CFLAGS="$CFLAGS -fno-math-errno" ++ CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-math-errno" ++fi ++ ++ ++# Check whether --enable-icf or --disable-icf was given. ++if test "${enable_icf+set}" = set; then ++ enableval="$enable_icf" ++ if test "$enableval" = "no"; then ++ MOZ_DISABLE_ICF=1 ++ elif test "$enableval" = "yes"; then ++ MOZ_DISABLE_ICF= ++ else ++ { echo "configure: error: Option, icf, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, icf, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$MOZ_DISABLE_ICF" -a -z "$DEVELOPER_OPTIONS"; then ++ echo $ac_n "checking whether the linker supports Identical Code Folding""... $ac_c" 1>&6 ++echo "configure:4808: checking whether the linker supports Identical Code Folding" >&5 ++if eval "test \"`echo '$''{'LD_SUPPORTS_ICF'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ echo 'int foo() {return 42;}' \ ++ 'int bar() {return 42;}' \ ++ 'int main() {return foo() - bar();}' > conftest.${ac_ext} ++ # If the linker supports ICF, foo and bar symbols will have ++ # the same address ++ if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,--icf=safe -ffunction-sections conftest.${ac_ext} $LIBS 1>&2'; { (eval echo configure:4817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && ++ test -s conftest${ac_exeext} && ++ $LLVM_OBJDUMP -t conftest${ac_exeext} | awk '{a[$6] = $1} END {if (a["foo"] && (a["foo"] != a["bar"])) { exit 1 }}'; then ++ LD_SUPPORTS_ICF=yes ++ else ++ LD_SUPPORTS_ICF=no ++ fi ++ rm -rf conftest* ++fi ++ ++echo "$ac_t""$LD_SUPPORTS_ICF" 1>&6 ++ if test "$LD_SUPPORTS_ICF" = yes; then ++ _SAVE_LDFLAGS="$LDFLAGS -Wl,--icf=safe" ++ LDFLAGS="$LDFLAGS -Wl,--icf=safe -Wl,--print-icf-sections" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ LD_PRINT_ICF_SECTIONS=-Wl,--print-icf-sections ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ LD_PRINT_ICF_SECTIONS= ++fi ++rm -f conftest* ++ ++ LDFLAGS="$_SAVE_LDFLAGS" ++ fi ++fi ++ ++ ++if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$DEVELOPER_OPTIONS"; then ++ if test -n "$MOZ_DEBUG_FLAGS"; then ++ echo $ac_n "checking whether removing dead symbols breaks debugging""... $ac_c" 1>&6 ++echo "configure:4858: checking whether removing dead symbols breaks debugging" >&5 ++if eval "test \"`echo '$''{'GC_SECTIONS_BREAKS_DEBUG_RANGES'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ echo 'int foo() {return 42;}' \ ++ 'int bar() {return 1;}' \ ++ 'int main() {return foo();}' > conftest.${ac_ext} ++ if { ac_try='${CC-cc} -o conftest.${ac_objext} $CFLAGS $MOZ_DEBUG_FLAGS -c conftest.${ac_ext} 1>&2'; { (eval echo configure:4865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && ++ { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS $MOZ_DEBUG_FLAGS -Wl,--gc-sections conftest.${ac_objext} $LIBS 1>&2'; { (eval echo configure:4866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && ++ test -s conftest${ac_exeext} -a -s conftest.${ac_objext}; then ++ if test "`$PYTHON -m mozbuild.configure.check_debug_ranges conftest.${ac_objext} conftest.${ac_ext}`" = \ ++ "`$PYTHON -m mozbuild.configure.check_debug_ranges conftest${ac_exeext} conftest.${ac_ext}`"; then ++ GC_SECTIONS_BREAKS_DEBUG_RANGES=no ++ else ++ GC_SECTIONS_BREAKS_DEBUG_RANGES=yes ++ fi ++ else ++ GC_SECTIONS_BREAKS_DEBUG_RANGES="no, but it's broken in some other way" ++ fi ++ rm -rf conftest* ++fi ++ ++echo "$ac_t""$GC_SECTIONS_BREAKS_DEBUG_RANGES" 1>&6 ++ if test "$GC_SECTIONS_BREAKS_DEBUG_RANGES" = no; then ++ DSO_LDOPTS="$DSO_LDOPTS -Wl,--gc-sections" ++ fi ++ else ++ DSO_LDOPTS="$DSO_LDOPTS -Wl,--gc-sections" ++ fi ++fi ++ ++if test "$GNU_CC$CLANG_CC"; then ++ MOZ_PROGRAM_LDFLAGS="$MOZ_PROGRAM_LDFLAGS -pie" ++fi ++ ++ ++ ++if test -n "$GCC_USE_GNU_LD"; then ++ case "$LDFLAGS" in ++ *-fsanitize=address*) ++ LDFLAGS="$LDFLAGS -Wl,-Bsymbolic" ++ ;; ++ esac ++fi ++ ++ ++fi ++ ++if test -z "$SKIP_COMPILER_CHECKS"; then ++echo $ac_n "checking for working const""... $ac_c" 1>&6 ++echo "configure:4908: checking for working const" >&5 ++if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext <j = 5; ++} ++{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ ++ const int foo = 10; ++} ++ ++; return 0; } ++EOF ++if { (eval echo configure:4962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ac_cv_c_const=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_c_const=no ++fi ++rm -f conftest* ++fi ++ ++echo "$ac_t""$ac_cv_c_const" 1>&6 ++if test $ac_cv_c_const = no; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' const ''', r''' ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define const ++EOF ++ ++fi ++ ++ ++ ++echo $ac_n "checking for mode_t""... $ac_c" 1>&6 ++echo "configure:4988: checking for mode_t" >&5 ++if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#if STDC_HEADERS ++#include ++#include ++#endif ++EOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then ++ rm -rf conftest* ++ ac_cv_type_mode_t=yes ++else ++ rm -rf conftest* ++ ac_cv_type_mode_t=no ++fi ++rm -f conftest* ++ ++fi ++echo "$ac_t""$ac_cv_type_mode_t" 1>&6 ++if test $ac_cv_type_mode_t = no; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' mode_t ''', r''' int ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define mode_t int ++EOF ++ ++fi ++ ++ ++ ++echo $ac_n "checking for off_t""... $ac_c" 1>&6 ++echo "configure:5026: checking for off_t" >&5 ++if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#if STDC_HEADERS ++#include ++#include ++#endif ++EOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then ++ rm -rf conftest* ++ ac_cv_type_off_t=yes ++else ++ rm -rf conftest* ++ ac_cv_type_off_t=no ++fi ++rm -f conftest* ++ ++fi ++echo "$ac_t""$ac_cv_type_off_t" 1>&6 ++if test $ac_cv_type_off_t = no; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' off_t ''', r''' long ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define off_t long ++EOF ++ ++fi ++ ++ ++ ++echo $ac_n "checking for pid_t""... $ac_c" 1>&6 ++echo "configure:5064: checking for pid_t" >&5 ++if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#if STDC_HEADERS ++#include ++#include ++#endif ++EOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then ++ rm -rf conftest* ++ ac_cv_type_pid_t=yes ++else ++ rm -rf conftest* ++ ac_cv_type_pid_t=no ++fi ++rm -f conftest* ++ ++fi ++echo "$ac_t""$ac_cv_type_pid_t" 1>&6 ++if test $ac_cv_type_pid_t = no; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' pid_t ''', r''' int ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define pid_t int ++EOF ++ ++fi ++ ++ ++ ++echo $ac_n "checking for size_t""... $ac_c" 1>&6 ++echo "configure:5102: checking for size_t" >&5 ++if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#if STDC_HEADERS ++#include ++#include ++#endif ++EOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then ++ rm -rf conftest* ++ ac_cv_type_size_t=yes ++else ++ rm -rf conftest* ++ ac_cv_type_size_t=no ++fi ++rm -f conftest* ++ ++fi ++echo "$ac_t""$ac_cv_type_size_t" 1>&6 ++if test $ac_cv_type_size_t = no; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' size_t ''', r''' unsigned ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define size_t unsigned ++EOF ++ ++fi ++ ++ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 ++echo "configure:5160: checking for ssize_t" >&5 ++if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++ #include ++int main() { ++ssize_t foo = 0; ++; return 0; } ++EOF ++if { (eval echo configure:5173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ac_cv_type_ssize_t=true ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_type_ssize_t=false ++fi ++rm -f conftest* ++fi ++ ++if test "$ac_cv_type_ssize_t" = true ; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_SSIZE_T ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_SSIZE_T 1 ++EOF ++ ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++ ++ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++if test "$GNU_CXX"; then ++ echo $ac_n "checking whether 64-bits std::atomic requires -latomic""... $ac_c" 1>&6 ++echo "configure:5224: checking whether 64-bits std::atomic requires -latomic" >&5 ++if eval "test \"`echo '$''{'ac_cv_needs_atomic'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test "$CC_TYPE" = "clang" -a "$CPU_ARCH" = "x86" -a "$OS_ARCH" = "Linux"; then ++ ac_cv_needs_atomic=yes ++ else ++ cat > conftest.$ac_ext < ++ #include ++int main() { ++ std::atomic foo; foo = 1; ++; return 0; } ++EOF ++if { (eval echo configure:5240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_cv_needs_atomic=no ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ _SAVE_LIBS="$LIBS" ++ LIBS="$LIBS -latomic" ++ cat > conftest.$ac_ext < ++ #include ++int main() { ++ std::atomic foo; foo = 1; ++; return 0; } ++EOF ++if { (eval echo configure:5258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_cv_needs_atomic=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_needs_atomic="do not know; assuming no" ++fi ++rm -f conftest* ++ LIBS="$_SAVE_LIBS" ++ ++fi ++rm -f conftest* ++ fi ++ ++fi ++ ++echo "$ac_t""$ac_cv_needs_atomic" 1>&6 ++ if test "$ac_cv_needs_atomic" = yes; then ++ MOZ_NEEDS_LIBATOMIC=1 ++ else ++ MOZ_NEEDS_LIBATOMIC= ++ fi ++ ++fi ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++ ++case "${OS_TARGET}" in ++WINNT|Darwin|Android) ++ ;; ++*) ++ STL_FLAGS="-I${DIST}/stl_wrappers" ++ WRAP_STL_INCLUDES=1 ++ ;; ++esac ++ ++ac_header_dirent=no ++for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h ++do ++ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ++echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 ++echo "configure:5311: checking for $ac_hdr that defines DIR" >&5 ++if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#include <$ac_hdr> ++int main() { ++DIR *dirp = 0; ++; return 0; } ++EOF ++if { (eval echo configure:5324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ eval "ac_cv_header_dirent_$ac_safe=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_header_dirent_$ac_safe=no" ++fi ++rm -f conftest* ++fi ++if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++done ++# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. ++if test $ac_header_dirent = dirent.h; then ++echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 ++echo "configure:5352: checking for opendir in -ldir" >&5 ++ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-ldir $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ LIBS="$LIBS -ldir" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++else ++echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 ++echo "configure:5393: checking for opendir in -lx" >&5 ++ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lx $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ LIBS="$LIBS -lx" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++fi ++ ++case "$target_os" in ++freebsd*) ++# for stuff like -lXshm ++ CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}" ++ ;; ++esac ++ ++# Check whether --enable-dtrace or --disable-dtrace was given. ++if test "${enable_dtrace+set}" = set; then ++ enableval="$enable_dtrace" ++ if test "$enableval" = "yes"; then ++ enable_dtrace="yes" ++ elif test "$enableval" = "no"; then ++ : ++ else ++ { echo "configure: error: Option, dtrace, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, dtrace, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++if test "x$enable_dtrace" = "xyes"; then ++ ac_safe=`echo "sys/sdt.h" | sed 'y%./+-%__p_%'` ++ echo $ac_n "checking for sys/sdt.h""... $ac_c" 1>&6 ++echo "configure:5456: checking for sys/sdt.h" >&5 ++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++int main() { ++ ++; return 0; } ++EOF ++if { (eval echo configure:5469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=no" ++fi ++rm -f conftest* ++fi ++ ++ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ HAVE_DTRACE=1 ++ else ++ echo "$ac_t""no" 1>&6 ++ ++ fi ++ ++ if test -n "$HAVE_DTRACE"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' INCLUDE_MOZILLA_DTRACE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define INCLUDE_MOZILLA_DTRACE 1 ++EOF ++ ++ else ++ { echo "configure: error: dtrace enabled but sys/sdt.h not found" 1>&2; echo "configure: error: dtrace enabled but sys/sdt.h not found" 1>&5; exit 1; }; ++ fi ++fi ++ ++ ++echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6 ++echo "configure:5504: checking for gethostbyname_r in -lc_r" >&5 ++ac_lib_var=`echo c_r'_'gethostbyname_r | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lc_r $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_lib=HAVE_LIB`echo c_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \ ++ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++ ++ ++case $target in ++*-darwin*) ++ ;; ++*) ++ ++echo $ac_n "checking for library containing dlopen""... $ac_c" 1>&6 ++echo "configure:5560: checking for library containing dlopen" >&5 ++if eval "test \"`echo '$''{'ac_cv_search_dlopen'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_func_search_save_LIBS="$LIBS" ++ac_cv_search_dlopen="no" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_cv_search_dlopen="none required" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++fi ++rm -f conftest* ++test "$ac_cv_search_dlopen" = "no" && for i in dl; do ++LIBS="-l$i $ac_func_search_save_LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_cv_search_dlopen="-l$i" ++break ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++fi ++rm -f conftest* ++done ++LIBS="$ac_func_search_save_LIBS" ++fi ++ ++echo "$ac_t""$ac_cv_search_dlopen" 1>&6 ++if test "$ac_cv_search_dlopen" != "no"; then ++ test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS" ++ ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` ++ echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 ++echo "configure:5618: checking for dlfcn.h" >&5 ++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++int main() { ++ ++; return 0; } ++EOF ++if { (eval echo configure:5631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=no" ++fi ++rm -f conftest* ++fi ++ ++ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_DLOPEN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_DLOPEN 1 ++EOF ++ ++ else ++ echo "$ac_t""no" 1>&6 ++ ++ fi ++ ++else : ++ ++fi ++ ;; ++esac ++ ++if test ! "$GNU_CXX"; then ++ echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6 ++echo "configure:5665: checking for demangle in -lC" >&5 ++ac_lib_var=`echo C'_'demangle | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lC $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_lib=HAVE_LIB`echo C | sed -e 's/[^a-zA-Z0-9_]/_/g' \ ++ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++ ++fi ++ ++echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 ++echo "configure:5717: checking for socket in -lsocket" >&5 ++ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lsocket $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ ++ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++ ++ ++case "$target_os" in ++darwin*) ++ USE_PTHREADS=1 ++ ;; ++*) ++ echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 ++echo "configure:5773: checking for pthread_create in -lpthreads" >&5 ++ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lpthreads $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads" ++else ++ echo "$ac_t""no" 1>&6 ++echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 ++echo "configure:5811: checking for pthread_create in -lpthread" >&5 ++ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lpthread $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread" ++else ++ echo "$ac_t""no" 1>&6 ++echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 ++echo "configure:5849: checking for pthread_create in -lc_r" >&5 ++ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lc_r $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r" ++else ++ echo "$ac_t""no" 1>&6 ++echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 ++echo "configure:5887: checking for pthread_create in -lc" >&5 ++ac_lib_var=`echo c'_'pthread_create | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lc $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ USE_PTHREADS=1 ++ ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ ++fi ++ ++ ++fi ++ ++ ++fi ++ ++ ;; ++esac ++ ++if test "$USE_PTHREADS"x != x ++then ++ rm -f conftest* ++ ac_cv_have_dash_pthread=no ++ echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6 ++echo "configure:5944: checking whether ${CC-cc} accepts -pthread" >&5 ++ echo 'int main() { return 0; }' | cat > conftest.c ++ ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1 ++ if test $? -eq 0; then ++ if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" -a -z "`egrep -i '(error|incorrect)' conftest.out`" ; then ++ ac_cv_have_dash_pthread=yes ++ case "$target_os" in ++ freebsd*) ++# Freebsd doesn't use -pthread for compiles, it uses them for linking ++ ;; ++ *) ++ CFLAGS="$CFLAGS -pthread" ++ CXXFLAGS="$CXXFLAGS -pthread" ++ ;; ++ esac ++ fi ++ fi ++ rm -f conftest* ++ echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6 ++ ++ ac_cv_have_dash_pthreads=no ++ if test "$ac_cv_have_dash_pthread" = "no"; then ++ echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6 ++echo "configure:5967: checking whether ${CC-cc} accepts -pthreads" >&5 ++ echo 'int main() { return 0; }' | cat > conftest.c ++ ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1 ++ if test $? -eq 0; then ++ if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" -a -z "`egrep -i '(error|incorrect)' conftest.out`" ; then ++ ac_cv_have_dash_pthreads=yes ++ CFLAGS="$CFLAGS -pthreads" ++ CXXFLAGS="$CXXFLAGS -pthreads" ++ fi ++ fi ++ rm -f conftest* ++ echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6 ++ fi ++ ++ case "$target" in ++ *-*-freebsd*) ++ cat >> confdefs.pytmp <<\EOF ++ (''' _REENTRANT ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _REENTRANT 1 ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' _THREAD_SAFE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _THREAD_SAFE 1 ++EOF ++ ++ if test "$ac_cv_have_dash_pthread" = "yes"; then ++ _PTHREAD_LDFLAGS="-pthread" ++ fi ++ ;; ++ ++ *-*-openbsd*|*-*-bsdi*) ++ cat >> confdefs.pytmp <<\EOF ++ (''' _REENTRANT ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _REENTRANT 1 ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' _THREAD_SAFE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _THREAD_SAFE 1 ++EOF ++ ++ if test "$ac_cv_have_dash_pthread" = "yes"; then ++ _PTHREAD_LDFLAGS="-pthread" ++ fi ++ ;; ++ ++ *-*-linux*|*-*-kfreebsd*-gnu|*-*-gnu*) ++ cat >> confdefs.pytmp <<\EOF ++ (''' _REENTRANT ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _REENTRANT 1 ++EOF ++ ++ ;; ++ ++ esac ++ LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}" ++fi ++ ++ ++for ac_func in getc_unlocked _getc_nolock gmtime_r localtime_r pthread_getname_np pthread_get_name_np ++do ++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++echo "configure:6040: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef $ac_func ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:6072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++done ++ ++ ++echo $ac_n "checking for clock_gettime(CLOCK_MONOTONIC)""... $ac_c" 1>&6 ++echo "configure:6101: checking for clock_gettime(CLOCK_MONOTONIC)" >&5 ++if eval "test \"`echo '$''{'ac_cv_clock_monotonic'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ for libs in "" -lrt; do ++ _SAVE_LIBS="$LIBS" ++ _SAVE_CFLAGS="$CFLAGS" ++ LIBS="$LIBS $libs" ++ CFLAGS="$CFLAGS $DSO_PIC_CFLAGS" ++ cat > conftest.$ac_ext < ++int main() { ++ struct timespec ts; ++ clock_gettime(CLOCK_MONOTONIC, &ts); ++; return 0; } ++EOF ++if { (eval echo configure:6120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_cv_clock_monotonic=$libs ++ LIBS="$_SAVE_LIBS" ++ break ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_clock_monotonic=no ++fi ++rm -f conftest* ++ LIBS="$_SAVE_LIBS" ++ CFLAGS="$_SAVE_CFLAGS" ++ done ++fi ++ ++echo "$ac_t""$ac_cv_clock_monotonic" 1>&6 ++if test "$ac_cv_clock_monotonic" != "no"; then ++ HAVE_CLOCK_MONOTONIC=1 ++ REALTIME_LIBS=$ac_cv_clock_monotonic ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_CLOCK_MONOTONIC ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_CLOCK_MONOTONIC 1 ++EOF ++ ++ ++ ++fi ++ ++echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 ++echo "configure:6153: checking for sin in -lm" >&5 ++ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lm $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ ++ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++ ++echo $ac_n "checking for sincos in -lm""... $ac_c" 1>&6 ++echo "configure:6203: checking for sincos in -lm" >&5 ++ac_lib_var=`echo m'_'sincos | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lm $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_SINCOS ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_SINCOS 1 ++EOF ++ ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++echo $ac_n "checking for __sincos in -lm""... $ac_c" 1>&6 ++echo "configure:6249: checking for __sincos in -lm" >&5 ++ac_lib_var=`echo m'_'__sincos | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lm $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE___SINCOS ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE___SINCOS 1 ++EOF ++ ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ ++echo $ac_n "checking for res_ninit()""... $ac_c" 1>&6 ++echo "configure:6296: checking for res_ninit()" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_res_ninit'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test "$OS_TARGET" = NetBSD -o "$OS_TARGET" = OpenBSD; then ++ ac_cv_func_res_ninit=no ++ else ++ cat > conftest.$ac_ext < ++ #include ++ #include ++ #include ++ ++int main() { ++int foo = res_ninit(&_res); ++; return 0; } ++EOF ++if { (eval echo configure:6319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_cv_func_res_ninit=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_func_res_ninit=no ++fi ++rm -f conftest* ++ fi ++ ++fi ++ ++echo "$ac_t""$ac_cv_func_res_ninit" 1>&6 ++ ++if test "$ac_cv_func_res_ninit" = "yes"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_RES_NINIT ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_RES_NINIT 1 ++EOF ++ ++fi ++ ++ ++ echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 ++echo "configure:6347: checking for nl_langinfo and CODESET" >&5 ++if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++int main() { ++char* cs = nl_langinfo(CODESET); ++; return 0; } ++EOF ++if { (eval echo configure:6359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ am_cv_langinfo_codeset=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ am_cv_langinfo_codeset=no ++fi ++rm -f conftest* ++ ++fi ++ ++echo "$ac_t""$am_cv_langinfo_codeset" 1>&6 ++ if test $am_cv_langinfo_codeset = yes; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_LANGINFO_CODESET ''', r''' 1 ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_LANGINFO_CODESET 1 ++EOF ++ ++ HAVE_LANGINFO_CODESET=1 ++ fi ++ ++ ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++echo $ac_n "checking for an implementation of va_copy()""... $ac_c" 1>&6 ++echo "configure:6399: checking for an implementation of va_copy()" >&5 ++if eval "test \"`echo '$''{'ac_cv_va_copy'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++ #include ++ void f (int i, ...) { ++ va_list args1, args2; ++ va_start (args1, i); ++ va_copy (args2, args1); ++ if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) ++ exit (1); ++ va_end (args1); va_end (args2); ++ } ++int main() { ++f(0, 42); return 0 ++; return 0; } ++EOF ++if { (eval echo configure:6420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ac_cv_va_copy=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_va_copy=no ++ ++fi ++rm -f conftest* ++ ++fi ++ ++echo "$ac_t""$ac_cv_va_copy" 1>&6 ++echo $ac_n "checking whether va_list can be copied by value""... $ac_c" 1>&6 ++echo "configure:6436: checking whether va_list can be copied by value" >&5 ++if eval "test \"`echo '$''{'ac_cv_va_val_copy'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++ #include ++ void f (int i, ...) { ++ va_list args1, args2; ++ va_start (args1, i); ++ args2 = args1; ++ if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) ++ exit (1); ++ va_end (args1); va_end (args2); ++ } ++int main() { ++f(0, 42); return 0 ++; return 0; } ++EOF ++if { (eval echo configure:6457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ac_cv_va_val_copy=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_va_val_copy=no ++fi ++rm -f conftest* ++ ++fi ++ ++echo "$ac_t""$ac_cv_va_val_copy" 1>&6 ++if test "x$ac_cv_va_copy" = "xyes"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' VA_COPY ''', r''' va_copy ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define VA_COPY va_copy ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_VA_COPY ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_VA_COPY 1 ++EOF ++ ++fi ++ ++if test "x$ac_cv_va_val_copy" = "xno"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_VA_LIST_AS_ARRAY ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_VA_LIST_AS_ARRAY 1 ++EOF ++ ++fi ++ ++ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++ARM_ABI_PREFIX= ++if test "$GNU_CC"; then ++ if test "$CPU_ARCH" = "arm" ; then ++ echo $ac_n "checking for ARM EABI""... $ac_c" 1>&6 ++echo "configure:6514: checking for ARM EABI" >&5 ++if eval "test \"`echo '$''{'ac_cv_gcc_arm_eabi'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ac_cv_gcc_arm_eabi="yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_gcc_arm_eabi="no" ++fi ++rm -f conftest* ++fi ++ ++echo "$ac_t""$ac_cv_gcc_arm_eabi" 1>&6 ++ if test "$ac_cv_gcc_arm_eabi" = "yes"; then ++ HAVE_ARM_EABI=1 ++ ARM_ABI_PREFIX=eabi- ++ else ++ ARM_ABI_PREFIX=oabi- ++ fi ++ fi ++ ++ TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc3}" ++fi ++ ++# try harder, when checking for __thread support, see bug 521750 comment #33 and below ++# We pass MOZ_OPTIMIZE_LDFLAGS to the linker because if dead_strip is ++# enabled, the linker in xcode 4.1 will crash. Without this it would crash when ++# linking XUL. ++_SAVE_LDFLAGS=$LDFLAGS ++LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS $DSO_LDOPTS $MOZ_OPTIMIZE_LDFLAGS" ++echo $ac_n "checking for __thread keyword for TLS variables""... $ac_c" 1>&6 ++echo "configure:6563: checking for __thread keyword for TLS variables" >&5 ++if eval "test \"`echo '$''{'ac_cv_thread_keyword'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_cv_thread_keyword=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_thread_keyword=no ++fi ++rm -f conftest* ++fi ++ ++echo "$ac_t""$ac_cv_thread_keyword" 1>&6 ++LDFLAGS=$_SAVE_LDFLAGS ++if test "$ac_cv_thread_keyword" = yes; then ++ # mips builds fail with TLS variables because of a binutils bug. ++ # See bug 528687 ++ case "${target}" in ++ mips*-*) ++ : ++ ;; ++ *-android*|*-linuxandroid*) ++ : ++ ;; ++ *) ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_THREAD_TLS_KEYWORD ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_THREAD_TLS_KEYWORD 1 ++EOF ++ ++ ;; ++ esac ++fi ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++ ++for ac_func in localeconv ++do ++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++echo "configure:6627: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef $ac_func ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:6659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++done ++ ++fi # ! SKIP_COMPILER_CHECKS ++ ++TARGET_XPCOM_ABI= ++if test -n "${CPU_ARCH}" -a -n "${TARGET_COMPILER_ABI}"; then ++ TARGET_XPCOM_ABI="${CPU_ARCH}-${TARGET_COMPILER_ABI}" ++fi ++ ++ ++if test -n "$SKIP_COMPILER_CHECKS"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' MALLOC_H ''', r''' ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define MALLOC_H ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_FORCEINLINE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_FORCEINLINE 1 ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_LOCALECONV ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_LOCALECONV 1 ++EOF ++ ++fi # SKIP_COMPILER_CHECKS ++ ++ ++# External Packages ++ ++ ++ ++ ++ ++ ++# Check whether --with-nspr-cflags or --without-nspr-cflags was given. ++if test "${with_nspr_cflags+set}" = set; then ++ withval="$with_nspr_cflags" ++ NSPR_CFLAGS=$withval ++fi ++ ++# Check whether --with-nspr-libs or --without-nspr-libs was given. ++if test "${with_nspr_libs+set}" = set; then ++ withval="$with_nspr_libs" ++ NSPR_LIBS=$withval ++fi ++ ++ ++ ++ # Check whether --enable-nspr-build or --disable-nspr-build was given. ++if test "${enable_nspr_build+set}" = set; then ++ enableval="$enable_nspr_build" ++ if test "$enableval" = "yes"; then ++ MOZ_BUILD_NSPR=1 ++ elif test "$enableval" = "no"; then ++ MOZ_BUILD_NSPR= ++ else ++ { echo "configure: error: Option, nspr-build, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, nspr-build, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++ ++if test "$MOZ_BUILD_APP" != js || test -n "$JS_STANDALONE"; then ++ _IS_OUTER_CONFIGURE=1 ++fi ++ ++# Check whether --with-system-nspr or --without-system-nspr was given. ++if test "${with_system_nspr+set}" = set; then ++ withval="$with_system_nspr" ++ if test "$withval" = "yes"; then ++ _USE_SYSTEM_NSPR=1 ++ elif test "$withval" = "no"; then ++ : ++ else ++ { echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++JS_POSIX_NSPR=unset ++ ++ if test -n "$JS_STANDALONE"; then ++ case "$target" in ++ *linux*|*darwin*|*dragonfly*|*freebsd*|*netbsd*|*openbsd*) ++ if test -z "$_HAS_NSPR"; then ++ JS_POSIX_NSPR_DEFAULT=1 ++ fi ++ ;; ++ esac ++ fi ++ ++ # Check whether --enable-posix-nspr-emulation or --disable-posix-nspr-emulation was given. ++if test "${enable_posix_nspr_emulation+set}" = set; then ++ enableval="$enable_posix_nspr_emulation" ++ if test "$enableval" = "yes"; then ++ JS_POSIX_NSPR=1 ++ elif test "$enableval" = "no"; then ++ JS_POSIX_NSPR= ++ else ++ { echo "configure: error: Option, posix-nspr-emulation, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, posix-nspr-emulation, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++ ++ ++echo $ac_n "checking NSPR selection""... $ac_c" 1>&6 ++echo "configure:6799: checking NSPR selection" >&5 ++nspr_opts= ++which_nspr=default ++if test -n "$_USE_SYSTEM_NSPR"; then ++ nspr_opts="x$nspr_opts" ++ which_nspr="system" ++fi ++if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then ++ nspr_opts="x$nspr_opts" ++ which_nspr="command-line" ++fi ++if test -n "$MOZ_BUILD_NSPR"; then ++ nspr_opts="x$nspr_opts" ++ which_nspr="source-tree" ++fi ++if test "$JS_POSIX_NSPR" = unset; then ++ JS_POSIX_NSPR= ++else ++ nspr_opts="x$nspr_opts" ++ which_nspr="posix-wrapper" ++fi ++ ++if test -z "$nspr_opts"; then ++ if test "$MOZ_BUILD_APP" != js; then ++ MOZ_BUILD_NSPR=1 ++ which_nspr="source-tree" ++ else ++ JS_POSIX_NSPR="$JS_POSIX_NSPR_DEFAULT" ++ if test -z "$JS_POSIX_NSPR"; then ++ MOZ_BUILD_NSPR=1 ++ which_nspr="source-tree" ++ else ++ which_nspr="posix-wrapper" ++ fi ++ fi ++fi ++ ++if test -z "$nspr_opts" || test "$nspr_opts" = x; then ++ echo "$ac_t""$which_nspr" 1>&6 ++else ++ { echo "configure: error: only one way of using NSPR may be selected. See 'configure --help'." 1>&2; echo "configure: error: only one way of using NSPR may be selected. See 'configure --help'." 1>&5; exit 1; } ++fi ++ ++ ++ ++if test "$MOZ_BUILD_APP" = js; then ++ if test "$JS_POSIX_NSPR" = 1; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' JS_POSIX_NSPR ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define JS_POSIX_NSPR 1 ++EOF ++ ++ fi ++ ++fi ++ ++# A (sub)configure invoked by the toplevel configure will always receive ++# --with-nspr-libs on the command line. It will never need to figure out ++# anything itself. ++if test -n "$_IS_OUTER_CONFIGURE"; then ++ ++if test -n "$_USE_SYSTEM_NSPR"; then ++ ++# Check whether --with-nspr-prefix or --without-nspr-prefix was given. ++if test "${with_nspr_prefix+set}" = set; then ++ withval="$with_nspr_prefix" ++ nspr_config_prefix="$withval" ++else ++ nspr_config_prefix="" ++fi ++ ++ ++# Check whether --with-nspr-exec-prefix or --without-nspr-exec-prefix was given. ++if test "${with_nspr_exec_prefix+set}" = set; then ++ withval="$with_nspr_exec_prefix" ++ nspr_config_exec_prefix="$withval" ++else ++ nspr_config_exec_prefix="" ++fi ++ ++ ++ if test -n "$nspr_config_exec_prefix"; then ++ nspr_config_args="$nspr_config_args --exec-prefix=$nspr_config_exec_prefix" ++ if test -z "$NSPR_CONFIG"; then ++ NSPR_CONFIG=$nspr_config_exec_prefix/bin/nspr-config ++ fi ++ fi ++ if test -n "$nspr_config_prefix"; then ++ nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix" ++ if test -z "$NSPR_CONFIG"; then ++ NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config ++ fi ++ fi ++ ++ unset ac_cv_path_NSPR_CONFIG ++ # Extract the first word of "nspr-config", so it can be a program name with args. ++set dummy nspr-config; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:6899: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_path_NSPR_CONFIG'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$NSPR_CONFIG" in ++ /*) ++ ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a path. ++ ;; ++ ?:/*) ++ ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a dos path. ++ ;; ++ *) ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_path_NSPR_CONFIG="$ac_dir/$ac_word" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ test -z "$ac_cv_path_NSPR_CONFIG" && ac_cv_path_NSPR_CONFIG="no" ++ ;; ++esac ++fi ++NSPR_CONFIG="$ac_cv_path_NSPR_CONFIG" ++if test -n "$NSPR_CONFIG"; then ++ echo "$ac_t""$NSPR_CONFIG" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ min_nspr_version=$NSPR_MINVER ++ echo $ac_n "checking for NSPR - version >= $min_nspr_version""... $ac_c" 1>&6 ++echo "configure:6934: checking for NSPR - version >= $min_nspr_version" >&5 ++ ++ no_nspr="" ++ if test "$NSPR_CONFIG" != "no"; then ++ NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags` ++ NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs` ++ NSPR_VERSION_STRING=`$NSPR_CONFIG $nspr_config_args --version` ++ elif test -n "${NO_NSPR_CONFIG_SYSTEM_VERSION}"; then ++ NSPR_CFLAGS="${NO_NSPR_CONFIG_SYSTEM_CFLAGS}" ++ NSPR_LIBS="${NO_NSPR_CONFIG_SYSTEM_LDFLAGS}" ++ NSPR_VERSION_STRING="$NO_NSPR_CONFIG_SYSTEM_VERSION" ++ else ++ no_nspr="yes" ++ fi ++ ++ if test -z "$no_nspr"; then ++ nspr_config_major_version=`echo $NSPR_VERSION_STRING | \ ++ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\1/'` ++ nspr_config_minor_version=`echo $NSPR_VERSION_STRING | \ ++ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\2/'` ++ nspr_config_micro_version=`echo $NSPR_VERSION_STRING | \ ++ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\4/'` ++ if test -z "$nspr_config_micro_version"; then ++ nspr_config_micro_version="0" ++ fi ++ ++ min_nspr_major_version=`echo $min_nspr_version | \ ++ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\1/'` ++ min_nspr_minor_version=`echo $min_nspr_version | \ ++ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\2/'` ++ min_nspr_micro_version=`echo $min_nspr_version | \ ++ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\4/'` ++ if test -z "$min_nspr_micro_version"; then ++ min_nspr_micro_version="0" ++ fi ++ ++ if test "$nspr_config_major_version" -ne "$min_nspr_major_version"; then ++ no_nspr="yes" ++ elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" && ++ test "$nspr_config_minor_version" -lt "$min_nspr_minor_version"; then ++ no_nspr="yes" ++ elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" && ++ test "$nspr_config_minor_version" -eq "$min_nspr_minor_version" && ++ test "$nspr_config_micro_version" -lt "$min_nspr_micro_version"; then ++ no_nspr="yes" ++ fi ++ fi ++ ++ if test -z "$no_nspr"; then ++ echo "$ac_t""yes" 1>&6 ++ MOZ_SYSTEM_NSPR=1 ++ else ++ echo "$ac_t""no" 1>&6 ++ { echo "configure: error: you do not have NSPR installed or your version is older than $NSPR_MINVER." 1>&2; echo "configure: error: you do not have NSPR installed or your version is older than $NSPR_MINVER." 1>&5; exit 1; } ++ fi ++ ++ ++ ++ ++ ++ ++fi ++ ++if test -n "$MOZ_SYSTEM_NSPR" -o -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then ++ _SAVE_CFLAGS=$CFLAGS ++ CFLAGS="$CFLAGS $NSPR_CFLAGS" ++ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++ : ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ { echo "configure: error: system NSPR does not support PR_STATIC_ASSERT or including prtypes.h does not provide it" 1>&2; echo "configure: error: system NSPR does not support PR_STATIC_ASSERT or including prtypes.h does not provide it" 1>&5; exit 1; } ++fi ++rm -f conftest* ++ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++ : ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ { echo "configure: error: system NSPR does not support PR_UINT64 or including prtypes.h does not provide it" 1>&2; echo "configure: error: system NSPR does not support PR_UINT64 or including prtypes.h does not provide it" 1>&5; exit 1; } ++fi ++rm -f conftest* ++ CFLAGS=$_SAVE_CFLAGS ++ NSPR_INCLUDE_DIR=`echo ${NSPR_CFLAGS} | sed -e 's/.*-I\([^ ]*\).*/\1/'` ++ NSPR_LIB_DIR=`echo ${NSPR_LIBS} | sed -e 's/.*-L\([^ ]*\).*/\1/'` ++elif test -z "$JS_POSIX_NSPR"; then ++ NSPR_INCLUDE_DIR="${DIST}/include/nspr" ++ NSPR_CFLAGS="-I${NSPR_INCLUDE_DIR}" ++ if test -n "$GNU_CC"; then ++ if test -n "$MOZ_FOLD_LIBS"; then ++ NSPR_LIB_DIR=${DIST}/lib ++ else ++ NSPR_LIB_DIR=${DIST}/bin ++ fi ++ NSPR_LIBS="-L${NSPR_LIB_DIR} -lnspr${NSPR_VERSION} -lplc${NSPR_VERSION} -lplds${NSPR_VERSION}" ++ else ++ # NSS needs actual static libs to link to, and this is where they are. ++ NSPR_LIBS="${DIST}/lib/nspr${NSPR_VERSION}.lib ${DIST}/lib/plc${NSPR_VERSION}.lib ${DIST}/lib/plds${NSPR_VERSION}.lib " ++ NSPR_LIB_DIR="${DIST}/lib" ++ fi ++fi ++ ++ ++ ++ ++ ++PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr" ++if test -n "$MOZ_SYSTEM_NSPR"; then ++ _SAVE_CFLAGS=$CFLAGS ++ CFLAGS="$CFLAGS $NSPR_CFLAGS" ++ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++ : ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ { echo "configure: error: system NSPR does not support PR_STATIC_ASSERT" 1>&2; echo "configure: error: system NSPR does not support PR_STATIC_ASSERT" 1>&5; exit 1; } ++fi ++rm -f conftest* ++ CFLAGS=$_SAVE_CFLAGS ++ # piggy back on $MOZ_SYSTEM_NSPR to set a variable for the nspr check for js.pc ++ PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr >= $NSPR_MINVER" ++elif test -n "$JS_POSIX_NSPR"; then ++ PKGCONF_REQUIRES_PRIVATE= ++fi ++ ++ ++fi # _IS_OUTER_CONFIGURE ++ ++ ++ ++if test -n "$JS_STANDALONE"; then ++ ZLIB_DIR=yes ++fi ++ ++ ++ ++MOZZLIB=1.2.3 ++ ++# Check whether --with-system-zlib or --without-system-zlib was given. ++if test "${with_system_zlib+set}" = set; then ++ withval="$with_system_zlib" ++ ZLIB_DIR=$withval ++fi ++ ++ ++if test -z "$MOZ_ZLIB_LIBS$MOZ_ZLIB_CFLAGS$SKIP_LIBRARY_CHECKS"; then ++ _SAVE_CFLAGS=$CFLAGS ++ _SAVE_LDFLAGS=$LDFLAGS ++ _SAVE_LIBS=$LIBS ++ ++ if test -n "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "yes"; then ++ MOZ_ZLIB_CFLAGS="-I${ZLIB_DIR}/include" ++ MOZ_ZLIB_LIBS="-L${ZLIB_DIR}/lib" ++ CFLAGS="$MOZ_ZLIB_CFLAGS $CFLAGS" ++ LDFLAGS="$MOZ_ZLIB_LIBS $LDFLAGS" ++ fi ++ if test -z "$ZLIB_DIR" -o "$ZLIB_DIR" = no; then ++ MOZ_SYSTEM_ZLIB= ++ else ++ echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6 ++echo "configure:7127: checking for gzread in -lz" >&5 ++ac_lib_var=`echo z'_'gzread | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lz $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ MOZ_SYSTEM_ZLIB=1 MOZ_ZLIB_LIBS="$MOZ_ZLIB_LIBS -lz" ++else ++ echo "$ac_t""no" 1>&6 ++MOZ_SYSTEM_ZLIB= ++fi ++ ++ if test "$MOZ_SYSTEM_ZLIB" = 1; then ++ MOZZLIBNUM=`echo $MOZZLIB | awk -F. '{printf "0x%x\n", ((($1 * 16 + $2) * 16) + $3) * 16 + $4}'` ++ cat > conftest.$ac_ext < ++ #include ++ #include ++int main() { ++ #if ZLIB_VERNUM < $MOZZLIBNUM ++ #error "Insufficient zlib version ($MOZZLIBNUM required)." ++ #endif ++; return 0; } ++EOF ++if { (eval echo configure:7181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ MOZ_SYSTEM_ZLIB=1 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ { echo "configure: error: Insufficient zlib version for --with-system-zlib ($MOZZLIB required)" 1>&2; echo "configure: error: Insufficient zlib version for --with-system-zlib ($MOZZLIB required)" 1>&5; exit 1; } ++fi ++rm -f conftest* ++ fi ++ fi ++ CFLAGS=$_SAVE_CFLAGS ++ LDFLAGS=$_SAVE_LDFLAGS ++ LIBS=$_SAVE_LIBS ++fi ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ZLIB_IN_MOZGLUE"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' ZLIB_IN_MOZGLUE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define ZLIB_IN_MOZGLUE 1 ++EOF ++ ++fi ++ ++ ++ ++# Application ++ ++# Components and Features ++ ++# Individual module options ++ ++# Debugging and Optimizations ++ ++ ++# Use value from moz.configure if one is defined. Else use our computed ++# value. ++if test -n "${MOZ_CONFIGURE_OPTIMIZE_FLAGS}"; then ++ MOZ_OPTIMIZE_FLAGS=${MOZ_CONFIGURE_OPTIMIZE_FLAGS} ++fi ++ ++ ++ if test "$GNU_CC"; then ++ MOZ_ENABLE_FRAME_PTR="-fno-omit-frame-pointer -funwind-tables" ++ MOZ_DISABLE_FRAME_PTR="-fomit-frame-pointer -funwind-tables" ++ else ++ case "$target" in ++ aarch64-windows*) ++ if test "$CC_TYPE" = "clang-cl"; then ++ MOZ_ENABLE_FRAME_PTR="-Xclang -mdisable-fp-elim" ++ MOZ_DISABLE_FRAME_PTR="-Xclang -mdisable-fp-elim" ++ else ++ MOZ_ENABLE_FRAME_PTR="-Oy-" ++ MOZ_DISABLE_FRAME_PTR="-Oy" ++ fi ++ ;; ++ *-mingw32*) ++ MOZ_ENABLE_FRAME_PTR="-Oy-" ++ MOZ_DISABLE_FRAME_PTR="-Oy" ++ ;; ++ esac ++ fi ++ ++ # If we are debugging, profiling, using sanitizers, or on win32 we want a ++ # frame pointer. It is not required to enable frame pointers on AArch64 ++ # Windows, but we enable it for compatibility with ETW. ++ if test -z "$MOZ_OPTIMIZE" -o \ ++ -n "$MOZ_PROFILING" -o \ ++ -n "$MOZ_DEBUG" -o \ ++ -n "$MOZ_MSAN" -o \ ++ -n "$MOZ_ASAN" -o \ ++ -n "$MOZ_UBSAN" -o \ ++ "$OS_ARCH:$CPU_ARCH" = "WINNT:x86" -o \ ++ "$OS_ARCH:$CPU_ARCH" = "WINNT:aarch64"; then ++ MOZ_FRAMEPTR_FLAGS="$MOZ_ENABLE_FRAME_PTR" ++ else ++ MOZ_FRAMEPTR_FLAGS="$MOZ_DISABLE_FRAME_PTR" ++ fi ++ ++ ++if test "$COMPILE_ENVIRONMENT"; then ++if test -n "$MOZ_OPTIMIZE"; then ++ echo $ac_n "checking for valid optimization flags""... $ac_c" 1>&6 ++echo "configure:7273: checking for valid optimization flags" >&5 ++ _SAVE_CFLAGS=$CFLAGS ++ CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS" ++ cat > conftest.$ac_ext < ++int main() { ++printf("Hello World\n"); ++; return 0; } ++EOF ++if { (eval echo configure:7284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ _results=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ _results=no ++fi ++rm -f conftest* ++ echo "$ac_t""$_results" 1>&6 ++ if test "$_results" = "no"; then ++ { echo "configure: error: These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS" 1>&2; echo "configure: error: These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS" 1>&5; exit 1; } ++ fi ++ CFLAGS=$_SAVE_CFLAGS ++ if test -n "$MOZ_LTO" -a -n "$CLANG_CC"; then ++ # When using llvm-based LTO, non numeric optimization levels are ++ # not supported by the linker, so force the linker to use -O2 ( ++ # which doesn't influence the level compilation units are actually ++ # compiled at). ++ case " $MOZ_OPTIMIZE_FLAGS " in ++ *\ -Os\ *|*\ -Oz\ *) ++ MOZ_OPTIMIZE_LDFLAGS="$MOZ_OPTIMIZE_LDFLAGS -O2" ++ ;; ++ esac ++ fi ++fi ++fi # COMPILE_ENVIRONMENT ++ ++ ++ ++ ++ ++ ++if test -z "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then ++ WARNINGS_AS_ERRORS='' ++fi ++ ++ ++if test "$JS_STANDALONE" -a -z "$MOZ_MEMORY"; then ++ MOZ_GLUE_IN_PROGRAM= ++else ++ case "${OS_TARGET}" in ++ Android|WINNT|Darwin) ++ MOZ_GLUE_IN_PROGRAM= ++ ;; ++ *) ++ MOZ_GLUE_IN_PROGRAM=1 ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_GLUE_IN_PROGRAM ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_GLUE_IN_PROGRAM 1 ++EOF ++ ++ ;; ++ esac ++fi ++ ++if test "$MOZ_MEMORY"; then ++ case "${target}" in ++ *-mingw*) ++ export MOZ_NO_DEBUG_RTL=1 ++ ;; ++ esac ++fi ++ ++ ++if test -n "$MOZ_INSTRUMENTS"; then ++ LIBS="$LIBS -framework CoreFoundation" ++fi ++ ++if test -n "$MOZ_DEBUG"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' JS_DEBUG ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define JS_DEBUG 1 ++EOF ++ ++fi ++ ++ ++if test -n "$COMPILE_ENVIRONMENT"; then ++ ++ ++if test -n "$ENABLE_CLANG_PLUGIN"; then ++ if test -z "${CLANG_CC}${CLANG_CL}"; then ++ { echo "configure: error: Can't use clang plugin without clang." 1>&2; echo "configure: error: Can't use clang plugin without clang." 1>&5; exit 1; } ++ fi ++ ++ echo $ac_n "checking for llvm-config""... $ac_c" 1>&6 ++echo "configure:7376: checking for llvm-config" >&5 ++ if test -z "$LLVMCONFIG"; then ++ if test -n "$CLANG_CL"; then ++ CXX_COMPILER="$(dirname "$CXX")/clang" ++ else ++ CXX_COMPILER="${CXX}" ++ fi ++ LLVMCONFIG=`$CXX_COMPILER -print-prog-name=llvm-config` ++ fi ++ ++ if test -z "$LLVMCONFIG"; then ++ LLVMCONFIG=`which llvm-config` ++ fi ++ ++ if test ! -x "$LLVMCONFIG"; then ++ echo "$ac_t""not found" 1>&6 ++ { echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&2; echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&5; exit 1; } ++ fi ++ ++ echo "$ac_t""$LLVMCONFIG" 1>&6 ++ ++ if test -z "$LLVMCONFIG"; then ++ { echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&2; echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&5; exit 1; } ++ fi ++ LLVM_CXXFLAGS=`$LLVMCONFIG --cxxflags | sed -e 's/-isysroot [^ ]*//' -e 's/-gcc-toolchain [^ ]*//'` ++ ++ LLVM_LDFLAGS=`$LLVMCONFIG --ldflags | tr '\n' ' '` ++ ++ if test "${HOST_OS_ARCH}" = "Darwin"; then ++ CLANG_LDFLAGS="-Wl,-flat_namespace -Wl,-undefined,suppress" ++ CLANG_LDFLAGS="$CLANG_LDFLAGS `$LLVMCONFIG --prefix`/lib/libclangASTMatchers.a" ++ LLVM_LDFLAGS=`echo "$LLVM_LDFLAGS" | sed -E 's/-L[^ ]+\/clang\/lib//'` ++ elif test "${HOST_OS_ARCH}" = "WINNT"; then ++ CLANG_LDFLAGS="clangASTMatchers.lib clang.lib" ++ else ++ CLANG_LDFLAGS="-lclangASTMatchers" ++ fi ++ ++ if test -n "$CLANG_CL"; then ++ LLVM_REPLACE_CXXFLAGS='' ++ for arg in $LLVM_CXXFLAGS; do ++ arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'` ++ LLVM_REPLACE_CXXFLAGS="$LLVM_REPLACE_CXXFLAGS $arg" ++ done ++ LLVM_CXXFLAGS="$LLVM_REPLACE_CXXFLAGS" ++ ++ LLVM_REPLACE_LDFLAGS='' ++ for arg in $LLVM_LDFLAGS; do ++ arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'` ++ LLVM_REPLACE_LDFLAGS="$LLVM_REPLACE_LDFLAGS $arg" ++ done ++ LLVM_LDFLAGS="$LLVM_REPLACE_LDFLAGS" ++ ++ CLANG_REPLACE_LDFLAGS='' ++ for arg in $CLANG_LDFLAGS; do ++ arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'` ++ CLANG_REPLACE_LDFLAGS="$CLANG_REPLACE_LDFLAGS $arg" ++ done ++ CLANG_LDFLAGS="$CLANG_REPLACE_LDFLAGS" ++ fi ++ ++ echo $ac_n "checking for new ASTMatcher API""... $ac_c" 1>&6 ++echo "configure:7438: checking for new ASTMatcher API" >&5 ++if eval "test \"`echo '$''{'ac_cv_have_new_ASTMatcher_names'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++ ++ ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ _SAVE_CXXFLAGS="$CXXFLAGS" ++ _SAVE_CPPFLAGS="$CPPFLAGS" ++ _SAVE_CXX="$CXX" ++ _SAVE_MACOSX_DEPLOYMENT_TARGET="$MACOSX_DEPLOYMENT_TARGET" ++ unset MACOSX_DEPLOYMENT_TARGET ++ CXXFLAGS="${LLVM_CXXFLAGS}" ++ CPPFLAGS="" ++ CXX="${HOST_CXX}" ++ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ac_cv_have_new_ASTMatcher_names="yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_have_new_ASTMatcher_names="no" ++fi ++rm -f conftest* ++ CXX="$_SAVE_CXX" ++ CPPFLAGS="$_SAVE_CPPFLAGS" ++ CXXFLAGS="$_SAVE_CXXFLAGS" ++ export MACOSX_DEPLOYMENT_TARGET="$_SAVE_MACOSX_DEPLOYMENT_TARGET" ++ ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++fi ++ ++echo "$ac_t""$ac_cv_have_new_ASTMatcher_names" 1>&6 ++ if test "$ac_cv_have_new_ASTMatcher_names" = "yes"; then ++ LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DHAVE_NEW_ASTMATCHER_NAMES" ++ fi ++ ++ echo $ac_n "checking for has with ignoringParenImpCasts""... $ac_c" 1>&6 ++echo "configure:7505: checking for has with ignoringParenImpCasts" >&5 ++if eval "test \"`echo '$''{'ac_cv_has_accepts_ignoringParenImpCasts'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++ ++ ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ _SAVE_CXXFLAGS="$CXXFLAGS" ++ _SAVE_CPPFLAGS="$CPPFLAGS" ++ _SAVE_CXX="$CXX" ++ _SAVE_MACOSX_DEPLOYMENT_TARGET="$MACOSX_DEPLOYMENT_TARGET" ++ unset MACOSX_DEPLOYMENT_TARGET ++ CXXFLAGS="${LLVM_CXXFLAGS}" ++ CPPFLAGS="" ++ CXX="${HOST_CXX}" ++ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ac_cv_has_accepts_ignoringParenImpCasts="yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_has_accepts_ignoringParenImpCasts="no" ++fi ++rm -f conftest* ++ CXX="$_SAVE_CXX" ++ CPPFLAGS="$_SAVE_CPPFLAGS" ++ CXXFLAGS="$_SAVE_CXXFLAGS" ++ export MACOSX_DEPLOYMENT_TARGET="$_SAVE_MACOSX_DEPLOYMENT_TARGET" ++ ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++fi ++ ++echo "$ac_t""$ac_cv_has_accepts_ignoringParenImpCasts" 1>&6 ++ if test "$ac_cv_has_accepts_ignoringParenImpCasts" = "yes"; then ++ LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DHAS_ACCEPTS_IGNORINGPARENIMPCASTS" ++ fi ++ ++ CLANG_PLUGIN_FLAGS="-Xclang -load -Xclang $CLANG_PLUGIN -Xclang -add-plugin -Xclang moz-check" ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_CLANG_PLUGIN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_CLANG_PLUGIN 1 ++EOF ++ ++fi ++ ++if test -n "$ENABLE_MOZSEARCH_PLUGIN"; then ++ if test -z "${ENABLE_CLANG_PLUGIN}"; then ++ { echo "configure: error: Can't use mozsearch plugin without --enable-clang-plugin." 1>&2; echo "configure: error: Can't use mozsearch plugin without --enable-clang-plugin." 1>&5; exit 1; } ++ fi ++ ++ OBJDIR="$(dirname $(dirname $(dirname $CLANG_PLUGIN)))" ++ ++ CLANG_PLUGIN_FLAGS="$CLANG_PLUGIN_FLAGS -Xclang -add-plugin -Xclang mozsearch-index" ++ ++ CLANG_PLUGIN_FLAGS="$CLANG_PLUGIN_FLAGS -Xclang -plugin-arg-mozsearch-index -Xclang $_topsrcdir" ++ CLANG_PLUGIN_FLAGS="$CLANG_PLUGIN_FLAGS -Xclang -plugin-arg-mozsearch-index -Xclang $OBJDIR/mozsearch_index" ++ CLANG_PLUGIN_FLAGS="$CLANG_PLUGIN_FLAGS -Xclang -plugin-arg-mozsearch-index -Xclang $OBJDIR" ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_MOZSEARCH_PLUGIN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_MOZSEARCH_PLUGIN 1 ++EOF ++ ++fi ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++fi # COMPILE_ENVIRONMENT ++ ++ ++# Check whether --with-sixgill or --without-sixgill was given. ++if test "${with_sixgill+set}" = set; then ++ withval="$with_sixgill" ++ SIXGILL_PATH=$withval ++else ++ SIXGILL_PATH= ++fi ++ ++ ++if test -n "$SIXGILL_PATH"; then ++ if test ! -x "$SIXGILL_PATH/bin/xdbfind" || test ! -f "$SIXGILL_PATH/gcc/xgill.so" || test ! -x "$SIXGILL_PATH/scripts/wrap_gcc/g++"; then ++ { echo "configure: error: The sixgill plugin and binaries are not at the specified path." 1>&2; echo "configure: error: The sixgill plugin and binaries are not at the specified path." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++# Check whether --enable-strip or --disable-strip was given. ++if test "${enable_strip+set}" = set; then ++ enableval="$enable_strip" ++ if test "$enableval" = "yes"; then ++ ENABLE_STRIP=1 ++ elif test "$enableval" = "no"; then ++ ENABLE_STRIP= ++ else ++ { echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++# Check whether --enable-install-strip or --disable-install-strip was given. ++if test "${enable_install_strip+set}" = set; then ++ enableval="$enable_install_strip" ++ if test "$enableval" = "yes"; then ++ PKG_SKIP_STRIP= ++ elif test "$enableval" = "no"; then ++ PKG_SKIP_STRIP=1 ++ else ++ { echo "configure: error: Option, install-strip, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, install-strip, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++# Profiling and Instrumenting ++ ++if test -z "$SKIP_LIBRARY_CHECKS"; then ++ ++ ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ for ac_func in __cxa_demangle ++do ++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++echo "configure:7678: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef $ac_func ++/* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:7713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++HAVE_DEMANGLE= ++fi ++done ++ ++ ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++fi ++ ++ ++# Check whether --with-jitreport-granularity or --without-jitreport-granularity was given. ++if test "${with_jitreport_granularity+set}" = set; then ++ withval="$with_jitreport_granularity" ++ JITREPORT_GRANULARITY=$withval ++else ++ JITREPORT_GRANULARITY=3 ++fi ++ ++ ++cat >> confdefs.pytmp <> confdefs.h <&6 ++echo "configure:7779: checking for -pipe support" >&5 ++if test -n "$GNU_CC" -a -n "$GNU_CXX"; then ++ CFLAGS="$CFLAGS -pipe" ++ CXXFLAGS="$CXXFLAGS -pipe" ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++echo $ac_n "checking for tm_zone tm_gmtoff in struct tm""... $ac_c" 1>&6 ++echo "configure:7801: checking for tm_zone tm_gmtoff in struct tm" >&5 ++if eval "test \"`echo '$''{'ac_cv_struct_tm_zone_tm_gmtoff'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++int main() { ++struct tm tm; tm.tm_zone = 0; tm.tm_gmtoff = 1; ++; return 0; } ++EOF ++if { (eval echo configure:7813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ac_cv_struct_tm_zone_tm_gmtoff="yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_struct_tm_zone_tm_gmtoff="no" ++fi ++rm -f conftest* ++fi ++ ++echo "$ac_t""$ac_cv_struct_tm_zone_tm_gmtoff" 1>&6 ++if test "$ac_cv_struct_tm_zone_tm_gmtoff" = "yes" ; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_TM_ZONE_TM_GMTOFF ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_TM_ZONE_TM_GMTOFF 1 ++EOF ++ ++fi ++fi # ! SKIP_COMPILER_CHECKS ++ ++cat >> confdefs.pytmp <<\EOF ++ (''' CPP_THROW_NEW ''', r''' throw() ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define CPP_THROW_NEW throw() ++EOF ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++ ++ ++echo $ac_n "checking what kind of list files are supported by the linker""... $ac_c" 1>&6 ++echo "configure:7859: checking what kind of list files are supported by the linker" >&5 ++if eval "test \"`echo '$''{'EXPAND_LIBS_LIST_STYLE'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ echo "int main() {return 0;}" > conftest.${ac_ext} ++ if { ac_try='${CC-cc} -o conftest.${OBJ_SUFFIX} -c $MOZ_LTO_CFLAGS $CFLAGS $CPPFLAGS conftest.${ac_ext} 1>&5'; { (eval echo configure:7864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.${OBJ_SUFFIX}; then ++ echo "INPUT(conftest.${OBJ_SUFFIX})" > conftest.list ++ if test "$CC_TYPE" = "clang-cl"; then ++ link="$LINKER -OUT:conftest${ac_exeext}" ++ else ++ link="${CC-cc} -o conftest${ac_exeext}" ++ fi ++ if { ac_try='$link $MOZ_LTO_LDFLAGS $LDFLAGS conftest.list $LIBS 1>&5'; { (eval echo configure:7871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then ++ EXPAND_LIBS_LIST_STYLE=linkerscript ++ else ++ echo "conftest.${OBJ_SUFFIX}" > conftest.list ++ if { ac_try='$link $MOZ_LTO_LDFLAGS $LDFLAGS -Wl,-filelist,conftest.list $LIBS 1>&5'; { (eval echo configure:7875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then ++ EXPAND_LIBS_LIST_STYLE=filelist ++ elif { ac_try='$link $MOZ_LTO_LDFLAGS $LDFLAGS @conftest.list $LIBS 1>&5'; { (eval echo configure:7877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then ++ EXPAND_LIBS_LIST_STYLE=list ++ else ++ { echo "configure: error: Couldn't find one that works" 1>&2; echo "configure: error: Couldn't find one that works" 1>&5; exit 1; } ++ fi ++ fi ++ else ++ { echo "configure: error: couldn't compile a simple C file" 1>&2; echo "configure: error: couldn't compile a simple C file" 1>&5; exit 1; } ++ fi ++ rm -rf conftest* ++fi ++ ++echo "$ac_t""$EXPAND_LIBS_LIST_STYLE" 1>&6 ++ ++ ++ ++ ++ ++# Check whether --enable-readline or --disable-readline was given. ++if test "${enable_readline+set}" = set; then ++ enableval="$enable_readline" ++ if test "$enableval" = "yes"; then ++ JS_WANT_READLINE=1 ++ elif test "$enableval" = "no"; then ++ JS_WANT_READLINE= ++ else ++ { echo "configure: error: Option, readline, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, readline, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++JS_BUNDLED_EDITLINE= ++EDITLINE_LIBS= ++ ++case "$target" in ++*-mingw*) ++ NO_EDITLINE=1 ++ ;; ++*) ++ ;; ++esac ++ ++if test -z "$SKIP_LIBRARY_CHECKS" -a -z "$NO_EDITLINE"; then ++ if test -n "$JS_WANT_READLINE"; then ++ echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 ++echo "configure:7922: checking for readline in -lreadline" >&5 ++ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lreadline $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ EDITLINE_LIBS="-lreadline" ++else ++ echo "$ac_t""no" 1>&6 ++{ echo "configure: error: No system readline library found." 1>&2; echo "configure: error: No system readline library found." 1>&5; exit 1; } ++fi ++ ++ else ++ JS_BUNDLED_EDITLINE=1 ++ fi ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' EDITLINE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define EDITLINE 1 ++EOF ++ ++fi ++ ++ ++ ++# Standalone module options (Not for building Mozilla) ++ ++ ++# Check whether --with-qemu-exe or --without-qemu-exe was given. ++if test "${with_qemu_exe+set}" = set; then ++ withval="$with_qemu_exe" ++ QEMU_EXE=$withval ++fi ++ ++ ++# Check whether --with-cross-lib or --without-cross-lib was given. ++if test "${with_cross_lib+set}" = set; then ++ withval="$with_cross_lib" ++ CROSS_LIB=$withval ++else ++ CROSS_LIB=/usr/$target ++fi ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++_INTL_API=yes ++ ++ ++ ++MOZ_SYSTEM_ICU= ++# Check whether --with-system-icu or --without-system-icu was given. ++if test "${with_system_icu+set}" = set; then ++ withval="$with_system_icu" ++ if test "$withval" = "yes"; then ++ MOZ_SYSTEM_ICU=1 ++ elif test "$withval" = "no"; then ++ : ++ else ++ { echo "configure: error: Option, system-icu, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, system-icu, does not take an argument ($withval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++if test -n "$MOZ_SYSTEM_ICU"; then ++ succeeded=no ++ ++ if test -z "$PKG_CONFIG"; then ++ echo "*** The pkg-config script could not be found. Make sure it is" ++ echo "*** in your path, or set the PKG_CONFIG environment variable" ++ echo "*** to the full path to pkg-config." ++ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." ++ else ++ PKG_CONFIG_MIN_VERSION=0.9.0 ++ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then ++ echo $ac_n "checking for icu-i18n >= 63.1""... $ac_c" 1>&6 ++echo "configure:8052: checking for icu-i18n >= 63.1" >&5 ++ ++ if $PKG_CONFIG --exists "icu-i18n >= 63.1" ; then ++ echo "$ac_t""yes" 1>&6 ++ succeeded=yes ++ ++ echo $ac_n "checking MOZ_ICU_CFLAGS""... $ac_c" 1>&6 ++echo "configure:8059: checking MOZ_ICU_CFLAGS" >&5 ++ MOZ_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-i18n >= 63.1"` ++ echo "$ac_t""$MOZ_ICU_CFLAGS" 1>&6 ++ ++ echo $ac_n "checking MOZ_ICU_LIBS""... $ac_c" 1>&6 ++echo "configure:8064: checking MOZ_ICU_LIBS" >&5 ++ ## Remove evil flags like -Wl,--export-dynamic ++ MOZ_ICU_LIBS="`$PKG_CONFIG --libs \"icu-i18n >= 63.1\" |sed s/-Wl,--export-dynamic//g`" ++ echo "$ac_t""$MOZ_ICU_LIBS" 1>&6 ++ else ++ MOZ_ICU_CFLAGS="" ++ MOZ_ICU_LIBS="" ++ ## If we have a custom action on failure, don't print errors, but ++ ## do set a variable so people can do so. ++ MOZ_ICU_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "icu-i18n >= 63.1"` ++ echo $MOZ_ICU_PKG_ERRORS ++ fi ++ ++ ++ ++ else ++ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." ++ echo "*** See http://www.freedesktop.org/software/pkgconfig" ++ fi ++ fi ++ ++ if test $succeeded = yes; then ++ : ++ else ++ if test "$COMPILE_ENVIRONMENT"; then ++ { echo "configure: error: Library requirements (icu-i18n >= 63.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (icu-i18n >= 63.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; } ++ fi ++ fi ++ ++ CFLAGS="$CFLAGS $MOZ_ICU_CFLAGS" ++ CXXFLAGS="$CXXFLAGS $MOZ_ICU_CFLAGS" ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_SYSTEM_ICU ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_SYSTEM_ICU 1 ++EOF ++ ++fi ++ ++ ++ ++# Check whether --with-intl-api or --without-intl-api was given. ++if test "${with_intl_api+set}" = set; then ++ withval="$with_intl_api" ++ _INTL_API=$withval ++fi ++ ++ ++ENABLE_INTL_API= ++EXPOSE_INTL_API= ++case "$_INTL_API" in ++no) ++ ;; ++build) ++ ENABLE_INTL_API=1 ++ ;; ++yes) ++ ENABLE_INTL_API=1 ++ EXPOSE_INTL_API=1 ++ ;; ++*) ++ { echo "configure: error: Invalid value passed to --with-intl-api: $_INTL_API" 1>&2; echo "configure: error: Invalid value passed to --with-intl-api: $_INTL_API" 1>&5; exit 1; } ++ ;; ++esac ++ ++if test -n "$ENABLE_INTL_API"; then ++ USE_ICU=1 ++fi ++ ++if test -n "$EXPOSE_INTL_API"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' EXPOSE_INTL_API ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define EXPOSE_INTL_API 1 ++EOF ++ ++fi ++ ++if test -n "$ENABLE_INTL_API"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' ENABLE_INTL_API ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define ENABLE_INTL_API 1 ++EOF ++ ++fi ++ ++if test -n "$USE_ICU"; then ++ icudir="$_topsrcdir/intl/icu/source" ++ if test ! -d "$icudir"; then ++ icudir="$_topsrcdir/../../intl/icu/source" ++ if test ! -d "$icudir"; then ++ { echo "configure: error: Cannot find the ICU directory" 1>&2; echo "configure: error: Cannot find the ICU directory" 1>&5; exit 1; } ++ fi ++ fi ++ ++ version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` ++ if test x"$version" = x; then ++ { echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&2; echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&5; exit 1; } ++ fi ++ MOZ_ICU_VERSION="$version" ++ ++ # TODO: the l is actually endian-dependent ++ # We could make this set as 'l' or 'b' for little or big, respectively, ++ # but we'd need to check in a big-endian version of the file. ++ if test -z "$ICU_DATA_FILE"; then ++ ICU_DATA_FILE="icudt${version}l.dat" ++ fi ++fi ++ ++ ++ ++ ++ ++ ++if test -n "$USE_ICU"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' U_USING_ICU_NAMESPACE ''', r''' 0 ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define U_USING_ICU_NAMESPACE 0 ++EOF ++ ++ ++ if test -z "$MOZ_SYSTEM_ICU"; then ++ case "$OS_TARGET:$CPU_ARCH" in ++ WINNT:aarch64) ++ ;; ++ *) ++ if test -z "$YASM" -a -z "$GNU_AS" -a "$COMPILE_ENVIRONMENT"; then ++ { echo "configure: error: Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api" 1>&2; echo "configure: error: Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api" 1>&5; exit 1; } ++ fi ++ ;; ++ esac ++ cat >> confdefs.pytmp <<\EOF ++ (''' U_STATIC_IMPLEMENTATION ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define U_STATIC_IMPLEMENTATION 1 ++EOF ++ ++ fi ++fi ++ ++ ++CFLAGS=`echo \ ++ $_COMPILATION_CFLAGS \ ++ $CFLAGS` ++ ++CXXFLAGS=`echo \ ++ $_WARNINGS_CXXFLAGS \ ++ $_COMPILATION_CXXFLAGS \ ++ $CXXFLAGS` ++ ++COMPILE_CFLAGS=`echo \ ++ $_DEFINES_CFLAGS \ ++ $COMPILE_CFLAGS` ++ ++COMPILE_CXXFLAGS=`echo \ ++ $_DEFINES_CXXFLAGS \ ++ $COMPILE_CXXFLAGS` ++ ++HOST_CFLAGS=`echo \ ++ $_WARNINGS_HOST_CFLAGS \ ++ $_COMPILATION_HOST_CFLAGS \ ++ $HOST_CFLAGS` ++ ++HOST_CXXFLAGS=`echo \ ++ $_WARNINGS_HOST_CXXFLAGS \ ++ $_COMPILATION_HOST_CXXFLAGS \ ++ $HOST_CXXFLAGS` ++ ++ ++ ++OS_CFLAGS="$CFLAGS" ++OS_CXXFLAGS="$CXXFLAGS" ++OS_CPPFLAGS="$CPPFLAGS" ++OS_COMPILE_CFLAGS="$COMPILE_CFLAGS" ++OS_COMPILE_CXXFLAGS="$COMPILE_CXXFLAGS" ++OS_LDFLAGS="$LDFLAGS" ++OS_LIBS="$LIBS" ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++for ac_func in posix_fadvise posix_fallocate ++do ++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++echo "configure:8279: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef $ac_func ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:8311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++done ++ ++ ++ ++ ++if test -n "$MOZ_DEV_EDITION"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_DEV_EDITION ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_DEV_EDITION 1 ++EOF ++ ++fi ++ ++# Allow influencing configure with a defines.sh script. ++. "${srcdir}/build/defines.sh" ++ ++# If we're not building a release build, define EARLY_BETA_OR_EARLIER if it is ++# set in defines.sh ++if test "$BUILDING_RELEASE"; then ++ # Override value in defines.sh, if any ++ EARLY_BETA_OR_EARLIER= ++elif test "$EARLY_BETA_OR_EARLIER"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' EARLY_BETA_OR_EARLIER ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define EARLY_BETA_OR_EARLIER 1 ++EOF ++ ++fi ++ ++ ++BINDGEN_SYSTEM_FLAGS="$_BINDGEN_CFLAGS $NSPR_CFLAGS" ++ ++ ++ ++ ++ ++ ++ ++ ++MALLOC_HEADERS="malloc.h malloc_np.h malloc/malloc.h sys/malloc.h" ++MALLOC_H= ++ ++for file in $MALLOC_HEADERS; do ++ ac_safe=`echo "$file" | sed 'y%./+-%__p_%'` ++ echo $ac_n "checking for $file""... $ac_c" 1>&6 ++echo "configure:8385: checking for $file" >&5 ++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++int main() { ++ ++; return 0; } ++EOF ++if { (eval echo configure:8398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=no" ++fi ++rm -f conftest* ++fi ++ ++ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ MALLOC_H=$file ++ else ++ echo "$ac_t""no" 1>&6 ++ ++ fi ++ ++ if test "$MALLOC_H" != ""; then ++ cat >> confdefs.pytmp < ''') ++EOF ++cat >> confdefs.h < ++EOF ++ ++ break ++ fi ++done ++ ++for ac_func in strndup posix_memalign memalign ++do ++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++echo "configure:8433: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef $ac_func ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:8465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++done ++ ++ ++for ac_func in malloc_usable_size ++do ++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++echo "configure:8496: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef $ac_func ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:8528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++done ++ ++MALLOC_USABLE_SIZE_CONST_PTR=const ++if test -n "$HAVE_MALLOC_H"; then ++ echo $ac_n "checking whether malloc_usable_size definition can use const argument""... $ac_c" 1>&6 ++echo "configure:8558: checking whether malloc_usable_size definition can use const argument" >&5 ++ cat > conftest.$ac_ext < ++ #include ++ size_t malloc_usable_size(const void *ptr); ++int main() { ++return malloc_usable_size(0); ++; return 0; } ++EOF ++if { (eval echo configure:8569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++ MALLOC_USABLE_SIZE_CONST_PTR= ++fi ++rm -f conftest* ++fi ++cat >> confdefs.pytmp <> confdefs.h <&6 ++echo "configure:8591: checking for valloc in malloc.h" >&5 ++cat > conftest.$ac_ext < ++EOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ egrep "valloc" >/dev/null 2>&1; then ++ rm -rf conftest* ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_VALLOC ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_VALLOC 1 ++EOF ++ ++ echo "$ac_t""yes" 1>&6 ++else ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++fi ++rm -f conftest* ++ ++ ++echo $ac_n "checking for valloc in unistd.h""... $ac_c" 1>&6 ++echo "configure:8616: checking for valloc in unistd.h" >&5 ++cat > conftest.$ac_ext < ++EOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ egrep "valloc" >/dev/null 2>&1; then ++ rm -rf conftest* ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_VALLOC ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_VALLOC 1 ++EOF ++ ++ echo "$ac_t""yes" 1>&6 ++else ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++fi ++rm -f conftest* ++ ++ ++echo $ac_n "checking for _aligned_malloc in malloc.h""... $ac_c" 1>&6 ++echo "configure:8641: checking for _aligned_malloc in malloc.h" >&5 ++cat > conftest.$ac_ext < ++EOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ egrep "_aligned_malloc" >/dev/null 2>&1; then ++ rm -rf conftest* ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_ALIGNED_MALLOC ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_ALIGNED_MALLOC 1 ++EOF ++ ++ echo "$ac_t""yes" 1>&6 ++else ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++fi ++rm -f conftest* ++ ++ ++ ++ ++ ++ ++ ++if test -n "$JS_STANDALONE"; then ++MOZ_APP_NAME="mozjs" ++JS_LIBRARY_NAME="mozjs-$MOZILLA_SYMBOLVERSION" ++else ++JS_LIBRARY_NAME="mozjs" ++fi ++JS_CONFIG_LIBS="$NSPR_LIBS $LIBS" ++if test -n "$GNU_CC"; then ++JS_CONFIG_MOZ_JS_LIBS='-L${libdir} -l${JS_LIBRARY_NAME}' ++else ++JS_CONFIG_MOZ_JS_LIBS='${libdir}/${JS_LIBRARY_NAME}.lib' ++fi ++ ++ ++ ++ ++# Avoid using obsolete NSPR features ++cat >> confdefs.pytmp <<\EOF ++ (''' NO_NSPR_10_SUPPORT ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define NO_NSPR_10_SUPPORT 1 ++EOF ++ ++ ++top_srcdir=$srcdir ++ ++ ++trap '' 1 2 15 ++cat > confcache <<\EOF ++# This file is a shell script that caches the results of configure ++# tests run on this system so they can be shared between configure ++# scripts and configure runs. It is not useful on other systems. ++# If it contains results you don't want to keep, you may remove or edit it. ++# ++# By default, configure uses ./config.cache as the cache file, ++# creating it if it does not exist already. You can give configure ++# the --cache-file=FILE option to use a different cache file; that is ++# what configure does when it calls configure scripts in ++# subdirectories, so they share the cache. ++# Giving --cache-file=/dev/null disables caching, for debugging configure. ++# config.status only pays attention to the cache file if you give it the ++# --recheck option to rerun configure. ++# ++EOF ++# The following way of writing the cache mishandles newlines in values, ++# but we know of no workaround that is simple, portable, and efficient. ++# So, don't put newlines in cache variables' values. ++# Ultrix sh set writes to stderr and can't be redirected directly, ++# and sets the high bit in the cache file unless we assign to the vars. ++(set) 2>&1 | ++ case `(ac_space=' '; set | grep ac_space) 2>&1` in ++ *ac_space=\ *) ++ # `set' does not quote correctly, so add quotes (double-quote substitution ++ # turns \\\\ into \\, and sed turns \\ into \). ++ sed -n \ ++ -e "s/'/'\\\\''/g" \ ++ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ++ ;; ++ *) ++ # `set' quotes correctly as required by POSIX, so do not add quotes. ++ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ++ ;; ++ esac >> confcache ++if cmp -s $cache_file confcache; then ++ : ++else ++ if test -w $cache_file; then ++ echo "updating cache $cache_file" ++ cat confcache > $cache_file ++ else ++ echo "not updating unwritable cache $cache_file" ++ fi ++fi ++rm -f confcache ++ ++ ++trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 ++: ${CONFIG_STATUS=./config.data} ++ ++echo creating $CONFIG_STATUS ++ ++cat > $CONFIG_STATUS <> $CONFIG_STATUS ++rm confdefs.pytmp confdefs.h ++ ++cat >> $CONFIG_STATUS <<\EOF ++] ++ ++substs = [ ++EOF ++ ++sed 's/$/,/' >> $CONFIG_STATUS <> $CONFIG_STATUS ++done ++ ++cat >> $CONFIG_STATUS <<\EOF ++] ++ ++non_global_defines = [ ++EOF ++ ++if test -n "$_NON_GLOBAL_ACDEFINES"; then ++ for var in $_NON_GLOBAL_ACDEFINES; do ++ echo " '$var'," >> $CONFIG_STATUS ++ done ++fi ++ ++cat >> $CONFIG_STATUS <&6 +-echo "configure:12466: checking for $ac_func" >&5 ++echo "configure:12468: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:12500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -12526,7 +12528,7 @@ + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $XCFLAGS" + cat > conftest.$ac_ext < +@@ -12545,7 +12547,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:12549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:12551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : + else + echo "configure: failed program was:" >&5 diff --git a/meta-gnome/recipes-support/mozjs/mozjs_60.2.3.bb b/meta-gnome/recipes-support/mozjs/mozjs_60.2.3.bb index 4088d03..a7cb210 100644 --- a/meta-gnome/recipes-support/mozjs/mozjs_60.2.3.bb +++ b/meta-gnome/recipes-support/mozjs/mozjs_60.2.3.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonk LICENSE = "MPL-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf" -SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/m/mozjs60/mozjs60_60.2.3.orig.tar.xz \ +SRC_URI = "http://ftp.debian.org/debian/pool/main/m/mozjs60/mozjs60_60.2.3.orig.tar.xz \ file://0001-do-not-create-python-environment-new.patch \ file://0002-do-not-include-requireddefines.patch \ file://0003-fix-coredump-caused-by-getenv.patch \ diff --git a/meta-gnome/recipes-support/mozjs68/mozjs68/0001-Yocto-build-fixes.patch b/meta-gnome/recipes-support/mozjs68/mozjs68/0001-Yocto-build-fixes.patch new file mode 100644 index 0000000..49e996e --- /dev/null +++ b/meta-gnome/recipes-support/mozjs68/mozjs68/0001-Yocto-build-fixes.patch @@ -0,0 +1,156 @@ +From 2dc4bb1511f98ba495d2d279886e495a8f38b79a Mon Sep 17 00:00:00 2001 +From: David McKinney +Date: Thu, 2 Jul 2020 17:07:39 +0000 +Subject: [PATCH] Yocto build fixes + +--- + build/moz.configure/init.configure | 18 ----------- + build/moz.configure/rust.configure | 49 +++++++++++++++++++++++------- + configure.py | 10 +++++- + js/src/build/js.pc.in | 2 +- + 4 files changed, 48 insertions(+), 31 deletions(-) + +diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure +index c77260403..6113f620f 100644 +--- a/build/moz.configure/init.configure ++++ b/build/moz.configure/init.configure +@@ -256,24 +256,6 @@ def virtualenv_python(env_python, build_env, mozconfig, help): + else: + python = sys.executable + +- if not manager.up_to_date(python): +- log.info('Creating Python environment') +- manager.build(python) +- +- python = normsep(manager.python_path) +- +- if not normsep(sys.executable).startswith(normsep(virtualenvs_root)): +- log.info('Reexecuting in the virtualenv') +- if env_python: +- del os.environ['PYTHON'] +- # One would prefer to use os.execl, but that's completely borked on +- # Windows. +- sys.exit(subprocess.call([python] + sys.argv)) +- +- # We are now in the virtualenv +- if not distutils.sysconfig.get_python_lib(): +- die('Could not determine python site packages directory') +- + return python + + +diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure +index 9647cbc40..1d68639af 100644 +--- a/build/moz.configure/rust.configure ++++ b/build/moz.configure/rust.configure +@@ -46,15 +46,15 @@ def unwrap_rustup(prog, name): + @imports('os') + def unwrap(prog, name): + def from_rustup_which(): +- out = check_cmd_output('rustup', 'which', name, +- executable=prog).rstrip() ++ # out = check_cmd_output(name, "-V", ++ # executable=prog).rstrip() + # If for some reason the above failed to return something, keep the + # PROG we found originally. +- if out: +- log.info('Actually using \'%s\'', out) +- return out ++ # if out: ++ # log.info('Actually using \'%s\'', out) ++ # return out + +- log.info('No `rustup which` output, using \'%s\'', prog) ++ # log.info('No `rustup which` output, using \'%s\'', prog) + return prog + + (retcode, stdout, stderr) = get_cmd_output(prog, '+stable') +@@ -217,6 +217,27 @@ def rust_supported_targets(rustc): + per_os[key] = t + return namespace(per_os=per_os, per_raw_os=per_raw_os) + ++option(env='RUST_HOST', ++ nargs=1, ++ help='Define the system type for Rust performing the build') ++ ++@depends('RUST_HOST') ++@checking('rust host', lambda host: host) ++def rust_host_env(value): ++ if value: ++ return value[0] ++ ++ ++option(env='RUST_TARGET', ++ nargs=1, ++ help='Define the system type for Rust where the resulting executables will be used') ++ ++@depends('RUST_TARGET') ++@checking('rust target', lambda target: target) ++def rust_target_env(value): ++ if value: ++ return value[0] ++ + + @template + def rust_triple_alias(host_or_target): +@@ -227,9 +248,9 @@ def rust_triple_alias(host_or_target): + assert host_or_target in {host, target} + + host_or_target_str = {host: 'host', target: 'target'}[host_or_target] +- +- @depends(rustc, host_or_target, c_compiler, rust_supported_targets, +- arm_target, when=rust_compiler) ++ @depends(rustc, host_or_target, rust_host_env, rust_target_env, ++ c_compiler, rust_supported_targets, arm_target, ++ when=rust_compiler) + @checking('for rust %s triplet' % host_or_target_str) + @imports('os') + @imports('subprocess') +@@ -237,8 +258,14 @@ def rust_triple_alias(host_or_target): + @imports(_from='mozbuild.shellutil', _import='quote') + @imports(_from='tempfile', _import='mkstemp') + @imports(_from='textwrap', _import='dedent') +- def rust_target(rustc, host_or_target, compiler_info, +- rust_supported_targets, arm_target): ++ def rust_target(rustc, host_or_target, rust_host_env, rust_target_env, ++ compiler_info, rust_supported_targets, arm_target): ++ ++ specified_targets = {"host": rust_host_env, "target": rust_target_env} ++ specified_target = specified_targets[host_or_target_str] ++ if (specified_target): ++ return specified_target ++ + # Rust's --target options are similar to, but not exactly the same + # as, the autoconf-derived targets we use. An example would be that + # Rust uses distinct target triples for targetting the GNU C++ ABI +diff --git a/configure.py b/configure.py +index 913dd35f9..51cda0cef 100644 +--- a/configure.py ++++ b/configure.py +@@ -13,7 +13,15 @@ import textwrap + + + base_dir = os.path.abspath(os.path.dirname(__file__)) +-sys.path.insert(0, os.path.join(base_dir, 'python', 'mozbuild')) ++sys.path.insert(0, os.path.join(base_dir, 'config')) ++def get_immediate_subdirectories(a_dir): ++ return [name for name in os.listdir(a_dir) ++ if os.path.isdir(os.path.join(a_dir, name))] ++for s in ["python", "testing/mozbase", "third_party/python"]: ++ sub_dir = os.path.join(base_dir, s) ++ for module_dir in get_immediate_subdirectories(sub_dir): ++ sys.path.insert(0, os.path.join(sub_dir, module_dir)) ++ + from mozbuild.configure import ( + ConfigureSandbox, + TRACE, +diff --git a/js/src/build/js.pc.in b/js/src/build/js.pc.in +index d40deb174..e2044c20a 100644 +--- a/js/src/build/js.pc.in ++++ b/js/src/build/js.pc.in +@@ -11,4 +11,4 @@ Libs: -L${libdir} -l@JS_LIBRARY_NAME@ + # Use -isystem for includes rather than -I, to mark them as "system headers" + # that don't generate warning diagnostics. For justification, see + # https://bugzilla.mozilla.org/show_bug.cgi?id=1539036 +-Cflags: -include ${includedir}/@JS_LIBRARY_NAME@/js/RequiredDefines.h -isystem ${includedir}/@JS_LIBRARY_NAME@ ++Cflags: -I${includedir}/@JS_LIBRARY_NAME@ diff --git a/meta-gnome/recipes-support/mozjs68/mozjs68/0001-do-not-create-python-environment-new.patch b/meta-gnome/recipes-support/mozjs68/mozjs68/0001-do-not-create-python-environment-new.patch new file mode 100644 index 0000000..b42aff3 --- /dev/null +++ b/meta-gnome/recipes-support/mozjs68/mozjs68/0001-do-not-create-python-environment-new.patch @@ -0,0 +1,74 @@ +From 9b32dd063116186d679578cff24366b19874699d Mon Sep 17 00:00:00 2001 +From: Bruce Leidl +Date: Thu, 4 Apr 2019 15:30:20 -0400 +Subject: [PATCH] do not create python environment new + +--- + build/moz.configure/init.configure | 18 ------------------ + configure.py | 10 +++++++++- + js/src/old-configure | 2 +- + 3 files changed, 10 insertions(+), 20 deletions(-) + +diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure +index 83b8d705..79d04b60 100644 +--- a/build/moz.configure/init.configure ++++ b/build/moz.configure/init.configure +@@ -257,24 +257,6 @@ def virtualenv_python(env_python, build_env, mozconfig, help): + else: + python = sys.executable + +- if not manager.up_to_date(python): +- log.info('Creating Python environment') +- manager.build(python) +- +- python = normsep(manager.python_path) +- +- if python != normsep(sys.executable): +- log.info('Reexecuting in the virtualenv') +- if env_python: +- del os.environ['PYTHON'] +- # One would prefer to use os.execl, but that's completely borked on +- # Windows. +- sys.exit(subprocess.call([python] + sys.argv)) +- +- # We are now in the virtualenv +- if not distutils.sysconfig.get_python_lib(): +- die('Could not determine python site packages directory') +- + return python + + +diff --git a/configure.py b/configure.py +index 9b2bae9a..771e34e3 100644 +--- a/configure.py ++++ b/configure.py +@@ -12,7 +12,15 @@ import textwrap + + + base_dir = os.path.abspath(os.path.dirname(__file__)) +-sys.path.insert(0, os.path.join(base_dir, 'python', 'mozbuild')) ++sys.path.insert(0, os.path.join(base_dir, 'config')) ++def get_immediate_subdirectories(a_dir): ++ return [name for name in os.listdir(a_dir) ++ if os.path.isdir(os.path.join(a_dir, name))] ++for s in ["python", "testing/mozbase", "third_party/python"]: ++ sub_dir = os.path.join(base_dir, s) ++ for module_dir in get_immediate_subdirectories(sub_dir): ++ sys.path.insert(0, os.path.join(sub_dir, module_dir)) ++ + from mozbuild.configure import ConfigureSandbox + from mozbuild.makeutil import Makefile + from mozbuild.pythonutil import iter_modules_in_path +diff --git a/js/src/old-configure b/js/src/old-configure +index 2c579b77..830b6361 100644 +--- a/js/src/old-configure ++++ b/js/src/old-configure +@@ -9974,7 +9974,7 @@ if test "$JS_STANDALONE"; then + + if test "$no_recursion" != yes; then + trap '' EXIT +- if ! $PYTHON $_topsrcdir/build/subconfigure.py --list subconfigures --skip skip_subconfigures; then ++ if ! PYTHONPATH=$_topsrcdir/python/mozbuild/ $PYTHON $_topsrcdir/build/subconfigure.py --list subconfigures --skip skip_subconfigures; then + exit 1 + fi + fi diff --git a/meta-gnome/recipes-support/mozjs68/mozjs68/0002-do-not-include-requireddefines.patch b/meta-gnome/recipes-support/mozjs68/mozjs68/0002-do-not-include-requireddefines.patch new file mode 100644 index 0000000..f4e4b2b --- /dev/null +++ b/meta-gnome/recipes-support/mozjs68/mozjs68/0002-do-not-include-requireddefines.patch @@ -0,0 +1,19 @@ +From 39df72a4abd14d65f888bda6045d4255bd5ce2fc Mon Sep 17 00:00:00 2001 +From: Bruce Leidl +Date: Thu, 4 Apr 2019 15:31:45 -0400 +Subject: [PATCH] do not include requireddefines + +--- + js/src/build/js.pc.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/js/src/build/js.pc.in b/js/src/build/js.pc.in +index 2eae393a..c2dea62d 100644 +--- a/js/src/build/js.pc.in ++++ b/js/src/build/js.pc.in +@@ -8,4 +8,4 @@ Description: The Mozilla library for JavaScript + Version: @MOZILLA_VERSION@ + @PKGCONF_REQUIRES_PRIVATE@ + Libs: -L${libdir} -l@JS_LIBRARY_NAME@ +-Cflags: -include ${includedir}/@JS_LIBRARY_NAME@/js/RequiredDefines.h -I${includedir}/@JS_LIBRARY_NAME@ ++Cflags: -I${includedir}/@JS_LIBRARY_NAME@ diff --git a/meta-gnome/recipes-support/mozjs68/mozjs68/0003-fix-coredump-caused-by-getenv.patch b/meta-gnome/recipes-support/mozjs68/mozjs68/0003-fix-coredump-caused-by-getenv.patch new file mode 100644 index 0000000..b3ff38e --- /dev/null +++ b/meta-gnome/recipes-support/mozjs68/mozjs68/0003-fix-coredump-caused-by-getenv.patch @@ -0,0 +1,21 @@ +From 5d3bd1a8d7cdbbf193079ed6500070276b7c8c70 Mon Sep 17 00:00:00 2001 +From: Bruce Leidl +Date: Thu, 4 Apr 2019 15:33:10 -0400 +Subject: [PATCH] fix coredump caused by getenv + +--- + mozglue/misc/TimeStamp.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/mozglue/misc/TimeStamp.cpp b/mozglue/misc/TimeStamp.cpp +index c123bd71..b849254b 100644 +--- a/mozglue/misc/TimeStamp.cpp ++++ b/mozglue/misc/TimeStamp.cpp +@@ -11,6 +11,7 @@ + #include "mozilla/TimeStamp.h" + #include + #include ++#include + + namespace mozilla { + diff --git a/meta-gnome/recipes-support/mozjs68/mozjs68/0004-new-fix-cannot-find-link.patch b/meta-gnome/recipes-support/mozjs68/mozjs68/0004-new-fix-cannot-find-link.patch new file mode 100644 index 0000000..b2e4de4 --- /dev/null +++ b/meta-gnome/recipes-support/mozjs68/mozjs68/0004-new-fix-cannot-find-link.patch @@ -0,0 +1,22 @@ +From 2f0d0585ffc7640e3e10a7260991b33a0783bbd4 Mon Sep 17 00:00:00 2001 +From: Bruce Leidl +Date: Thu, 4 Apr 2019 15:34:56 -0400 +Subject: [PATCH] new fix cannot find link + +--- + build/moz.configure/checks.configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build/moz.configure/checks.configure b/build/moz.configure/checks.configure +index dc140a42..516652da 100644 +--- a/build/moz.configure/checks.configure ++++ b/build/moz.configure/checks.configure +@@ -133,7 +133,7 @@ def check_prog(var, progs, what=None, input=None, allow_missing=False, + + for prog in value or progs: + log.debug('%s: Trying %s', var.lower(), quote(prog)) +- result = find_program(prog, paths) ++ result = find_program(prog.split()[0], paths) + if result: + return result + diff --git a/meta-gnome/recipes-support/mozjs68/mozjs68/0005-do-not-use-autoconf-213-to-refresh-old-configure.patch b/meta-gnome/recipes-support/mozjs68/mozjs68/0005-do-not-use-autoconf-213-to-refresh-old-configure.patch new file mode 100644 index 0000000..3a0709f --- /dev/null +++ b/meta-gnome/recipes-support/mozjs68/mozjs68/0005-do-not-use-autoconf-213-to-refresh-old-configure.patch @@ -0,0 +1,45 @@ +From 8d26c3717dfb677d8c7a739e26352c1c5ef7838a Mon Sep 17 00:00:00 2001 +From: Bruce Leidl +Date: Thu, 4 Apr 2019 15:39:26 -0400 +Subject: [PATCH] do not use autoconf 213 to refresh old configure + +--- + build/moz.configure/old.configure | 4 ++-- + js/src/old-configure | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure +index 17d0c5bf..436fcc5e 100644 +--- a/build/moz.configure/old.configure ++++ b/build/moz.configure/old.configure +@@ -33,7 +33,7 @@ def autoconf(mozconfig, autoconf): + autoconf = autoconf[0] if autoconf else None + + for ac in (mozconfig_autoconf, autoconf, 'autoconf-2.13', 'autoconf2.13', +- 'autoconf213'): ++ 'autoconf213', 'autoconf'): + if ac: + autoconf = find_program(ac) + if autoconf: +@@ -87,7 +87,7 @@ def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell, + old_configure = os.path.join(old_configure_dir, 'js', 'src', + os.path.basename(old_configure)) + +- refresh = True ++ refresh = False + if exists(old_configure): + mtime = getmtime(old_configure) + aclocal = os.path.join(build_env.topsrcdir, 'build', 'autoconf', +diff --git a/js/src/old-configure b/js/src/old-configure +index 830b6361..129b131f 100644 +--- a/js/src/old-configure ++++ b/js/src/old-configure +@@ -587,7 +587,7 @@ if test -z "$srcdir"; then + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. +- srcdir=$ac_confdir ++ srcdir="$ac_confdir/../../" + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi diff --git a/meta-gnome/recipes-support/mozjs68/mozjs68/avoid-running-autoconf2.13.patch b/meta-gnome/recipes-support/mozjs68/mozjs68/avoid-running-autoconf2.13.patch new file mode 100644 index 0000000..46d9a40 --- /dev/null +++ b/meta-gnome/recipes-support/mozjs68/mozjs68/avoid-running-autoconf2.13.patch @@ -0,0 +1,30 @@ +commit 88652e61a4cfaf20130b73713468c8dc1dcf224a +Author: Takuro Ashie +Date: Sun Jul 14 20:59:21 2019 +0900 + + Avoid running autoconf2.13 + + Use pre-generated old-configure instead. + + Upstream-Status: Inappropriate [OE-specific] + +diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure +index 7286b23ce86a..87702b520806 100644 +--- a/build/moz.configure/old.configure ++++ b/build/moz.configure/old.configure +@@ -20,6 +20,7 @@ option(env='AUTOCONF', nargs=1, help='Path to autoconf 2.13') + @imports(_from='os.path', _import='exists') + @imports('re') + def autoconf(mozconfig, autoconf): ++ return "autoconf2.13" + mozconfig_autoconf = None + if mozconfig['path']: + make_extra = mozconfig['make_extra'] +@@ -115,6 +116,7 @@ def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell, + break + else: + refresh = False ++ refresh = False + + if refresh: + log.info('Refreshing %s with %s', old_configure, autoconf) diff --git a/meta-gnome/recipes-support/mozjs68/mozjs68/pre-generated-old-configure.patch b/meta-gnome/recipes-support/mozjs68/mozjs68/pre-generated-old-configure.patch new file mode 100644 index 0000000..e5a5d5f --- /dev/null +++ b/meta-gnome/recipes-support/mozjs68/mozjs68/pre-generated-old-configure.patch @@ -0,0 +1,9047 @@ +diff -Nur '--exclude=mozconfig' '--exclude=firefox-build-dir' '--exclude=*.pyc' firefox-68.0-bak/js/src/old-configure firefox-68.0/js/src/old-configure +--- firefox-68.0-bak/js/src/old-configure 1970-01-01 09:00:00.000000000 +0900 ++++ firefox-68.0/js/src/old-configure 2019-07-14 20:32:27.318145584 +0900 +@@ -0,0 +1,8987 @@ ++#! /bin/sh ++ ++if test `uname -s | grep -c MINGW 2>/dev/null` != "0"; then ++ msyshost=1 ++fi ++ ++. ./old-configure.vars ++ ++# Guess values for system-dependent variables and create Makefiles. ++# Generated automatically using autoconf version 2.13 ++# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. ++# ++# This configure script is free software; the Free Software Foundation ++# gives unlimited permission to copy, distribute and modify it. ++ ++# Defaults: ++ac_help= ++ac_default_prefix=/usr/local ++# Any additions from configure.in: ++ac_help="$ac_help ++ --with-ios-sdk=TYPE ++ Type of iOS SDK to use (iphonesimulator, iphoneos) ++ and optionally version (like iphoneos8.2)" ++ac_help="$ac_help ++ --enable-ios-target=VER (default=8.0) ++ Set the minimum iOS version needed at runtime" ++ac_help="$ac_help ++ --with-x use the X Window System" ++ac_help="$ac_help ++ --enable-memory-sanitizer Enable Memory Sanitizer (default=no)" ++ac_help="$ac_help ++ --enable-thread-sanitizer Enable Thread Sanitizer (default=no)" ++ac_help="$ac_help ++ --enable-signed-overflow-sanitizer Enable UndefinedBehavior Sanitizer (Signed Integer Overflow Parts, default=no)" ++ac_help="$ac_help ++ --enable-unsigned-overflow-sanitizer Enable UndefinedBehavior Sanitizer (Unsigned Integer Overflow Parts, default=no)" ++ac_help="$ac_help ++ --with-debug-label=LABELS ++ Define DEBUG_ for each comma-separated ++ value given." ++ac_help="$ac_help ++ --enable-cpp-rtti Enable C++ RTTI " ++ac_help="$ac_help ++ --disable-icf Disable Identical Code Folding" ++ac_help="$ac_help ++ --enable-dtrace build with dtrace support if available (default=no)" ++ac_help="$ac_help ++ --with-nspr-cflags=FLAGS ++ Pass FLAGS to CC when building code that uses NSPR. ++ Use this when there's no accurate nspr-config ++ script available. This is the case when building ++ SpiderMonkey as part of the Mozilla tree: the ++ top-level configure script computes NSPR flags ++ that accomodate the quirks of that environment." ++ac_help="$ac_help ++ --with-nspr-libs=LIBS Pass LIBS to LD when linking code that uses NSPR. ++ See --with-nspr-cflags for more details." ++ac_help="$ac_help ++ --enable-nspr-build Build NSPR from source tree" ++ac_help="$ac_help ++ --with-system-nspr Use an NSPR that is already built and installed. ++ Use the 'nspr-config' script in the current path, ++ or look for the script in the directories given with ++ --with-nspr-exec-prefix or --with-nspr-prefix. ++ (Those flags are only checked if you specify ++ --with-system-nspr.)" ++ac_help="$ac_help ++ --enable-posix-nspr-emulation ++ Enable emulation of NSPR for POSIX systems" ++ac_help="$ac_help ++ --with-nspr-prefix=PFX Prefix where NSPR is installed" ++ac_help="$ac_help ++ --with-nspr-exec-prefix=PFX ++ Exec prefix where NSPR is installed" ++ac_help="$ac_help ++ --with-system-zlib[=PFX] ++ Use system libz [installed at prefix PFX]" ++ac_help="$ac_help ++ --with-sixgill=path/to/sixgill ++ Enable static checking of code using sixgill" ++ac_help="$ac_help ++ --enable-strip Enable stripping of libs & executables " ++ac_help="$ac_help ++ --enable-install-strip Enable stripping of libs & executables when packaging " ++ac_help="$ac_help ++ --jitreport-granularity=N ++ Default granularity at which to report JIT code ++ to external tools ++ 0 - no info ++ 1 - code ranges for whole functions only ++ 2 - per-line information ++ 3 - per-op information" ++ac_help="$ac_help ++ --enable-readline Link js shell to system readline library" ++ac_help="$ac_help ++ --with-qemu-exe=path Use path as an arm emulator on host platforms" ++ac_help="$ac_help ++ --with-cross-lib=dir Use dir as the location for arm libraries" ++ac_help="$ac_help ++ --with-system-icu ++ Use system ICU (located with pkgconfig)" ++ac_help="$ac_help ++ --with-intl-api, --with-intl-api=build, --without-intl-api ++ Determine the status of the ECMAScript Internationalization API. The first ++ (or lack of any of these) builds and exposes the API. The second builds it ++ but doesn't use ICU or expose the API to script. The third doesn't build ++ ICU at all." ++ ++# Initialize some variables set by options. ++# The variables have the same names as the options, with ++# dashes changed to underlines. ++build=NONE ++cache_file=./config.cache ++exec_prefix=NONE ++host=NONE ++no_create= ++nonopt=NONE ++no_recursion= ++prefix=NONE ++program_prefix=NONE ++program_suffix=NONE ++program_transform_name=s,x,x, ++silent= ++site= ++srcdir= ++target=NONE ++verbose= ++x_includes=NONE ++x_libraries=NONE ++bindir='${exec_prefix}/bin' ++sbindir='${exec_prefix}/sbin' ++libexecdir='${exec_prefix}/libexec' ++datadir='${prefix}/share' ++sysconfdir='${prefix}/etc' ++sharedstatedir='${prefix}/com' ++localstatedir='${prefix}/var' ++libdir='${exec_prefix}/lib' ++includedir='${prefix}/include' ++oldincludedir='/usr/include' ++infodir='${prefix}/info' ++mandir='${prefix}/man' ++ ++# Initialize some other variables. ++subdirs= ++MFLAGS= MAKEFLAGS= ++SHELL=${CONFIG_SHELL-/bin/sh} ++# Maximum number of lines to put in a shell here document. ++ac_max_here_lines=12 ++ ++ac_prev= ++for ac_option ++do ++ ++ # If the previous option needs an argument, assign it. ++ if test -n "$ac_prev"; then ++ eval "$ac_prev=\$ac_option" ++ ac_prev= ++ continue ++ fi ++ ++ case "$ac_option" in ++ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; ++ *) ac_optarg= ;; ++ esac ++ ++ # Accept the important Cygnus configure options, so we can diagnose typos. ++ ++ case "$ac_option" in ++ ++ -bindir | --bindir | --bindi | --bind | --bin | --bi) ++ ac_prev=bindir ;; ++ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) ++ bindir="$ac_optarg" ;; ++ ++ -build | --build | --buil | --bui | --bu) ++ ac_prev=build ;; ++ -build=* | --build=* | --buil=* | --bui=* | --bu=*) ++ build="$ac_optarg" ;; ++ ++ -cache-file | --cache-file | --cache-fil | --cache-fi \ ++ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ++ ac_prev=cache_file ;; ++ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ ++ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) ++ cache_file="$ac_optarg" ;; ++ ++ -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ++ ac_prev=datadir ;; ++ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ ++ | --da=*) ++ datadir="$ac_optarg" ;; ++ ++ -disable-* | --disable-*) ++ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` ++ # Reject names that are not valid shell variable names. ++ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then ++ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; echo "configure: error: $ac_feature: invalid feature name" 1>&5; exit 1; } ++ fi ++ ac_feature=`echo $ac_feature| sed 's/-/_/g'` ++ eval "enable_${ac_feature}=no" ;; ++ ++ -enable-* | --enable-*) ++ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` ++ # Reject names that are not valid shell variable names. ++ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then ++ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; echo "configure: error: $ac_feature: invalid feature name" 1>&5; exit 1; } ++ fi ++ ac_feature=`echo $ac_feature| sed 's/-/_/g'` ++ case "$ac_option" in ++ *=*) ;; ++ *) ac_optarg=yes ;; ++ esac ++ eval "enable_${ac_feature}='$ac_optarg'" ;; ++ ++ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ ++ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ ++ | --exec | --exe | --ex) ++ ac_prev=exec_prefix ;; ++ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ ++ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ ++ | --exec=* | --exe=* | --ex=*) ++ exec_prefix="$ac_optarg" ;; ++ ++ -gas | --gas | --ga | --g) ++ # Obsolete; use --with-gas. ++ with_gas=yes ;; ++ ++ -help | --help | --hel | --he) ++ # Omit some internal or obsolete options to make the list less imposing. ++ # This message is too long to be a string in the A/UX 3.1 sh. ++ cat << EOF ++Usage: configure [options] [host] ++Options: [defaults in brackets after descriptions] ++Configuration: ++ --cache-file=FILE cache test results in FILE ++ --help print this message ++ --no-create do not create output files ++ --quiet, --silent do not print \`checking...' messages ++ --version print the version of autoconf that created configure ++Directory and file names: ++ --prefix=PREFIX install architecture-independent files in PREFIX ++ [$ac_default_prefix] ++ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX ++ [same as prefix] ++ --bindir=DIR user executables in DIR [EPREFIX/bin] ++ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] ++ --libexecdir=DIR program executables in DIR [EPREFIX/libexec] ++ --datadir=DIR read-only architecture-independent data in DIR ++ [PREFIX/share] ++ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] ++ --sharedstatedir=DIR modifiable architecture-independent data in DIR ++ [PREFIX/com] ++ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] ++ --libdir=DIR object code libraries in DIR [EPREFIX/lib] ++ --includedir=DIR C header files in DIR [PREFIX/include] ++ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] ++ --infodir=DIR info documentation in DIR [PREFIX/info] ++ --mandir=DIR man documentation in DIR [PREFIX/man] ++ --srcdir=DIR find the sources in DIR [configure dir or ..] ++ --program-prefix=PREFIX prepend PREFIX to installed program names ++ --program-suffix=SUFFIX append SUFFIX to installed program names ++ --program-transform-name=PROGRAM ++ run sed PROGRAM on installed program names ++EOF ++ cat << EOF ++Host type: ++ --build=BUILD configure for building on BUILD [BUILD=HOST] ++ --host=HOST configure for HOST [guessed] ++ --target=TARGET configure for TARGET [TARGET=HOST] ++Features and packages: ++ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) ++ --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ++ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] ++ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ++ --x-includes=DIR X include files are in DIR ++ --x-libraries=DIR X library files are in DIR ++EOF ++ if test -n "$ac_help"; then ++ echo "--enable and --with options recognized:$ac_help" ++ fi ++ exit 0 ;; ++ ++ -host | --host | --hos | --ho) ++ ac_prev=host ;; ++ -host=* | --host=* | --hos=* | --ho=*) ++ host="$ac_optarg" ;; ++ ++ -includedir | --includedir | --includedi | --included | --include \ ++ | --includ | --inclu | --incl | --inc) ++ ac_prev=includedir ;; ++ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ ++ | --includ=* | --inclu=* | --incl=* | --inc=*) ++ includedir="$ac_optarg" ;; ++ ++ -infodir | --infodir | --infodi | --infod | --info | --inf) ++ ac_prev=infodir ;; ++ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) ++ infodir="$ac_optarg" ;; ++ ++ -libdir | --libdir | --libdi | --libd) ++ ac_prev=libdir ;; ++ -libdir=* | --libdir=* | --libdi=* | --libd=*) ++ libdir="$ac_optarg" ;; ++ ++ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ ++ | --libexe | --libex | --libe) ++ ac_prev=libexecdir ;; ++ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ ++ | --libexe=* | --libex=* | --libe=*) ++ libexecdir="$ac_optarg" ;; ++ ++ -localstatedir | --localstatedir | --localstatedi | --localstated \ ++ | --localstate | --localstat | --localsta | --localst \ ++ | --locals | --local | --loca | --loc | --lo) ++ ac_prev=localstatedir ;; ++ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ ++ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ ++ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) ++ localstatedir="$ac_optarg" ;; ++ ++ -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ++ ac_prev=mandir ;; ++ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) ++ mandir="$ac_optarg" ;; ++ ++ -nfp | --nfp | --nf) ++ # Obsolete; use --without-fp. ++ with_fp=no ;; ++ ++ -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ++ | --no-cr | --no-c) ++ no_create=yes ;; ++ ++ -no-recursion | --no-recursion | --no-recursio | --no-recursi \ ++ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ++ no_recursion=yes ;; ++ ++ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ ++ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ ++ | --oldin | --oldi | --old | --ol | --o) ++ ac_prev=oldincludedir ;; ++ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ ++ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ ++ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) ++ oldincludedir="$ac_optarg" ;; ++ ++ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ++ ac_prev=prefix ;; ++ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ++ prefix="$ac_optarg" ;; ++ ++ -program-prefix | --program-prefix | --program-prefi | --program-pref \ ++ | --program-pre | --program-pr | --program-p) ++ ac_prev=program_prefix ;; ++ -program-prefix=* | --program-prefix=* | --program-prefi=* \ ++ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) ++ program_prefix="$ac_optarg" ;; ++ ++ -program-suffix | --program-suffix | --program-suffi | --program-suff \ ++ | --program-suf | --program-su | --program-s) ++ ac_prev=program_suffix ;; ++ -program-suffix=* | --program-suffix=* | --program-suffi=* \ ++ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) ++ program_suffix="$ac_optarg" ;; ++ ++ -program-transform-name | --program-transform-name \ ++ | --program-transform-nam | --program-transform-na \ ++ | --program-transform-n | --program-transform- \ ++ | --program-transform | --program-transfor \ ++ | --program-transfo | --program-transf \ ++ | --program-trans | --program-tran \ ++ | --progr-tra | --program-tr | --program-t) ++ ac_prev=program_transform_name ;; ++ -program-transform-name=* | --program-transform-name=* \ ++ | --program-transform-nam=* | --program-transform-na=* \ ++ | --program-transform-n=* | --program-transform-=* \ ++ | --program-transform=* | --program-transfor=* \ ++ | --program-transfo=* | --program-transf=* \ ++ | --program-trans=* | --program-tran=* \ ++ | --progr-tra=* | --program-tr=* | --program-t=*) ++ program_transform_name="$ac_optarg" ;; ++ ++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ ++ | -silent | --silent | --silen | --sile | --sil) ++ silent=yes ;; ++ ++ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ++ ac_prev=sbindir ;; ++ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ ++ | --sbi=* | --sb=*) ++ sbindir="$ac_optarg" ;; ++ ++ -sharedstatedir | --sharedstatedir | --sharedstatedi \ ++ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ ++ | --sharedst | --shareds | --shared | --share | --shar \ ++ | --sha | --sh) ++ ac_prev=sharedstatedir ;; ++ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ ++ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ ++ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ ++ | --sha=* | --sh=*) ++ sharedstatedir="$ac_optarg" ;; ++ ++ -site | --site | --sit) ++ ac_prev=site ;; ++ -site=* | --site=* | --sit=*) ++ site="$ac_optarg" ;; ++ ++ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ++ ac_prev=srcdir ;; ++ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ++ srcdir="$ac_optarg" ;; ++ ++ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ ++ | --syscon | --sysco | --sysc | --sys | --sy) ++ ac_prev=sysconfdir ;; ++ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ ++ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) ++ sysconfdir="$ac_optarg" ;; ++ ++ -target | --target | --targe | --targ | --tar | --ta | --t) ++ ac_prev=target ;; ++ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) ++ target="$ac_optarg" ;; ++ ++ -v | -verbose | --verbose | --verbos | --verbo | --verb) ++ verbose=yes ;; ++ ++ -version | --version | --versio | --versi | --vers) ++ echo "configure generated by autoconf version 2.13" ++ exit 0 ;; ++ ++ -with-* | --with-*) ++ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` ++ # Reject names that are not valid shell variable names. ++ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then ++ { echo "configure: error: $ac_package: invalid package name" 1>&2; echo "configure: error: $ac_package: invalid package name" 1>&5; exit 1; } ++ fi ++ ac_package=`echo $ac_package| sed 's/-/_/g'` ++ case "$ac_option" in ++ *=*) ;; ++ *) ac_optarg=yes ;; ++ esac ++ eval "with_${ac_package}='$ac_optarg'" ;; ++ ++ -without-* | --without-*) ++ ac_package=`echo $ac_option|sed -e 's/-*without-//'` ++ # Reject names that are not valid shell variable names. ++ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then ++ { echo "configure: error: $ac_package: invalid package name" 1>&2; echo "configure: error: $ac_package: invalid package name" 1>&5; exit 1; } ++ fi ++ ac_package=`echo $ac_package| sed 's/-/_/g'` ++ eval "with_${ac_package}=no" ;; ++ ++ --x) ++ # Obsolete; use --with-x. ++ with_x=yes ;; ++ ++ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ ++ | --x-incl | --x-inc | --x-in | --x-i) ++ ac_prev=x_includes ;; ++ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ ++ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) ++ x_includes="$ac_optarg" ;; ++ ++ -x-libraries | --x-libraries | --x-librarie | --x-librari \ ++ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ++ ac_prev=x_libraries ;; ++ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ ++ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) ++ x_libraries="$ac_optarg" ;; ++ ++ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&5; exit 1; } ++ ;; ++ ++ *) ++ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then ++ echo "configure: warning: $ac_option: invalid host type" 1>&2 ++ fi ++ if test "x$nonopt" != xNONE; then ++ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; echo "configure: error: can only configure for one host and one target at a time" 1>&5; exit 1; } ++ fi ++ nonopt="$ac_option" ++ ;; ++ ++ esac ++done ++ ++if test -n "$ac_prev"; then ++ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&5; exit 1; } ++fi ++ ++if test -z "$srcdir"; then ++ srcdir=`dirname "$0"` ++fi ++srcdir="$srcdir/../.." ++trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 ++ ++# File descriptor usage: ++# 0 standard input ++# 1 file creation ++# 2 errors and warnings ++# 3 some systems may open it to /dev/tty ++# 4 used on the Kubota Titan ++# 6 checking for... messages and results ++# 5 compiler messages saved in config.log ++if test "$silent" = yes; then ++ exec 6>/dev/null ++else ++ exec 6>&1 ++fi ++exec 5>>${CONFIG_LOG=./config.log} ++ ++echo "\ ++This file contains any messages produced by compilers while ++running configure, to aid debugging if configure makes a mistake. ++" 1>&5 ++ ++# Strip out --no-create and --no-recursion so they do not pile up. ++# Also quote any args containing shell metacharacters. ++ac_configure_args= ++for ac_arg ++do ++ case "$ac_arg" in ++ -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ++ | --no-cr | --no-c) ;; ++ -no-recursion | --no-recursion | --no-recursio | --no-recursi \ ++ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; ++ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ++ ac_configure_args="$ac_configure_args '$ac_arg'" ;; ++ *) ac_configure_args="$ac_configure_args $ac_arg" ;; ++ esac ++done ++ ++# NLS nuisances. ++# Only set these to C if already set. These must not be set unconditionally ++# because not all systems understand e.g. LANG=C (notably SCO). ++# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! ++# Non-C LC_CTYPE values break the ctype check. ++if test "${LANG+set}" = set; then LANG=C; export LANG; fi ++if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi ++if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi ++if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi ++ ++# confdefs.h avoids OS command line length limits that DEFS can exceed. ++rm -rf conftest* confdefs.h ++# AIX cpp loses on an empty file, so make sure it contains at least a newline. ++echo > confdefs.h ++ ++# A filename unique to this package, relative to the directory that ++# configure is in, which we can look for to find out if srcdir is correct. ++ac_unique_file=js/src/jsapi.h ++ ++# Find the source files, if location was not specified. ++if test -z "$srcdir"; then ++ ac_srcdir_defaulted=yes ++ # Try the directory containing this script, then its parent. ++ ac_prog=$0 ++ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` ++ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. ++ srcdir=$ac_confdir ++ if test ! -r $srcdir/$ac_unique_file; then ++ srcdir=.. ++ fi ++else ++ ac_srcdir_defaulted=no ++fi ++if test ! -r $srcdir/$ac_unique_file; then ++ if test "$ac_srcdir_defaulted" = yes; then ++ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; echo "configure: error: can not find sources in $ac_confdir or .." 1>&5; exit 1; } ++ else ++ { echo "configure: error: can not find sources in $srcdir" 1>&2; echo "configure: error: can not find sources in $srcdir" 1>&5; exit 1; } ++ fi ++fi ++srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` ++ ++# Prefer explicitly selected file to automatically selected ones. ++if test -z "$CONFIG_SITE"; then ++ if test "x$prefix" != xNONE; then ++ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" ++ else ++ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" ++ fi ++fi ++for ac_site_file in $CONFIG_SITE; do ++ if test -r "$ac_site_file"; then ++ echo "loading site script $ac_site_file" ++ . "$ac_site_file" ++ fi ++done ++ ++if test -r "$cache_file"; then ++ echo "loading cache $cache_file" ++ . $cache_file ++else ++ echo "creating cache $cache_file" ++ > $cache_file ++fi ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ac_exeext= ++ac_objext=o ++if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then ++ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. ++ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ++ ac_n= ac_c=' ++' ac_t=' ' ++ else ++ ac_n=-n ac_c= ac_t= ++ fi ++else ++ ac_n= ac_c='\c' ac_t= ++fi ++ ++ ++ ++test "x$prefix" = xNONE && prefix=$ac_default_prefix ++# Let make expand exec_prefix. ++test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ++ ++ ++ac_aux_dir= ++for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do ++ if test -f $ac_dir/install-sh; then ++ ac_aux_dir=$ac_dir ++ ac_install_sh="$ac_aux_dir/install-sh -c" ++ break ++ elif test -f $ac_dir/install.sh; then ++ ac_aux_dir=$ac_dir ++ ac_install_sh="$ac_aux_dir/install.sh -c" ++ break ++ fi ++done ++if test -z "$ac_aux_dir"; then ++ { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&2; echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&5; exit 1; } ++fi ++ac_config_guess=$ac_aux_dir/config.guess ++ac_config_sub=$ac_aux_dir/config.sub ++ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. ++ ++ ++# Do some error checking and defaulting for the host and target type. ++# The inputs are: ++# configure --host=HOST --target=TARGET --build=BUILD NONOPT ++# ++# The rules are: ++# 1. You are not allowed to specify --host, --target, and nonopt at the ++# same time. ++# 2. Host defaults to nonopt. ++# 3. If nonopt is not specified, then host defaults to the current host, ++# as determined by config.guess. ++# 4. Target and build default to nonopt. ++# 5. If nonopt is not specified, then target and build default to host. ++ ++# The aliases save the names the user supplied, while $host etc. ++# will get canonicalized. ++case $host---$target---$nonopt in ++NONE---*---* | *---NONE---* | *---*---NONE) ;; ++*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; echo "configure: error: can only configure for one host and one target at a time" 1>&5; exit 1; } ;; ++esac ++ ++ ++# Make sure we can run config.sub. ++if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : ++else { echo "configure: error: can not run $ac_config_sub" 1>&2; echo "configure: error: can not run $ac_config_sub" 1>&5; exit 1; } ++fi ++ ++echo $ac_n "checking host system type""... $ac_c" 1>&6 ++echo "configure:680: checking host system type" >&5 ++ ++host_alias=$host ++case "$host_alias" in ++NONE) ++ case $nonopt in ++ NONE) ++ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : ++ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; echo "configure: error: can not guess host type; you must specify one" 1>&5; exit 1; } ++ fi ;; ++ *) host_alias=$nonopt ;; ++ esac ;; ++esac ++ ++host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` ++host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ++host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ++host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ++echo "$ac_t""$host" 1>&6 ++ ++echo $ac_n "checking target system type""... $ac_c" 1>&6 ++echo "configure:701: checking target system type" >&5 ++ ++target_alias=$target ++case "$target_alias" in ++NONE) ++ case $nonopt in ++ NONE) target_alias=$host_alias ;; ++ *) target_alias=$nonopt ;; ++ esac ;; ++esac ++ ++target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` ++target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ++target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ++target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ++echo "$ac_t""$target" 1>&6 ++ ++echo $ac_n "checking build system type""... $ac_c" 1>&6 ++echo "configure:719: checking build system type" >&5 ++ ++build_alias=$build ++case "$build_alias" in ++NONE) ++ case $nonopt in ++ NONE) build_alias=$host_alias ;; ++ *) build_alias=$nonopt ;; ++ esac ;; ++esac ++ ++build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` ++build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ++build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ++build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ++echo "$ac_t""$build" 1>&6 ++ ++test "$host_alias" != "$target_alias" && ++ test "$program_prefix$program_suffix$program_transform_name" = \ ++ NONENONEs,x,x, && ++ program_prefix=${target_alias}- ++ ++ ++CFLAGS="${CFLAGS=}" ++CPPFLAGS="${CPPFLAGS=}" ++CXXFLAGS="${CXXFLAGS=}" ++LDFLAGS="${LDFLAGS=}" ++HOST_CFLAGS="${HOST_CFLAGS=}" ++HOST_CXXFLAGS="${HOST_CXXFLAGS=}" ++HOST_LDFLAGS="${HOST_LDFLAGS=}" ++ ++_SUBDIR_CC="$CC" ++_SUBDIR_CXX="$CXX" ++_SUBDIR_CFLAGS="$CFLAGS" ++_SUBDIR_CPPFLAGS="$CPPFLAGS" ++_SUBDIR_CXXFLAGS="$CXXFLAGS" ++_SUBDIR_LDFLAGS="$LDFLAGS" ++_SUBDIR_HOST_CC="$HOST_CC" ++_SUBDIR_HOST_CFLAGS="$HOST_CFLAGS" ++_SUBDIR_HOST_CXXFLAGS="$HOST_CXXFLAGS" ++_SUBDIR_HOST_LDFLAGS="$HOST_LDFLAGS" ++_SUBDIR_CONFIG_ARGS="$ac_configure_args" ++ ++NSPR_VERSION=4 ++NSPR_MINVER=4.9.2 ++ ++W32API_VERSION=3.14 ++ ++MISSING_X= ++ ++USE_PTHREADS= ++_PTHREAD_LDFLAGS="" ++ ++LDFLAGS="$LDFLAGS $LINKER_LDFLAGS" ++ ++if test -z "$JS_STANDALONE"; then ++ autoconfmk=autoconf-js.mk ++fi ++ ++ ++if test -n "$JS_STANDALONE"; then ++ jsconfdefs=$_objdir/js/src/js-confdefs.h ++else ++ jsconfdefs=$_objdir/js-confdefs.h ++fi ++ ++ ++ ++case "$target" in ++*-android*|*-linuxandroid*) ++ directory_include_args="-isystem $android_system -isystem $android_sysroot/usr/include" ++ ++ # clang will do any number of interesting things with host tools unless we tell ++ # it to use the NDK tools. ++ extra_opts="-gcc-toolchain $(dirname $(dirname $TOOLCHAIN_PREFIX))" ++ CPPFLAGS="$extra_opts -D__ANDROID_API__=$android_version $CPPFLAGS" ++ ASFLAGS="$extra_opts $ASFLAGS" ++ LDFLAGS="$extra_opts $LDFLAGS" ++ ++ CPPFLAGS="$directory_include_args $CPPFLAGS" ++ CFLAGS="-fno-short-enums -fno-exceptions $CFLAGS" ++ CXXFLAGS="-fno-short-enums -fno-exceptions $CXXFLAGS $stlport_cppflags" ++ ASFLAGS="$directory_include_args -DANDROID $ASFLAGS" ++ ++ LDFLAGS="-L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS" ++ ANDROID_PLATFORM="${android_platform}" ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' ANDROID ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define ANDROID 1 ++EOF ++ ++ ++ ++ ;; ++esac ++ ++ ++ ++case "$target" in ++*-apple-darwin*) ++ ++ ++# Check whether --with-ios-sdk or --without-ios-sdk was given. ++if test "${with_ios_sdk+set}" = set; then ++ withval="$with_ios_sdk" ++ ios_sdk=$withval ++fi ++ ++ ++# Check whether --enable-ios-target or --disable-ios-target was given. ++if test "${enable_ios_target+set}" = set; then ++ enableval="$enable_ios_target" ++ _IOS_TARGET=$enableval ++fi ++ ++_IOS_TARGET_DEFAULT=8.0 ++ ++case "$target" in ++arm*-apple-darwin*) ++ if test -z "$ios_sdk" -o "$ios_sdk" = "yes"; then ++ ios_sdk=iphoneos ++ fi ++ case "$ios_sdk" in ++ iphoneos*) ++ ios_target_arg="-miphoneos-version-min" ++ ;; ++ *) ++ { echo "configure: error: Only 'iphoneos' SDKs are valid when targeting iOS device, don't know what to do with '$ios_sdk'." 1>&2; echo "configure: error: Only 'iphoneos' SDKs are valid when targeting iOS device, don't know what to do with '$ios_sdk'." 1>&5; exit 1; } ++ ;; ++ esac ++ ;; ++*-apple-darwin*) ++ ios_target_arg="-mios-simulator-version-min" ++ case "$ios_sdk" in ++ # Empty SDK is okay, this might be an OS X desktop build. ++ ""|iphonesimulator*) ++ ;; ++ # Default to iphonesimulator ++ yes) ++ ios_sdk=iphonesimulator ++ ;; ++ *) ++ { echo "configure: error: Only 'iphonesimulator' SDKs are valid when targeting iOS simulator." 1>&2; echo "configure: error: Only 'iphonesimulator' SDKs are valid when targeting iOS simulator." 1>&5; exit 1; } ++ ;; ++ esac ++ ;; ++esac ++ ++ ++if test -n "$ios_sdk"; then ++ if test -z "$_IOS_TARGET"; then ++ _IOS_TARGET=$_IOS_TARGET_DEFAULT ++ ios_target_arg="${ios_target_arg}=${_IOS_TARGET}" ++ fi ++ # Ensure that xcrun knows where this SDK is. ++ ios_sdk_path=`xcrun --sdk $ios_sdk --show-sdk-path 2>/dev/null` ++ _ret=$? ++ if test $_ret -ne 0; then ++ { echo "configure: error: iOS SDK '$ios_sdk' could not be found." 1>&2; echo "configure: error: iOS SDK '$ios_sdk' could not be found." 1>&5; exit 1; } ++ fi ++ MOZ_IOS=1 ++ export HOST_CC=clang ++ export HOST_CXX=clang++ ++ # Add isysroot, arch, and ios target arguments ++ case "$target_cpu" in ++ arm*) ++ ARGS="-arch armv7" ++ ;; ++ *) ++ # Unfortunately simulator builds need this. ++ export CROSS_COMPILE=1 ++ ;; ++ esac ++ ARGS=" $ARGS -isysroot $ios_sdk_path $ios_target_arg" ++ # Now find our tools ++ ++ ++_prog_name=clang ++ ++echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 ++echo "configure:902: checking for $_prog_name in iOS SDK" >&5 ++if eval "test \"`echo '$''{'ac_cv_ios_path_CC'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` ++_res=$? ++if test $_res -ne 0; then ++ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } ++fi ++ac_cv_ios_path_CC=$_path ++ ++fi ++ ++echo "$ac_t""$ac_cv_ios_path_CC" 1>&6 ++CC="${ac_cv_ios_path_CC}$ARGS" ++ ++ ++ ++_prog_name=clang++ ++ ++echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 ++echo "configure:924: checking for $_prog_name in iOS SDK" >&5 ++if eval "test \"`echo '$''{'ac_cv_ios_path_CXX'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` ++_res=$? ++if test $_res -ne 0; then ++ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } ++fi ++ac_cv_ios_path_CXX=$_path ++ ++fi ++ ++echo "$ac_t""$ac_cv_ios_path_CXX" 1>&6 ++CXX="${ac_cv_ios_path_CXX}$ARGS" ++ ++ export CPP="$CC -E" ++ ++ ++_prog_name=`echo AR | tr "[:upper:]" "[:lower:]"` ++ ++echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 ++echo "configure:947: checking for $_prog_name in iOS SDK" >&5 ++if eval "test \"`echo '$''{'ac_cv_ios_path_AR'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` ++_res=$? ++if test $_res -ne 0; then ++ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } ++fi ++ac_cv_ios_path_AR=$_path ++ ++fi ++ ++echo "$ac_t""$ac_cv_ios_path_AR" 1>&6 ++AR="${ac_cv_ios_path_AR}" ++ ++ ++ ++_prog_name=as ++ ++echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 ++echo "configure:969: checking for $_prog_name in iOS SDK" >&5 ++if eval "test \"`echo '$''{'ac_cv_ios_path_AS'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` ++_res=$? ++if test $_res -ne 0; then ++ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } ++fi ++ac_cv_ios_path_AS=$_path ++ ++fi ++ ++echo "$ac_t""$ac_cv_ios_path_AS" 1>&6 ++AS="${ac_cv_ios_path_AS}$ARGS" ++ ++ ++ ++_prog_name=`echo OTOOL | tr "[:upper:]" "[:lower:]"` ++ ++echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 ++echo "configure:991: checking for $_prog_name in iOS SDK" >&5 ++if eval "test \"`echo '$''{'ac_cv_ios_path_OTOOL'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` ++_res=$? ++if test $_res -ne 0; then ++ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } ++fi ++ac_cv_ios_path_OTOOL=$_path ++ ++fi ++ ++echo "$ac_t""$ac_cv_ios_path_OTOOL" 1>&6 ++OTOOL="${ac_cv_ios_path_OTOOL}" ++ ++ ++ ++_prog_name=`echo STRIP | tr "[:upper:]" "[:lower:]"` ++ ++echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6 ++echo "configure:1013: checking for $_prog_name in iOS SDK" >&5 ++if eval "test \"`echo '$''{'ac_cv_ios_path_STRIP'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null` ++_res=$? ++if test $_res -ne 0; then ++ { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; } ++fi ++ac_cv_ios_path_STRIP=$_path ++ ++fi ++ ++echo "$ac_t""$ac_cv_ios_path_STRIP" 1>&6 ++STRIP="${ac_cv_ios_path_STRIP}" ++ ++ export PKG_CONFIG_PATH=${ios_sdk_path}/usr/lib/pkgconfig/ ++fi ++ ++ ++ ++ ;; ++esac ++ ++ ++if test "$COMPILE_ENVIRONMENT"; then ++ ++# Note: ++# In Mozilla, we use the names $target, $host and $build incorrectly, but are ++# too far gone to back out now. See Bug 475488: ++# - When we say $target, we mean $host, that is, the system on which ++# Mozilla will be run. ++# - When we say $host, we mean $build, that is, the system on which Mozilla ++# is built. ++# - $target (in its correct usage) is for compilers who generate code for a ++# different platform than $host, so it would not be used by Mozilla. ++if test "$target" != "$host"; then ++ ++echo "cross compiling from $host to $target" ++ ++_SAVE_PATH=$PATH ++case "${TOOLCHAIN_PREFIX}" in ++/*) ++ PATH="/:$PATH" ++ ;; ++esac ++# Extract the first word of "gcc", so it can be a program name with args. ++set dummy gcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1063: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="gcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++if test -z "$CC"; then ++ # Extract the first word of "cc", so it can be a program name with args. ++set dummy cc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1093: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_prog_rejected=no ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ++ ac_prog_rejected=yes ++ continue ++ fi ++ ac_cv_prog_CC="cc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++if test $ac_prog_rejected = yes; then ++ # We found a bogon in the path, so make sure we never use it. ++ set dummy $ac_cv_prog_CC ++ shift ++ if test $# -gt 0; then ++ # We chose a different compiler from the bogus one. ++ # However, it has the same basename, so the bogon will be chosen ++ # first if we set CC to just the basename; use the full file name. ++ shift ++ set dummy "$ac_dir/$ac_word" "$@" ++ shift ++ ac_cv_prog_CC="$@" ++ fi ++fi ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test -z "$CC"; then ++ case "`uname -s`" in ++ *win32* | *WIN32*) ++ # Extract the first word of "cl", so it can be a program name with args. ++set dummy cl; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1144: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="cl" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ esac ++ fi ++ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; echo "configure: error: no acceptable cc found in \$PATH" 1>&5; exit 1; } ++fi ++ ++echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ++echo "configure:1176: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++if eval "test \"`echo '$''{'ac_cv_prog_cc_works'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext << EOF ++ ++#line 1194 "configure" ++#include "confdefs.h" ++ ++main(){return(0);} ++EOF ++if { (eval echo configure:1199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ ac_cv_prog_cc_works=yes ++ # If we can't run a trivial program, we are probably using a cross compiler. ++ if (./conftest; exit) 2>/dev/null; then ++ ac_cv_prog_cc_cross=no ++ else ++ ac_cv_prog_cc_cross=yes ++ fi ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ ac_cv_prog_cc_works=no ++fi ++rm -fr conftest* ++fi ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 ++if test $ac_cv_prog_cc_works = no; then ++ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&5; exit 1; } ++fi ++echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ++echo "configure:1231: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 ++cross_compiling=$ac_cv_prog_cc_cross ++ ++echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ++echo "configure:1236: checking whether we are using GNU C" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ++ ac_cv_prog_gcc=yes ++else ++ ac_cv_prog_gcc=no ++fi ++fi ++ ++echo "$ac_t""$ac_cv_prog_gcc" 1>&6 ++ ++if test $ac_cv_prog_gcc = yes; then ++ GCC=yes ++else ++ GCC= ++fi ++ ++ac_test_CFLAGS="${CFLAGS+set}" ++ac_save_CFLAGS="$CFLAGS" ++CFLAGS= ++echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ++echo "configure:1264: checking whether ${CC-cc} accepts -g" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ echo 'void f(){}' > conftest.c ++if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ++ ac_cv_prog_cc_g=yes ++else ++ ac_cv_prog_cc_g=no ++fi ++rm -f conftest* ++ ++fi ++ ++echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then ++ CFLAGS="-g -O2" ++ else ++ CFLAGS="-g" ++ fi ++else ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi ++fi ++ ++for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1300: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$CXX"; then ++ ac_cv_prog_CXX="$CXX" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CXX="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CXX="$ac_cv_prog_CXX" ++if test -n "$CXX"; then ++ echo "$ac_t""$CXX" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$CXX" && break ++done ++test -n "$CXX" || CXX="gcc" ++ ++ ++echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ++echo "configure:1332: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ++ ++ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++if eval "test \"`echo '$''{'ac_cv_prog_cxx_works'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext << EOF ++ ++#line 1350 "configure" ++#include "confdefs.h" ++ ++int main(){return(0);} ++EOF ++if { (eval echo configure:1355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ ac_cv_prog_cxx_works=yes ++ # If we can't run a trivial program, we are probably using a cross compiler. ++ if (./conftest; exit) 2>/dev/null; then ++ ac_cv_prog_cxx_cross=no ++ else ++ ac_cv_prog_cxx_cross=yes ++ fi ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ ac_cv_prog_cxx_works=no ++fi ++rm -fr conftest* ++fi ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 ++if test $ac_cv_prog_cxx_works = no; then ++ { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&5; exit 1; } ++fi ++echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ++echo "configure:1387: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 ++echo "configure:1392: checking whether we are using GNU C++" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.C <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ++ ac_cv_prog_gxx=yes ++else ++ ac_cv_prog_gxx=no ++fi ++fi ++ ++echo "$ac_t""$ac_cv_prog_gxx" 1>&6 ++ ++if test $ac_cv_prog_gxx = yes; then ++ GXX=yes ++else ++ GXX= ++fi ++ ++ac_test_CXXFLAGS="${CXXFLAGS+set}" ++ac_save_CXXFLAGS="$CXXFLAGS" ++CXXFLAGS= ++echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 ++echo "configure:1420: checking whether ${CXX-g++} accepts -g" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ echo 'void f(){}' > conftest.cc ++if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then ++ ac_cv_prog_cxx_g=yes ++else ++ ac_cv_prog_cxx_g=no ++fi ++rm -f conftest* ++ ++fi ++ ++echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 ++if test "$ac_test_CXXFLAGS" = set; then ++ CXXFLAGS="$ac_save_CXXFLAGS" ++elif test $ac_cv_prog_cxx_g = yes; then ++ if test "$GXX" = yes; then ++ CXXFLAGS="-g -O2" ++ else ++ CXXFLAGS="-g" ++ fi ++else ++ if test "$GXX" = yes; then ++ CXXFLAGS="-O2" ++ else ++ CXXFLAGS= ++ fi ++fi ++ ++ ++for ac_prog in "${TOOLCHAIN_PREFIX}ranlib" ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1457: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$RANLIB"; then ++ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_RANLIB="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++RANLIB="$ac_cv_prog_RANLIB" ++if test -n "$RANLIB"; then ++ echo "$ac_t""$RANLIB" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$RANLIB" && break ++done ++test -n "$RANLIB" || RANLIB=":" ++ ++for ac_prog in "${TOOLCHAIN_PREFIX}as" ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1492: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$AS"; then ++ ac_cv_prog_AS="$AS" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_AS="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++AS="$ac_cv_prog_AS" ++if test -n "$AS"; then ++ echo "$ac_t""$AS" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$AS" && break ++done ++test -n "$AS" || AS=":" ++ ++for ac_prog in "${TOOLCHAIN_PREFIX}lipo" ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1527: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$LIPO"; then ++ ac_cv_prog_LIPO="$LIPO" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_LIPO="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++LIPO="$ac_cv_prog_LIPO" ++if test -n "$LIPO"; then ++ echo "$ac_t""$LIPO" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$LIPO" && break ++done ++test -n "$LIPO" || LIPO=":" ++ ++for ac_prog in "${TOOLCHAIN_PREFIX}strip" ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1562: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$STRIP"; then ++ ac_cv_prog_STRIP="$STRIP" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_STRIP="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++STRIP="$ac_cv_prog_STRIP" ++if test -n "$STRIP"; then ++ echo "$ac_t""$STRIP" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$STRIP" && break ++done ++test -n "$STRIP" || STRIP=":" ++ ++for ac_prog in "${TOOLCHAIN_PREFIX}otool" ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1597: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_OTOOL'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$OTOOL"; then ++ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_OTOOL="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++OTOOL="$ac_cv_prog_OTOOL" ++if test -n "$OTOOL"; then ++ echo "$ac_t""$OTOOL" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$OTOOL" && break ++done ++test -n "$OTOOL" || OTOOL=":" ++ ++for ac_prog in "${TOOLCHAIN_PREFIX}install_name_tool" ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1632: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_INSTALL_NAME_TOOL'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$INSTALL_NAME_TOOL"; then ++ ac_cv_prog_INSTALL_NAME_TOOL="$INSTALL_NAME_TOOL" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_INSTALL_NAME_TOOL="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++INSTALL_NAME_TOOL="$ac_cv_prog_INSTALL_NAME_TOOL" ++if test -n "$INSTALL_NAME_TOOL"; then ++ echo "$ac_t""$INSTALL_NAME_TOOL" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$INSTALL_NAME_TOOL" && break ++done ++test -n "$INSTALL_NAME_TOOL" || INSTALL_NAME_TOOL=":" ++ ++for ac_prog in "${TOOLCHAIN_PREFIX}objcopy" ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1667: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$OBJCOPY"; then ++ ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_OBJCOPY="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++OBJCOPY="$ac_cv_prog_OBJCOPY" ++if test -n "$OBJCOPY"; then ++ echo "$ac_t""$OBJCOPY" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$OBJCOPY" && break ++done ++test -n "$OBJCOPY" || OBJCOPY=":" ++ ++PATH=$_SAVE_PATH ++ ++else ++ # Extract the first word of "gcc", so it can be a program name with args. ++set dummy gcc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1703: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="gcc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++if test -z "$CC"; then ++ # Extract the first word of "cc", so it can be a program name with args. ++set dummy cc; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1733: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_prog_rejected=no ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ++ ac_prog_rejected=yes ++ continue ++ fi ++ ac_cv_prog_CC="cc" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++if test $ac_prog_rejected = yes; then ++ # We found a bogon in the path, so make sure we never use it. ++ set dummy $ac_cv_prog_CC ++ shift ++ if test $# -gt 0; then ++ # We chose a different compiler from the bogus one. ++ # However, it has the same basename, so the bogon will be chosen ++ # first if we set CC to just the basename; use the full file name. ++ shift ++ set dummy "$ac_dir/$ac_word" "$@" ++ shift ++ ac_cv_prog_CC="$@" ++ fi ++fi ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test -z "$CC"; then ++ case "`uname -s`" in ++ *win32* | *WIN32*) ++ # Extract the first word of "cl", so it can be a program name with args. ++set dummy cl; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1784: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$CC"; then ++ ac_cv_prog_CC="$CC" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CC="cl" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CC="$ac_cv_prog_CC" ++if test -n "$CC"; then ++ echo "$ac_t""$CC" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ;; ++ esac ++ fi ++ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; echo "configure: error: no acceptable cc found in \$PATH" 1>&5; exit 1; } ++fi ++ ++echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ++echo "configure:1816: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++if eval "test \"`echo '$''{'ac_cv_prog_cc_works'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext << EOF ++ ++#line 1834 "configure" ++#include "confdefs.h" ++ ++main(){return(0);} ++EOF ++if { (eval echo configure:1839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ ac_cv_prog_cc_works=yes ++ # If we can't run a trivial program, we are probably using a cross compiler. ++ if (./conftest; exit) 2>/dev/null; then ++ ac_cv_prog_cc_cross=no ++ else ++ ac_cv_prog_cc_cross=yes ++ fi ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ ac_cv_prog_cc_works=no ++fi ++rm -fr conftest* ++fi ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 ++if test $ac_cv_prog_cc_works = no; then ++ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&5; exit 1; } ++fi ++echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ++echo "configure:1871: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 ++cross_compiling=$ac_cv_prog_cc_cross ++ ++echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ++echo "configure:1876: checking whether we are using GNU C" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ++ ac_cv_prog_gcc=yes ++else ++ ac_cv_prog_gcc=no ++fi ++fi ++ ++echo "$ac_t""$ac_cv_prog_gcc" 1>&6 ++ ++if test $ac_cv_prog_gcc = yes; then ++ GCC=yes ++else ++ GCC= ++fi ++ ++ac_test_CFLAGS="${CFLAGS+set}" ++ac_save_CFLAGS="$CFLAGS" ++CFLAGS= ++echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ++echo "configure:1904: checking whether ${CC-cc} accepts -g" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ echo 'void f(){}' > conftest.c ++if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ++ ac_cv_prog_cc_g=yes ++else ++ ac_cv_prog_cc_g=no ++fi ++rm -f conftest* ++ ++fi ++ ++echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 ++if test "$ac_test_CFLAGS" = set; then ++ CFLAGS="$ac_save_CFLAGS" ++elif test $ac_cv_prog_cc_g = yes; then ++ if test "$GCC" = yes; then ++ CFLAGS="-g -O2" ++ else ++ CFLAGS="-g" ++ fi ++else ++ if test "$GCC" = yes; then ++ CFLAGS="-O2" ++ else ++ CFLAGS= ++ fi ++fi ++ ++ for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:1940: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$CXX"; then ++ ac_cv_prog_CXX="$CXX" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_CXX="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++CXX="$ac_cv_prog_CXX" ++if test -n "$CXX"; then ++ echo "$ac_t""$CXX" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$CXX" && break ++done ++test -n "$CXX" || CXX="gcc" ++ ++ ++echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ++echo "configure:1972: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ++ ++ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++if eval "test \"`echo '$''{'ac_cv_prog_cxx_works'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext << EOF ++ ++#line 1990 "configure" ++#include "confdefs.h" ++ ++int main(){return(0);} ++EOF ++if { (eval echo configure:1995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ ac_cv_prog_cxx_works=yes ++ # If we can't run a trivial program, we are probably using a cross compiler. ++ if (./conftest; exit) 2>/dev/null; then ++ ac_cv_prog_cxx_cross=no ++ else ++ ac_cv_prog_cxx_cross=yes ++ fi ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ ac_cv_prog_cxx_works=no ++fi ++rm -fr conftest* ++fi ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 ++if test $ac_cv_prog_cxx_works = no; then ++ { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&5; exit 1; } ++fi ++echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ++echo "configure:2027: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 ++echo "configure:2032: checking whether we are using GNU C++" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.C <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ++ ac_cv_prog_gxx=yes ++else ++ ac_cv_prog_gxx=no ++fi ++fi ++ ++echo "$ac_t""$ac_cv_prog_gxx" 1>&6 ++ ++if test $ac_cv_prog_gxx = yes; then ++ GXX=yes ++else ++ GXX= ++fi ++ ++ac_test_CXXFLAGS="${CXXFLAGS+set}" ++ac_save_CXXFLAGS="$CXXFLAGS" ++CXXFLAGS= ++echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 ++echo "configure:2060: checking whether ${CXX-g++} accepts -g" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ echo 'void f(){}' > conftest.cc ++if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then ++ ac_cv_prog_cxx_g=yes ++else ++ ac_cv_prog_cxx_g=no ++fi ++rm -f conftest* ++ ++fi ++ ++echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 ++if test "$ac_test_CXXFLAGS" = set; then ++ CXXFLAGS="$ac_save_CXXFLAGS" ++elif test $ac_cv_prog_cxx_g = yes; then ++ if test "$GXX" = yes; then ++ CXXFLAGS="-g -O2" ++ else ++ CXXFLAGS="-g" ++ fi ++else ++ if test "$GXX" = yes; then ++ CXXFLAGS="-O2" ++ else ++ CXXFLAGS= ++ fi ++fi ++ ++ # Extract the first word of "ranlib", so it can be a program name with args. ++set dummy ranlib; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:2094: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$RANLIB"; then ++ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_RANLIB="ranlib" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" ++fi ++fi ++RANLIB="$ac_cv_prog_RANLIB" ++if test -n "$RANLIB"; then ++ echo "$ac_t""$RANLIB" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ for ac_prog in $AS as ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:2126: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$AS" in ++ /*) ++ ac_cv_path_AS="$AS" # Let the user override the test with a path. ++ ;; ++ ?:/*) ++ ac_cv_path_AS="$AS" # Let the user override the test with a dos path. ++ ;; ++ *) ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_path_AS="$ac_dir/$ac_word" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac ++fi ++AS="$ac_cv_path_AS" ++if test -n "$AS"; then ++ echo "$ac_t""$AS" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$AS" && break ++done ++test -n "$AS" || AS="$CC" ++ ++ if test "$msyshost"; then ++ case "$AS" in ++ /*) ++ tmp_DIRNAME=`dirname "$AS"` ++ tmp_BASENAME=`basename "$AS"` ++ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` ++ AS="$tmp_PWD/$tmp_BASENAME" ++ if test -e "$AS.exe"; then ++ AS="$AS.exe" ++ fi ++ esac ++ fi ++ ++ for ac_prog in strip ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:2180: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$STRIP"; then ++ ac_cv_prog_STRIP="$STRIP" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_STRIP="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++STRIP="$ac_cv_prog_STRIP" ++if test -n "$STRIP"; then ++ echo "$ac_t""$STRIP" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$STRIP" && break ++done ++test -n "$STRIP" || STRIP=":" ++ ++ if test -z "$HOST_CC"; then ++ HOST_CC='$(CC)' ++ fi ++ if test -z "$HOST_CXX"; then ++ HOST_CXX='$(CXX)' ++ fi ++fi ++ ++ ++GNU_CC= ++GNU_CXX= ++if test "$CC_TYPE" = "gcc"; then ++ GNU_CC=1 ++ GNU_CXX=1 ++fi ++ ++CLANG_CC= ++CLANG_CXX= ++CLANG_CL= ++if test "$CC_TYPE" = "clang"; then ++ GNU_CC=1 ++ GNU_CXX=1 ++ CLANG_CC=1 ++ CLANG_CXX=1 ++fi ++if test "$CC_TYPE" = "clang-cl"; then ++ CLANG_CL=1 ++fi ++ ++ ++ ++ ++ ++ ++# Target the Windows 8.1 SDK by default ++WINVER=601 ++ ++case "$target" in ++*-mingw*) ++ if test "$GCC" != "yes"; then ++ # Check to see if we are really running in a msvc environemnt ++ _WIN32_MSVC=1 ++ ++ # Make sure compilers are valid ++ CFLAGS="$CFLAGS -nologo" ++ CXXFLAGS="$CXXFLAGS -TP -nologo" ++ if test -z "$CLANG_CL"; then ++ CPPFLAGS="$CPPFLAGS -utf-8" ++ fi ++ # _CRT_SECURE_NO_WARNINGS disables warnings about using MSVC-specific ++ # secure CRT functions. ++ CXXFLAGS="$CXXFLAGS -D_CRT_SECURE_NO_WARNINGS" ++ ++ ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ cat > conftest.$ac_ext < ++int main() { ++ printf("Hello World\n"); ++; return 0; } ++EOF ++if { (eval echo configure:2282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ : ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ { echo "configure: error: \$(CC) test failed. You must have MS VC++ in your path to build." 1>&2; echo "configure: error: \$(CC) test failed. You must have MS VC++ in your path to build." 1>&5; exit 1; } ++fi ++rm -f conftest* ++ ++ ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ cat > conftest.$ac_ext < ++int main() { ++ unsigned *test = new unsigned(42); ++; return 0; } ++EOF ++if { (eval echo configure:2311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ : ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ { echo "configure: error: \$(CXX) test failed. You must have MS VC++ in your path to build." 1>&2; echo "configure: error: \$(CXX) test failed. You must have MS VC++ in your path to build." 1>&5; exit 1; } ++fi ++rm -f conftest* ++ ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++ ++ _MSVC_VER_FILTER='s|.*[^!-~]([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*|\1|p' ++ ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' _CRT_SECURE_NO_WARNINGS ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _CRT_SECURE_NO_WARNINGS 1 ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' _CRT_NONSTDC_NO_WARNINGS ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _CRT_NONSTDC_NO_WARNINGS 1 ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' _USE_MATH_DEFINES ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _USE_MATH_DEFINES 1 ++EOF ++ # Otherwise MSVC's math.h doesn't #define M_PI. ++ ++ _CC_SUITE=14 ++ MSVC_C_RUNTIME_DLL=vcruntime140.dll ++ MSVC_CXX_RUNTIME_DLL=msvcp140.dll ++ ++ # -Zc:sizedDealloc- disables C++14 global sized deallocation (see bug 1160146) ++ CXXFLAGS="$CXXFLAGS -Zc:sizedDealloc-" ++ ++ ++ ++ ++ # Check linker version, except in lld builds ++ case "$LINKER" in ++ *lld*) ++ ;; ++ *) ++ _LD_FULL_VERSION=`"${LINKER}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"` ++ _LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'` ++ if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then ++ { echo "configure: error: The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE." 1>&2; echo "configure: error: The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE." 1>&5; exit 1; } ++ fi ++ ;; ++ esac ++ ++ INCREMENTAL_LINKER=1 ++ ++ unset _MSVC_VER_FILTER ++ ++ CFLAGS="$CFLAGS -D_HAS_EXCEPTIONS=0" ++ CXXFLAGS="$CXXFLAGS -D_HAS_EXCEPTIONS=0" ++ else ++ # Check w32api version ++ _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'` ++ _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'` ++ echo $ac_n "checking for w32api version >= $W32API_VERSION""... $ac_c" 1>&6 ++echo "configure:2392: checking for w32api version >= $W32API_VERSION" >&5 ++ cat > conftest.$ac_ext < ++int main() { ++#if (__W32API_MAJOR_VERSION < $_W32API_MAJOR_VERSION) || \ ++ (__W32API_MAJOR_VERSION == $_W32API_MAJOR_VERSION && \ ++ __W32API_MINOR_VERSION < $_W32API_MINOR_VERSION) ++ #error "test failed." ++ #endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:2406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ res=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ res=no ++fi ++rm -f conftest* ++ echo "$ac_t""$res" 1>&6 ++ if test "$res" != "yes"; then ++ { echo "configure: error: w32api version $W32API_VERSION or higher required." 1>&2; echo "configure: error: w32api version $W32API_VERSION or higher required." 1>&5; exit 1; } ++ fi ++ fi # !GNU_CC ++ ++ cat >> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <<\EOF ++ (''' HAVE_LOCALECONV ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_LOCALECONV 1 ++EOF ++ ++ for ac_func in _getc_nolock ++do ++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++echo "configure:2468: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef $ac_func ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:2500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++done ++ ++fi ++ ++fi # COMPILE_ENVIRONMENT ++ ++# Check to see if we are running in a broken QEMU scratchbox. ++# We know that anything below 1.0.16 is broken. ++for ac_prog in sb-conf ve ++do ++# Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:2538: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_prog_SBCONF'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test -n "$SBCONF"; then ++ ac_cv_prog_SBCONF="$SBCONF" # Let the user override the test. ++else ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_prog_SBCONF="$ac_prog" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++fi ++fi ++SBCONF="$ac_cv_prog_SBCONF" ++if test -n "$SBCONF"; then ++ echo "$ac_t""$SBCONF" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++test -n "$SBCONF" && break ++done ++test -n "$SBCONF" || SBCONF="""" ++ ++if test -n "$SBCONF"; then ++ _sb_version=`$SBCONF ve` ++ _sb_version_major=`echo $_sb_version | cut -f1 -d.` ++ _sb_version_minor=`echo $_sb_version | cut -f2 -d.` ++ _sb_version_point=`echo $_sb_version | cut -f3 -d.` ++ if test $_sb_version_major -eq 1 -a $_sb_version_minor -eq 0 -a $_sb_version_point -le 16; then ++ QEMU_CANT_RUN_JS_SHELL=1 ++ fi ++fi ++ ++ ++ ++ ++ ++if test "$COMPILE_ENVIRONMENT"; then ++ ++ ++ ++# If we find X, set shell vars x_includes and x_libraries to the ++# paths, otherwise set no_x=yes. ++# Uses ac_ vars as temps to allow command line to override cache and checks. ++# --without-x overrides everything else, but does not touch the cache. ++echo $ac_n "checking for X""... $ac_c" 1>&6 ++echo "configure:2591: checking for X" >&5 ++ ++# Check whether --with-x or --without-x was given. ++if test "${with_x+set}" = set; then ++ withval="$with_x" ++ : ++fi ++ ++# $have_x is `yes', `no', `disabled', or empty when we do not yet know. ++if test "x$with_x" = xno; then ++ # The user explicitly disabled X. ++ have_x=disabled ++else ++ if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then ++ # Both variables are already set. ++ have_x=yes ++ else ++if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ # One or both of the vars are not set, and there is no cached value. ++ac_x_includes=NO ac_x_libraries=NO ++rm -fr conftestdir ++if mkdir conftestdir; then ++ cd conftestdir ++ # Make sure to not put "make" in the Imakefile rules, since we grep it out. ++ cat > Imakefile <<'EOF' ++acfindx: ++ @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' ++EOF ++ if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then ++ # GNU make sometimes prints "make[1]: Entering...", which would confuse us. ++ eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` ++ # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. ++ for ac_extension in a so sl; do ++ if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && ++ test -f $ac_im_libdir/libX11.$ac_extension; then ++ ac_im_usrlibdir=$ac_im_libdir; break ++ fi ++ done ++ # Screen out bogus values from the imake configuration. They are ++ # bogus both because they are the default anyway, and because ++ # using them would break gcc on systems where it needs fixed includes. ++ case "$ac_im_incroot" in ++ /usr/include) ;; ++ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; ++ esac ++ case "$ac_im_usrlibdir" in ++ /usr/lib | /lib) ;; ++ *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; ++ esac ++ fi ++ cd .. ++ rm -fr conftestdir ++fi ++ ++if test "$ac_x_includes" = NO; then ++ # Guess where to find include files, by looking for this one X11 .h file. ++ test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h ++ ++ # First, try using that file with no special directory specified. ++cat > conftest.$ac_ext < ++EOF ++ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ++{ (eval echo configure:2658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ++if test -z "$ac_err"; then ++ rm -rf conftest* ++ # We can compile using X headers with no special include directory. ++ac_x_includes= ++else ++ echo "$ac_err" >&5 ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ # Look for the header file in a standard set of common directories. ++# Check X11 before X11Rn because it is often a symlink to the current release. ++ for ac_dir in \ ++ /usr/X11/include \ ++ /usr/X11R6/include \ ++ /usr/X11R5/include \ ++ /usr/X11R4/include \ ++ \ ++ /usr/include/X11 \ ++ /usr/include/X11R6 \ ++ /usr/include/X11R5 \ ++ /usr/include/X11R4 \ ++ \ ++ /usr/local/X11/include \ ++ /usr/local/X11R6/include \ ++ /usr/local/X11R5/include \ ++ /usr/local/X11R4/include \ ++ \ ++ /usr/local/include/X11 \ ++ /usr/local/include/X11R6 \ ++ /usr/local/include/X11R5 \ ++ /usr/local/include/X11R4 \ ++ \ ++ /usr/X386/include \ ++ /usr/x386/include \ ++ /usr/XFree86/include/X11 \ ++ \ ++ /usr/include \ ++ /usr/local/include \ ++ /usr/unsupported/include \ ++ /usr/athena/include \ ++ /usr/local/x11r5/include \ ++ /usr/lpp/Xamples/include \ ++ \ ++ /usr/openwin/include \ ++ /usr/openwin/share/include \ ++ ; \ ++ do ++ if test -r "$ac_dir/$x_direct_test_include"; then ++ ac_x_includes=$ac_dir ++ break ++ fi ++ done ++fi ++rm -f conftest* ++fi # $ac_x_includes = NO ++ ++if test "$ac_x_libraries" = NO; then ++ # Check for the libraries. ++ ++ test -z "$x_direct_test_library" && x_direct_test_library=Xt ++ test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc ++ ++ # See if we find them without any special options. ++ # Don't add to $LIBS permanently. ++ ac_save_LIBS="$LIBS" ++ LIBS="-l$x_direct_test_library $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ LIBS="$ac_save_LIBS" ++# We can link X programs with no special library path. ++ac_x_libraries= ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ LIBS="$ac_save_LIBS" ++# First see if replacing the include by lib works. ++# Check X11 before X11Rn because it is often a symlink to the current release. ++for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ ++ /usr/X11/lib \ ++ /usr/X11R6/lib \ ++ /usr/X11R5/lib \ ++ /usr/X11R4/lib \ ++ \ ++ /usr/lib/X11 \ ++ /usr/lib/X11R6 \ ++ /usr/lib/X11R5 \ ++ /usr/lib/X11R4 \ ++ \ ++ /usr/local/X11/lib \ ++ /usr/local/X11R6/lib \ ++ /usr/local/X11R5/lib \ ++ /usr/local/X11R4/lib \ ++ \ ++ /usr/local/lib/X11 \ ++ /usr/local/lib/X11R6 \ ++ /usr/local/lib/X11R5 \ ++ /usr/local/lib/X11R4 \ ++ \ ++ /usr/X386/lib \ ++ /usr/x386/lib \ ++ /usr/XFree86/lib/X11 \ ++ \ ++ /usr/lib \ ++ /usr/local/lib \ ++ /usr/unsupported/lib \ ++ /usr/athena/lib \ ++ /usr/local/x11r5/lib \ ++ /usr/lpp/Xamples/lib \ ++ /lib/usr/lib/X11 \ ++ \ ++ /usr/openwin/lib \ ++ /usr/openwin/share/lib \ ++ ; \ ++do ++ for ac_extension in a so sl; do ++ if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then ++ ac_x_libraries=$ac_dir ++ break 2 ++ fi ++ done ++done ++fi ++rm -f conftest* ++fi # $ac_x_libraries = NO ++ ++if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then ++ # Didn't find X anywhere. Cache the known absence of X. ++ ac_cv_have_x="have_x=no" ++else ++ # Record where we found X for the cache. ++ ac_cv_have_x="have_x=yes \ ++ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" ++fi ++fi ++ fi ++ eval "$ac_cv_have_x" ++fi # $with_x != no ++ ++if test "$have_x" != yes; then ++ echo "$ac_t""$have_x" 1>&6 ++ no_x=yes ++else ++ # If each of the values was on the command line, it overrides each guess. ++ test "x$x_includes" = xNONE && x_includes=$ac_x_includes ++ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries ++ # Update the cache value to reflect the command line values. ++ ac_cv_have_x="have_x=yes \ ++ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" ++ echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 ++fi ++ ++if test "$no_x" = yes; then ++ # Not all programs may use this symbol, but it does not hurt to define it. ++ cat >> confdefs.pytmp <<\EOF ++ (''' X_DISPLAY_MISSING ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define X_DISPLAY_MISSING 1 ++EOF ++ ++ X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= ++else ++ if test -n "$x_includes"; then ++ X_CFLAGS="$X_CFLAGS -I$x_includes" ++ fi ++ ++ # It would also be nice to do this for all -L options, not just this one. ++ if test -n "$x_libraries"; then ++ X_LIBS="$X_LIBS -L$x_libraries" ++ # For Solaris; some versions of Sun CC require a space after -R and ++ # others require no space. Words are not sufficient . . . . ++ case "`(uname -sr) 2>/dev/null`" in ++ "SunOS 5"*) ++ echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 ++echo "configure:2843: checking whether -R must be followed by a space" >&5 ++ ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_R_nospace=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_R_nospace=no ++fi ++rm -f conftest* ++ if test $ac_R_nospace = yes; then ++ echo "$ac_t""no" 1>&6 ++ X_LIBS="$X_LIBS -R$x_libraries" ++ else ++ LIBS="$ac_xsave_LIBS -R $x_libraries" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_R_space=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_R_space=no ++fi ++rm -f conftest* ++ if test $ac_R_space = yes; then ++ echo "$ac_t""yes" 1>&6 ++ X_LIBS="$X_LIBS -R $x_libraries" ++ else ++ echo "$ac_t""neither works" 1>&6 ++ fi ++ fi ++ LIBS="$ac_xsave_LIBS" ++ esac ++ fi ++ ++ # Check for system-dependent libraries X programs must link with. ++ # Do this before checking for the system-independent R6 libraries ++ # (-lICE), since we may need -lsocket or whatever for X linking. ++ ++ if test "$ISC" = yes; then ++ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" ++ else ++ # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X ++ # libraries were built with DECnet support. And karl@cs.umb.edu says ++ # the Alpha needs dnet_stub (dnet does not exist). ++ echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 ++echo "configure:2908: checking for dnet_ntoa in -ldnet" >&5 ++ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-ldnet $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test $ac_cv_lib_dnet_dnet_ntoa = no; then ++ echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 ++echo "configure:2949: checking for dnet_ntoa in -ldnet_stub" >&5 ++ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-ldnet_stub $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ fi ++ ++ # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, ++ # to get the SysV transport functions. ++ # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) ++ # needs -lnsl. ++ # The nsl library prevents programs from opening the X display ++ # on Irix 5.2, according to dickey@clark.net. ++ echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 ++echo "configure:2997: checking for gethostbyname" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef gethostbyname ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char gethostbyname(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) ++choke me ++#else ++gethostbyname(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:3029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_gethostbyname=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_gethostbyname=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ : ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test $ac_cv_func_gethostbyname = no; then ++ echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 ++echo "configure:3050: checking for gethostbyname in -lnsl" >&5 ++ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lnsl $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ fi ++ ++ # lieder@skyler.mavd.honeywell.com says without -lsocket, ++ # socket/setsockopt and other routines are undefined under SCO ODT ++ # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary ++ # on later versions), says simon@lia.di.epfl.ch: it contains ++ # gethostby* variants that don't use the nameserver (or something). ++ # -lsocket must be given before -lnsl if both are needed. ++ # We assume that if connect needs -lnsl, so does gethostbyname. ++ echo $ac_n "checking for connect""... $ac_c" 1>&6 ++echo "configure:3099: checking for connect" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef connect ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char connect(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_connect) || defined (__stub___connect) ++choke me ++#else ++connect(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:3131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_connect=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_connect=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ : ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test $ac_cv_func_connect = no; then ++ echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 ++echo "configure:3152: checking for connect in -lsocket" >&5 ++ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lsocket $X_EXTRA_LIBS $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ fi ++ ++ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. ++ echo $ac_n "checking for remove""... $ac_c" 1>&6 ++echo "configure:3195: checking for remove" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef remove ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char remove(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_remove) || defined (__stub___remove) ++choke me ++#else ++remove(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:3227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_remove=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_remove=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ : ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test $ac_cv_func_remove = no; then ++ echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 ++echo "configure:3248: checking for remove in -lposix" >&5 ++ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lposix $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ fi ++ ++ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ++ echo $ac_n "checking for shmat""... $ac_c" 1>&6 ++echo "configure:3291: checking for shmat" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef shmat ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char shmat(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_shmat) || defined (__stub___shmat) ++choke me ++#else ++shmat(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:3323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_shmat=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_shmat=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ : ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test $ac_cv_func_shmat = no; then ++ echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 ++echo "configure:3344: checking for shmat in -lipc" >&5 ++ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lipc $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ fi ++ fi ++ ++ # Check for libraries that X11R6 Xt/Xaw programs need. ++ ac_save_LDFLAGS="$LDFLAGS" ++ test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" ++ # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to ++ # check for ICE first), but we must link in the order -lSM -lICE or ++ # we get undefined symbols. So assume we have SM if we have ICE. ++ # These have to be linked with before -lX11, unlike the other ++ # libraries we check for below, so use a different variable. ++ # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. ++ echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 ++echo "configure:3396: checking for IceConnectionNumber in -lICE" >&5 ++ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lICE $X_EXTRA_LIBS $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ LDFLAGS="$ac_save_LDFLAGS" ++ ++fi ++ ++ ++XCFLAGS="$X_CFLAGS" ++ ++fi # COMPILE_ENVIRONMENT ++ ++# Separate version into components for use in shared object naming etc ++ ++MOZJS_MAJOR_VERSION=`echo $MOZILLA_VERSION | sed "s|\(^[0-9]*\)\.[0-9]*.*|\1|"` ++MOZJS_MINOR_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.\([0-9]*\).*|\1|"` ++MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"` ++IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'` ++ ++JS_SHELL_NAME=js ++JS_CONFIG_NAME=js-config ++ ++ ++if test -n "$IS_ALPHA"; then ++ ++ MOZJS_ALPHA=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9\.]*\([^0-9]\).*|\1|"` ++ ++fi ++cat >> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <&2; echo "configure: error: Couldn't find path to llvm-libc++ in the android ndk" 1>&5; exit 1; } ++ fi ++ ++ STLPORT_LIBS="-L$cxx_libs -lc++_static" ++ # NDK r12 split the libc++ runtime libraries into pieces. ++ for lib in c++abi unwind android_support; do ++ if test -e "$cxx_libs/lib${lib}.a"; then ++ STLPORT_LIBS="$STLPORT_LIBS -l${lib}" ++ fi ++ done ++ fi ++fi ++ ++ ++ ++ ++WARNINGS_CFLAGS="$_WARNINGS_CFLAGS" ++if test -n "${CLANG_CC}${CLANG_CL}"; then ++ WARNINGS_CFLAGS="-Qunused-arguments $WARNINGS_CFLAGS" ++ CPPFLAGS="-Qunused-arguments ${CPPFLAGS}" ++fi ++if test -n "${CLANG_CXX}${CLANG_CL}"; then ++ _WARNINGS_CXXFLAGS="-Qunused-arguments ${_WARNINGS_CXXFLAGS}" ++fi ++ ++ ++ ++if test -n "$MOZ_ASAN"; then ++ if test -n "$CLANG_CL"; then ++ # Look for the ASan runtime binary ++ if test "$CPU_ARCH" = "x86_64"; then ++ MOZ_CLANG_RT_ASAN_LIB=clang_rt.asan_dynamic-x86_64.dll ++ else ++ MOZ_CLANG_RT_ASAN_LIB=clang_rt.asan_dynamic-i386.dll ++ fi ++ # We use MOZ_PATH_PROG in order to get a Windows style path. ++ # Extract the first word of "$MOZ_CLANG_RT_ASAN_LIB", so it can be a program name with args. ++set dummy $MOZ_CLANG_RT_ASAN_LIB; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:3571: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$MOZ_CLANG_RT_ASAN_LIB_PATH" in ++ /*) ++ ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH="$MOZ_CLANG_RT_ASAN_LIB_PATH" # Let the user override the test with a path. ++ ;; ++ ?:/*) ++ ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH="$MOZ_CLANG_RT_ASAN_LIB_PATH" # Let the user override the test with a dos path. ++ ;; ++ *) ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH="$ac_dir/$ac_word" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac ++fi ++MOZ_CLANG_RT_ASAN_LIB_PATH="$ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH" ++if test -n "$MOZ_CLANG_RT_ASAN_LIB_PATH"; then ++ echo "$ac_t""$MOZ_CLANG_RT_ASAN_LIB_PATH" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test "$msyshost"; then ++ case "$MOZ_CLANG_RT_ASAN_LIB_PATH" in ++ /*) ++ tmp_DIRNAME=`dirname "$MOZ_CLANG_RT_ASAN_LIB_PATH"` ++ tmp_BASENAME=`basename "$MOZ_CLANG_RT_ASAN_LIB_PATH"` ++ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` ++ MOZ_CLANG_RT_ASAN_LIB_PATH="$tmp_PWD/$tmp_BASENAME" ++ if test -e "$MOZ_CLANG_RT_ASAN_LIB_PATH.exe"; then ++ MOZ_CLANG_RT_ASAN_LIB_PATH="$MOZ_CLANG_RT_ASAN_LIB_PATH.exe" ++ fi ++ esac ++ fi ++ ++ if test -z "$MOZ_CLANG_RT_ASAN_LIB_PATH"; then ++ { echo "configure: error: Couldn't find $MOZ_CLANG_RT_ASAN_LIB. It should be available in the same location as clang-cl." 1>&2; echo "configure: error: Couldn't find $MOZ_CLANG_RT_ASAN_LIB. It should be available in the same location as clang-cl." 1>&5; exit 1; } ++ fi ++ ++ # Suppressing errors in recompiled code. ++ if test "$OS_ARCH" = "WINNT"; then ++ CFLAGS="-fsanitize-blacklist=$_topsrcdir/build/sanitizers/asan_blacklist_win.txt $CFLAGS" ++ CXXFLAGS="-fsanitize-blacklist=$_topsrcdir/build/sanitizers/asan_blacklist_win.txt $CXXFLAGS" ++ fi ++ fi ++ CFLAGS="-fsanitize=address $CFLAGS" ++ CXXFLAGS="-fsanitize=address $CXXFLAGS" ++ if test -z "$CLANG_CL"; then ++ LDFLAGS="-fsanitize=address -rdynamic $LDFLAGS" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_ASAN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_ASAN 1 ++EOF ++ ++ # Extract the first word of "llvm-symbolizer", so it can be a program name with args. ++set dummy llvm-symbolizer; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:3641: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. ++ ;; ++ ?:/*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a dos path. ++ ;; ++ *) ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_path_LLVM_SYMBOLIZER="$ac_dir/$ac_word" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac ++fi ++LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" ++if test -n "$LLVM_SYMBOLIZER"; then ++ echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test "$msyshost"; then ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` ++ tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` ++ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` ++ LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" ++ if test -e "$LLVM_SYMBOLIZER.exe"; then ++ LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" ++ fi ++ esac ++ fi ++ ++fi ++ ++ ++# Check whether --enable-memory-sanitizer or --disable-memory-sanitizer was given. ++if test "${enable_memory_sanitizer+set}" = set; then ++ enableval="$enable_memory_sanitizer" ++ if test "$enableval" = "yes"; then ++ MOZ_MSAN=1 ++ elif test "$enableval" = "no"; then ++ MOZ_MSAN= ++ else ++ { echo "configure: error: Option, memory-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, memory-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++if test -n "$MOZ_MSAN"; then ++ CFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $CFLAGS" ++ CXXFLAGS="-fsanitize=memory -fsanitize-memory-track-origins $CXXFLAGS" ++ if test -z "$CLANG_CL"; then ++ LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins -rdynamic $LDFLAGS" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_MSAN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_MSAN 1 ++EOF ++ ++ # Extract the first word of "llvm-symbolizer", so it can be a program name with args. ++set dummy llvm-symbolizer; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:3717: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. ++ ;; ++ ?:/*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a dos path. ++ ;; ++ *) ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_path_LLVM_SYMBOLIZER="$ac_dir/$ac_word" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac ++fi ++LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" ++if test -n "$LLVM_SYMBOLIZER"; then ++ echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test "$msyshost"; then ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` ++ tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` ++ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` ++ LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" ++ if test -e "$LLVM_SYMBOLIZER.exe"; then ++ LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" ++ fi ++ esac ++ fi ++ ++fi ++ ++ ++# Check whether --enable-thread-sanitizer or --disable-thread-sanitizer was given. ++if test "${enable_thread_sanitizer+set}" = set; then ++ enableval="$enable_thread_sanitizer" ++ if test "$enableval" = "yes"; then ++ MOZ_TSAN=1 ++ elif test "$enableval" = "no"; then ++ MOZ_TSAN= ++ else ++ { echo "configure: error: Option, thread-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, thread-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++if test -n "$MOZ_TSAN"; then ++ CFLAGS="-fsanitize=thread $CFLAGS" ++ CXXFLAGS="-fsanitize=thread $CXXFLAGS" ++ if test -z "$CLANG_CL"; then ++ LDFLAGS="-fsanitize=thread -rdynamic $LDFLAGS" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_TSAN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_TSAN 1 ++EOF ++ ++ # Extract the first word of "llvm-symbolizer", so it can be a program name with args. ++set dummy llvm-symbolizer; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:3793: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. ++ ;; ++ ?:/*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a dos path. ++ ;; ++ *) ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_path_LLVM_SYMBOLIZER="$ac_dir/$ac_word" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac ++fi ++LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" ++if test -n "$LLVM_SYMBOLIZER"; then ++ echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test "$msyshost"; then ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` ++ tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` ++ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` ++ LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" ++ if test -e "$LLVM_SYMBOLIZER.exe"; then ++ LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" ++ fi ++ esac ++ fi ++ ++fi ++ ++ ++if test -n "$MOZ_UBSAN_CHECKS"; then ++ MOZ_UBSAN=1 ++ UBSAN_TXT="$_objdir/ubsan_blacklist.txt" ++ cat $_topsrcdir/build/sanitizers/ubsan_*_blacklist.txt > $UBSAN_TXT ++ UBSAN_FLAGS="-fsanitize=$MOZ_UBSAN_CHECKS -fno-sanitize-recover=$MOZ_UBSAN_CHECKS -fsanitize-blacklist=$UBSAN_TXT" ++ CFLAGS="$UBSAN_FLAGS $CFLAGS" ++ CXXFLAGS="$UBSAN_FLAGS $CXXFLAGS" ++ if test -z "$CLANG_CL"; then ++ LDFLAGS="-fsanitize=undefined -rdynamic $LDFLAGS" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_UBSAN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_UBSAN 1 ++EOF ++ ++ # Extract the first word of "llvm-symbolizer", so it can be a program name with args. ++set dummy llvm-symbolizer; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:3861: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. ++ ;; ++ ?:/*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a dos path. ++ ;; ++ *) ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_path_LLVM_SYMBOLIZER="$ac_dir/$ac_word" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac ++fi ++LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" ++if test -n "$LLVM_SYMBOLIZER"; then ++ echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test "$msyshost"; then ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` ++ tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` ++ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` ++ LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" ++ if test -e "$LLVM_SYMBOLIZER.exe"; then ++ LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" ++ fi ++ esac ++ fi ++ ++fi ++ ++ ++ ++# Check whether --enable-signed-overflow-sanitizer or --disable-signed-overflow-sanitizer was given. ++if test "${enable_signed_overflow_sanitizer+set}" = set; then ++ enableval="$enable_signed_overflow_sanitizer" ++ if test "$enableval" = "yes"; then ++ MOZ_SIGNED_OVERFLOW_SANITIZE=1 ++ elif test "$enableval" = "no"; then ++ MOZ_SIGNED_OVERFLOW_SANITIZE= ++ else ++ { echo "configure: error: Option, signed-overflow-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, signed-overflow-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++# Check whether --enable-unsigned-overflow-sanitizer or --disable-unsigned-overflow-sanitizer was given. ++if test "${enable_unsigned_overflow_sanitizer+set}" = set; then ++ enableval="$enable_unsigned_overflow_sanitizer" ++ if test "$enableval" = "yes"; then ++ MOZ_UNSIGNED_OVERFLOW_SANITIZE=1 ++ elif test "$enableval" = "no"; then ++ MOZ_UNSIGNED_OVERFLOW_SANITIZE= ++ else ++ { echo "configure: error: Option, unsigned-overflow-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, unsigned-overflow-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++if test -n "$MOZ_SIGNED_OVERFLOW_SANITIZE$MOZ_UNSIGNED_OVERFLOW_SANITIZE"; then ++ MOZ_UBSAN=1 ++ SANITIZER_BLACKLISTS="" ++ if test -n "$MOZ_SIGNED_OVERFLOW_SANITIZE"; then ++ SANITIZER_BLACKLISTS="-fsanitize-blacklist=$_topsrcdir/build/sanitizers/ubsan_signed_overflow_blacklist.txt $SANITIZER_BLACKLISTS" ++ CFLAGS="-fsanitize=signed-integer-overflow $CFLAGS" ++ CXXFLAGS="-fsanitize=signed-integer-overflow $CXXFLAGS" ++ if test -z "$CLANG_CL"; then ++ LDFLAGS="-fsanitize=signed-integer-overflow -rdynamic $LDFLAGS" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_SIGNED_OVERFLOW_SANITIZE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_SIGNED_OVERFLOW_SANITIZE 1 ++EOF ++ ++ fi ++ if test -n "$MOZ_UNSIGNED_OVERFLOW_SANITIZE"; then ++ SANITIZER_BLACKLISTS="-fsanitize-blacklist=$_topsrcdir/build/sanitizers/ubsan_unsigned_overflow_blacklist.txt $SANITIZER_BLACKLISTS" ++ CFLAGS="-fsanitize=unsigned-integer-overflow $CFLAGS" ++ CXXFLAGS="-fsanitize=unsigned-integer-overflow $CXXFLAGS" ++ if test -z "$CLANG_CL"; then ++ LDFLAGS="-fsanitize=unsigned-integer-overflow -rdynamic $LDFLAGS" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_UNSIGNED_OVERFLOW_SANITIZE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_UNSIGNED_OVERFLOW_SANITIZE 1 ++EOF ++ ++ fi ++ CFLAGS="$SANITIZER_BLACKLISTS $CFLAGS" ++ CXXFLAGS="$SANITIZER_BLACKLISTS $CXXFLAGS" ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_UBSAN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_UBSAN 1 ++EOF ++ ++ # Extract the first word of "llvm-symbolizer", so it can be a program name with args. ++set dummy llvm-symbolizer; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:3980: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path. ++ ;; ++ ?:/*) ++ ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a dos path. ++ ;; ++ *) ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_path_LLVM_SYMBOLIZER="$ac_dir/$ac_word" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac ++fi ++LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER" ++if test -n "$LLVM_SYMBOLIZER"; then ++ echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ if test "$msyshost"; then ++ case "$LLVM_SYMBOLIZER" in ++ /*) ++ tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"` ++ tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"` ++ tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W` ++ LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME" ++ if test -e "$LLVM_SYMBOLIZER.exe"; then ++ LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe" ++ fi ++ esac ++ fi ++ ++fi ++ ++ ++ ++ ++if test -n "$LIBFUZZER"; then ++ LDFLAGS="$LIBFUZZER_FLAGS -rdynamic $LDFLAGS" ++fi ++ ++# The LLVM symbolizer is used by all sanitizers ++ ++ ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ : ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ { echo "configure: error: compiler is incompatible with sanitize options" 1>&2; echo "configure: error: compiler is incompatible with sanitize options" 1>&5; exit 1; } ++fi ++rm -f conftest* ++ ++ ++ ++if test "$GNU_CC"; then ++ DSO_LDOPTS='-shared' ++ if test "$GCC_USE_GNU_LD"; then ++ # Some tools like ASan use a runtime library that is only ++ # linked against executables, so we must allow undefined ++ # symbols for shared objects in some cases. ++ if test -z "$MOZ_ASAN$MOZ_MSAN$MOZ_UBSAN$MOZ_TSAN$FUZZING_INTERFACES"; then ++ # Don't allow undefined symbols in libraries ++ DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs" ++ fi ++ fi ++ WARNINGS_AS_ERRORS='-Werror' ++ DSO_CFLAGS='' ++ ++ if test "$OS_ARCH" != "WINNT"; then ++ DSO_PIC_CFLAGS='-fPIC' ++ ASFLAGS="$ASFLAGS -fPIC" ++ fi ++ ++ echo $ac_n "checking for --noexecstack option to as""... $ac_c" 1>&6 ++echo "configure:4077: checking for --noexecstack option to as" >&5 ++ _SAVE_CFLAGS=$CFLAGS ++ CFLAGS="$CFLAGS -Wa,--noexecstack" ++ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6 ++ ASFLAGS="$ASFLAGS -Wa,--noexecstack" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++fi ++rm -f conftest* ++ CFLAGS=$_SAVE_CFLAGS ++ echo $ac_n "checking for -z noexecstack option to ld""... $ac_c" 1>&6 ++echo "configure:4101: checking for -z noexecstack option to ld" >&5 ++ _SAVE_LDFLAGS=$LDFLAGS ++ LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++ LDFLAGS=$_SAVE_LDFLAGS ++fi ++rm -f conftest* ++ ++ echo $ac_n "checking for -z text option to ld""... $ac_c" 1>&6 ++echo "configure:4125: checking for -z text option to ld" >&5 ++ _SAVE_LDFLAGS=$LDFLAGS ++ LDFLAGS="$LDFLAGS -Wl,-z,text" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++ LDFLAGS=$_SAVE_LDFLAGS ++fi ++rm -f conftest* ++ ++ echo $ac_n "checking for -z relro option to ld""... $ac_c" 1>&6 ++echo "configure:4149: checking for -z relro option to ld" >&5 ++ _SAVE_LDFLAGS=$LDFLAGS ++ LDFLAGS="$LDFLAGS -Wl,-z,relro" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++ LDFLAGS=$_SAVE_LDFLAGS ++fi ++rm -f conftest* ++ ++ echo $ac_n "checking for -z nocopyreloc option to ld""... $ac_c" 1>&6 ++echo "configure:4173: checking for -z nocopyreloc option to ld" >&5 ++ _SAVE_LDFLAGS=$LDFLAGS ++ LDFLAGS="$LDFLAGS -Wl,-z,nocopyreloc" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++ LDFLAGS=$_SAVE_LDFLAGS ++fi ++rm -f conftest* ++ ++ echo $ac_n "checking for -Bsymbolic-functions option to ld""... $ac_c" 1>&6 ++echo "configure:4197: checking for -Bsymbolic-functions option to ld" >&5 ++ _SAVE_LDFLAGS=$LDFLAGS ++ LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++ LDFLAGS=$_SAVE_LDFLAGS ++fi ++rm -f conftest* ++ ++ echo $ac_n "checking for --build-id=sha1 option to ld""... $ac_c" 1>&6 ++echo "configure:4221: checking for --build-id=sha1 option to ld" >&5 ++ _SAVE_LDFLAGS=$LDFLAGS ++ LDFLAGS="$LDFLAGS -Wl,--build-id=sha1" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++ LDFLAGS=$_SAVE_LDFLAGS ++fi ++rm -f conftest* ++ ++ _DEFINES_CFLAGS="-include $jsconfdefs -DMOZILLA_CLIENT" ++ _USE_CPP_INCLUDE_FLAG=1 ++fi ++ ++if test "$GNU_CXX"; then ++ _DEFINES_CXXFLAGS="-DMOZILLA_CLIENT -include $jsconfdefs" ++ _USE_CPP_INCLUDE_FLAG=1 ++fi ++ ++case "$host" in ++*mingw*) ++ if test -n "$_WIN32_MSVC"; then ++ HOST_CFLAGS="$HOST_CFLAGS -nologo" ++ else ++ HOST_CFLAGS="$HOST_CFLAGS -mwindows" ++ fi ++ HOST_CFLAGS="$HOST_CFLAGS -DXP_WIN -DWIN32 -D_WIN32 -D_CRT_SECURE_NO_WARNINGS" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}" ++ HOST_BIN_SUFFIX=.exe ++ ++ case "${host_cpu}" in ++ i*86) ++ if test -n "$_WIN32_MSVC"; then ++ HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X86" ++ fi ++ ;; ++ x86_64) ++ if test -n "$_WIN32_MSVC"; then ++ HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X64" ++ fi ++ HOST_CFLAGS="$HOST_CFLAGS -D_AMD64_" ++ ;; ++ esac ++ ;; ++ ++*-darwin*) ++ HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ++ ;; ++ ++*-linux*|*-kfreebsd*-gnu|*-gnu*) ++ HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ++ ;; ++ ++*) ++ HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}" ++ ;; ++esac ++ ++ ++CFLAGS="$CFLAGS $MOZ_HARDENING_CFLAGS_JS" ++CPPFLAGS="$CPPFLAGS $MOZ_HARDENING_CFLAGS_JS" ++CXXFLAGS="$CXXFLAGS $MOZ_HARDENING_CFLAGS_JS" ++LDFLAGS="$LDFLAGS $MOZ_HARDENING_LDFLAGS_JS" ++ ++ ++case "$target" in ++*-darwin*) ++ MOZ_OPTIMIZE_FLAGS="-O3" ++ CFLAGS="$CFLAGS -fno-common" ++ CXXFLAGS="$CXXFLAGS -fno-common -stdlib=libc++" ++ DSO_LDOPTS='' ++ STRIP="$STRIP -x -S" ++ LDFLAGS="$LDFLAGS -lobjc" ++ # The ExceptionHandling framework is needed for Objective-C exception ++ # logging code in nsObjCExceptions.h. Currently we only use that in debug ++ # builds. ++ _SAVE_LDFLAGS=$LDFLAGS ++ echo $ac_n "checking for -framework ExceptionHandling""... $ac_c" 1>&6 ++echo "configure:4315: checking for -framework ExceptionHandling" >&5 ++ LDFLAGS="$LDFLAGS -framework ExceptionHandling" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_cv_have_framework_exceptionhandling="yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_have_framework_exceptionhandling="no" ++fi ++rm -f conftest* ++ echo "$ac_t""$ac_cv_have_framework_exceptionhandling" 1>&6 ++ if test "$ac_cv_have_framework_exceptionhandling" = "yes"; then ++ MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling"; ++ fi ++ LDFLAGS=$_SAVE_LDFLAGS ++ ++ if test "x$enable_dtrace" = "xyes"; then ++ echo "Skipping -dead_strip because DTrace is enabled. See bug 403132." ++ else ++ echo $ac_n "checking for -dead_strip option to ld""... $ac_c" 1>&6 ++echo "configure:4345: checking for -dead_strip option to ld" >&5 ++ _SAVE_LDFLAGS=$LDFLAGS ++ LDFLAGS="$LDFLAGS -Wl,-dead_strip" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ _HAVE_DEAD_STRIP=1 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ _HAVE_DEAD_STRIP= ++fi ++rm -f conftest* ++ if test -n "$_HAVE_DEAD_STRIP" ; then ++ echo "$ac_t""yes" 1>&6 ++ MOZ_OPTIMIZE_LDFLAGS="-Wl,-dead_strip" ++ else ++ echo "$ac_t""no" 1>&6 ++ fi ++ ++ LDFLAGS=$_SAVE_LDFLAGS ++ fi ++ MOZ_FIX_LINK_PATHS="-Wl,-executable_path,${DIST}/bin" ++ ;; ++ ++*-android*|*-linuxandroid*) ++ cat >> confdefs.pytmp <<\EOF ++ (''' NO_PW_GECOS ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define NO_PW_GECOS 1 ++EOF ++ ++ MOZ_GFX_OPTIMIZE_MOBILE=1 ++ MOZ_OPTIMIZE_FLAGS="-O3" ++ if test -z "$CLANG_CC"; then ++ MOZ_OPTIMIZE_FLAGS="-freorder-blocks -fno-reorder-functions $MOZ_OPTIMIZE_FLAGS" ++ fi ++ ;; ++ ++*-*linux*) ++ if test "$GNU_CC" -o "$GNU_CXX"; then ++ MOZ_PGO_OPTIMIZE_FLAGS="-O3" ++ MOZ_OPTIMIZE_FLAGS="-O3" ++ if test -z "$CLANG_CC"; then ++ MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS" ++ fi ++ fi ++ ++ case "${target_cpu}" in ++ alpha*) ++ CFLAGS="$CFLAGS -mieee" ++ CXXFLAGS="$CXXFLAGS -mieee" ++ ;; ++ esac ++ ;; ++ ++*-mingw*) ++ DSO_CFLAGS= ++ DSO_PIC_CFLAGS= ++ if test -n "$GNU_CC" -o -n "$CLANG_CC"; then ++ CC="$CC -mwindows" ++ CXX="$CXX -mwindows" ++ CPP="$CPP -mwindows" ++ CFLAGS="$CFLAGS -mms-bitfields" ++ CXXFLAGS="$CXXFLAGS -mms-bitfields" ++ DSO_LDOPTS='-shared' ++ # Use temp file for windres (bug 213281) ++ RCFLAGS='-O coff --use-temp-file' ++ # mingw doesn't require kernel32, user32, and advapi32 explicitly ++ LIBS="$LIBS -lusp10 -lgdi32 -lwinmm -lwsock32" ++ MOZ_FIX_LINK_PATHS= ++ ++ if test -z "$CLANG_CC"; then ++ # Use static libgcc and libstdc++ ++ LDFLAGS="$LDFLAGS -static" ++ else ++ # Silence problematic clang warnings ++ CXXFLAGS="$CXXFLAGS -Wno-incompatible-ms-struct" ++ fi ++ ++ MOZ_OPTIMIZE_FLAGS="-O2" ++ ++ WIN32_CONSOLE_EXE_LDFLAGS=-mconsole ++ WIN32_GUI_EXE_LDFLAGS=-mwindows ++ else ++ TARGET_COMPILER_ABI=msvc ++ HOST_CC='$(CC)' ++ HOST_CXX='$(CXX)' ++ RANLIB='echo not_ranlib' ++ STRIP='echo not_strip' ++ PKG_SKIP_STRIP=1 ++ # aarch64 doesn't support subsystems below 6.02 ++ if test "$CPU_ARCH" = "aarch64"; then ++ WIN32_SUBSYSTEM_VERSION=6.02 ++ else ++ WIN32_SUBSYSTEM_VERSION=6.01 ++ fi ++ WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION ++ WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION ++ DSO_LDOPTS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION ++ _USE_CPP_INCLUDE_FLAG=1 ++ _DEFINES_CFLAGS="-FI $jsconfdefs -DMOZILLA_CLIENT" ++ _DEFINES_CXXFLAGS="-FI $jsconfdefs -DMOZILLA_CLIENT" ++ CFLAGS="$CFLAGS -W3 -Gy -Zc:inline" ++ CXXFLAGS="$CXXFLAGS -W3 -Gy -Zc:inline" ++ if test "$CPU_ARCH" = "x86";then ++ ++ if test -z `echo $CFLAGS | grep -i [-/]arch:` ; then ++ CFLAGS="$CFLAGS -arch:SSE2" ++ fi ++ if test -z `echo $CXXFLAGS | grep -i [-/]arch:` ; then ++ CXXFLAGS="$CXXFLAGS -arch:SSE2" ++ fi ++ ++ fi ++ if test -z "$MOZ_ASAN"; then ++ CFLAGS="$CFLAGS -Gw" ++ CXXFLAGS="$CXXFLAGS -Gw" ++ else ++ # String tail merging doesn't play nice with ASan's ODR checker. ++ LDFLAGS="$LDFLAGS -opt:nolldtailmerge" ++ fi ++ if test -n "$CLANG_CL"; then ++ # XXX We should combine some of these with our generic GCC-style ++ # warning checks. ++ # ++ # Suppress the clang-cl warning for the inline 'new' and 'delete' in mozalloc ++ CXXFLAGS="$CXXFLAGS -Wno-inline-new-delete" ++ # We use offsetof on non-POD objects all the time. ++ # We also suppress this warning on other platforms. ++ CXXFLAGS="$CXXFLAGS -Wno-invalid-offsetof" ++ # This warns for reasonable things like: ++ # enum { X = 0xffffffffU }; ++ # which is annoying for IDL headers. ++ CXXFLAGS="$CXXFLAGS -Wno-microsoft-enum-value" ++ # This warns for cases that would be reached by the Microsoft ++ # #include rules, but also currently warns on cases that would ++ # *also* be reached by standard C++ include rules. That ++ # behavior doesn't seem useful, so we turn it off. ++ CXXFLAGS="$CXXFLAGS -Wno-microsoft-include" ++ # We normally error out on unknown pragmas, but since clang-cl ++ # claims to be MSVC, it would be difficult to add ++ # #if defined(_MSC_VER) && !defined(__clang__) everywhere we ++ # use such pragmas, so just ignore them. ++ CFLAGS="$CFLAGS -Wno-unknown-pragmas" ++ CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas" ++ # We get errors about various #pragma intrinsic directives from ++ # clang-cl, and we don't need to hear about those. ++ CFLAGS="$CFLAGS -Wno-ignored-pragmas" ++ CXXFLAGS="$CXXFLAGS -Wno-ignored-pragmas" ++ # clang-cl's Intrin.h marks things like _ReadWriteBarrier ++ # as __attribute((__deprecated__)). This is nice to know, ++ # but since we don't get the equivalent warning from MSVC, ++ # let's just ignore it. ++ CFLAGS="$CFLAGS -Wno-deprecated-declarations" ++ CXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations" ++ # We use a function like: ++ # __declspec(noreturn) __inline void f() {} ++ # which -Winvalid-noreturn complains about. Again, MSVC seems ++ # OK with it, so let's silence the warning. ++ CFLAGS="$CFLAGS -Wno-invalid-noreturn" ++ CXXFLAGS="$CXXFLAGS -Wno-invalid-noreturn" ++ # Missing |override| on virtual function declarations isn't ++ # something that MSVC currently warns about. ++ CXXFLAGS="$CXXFLAGS -Wno-inconsistent-missing-override" ++ # We use -DHAS_EXCEPTIONS=0, which removes the |throw()| ++ # declaration on |operator delete(void*)|. However, clang-cl ++ # must internally declare |operator delete(void*)| differently, ++ # which causes this warning for virtually every file in the ++ # tree. clang-cl doesn't support -fno-exceptions or equivalent, ++ # so there doesn't seem to be any way to convince clang-cl to ++ # declare |delete| differently. Therefore, suppress this ++ # warning. ++ CXXFLAGS="$CXXFLAGS -Wno-implicit-exception-spec-mismatch" ++ # At least one MSVC header and several headers in-tree have ++ # unused typedefs, so turn this on. ++ CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedef" ++ # jemalloc uses __declspec(allocator) as a profiler hint, ++ # which clang-cl doesn't understand. ++ CXXFLAGS="$CXXFLAGS -Wno-ignored-attributes" ++ # __attribute__((unused)) really means "might be unused" and ++ # we use it to avoid warnings about things that are unused ++ # in some compilation units, but used in many others. This ++ # warning insists on complaining about the latter case, which ++ # is annoying, and rather noisy. ++ CXXFLAGS="$CXXFLAGS -Wno-used-but-marked-unused" ++ fi ++ LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib" ++ MOZ_DEBUG_LDFLAGS='-DEBUG' ++ WARNINGS_AS_ERRORS='-WX' ++ MOZ_OPTIMIZE_FLAGS="-O2" ++ MOZ_FIX_LINK_PATHS= ++ LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE" ++ if test -z "$DEVELOPER_OPTIONS"; then ++ LDFLAGS="$LDFLAGS -RELEASE" ++ fi ++ RCFLAGS="-nologo" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE__MSIZE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE__MSIZE 1 ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' WIN32_LEAN_AND_MEAN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define WIN32_LEAN_AND_MEAN 1 ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' NOMINMAX ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define NOMINMAX 1 ++EOF ++ ++ BIN_SUFFIX='.exe' ++ MOZ_USER_DIR="Mozilla" ++ ++ case "$host_os" in ++ cygwin*|msvc*|mks*) ++ { echo "configure: error: Using a Cygwin build environment is unsupported. Configure cannot check for presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&2; echo "configure: error: Using a Cygwin build environment is unsupported. Configure cannot check for presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&5; exit 1; } ++ ;; ++ esac ++ ++ if test -n "$GNU_CC" -a -z "$CLANG_CC"; then ++ CFLAGS="$CFLAGS -fno-keep-inline-dllexport" ++ CXXFLAGS="$CXXFLAGS -fno-keep-inline-dllexport" ++ fi ++ ++ case "$target" in ++ i*86-*) ++ if test -n "$GNU_CC"; then ++ CFLAGS="$CFLAGS -mstackrealign" ++ CXXFLAGS="$CXXFLAGS -mstackrealign" ++ LDFLAGS="$LDFLAGS -Wl,--large-address-aware" ++ else ++ DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X86" ++ LDFLAGS="$LDFLAGS -SAFESEH" ++ fi ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' _X86_ ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _X86_ 1 ++EOF ++ ++ ;; ++ x86_64-*) ++ if test -n "$_WIN32_MSVC"; then ++ DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X64" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' _AMD64_ ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _AMD64_ 1 ++EOF ++ ++ ;; ++ aarch64-*) ++ if test -n "$_WIN32_MSVC"; then ++ DSO_LDOPTS="$DSO_LDOPTS -MACHINE:ARM64" ++ fi ++ cat >> confdefs.pytmp <<\EOF ++ (''' _ARM64_ ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _ARM64_ 1 ++EOF ++ ++ ;; ++ *) ++ cat >> confdefs.pytmp <<\EOF ++ (''' _CPU_ARCH_NOT_DEFINED ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _CPU_ARCH_NOT_DEFINED 1 ++EOF ++ ++ ;; ++ esac ++ ;; ++ ++*-netbsd*) ++ DSO_CFLAGS='' ++ CFLAGS="$CFLAGS -Dunix" ++ CXXFLAGS="$CXXFLAGS -Dunix" ++ if $CC -E - -dM /dev/null; then ++ DSO_PIC_CFLAGS='-fPIC -DPIC' ++ DSO_LDOPTS='-shared' ++ MOZ_PROGRAM_LDFLAGS="$MOZ_PROGRAM_LDFLAGS -Wl,--export-dynamic" ++ else ++ DSO_PIC_CFLAGS='-fPIC -DPIC' ++ DSO_LDOPTS='-shared' ++ fi ++ # This will fail on a.out systems prior to 1.5.1_ALPHA. ++ if test "$LIBRUNPATH"; then ++ DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS" ++ fi ++ ;; ++ ++*-openbsd*) ++ DSO_CFLAGS='' ++ DSO_PIC_CFLAGS='-fPIC' ++ DSO_LDOPTS='-shared -fPIC' ++ if test "$LIBRUNPATH"; then ++ DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS" ++ fi ++ ;; ++ ++*-solaris*) ++ MOZ_FIX_LINK_PATHS="-L${DIST}/bin" ++ ;; ++ ++esac ++ ++if test -z "$MOZ_OPTIMIZE_FLAGS"; then ++ MOZ_OPTIMIZE_FLAGS="-O" ++fi ++ ++if test -z "$COMPILE_ENVIRONMENT"; then ++ SKIP_COMPILER_CHECKS=1 ++ SKIP_LIBRARY_CHECKS=1 ++fi ++ ++if test -n "$COMPILE_ENVIRONMENT"; then ++ ++ ++ ++if test -z "$MOZ_DEBUG" -o -n "$MOZ_ASAN"; then ++ MOZ_NO_DEBUG_RTL=1 ++fi ++ ++ ++ ++MOZ_DEBUG_ENABLE_DEFS="DEBUG" ++# Check whether --with-debug-label or --without-debug-label was given. ++if test "${with_debug_label+set}" = set; then ++ withval="$with_debug_label" ++ for option in `echo $withval | sed 's/,/ /g'`; do ++ MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS DEBUG_${option}" ++done ++fi ++ ++ ++if test -n "$MOZ_DEBUG"; then ++ if test -n "$COMPILE_ENVIRONMENT"; then ++ echo $ac_n "checking for valid debug flags""... $ac_c" 1>&6 ++echo "configure:4707: checking for valid debug flags" >&5 ++ _SAVE_CFLAGS=$CFLAGS ++ CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS" ++ cat > conftest.$ac_ext < ++int main() { ++printf("Hello World\n"); ++; return 0; } ++EOF ++if { (eval echo configure:4718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ _results=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ _results=no ++fi ++rm -f conftest* ++ echo "$ac_t""$_results" 1>&6 ++ if test "$_results" = "no"; then ++ { echo "configure: error: These compiler flags are invalid: $MOZ_DEBUG_FLAGS" 1>&2; echo "configure: error: These compiler flags are invalid: $MOZ_DEBUG_FLAGS" 1>&5; exit 1; } ++ fi ++ CFLAGS=$_SAVE_CFLAGS ++ fi ++ ++ MOZ_DEBUG_DEFINES="$MOZ_DEBUG_ENABLE_DEFS" ++else ++ MOZ_DEBUG_DEFINES="NDEBUG TRIMMED" ++fi ++ ++ ++ ++ ++ ++# Check whether --enable-cpp-rtti or --disable-cpp-rtti was given. ++if test "${enable_cpp_rtti+set}" = set; then ++ enableval="$enable_cpp_rtti" ++ if test "$enableval" = "yes"; then ++ _MOZ_USE_RTTI=1 ++ elif test "$enableval" = "no"; then ++ _MOZ_USE_RTTI= ++ else ++ { echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++if test -z "$_MOZ_USE_RTTI"; then ++ if test "$GNU_CC"; then ++ CXXFLAGS="$CXXFLAGS -fno-rtti" ++ else ++ case "$target" in ++ *-mingw*) ++ CXXFLAGS="$CXXFLAGS -GR-" ++ esac ++ fi ++fi ++ ++if test "$CLANG_CXX"; then ++ ## We disable return-type-c-linkage because jsval is defined as a C++ type but is ++ ## returned by C functions. This is possible because we use knowledge about the ABI ++ ## to typedef it to a C type with the same layout when the headers are included ++ ## from C. ++ _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-unknown-warning-option -Wno-return-type-c-linkage" ++fi ++ ++if test "$GNU_CC"; then ++ if test -z "$DEVELOPER_OPTIONS"; then ++ CFLAGS="$CFLAGS -ffunction-sections -fdata-sections" ++ CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections" ++ fi ++ ++ # For MinGW, we need big-obj otherwise we create too many sections in Unified builds ++ if test "${OS_ARCH}" = "WINNT"; then ++ CFLAGS="$CFLAGS -Wa,-mbig-obj" ++ CXXFLAGS="$CXXFLAGS -Wa,-mbig-obj" ++ fi ++ ++ CFLAGS="$CFLAGS -fno-math-errno" ++ CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-math-errno" ++fi ++ ++ ++# Check whether --enable-icf or --disable-icf was given. ++if test "${enable_icf+set}" = set; then ++ enableval="$enable_icf" ++ if test "$enableval" = "no"; then ++ MOZ_DISABLE_ICF=1 ++ elif test "$enableval" = "yes"; then ++ MOZ_DISABLE_ICF= ++ else ++ { echo "configure: error: Option, icf, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, icf, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$MOZ_DISABLE_ICF" -a -z "$DEVELOPER_OPTIONS"; then ++ echo $ac_n "checking whether the linker supports Identical Code Folding""... $ac_c" 1>&6 ++echo "configure:4808: checking whether the linker supports Identical Code Folding" >&5 ++if eval "test \"`echo '$''{'LD_SUPPORTS_ICF'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ echo 'int foo() {return 42;}' \ ++ 'int bar() {return 42;}' \ ++ 'int main() {return foo() - bar();}' > conftest.${ac_ext} ++ # If the linker supports ICF, foo and bar symbols will have ++ # the same address ++ if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,--icf=safe -ffunction-sections conftest.${ac_ext} $LIBS 1>&2'; { (eval echo configure:4817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && ++ test -s conftest${ac_exeext} && ++ $LLVM_OBJDUMP -t conftest${ac_exeext} | awk '{a[$6] = $1} END {if (a["foo"] && (a["foo"] != a["bar"])) { exit 1 }}'; then ++ LD_SUPPORTS_ICF=yes ++ else ++ LD_SUPPORTS_ICF=no ++ fi ++ rm -rf conftest* ++fi ++ ++echo "$ac_t""$LD_SUPPORTS_ICF" 1>&6 ++ if test "$LD_SUPPORTS_ICF" = yes; then ++ _SAVE_LDFLAGS="$LDFLAGS -Wl,--icf=safe" ++ LDFLAGS="$LDFLAGS -Wl,--icf=safe -Wl,--print-icf-sections" ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ LD_PRINT_ICF_SECTIONS=-Wl,--print-icf-sections ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ LD_PRINT_ICF_SECTIONS= ++fi ++rm -f conftest* ++ ++ LDFLAGS="$_SAVE_LDFLAGS" ++ fi ++fi ++ ++ ++if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$DEVELOPER_OPTIONS"; then ++ if test -n "$MOZ_DEBUG_FLAGS"; then ++ echo $ac_n "checking whether removing dead symbols breaks debugging""... $ac_c" 1>&6 ++echo "configure:4858: checking whether removing dead symbols breaks debugging" >&5 ++if eval "test \"`echo '$''{'GC_SECTIONS_BREAKS_DEBUG_RANGES'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ echo 'int foo() {return 42;}' \ ++ 'int bar() {return 1;}' \ ++ 'int main() {return foo();}' > conftest.${ac_ext} ++ if { ac_try='${CC-cc} -o conftest.${ac_objext} $CFLAGS $MOZ_DEBUG_FLAGS -c conftest.${ac_ext} 1>&2'; { (eval echo configure:4865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && ++ { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS $MOZ_DEBUG_FLAGS -Wl,--gc-sections conftest.${ac_objext} $LIBS 1>&2'; { (eval echo configure:4866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && ++ test -s conftest${ac_exeext} -a -s conftest.${ac_objext}; then ++ if test "`$PYTHON -m mozbuild.configure.check_debug_ranges conftest.${ac_objext} conftest.${ac_ext}`" = \ ++ "`$PYTHON -m mozbuild.configure.check_debug_ranges conftest${ac_exeext} conftest.${ac_ext}`"; then ++ GC_SECTIONS_BREAKS_DEBUG_RANGES=no ++ else ++ GC_SECTIONS_BREAKS_DEBUG_RANGES=yes ++ fi ++ else ++ GC_SECTIONS_BREAKS_DEBUG_RANGES="no, but it's broken in some other way" ++ fi ++ rm -rf conftest* ++fi ++ ++echo "$ac_t""$GC_SECTIONS_BREAKS_DEBUG_RANGES" 1>&6 ++ if test "$GC_SECTIONS_BREAKS_DEBUG_RANGES" = no; then ++ DSO_LDOPTS="$DSO_LDOPTS -Wl,--gc-sections" ++ fi ++ else ++ DSO_LDOPTS="$DSO_LDOPTS -Wl,--gc-sections" ++ fi ++fi ++ ++if test "$GNU_CC$CLANG_CC"; then ++ MOZ_PROGRAM_LDFLAGS="$MOZ_PROGRAM_LDFLAGS -pie" ++fi ++ ++ ++ ++if test -n "$GCC_USE_GNU_LD"; then ++ case "$LDFLAGS" in ++ *-fsanitize=address*) ++ LDFLAGS="$LDFLAGS -Wl,-Bsymbolic" ++ ;; ++ esac ++fi ++ ++ ++fi ++ ++if test -z "$SKIP_COMPILER_CHECKS"; then ++echo $ac_n "checking for working const""... $ac_c" 1>&6 ++echo "configure:4908: checking for working const" >&5 ++if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext <j = 5; ++} ++{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ ++ const int foo = 10; ++} ++ ++; return 0; } ++EOF ++if { (eval echo configure:4962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ac_cv_c_const=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_c_const=no ++fi ++rm -f conftest* ++fi ++ ++echo "$ac_t""$ac_cv_c_const" 1>&6 ++if test $ac_cv_c_const = no; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' const ''', r''' ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define const ++EOF ++ ++fi ++ ++ ++ ++echo $ac_n "checking for mode_t""... $ac_c" 1>&6 ++echo "configure:4988: checking for mode_t" >&5 ++if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#if STDC_HEADERS ++#include ++#include ++#endif ++EOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then ++ rm -rf conftest* ++ ac_cv_type_mode_t=yes ++else ++ rm -rf conftest* ++ ac_cv_type_mode_t=no ++fi ++rm -f conftest* ++ ++fi ++echo "$ac_t""$ac_cv_type_mode_t" 1>&6 ++if test $ac_cv_type_mode_t = no; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' mode_t ''', r''' int ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define mode_t int ++EOF ++ ++fi ++ ++ ++ ++echo $ac_n "checking for off_t""... $ac_c" 1>&6 ++echo "configure:5026: checking for off_t" >&5 ++if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#if STDC_HEADERS ++#include ++#include ++#endif ++EOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then ++ rm -rf conftest* ++ ac_cv_type_off_t=yes ++else ++ rm -rf conftest* ++ ac_cv_type_off_t=no ++fi ++rm -f conftest* ++ ++fi ++echo "$ac_t""$ac_cv_type_off_t" 1>&6 ++if test $ac_cv_type_off_t = no; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' off_t ''', r''' long ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define off_t long ++EOF ++ ++fi ++ ++ ++ ++echo $ac_n "checking for pid_t""... $ac_c" 1>&6 ++echo "configure:5064: checking for pid_t" >&5 ++if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#if STDC_HEADERS ++#include ++#include ++#endif ++EOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then ++ rm -rf conftest* ++ ac_cv_type_pid_t=yes ++else ++ rm -rf conftest* ++ ac_cv_type_pid_t=no ++fi ++rm -f conftest* ++ ++fi ++echo "$ac_t""$ac_cv_type_pid_t" 1>&6 ++if test $ac_cv_type_pid_t = no; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' pid_t ''', r''' int ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define pid_t int ++EOF ++ ++fi ++ ++ ++ ++echo $ac_n "checking for size_t""... $ac_c" 1>&6 ++echo "configure:5102: checking for size_t" >&5 ++if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#if STDC_HEADERS ++#include ++#include ++#endif ++EOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then ++ rm -rf conftest* ++ ac_cv_type_size_t=yes ++else ++ rm -rf conftest* ++ ac_cv_type_size_t=no ++fi ++rm -f conftest* ++ ++fi ++echo "$ac_t""$ac_cv_type_size_t" 1>&6 ++if test $ac_cv_type_size_t = no; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' size_t ''', r''' unsigned ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define size_t unsigned ++EOF ++ ++fi ++ ++ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 ++echo "configure:5160: checking for ssize_t" >&5 ++if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++ #include ++int main() { ++ssize_t foo = 0; ++; return 0; } ++EOF ++if { (eval echo configure:5173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ac_cv_type_ssize_t=true ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_type_ssize_t=false ++fi ++rm -f conftest* ++fi ++ ++if test "$ac_cv_type_ssize_t" = true ; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_SSIZE_T ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_SSIZE_T 1 ++EOF ++ ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++ ++ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++if test "$GNU_CXX"; then ++ echo $ac_n "checking whether 64-bits std::atomic requires -latomic""... $ac_c" 1>&6 ++echo "configure:5224: checking whether 64-bits std::atomic requires -latomic" >&5 ++if eval "test \"`echo '$''{'ac_cv_needs_atomic'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test "$CC_TYPE" = "clang" -a "$CPU_ARCH" = "x86" -a "$OS_ARCH" = "Linux"; then ++ ac_cv_needs_atomic=yes ++ else ++ cat > conftest.$ac_ext < ++ #include ++int main() { ++ std::atomic foo; foo = 1; ++; return 0; } ++EOF ++if { (eval echo configure:5240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_cv_needs_atomic=no ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ _SAVE_LIBS="$LIBS" ++ LIBS="$LIBS -latomic" ++ cat > conftest.$ac_ext < ++ #include ++int main() { ++ std::atomic foo; foo = 1; ++; return 0; } ++EOF ++if { (eval echo configure:5258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_cv_needs_atomic=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_needs_atomic="do not know; assuming no" ++fi ++rm -f conftest* ++ LIBS="$_SAVE_LIBS" ++ ++fi ++rm -f conftest* ++ fi ++ ++fi ++ ++echo "$ac_t""$ac_cv_needs_atomic" 1>&6 ++ if test "$ac_cv_needs_atomic" = yes; then ++ MOZ_NEEDS_LIBATOMIC=1 ++ else ++ MOZ_NEEDS_LIBATOMIC= ++ fi ++ ++fi ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++ ++case "${OS_TARGET}" in ++WINNT|Darwin|Android) ++ ;; ++*) ++ STL_FLAGS="-I${DIST}/stl_wrappers" ++ WRAP_STL_INCLUDES=1 ++ ;; ++esac ++ ++ac_header_dirent=no ++for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h ++do ++ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ++echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 ++echo "configure:5311: checking for $ac_hdr that defines DIR" >&5 ++if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#include <$ac_hdr> ++int main() { ++DIR *dirp = 0; ++; return 0; } ++EOF ++if { (eval echo configure:5324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ eval "ac_cv_header_dirent_$ac_safe=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_header_dirent_$ac_safe=no" ++fi ++rm -f conftest* ++fi ++if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++done ++# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. ++if test $ac_header_dirent = dirent.h; then ++echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 ++echo "configure:5352: checking for opendir in -ldir" >&5 ++ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-ldir $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ LIBS="$LIBS -ldir" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++else ++echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 ++echo "configure:5393: checking for opendir in -lx" >&5 ++ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lx $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ LIBS="$LIBS -lx" ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++fi ++ ++case "$target_os" in ++freebsd*) ++# for stuff like -lXshm ++ CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}" ++ ;; ++esac ++ ++# Check whether --enable-dtrace or --disable-dtrace was given. ++if test "${enable_dtrace+set}" = set; then ++ enableval="$enable_dtrace" ++ if test "$enableval" = "yes"; then ++ enable_dtrace="yes" ++ elif test "$enableval" = "no"; then ++ : ++ else ++ { echo "configure: error: Option, dtrace, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, dtrace, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++if test "x$enable_dtrace" = "xyes"; then ++ ac_safe=`echo "sys/sdt.h" | sed 'y%./+-%__p_%'` ++ echo $ac_n "checking for sys/sdt.h""... $ac_c" 1>&6 ++echo "configure:5456: checking for sys/sdt.h" >&5 ++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++int main() { ++ ++; return 0; } ++EOF ++if { (eval echo configure:5469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=no" ++fi ++rm -f conftest* ++fi ++ ++ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ HAVE_DTRACE=1 ++ else ++ echo "$ac_t""no" 1>&6 ++ ++ fi ++ ++ if test -n "$HAVE_DTRACE"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' INCLUDE_MOZILLA_DTRACE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define INCLUDE_MOZILLA_DTRACE 1 ++EOF ++ ++ else ++ { echo "configure: error: dtrace enabled but sys/sdt.h not found" 1>&2; echo "configure: error: dtrace enabled but sys/sdt.h not found" 1>&5; exit 1; }; ++ fi ++fi ++ ++ ++echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6 ++echo "configure:5504: checking for gethostbyname_r in -lc_r" >&5 ++ac_lib_var=`echo c_r'_'gethostbyname_r | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lc_r $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_lib=HAVE_LIB`echo c_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \ ++ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++ ++ ++case $target in ++*-darwin*) ++ ;; ++*) ++ ++echo $ac_n "checking for library containing dlopen""... $ac_c" 1>&6 ++echo "configure:5560: checking for library containing dlopen" >&5 ++if eval "test \"`echo '$''{'ac_cv_search_dlopen'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_func_search_save_LIBS="$LIBS" ++ac_cv_search_dlopen="no" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_cv_search_dlopen="none required" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++fi ++rm -f conftest* ++test "$ac_cv_search_dlopen" = "no" && for i in dl; do ++LIBS="-l$i $ac_func_search_save_LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_cv_search_dlopen="-l$i" ++break ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++fi ++rm -f conftest* ++done ++LIBS="$ac_func_search_save_LIBS" ++fi ++ ++echo "$ac_t""$ac_cv_search_dlopen" 1>&6 ++if test "$ac_cv_search_dlopen" != "no"; then ++ test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS" ++ ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` ++ echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 ++echo "configure:5618: checking for dlfcn.h" >&5 ++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++int main() { ++ ++; return 0; } ++EOF ++if { (eval echo configure:5631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=no" ++fi ++rm -f conftest* ++fi ++ ++ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_DLOPEN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_DLOPEN 1 ++EOF ++ ++ else ++ echo "$ac_t""no" 1>&6 ++ ++ fi ++ ++else : ++ ++fi ++ ;; ++esac ++ ++if test ! "$GNU_CXX"; then ++ echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6 ++echo "configure:5665: checking for demangle in -lC" >&5 ++ac_lib_var=`echo C'_'demangle | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lC $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_lib=HAVE_LIB`echo C | sed -e 's/[^a-zA-Z0-9_]/_/g' \ ++ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++ ++fi ++ ++echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 ++echo "configure:5717: checking for socket in -lsocket" >&5 ++ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lsocket $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ ++ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++ ++ ++case "$target_os" in ++darwin*) ++ USE_PTHREADS=1 ++ ;; ++*) ++ echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 ++echo "configure:5773: checking for pthread_create in -lpthreads" >&5 ++ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lpthreads $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads" ++else ++ echo "$ac_t""no" 1>&6 ++echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 ++echo "configure:5811: checking for pthread_create in -lpthread" >&5 ++ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lpthread $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread" ++else ++ echo "$ac_t""no" 1>&6 ++echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 ++echo "configure:5849: checking for pthread_create in -lc_r" >&5 ++ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lc_r $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r" ++else ++ echo "$ac_t""no" 1>&6 ++echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 ++echo "configure:5887: checking for pthread_create in -lc" >&5 ++ac_lib_var=`echo c'_'pthread_create | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lc $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ USE_PTHREADS=1 ++ ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ ++fi ++ ++ ++fi ++ ++ ++fi ++ ++ ;; ++esac ++ ++if test "$USE_PTHREADS"x != x ++then ++ rm -f conftest* ++ ac_cv_have_dash_pthread=no ++ echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6 ++echo "configure:5944: checking whether ${CC-cc} accepts -pthread" >&5 ++ echo 'int main() { return 0; }' | cat > conftest.c ++ ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1 ++ if test $? -eq 0; then ++ if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" -a -z "`egrep -i '(error|incorrect)' conftest.out`" ; then ++ ac_cv_have_dash_pthread=yes ++ case "$target_os" in ++ freebsd*) ++# Freebsd doesn't use -pthread for compiles, it uses them for linking ++ ;; ++ *) ++ CFLAGS="$CFLAGS -pthread" ++ CXXFLAGS="$CXXFLAGS -pthread" ++ ;; ++ esac ++ fi ++ fi ++ rm -f conftest* ++ echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6 ++ ++ ac_cv_have_dash_pthreads=no ++ if test "$ac_cv_have_dash_pthread" = "no"; then ++ echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6 ++echo "configure:5967: checking whether ${CC-cc} accepts -pthreads" >&5 ++ echo 'int main() { return 0; }' | cat > conftest.c ++ ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1 ++ if test $? -eq 0; then ++ if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" -a -z "`egrep -i '(error|incorrect)' conftest.out`" ; then ++ ac_cv_have_dash_pthreads=yes ++ CFLAGS="$CFLAGS -pthreads" ++ CXXFLAGS="$CXXFLAGS -pthreads" ++ fi ++ fi ++ rm -f conftest* ++ echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6 ++ fi ++ ++ case "$target" in ++ *-*-freebsd*) ++ cat >> confdefs.pytmp <<\EOF ++ (''' _REENTRANT ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _REENTRANT 1 ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' _THREAD_SAFE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _THREAD_SAFE 1 ++EOF ++ ++ if test "$ac_cv_have_dash_pthread" = "yes"; then ++ _PTHREAD_LDFLAGS="-pthread" ++ fi ++ ;; ++ ++ *-*-openbsd*|*-*-bsdi*) ++ cat >> confdefs.pytmp <<\EOF ++ (''' _REENTRANT ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _REENTRANT 1 ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' _THREAD_SAFE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _THREAD_SAFE 1 ++EOF ++ ++ if test "$ac_cv_have_dash_pthread" = "yes"; then ++ _PTHREAD_LDFLAGS="-pthread" ++ fi ++ ;; ++ ++ *-*-linux*|*-*-kfreebsd*-gnu|*-*-gnu*) ++ cat >> confdefs.pytmp <<\EOF ++ (''' _REENTRANT ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define _REENTRANT 1 ++EOF ++ ++ ;; ++ ++ esac ++ LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}" ++fi ++ ++ ++for ac_func in getc_unlocked _getc_nolock gmtime_r localtime_r pthread_getname_np pthread_get_name_np ++do ++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++echo "configure:6040: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef $ac_func ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:6072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++done ++ ++ ++echo $ac_n "checking for clock_gettime(CLOCK_MONOTONIC)""... $ac_c" 1>&6 ++echo "configure:6101: checking for clock_gettime(CLOCK_MONOTONIC)" >&5 ++if eval "test \"`echo '$''{'ac_cv_clock_monotonic'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ for libs in "" -lrt; do ++ _SAVE_LIBS="$LIBS" ++ _SAVE_CFLAGS="$CFLAGS" ++ LIBS="$LIBS $libs" ++ CFLAGS="$CFLAGS $DSO_PIC_CFLAGS" ++ cat > conftest.$ac_ext < ++int main() { ++ struct timespec ts; ++ clock_gettime(CLOCK_MONOTONIC, &ts); ++; return 0; } ++EOF ++if { (eval echo configure:6120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_cv_clock_monotonic=$libs ++ LIBS="$_SAVE_LIBS" ++ break ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_clock_monotonic=no ++fi ++rm -f conftest* ++ LIBS="$_SAVE_LIBS" ++ CFLAGS="$_SAVE_CFLAGS" ++ done ++fi ++ ++echo "$ac_t""$ac_cv_clock_monotonic" 1>&6 ++if test "$ac_cv_clock_monotonic" != "no"; then ++ HAVE_CLOCK_MONOTONIC=1 ++ REALTIME_LIBS=$ac_cv_clock_monotonic ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_CLOCK_MONOTONIC ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_CLOCK_MONOTONIC 1 ++EOF ++ ++ ++ ++fi ++ ++echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 ++echo "configure:6153: checking for sin in -lm" >&5 ++ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lm $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ ++ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++ ++echo $ac_n "checking for sincos in -lm""... $ac_c" 1>&6 ++echo "configure:6203: checking for sincos in -lm" >&5 ++ac_lib_var=`echo m'_'sincos | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lm $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_SINCOS ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_SINCOS 1 ++EOF ++ ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++echo $ac_n "checking for __sincos in -lm""... $ac_c" 1>&6 ++echo "configure:6249: checking for __sincos in -lm" >&5 ++ac_lib_var=`echo m'_'__sincos | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lm $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE___SINCOS ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE___SINCOS 1 ++EOF ++ ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ ++echo $ac_n "checking for res_ninit()""... $ac_c" 1>&6 ++echo "configure:6296: checking for res_ninit()" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_res_ninit'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ if test "$OS_TARGET" = NetBSD -o "$OS_TARGET" = OpenBSD; then ++ ac_cv_func_res_ninit=no ++ else ++ cat > conftest.$ac_ext < ++ #include ++ #include ++ #include ++ ++int main() { ++int foo = res_ninit(&_res); ++; return 0; } ++EOF ++if { (eval echo configure:6319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_cv_func_res_ninit=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_func_res_ninit=no ++fi ++rm -f conftest* ++ fi ++ ++fi ++ ++echo "$ac_t""$ac_cv_func_res_ninit" 1>&6 ++ ++if test "$ac_cv_func_res_ninit" = "yes"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_RES_NINIT ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_RES_NINIT 1 ++EOF ++ ++fi ++ ++ ++ echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 ++echo "configure:6347: checking for nl_langinfo and CODESET" >&5 ++if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++int main() { ++char* cs = nl_langinfo(CODESET); ++; return 0; } ++EOF ++if { (eval echo configure:6359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ am_cv_langinfo_codeset=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ am_cv_langinfo_codeset=no ++fi ++rm -f conftest* ++ ++fi ++ ++echo "$ac_t""$am_cv_langinfo_codeset" 1>&6 ++ if test $am_cv_langinfo_codeset = yes; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_LANGINFO_CODESET ''', r''' 1 ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_LANGINFO_CODESET 1 ++EOF ++ ++ HAVE_LANGINFO_CODESET=1 ++ fi ++ ++ ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++echo $ac_n "checking for an implementation of va_copy()""... $ac_c" 1>&6 ++echo "configure:6399: checking for an implementation of va_copy()" >&5 ++if eval "test \"`echo '$''{'ac_cv_va_copy'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++ #include ++ void f (int i, ...) { ++ va_list args1, args2; ++ va_start (args1, i); ++ va_copy (args2, args1); ++ if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) ++ exit (1); ++ va_end (args1); va_end (args2); ++ } ++int main() { ++f(0, 42); return 0 ++; return 0; } ++EOF ++if { (eval echo configure:6420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ac_cv_va_copy=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_va_copy=no ++ ++fi ++rm -f conftest* ++ ++fi ++ ++echo "$ac_t""$ac_cv_va_copy" 1>&6 ++echo $ac_n "checking whether va_list can be copied by value""... $ac_c" 1>&6 ++echo "configure:6436: checking whether va_list can be copied by value" >&5 ++if eval "test \"`echo '$''{'ac_cv_va_val_copy'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++ #include ++ void f (int i, ...) { ++ va_list args1, args2; ++ va_start (args1, i); ++ args2 = args1; ++ if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) ++ exit (1); ++ va_end (args1); va_end (args2); ++ } ++int main() { ++f(0, 42); return 0 ++; return 0; } ++EOF ++if { (eval echo configure:6457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ac_cv_va_val_copy=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_va_val_copy=no ++fi ++rm -f conftest* ++ ++fi ++ ++echo "$ac_t""$ac_cv_va_val_copy" 1>&6 ++if test "x$ac_cv_va_copy" = "xyes"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' VA_COPY ''', r''' va_copy ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define VA_COPY va_copy ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_VA_COPY ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_VA_COPY 1 ++EOF ++ ++fi ++ ++if test "x$ac_cv_va_val_copy" = "xno"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_VA_LIST_AS_ARRAY ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_VA_LIST_AS_ARRAY 1 ++EOF ++ ++fi ++ ++ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++ARM_ABI_PREFIX= ++if test "$GNU_CC"; then ++ if test "$CPU_ARCH" = "arm" ; then ++ echo $ac_n "checking for ARM EABI""... $ac_c" 1>&6 ++echo "configure:6514: checking for ARM EABI" >&5 ++if eval "test \"`echo '$''{'ac_cv_gcc_arm_eabi'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ac_cv_gcc_arm_eabi="yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_gcc_arm_eabi="no" ++fi ++rm -f conftest* ++fi ++ ++echo "$ac_t""$ac_cv_gcc_arm_eabi" 1>&6 ++ if test "$ac_cv_gcc_arm_eabi" = "yes"; then ++ HAVE_ARM_EABI=1 ++ ARM_ABI_PREFIX=eabi- ++ else ++ ARM_ABI_PREFIX=oabi- ++ fi ++ fi ++ ++ TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc3}" ++fi ++ ++# try harder, when checking for __thread support, see bug 521750 comment #33 and below ++# We pass MOZ_OPTIMIZE_LDFLAGS to the linker because if dead_strip is ++# enabled, the linker in xcode 4.1 will crash. Without this it would crash when ++# linking XUL. ++_SAVE_LDFLAGS=$LDFLAGS ++LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS $DSO_LDOPTS $MOZ_OPTIMIZE_LDFLAGS" ++echo $ac_n "checking for __thread keyword for TLS variables""... $ac_c" 1>&6 ++echo "configure:6563: checking for __thread keyword for TLS variables" >&5 ++if eval "test \"`echo '$''{'ac_cv_thread_keyword'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ ac_cv_thread_keyword=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_thread_keyword=no ++fi ++rm -f conftest* ++fi ++ ++echo "$ac_t""$ac_cv_thread_keyword" 1>&6 ++LDFLAGS=$_SAVE_LDFLAGS ++if test "$ac_cv_thread_keyword" = yes; then ++ # mips builds fail with TLS variables because of a binutils bug. ++ # See bug 528687 ++ case "${target}" in ++ mips*-*) ++ : ++ ;; ++ *-android*|*-linuxandroid*) ++ : ++ ;; ++ *) ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_THREAD_TLS_KEYWORD ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_THREAD_TLS_KEYWORD 1 ++EOF ++ ++ ;; ++ esac ++fi ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++ ++for ac_func in localeconv ++do ++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++echo "configure:6627: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef $ac_func ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:6659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++done ++ ++fi # ! SKIP_COMPILER_CHECKS ++ ++TARGET_XPCOM_ABI= ++if test -n "${CPU_ARCH}" -a -n "${TARGET_COMPILER_ABI}"; then ++ TARGET_XPCOM_ABI="${CPU_ARCH}-${TARGET_COMPILER_ABI}" ++fi ++ ++ ++if test -n "$SKIP_COMPILER_CHECKS"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' MALLOC_H ''', r''' ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define MALLOC_H ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_FORCEINLINE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_FORCEINLINE 1 ++EOF ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_LOCALECONV ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_LOCALECONV 1 ++EOF ++ ++fi # SKIP_COMPILER_CHECKS ++ ++ ++# External Packages ++ ++ ++ ++ ++ ++ ++# Check whether --with-nspr-cflags or --without-nspr-cflags was given. ++if test "${with_nspr_cflags+set}" = set; then ++ withval="$with_nspr_cflags" ++ NSPR_CFLAGS=$withval ++fi ++ ++# Check whether --with-nspr-libs or --without-nspr-libs was given. ++if test "${with_nspr_libs+set}" = set; then ++ withval="$with_nspr_libs" ++ NSPR_LIBS=$withval ++fi ++ ++ ++ ++ # Check whether --enable-nspr-build or --disable-nspr-build was given. ++if test "${enable_nspr_build+set}" = set; then ++ enableval="$enable_nspr_build" ++ if test "$enableval" = "yes"; then ++ MOZ_BUILD_NSPR=1 ++ elif test "$enableval" = "no"; then ++ MOZ_BUILD_NSPR= ++ else ++ { echo "configure: error: Option, nspr-build, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, nspr-build, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++ ++if test "$MOZ_BUILD_APP" != js || test -n "$JS_STANDALONE"; then ++ _IS_OUTER_CONFIGURE=1 ++fi ++ ++# Check whether --with-system-nspr or --without-system-nspr was given. ++if test "${with_system_nspr+set}" = set; then ++ withval="$with_system_nspr" ++ if test "$withval" = "yes"; then ++ _USE_SYSTEM_NSPR=1 ++ elif test "$withval" = "no"; then ++ : ++ else ++ { echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++JS_POSIX_NSPR=unset ++ ++ if test -n "$JS_STANDALONE"; then ++ case "$target" in ++ *linux*|*darwin*|*dragonfly*|*freebsd*|*netbsd*|*openbsd*) ++ if test -z "$_HAS_NSPR"; then ++ JS_POSIX_NSPR_DEFAULT=1 ++ fi ++ ;; ++ esac ++ fi ++ ++ # Check whether --enable-posix-nspr-emulation or --disable-posix-nspr-emulation was given. ++if test "${enable_posix_nspr_emulation+set}" = set; then ++ enableval="$enable_posix_nspr_emulation" ++ if test "$enableval" = "yes"; then ++ JS_POSIX_NSPR=1 ++ elif test "$enableval" = "no"; then ++ JS_POSIX_NSPR= ++ else ++ { echo "configure: error: Option, posix-nspr-emulation, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, posix-nspr-emulation, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++ ++ ++echo $ac_n "checking NSPR selection""... $ac_c" 1>&6 ++echo "configure:6799: checking NSPR selection" >&5 ++nspr_opts= ++which_nspr=default ++if test -n "$_USE_SYSTEM_NSPR"; then ++ nspr_opts="x$nspr_opts" ++ which_nspr="system" ++fi ++if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then ++ nspr_opts="x$nspr_opts" ++ which_nspr="command-line" ++fi ++if test -n "$MOZ_BUILD_NSPR"; then ++ nspr_opts="x$nspr_opts" ++ which_nspr="source-tree" ++fi ++if test "$JS_POSIX_NSPR" = unset; then ++ JS_POSIX_NSPR= ++else ++ nspr_opts="x$nspr_opts" ++ which_nspr="posix-wrapper" ++fi ++ ++if test -z "$nspr_opts"; then ++ if test "$MOZ_BUILD_APP" != js; then ++ MOZ_BUILD_NSPR=1 ++ which_nspr="source-tree" ++ else ++ JS_POSIX_NSPR="$JS_POSIX_NSPR_DEFAULT" ++ if test -z "$JS_POSIX_NSPR"; then ++ MOZ_BUILD_NSPR=1 ++ which_nspr="source-tree" ++ else ++ which_nspr="posix-wrapper" ++ fi ++ fi ++fi ++ ++if test -z "$nspr_opts" || test "$nspr_opts" = x; then ++ echo "$ac_t""$which_nspr" 1>&6 ++else ++ { echo "configure: error: only one way of using NSPR may be selected. See 'configure --help'." 1>&2; echo "configure: error: only one way of using NSPR may be selected. See 'configure --help'." 1>&5; exit 1; } ++fi ++ ++ ++ ++if test "$MOZ_BUILD_APP" = js; then ++ if test "$JS_POSIX_NSPR" = 1; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' JS_POSIX_NSPR ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define JS_POSIX_NSPR 1 ++EOF ++ ++ fi ++ ++fi ++ ++# A (sub)configure invoked by the toplevel configure will always receive ++# --with-nspr-libs on the command line. It will never need to figure out ++# anything itself. ++if test -n "$_IS_OUTER_CONFIGURE"; then ++ ++if test -n "$_USE_SYSTEM_NSPR"; then ++ ++# Check whether --with-nspr-prefix or --without-nspr-prefix was given. ++if test "${with_nspr_prefix+set}" = set; then ++ withval="$with_nspr_prefix" ++ nspr_config_prefix="$withval" ++else ++ nspr_config_prefix="" ++fi ++ ++ ++# Check whether --with-nspr-exec-prefix or --without-nspr-exec-prefix was given. ++if test "${with_nspr_exec_prefix+set}" = set; then ++ withval="$with_nspr_exec_prefix" ++ nspr_config_exec_prefix="$withval" ++else ++ nspr_config_exec_prefix="" ++fi ++ ++ ++ if test -n "$nspr_config_exec_prefix"; then ++ nspr_config_args="$nspr_config_args --exec-prefix=$nspr_config_exec_prefix" ++ if test -z "$NSPR_CONFIG"; then ++ NSPR_CONFIG=$nspr_config_exec_prefix/bin/nspr-config ++ fi ++ fi ++ if test -n "$nspr_config_prefix"; then ++ nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix" ++ if test -z "$NSPR_CONFIG"; then ++ NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config ++ fi ++ fi ++ ++ unset ac_cv_path_NSPR_CONFIG ++ # Extract the first word of "nspr-config", so it can be a program name with args. ++set dummy nspr-config; ac_word=$2 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ++echo "configure:6899: checking for $ac_word" >&5 ++if eval "test \"`echo '$''{'ac_cv_path_NSPR_CONFIG'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ case "$NSPR_CONFIG" in ++ /*) ++ ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a path. ++ ;; ++ ?:/*) ++ ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a dos path. ++ ;; ++ *) ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ++ ac_dummy="$PATH" ++ for ac_dir in $ac_dummy; do ++ test -z "$ac_dir" && ac_dir=. ++ if test -f $ac_dir/$ac_word; then ++ ac_cv_path_NSPR_CONFIG="$ac_dir/$ac_word" ++ break ++ fi ++ done ++ IFS="$ac_save_ifs" ++ test -z "$ac_cv_path_NSPR_CONFIG" && ac_cv_path_NSPR_CONFIG="no" ++ ;; ++esac ++fi ++NSPR_CONFIG="$ac_cv_path_NSPR_CONFIG" ++if test -n "$NSPR_CONFIG"; then ++ echo "$ac_t""$NSPR_CONFIG" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ min_nspr_version=$NSPR_MINVER ++ echo $ac_n "checking for NSPR - version >= $min_nspr_version""... $ac_c" 1>&6 ++echo "configure:6934: checking for NSPR - version >= $min_nspr_version" >&5 ++ ++ no_nspr="" ++ if test "$NSPR_CONFIG" != "no"; then ++ NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags` ++ NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs` ++ NSPR_VERSION_STRING=`$NSPR_CONFIG $nspr_config_args --version` ++ elif test -n "${NO_NSPR_CONFIG_SYSTEM_VERSION}"; then ++ NSPR_CFLAGS="${NO_NSPR_CONFIG_SYSTEM_CFLAGS}" ++ NSPR_LIBS="${NO_NSPR_CONFIG_SYSTEM_LDFLAGS}" ++ NSPR_VERSION_STRING="$NO_NSPR_CONFIG_SYSTEM_VERSION" ++ else ++ no_nspr="yes" ++ fi ++ ++ if test -z "$no_nspr"; then ++ nspr_config_major_version=`echo $NSPR_VERSION_STRING | \ ++ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\1/'` ++ nspr_config_minor_version=`echo $NSPR_VERSION_STRING | \ ++ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\2/'` ++ nspr_config_micro_version=`echo $NSPR_VERSION_STRING | \ ++ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\4/'` ++ if test -z "$nspr_config_micro_version"; then ++ nspr_config_micro_version="0" ++ fi ++ ++ min_nspr_major_version=`echo $min_nspr_version | \ ++ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\1/'` ++ min_nspr_minor_version=`echo $min_nspr_version | \ ++ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\2/'` ++ min_nspr_micro_version=`echo $min_nspr_version | \ ++ sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\4/'` ++ if test -z "$min_nspr_micro_version"; then ++ min_nspr_micro_version="0" ++ fi ++ ++ if test "$nspr_config_major_version" -ne "$min_nspr_major_version"; then ++ no_nspr="yes" ++ elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" && ++ test "$nspr_config_minor_version" -lt "$min_nspr_minor_version"; then ++ no_nspr="yes" ++ elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" && ++ test "$nspr_config_minor_version" -eq "$min_nspr_minor_version" && ++ test "$nspr_config_micro_version" -lt "$min_nspr_micro_version"; then ++ no_nspr="yes" ++ fi ++ fi ++ ++ if test -z "$no_nspr"; then ++ echo "$ac_t""yes" 1>&6 ++ MOZ_SYSTEM_NSPR=1 ++ else ++ echo "$ac_t""no" 1>&6 ++ { echo "configure: error: you do not have NSPR installed or your version is older than $NSPR_MINVER." 1>&2; echo "configure: error: you do not have NSPR installed or your version is older than $NSPR_MINVER." 1>&5; exit 1; } ++ fi ++ ++ ++ ++ ++ ++ ++fi ++ ++if test -n "$MOZ_SYSTEM_NSPR" -o -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then ++ _SAVE_CFLAGS=$CFLAGS ++ CFLAGS="$CFLAGS $NSPR_CFLAGS" ++ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++ : ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ { echo "configure: error: system NSPR does not support PR_STATIC_ASSERT or including prtypes.h does not provide it" 1>&2; echo "configure: error: system NSPR does not support PR_STATIC_ASSERT or including prtypes.h does not provide it" 1>&5; exit 1; } ++fi ++rm -f conftest* ++ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++ : ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ { echo "configure: error: system NSPR does not support PR_UINT64 or including prtypes.h does not provide it" 1>&2; echo "configure: error: system NSPR does not support PR_UINT64 or including prtypes.h does not provide it" 1>&5; exit 1; } ++fi ++rm -f conftest* ++ CFLAGS=$_SAVE_CFLAGS ++ NSPR_INCLUDE_DIR=`echo ${NSPR_CFLAGS} | sed -e 's/.*-I\([^ ]*\).*/\1/'` ++ NSPR_LIB_DIR=`echo ${NSPR_LIBS} | sed -e 's/.*-L\([^ ]*\).*/\1/'` ++elif test -z "$JS_POSIX_NSPR"; then ++ NSPR_INCLUDE_DIR="${DIST}/include/nspr" ++ NSPR_CFLAGS="-I${NSPR_INCLUDE_DIR}" ++ if test -n "$GNU_CC"; then ++ if test -n "$MOZ_FOLD_LIBS"; then ++ NSPR_LIB_DIR=${DIST}/lib ++ else ++ NSPR_LIB_DIR=${DIST}/bin ++ fi ++ NSPR_LIBS="-L${NSPR_LIB_DIR} -lnspr${NSPR_VERSION} -lplc${NSPR_VERSION} -lplds${NSPR_VERSION}" ++ else ++ # NSS needs actual static libs to link to, and this is where they are. ++ NSPR_LIBS="${DIST}/lib/nspr${NSPR_VERSION}.lib ${DIST}/lib/plc${NSPR_VERSION}.lib ${DIST}/lib/plds${NSPR_VERSION}.lib " ++ NSPR_LIB_DIR="${DIST}/lib" ++ fi ++fi ++ ++ ++ ++ ++ ++PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr" ++if test -n "$MOZ_SYSTEM_NSPR"; then ++ _SAVE_CFLAGS=$CFLAGS ++ CFLAGS="$CFLAGS $NSPR_CFLAGS" ++ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++ : ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ { echo "configure: error: system NSPR does not support PR_STATIC_ASSERT" 1>&2; echo "configure: error: system NSPR does not support PR_STATIC_ASSERT" 1>&5; exit 1; } ++fi ++rm -f conftest* ++ CFLAGS=$_SAVE_CFLAGS ++ # piggy back on $MOZ_SYSTEM_NSPR to set a variable for the nspr check for js.pc ++ PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr >= $NSPR_MINVER" ++elif test -n "$JS_POSIX_NSPR"; then ++ PKGCONF_REQUIRES_PRIVATE= ++fi ++ ++ ++fi # _IS_OUTER_CONFIGURE ++ ++ ++ ++if test -n "$JS_STANDALONE"; then ++ ZLIB_DIR=yes ++fi ++ ++ ++ ++MOZZLIB=1.2.3 ++ ++# Check whether --with-system-zlib or --without-system-zlib was given. ++if test "${with_system_zlib+set}" = set; then ++ withval="$with_system_zlib" ++ ZLIB_DIR=$withval ++fi ++ ++ ++if test -z "$MOZ_ZLIB_LIBS$MOZ_ZLIB_CFLAGS$SKIP_LIBRARY_CHECKS"; then ++ _SAVE_CFLAGS=$CFLAGS ++ _SAVE_LDFLAGS=$LDFLAGS ++ _SAVE_LIBS=$LIBS ++ ++ if test -n "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "yes"; then ++ MOZ_ZLIB_CFLAGS="-I${ZLIB_DIR}/include" ++ MOZ_ZLIB_LIBS="-L${ZLIB_DIR}/lib" ++ CFLAGS="$MOZ_ZLIB_CFLAGS $CFLAGS" ++ LDFLAGS="$MOZ_ZLIB_LIBS $LDFLAGS" ++ fi ++ if test -z "$ZLIB_DIR" -o "$ZLIB_DIR" = no; then ++ MOZ_SYSTEM_ZLIB= ++ else ++ echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6 ++echo "configure:7127: checking for gzread in -lz" >&5 ++ac_lib_var=`echo z'_'gzread | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lz $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ MOZ_SYSTEM_ZLIB=1 MOZ_ZLIB_LIBS="$MOZ_ZLIB_LIBS -lz" ++else ++ echo "$ac_t""no" 1>&6 ++MOZ_SYSTEM_ZLIB= ++fi ++ ++ if test "$MOZ_SYSTEM_ZLIB" = 1; then ++ MOZZLIBNUM=`echo $MOZZLIB | awk -F. '{printf "0x%x\n", ((($1 * 16 + $2) * 16) + $3) * 16 + $4}'` ++ cat > conftest.$ac_ext < ++ #include ++ #include ++int main() { ++ #if ZLIB_VERNUM < $MOZZLIBNUM ++ #error "Insufficient zlib version ($MOZZLIBNUM required)." ++ #endif ++; return 0; } ++EOF ++if { (eval echo configure:7181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ MOZ_SYSTEM_ZLIB=1 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ { echo "configure: error: Insufficient zlib version for --with-system-zlib ($MOZZLIB required)" 1>&2; echo "configure: error: Insufficient zlib version for --with-system-zlib ($MOZZLIB required)" 1>&5; exit 1; } ++fi ++rm -f conftest* ++ fi ++ fi ++ CFLAGS=$_SAVE_CFLAGS ++ LDFLAGS=$_SAVE_LDFLAGS ++ LIBS=$_SAVE_LIBS ++fi ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ZLIB_IN_MOZGLUE"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' ZLIB_IN_MOZGLUE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define ZLIB_IN_MOZGLUE 1 ++EOF ++ ++fi ++ ++ ++ ++# Application ++ ++# Components and Features ++ ++# Individual module options ++ ++# Debugging and Optimizations ++ ++ ++# Use value from moz.configure if one is defined. Else use our computed ++# value. ++if test -n "${MOZ_CONFIGURE_OPTIMIZE_FLAGS}"; then ++ MOZ_OPTIMIZE_FLAGS=${MOZ_CONFIGURE_OPTIMIZE_FLAGS} ++fi ++ ++ ++ if test "$GNU_CC"; then ++ MOZ_ENABLE_FRAME_PTR="-fno-omit-frame-pointer -funwind-tables" ++ MOZ_DISABLE_FRAME_PTR="-fomit-frame-pointer -funwind-tables" ++ else ++ case "$target" in ++ aarch64-windows*) ++ if test "$CC_TYPE" = "clang-cl"; then ++ MOZ_ENABLE_FRAME_PTR="-Xclang -mdisable-fp-elim" ++ MOZ_DISABLE_FRAME_PTR="-Xclang -mdisable-fp-elim" ++ else ++ MOZ_ENABLE_FRAME_PTR="-Oy-" ++ MOZ_DISABLE_FRAME_PTR="-Oy" ++ fi ++ ;; ++ *-mingw32*) ++ MOZ_ENABLE_FRAME_PTR="-Oy-" ++ MOZ_DISABLE_FRAME_PTR="-Oy" ++ ;; ++ esac ++ fi ++ ++ # If we are debugging, profiling, using sanitizers, or on win32 we want a ++ # frame pointer. It is not required to enable frame pointers on AArch64 ++ # Windows, but we enable it for compatibility with ETW. ++ if test -z "$MOZ_OPTIMIZE" -o \ ++ -n "$MOZ_PROFILING" -o \ ++ -n "$MOZ_DEBUG" -o \ ++ -n "$MOZ_MSAN" -o \ ++ -n "$MOZ_ASAN" -o \ ++ -n "$MOZ_UBSAN" -o \ ++ "$OS_ARCH:$CPU_ARCH" = "WINNT:x86" -o \ ++ "$OS_ARCH:$CPU_ARCH" = "WINNT:aarch64"; then ++ MOZ_FRAMEPTR_FLAGS="$MOZ_ENABLE_FRAME_PTR" ++ else ++ MOZ_FRAMEPTR_FLAGS="$MOZ_DISABLE_FRAME_PTR" ++ fi ++ ++ ++if test "$COMPILE_ENVIRONMENT"; then ++if test -n "$MOZ_OPTIMIZE"; then ++ echo $ac_n "checking for valid optimization flags""... $ac_c" 1>&6 ++echo "configure:7273: checking for valid optimization flags" >&5 ++ _SAVE_CFLAGS=$CFLAGS ++ CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS" ++ cat > conftest.$ac_ext < ++int main() { ++printf("Hello World\n"); ++; return 0; } ++EOF ++if { (eval echo configure:7284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ _results=yes ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ _results=no ++fi ++rm -f conftest* ++ echo "$ac_t""$_results" 1>&6 ++ if test "$_results" = "no"; then ++ { echo "configure: error: These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS" 1>&2; echo "configure: error: These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS" 1>&5; exit 1; } ++ fi ++ CFLAGS=$_SAVE_CFLAGS ++ if test -n "$MOZ_LTO" -a -n "$CLANG_CC"; then ++ # When using llvm-based LTO, non numeric optimization levels are ++ # not supported by the linker, so force the linker to use -O2 ( ++ # which doesn't influence the level compilation units are actually ++ # compiled at). ++ case " $MOZ_OPTIMIZE_FLAGS " in ++ *\ -Os\ *|*\ -Oz\ *) ++ MOZ_OPTIMIZE_LDFLAGS="$MOZ_OPTIMIZE_LDFLAGS -O2" ++ ;; ++ esac ++ fi ++fi ++fi # COMPILE_ENVIRONMENT ++ ++ ++ ++ ++ ++ ++if test -z "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then ++ WARNINGS_AS_ERRORS='' ++fi ++ ++ ++if test "$JS_STANDALONE" -a -z "$MOZ_MEMORY"; then ++ MOZ_GLUE_IN_PROGRAM= ++else ++ case "${OS_TARGET}" in ++ Android|WINNT|Darwin) ++ MOZ_GLUE_IN_PROGRAM= ++ ;; ++ *) ++ MOZ_GLUE_IN_PROGRAM=1 ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_GLUE_IN_PROGRAM ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_GLUE_IN_PROGRAM 1 ++EOF ++ ++ ;; ++ esac ++fi ++ ++if test "$MOZ_MEMORY"; then ++ case "${target}" in ++ *-mingw*) ++ export MOZ_NO_DEBUG_RTL=1 ++ ;; ++ esac ++fi ++ ++ ++if test -n "$MOZ_INSTRUMENTS"; then ++ LIBS="$LIBS -framework CoreFoundation" ++fi ++ ++if test -n "$MOZ_DEBUG"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' JS_DEBUG ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define JS_DEBUG 1 ++EOF ++ ++fi ++ ++ ++if test -n "$COMPILE_ENVIRONMENT"; then ++ ++ ++if test -n "$ENABLE_CLANG_PLUGIN"; then ++ if test -z "${CLANG_CC}${CLANG_CL}"; then ++ { echo "configure: error: Can't use clang plugin without clang." 1>&2; echo "configure: error: Can't use clang plugin without clang." 1>&5; exit 1; } ++ fi ++ ++ echo $ac_n "checking for llvm-config""... $ac_c" 1>&6 ++echo "configure:7376: checking for llvm-config" >&5 ++ if test -z "$LLVMCONFIG"; then ++ if test -n "$CLANG_CL"; then ++ CXX_COMPILER="$(dirname "$CXX")/clang" ++ else ++ CXX_COMPILER="${CXX}" ++ fi ++ LLVMCONFIG=`$CXX_COMPILER -print-prog-name=llvm-config` ++ fi ++ ++ if test -z "$LLVMCONFIG"; then ++ LLVMCONFIG=`which llvm-config` ++ fi ++ ++ if test ! -x "$LLVMCONFIG"; then ++ echo "$ac_t""not found" 1>&6 ++ { echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&2; echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&5; exit 1; } ++ fi ++ ++ echo "$ac_t""$LLVMCONFIG" 1>&6 ++ ++ if test -z "$LLVMCONFIG"; then ++ { echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&2; echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&5; exit 1; } ++ fi ++ LLVM_CXXFLAGS=`$LLVMCONFIG --cxxflags | sed -e 's/-isysroot [^ ]*//' -e 's/-gcc-toolchain [^ ]*//'` ++ ++ LLVM_LDFLAGS=`$LLVMCONFIG --ldflags | tr '\n' ' '` ++ ++ if test "${HOST_OS_ARCH}" = "Darwin"; then ++ CLANG_LDFLAGS="-Wl,-flat_namespace -Wl,-undefined,suppress" ++ CLANG_LDFLAGS="$CLANG_LDFLAGS `$LLVMCONFIG --prefix`/lib/libclangASTMatchers.a" ++ LLVM_LDFLAGS=`echo "$LLVM_LDFLAGS" | sed -E 's/-L[^ ]+\/clang\/lib//'` ++ elif test "${HOST_OS_ARCH}" = "WINNT"; then ++ CLANG_LDFLAGS="clangASTMatchers.lib clang.lib" ++ else ++ CLANG_LDFLAGS="-lclangASTMatchers" ++ fi ++ ++ if test -n "$CLANG_CL"; then ++ LLVM_REPLACE_CXXFLAGS='' ++ for arg in $LLVM_CXXFLAGS; do ++ arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'` ++ LLVM_REPLACE_CXXFLAGS="$LLVM_REPLACE_CXXFLAGS $arg" ++ done ++ LLVM_CXXFLAGS="$LLVM_REPLACE_CXXFLAGS" ++ ++ LLVM_REPLACE_LDFLAGS='' ++ for arg in $LLVM_LDFLAGS; do ++ arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'` ++ LLVM_REPLACE_LDFLAGS="$LLVM_REPLACE_LDFLAGS $arg" ++ done ++ LLVM_LDFLAGS="$LLVM_REPLACE_LDFLAGS" ++ ++ CLANG_REPLACE_LDFLAGS='' ++ for arg in $CLANG_LDFLAGS; do ++ arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'` ++ CLANG_REPLACE_LDFLAGS="$CLANG_REPLACE_LDFLAGS $arg" ++ done ++ CLANG_LDFLAGS="$CLANG_REPLACE_LDFLAGS" ++ fi ++ ++ echo $ac_n "checking for new ASTMatcher API""... $ac_c" 1>&6 ++echo "configure:7438: checking for new ASTMatcher API" >&5 ++if eval "test \"`echo '$''{'ac_cv_have_new_ASTMatcher_names'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++ ++ ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ _SAVE_CXXFLAGS="$CXXFLAGS" ++ _SAVE_CPPFLAGS="$CPPFLAGS" ++ _SAVE_CXX="$CXX" ++ _SAVE_MACOSX_DEPLOYMENT_TARGET="$MACOSX_DEPLOYMENT_TARGET" ++ unset MACOSX_DEPLOYMENT_TARGET ++ CXXFLAGS="${LLVM_CXXFLAGS}" ++ CPPFLAGS="" ++ CXX="${HOST_CXX}" ++ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ac_cv_have_new_ASTMatcher_names="yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_have_new_ASTMatcher_names="no" ++fi ++rm -f conftest* ++ CXX="$_SAVE_CXX" ++ CPPFLAGS="$_SAVE_CPPFLAGS" ++ CXXFLAGS="$_SAVE_CXXFLAGS" ++ export MACOSX_DEPLOYMENT_TARGET="$_SAVE_MACOSX_DEPLOYMENT_TARGET" ++ ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++fi ++ ++echo "$ac_t""$ac_cv_have_new_ASTMatcher_names" 1>&6 ++ if test "$ac_cv_have_new_ASTMatcher_names" = "yes"; then ++ LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DHAVE_NEW_ASTMATCHER_NAMES" ++ fi ++ ++ echo $ac_n "checking for has with ignoringParenImpCasts""... $ac_c" 1>&6 ++echo "configure:7505: checking for has with ignoringParenImpCasts" >&5 ++if eval "test \"`echo '$''{'ac_cv_has_accepts_ignoringParenImpCasts'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ++ ++ ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ _SAVE_CXXFLAGS="$CXXFLAGS" ++ _SAVE_CPPFLAGS="$CPPFLAGS" ++ _SAVE_CXX="$CXX" ++ _SAVE_MACOSX_DEPLOYMENT_TARGET="$MACOSX_DEPLOYMENT_TARGET" ++ unset MACOSX_DEPLOYMENT_TARGET ++ CXXFLAGS="${LLVM_CXXFLAGS}" ++ CPPFLAGS="" ++ CXX="${HOST_CXX}" ++ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ac_cv_has_accepts_ignoringParenImpCasts="yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_has_accepts_ignoringParenImpCasts="no" ++fi ++rm -f conftest* ++ CXX="$_SAVE_CXX" ++ CPPFLAGS="$_SAVE_CPPFLAGS" ++ CXXFLAGS="$_SAVE_CXXFLAGS" ++ export MACOSX_DEPLOYMENT_TARGET="$_SAVE_MACOSX_DEPLOYMENT_TARGET" ++ ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++fi ++ ++echo "$ac_t""$ac_cv_has_accepts_ignoringParenImpCasts" 1>&6 ++ if test "$ac_cv_has_accepts_ignoringParenImpCasts" = "yes"; then ++ LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DHAS_ACCEPTS_IGNORINGPARENIMPCASTS" ++ fi ++ ++ CLANG_PLUGIN_FLAGS="-Xclang -load -Xclang $CLANG_PLUGIN -Xclang -add-plugin -Xclang moz-check" ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_CLANG_PLUGIN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_CLANG_PLUGIN 1 ++EOF ++ ++fi ++ ++if test -n "$ENABLE_MOZSEARCH_PLUGIN"; then ++ if test -z "${ENABLE_CLANG_PLUGIN}"; then ++ { echo "configure: error: Can't use mozsearch plugin without --enable-clang-plugin." 1>&2; echo "configure: error: Can't use mozsearch plugin without --enable-clang-plugin." 1>&5; exit 1; } ++ fi ++ ++ OBJDIR="$(dirname $(dirname $(dirname $CLANG_PLUGIN)))" ++ ++ CLANG_PLUGIN_FLAGS="$CLANG_PLUGIN_FLAGS -Xclang -add-plugin -Xclang mozsearch-index" ++ ++ CLANG_PLUGIN_FLAGS="$CLANG_PLUGIN_FLAGS -Xclang -plugin-arg-mozsearch-index -Xclang $_topsrcdir" ++ CLANG_PLUGIN_FLAGS="$CLANG_PLUGIN_FLAGS -Xclang -plugin-arg-mozsearch-index -Xclang $OBJDIR/mozsearch_index" ++ CLANG_PLUGIN_FLAGS="$CLANG_PLUGIN_FLAGS -Xclang -plugin-arg-mozsearch-index -Xclang $OBJDIR" ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_MOZSEARCH_PLUGIN ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_MOZSEARCH_PLUGIN 1 ++EOF ++ ++fi ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++fi # COMPILE_ENVIRONMENT ++ ++ ++# Check whether --with-sixgill or --without-sixgill was given. ++if test "${with_sixgill+set}" = set; then ++ withval="$with_sixgill" ++ SIXGILL_PATH=$withval ++else ++ SIXGILL_PATH= ++fi ++ ++ ++if test -n "$SIXGILL_PATH"; then ++ if test ! -x "$SIXGILL_PATH/bin/xdbfind" || test ! -f "$SIXGILL_PATH/gcc/xgill.so" || test ! -x "$SIXGILL_PATH/scripts/wrap_gcc/g++"; then ++ { echo "configure: error: The sixgill plugin and binaries are not at the specified path." 1>&2; echo "configure: error: The sixgill plugin and binaries are not at the specified path." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++# Check whether --enable-strip or --disable-strip was given. ++if test "${enable_strip+set}" = set; then ++ enableval="$enable_strip" ++ if test "$enableval" = "yes"; then ++ ENABLE_STRIP=1 ++ elif test "$enableval" = "no"; then ++ ENABLE_STRIP= ++ else ++ { echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++# Check whether --enable-install-strip or --disable-install-strip was given. ++if test "${enable_install_strip+set}" = set; then ++ enableval="$enable_install_strip" ++ if test "$enableval" = "yes"; then ++ PKG_SKIP_STRIP= ++ elif test "$enableval" = "no"; then ++ PKG_SKIP_STRIP=1 ++ else ++ { echo "configure: error: Option, install-strip, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, install-strip, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++# Profiling and Instrumenting ++ ++if test -z "$SKIP_LIBRARY_CHECKS"; then ++ ++ ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ for ac_func in __cxa_demangle ++do ++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++echo "configure:7678: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef $ac_func ++/* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:7713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++HAVE_DEMANGLE= ++fi ++done ++ ++ ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++fi ++ ++ ++# Check whether --with-jitreport-granularity or --without-jitreport-granularity was given. ++if test "${with_jitreport_granularity+set}" = set; then ++ withval="$with_jitreport_granularity" ++ JITREPORT_GRANULARITY=$withval ++else ++ JITREPORT_GRANULARITY=3 ++fi ++ ++ ++cat >> confdefs.pytmp <> confdefs.h <&6 ++echo "configure:7779: checking for -pipe support" >&5 ++if test -n "$GNU_CC" -a -n "$GNU_CXX"; then ++ CFLAGS="$CFLAGS -pipe" ++ CXXFLAGS="$CXXFLAGS -pipe" ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ac_ext=C ++# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cxx_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++echo $ac_n "checking for tm_zone tm_gmtoff in struct tm""... $ac_c" 1>&6 ++echo "configure:7801: checking for tm_zone tm_gmtoff in struct tm" >&5 ++if eval "test \"`echo '$''{'ac_cv_struct_tm_zone_tm_gmtoff'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++int main() { ++struct tm tm; tm.tm_zone = 0; tm.tm_gmtoff = 1; ++; return 0; } ++EOF ++if { (eval echo configure:7813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ ac_cv_struct_tm_zone_tm_gmtoff="yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ ac_cv_struct_tm_zone_tm_gmtoff="no" ++fi ++rm -f conftest* ++fi ++ ++echo "$ac_t""$ac_cv_struct_tm_zone_tm_gmtoff" 1>&6 ++if test "$ac_cv_struct_tm_zone_tm_gmtoff" = "yes" ; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_TM_ZONE_TM_GMTOFF ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_TM_ZONE_TM_GMTOFF 1 ++EOF ++ ++fi ++fi # ! SKIP_COMPILER_CHECKS ++ ++cat >> confdefs.pytmp <<\EOF ++ (''' CPP_THROW_NEW ''', r''' throw() ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define CPP_THROW_NEW throw() ++EOF ++ ++ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++if test "$CC_TYPE" = "clang-cl"; then ++ ac_link="$ac_compile"' && ${LINKER} -OUT:conftest${ac_exeext} $LDFLAGS conftest.obj $LIBS 1>&5' ++fi ++ ++ ++ ++ ++echo $ac_n "checking what kind of list files are supported by the linker""... $ac_c" 1>&6 ++echo "configure:7859: checking what kind of list files are supported by the linker" >&5 ++if eval "test \"`echo '$''{'EXPAND_LIBS_LIST_STYLE'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ echo "int main() {return 0;}" > conftest.${ac_ext} ++ if { ac_try='${CC-cc} -o conftest.${OBJ_SUFFIX} -c $MOZ_LTO_CFLAGS $CFLAGS $CPPFLAGS conftest.${ac_ext} 1>&5'; { (eval echo configure:7864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.${OBJ_SUFFIX}; then ++ echo "INPUT(conftest.${OBJ_SUFFIX})" > conftest.list ++ if test "$CC_TYPE" = "clang-cl"; then ++ link="$LINKER -OUT:conftest${ac_exeext}" ++ else ++ link="${CC-cc} -o conftest${ac_exeext}" ++ fi ++ if { ac_try='$link $MOZ_LTO_LDFLAGS $LDFLAGS conftest.list $LIBS 1>&5'; { (eval echo configure:7871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then ++ EXPAND_LIBS_LIST_STYLE=linkerscript ++ else ++ echo "conftest.${OBJ_SUFFIX}" > conftest.list ++ if { ac_try='$link $MOZ_LTO_LDFLAGS $LDFLAGS -Wl,-filelist,conftest.list $LIBS 1>&5'; { (eval echo configure:7875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then ++ EXPAND_LIBS_LIST_STYLE=filelist ++ elif { ac_try='$link $MOZ_LTO_LDFLAGS $LDFLAGS @conftest.list $LIBS 1>&5'; { (eval echo configure:7877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then ++ EXPAND_LIBS_LIST_STYLE=list ++ else ++ { echo "configure: error: Couldn't find one that works" 1>&2; echo "configure: error: Couldn't find one that works" 1>&5; exit 1; } ++ fi ++ fi ++ else ++ { echo "configure: error: couldn't compile a simple C file" 1>&2; echo "configure: error: couldn't compile a simple C file" 1>&5; exit 1; } ++ fi ++ rm -rf conftest* ++fi ++ ++echo "$ac_t""$EXPAND_LIBS_LIST_STYLE" 1>&6 ++ ++ ++ ++ ++ ++# Check whether --enable-readline or --disable-readline was given. ++if test "${enable_readline+set}" = set; then ++ enableval="$enable_readline" ++ if test "$enableval" = "yes"; then ++ JS_WANT_READLINE=1 ++ elif test "$enableval" = "no"; then ++ JS_WANT_READLINE= ++ else ++ { echo "configure: error: Option, readline, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, readline, does not take an argument ($enableval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++JS_BUNDLED_EDITLINE= ++EDITLINE_LIBS= ++ ++case "$target" in ++*-mingw*) ++ NO_EDITLINE=1 ++ ;; ++*) ++ ;; ++esac ++ ++if test -z "$SKIP_LIBRARY_CHECKS" -a -z "$NO_EDITLINE"; then ++ if test -n "$JS_WANT_READLINE"; then ++ echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 ++echo "configure:7922: checking for readline in -lreadline" >&5 ++ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lreadline $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ EDITLINE_LIBS="-lreadline" ++else ++ echo "$ac_t""no" 1>&6 ++{ echo "configure: error: No system readline library found." 1>&2; echo "configure: error: No system readline library found." 1>&5; exit 1; } ++fi ++ ++ else ++ JS_BUNDLED_EDITLINE=1 ++ fi ++ ++ cat >> confdefs.pytmp <<\EOF ++ (''' EDITLINE ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define EDITLINE 1 ++EOF ++ ++fi ++ ++ ++ ++# Standalone module options (Not for building Mozilla) ++ ++ ++# Check whether --with-qemu-exe or --without-qemu-exe was given. ++if test "${with_qemu_exe+set}" = set; then ++ withval="$with_qemu_exe" ++ QEMU_EXE=$withval ++fi ++ ++ ++# Check whether --with-cross-lib or --without-cross-lib was given. ++if test "${with_cross_lib+set}" = set; then ++ withval="$with_cross_lib" ++ CROSS_LIB=$withval ++else ++ CROSS_LIB=/usr/$target ++fi ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++_INTL_API=yes ++ ++ ++ ++MOZ_SYSTEM_ICU= ++# Check whether --with-system-icu or --without-system-icu was given. ++if test "${with_system_icu+set}" = set; then ++ withval="$with_system_icu" ++ if test "$withval" = "yes"; then ++ MOZ_SYSTEM_ICU=1 ++ elif test "$withval" = "no"; then ++ : ++ else ++ { echo "configure: error: Option, system-icu, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, system-icu, does not take an argument ($withval)." 1>&5; exit 1; } ++ fi ++fi ++ ++ ++if test -n "$MOZ_SYSTEM_ICU"; then ++ succeeded=no ++ ++ if test -z "$PKG_CONFIG"; then ++ echo "*** The pkg-config script could not be found. Make sure it is" ++ echo "*** in your path, or set the PKG_CONFIG environment variable" ++ echo "*** to the full path to pkg-config." ++ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." ++ else ++ PKG_CONFIG_MIN_VERSION=0.9.0 ++ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then ++ echo $ac_n "checking for icu-i18n >= 63.1""... $ac_c" 1>&6 ++echo "configure:8052: checking for icu-i18n >= 63.1" >&5 ++ ++ if $PKG_CONFIG --exists "icu-i18n >= 63.1" ; then ++ echo "$ac_t""yes" 1>&6 ++ succeeded=yes ++ ++ echo $ac_n "checking MOZ_ICU_CFLAGS""... $ac_c" 1>&6 ++echo "configure:8059: checking MOZ_ICU_CFLAGS" >&5 ++ MOZ_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-i18n >= 63.1"` ++ echo "$ac_t""$MOZ_ICU_CFLAGS" 1>&6 ++ ++ echo $ac_n "checking MOZ_ICU_LIBS""... $ac_c" 1>&6 ++echo "configure:8064: checking MOZ_ICU_LIBS" >&5 ++ ## Remove evil flags like -Wl,--export-dynamic ++ MOZ_ICU_LIBS="`$PKG_CONFIG --libs \"icu-i18n >= 63.1\" |sed s/-Wl,--export-dynamic//g`" ++ echo "$ac_t""$MOZ_ICU_LIBS" 1>&6 ++ else ++ MOZ_ICU_CFLAGS="" ++ MOZ_ICU_LIBS="" ++ ## If we have a custom action on failure, don't print errors, but ++ ## do set a variable so people can do so. ++ MOZ_ICU_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "icu-i18n >= 63.1"` ++ echo $MOZ_ICU_PKG_ERRORS ++ fi ++ ++ ++ ++ else ++ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." ++ echo "*** See http://www.freedesktop.org/software/pkgconfig" ++ fi ++ fi ++ ++ if test $succeeded = yes; then ++ : ++ else ++ if test "$COMPILE_ENVIRONMENT"; then ++ { echo "configure: error: Library requirements (icu-i18n >= 63.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (icu-i18n >= 63.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; } ++ fi ++ fi ++ ++ CFLAGS="$CFLAGS $MOZ_ICU_CFLAGS" ++ CXXFLAGS="$CXXFLAGS $MOZ_ICU_CFLAGS" ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_SYSTEM_ICU ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_SYSTEM_ICU 1 ++EOF ++ ++fi ++ ++ ++ ++# Check whether --with-intl-api or --without-intl-api was given. ++if test "${with_intl_api+set}" = set; then ++ withval="$with_intl_api" ++ _INTL_API=$withval ++fi ++ ++ ++ENABLE_INTL_API= ++EXPOSE_INTL_API= ++case "$_INTL_API" in ++no) ++ ;; ++build) ++ ENABLE_INTL_API=1 ++ ;; ++yes) ++ ENABLE_INTL_API=1 ++ EXPOSE_INTL_API=1 ++ ;; ++*) ++ { echo "configure: error: Invalid value passed to --with-intl-api: $_INTL_API" 1>&2; echo "configure: error: Invalid value passed to --with-intl-api: $_INTL_API" 1>&5; exit 1; } ++ ;; ++esac ++ ++if test -n "$ENABLE_INTL_API"; then ++ USE_ICU=1 ++fi ++ ++if test -n "$EXPOSE_INTL_API"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' EXPOSE_INTL_API ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define EXPOSE_INTL_API 1 ++EOF ++ ++fi ++ ++if test -n "$ENABLE_INTL_API"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' ENABLE_INTL_API ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define ENABLE_INTL_API 1 ++EOF ++ ++fi ++ ++if test -n "$USE_ICU"; then ++ icudir="$_topsrcdir/intl/icu/source" ++ if test ! -d "$icudir"; then ++ icudir="$_topsrcdir/../../intl/icu/source" ++ if test ! -d "$icudir"; then ++ { echo "configure: error: Cannot find the ICU directory" 1>&2; echo "configure: error: Cannot find the ICU directory" 1>&5; exit 1; } ++ fi ++ fi ++ ++ version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` ++ if test x"$version" = x; then ++ { echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&2; echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&5; exit 1; } ++ fi ++ MOZ_ICU_VERSION="$version" ++ ++ # TODO: the l is actually endian-dependent ++ # We could make this set as 'l' or 'b' for little or big, respectively, ++ # but we'd need to check in a big-endian version of the file. ++ if test -z "$ICU_DATA_FILE"; then ++ ICU_DATA_FILE="icudt${version}l.dat" ++ fi ++fi ++ ++ ++ ++ ++ ++ ++if test -n "$USE_ICU"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' U_USING_ICU_NAMESPACE ''', r''' 0 ''') ++EOF ++cat >> confdefs.h <<\EOF ++#define U_USING_ICU_NAMESPACE 0 ++EOF ++ ++ ++ if test -z "$MOZ_SYSTEM_ICU"; then ++ case "$OS_TARGET:$CPU_ARCH" in ++ WINNT:aarch64) ++ ;; ++ *) ++ if test -z "$YASM" -a -z "$GNU_AS" -a "$COMPILE_ENVIRONMENT"; then ++ { echo "configure: error: Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api" 1>&2; echo "configure: error: Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api" 1>&5; exit 1; } ++ fi ++ ;; ++ esac ++ cat >> confdefs.pytmp <<\EOF ++ (''' U_STATIC_IMPLEMENTATION ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define U_STATIC_IMPLEMENTATION 1 ++EOF ++ ++ fi ++fi ++ ++ ++CFLAGS=`echo \ ++ $_COMPILATION_CFLAGS \ ++ $CFLAGS` ++ ++CXXFLAGS=`echo \ ++ $_WARNINGS_CXXFLAGS \ ++ $_COMPILATION_CXXFLAGS \ ++ $CXXFLAGS` ++ ++COMPILE_CFLAGS=`echo \ ++ $_DEFINES_CFLAGS \ ++ $COMPILE_CFLAGS` ++ ++COMPILE_CXXFLAGS=`echo \ ++ $_DEFINES_CXXFLAGS \ ++ $COMPILE_CXXFLAGS` ++ ++HOST_CFLAGS=`echo \ ++ $_WARNINGS_HOST_CFLAGS \ ++ $_COMPILATION_HOST_CFLAGS \ ++ $HOST_CFLAGS` ++ ++HOST_CXXFLAGS=`echo \ ++ $_WARNINGS_HOST_CXXFLAGS \ ++ $_COMPILATION_HOST_CXXFLAGS \ ++ $HOST_CXXFLAGS` ++ ++ ++ ++OS_CFLAGS="$CFLAGS" ++OS_CXXFLAGS="$CXXFLAGS" ++OS_CPPFLAGS="$CPPFLAGS" ++OS_COMPILE_CFLAGS="$COMPILE_CFLAGS" ++OS_COMPILE_CXXFLAGS="$COMPILE_CXXFLAGS" ++OS_LDFLAGS="$LDFLAGS" ++OS_LIBS="$LIBS" ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++for ac_func in posix_fadvise posix_fallocate ++do ++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++echo "configure:8279: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef $ac_func ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:8311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++done ++ ++ ++ ++ ++if test -n "$MOZ_DEV_EDITION"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' MOZ_DEV_EDITION ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define MOZ_DEV_EDITION 1 ++EOF ++ ++fi ++ ++# Allow influencing configure with a defines.sh script. ++. "${srcdir}/build/defines.sh" ++ ++# If we're not building a release build, define EARLY_BETA_OR_EARLIER if it is ++# set in defines.sh ++if test "$BUILDING_RELEASE"; then ++ # Override value in defines.sh, if any ++ EARLY_BETA_OR_EARLIER= ++elif test "$EARLY_BETA_OR_EARLIER"; then ++ cat >> confdefs.pytmp <<\EOF ++ (''' EARLY_BETA_OR_EARLIER ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define EARLY_BETA_OR_EARLIER 1 ++EOF ++ ++fi ++ ++ ++BINDGEN_SYSTEM_FLAGS="$_BINDGEN_CFLAGS $NSPR_CFLAGS" ++ ++ ++ ++ ++ ++ ++ ++ ++MALLOC_HEADERS="malloc.h malloc_np.h malloc/malloc.h sys/malloc.h" ++MALLOC_H= ++ ++for file in $MALLOC_HEADERS; do ++ ac_safe=`echo "$file" | sed 'y%./+-%__p_%'` ++ echo $ac_n "checking for $file""... $ac_c" 1>&6 ++echo "configure:8385: checking for $file" >&5 ++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++int main() { ++ ++; return 0; } ++EOF ++if { (eval echo configure:8398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=no" ++fi ++rm -f conftest* ++fi ++ ++ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ MALLOC_H=$file ++ else ++ echo "$ac_t""no" 1>&6 ++ ++ fi ++ ++ if test "$MALLOC_H" != ""; then ++ cat >> confdefs.pytmp < ''') ++EOF ++cat >> confdefs.h < ++EOF ++ ++ break ++ fi ++done ++ ++for ac_func in strndup posix_memalign memalign ++do ++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++echo "configure:8433: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef $ac_func ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:8465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++done ++ ++ ++for ac_func in malloc_usable_size ++do ++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++echo "configure:8496: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++#undef $ac_func ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); ++ ++int main() { ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:8528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++fi ++rm -f conftest* ++fi ++ ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.pytmp <> confdefs.h <&6 ++fi ++done ++ ++MALLOC_USABLE_SIZE_CONST_PTR=const ++if test -n "$HAVE_MALLOC_H"; then ++ echo $ac_n "checking whether malloc_usable_size definition can use const argument""... $ac_c" 1>&6 ++echo "configure:8558: checking whether malloc_usable_size definition can use const argument" >&5 ++ cat > conftest.$ac_ext < ++ #include ++ size_t malloc_usable_size(const void *ptr); ++int main() { ++return malloc_usable_size(0); ++; return 0; } ++EOF ++if { (eval echo configure:8569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6 ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++ MALLOC_USABLE_SIZE_CONST_PTR= ++fi ++rm -f conftest* ++fi ++cat >> confdefs.pytmp <> confdefs.h <&6 ++echo "configure:8591: checking for valloc in malloc.h" >&5 ++cat > conftest.$ac_ext < ++EOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ egrep "valloc" >/dev/null 2>&1; then ++ rm -rf conftest* ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_VALLOC ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_VALLOC 1 ++EOF ++ ++ echo "$ac_t""yes" 1>&6 ++else ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++fi ++rm -f conftest* ++ ++ ++echo $ac_n "checking for valloc in unistd.h""... $ac_c" 1>&6 ++echo "configure:8616: checking for valloc in unistd.h" >&5 ++cat > conftest.$ac_ext < ++EOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ egrep "valloc" >/dev/null 2>&1; then ++ rm -rf conftest* ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_VALLOC ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_VALLOC 1 ++EOF ++ ++ echo "$ac_t""yes" 1>&6 ++else ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++fi ++rm -f conftest* ++ ++ ++echo $ac_n "checking for _aligned_malloc in malloc.h""... $ac_c" 1>&6 ++echo "configure:8641: checking for _aligned_malloc in malloc.h" >&5 ++cat > conftest.$ac_ext < ++EOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ egrep "_aligned_malloc" >/dev/null 2>&1; then ++ rm -rf conftest* ++ cat >> confdefs.pytmp <<\EOF ++ (''' HAVE_ALIGNED_MALLOC ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define HAVE_ALIGNED_MALLOC 1 ++EOF ++ ++ echo "$ac_t""yes" 1>&6 ++else ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++fi ++rm -f conftest* ++ ++ ++ ++ ++ ++ ++ ++if test -n "$JS_STANDALONE"; then ++MOZ_APP_NAME="mozjs" ++JS_LIBRARY_NAME="mozjs-$MOZILLA_SYMBOLVERSION" ++else ++JS_LIBRARY_NAME="mozjs" ++fi ++JS_CONFIG_LIBS="$NSPR_LIBS $LIBS" ++if test -n "$GNU_CC"; then ++JS_CONFIG_MOZ_JS_LIBS='-L${libdir} -l${JS_LIBRARY_NAME}' ++else ++JS_CONFIG_MOZ_JS_LIBS='${libdir}/${JS_LIBRARY_NAME}.lib' ++fi ++ ++ ++ ++ ++# Avoid using obsolete NSPR features ++cat >> confdefs.pytmp <<\EOF ++ (''' NO_NSPR_10_SUPPORT ''', ' 1 ') ++EOF ++cat >> confdefs.h <<\EOF ++#define NO_NSPR_10_SUPPORT 1 ++EOF ++ ++ ++top_srcdir=$srcdir ++ ++ ++trap '' 1 2 15 ++cat > confcache <<\EOF ++# This file is a shell script that caches the results of configure ++# tests run on this system so they can be shared between configure ++# scripts and configure runs. It is not useful on other systems. ++# If it contains results you don't want to keep, you may remove or edit it. ++# ++# By default, configure uses ./config.cache as the cache file, ++# creating it if it does not exist already. You can give configure ++# the --cache-file=FILE option to use a different cache file; that is ++# what configure does when it calls configure scripts in ++# subdirectories, so they share the cache. ++# Giving --cache-file=/dev/null disables caching, for debugging configure. ++# config.status only pays attention to the cache file if you give it the ++# --recheck option to rerun configure. ++# ++EOF ++# The following way of writing the cache mishandles newlines in values, ++# but we know of no workaround that is simple, portable, and efficient. ++# So, don't put newlines in cache variables' values. ++# Ultrix sh set writes to stderr and can't be redirected directly, ++# and sets the high bit in the cache file unless we assign to the vars. ++(set) 2>&1 | ++ case `(ac_space=' '; set | grep ac_space) 2>&1` in ++ *ac_space=\ *) ++ # `set' does not quote correctly, so add quotes (double-quote substitution ++ # turns \\\\ into \\, and sed turns \\ into \). ++ sed -n \ ++ -e "s/'/'\\\\''/g" \ ++ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ++ ;; ++ *) ++ # `set' quotes correctly as required by POSIX, so do not add quotes. ++ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ++ ;; ++ esac >> confcache ++if cmp -s $cache_file confcache; then ++ : ++else ++ if test -w $cache_file; then ++ echo "updating cache $cache_file" ++ cat confcache > $cache_file ++ else ++ echo "not updating unwritable cache $cache_file" ++ fi ++fi ++rm -f confcache ++ ++ ++trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 ++: ${CONFIG_STATUS=./config.data} ++ ++echo creating $CONFIG_STATUS ++ ++cat > $CONFIG_STATUS <> $CONFIG_STATUS ++rm confdefs.pytmp confdefs.h ++ ++cat >> $CONFIG_STATUS <<\EOF ++] ++ ++substs = [ ++EOF ++ ++sed 's/$/,/' >> $CONFIG_STATUS <> $CONFIG_STATUS ++done ++ ++cat >> $CONFIG_STATUS <<\EOF ++] ++ ++non_global_defines = [ ++EOF ++ ++if test -n "$_NON_GLOBAL_ACDEFINES"; then ++ for var in $_NON_GLOBAL_ACDEFINES; do ++ echo " '$var'," >> $CONFIG_STATUS ++ done ++fi ++ ++cat >> $CONFIG_STATUS <&6 +-echo "configure:12466: checking for $ac_func" >&5 ++echo "configure:12468: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:12500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -12526,7 +12528,7 @@ + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $XCFLAGS" + cat > conftest.$ac_ext < +@@ -12545,7 +12547,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:12549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:12551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : + else + echo "configure: failed program was:" >&5 diff --git a/meta-gnome/recipes-support/mozjs68/mozjs68_68.4.2.bb b/meta-gnome/recipes-support/mozjs68/mozjs68_68.4.2.bb new file mode 100644 index 0000000..978ce04 --- /dev/null +++ b/meta-gnome/recipes-support/mozjs68/mozjs68_68.4.2.bb @@ -0,0 +1,114 @@ +SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++" +HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf" + +SRC_URI = "http://ftp.acc.umu.se/pub/GNOME/teams/releng/tarballs-needing-help/mozjs/mozjs-68.4.2.tar.bz2;downloadfilename=mozjs68-68.4.2.tar.bz2 \ + file://avoid-running-autoconf2.13.patch \ + file://0001-Yocto-build-fixes.patch \ + " + +SRC_URI[md5sum] = "cb1ab1983f72d45c737069747c088aa5" +SRC_URI[sha256sum] = "097fb482aa0e57fb117fde6816fbabfedcb862ee81906990363954f47ce93227" +S = "${WORKDIR}/mozjs-68.4.2" + + +inherit autotools pkgconfig perlnative pythonnative +inherit rust-common +inherit distro_features_check +CONFLICT_DISTRO_FEATURES_mipsarchn32 = "ld-is-gold" +TOOLCHAIN = "clang" + +DEPENDS += "nspr zlib rust-native cargo-native clang-native cbindgen-native nasm-native yasm-native" + +# Disable null pointer optimization in gcc >= 6 +# https://bugzilla.redhat.com/show_bug.cgi?id=1328045 +CFLAGS += "-fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks" +CXXFLAGS += "-fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks" + +# nspr's package-config is ignored so set libs manually +EXTRA_OECONF = " \ + --target=${TARGET_SYS} \ + --host=${BUILD_SYS} \ + --prefix=${prefix} \ + --libdir=${libdir} \ + --disable-tests \ + --disable-jemalloc \ + --with-nspr-libs='-lplds4 -lplc4 -lnspr4' \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \ +" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" +PACKAGECONFIG[x11] = "--x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--x-includes=no --x-libraries=no,virtual/libx11" + +EXTRA_OEMAKE_task-compile += "OS_LDFLAGS='-Wl,-latomic ${LDFLAGS}'" +EXTRA_OEMAKE_task-install += "STATIC_LIBRARY_NAME=js_static" + +do_configure() { + export SHELL="/bin/sh" + export TMP="${B}" + export RUSTC="${WORKDIR}/recipe-sysroot-native/usr/bin/rustc" + export RUST_HOST="${BUILD_SYS}" + export RUST_TARGET="${TARGET_SYS}" + export RUST_TARGET_PATH="${STAGING_LIBDIR_NATIVE}/rustlib" + export BINDGEN_MFLOAT="${@bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', '-mfloat-abi=hard', '', d)}" + export BINDGEN_CFLAGS="--target=${TARGET_SYS} --sysroot=${RECIPE_SYSROOT} ${BINDGEN_MFLOAT}" + export INSTALL_SDK=0 + ${S}/js/src/configure ${EXTRA_OECONF} +} + +do_compile_prepend() { + export SHELL="/bin/sh" + export S + export PYTHONPATH + cd ${S} + for sub_dir in python testing/mozbase third_party/python; do + for module_dir in `ls $sub_dir -1`;do + [ $module_dir = "virtualenv" ] && continue + if [ -d "${S}/$sub_dir/$module_dir" ];then + PYTHONPATH="$PYTHONPATH:${S}/$sub_dir/$module_dir" + fi + done + done + PYTHONPATH="$PYTHONPATH:${S}/config:${S}/build" + cd - +} + +do_install_prepend() { + export SHELL="/bin/sh" + export S + export PYTHONPATH + cd ${S} + for sub_dir in python testing/mozbase third_party/python; do + for module_dir in `ls $sub_dir -1`;do + [ $module_dir = "virtualenv" ] && continue + if [ -d "${S}/$sub_dir/$module_dir" ];then + PYTHONPATH="$PYTHONPATH:${S}/$sub_dir/$module_dir" + fi + done + done + PYTHONPATH="$PYTHONPATH:${S}/config:${S}/build" + cd - +} + +do_install_append() { + rm -f ${D}/${libdir}/libjs.a +} + +PACKAGES =+ "lib${BPN}" +FILES_lib${BPN} += "${libdir}/lib*.so" + +FILES_${PN}-dev += "${bindir}/js68-config" +RPROVIDES_lib${BPN} += "libmozjs-68" + +# Fails to build with thumb-1 (qemuarm) +#| {standard input}: Assembler messages: +#| {standard input}:2172: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r2,r1,LSR#20' +#| {standard input}:2173: Error: unshifted register required -- `bic r2,r2,#(1<<11)' +#| {standard input}:2174: Error: unshifted register required -- `orr r1,r1,#(1<<20)' +#| {standard input}:2176: Error: instruction not supported in Thumb16 mode -- `subs r2,r2,#0x300' +#| {standard input}:2178: Error: instruction not supported in Thumb16 mode -- `subs r5,r2,#52' +ARM_INSTRUCTION_SET_armv5 = "arm" +ARM_INSTRUCTION_SET_armv4 = "arm" + +DISABLE_STATIC = "" diff --git a/meta-gnome/recipes-support/unicode-ucd/unicode-ucd_12.1.0.bb b/meta-gnome/recipes-support/unicode-ucd/unicode-ucd_12.1.0.bb new file mode 100644 index 0000000..89ab565 --- /dev/null +++ b/meta-gnome/recipes-support/unicode-ucd/unicode-ucd_12.1.0.bb @@ -0,0 +1,25 @@ +SUMMARY = "Unicode Character Database" +HOMEPAGE = "https://unicode.org/ucd/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://unicode.org.license.html;beginline=42;endline=85;md5=67619d0c52706853c0256514e7fd04cd" + +SRC_URI = " \ + https://www.unicode.org/Public/zipped/${PV}/UCD.zip;name=ucd;subdir=ucd \ + https://www.unicode.org/license.html;name=license;subdir=${BP};downloadfilename=unicode.org.license.html \ +" +SRC_URI[ucd.md5sum] = "430cbdac2615451571dd69a976dd08f6" +SRC_URI[ucd.sha256sum] = "25ba51a0d4c6fa41047b7a5e5733068d4a734588f055f61e85f450097834a0a6" + +SRC_URI[license.md5sum] = "f03bafb623258f85ff2032c1ce567b7c" +SRC_URI[license.sha256sum] = "983225207de8a707d0903a8d70fb7a4b28c5e0f64f2366e84a6192a2d618fed4" + +inherit allarch + +do_configure[noexec] = "1" + +do_install() { + install -d ${D}${datadir}/unicode + cp -rf ${WORKDIR}/ucd ${D}${datadir}/unicode +} + +FILES_${PN} = "${datadir}/unicode/ucd" diff --git a/meta-gnome/recipes-support/xserver-xorg-cvt/xserver-xorg-cvt-native_1.20.5.bb b/meta-gnome/recipes-support/xserver-xorg-cvt/xserver-xorg-cvt-native_1.20.5.bb new file mode 100644 index 0000000..1d75d52 --- /dev/null +++ b/meta-gnome/recipes-support/xserver-xorg-cvt/xserver-xorg-cvt-native_1.20.5.bb @@ -0,0 +1,41 @@ +SUMMARY = "X.Org X cvt" +HOMEPAGE = "https://linux.die.net/man/1/cvt" +LICENSE = "MIT-X" +LIC_FILES_CHKSUM = "file://COPYING;md5=5df87950af51ac2c5822094553ea1880" + +DEPENDS += "pixman-native xorgproto-native libxrandr-native" + +XORG_PN = "xorg-server" + +SRC_URI = "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${PV}.tar.bz2" +SRC_URI[md5sum] = "c9fc7e21e11286dbedd22c00df652130" +SRC_URI[sha256sum] = "a81d8243f37e75a03d4f8c55f96d0bc25802be6ec45c3bfa5cb614c6d01bac9d" + +S = "${WORKDIR}/${XORG_PN}-${PV}" +B = "${WORKDIR}/build" + +inherit native pkgconfig + +do_configure[noexec] = "1" + +do_compile() { + cd ${S} + for header in `find -name '*.h'`; do + path=`dirname $header` + if ! echo "$incpaths" | grep -q "$path" ; then + incpaths="$incpaths -I$path" + fi + done + CFLAGS="${CFLAGS} -DXORG_VERSION_CURRENT=1 $incpaths `pkg-config --cflags pixman-1`" + LDFLAGS="${LDFLAGS} -lm `pkg-config --libs pixman-1`" + ${CC} $CFLAGS -o ${B}/cvt \ + ${S}/hw/xfree86/utils/cvt/cvt.c \ + ${S}/hw/xfree86/modes/xf86cvt.c \ + ${S}/os/xprintf.c \ + $LDFLAGS +} + +do_install() { + install -d ${D}${bindir} + install -m 755 ${B}/cvt ${D}${bindir} +} diff --git a/realmfs-builder/realmfs-modules/apt-cacher-ng b/realmfs-builder/realmfs-modules/apt-cacher-ng index 464a68f..e46c4ca 100644 --- a/realmfs-builder/realmfs-modules/apt-cacher-ng +++ b/realmfs-builder/realmfs-modules/apt-cacher-ng @@ -1,6 +1,6 @@ info "Setting up apt-cacher-ng" -apt-get --assume-no install apt-cacher-ng +apt-get -y install apt-cacher-ng systemctl -q disable apt-cacher-ng.service #