Here is a diff to add support for Indirect branch tracking (IBT) by merging the needed patches for boringssl. It based on robert's diff:
https://github.com/openbsd/ports/commit/8485e4d8db4d9325cce4db61881648dfcfce5ef1 I tested with konqueror and 12th Gen Intel i7-1260P. Test cases: youtube and HTTPS. cpu0 at mainbus0: apid 0 (boot processor) cpu0: 12th Gen Intel(R) Core(TM) i7-1260P, 1995.54 MHz, 06-9a-03, patch 00000432 cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,PT,SHA,UMIP,PKU,WAITPKG,PKS,MD_CLEAR,IBT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,IBRS_ALL,SKIP_L1DFL,MDS_NO,IF_PSCHANGE,TAA_NO,MISC_PKG_CT,ENERGY_FILT,DOITM,SBDR_SSDP_N,FBSDP_NO,PSDP_NO,RRSBA,OVERCLOCK,GDS_NO,XSAVEOPT,XSAVEC,XGETBV1,XSAVES cpu0: 48KB 64b/line 12-way D-cache, 32KB 64b/line 8-way I-cache, 1MB 64b/line 10-way L2 cache, 18MB 64b/line 12-way L3 cache cpu0: smt 0, core 0, package 0 cpu0: apic clock running at 38MHz cpu0: mwait min=64, max=64, C-substates=0.2.0.2.0.1.0.1, IBE acpicpu0 at acpi0: C3(200@1048 mwait.1@0x60), C2(350@127 mwait.1@0x21), C1(1000@1 mwait.1), PSS cpu0: Enhanced SpeedStep 1995 MHz: speeds: 2501, 2500, 2300, 2100, 2000, 1900, 1600, 1500, 1400, 1300, 1100, 1000, 800, 700, 500, 400 MHz Here are a few more changes: The patch-src_buildtools_config_linking_pri patch was a stupid leftover for the upgrade process. + QMAKE_LFLAGS += -Wl,-z,nobtcfi + QMAKE_LFLAGS += -Wl,-z,wxneeded This had no effect. (pre check if macos|ios) I also removed "content/browser/tracing/BUILD.gn" by pre-configure instead of a patch to avoid an annoying "update-patches" massages. Feedback, OK? diff --git a/x11/qt5/qtwebengine/Makefile b/x11/qt5/qtwebengine/Makefile index 266270f3d81..694d5c569a9 100644 --- a/x11/qt5/qtwebengine/Makefile +++ b/x11/qt5/qtwebengine/Makefile @@ -4,12 +4,11 @@ # Patched with security patches up to: 119.0.6045.123 USE_WXNEEDED = Yes -USE_NOBTCFI = Yes QT5NAME = QtWebEngine KDE_COMMIT = 224806a7022eed6d5c75b486bec8715a618cb314 KDE_VERSION = 5 -REVISION = 0 +REVISION = 1 # Override VERSION = ${QT5_WEBENGINE_VERSION} @@ -130,6 +129,8 @@ pre-configure: @cp ${FILESDIR}/openbsd.pri ${WRKDIST}/src/core/config/openbsd.pri @mkdir -p ${CHROMESRC}/third_party/node/openbsd/node-openbsd/bin @ln -sf ${TRUEPREFIX}/bin/node ${CHROMESRC}/third_party/node/openbsd/node-openbsd/bin/node + # build with python3 (remove catapult) + @rm ${CHROMESRC}/content/browser/tracing/BUILD.gn # Regenerate build and perlasm files (force json to not overwrite our local gn patches) @cd ${CHROMESRC}/third_party/boringssl && ${MODPY_BIN} src/util/generate_build_files.py json @cd ${WRKSRC} && env -i ${MAKE_ENV} ${CHROMESRC}/build/linux/unbundle/replace_gn_files.py \ diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_build_config_compiler_BUILD_gn b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_build_config_compiler_BUILD_gn index eeb43e95503..3c3fe671c76 100644 --- a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_build_config_compiler_BUILD_gn +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_build_config_compiler_BUILD_gn @@ -32,7 +32,7 @@ Index: src/3rdparty/chromium/build/config/compiler/BUILD.gn + } + + if (is_openbsd) { -+ ldflags += [ "-Wl,-z,wxneeded", "-Wl,-z,nobtcfi" ] ++ ldflags += [ "-Wl,-z,wxneeded" ] + } + if (use_qt && is_clang) { diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_tracing_BUILD_gn b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_tracing_BUILD_gn deleted file mode 100644 index 21249a2897b..00000000000 --- a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_content_browser_tracing_BUILD_gn +++ /dev/null @@ -1,56 +0,0 @@ -build with python3 (remove catapult) -Index: src/3rdparty/chromium/content/browser/tracing/BUILD.gn ---- src/3rdparty/chromium/content/browser/tracing/BUILD.gn.orig -+++ src/3rdparty/chromium/content/browser/tracing/BUILD.gn -@@ -1,51 +0,0 @@ --# Copyright 2014 The Chromium Authors. All rights reserved. --# Use of this source code is governed by a BSD-style license that can be --# found in the LICENSE file. -- --import("//tools/grit/grit_rule.gni") -- --# generate_about_tracing puts its files in this directory --tracing_gen_dir = "$root_gen_dir/content/browser/tracing" -- --# The script just writes filename with no dirs to the .grd, so we always need --# this file to be in the same directory as the inputs. --tracing_grd = "$tracing_gen_dir/tracing_resources.grd" -- --action("generate_tracing_grd") { -- visibility = [ ":*" ] # Depend on ":resources" to get this. -- script = "generate_trace_viewer_grd.py" -- -- input_pages = [ -- "$tracing_gen_dir/about_tracing.html", -- "$tracing_gen_dir/about_tracing.js", -- ] -- inputs = input_pages -- outputs = [ tracing_grd ] -- -- args = rebase_path(input_pages, target_gen_dir) + [ -- "--output", -- rebase_path(tracing_grd, root_build_dir), -- ] -- -- deps = [ "//third_party/catapult/tracing:generate_about_tracing" ] --} -- --grit("resources") { -- source = tracing_grd -- -- # Required because the .grd is generated. -- enable_input_discovery_for_gn_analyze = false -- -- outputs = [ -- "grit/tracing_resources.h", -- "tracing_resources.pak", -- ] -- -- # resource_ids has an entry for our .grd file that looks like: -- # "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd" -- # and what we pass here should make that resolve to our .grd file. -- defines = -- [ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir) ] -- -- deps = [ ":generate_tracing_grd" ] --} diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_chacha_asm_chacha-x86_64_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_chacha_asm_chacha-x86_64_pl index bf7da3fd6ed..960065598b1 100644 --- a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_chacha_asm_chacha-x86_64_pl +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_chacha_asm_chacha-x86_64_pl @@ -17,3 +17,11 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/chacha/asm/chacha- ___ sub AUTOLOAD() # thunk [simplified] 32-bit style perlasm +@@ -229,6 +231,7 @@ $code.=<<___; + .align 64 + ChaCha20_ctr32: + .cfi_startproc ++ _CET_ENDBR + cmp \$0,$len + je .Lno_data + mov OPENSSL_ia32cap_P+4(%rip),%r10 diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_cipher_extra_asm_aes128gcmsiv-x86_64_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_cipher_extra_asm_aes128gcmsiv-x86_64_pl index 2c7307a4845..e53de5920ad 100644 --- a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_cipher_extra_asm_aes128gcmsiv-x86_64_pl +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_cipher_extra_asm_aes128gcmsiv-x86_64_pl @@ -18,3 +18,139 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/cipher_extra/asm/a ___ $code.=<<___; +@@ -134,6 +135,7 @@ $code.=<<___; + .align 16 + aesgcmsiv_htable_init: + .cfi_startproc ++ _CET_ENDBR + vmovdqa ($H), $T + vmovdqa $T, $TMP0 + vmovdqa $T, ($Htbl) # H +@@ -174,6 +176,7 @@ sub aesgcmsiv_htable6_init { + .align 16 + aesgcmsiv_htable6_init: + .cfi_startproc ++ _CET_ENDBR + vmovdqa ($H), $T + vmovdqa $T, $TMP0 + vmovdqa $T, ($Htbl) # H +@@ -235,6 +238,7 @@ ___ + .align 16 + aesgcmsiv_htable_polyval: + .cfi_startproc ++ _CET_ENDBR + test $len, $len + jnz .Lhtable_polyval_start + ret +@@ -420,6 +424,7 @@ sub aesgcmsiv_polyval_horner { + .align 16 + aesgcmsiv_polyval_horner: + .cfi_startproc ++ _CET_ENDBR + test $L, $L + jnz .Lpolyval_horner_start + ret +@@ -460,6 +465,7 @@ $code.=<<___; + .align 16 + aes128gcmsiv_aes_ks: + .cfi_startproc ++ _CET_ENDBR + vmovdqu (%rdi), %xmm1 # xmm1 = user key + vmovdqa %xmm1, (%rsi) # rsi points to output + +@@ -521,6 +527,7 @@ $code.=<<___; + .align 16 + aes256gcmsiv_aes_ks: + .cfi_startproc ++ _CET_ENDBR + vmovdqu (%rdi), %xmm1 + vmovdqu 16(%rdi), %xmm3 + vmovdqa %xmm1, (%rsi) +@@ -614,6 +621,7 @@ ___ + .align 16 + aes128gcmsiv_aes_ks_enc_x1: + .cfi_startproc ++ _CET_ENDBR + vmovdqa (%rcx), %xmm1 # xmm1 = first 16 bytes of random key + vmovdqa 0*16(%rdi), $BLOCK1 + +@@ -687,6 +695,7 @@ ___ + .align 16 + aes128gcmsiv_kdf: + .cfi_startproc ++ _CET_ENDBR + # parameter 1: %rdi Pointer to NONCE + # parameter 2: %rsi Pointer to CT + # parameter 4: %rdx Pointer to keys +@@ -787,6 +796,7 @@ ___ + .align 16 + aes128gcmsiv_enc_msg_x4: + .cfi_startproc ++ _CET_ENDBR + test $LEN, $LEN + jnz .L128_enc_msg_x4_start + ret +@@ -984,6 +994,7 @@ ___ + .align 16 + aes128gcmsiv_enc_msg_x8: + .cfi_startproc ++ _CET_ENDBR + test $LEN, $LEN + jnz .L128_enc_msg_x8_start + ret +@@ -1239,6 +1250,7 @@ ___ + + $code.=<<___; + .cfi_startproc ++ _CET_ENDBR + test \$~15, $LEN + jnz .L${labelPrefix}_dec_start + ret +@@ -1578,6 +1590,7 @@ sub aes128gcmsiv_ecb_enc_block { + .align 16 + aes128gcmsiv_ecb_enc_block: + .cfi_startproc ++ _CET_ENDBR + vmovdqa (%rdi), $STATE_1 + + vpxor ($KSp), $STATE_1, $STATE_1 +@@ -1670,6 +1683,7 @@ ___ + .align 16 + aes256gcmsiv_aes_ks_enc_x1: + .cfi_startproc ++ _CET_ENDBR + vmovdqa con1(%rip), $CON_MASK # CON_MASK = 1,1,1,1 + vmovdqa mask(%rip), $MASK_256 # MASK_256 + vmovdqa ($PT), $BLOCK1 +@@ -1711,6 +1725,7 @@ sub aes256gcmsiv_ecb_enc_block { + .align 16 + aes256gcmsiv_ecb_enc_block: + .cfi_startproc ++ _CET_ENDBR + vmovdqa (%rdi), $STATE_1 + vpxor ($KSp), $STATE_1, $STATE_1 + vaesenc 1*16($KSp), $STATE_1, $STATE_1 +@@ -1794,6 +1809,7 @@ ___ + .align 16 + aes256gcmsiv_enc_msg_x4: + .cfi_startproc ++ _CET_ENDBR + test $LEN, $LEN + jnz .L256_enc_msg_x4_start + ret +@@ -1994,6 +2010,7 @@ ___ + .align 16 + aes256gcmsiv_enc_msg_x8: + .cfi_startproc ++ _CET_ENDBR + test $LEN, $LEN + jnz .L256_enc_msg_x8_start + ret +@@ -2200,6 +2217,7 @@ ___ + .align 16 + aes256gcmsiv_kdf: + .cfi_startproc ++ _CET_ENDBR + # parameter 1: %rdi Pointer to NONCE + # parameter 2: %rsi Pointer to CT + # parameter 4: %rdx Pointer to keys diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_cipher_extra_asm_chacha20_poly1305_x86_64_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_cipher_extra_asm_chacha20_poly1305_x86_64_pl index b38ccbafb04..2b5b6074588 100644 --- a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_cipher_extra_asm_chacha20_poly1305_x86_64_pl +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_cipher_extra_asm_chacha20_poly1305_x86_64_pl @@ -17,3 +17,19 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/cipher_extra/asm/c ___ my ($oup,$inp,$inl,$adp,$keyp,$itr1,$itr2)=("%rdi","%rsi","%rbx","%rcx","%r9","%rcx","%r8"); +@@ -433,6 +435,7 @@ $code.=" + .align 64 + chacha20_poly1305_open: + .cfi_startproc ++ _CET_ENDBR + push %rbp + .cfi_adjust_cfa_offset 8 + push %rbx +@@ -831,6 +834,7 @@ open_sse_128: + .align 64 + chacha20_poly1305_seal: + .cfi_startproc ++ _CET_ENDBR + push %rbp + .cfi_adjust_cfa_offset 8 + push %rbx diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_aes_asm_aesni-x86_64_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_aes_asm_aesni-x86_64_pl index 38df3b79a15..f60212b2884 100644 --- a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_aes_asm_aesni-x86_64_pl +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_aes_asm_aesni-x86_64_pl @@ -1,7 +1,79 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/aes/asm/aesni-x86_64.pl --- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/aes/asm/aesni-x86_64.pl.orig +++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/aes/asm/aesni-x86_64.pl -@@ -4727,6 +4727,7 @@ ___ +@@ -275,6 +275,7 @@ $code.=<<___; + .align 16 + ${PREFIX}_encrypt: + .cfi_startproc ++ _CET_ENDBR + #ifdef BORINGSSL_DISPATCH_TEST + .extern BORINGSSL_function_hit + movb \$1,BORINGSSL_function_hit+1(%rip) +@@ -297,6 +298,7 @@ $code.=<<___; + .align 16 + ${PREFIX}_decrypt: + .cfi_startproc ++ _CET_ENDBR + movups ($inp),$inout0 # load input + mov 240($key),$rounds # key->rounds + ___ +@@ -617,6 +619,7 @@ $code.=<<___; + .align 16 + ${PREFIX}_ecb_encrypt: + .cfi_startproc ++ _CET_ENDBR + ___ + $code.=<<___ if ($win64); + lea -0x58(%rsp),%rsp +@@ -1203,6 +1206,7 @@ $code.=<<___; + .align 16 + ${PREFIX}_ctr32_encrypt_blocks: + .cfi_startproc ++ _CET_ENDBR + #ifdef BORINGSSL_DISPATCH_TEST + movb \$1,BORINGSSL_function_hit(%rip) + #endif +@@ -1779,6 +1783,7 @@ $code.=<<___; + .align 16 + ${PREFIX}_xts_encrypt: + .cfi_startproc ++ _CET_ENDBR + lea (%rsp),%r11 # frame pointer + .cfi_def_cfa_register %r11 + push %rbp +@@ -2262,6 +2267,7 @@ $code.=<<___; + .align 16 + ${PREFIX}_xts_decrypt: + .cfi_startproc ++ _CET_ENDBR + lea (%rsp),%r11 # frame pointer + .cfi_def_cfa_register %r11 + push %rbp +@@ -3729,6 +3735,7 @@ $code.=<<___; + .align 16 + ${PREFIX}_cbc_encrypt: + .cfi_startproc ++ _CET_ENDBR + test $len,$len # check length + jz .Lcbc_ret + +@@ -4278,6 +4285,7 @@ $code.=<<___; + .align 16 + ${PREFIX}_set_decrypt_key: + .cfi_startproc ++ _CET_ENDBR + .byte 0x48,0x83,0xEC,0x08 # sub rsp,8 + .cfi_adjust_cfa_offset 8 + call __aesni_set_encrypt_key +@@ -4350,6 +4358,7 @@ $code.=<<___; + ${PREFIX}_set_encrypt_key: + __aesni_set_encrypt_key: + .cfi_startproc ++ _CET_ENDBR + #ifdef BORINGSSL_DISPATCH_TEST + movb \$1,BORINGSSL_function_hit+3(%rip) + #endif +@@ -4727,6 +4736,7 @@ ___ } $code.=<<___; @@ -9,7 +81,7 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/aes/asm .align 64 .Lbswap_mask: .byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -@@ -4749,6 +4750,7 @@ $code.=<<___; +@@ -4749,6 +4759,7 @@ $code.=<<___; .asciz "AES for Intel AES-NI, CRYPTOGAMS by <appro\@openssl.org>" .align 64 diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_aes_asm_vpaes-x86_64_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_aes_asm_vpaes-x86_64_pl index b86e9a5f321..b8544082eef 100644 --- a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_aes_asm_vpaes-x86_64_pl +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_aes_asm_vpaes-x86_64_pl @@ -1,7 +1,55 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/aes/asm/vpaes-x86_64.pl --- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/aes/asm/vpaes-x86_64.pl.orig +++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/aes/asm/vpaes-x86_64.pl -@@ -1288,6 +1288,7 @@ _vpaes_preheat: +@@ -871,6 +871,7 @@ _vpaes_schedule_mangle: + .align 16 + ${PREFIX}_set_encrypt_key: + .cfi_startproc ++ _CET_ENDBR + #ifdef BORINGSSL_DISPATCH_TEST + .extern BORINGSSL_function_hit + movb \$1, BORINGSSL_function_hit+5(%rip) +@@ -926,6 +927,7 @@ $code.=<<___; + .align 16 + ${PREFIX}_set_decrypt_key: + .cfi_startproc ++ _CET_ENDBR + ___ + $code.=<<___ if ($win64); + lea -0xb8(%rsp),%rsp +@@ -981,6 +983,7 @@ $code.=<<___; + .align 16 + ${PREFIX}_encrypt: + .cfi_startproc ++ _CET_ENDBR + #ifdef BORINGSSL_DISPATCH_TEST + .extern BORINGSSL_function_hit + movb \$1, BORINGSSL_function_hit+4(%rip) +@@ -1030,6 +1033,7 @@ $code.=<<___; + .align 16 + ${PREFIX}_decrypt: + .cfi_startproc ++ _CET_ENDBR + ___ + $code.=<<___ if ($win64); + lea -0xb8(%rsp),%rsp +@@ -1081,6 +1085,7 @@ $code.=<<___; + .align 16 + ${PREFIX}_cbc_encrypt: + .cfi_startproc ++ _CET_ENDBR + xchg $key,$len + ___ + ($len,$key)=($key,$len); +@@ -1166,6 +1171,7 @@ $code.=<<___; + .align 16 + ${PREFIX}_ctr32_encrypt_blocks: + .cfi_startproc ++ _CET_ENDBR + # _vpaes_encrypt_core and _vpaes_encrypt_core_2x expect the key in %rdx. + xchg $key, $blocks + ___ +@@ -1288,6 +1294,7 @@ _vpaes_preheat: ## ## ######################################################## .type _vpaes_consts,\@object diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_bn_asm_rsaz-avx2_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_bn_asm_rsaz-avx2_pl new file mode 100644 index 00000000000..429068ed5ea --- /dev/null +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_bn_asm_rsaz-avx2_pl @@ -0,0 +1,51 @@ +Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/bn/asm/rsaz-avx2.pl +--- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/bn/asm/rsaz-avx2.pl.orig ++++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/bn/asm/rsaz-avx2.pl +@@ -112,6 +112,7 @@ $code.=<<___; + .align 64 + rsaz_1024_sqr_avx2: # 702 cycles, 14% faster than rsaz_1024_mul_avx2 + .cfi_startproc ++ _CET_ENDBR + lea (%rsp), %rax + .cfi_def_cfa_register %rax + push %rbx +@@ -863,6 +864,7 @@ $code.=<<___; + .align 64 + rsaz_1024_mul_avx2: + .cfi_startproc ++ _CET_ENDBR + lea (%rsp), %rax + .cfi_def_cfa_register %rax + push %rbx +@@ -1474,6 +1476,7 @@ $code.=<<___; + .align 32 + rsaz_1024_red2norm_avx2: + .cfi_startproc ++ _CET_ENDBR + sub \$-128,$inp # size optimization + xor %rax,%rax + ___ +@@ -1515,6 +1518,7 @@ $code.=<<___; + .align 32 + rsaz_1024_norm2red_avx2: + .cfi_startproc ++ _CET_ENDBR + sub \$-128,$out # size optimization + mov ($inp),@T[0] + mov \$0x1fffffff,%eax +@@ -1559,6 +1563,7 @@ $code.=<<___; + .align 32 + rsaz_1024_scatter5_avx2: + .cfi_startproc ++ _CET_ENDBR + vzeroupper + vmovdqu .Lscatter_permd(%rip),%ymm5 + shl \$4,$power +@@ -1586,6 +1591,7 @@ rsaz_1024_scatter5_avx2: + .align 32 + rsaz_1024_gather5_avx2: + .cfi_startproc ++ _CET_ENDBR + vzeroupper + mov %rsp,%r11 + .cfi_def_cfa_register %r11 diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_bn_asm_x86_64-mont5_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_bn_asm_x86_64-mont5_pl index fba02b1fba3..ba8ef057e63 100644 --- a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_bn_asm_x86_64-mont5_pl +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_bn_asm_x86_64-mont5_pl @@ -1,7 +1,55 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/bn/asm/x86_64-mont5.pl --- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/bn/asm/x86_64-mont5.pl.orig +++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/bn/asm/x86_64-mont5.pl -@@ -3732,11 +3732,13 @@ $code.=<<___; +@@ -79,6 +79,7 @@ $code=<<___; + .align 64 + bn_mul_mont_gather5: + .cfi_startproc ++ _CET_ENDBR + mov ${num}d,${num}d + mov %rsp,%rax + .cfi_def_cfa_register %rax +@@ -1087,6 +1088,7 @@ $code.=<<___; + .align 32 + bn_power5: + .cfi_startproc ++ _CET_ENDBR + mov %rsp,%rax + .cfi_def_cfa_register %rax + ___ +@@ -1229,6 +1231,7 @@ $code.=<<___; + bn_sqr8x_internal: + __bn_sqr8x_internal: + .cfi_startproc ++ _CET_ENDBR + ############################################################## + # Squaring part: + # +@@ -2909,6 +2912,7 @@ bn_powerx5: + bn_sqrx8x_internal: + __bn_sqrx8x_internal: + .cfi_startproc ++ _CET_ENDBR + ################################################################## + # Squaring part: + # +@@ -3620,6 +3624,7 @@ $code.=<<___; + .align 16 + bn_scatter5: + .cfi_startproc ++ _CET_ENDBR + cmp \$0, $num + jz .Lscatter_epilogue + lea ($tbl,$idx,8),$tbl +@@ -3641,6 +3646,7 @@ bn_scatter5: + bn_gather5: + .cfi_startproc + .LSEH_begin_bn_gather5: # Win64 thing, but harmless in other cases ++ _CET_ENDBR + # I can't trust assembler to use specific encoding:-( + .byte 0x4c,0x8d,0x14,0x24 #lea (%rsp),%r10 + .cfi_def_cfa_register %r10 +@@ -3732,11 +3738,13 @@ $code.=<<___; ___ } $code.=<<___; diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_bn_asm_x86_64-mont_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_bn_asm_x86_64-mont_pl new file mode 100644 index 00000000000..dba9daf1736 --- /dev/null +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_bn_asm_x86_64-mont_pl @@ -0,0 +1,11 @@ +Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/bn/asm/x86_64-mont.pl +--- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/bn/asm/x86_64-mont.pl.orig ++++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/bn/asm/x86_64-mont.pl +@@ -92,6 +92,7 @@ $code=<<___; + .align 16 + bn_mul_mont: + .cfi_startproc ++ _CET_ENDBR + mov ${num}d,${num}d + mov %rsp,%rax + .cfi_def_cfa_register %rax diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_ec_asm_p256-x86_64-asm_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_ec_asm_p256-x86_64-asm_pl index 0278b2aae9d..b3d44a7721d 100644 --- a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_ec_asm_p256-x86_64-asm_pl +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_ec_asm_p256-x86_64-asm_pl @@ -17,3 +17,99 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/ec/asm/ ___ { +@@ -96,6 +98,7 @@ $code.=<<___; + .align 32 + ecp_nistz256_neg: + .cfi_startproc ++ _CET_ENDBR + push %r12 + .cfi_push %r12 + push %r13 +@@ -164,6 +167,7 @@ $code.=<<___; + .align 32 + ecp_nistz256_ord_mul_mont: + .cfi_startproc ++ _CET_ENDBR + ___ + $code.=<<___ if ($addx); + leaq OPENSSL_ia32cap_P(%rip), %rcx +@@ -495,6 +499,7 @@ $code.=<<___; + .align 32 + ecp_nistz256_ord_sqr_mont: + .cfi_startproc ++ _CET_ENDBR + ___ + $code.=<<___ if ($addx); + leaq OPENSSL_ia32cap_P(%rip), %rcx +@@ -1245,6 +1250,7 @@ $code.=<<___; + .align 32 + ecp_nistz256_mul_mont: + .cfi_startproc ++ _CET_ENDBR + ___ + $code.=<<___ if ($addx); + leaq OPENSSL_ia32cap_P(%rip), %rcx +@@ -1547,6 +1553,7 @@ __ecp_nistz256_mul_montq: + .align 32 + ecp_nistz256_sqr_mont: + .cfi_startproc ++ _CET_ENDBR + ___ + $code.=<<___ if ($addx); + leaq OPENSSL_ia32cap_P(%rip), %rcx +@@ -2096,6 +2103,7 @@ $code.=<<___; + .align 32 + ecp_nistz256_select_w5: + .cfi_startproc ++ _CET_ENDBR + ___ + $code.=<<___ if ($avx>1); + leaq OPENSSL_ia32cap_P(%rip), %rax +@@ -2196,6 +2204,7 @@ $code.=<<___; + .align 32 + ecp_nistz256_select_w7: + .cfi_startproc ++ _CET_ENDBR + ___ + $code.=<<___ if ($avx>1); + leaq OPENSSL_ia32cap_P(%rip), %rax +@@ -2401,6 +2410,7 @@ $code.=<<___; + ecp_nistz256_avx2_select_w7: + .cfi_startproc + .Lavx2_select_w7: ++ _CET_ENDBR + vzeroupper + ___ + $code.=<<___ if ($win64); +@@ -2512,6 +2522,7 @@ $code.=<<___; + .type ecp_nistz256_avx2_select_w7,\@function,3 + .align 32 + ecp_nistz256_avx2_select_w7: ++ _CET_ENDBR + .byte 0x0f,0x0b # ud2 + ret + .size ecp_nistz256_avx2_select_w7,.-ecp_nistz256_avx2_select_w7 +@@ -2716,6 +2727,7 @@ $code.=<<___; + .align 32 + ecp_nistz256_point_double: + .cfi_startproc ++ _CET_ENDBR + ___ + $code.=<<___ if ($addx); + leaq OPENSSL_ia32cap_P(%rip), %rcx +@@ -2968,6 +2980,7 @@ $code.=<<___; + .align 32 + ecp_nistz256_point_add: + .cfi_startproc ++ _CET_ENDBR + ___ + $code.=<<___ if ($addx); + leaq OPENSSL_ia32cap_P(%rip), %rcx +@@ -3366,6 +3379,7 @@ $code.=<<___; + .align 32 + ecp_nistz256_point_add_affine: + .cfi_startproc ++ _CET_ENDBR + ___ + $code.=<<___ if ($addx); + leaq OPENSSL_ia32cap_P(%rip), %rcx diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_ec_asm_p256_beeu-x86_64-asm_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_ec_asm_p256_beeu-x86_64-asm_pl new file mode 100644 index 00000000000..eafd21e9e7e --- /dev/null +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_ec_asm_p256_beeu-x86_64-asm_pl @@ -0,0 +1,11 @@ +Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/ec/asm/p256_beeu-x86_64-asm.pl +--- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/ec/asm/p256_beeu-x86_64-asm.pl.orig ++++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/ec/asm/p256_beeu-x86_64-asm.pl +@@ -154,6 +154,7 @@ $code.=<<___; + .align 32 + beeu_mod_inverse_vartime: + .cfi_startproc ++ _CET_ENDBR + push %rbp + .cfi_push rbp + push %r12 diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_md5_asm_md5-x86_64_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_md5_asm_md5-x86_64_pl new file mode 100644 index 00000000000..36a08cad38f --- /dev/null +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_md5_asm_md5-x86_64_pl @@ -0,0 +1,11 @@ +Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/md5/asm/md5-x86_64.pl +--- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/md5/asm/md5-x86_64.pl.orig ++++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/md5/asm/md5-x86_64.pl +@@ -131,6 +131,7 @@ $code .= <<EOF; + .type md5_block_asm_data_order,\@function,3 + md5_block_asm_data_order: + .cfi_startproc ++ _CET_ENDBR + push %rbp + .cfi_push rbp + push %rbx diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_modes_asm_aesni-gcm-x86_64_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_modes_asm_aesni-gcm-x86_64_pl index eb007d35859..bfdd0482aa2 100644 --- a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_modes_asm_aesni-gcm-x86_64_pl +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_modes_asm_aesni-gcm-x86_64_pl @@ -1,7 +1,23 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl --- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl.orig +++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl -@@ -983,6 +983,7 @@ ___ +@@ -425,6 +425,7 @@ $code.=<<___; + .align 32 + aesni_gcm_decrypt: + .cfi_startproc ++ _CET_ENDBR + xor $ret,$ret + + # We call |_aesni_ctr32_ghash_6x|, which requires at least 96 (0x60) +@@ -664,6 +665,7 @@ _aesni_ctr32_6x: + .align 32 + aesni_gcm_encrypt: + .cfi_startproc ++ _CET_ENDBR + #ifdef BORINGSSL_DISPATCH_TEST + .extern BORINGSSL_function_hit + movb \$1,BORINGSSL_function_hit+2(%rip) +@@ -983,6 +985,7 @@ ___ $code.=<<___; .align 64 @@ -9,7 +25,7 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/a .Lbswap_mask: .byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 .Lpoly: -@@ -995,6 +996,7 @@ $code.=<<___; +@@ -995,6 +998,7 @@ $code.=<<___; .byte 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .asciz "AES-NI GCM module for x86_64, CRYPTOGAMS by <appro\@openssl.org>" .align 64 @@ -17,3 +33,19 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/a ___ if ($win64) { $rec="%rcx"; +@@ -1124,6 +1128,7 @@ $code=<<___; # assembler is too old + .globl aesni_gcm_encrypt + .type aesni_gcm_encrypt,\@abi-omnipotent + aesni_gcm_encrypt: ++ _CET_ENDBR + xor %eax,%eax + ret + .size aesni_gcm_encrypt,.-aesni_gcm_encrypt +@@ -1131,6 +1136,7 @@ aesni_gcm_encrypt: + .globl aesni_gcm_decrypt + .type aesni_gcm_decrypt,\@abi-omnipotent + aesni_gcm_decrypt: ++ _CET_ENDBR + xor %eax,%eax + ret + .size aesni_gcm_decrypt,.-aesni_gcm_decrypt diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_modes_asm_ghash-ssse3-x86_64_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_modes_asm_ghash-ssse3-x86_64_pl index 0867cfaf912..1ea343f6fa2 100644 --- a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_modes_asm_ghash-ssse3-x86_64_pl +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_modes_asm_ghash-ssse3-x86_64_pl @@ -1,7 +1,23 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/asm/ghash-ssse3-x86_64.pl --- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/asm/ghash-ssse3-x86_64.pl.orig +++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/asm/ghash-ssse3-x86_64.pl -@@ -333,6 +333,7 @@ $code .= <<____; +@@ -104,6 +104,7 @@ my $code = <<____; + gcm_gmult_ssse3: + .cfi_startproc + .Lgmult_seh_begin: ++ _CET_ENDBR + ____ + $code .= <<____ if ($win64); + subq \$40, %rsp +@@ -247,6 +248,7 @@ $code .= <<____; + gcm_ghash_ssse3: + .Lghash_seh_begin: + .cfi_startproc ++ _CET_ENDBR + ____ + $code .= <<____ if ($win64); + subq \$56, %rsp +@@ -333,6 +335,7 @@ $code .= <<____; .cfi_endproc .size gcm_ghash_ssse3,.-gcm_ghash_ssse3 @@ -9,7 +25,7 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/a .align 16 # .Lreverse_bytes is a permutation which, if applied with pshufb, reverses the # bytes in an XMM register. -@@ -341,6 +342,7 @@ $code .= <<____; +@@ -341,6 +344,7 @@ $code .= <<____; # .Llow4_mask is an XMM mask which selects the low four bits of each byte. .Llow4_mask: .quad 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_modes_asm_ghash-x86_64_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_modes_asm_ghash-x86_64_pl index bbc82c40d96..7921015771e 100644 --- a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_modes_asm_ghash-x86_64_pl +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_modes_asm_ghash-x86_64_pl @@ -1,7 +1,55 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/asm/ghash-x86_64.pl --- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/asm/ghash-x86_64.pl.orig +++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/asm/ghash-x86_64.pl -@@ -1275,6 +1275,7 @@ ___ +@@ -205,6 +205,7 @@ $code.=<<___; + .align 16 + gcm_init_clmul: + .cfi_startproc ++ _CET_ENDBR + .L_init_clmul: + ___ + $code.=<<___ if ($win64); +@@ -287,6 +288,7 @@ $code.=<<___; + .align 16 + gcm_gmult_clmul: + .cfi_startproc ++ _CET_ENDBR + .L_gmult_clmul: + movdqu ($Xip),$Xi + movdqa .Lbswap_mask(%rip),$T3 +@@ -338,6 +340,7 @@ $code.=<<___; + .align 32 + gcm_ghash_clmul: + .cfi_startproc ++ _CET_ENDBR + .L_ghash_clmul: + ___ + $code.=<<___ if ($win64); +@@ -697,6 +700,7 @@ $code.=<<___; + .align 32 + gcm_init_avx: + .cfi_startproc ++ _CET_ENDBR + ___ + if ($avx) { + my ($Htbl,$Xip)=@_4args; +@@ -841,6 +845,7 @@ $code.=<<___; + .align 32 + gcm_gmult_avx: + .cfi_startproc ++ _CET_ENDBR + jmp .L_gmult_clmul + .cfi_endproc + .size gcm_gmult_avx,.-gcm_gmult_avx +@@ -852,6 +857,7 @@ $code.=<<___; + .align 32 + gcm_ghash_avx: + .cfi_startproc ++ _CET_ENDBR + ___ + if ($avx) { + my ($Xip,$Htbl,$inp,$len)=@_4args; +@@ -1275,6 +1281,7 @@ ___ } $code.=<<___; @@ -9,7 +57,7 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/modes/a .align 64 .Lbswap_mask: .byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -@@ -1286,6 +1287,7 @@ $code.=<<___; +@@ -1286,6 +1293,7 @@ $code.=<<___; .asciz "GHASH for x86_64, CRYPTOGAMS by <appro\@openssl.org>" .align 64 diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_rand_asm_rdrand-x86_64_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_rand_asm_rdrand-x86_64_pl new file mode 100644 index 00000000000..19286c66a5c --- /dev/null +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_rand_asm_rdrand-x86_64_pl @@ -0,0 +1,19 @@ +Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/rand/asm/rdrand-x86_64.pl +--- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/rand/asm/rdrand-x86_64.pl.orig ++++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/rand/asm/rdrand-x86_64.pl +@@ -46,6 +46,7 @@ print<<___; + .align 16 + CRYPTO_rdrand: + .cfi_startproc ++ _CET_ENDBR + xorq %rax, %rax + rdrand $tmp1 + # An add-with-carry of zero effectively sets %rax to the carry flag. +@@ -64,6 +65,7 @@ CRYPTO_rdrand: + .align 16 + CRYPTO_rdrand_multiple8_buf: + .cfi_startproc ++ _CET_ENDBR + test $len, $len + jz .Lout + movq \$8, $tmp1 diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_sha_asm_sha1-x86_64_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_sha_asm_sha1-x86_64_pl index 952cdfd8778..1b5fd466840 100644 --- a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_sha_asm_sha1-x86_64_pl +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_sha_asm_sha1-x86_64_pl @@ -1,7 +1,15 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/sha/asm/sha1-x86_64.pl --- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/sha/asm/sha1-x86_64.pl.orig +++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/sha/asm/sha1-x86_64.pl -@@ -1815,6 +1815,7 @@ ___ +@@ -244,6 +244,7 @@ $code.=<<___; + .align 16 + sha1_block_data_order: + .cfi_startproc ++ _CET_ENDBR + leaq OPENSSL_ia32cap_P(%rip),%r10 + mov 0(%r10),%r9d + mov 4(%r10),%r8d +@@ -1815,6 +1816,7 @@ ___ } } $code.=<<___; @@ -9,7 +17,7 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/sha/asm .align 64 K_XX_XX: .long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 # K_00_19 -@@ -1828,6 +1829,7 @@ K_XX_XX: +@@ -1828,6 +1830,7 @@ K_XX_XX: .long 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f # pbswap mask .long 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f # pbswap mask .byte 0xf,0xe,0xd,0xc,0xb,0xa,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,0x1,0x0 diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_sha_asm_sha512-x86_64_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_sha_asm_sha512-x86_64_pl index 9df0c6debb1..8b1f79effb3 100644 --- a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_sha_asm_sha512-x86_64_pl +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_fipsmodule_sha_asm_sha512-x86_64_pl @@ -1,7 +1,15 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/sha/asm/sha512-x86_64.pl --- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/sha/asm/sha512-x86_64.pl.orig +++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/sha/asm/sha512-x86_64.pl -@@ -407,6 +407,7 @@ ___ +@@ -266,6 +266,7 @@ $code=<<___; + .align 16 + $func: + .cfi_startproc ++ _CET_ENDBR + ___ + $code.=<<___ if ($SZ==4 || $avx); + leaq OPENSSL_ia32cap_P(%rip),%r11 +@@ -407,6 +408,7 @@ ___ if ($SZ==4) { $code.=<<___; @@ -9,7 +17,7 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/sha/asm .align 64 .type $TABLE,\@object $TABLE: -@@ -450,9 +451,11 @@ $TABLE: +@@ -450,9 +452,11 @@ $TABLE: .long 0xffffffff,0xffffffff,0x03020100,0x0b0a0908 .long 0xffffffff,0xffffffff,0x03020100,0x0b0a0908 .asciz "SHA256 block transform for x86_64, CRYPTOGAMS by <appro\@openssl.org>" @@ -21,7 +29,7 @@ Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/sha/asm .align 64 .type $TABLE,\@object $TABLE: -@@ -540,6 +543,7 @@ $TABLE: +@@ -540,6 +544,7 @@ $TABLE: .quad 0x0001020304050607,0x08090a0b0c0d0e0f .quad 0x0001020304050607,0x08090a0b0c0d0e0f .asciz "SHA512 block transform for x86_64, CRYPTOGAMS by <appro\@openssl.org>" diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_perlasm_x86_64-xlate_pl b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_perlasm_x86_64-xlate_pl new file mode 100644 index 00000000000..4ed9cc08d03 --- /dev/null +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_boringssl_src_crypto_perlasm_x86_64-xlate_pl @@ -0,0 +1,25 @@ +Index: src/3rdparty/chromium/third_party/boringssl/src/crypto/perlasm/x86_64-xlate.pl +--- src/3rdparty/chromium/third_party/boringssl/src/crypto/perlasm/x86_64-xlate.pl.orig ++++ src/3rdparty/chromium/third_party/boringssl/src/crypto/perlasm/x86_64-xlate.pl +@@ -1162,6 +1162,21 @@ OPTION DOTNAME + ___ + } + ++if ($nasm) { ++ print <<___; ++\%define _CET_ENDBR ++___ ++} else { ++ print <<___; ++#if defined(__CET__) ++#include <cet.h> ++#else ++#define _CET_ENDBR ++#endif ++ ++___ ++} ++ + if ($gas) { + print <<___; + #if defined(__has_feature) diff --git a/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_dav1d_BUILD_gn b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_dav1d_BUILD_gn new file mode 100644 index 00000000000..e7930e5813e --- /dev/null +++ b/x11/qt5/qtwebengine/patches/patch-src_3rdparty_chromium_third_party_dav1d_BUILD_gn @@ -0,0 +1,17 @@ +Index: src/3rdparty/chromium/third_party/dav1d/BUILD.gn +--- src/3rdparty/chromium/third_party/dav1d/BUILD.gn.orig ++++ src/3rdparty/chromium/third_party/dav1d/BUILD.gn +@@ -9,11 +9,11 @@ import("//build/config/sanitizers/sanitizers.gni") + import("//third_party/nasm/nasm_assemble.gni") + + # MemorySanitizer can't handle assembly, https://crbug.com/928357. +-enable_nasm = (current_cpu == "x86" || current_cpu == "x64") && !is_msan ++enable_nasm = false + + if (is_win) { + platform_config_root = "config/win/$current_cpu" +-} else if (is_msan) { ++} else if (!enable_nasm) { + assert(current_cpu == "x64" && (is_linux || is_chromeos), + "Only Linux X64 MSAN is supported") + platform_config_root = "config/linux-noasm/$current_cpu" diff --git a/x11/qt5/qtwebengine/patches/patch-src_buildtools_config_linking_pri b/x11/qt5/qtwebengine/patches/patch-src_buildtools_config_linking_pri index 4883d1f0228..437e0ee7992 100644 --- a/x11/qt5/qtwebengine/patches/patch-src_buildtools_config_linking_pri +++ b/x11/qt5/qtwebengine/patches/patch-src_buildtools_config_linking_pri @@ -27,16 +27,7 @@ Index: src/buildtools/config/linking.pri NINJA_OBJECTS = $$eval($$list($$NINJA_OBJECTS)) # Do manual response file linking for macOS and Linux -@@ -27,6 +31,8 @@ write_file($$RSP_ARCHIVE_FILE, RSP_A_CONTENT) - if(macos|ios) { - !static { - QMAKE_LFLAGS += -Wl,-filelist,$$shell_quote($${RSP_OBJECT_FILE}) -+ QMAKE_LFLAGS += -Wl,-z,nobtcfi -+ QMAKE_LFLAGS += -Wl,-z,wxneeded - QMAKE_LFLAGS += @$${RSP_ARCHIVE_FILE} - } else { - OBJECTS += $$NINJA_OBJECTS -@@ -34,7 +40,7 @@ if(macos|ios) { +@@ -34,7 +38,7 @@ if(macos|ios) { } } @@ -45,7 +36,7 @@ Index: src/buildtools/config/linking.pri !static { QMAKE_LFLAGS += @$${RSP_OBJECT_FILE} QMAKE_LFLAGS += -Wl,--start-group @$${RSP_ARCHIVE_FILE} -Wl,--end-group -@@ -60,7 +66,7 @@ LIBS_PRIVATE += $$NINJA_LIB_DIRS $$NINJA_LIBS +@@ -60,7 +64,7 @@ LIBS_PRIVATE += $$NINJA_LIB_DIRS $$NINJA_LIBS unix:qtConfig(webengine-noexecstack): \ QMAKE_LFLAGS += -Wl,-z,noexecstack