Compare commits
462 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e0e6facdf7 | |||
| 8b60c56d58 | |||
| 592e2c9b0f | |||
| 26d6d26f06 | |||
| 7d71639b4e | |||
| e75902d234 | |||
| 3ec6159f93 | |||
| a650178176 | |||
| ea40c3bb7c | |||
| f1847d7f6b | |||
| 750b3b453b | |||
| 802f8f1577 | |||
| 23b70803bb | |||
| b2675de220 | |||
| 193306dfeb | |||
| 7db8278855 | |||
| 50d707ffd5 | |||
| 5e7077ab2c | |||
| d5ccf482b2 | |||
| aa125fe9e2 | |||
| f453b6c2a2 | |||
| 350d7d15b4 | |||
| 1f7447f1c4 | |||
| 8142468937 | |||
| bbf510ac9b | |||
| 00e585999d | |||
| 482cf69613 | |||
| 23117e7e95 | |||
| 17a8c647e1 | |||
| d98fdfbbe0 | |||
| be6f88e66c | |||
| ccf3a7c3f3 | |||
| 34ef491cc7 | |||
| e3454f0753 | |||
| 720e10cf04 | |||
| cc9865b257 | |||
| f9b5866831 | |||
| cecbd5cbdf | |||
| e8164fa77c | |||
| 9c0641baab | |||
| 5bc9386587 | |||
| 22a81f70cc | |||
| 7540adc072 | |||
| 82ef40294e | |||
| 4321616c47 | |||
| 977cf2d586 | |||
| 6bb18287b9 | |||
| 65df1602ea | |||
| 9c5508803e | |||
| 4db83e6332 | |||
| 1f79e0a0d9 | |||
| dc1eeaa798 | |||
| 95d7b57b43 | |||
| 4bd0193db5 | |||
| 570bcf896e | |||
| 675cabaa42 | |||
| 2f89f10368 | |||
| 804d48f233 | |||
| ae476e040f | |||
| f0e4fa0695 | |||
| 30fd6bd235 | |||
| e61e83bf2e | |||
| 1add7973a9 | |||
| dae4d4a3ac | |||
| f7b9e58050 | |||
| 3430d480f2 | |||
| df3c9e92fb | |||
| 649f961fa0 | |||
| 8d07402709 | |||
| 65cecd17e6 | |||
| ed9b5e1f74 | |||
| b57ab57981 | |||
| 1bf01fccf7 | |||
| 86f2890240 | |||
| 93a4fe7597 | |||
| 1ca647a4b9 | |||
| d7c22fac82 | |||
| 88108d8c98 | |||
| 6f79abf9c3 | |||
| 0d1cc731ad | |||
| 5e76bc0ad4 | |||
| 7cbddd7e8c | |||
| 6f9f7e2e4a | |||
| 085cd612d4 | |||
| aa691eb6d2 | |||
| 468a2c36ab | |||
| 1980396784 | |||
| 91dd896847 | |||
| ca81cd2515 | |||
| 617d537253 | |||
| 35042fccaa | |||
| c89ec5de2b | |||
| 9c5f485aa9 | |||
| 4f4defa7e2 | |||
| 1ab48d0e0d | |||
| 9a0799bc61 | |||
| c817d5a04e | |||
| 0e8a2ef902 | |||
| d3ad3a08bd | |||
| dcf07e8b7f | |||
| dbd2b71d9d | |||
| 2cc4dd5e37 | |||
| e5f1594856 | |||
| 3d4788fc3e | |||
| 2fec333c00 | |||
| 460ba1ceb5 | |||
| 58319e8d44 | |||
| 4844e582ac | |||
| aaedf07964 | |||
| f33cca0cb6 | |||
| c613a7913d | |||
| 32b1af1542 | |||
| 0d92b145fb | |||
| 1fd4067b59 | |||
| 68c121780b | |||
| c63ac8cd1c | |||
| 0cef2ba27d | |||
| da92657ed9 | |||
| 339f628c14 | |||
| fe792d61ad | |||
| 945dc70d29 | |||
| e6b3456a69 | |||
| f6485b3ab1 | |||
| 2d1c189958 | |||
| af3d1fd70c | |||
| f52b5ed647 | |||
| 5c6ef2f610 | |||
| b651554bd7 | |||
| 80c32a846e | |||
| c59af85c9a | |||
| ad04d48a91 | |||
| 5cc1064abe | |||
| 0f36784c8d | |||
| 4641edbf6e | |||
| 7522ec1d1e | |||
| 4a7615cc28 | |||
| eacbe3b4a2 | |||
| 87c5192736 | |||
| 21a281eefc | |||
| 7c4f87d566 | |||
| 85d0b180fb | |||
| 2999191251 | |||
| 0434611ff3 | |||
| 4425090d12 | |||
| 4f320e6270 | |||
| 3ca3b39fdd | |||
| c46fd83b70 | |||
| 9189e1ac7a | |||
| f3cd3e3ded | |||
| 3e6e53903f | |||
| 1156a4001e | |||
| 511c2f1a19 | |||
| a4f5a49de7 | |||
| 629d997bbd | |||
| b2a3bb3cff | |||
| edd18f65bf | |||
| 944b374961 | |||
| 90dfc56cf2 | |||
| bf163e9b33 | |||
| 5897751ce1 | |||
| 73efddca7f | |||
| f9fa7d2971 | |||
| 1efbe7fbd6 | |||
| fed2cbacdf | |||
| bddfe865f2 | |||
| e56d4b2886 | |||
| b6062fd6dc | |||
| 8c6b1da0a2 | |||
| 1f11726563 | |||
| bba894de7e | |||
| 3715b23426 | |||
| f38d3f777f | |||
| 0114881ab4 | |||
| a786ef1504 | |||
| 2931b99be7 | |||
| 70e587526e | |||
| 9c86a420ea | |||
| 0c8ed285d3 | |||
| ddbcb5d66f | |||
| 8c750b960c | |||
| abdbef9e0e | |||
| 43b4197d44 | |||
| b0c18eeafc | |||
| 9c55220808 | |||
| 8a6545912f | |||
| e7a5495ba4 | |||
| 7c50250c92 | |||
| 1217c82a28 | |||
| 8d6f5530e7 | |||
| fe9cf79756 | |||
| 0d4b487537 | |||
| 13c95af02e | |||
| c8153cb68b | |||
| a82adb1178 | |||
| 0da31a640b | |||
| c5116a4d3d | |||
| f6c80111f0 | |||
| 65809728d6 | |||
| d7454e4e0a | |||
| 804031cde8 | |||
| f126724be1 | |||
| 9e94fbdfaf | |||
| b070296ace | |||
| 98f7173b37 | |||
| 4bd118debc | |||
| 78e076b5af | |||
| 976474060f | |||
| d60970c7cd | |||
| 4a2e67ce27 | |||
| 5cee54462c | |||
| 5e9e44ba9d | |||
| 03686a5492 | |||
| c4b36fdbe9 | |||
| ba585a6512 | |||
| 3aa610e268 | |||
| af4b4952f8 | |||
| cbed2814c2 | |||
| 92605c05f0 | |||
| fc46f52db9 | |||
| 7ccae1fdf3 | |||
| 1fdc7e124d | |||
| be247e2321 | |||
| 7d89214d12 | |||
| 189f095ebc | |||
| a7b4842132 | |||
| 07c18dd027 | |||
| 415b03ce74 | |||
| 3d9c93f7ab | |||
| 59dc7d2595 | |||
| bf4b7aed66 | |||
| 501243427a | |||
| 9e63d61879 | |||
| 19975cf06e | |||
| 7b01ed79a0 | |||
| f871a2726e | |||
| f52ea67e29 | |||
| df3db8be0e | |||
| da3f27e563 | |||
| d5be4a1cc6 | |||
| 950231a5bb | |||
| b774776eb5 | |||
| be7e755323 | |||
| 95e779c6c1 | |||
| 73dfbc7ffd | |||
| be70cfd29d | |||
| 2e1f76369c | |||
| 6daabd97d4 | |||
| fbd3e48156 | |||
| 6fc0065262 | |||
| df740a5e36 | |||
| cb586a7643 | |||
| 447d02458a | |||
| f0623329e5 | |||
| 624de89cce | |||
| 0e58e2f39c | |||
| 66d0b21911 | |||
| abcc0b7100 | |||
| cc4e5c3669 | |||
| 5c46ad7f7e | |||
| 5904d137cf | |||
| 21ae44b9d8 | |||
| ab7f0da7e2 | |||
| db4f36a951 | |||
| 0654a1fdc4 | |||
| 1e83c5c029 | |||
| e4cc93f966 | |||
| 26fd4ffbc6 | |||
| d463ff311e | |||
| ef8dc618c7 | |||
| fcc245cca3 | |||
| acfede696d | |||
| d6834c5aab | |||
| a09febb7ef | |||
| 9cdcdd7459 | |||
| 6c126d30be | |||
| 3913155591 | |||
| 648550e64f | |||
| 4deb491174 | |||
| d8a9bdfabe | |||
| 0d98dedd32 | |||
| 16a5d9d365 | |||
| b7bbd8375e | |||
| 7816ec5783 | |||
| e7d942d1e6 | |||
| e559532d4b | |||
| 2abb0a0f7c | |||
| ce8aeac3f1 | |||
| c5f02885fe | |||
| 0bbc5f85a7 | |||
| b0cac5e936 | |||
| a384bd1238 | |||
| c7349cff7f | |||
| f706627b65 | |||
| 0f1e9aab49 | |||
| 0c11deb6e7 | |||
| f2665f8f56 | |||
| d472f02868 | |||
| 9ccdbdeb2a | |||
| f8c0702a5e | |||
| 51d56299ba | |||
| f92c59c650 | |||
| 89637a46f7 | |||
| c3ded1ba4d | |||
| 229de7b3ab | |||
| d7375fe89d | |||
| 8ceca65767 | |||
| 295d99c80e | |||
| 8b70fc0981 | |||
| 23a12c000d | |||
| fd9573057c | |||
| 13fa69ddf9 | |||
| 315d3a8c86 | |||
| fa25767214 | |||
| 2eee2bbcbd | |||
| 5846ea0721 | |||
| 6ad252c21d | |||
| 621cf4d6f7 | |||
| a9b0fc4948 | |||
| fcfe376de3 | |||
| 5ca819502b | |||
| 34869f41a8 | |||
| aa192ecb91 | |||
| 07ddec03dc | |||
| 82de3b23ac | |||
| e14ca57795 | |||
| 840cecd85d | |||
| 2b3fa8bef4 | |||
| 4c70f88757 | |||
| 201099b1e3 | |||
| 97da17461c | |||
| 8bb9133870 | |||
| d73f4ea8b1 | |||
| 96e17e7360 | |||
| 2d75781cd8 | |||
| ce9ff30f1c | |||
| 7a061682c0 | |||
| 2c2513ea41 | |||
| a4054a83fc | |||
| 1b6e363bd1 | |||
| 0fb6d3aa05 | |||
| 294576f608 | |||
| 9aeaf53af5 | |||
| 9b4d3225ea | |||
| 9094835645 | |||
| 200f2e06d2 | |||
| b79737d3df | |||
| 448a2831f1 | |||
| f8d1aef3e0 | |||
| 27007491d5 | |||
| 1f528edb6d | |||
| d40e5a4fa7 | |||
| 62fe6ff0a5 | |||
| af74115926 | |||
| 4d07e55558 | |||
| 23d2d787d8 | |||
| 21366787e7 | |||
| 46defddf84 | |||
| 77bab0ff4b | |||
| a262d185e8 | |||
| 629de101fc | |||
| 6d3068e83f | |||
| 23bb1c9d84 | |||
| 3cac6fb618 | |||
| 7dfd488d6d | |||
| 1bc288fec0 | |||
| 76c62774fd | |||
| bcc0c8937e | |||
| c19045b383 | |||
| 30b06a8179 | |||
| 02830d2e48 | |||
| 597c68f78d | |||
| 01f8d36756 | |||
| 565f975165 | |||
| 7da9a82906 | |||
| 5867ad7fc7 | |||
| bba7f9c4e3 | |||
| e19d64c384 | |||
| 4081aab3ef | |||
| 6d9510539c | |||
| 13a18359e9 | |||
| 56c346a5bc | |||
| bfadd1c0d6 | |||
| 16715d6eb5 | |||
| b401956bd3 | |||
| 673fccff02 | |||
| 0cd5051482 | |||
| 54e205530e | |||
| 467955622d | |||
| 96279e9a98 | |||
| 491a579461 | |||
| 44c0bd8d5c | |||
| 8d767138c1 | |||
| 6b37af2dd3 | |||
| 81bac1ccdf | |||
| 8acb7f27af | |||
| ffa151c1c9 | |||
| f003c36523 | |||
| a11242cdd6 | |||
| 8efc832c79 | |||
| 2288029bf6 | |||
| a2502bdf58 | |||
| 7fc18b8c1c | |||
| 824fa68a8c | |||
| c342c970d9 | |||
| 680c925719 | |||
| ceab65be90 | |||
| fa9e04a7d1 | |||
| 8d319bc7a9 | |||
| f3e716bd25 | |||
| 6af5c6e496 | |||
| 50ab9b56e2 | |||
| 20b0b2e68e | |||
| dadf49c482 | |||
| e5a890ade4 | |||
| 49e681f424 | |||
| a5a738d622 | |||
| 9ca188d404 | |||
| bde7d230a8 | |||
| 767c6bb311 | |||
| b32301bd4a | |||
| 6d2e42e155 | |||
| 5e7cff58f4 | |||
| 9206f82772 | |||
| 22d0a9bd96 | |||
| 2b0909dfd6 | |||
| 68971661e7 | |||
| bcc7f226bb | |||
| 3d553afe27 | |||
| 6bc9cadd59 | |||
| 8d2c0a023a | |||
| 7e0cdd887f | |||
| 4ac65e9e96 | |||
| ac5a29a8ad | |||
| 222abd2152 | |||
| bb85c64a3d | |||
| 09905ca683 | |||
| b7119dde1d | |||
| 9b5287b8d1 | |||
| 94d715c6db | |||
| c767eafe44 | |||
| 300509739c | |||
| bedf031a7d | |||
| 2a379f1396 | |||
| a6871cb0d5 | |||
| 2a0aaf952c | |||
| 84aa853323 | |||
| 37b2dd4d84 | |||
| c130ff2a04 | |||
| c485e3a1fb | |||
| d8048b573b | |||
| 7ebc469b21 | |||
| 3b0b0e04e8 | |||
| 290a036741 | |||
| a4d87e63c6 | |||
| 628a5cfe1f | |||
| 7da3554afd | |||
| 34495d4d5f | |||
| 273aebea8d | |||
| ac3de9eccb | |||
| e46d0f152b | |||
| b3185457ec | |||
| 7f6844291d |
@@ -0,0 +1,55 @@
|
||||
--- ceph-15.2.2/src/common/crc32c_intel_fast_zero_asm.s.orig 2020-05-26 08:34:32.226201974 -0400
|
||||
+++ ceph-15.2.2/src/common/crc32c_intel_fast_zero_asm.s 2020-05-26 17:19:32.497201974 -0400
|
||||
@@ -1,5 +1,5 @@
|
||||
;
|
||||
-; Copyright 2012-2013 Intel Corporation All Rights Reserved.
|
||||
+; Copyright 2012-2015 Intel Corporation All Rights Reserved.
|
||||
; All rights reserved.
|
||||
;
|
||||
; http://opensource.org/licenses/BSD-3-Clause
|
||||
@@ -59,6 +59,19 @@
|
||||
xor rbx, rbx ;; rbx = crc1 = 0;
|
||||
xor r10, r10 ;; r10 = crc2 = 0;
|
||||
|
||||
+ cmp len, %%bSize*3*2
|
||||
+ jbe %%non_prefetch
|
||||
+
|
||||
+ %assign i 0
|
||||
+ %rep %%bSize/8 - 1
|
||||
+ crc32 rax, bufptmp ;; update crc0
|
||||
+ crc32 rbx, bufptmp ;; update crc1
|
||||
+ crc32 r10, bufptmp ;; update crc2
|
||||
+ %assign i (i+8)
|
||||
+ %endrep
|
||||
+ jmp %%next %+ %1
|
||||
+
|
||||
+%%non_prefetch:
|
||||
%assign i 0
|
||||
%rep %%bSize/8 - 1
|
||||
crc32 rax, bufptmp ;; update crc0
|
||||
@@ -66,6 +79,8 @@
|
||||
crc32 r10, bufptmp ;; update crc2
|
||||
%assign i (i+8)
|
||||
%endrep
|
||||
+
|
||||
+%%next %+ %1:
|
||||
crc32 rax, bufptmp ;; update crc0
|
||||
crc32 rbx, bufptmp ;; update crc1
|
||||
; SKIP ;crc32 r10, bufptmp ;; update crc2
|
||||
@@ -180,12 +195,15 @@
|
||||
%define crc_init_dw r8d
|
||||
%endif
|
||||
|
||||
-
|
||||
+ endbranch
|
||||
push rdi
|
||||
push rbx
|
||||
|
||||
mov rax, crc_init ;; rax = crc_init;
|
||||
|
||||
+ cmp len, 8
|
||||
+ jb less_than_8
|
||||
+
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; 1) ALIGN: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- ceph-15.1.0/src/common/bit_str.h.orig 2020-02-03 09:47:20.047149798 -0500
|
||||
+++ ceph-15.1.0/src/common/bit_str.h 2020-02-03 09:47:50.213149798 -0500
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <cstdint>
|
||||
#include <iosfwd>
|
||||
#include <functional>
|
||||
+#include <ostream>
|
||||
|
||||
namespace ceph {
|
||||
class Formatter;
|
||||
@@ -0,0 +1,27 @@
|
||||
From 1999108aeb1f6f93a19ea7bb64c6ae8b87d1b264 Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Thu, 20 Jan 2022 05:33:13 -0800
|
||||
Subject: [PATCH] CET: Add CET marker to crc32c_intel_fast_zero_asm.s
|
||||
|
||||
Add .note.gnu.property section to crc32c_intel_fast_zero_asm.s to mark
|
||||
for IBT and SHSTK compatibility.
|
||||
---
|
||||
src/common/crc32c_intel_fast_zero_asm.s | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/common/crc32c_intel_fast_zero_asm.s b/src/common/crc32c_intel_fast_zero_asm.s
|
||||
index 216ecf639f3..2e291d858f3 100644
|
||||
--- a/src/common/crc32c_intel_fast_zero_asm.s
|
||||
+++ b/src/common/crc32c_intel_fast_zero_asm.s
|
||||
@@ -654,4 +654,8 @@ slversion crc32_iscsi_zero_00, 00, 02, 0014
|
||||
%ifidn __OUTPUT_FORMAT__, elf64
|
||||
; inform linker that this doesn't require executable stack
|
||||
section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
%endif
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
From bbcc1a69f787881f16156f3c789052942a564103 Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Thu, 20 Jan 2022 05:35:49 -0800
|
||||
Subject: [PATCH] isa-l/CET: Add CET marker to x86-64 crc32 assembly codes
|
||||
|
||||
Add .note.gnu.property section to x86-64 crc32 assembly codes to mark
|
||||
for IBT and SHSTK compatibility.
|
||||
---
|
||||
crc/crc32_gzip_refl_by16_10.asm | 9 +++++++++
|
||||
crc/crc32_gzip_refl_by8.asm | 9 +++++++++
|
||||
crc/crc32_gzip_refl_by8_02.asm | 9 +++++++++
|
||||
crc/crc32_ieee_01.asm | 8 ++++++++
|
||||
crc/crc32_ieee_02.asm | 9 +++++++++
|
||||
crc/crc32_ieee_by16_10.asm | 9 +++++++++
|
||||
crc/crc32_ieee_by4.asm | 9 +++++++++
|
||||
crc/crc32_iscsi_00.asm | 8 ++++++++
|
||||
crc/crc32_iscsi_01.asm | 8 ++++++++
|
||||
9 files changed, 78 insertions(+)
|
||||
|
||||
diff --git a/src/isa-l/crc/crc32_gzip_refl_by16_10.asm b/src/isa-l/crc/crc32_gzip_refl_by16_10.asm
|
||||
index 40236f6..b16874d 100644
|
||||
--- a/src/isa-l/crc/crc32_gzip_refl_by16_10.asm
|
||||
+++ b/src/isa-l/crc/crc32_gzip_refl_by16_10.asm
|
||||
@@ -566,3 +566,12 @@ global no_ %+ FUNCTION_NAME
|
||||
no_ %+ FUNCTION_NAME %+ :
|
||||
%endif
|
||||
%endif ; (AS_FEATURE_LEVEL) >= 10
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_gzip_refl_by8.asm b/src/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
index 62f7e7d..97b0c4a 100644
|
||||
--- a/src/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
+++ b/src/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
@@ -622,3 +622,12 @@ dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_gzip_refl_by8, 01, 00, 002c
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_gzip_refl_by8_02.asm b/src/isa-l/crc/crc32_gzip_refl_by8_02.asm
|
||||
index 80d849e..1d5a75f 100644
|
||||
--- a/src/isa-l/crc/crc32_gzip_refl_by8_02.asm
|
||||
+++ b/src/isa-l/crc/crc32_gzip_refl_by8_02.asm
|
||||
@@ -553,3 +553,12 @@ pshufb_shf_table:
|
||||
; dq 0x060504030201008f, 0x0e0d0c0b0a090807 ; shl 1 (16-15) / shr15
|
||||
dq 0x8786858483828100, 0x8f8e8d8c8b8a8988
|
||||
dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_ieee_01.asm b/src/isa-l/crc/crc32_ieee_01.asm
|
||||
index 32495ed..cfc443b 100644
|
||||
--- a/src/isa-l/crc/crc32_ieee_01.asm
|
||||
+++ b/src/isa-l/crc/crc32_ieee_01.asm
|
||||
@@ -653,3 +653,11 @@ dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_ieee_01, 01, 06, 0011
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_ieee_02.asm b/src/isa-l/crc/crc32_ieee_02.asm
|
||||
index 8a472b0..dd7096a 100644
|
||||
--- a/src/isa-l/crc/crc32_ieee_02.asm
|
||||
+++ b/src/isa-l/crc/crc32_ieee_02.asm
|
||||
@@ -649,3 +649,12 @@ pshufb_shf_table:
|
||||
; dq 0x060504030201008f, 0x0e0d0c0b0a090807 ; shl 1 (16-15) / shr15
|
||||
dq 0x8786858483828100, 0x8f8e8d8c8b8a8988
|
||||
dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_ieee_by16_10.asm b/src/isa-l/crc/crc32_ieee_by16_10.asm
|
||||
index 200fd93..2afd597 100644
|
||||
--- a/src/isa-l/crc/crc32_ieee_by16_10.asm
|
||||
+++ b/src/isa-l/crc/crc32_ieee_by16_10.asm
|
||||
@@ -582,3 +582,12 @@ global no_ %+ FUNCTION_NAME
|
||||
no_ %+ FUNCTION_NAME %+ :
|
||||
%endif
|
||||
%endif ; (AS_FEATURE_LEVEL) >= 10
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_ieee_by4.asm b/src/isa-l/crc/crc32_ieee_by4.asm
|
||||
index 39bed5a..847d0bd 100644
|
||||
--- a/src/isa-l/crc/crc32_ieee_by4.asm
|
||||
+++ b/src/isa-l/crc/crc32_ieee_by4.asm
|
||||
@@ -563,3 +563,12 @@ SHUF_MASK dq 0x08090A0B0C0D0E0F, 0x0001020304050607
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_ieee_by4, 05, 02, 0017
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_iscsi_00.asm b/src/isa-l/crc/crc32_iscsi_00.asm
|
||||
index 4f81e3a..3d6b2d1 100644
|
||||
--- a/src/isa-l/crc/crc32_iscsi_00.asm
|
||||
+++ b/src/isa-l/crc/crc32_iscsi_00.asm
|
||||
@@ -669,3 +669,11 @@ DD 0x54851c7f,0x89e3d7c4,0xeba4fdf8,0x36c23643
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_iscsi_00, 00, 04, 0014
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/isa-l/crc/crc32_iscsi_01.asm b/src/isa-l/crc/crc32_iscsi_01.asm
|
||||
index 2a81517..c048413 100644
|
||||
--- a/src/isa-l/crc/crc32_iscsi_01.asm
|
||||
+++ b/src/isa-l/crc/crc32_iscsi_01.asm
|
||||
@@ -588,3 +588,11 @@ K_table:
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_iscsi_01, 01, 04, 0015
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
From 72e6d27e08c86c16e8931739a5e6ecbc06b102d5 Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Thu, 20 Jan 2022 05:40:56 -0800
|
||||
Subject: [PATCH] spdk/isa-l/CET: Add CET marker to x86-64 crc32 assembly codes
|
||||
|
||||
Add .note.gnu.property section to x86-64 crc32 assembly codes to mark
|
||||
for IBT and SHSTK compatibility.
|
||||
---
|
||||
crc/crc32_gzip_refl_by8.asm | 9 +++++++++
|
||||
crc/crc32_ieee_01.asm | 8 ++++++++
|
||||
crc/crc32_ieee_by4.asm | 9 +++++++++
|
||||
crc/crc32_iscsi_00.asm | 8 ++++++++
|
||||
crc/crc32_iscsi_01.asm | 8 ++++++++
|
||||
5 files changed, 42 insertions(+)
|
||||
|
||||
diff --git a/src/spdk/isa-l/crc/crc32_gzip_refl_by8.asm b/src/spdk/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
index 62f7e7d..97b0c4a 100644
|
||||
--- a/src/spdk/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
+++ b/src/spdk/isa-l/crc/crc32_gzip_refl_by8.asm
|
||||
@@ -622,3 +622,12 @@ dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_gzip_refl_by8, 01, 00, 002c
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/spdk/isa-l/crc/crc32_ieee_01.asm b/src/spdk/isa-l/crc/crc32_ieee_01.asm
|
||||
index 32495ed..cfc443b 100644
|
||||
--- a/src/spdk/isa-l/crc/crc32_ieee_01.asm
|
||||
+++ b/src/spdk/isa-l/crc/crc32_ieee_01.asm
|
||||
@@ -653,3 +653,11 @@ dq 0x0706050403020100, 0x000e0d0c0b0a0908
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_ieee_01, 01, 06, 0011
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/spdk/isa-l/crc/crc32_ieee_by4.asm b/src/spdk/isa-l/crc/crc32_ieee_by4.asm
|
||||
index 39bed5a..847d0bd 100644
|
||||
--- a/src/spdk/isa-l/crc/crc32_ieee_by4.asm
|
||||
+++ b/src/spdk/isa-l/crc/crc32_ieee_by4.asm
|
||||
@@ -563,3 +563,12 @@ SHUF_MASK dq 0x08090A0B0C0D0E0F, 0x0001020304050607
|
||||
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_ieee_by4, 05, 02, 0017
|
||||
+
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/spdk/isa-l/crc/crc32_iscsi_00.asm b/src/spdk/isa-l/crc/crc32_iscsi_00.asm
|
||||
index 4f81e3a..3d6b2d1 100644
|
||||
--- a/src/spdk/isa-l/crc/crc32_iscsi_00.asm
|
||||
+++ b/src/spdk/isa-l/crc/crc32_iscsi_00.asm
|
||||
@@ -669,3 +669,11 @@ DD 0x54851c7f,0x89e3d7c4,0xeba4fdf8,0x36c23643
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_iscsi_00, 00, 04, 0014
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
diff --git a/src/spdk/isa-l/crc/crc32_iscsi_01.asm b/src/spdk/isa-l/crc/crc32_iscsi_01.asm
|
||||
index 2a81517..c048413 100644
|
||||
--- a/src/spdk/isa-l/crc/crc32_iscsi_01.asm
|
||||
+++ b/src/spdk/isa-l/crc/crc32_iscsi_01.asm
|
||||
@@ -588,3 +588,11 @@ K_table:
|
||||
;;; func core, ver, snum
|
||||
slversion crc32_iscsi_01, 01, 04, 0015
|
||||
|
||||
+%ifidn __OUTPUT_FORMAT__, elf64
|
||||
+; inform linker that this doesn't require executable stack
|
||||
+section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
+; inform linker that this is compatible with IBT and SHSTK
|
||||
+section .note.gnu.property note alloc noexec align=8
|
||||
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
|
||||
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
|
||||
+%endif
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
--- ceph-16.2.6-681-gfdc003bc/src/tracing/bluestore.tp.orig 2021-12-07 08:02:04.682972474 -0500
|
||||
+++ ceph-16.2.6-681-gfdc003bc/src/tracing/bluestore.tp 2021-12-07 08:03:13.840771852 -0500
|
||||
@@ -1,3 +1,9 @@
|
||||
+
|
||||
+#ifdef __x86_64__
|
||||
+#undef STAP_SDT_ARG_CONSTRAINT
|
||||
+#define STAP_SDT_ARG_CONSTRAINT norx
|
||||
+#endif
|
||||
+
|
||||
#include "include/int_types.h"
|
||||
|
||||
TRACEPOINT_EVENT(bluestore, transaction_state_duration,
|
||||
--- ceph-16.2.6-681-gfdc003bc/src/tracing/librbd.tp.orig 2021-12-07 09:50:16.467579483 -0500
|
||||
+++ ceph-16.2.6-681-gfdc003bc/src/tracing/librbd.tp 2021-12-07 09:50:47.620026940 -0500
|
||||
@@ -1,3 +1,8 @@
|
||||
+#ifdef __x86_64__
|
||||
+#undef STAP_SDT_ARG_CONSTRAINT
|
||||
+#define STAP_SDT_ARG_CONSTRAINT norx
|
||||
+#endif
|
||||
+
|
||||
#include "tracing/tracing-common.h"
|
||||
#include "include/rbd/librbd.h"
|
||||
#include "include/int_types.h"
|
||||
@@ -0,0 +1,19 @@
|
||||
--- ceph-18.0.0-3078-gc4847bf8/src/rgw/driver/dbstore/CMakeLists.txt.orig 2023-05-10 08:23:50.000000000 -0400
|
||||
+++ ceph-18.0.0-3078-gc4847bf8/src/rgw/driver/dbstore/CMakeLists.txt 2023-05-11 08:21:13.794152904 -0400
|
||||
@@ -24,7 +24,7 @@
|
||||
dbstore_mgr.cc
|
||||
)
|
||||
|
||||
-add_library(dbstore_lib ${dbstore_srcs})
|
||||
+add_library(dbstore_lib STATIC ${dbstore_srcs})
|
||||
target_include_directories(dbstore_lib
|
||||
PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw"
|
||||
PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw/store/rados"
|
||||
@@ -49,6 +49,7 @@
|
||||
|
||||
# add pthread library
|
||||
set (CMAKE_LINK_LIBRARIES ${CMAKE_LINK_LIBRARIES} pthread)
|
||||
+set (CMAKE_LINK_LIBRARIES ${CMAKE_LINK_LIBRARIES} global)
|
||||
|
||||
find_package(gtest QUIET)
|
||||
if(WITH_TESTS)
|
||||
@@ -0,0 +1,42 @@
|
||||
--- ceph-18.1.2/src/common/subsys_types.h.orig 2023-06-27 15:59:59.000000000 -0400
|
||||
+++ ceph-18.1.2/src/common/subsys_types.h 2023-07-04 19:36:55.941238973 -0400
|
||||
@@ -54,7 +54,7 @@
|
||||
#undef DEFAULT_SUBSYS
|
||||
}
|
||||
|
||||
-constexpr static std::uint8_t
|
||||
+constexpr static uint8_t
|
||||
ceph_subsys_get_max_default_level(const std::size_t subidx) {
|
||||
const auto item = ceph_subsys_get_as_array()[subidx];
|
||||
return std::max(item.log_level, item.gather_level);
|
||||
--- ceph-18.1.2/src/msg/async/crypto_onwire.h.orig 2023-06-27 15:59:59.000000000 -0400
|
||||
+++ ceph-18.1.2/src/msg/async/crypto_onwire.h 2023-07-04 19:36:55.957238704 -0400
|
||||
@@ -95,7 +95,7 @@
|
||||
// Transmitter can append extra bytes of ciphertext at the -final step.
|
||||
// This method return how much was added, and thus let client translate
|
||||
// plaintext size into ciphertext size to grab from wire.
|
||||
- virtual std::uint32_t get_extra_size_at_final() = 0;
|
||||
+ virtual uint32_t get_extra_size_at_final() = 0;
|
||||
|
||||
// Instance of RxHandler must be reset before doing any decrypt-update
|
||||
// step. This applies also to situation when decrypt-final was already
|
||||
--- ceph-18.1.2/src/rocksdb/table/block_based/data_block_hash_index.h.orig 2023-05-24 15:55:23.000000000 -0400
|
||||
+++ ceph-18.1.2/src/rocksdb/table/block_based/data_block_hash_index.h 2023-07-04 19:36:55.971238469 -0400
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
+#include <cstdint>
|
||||
|
||||
#include "rocksdb/slice.h"
|
||||
|
||||
--- ceph-18.1.2/src/rocksdb/util/string_util.h.orig 2023-05-24 15:55:23.000000000 -0400
|
||||
+++ ceph-18.1.2/src/rocksdb/util/string_util.h 2023-07-04 19:36:55.991238133 -0400
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
+#include <cstdint>
|
||||
|
||||
#include "rocksdb/rocksdb_namespace.h"
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
--- ceph-18.0.0-2950-g1c931bc4/cmake/modules/BuildBoost.cmake.orig 2023-04-28 18:30:19.133064577 -0400
|
||||
+++ ceph-18.0.0-2950-g1c931bc4/cmake/modules/BuildBoost.cmake 2023-04-28 18:31:55.290354383 -0400
|
||||
@@ -104,12 +104,21 @@
|
||||
set(user_config ${CMAKE_BINARY_DIR}/user-config.jam)
|
||||
# edit the user-config.jam so b2 will be able to use the specified
|
||||
# toolset and python
|
||||
+if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
+ file(WRITE ${user_config}
|
||||
+ "using ${toolset}"
|
||||
+ " : "
|
||||
+ " : ${CMAKE_CXX_COMPILER}"
|
||||
+ " : <compileflags>-fPIC <compileflags>-w <compileflags>-fcf-protection <compileflags>-Wno-everything"
|
||||
+ " ;\n")
|
||||
+else()
|
||||
file(WRITE ${user_config}
|
||||
"using ${toolset}"
|
||||
" : "
|
||||
" : ${CMAKE_CXX_COMPILER}"
|
||||
" : <compileflags>-fPIC <compileflags>-w <compileflags>-Wno-everything"
|
||||
" ;\n")
|
||||
+endif()
|
||||
if(with_python_version)
|
||||
find_package(Python3 ${with_python_version} QUIET REQUIRED
|
||||
COMPONENTS Development)
|
||||
@@ -0,0 +1,62 @@
|
||||
--- ceph-20.0.0-1954-g77a7c83d/src/boost/libs/context/src/asm/jump_x86_64_sysv_elf_gas.S.orig 2025-05-19 18:28:37.137194693 -0400
|
||||
+++ ceph-20.0.0-1954-g77a7c83d/src/boost/libs/context/src/asm/jump_x86_64_sysv_elf_gas.S 2025-05-19 18:30:54.292857720 -0400
|
||||
@@ -144,4 +144,18 @@
|
||||
|
||||
/* Mark that we don't need executable stack. */
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
+
|
||||
+.section .note.gnu.property
|
||||
+.align=8
|
||||
+
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x01, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x02, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
# endif
|
||||
--- ceph-20.0.0-1954-g77a7c83d/src/boost/libs/context/src/asm/make_x86_64_sysv_elf_gas.S.orig 2025-05-19 18:28:22.611442193 -0400
|
||||
+++ ceph-20.0.0-1954-g77a7c83d/src/boost/libs/context/src/asm/make_x86_64_sysv_elf_gas.S 2025-05-19 18:31:01.037742795 -0400
|
||||
@@ -159,4 +159,18 @@
|
||||
|
||||
/* Mark that we don't need executable stack. */
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
+
|
||||
+.section .note.gnu.property
|
||||
+.align=8
|
||||
+
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x01, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x02, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
# endif
|
||||
--- ceph-20.0.0-1954-g77a7c83d/src/boost/libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S.orig 2025-05-19 18:29:35.836194529 -0400
|
||||
+++ ceph-20.0.0-1954-g77a7c83d/src/boost/libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S 2025-05-19 18:31:15.172501956 -0400
|
||||
@@ -137,3 +137,17 @@
|
||||
|
||||
/* Mark that we don't need executable stack. */
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
+
|
||||
+.section .note.gnu.property
|
||||
+.align=8
|
||||
+
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x01, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ .byte 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00
|
||||
+ .byte 0x05, 0x00, 0x00, 0x00, 0x47, 0x4E, 0x55, 0x00
|
||||
+ .byte 0x02, 0x00, 0x00, 0xC0, 0x04, 0x00, 0x00, 0x00
|
||||
+ .byte 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
@@ -0,0 +1,24 @@
|
||||
--- ceph-18.1.2/src/pybind/rbd/rbd.pyx.orig 2023-07-21 13:30:08.156825317 -0400
|
||||
+++ ceph-18.1.2/src/pybind/rbd/rbd.pyx 2023-07-24 09:09:27.930137117 -0400
|
||||
@@ -371,10 +371,10 @@
|
||||
cdef rados_ioctx_t convert_ioctx(rados.Ioctx ioctx) except? NULL:
|
||||
return <rados_ioctx_t>ioctx.io
|
||||
|
||||
-cdef int progress_callback(uint64_t offset, uint64_t total, void* ptr) with gil:
|
||||
+cdef int progress_callback(uint64_t offset, uint64_t total, void* ptr) noexcept with gil:
|
||||
return (<object>ptr)(offset, total)
|
||||
|
||||
-cdef int no_op_progress_callback(uint64_t offset, uint64_t total, void* ptr):
|
||||
+cdef int no_op_progress_callback(uint64_t offset, uint64_t total, void* ptr) noexcept:
|
||||
return 0
|
||||
|
||||
def cstr(val, name, encoding="utf-8", opt=False):
|
||||
@@ -426,7 +426,7 @@
|
||||
|
||||
cdef class Completion
|
||||
|
||||
-cdef void __aio_complete_cb(rbd_completion_t completion, void *args) with gil:
|
||||
+cdef void __aio_complete_cb(rbd_completion_t completion, void *args) noexcept with gil:
|
||||
"""
|
||||
Callback to oncomplete() for asynchronous operations
|
||||
"""
|
||||
@@ -0,0 +1,41 @@
|
||||
From f5d3e9146d9ceb12858bc94d60090bd851b1c088 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Emerson <aemerson@redhat.com>
|
||||
Date: Wed, 20 Dec 2023 13:51:21 -0500
|
||||
Subject: [PATCH] test/neorados: Use two fewer GTest internals
|
||||
|
||||
To get coroutine tests working, I used some internals. Two of these
|
||||
are no longer available in newer versions. Since they can be
|
||||
implemented with regular old C++ features, use those.
|
||||
|
||||
This fixes an FTBFS on Fedora Rawhide introduced in
|
||||
`35231f7251ed70d8d817ee7e727d9763669d101f`.
|
||||
|
||||
Signed-off-by: Adam Emerson <aemerson@redhat.com>
|
||||
---
|
||||
src/test/neorados/common_tests.h | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/test/neorados/common_tests.h b/src/test/neorados/common_tests.h
|
||||
index 9610f08f643f3..396432e417e84 100644
|
||||
--- a/src/test/neorados/common_tests.h
|
||||
+++ b/src/test/neorados/common_tests.h
|
||||
@@ -391,10 +391,14 @@ class NeoRadosECTest : public NeoRadosTestBase {
|
||||
public: \
|
||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() = default; \
|
||||
~GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() override = default; \
|
||||
- GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
- test_name)); \
|
||||
- GTEST_DISALLOW_MOVE_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||
- test_name)); \
|
||||
+ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)( \
|
||||
+ const GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)&) = delete; \
|
||||
+ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)& operator =( \
|
||||
+ const GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)&) = delete; \
|
||||
+ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)( \
|
||||
+ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)&&) = delete; \
|
||||
+ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)& operator =( \
|
||||
+ GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)&&) = delete; \
|
||||
\
|
||||
private: \
|
||||
boost::asio::awaitable<void> CoTestBody() override; \
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
--- ceph-18.2.3/src/mgr/PyModule.cc.orig 2024-06-06 16:31:10.340731851 -0400
|
||||
+++ ceph-18.2.3/src/mgr/PyModule.cc 2024-06-07 12:58:49.913571410 -0400
|
||||
@@ -342,6 +342,16 @@
|
||||
return ceph_module;
|
||||
}
|
||||
|
||||
+// FIXME
|
||||
+// Removed in Python 3.13 API, but kept for the stable ABI
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+PyAPI_FUNC(void) PySys_SetPath(const wchar_t *);
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
int PyModule::load(PyThreadState *pMainThreadState)
|
||||
{
|
||||
ceph_assert(pMainThreadState != nullptr);
|
||||
@@ -0,0 +1,15 @@
|
||||
--- ceph-19.1.0/src/common/crc32c_ppc_asm.S.orig 2024-07-10 10:55:06.255480790 -0400
|
||||
+++ ceph-19.1.0/src/common/crc32c_ppc_asm.S 2024-07-10 12:53:42.844075490 -0400
|
||||
@@ -54,11 +54,8 @@
|
||||
/* byte reverse permute constant */
|
||||
.octa 0x0F0E0D0C0B0A09080706050403020100
|
||||
|
||||
-#ifdef CRC32_CONSTANTS_HEADER
|
||||
-#include CRC32_CONSTANTS_HEADER
|
||||
-#else
|
||||
+#define __ASSEMBLY__
|
||||
#include "crc32c_ppc_constants.h"
|
||||
-#endif
|
||||
|
||||
.text
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
diff --git a/src/jaegertracing/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/src/civetweb.c b/src/jaegertracing/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/src/civetweb.c
|
||||
index fea9e6f98..c7eddb20b 100644
|
||||
--- a/src/jaegertracing/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/src/civetweb.c
|
||||
+++ b/src/jaegertracing/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/src/civetweb.c
|
||||
@@ -1744,7 +1744,9 @@ typedef struct SSL_CTX SSL_CTX;
|
||||
#include <openssl/conf.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/dh.h>
|
||||
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
|
||||
#include <openssl/engine.h>
|
||||
+#endif
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/pem.h>
|
||||
@@ -0,0 +1,20 @@
|
||||
--- ceph-19.2.0/src/rocksdb/db/blob/blob_file_meta.h.orig 2025-01-16 08:16:41.762758595 -0500
|
||||
+++ ceph-19.2.0/src/rocksdb/db/blob/blob_file_meta.h 2025-01-16 08:17:37.172784779 -0500
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
+#include <cstdint>
|
||||
|
||||
#include "rocksdb/rocksdb_namespace.h"
|
||||
|
||||
--- ceph-19.2.0/src/rocksdb/include/rocksdb/trace_record.h.orig 2025-01-16 09:04:19.196962397 -0500
|
||||
+++ ceph-19.2.0/src/rocksdb/include/rocksdb/trace_record.h 2025-01-16 09:04:33.885701684 -0500
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
+#include <cstdint>
|
||||
|
||||
#include "rocksdb/rocksdb_namespace.h"
|
||||
#include "rocksdb/slice.h"
|
||||
@@ -0,0 +1,838 @@
|
||||
--- ceph-20.0.0-2362-ga9d20fc0/src/s3select/include/encryption_internal_19.h.orig 2025-07-08 07:40:29.811814549 -0400
|
||||
+++ ceph-20.0.0-2362-ga9d20fc0/src/s3select/include/encryption_internal_19.h 2025-07-08 07:40:29.811739290 -0400
|
||||
@@ -0,0 +1,114 @@
|
||||
+// Licensed to the Apache Software Foundation (ASF) under one
|
||||
+// or more contributor license agreements. See the NOTICE file
|
||||
+// distributed with this work for additional information
|
||||
+// regarding copyright ownership. The ASF licenses this file
|
||||
+// to you under the Apache License, Version 2.0 (the
|
||||
+// "License"); you may not use this file except in compliance
|
||||
+// with the License. You may obtain a copy of the License at
|
||||
+//
|
||||
+// http://www.apache.org/licenses/LICENSE-2.0
|
||||
+//
|
||||
+// Unless required by applicable law or agreed to in writing,
|
||||
+// software distributed under the License is distributed on an
|
||||
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
+// KIND, either express or implied. See the License for the
|
||||
+// specific language governing permissions and limitations
|
||||
+// under the License.
|
||||
+
|
||||
+#pragma once
|
||||
+
|
||||
+#include <memory>
|
||||
+#include <string>
|
||||
+#include <vector>
|
||||
+
|
||||
+#include "parquet/properties.h"
|
||||
+#include "parquet/types.h"
|
||||
+
|
||||
+using parquet::ParquetCipher;
|
||||
+
|
||||
+namespace parquet {
|
||||
+namespace encryption {
|
||||
+
|
||||
+constexpr int kGcmTagLength = 16;
|
||||
+constexpr int kNonceLength = 12;
|
||||
+
|
||||
+// Module types
|
||||
+constexpr int8_t kFooter = 0;
|
||||
+constexpr int8_t kColumnMetaData = 1;
|
||||
+constexpr int8_t kDataPage = 2;
|
||||
+constexpr int8_t kDictionaryPage = 3;
|
||||
+constexpr int8_t kDataPageHeader = 4;
|
||||
+constexpr int8_t kDictionaryPageHeader = 5;
|
||||
+constexpr int8_t kColumnIndex = 6;
|
||||
+constexpr int8_t kOffsetIndex = 7;
|
||||
+
|
||||
+/// Performs AES encryption operations with GCM or CTR ciphers.
|
||||
+class AesEncryptor {
|
||||
+ public:
|
||||
+ static AesEncryptor* Make(ParquetCipher::type alg_id, int key_len, bool metadata,
|
||||
+ std::vector<AesEncryptor*>* all_encryptors);
|
||||
+
|
||||
+ ~AesEncryptor();
|
||||
+
|
||||
+ /// Size difference between plaintext and ciphertext, for this cipher.
|
||||
+ int CiphertextSizeDelta();
|
||||
+
|
||||
+ /// Encrypts plaintext with the key and aad. Key length is passed only for validation.
|
||||
+ /// If different from value in constructor, exception will be thrown.
|
||||
+ int Encrypt(const uint8_t* plaintext, int plaintext_len, const uint8_t* key,
|
||||
+ int key_len, const uint8_t* aad, int aad_len, uint8_t* ciphertext);
|
||||
+
|
||||
+ /// Encrypts plaintext footer, in order to compute footer signature (tag).
|
||||
+ int SignedFooterEncrypt(const uint8_t* footer, int footer_len, const uint8_t* key,
|
||||
+ int key_len, const uint8_t* aad, int aad_len,
|
||||
+ const uint8_t* nonce, uint8_t* encrypted_footer);
|
||||
+
|
||||
+ void WipeOut();
|
||||
+
|
||||
+ private:
|
||||
+ /// Can serve one key length only. Possible values: 16, 24, 32 bytes.
|
||||
+ explicit AesEncryptor(ParquetCipher::type alg_id, int key_len, bool metadata);
|
||||
+ // PIMPL Idiom
|
||||
+ class AesEncryptorImpl;
|
||||
+ std::unique_ptr<AesEncryptorImpl> impl_;
|
||||
+};
|
||||
+
|
||||
+/// Performs AES decryption operations with GCM or CTR ciphers.
|
||||
+class AesDecryptor {
|
||||
+ public:
|
||||
+ static AesDecryptor* Make(ParquetCipher::type alg_id, int key_len, bool metadata,
|
||||
+ std::vector<AesDecryptor*>* all_decryptors);
|
||||
+
|
||||
+ ~AesDecryptor();
|
||||
+ void WipeOut();
|
||||
+
|
||||
+ /// Size difference between plaintext and ciphertext, for this cipher.
|
||||
+ int CiphertextSizeDelta();
|
||||
+
|
||||
+ /// Decrypts ciphertext with the key and aad. Key length is passed only for
|
||||
+ /// validation. If different from value in constructor, exception will be thrown.
|
||||
+ int Decrypt(const uint8_t* ciphertext, int ciphertext_len, const uint8_t* key,
|
||||
+ int key_len, const uint8_t* aad, int aad_len, uint8_t* plaintext);
|
||||
+
|
||||
+ private:
|
||||
+ /// Can serve one key length only. Possible values: 16, 24, 32 bytes.
|
||||
+ explicit AesDecryptor(ParquetCipher::type alg_id, int key_len, bool metadata);
|
||||
+ // PIMPL Idiom
|
||||
+ class AesDecryptorImpl;
|
||||
+ std::unique_ptr<AesDecryptorImpl> impl_;
|
||||
+};
|
||||
+
|
||||
+std::string CreateModuleAad(const std::string& file_aad, int8_t module_type,
|
||||
+ int16_t row_group_ordinal, int16_t column_ordinal,
|
||||
+ int16_t page_ordinal);
|
||||
+
|
||||
+std::string CreateFooterAad(const std::string& aad_prefix_bytes);
|
||||
+
|
||||
+// Update last two bytes of page (or page header) module AAD
|
||||
+void QuickUpdatePageAad(const std::string& AAD, int16_t new_page_ordinal);
|
||||
+
|
||||
+// Wraps OpenSSL RAND_bytes function
|
||||
+void RandBytes(unsigned char* buf, int num);
|
||||
+
|
||||
+} // namespace encryption
|
||||
+} // namespace parquet
|
||||
--- ceph-20.0.0-2362-ga9d20fc0/src/s3select/include/encryption_internal_20.h.orig 2025-07-08 07:40:29.812759948 -0400
|
||||
+++ ceph-20.0.0-2362-ga9d20fc0/src/s3select/include/encryption_internal_20.h 2025-07-08 07:40:29.812687536 -0400
|
||||
@@ -0,0 +1,141 @@
|
||||
+// Licensed to the Apache Software Foundation (ASF) under one
|
||||
+// or more contributor license agreements. See the NOTICE file
|
||||
+// distributed with this work for additional information
|
||||
+// regarding copyright ownership. The ASF licenses this file
|
||||
+// to you under the Apache License, Version 2.0 (the
|
||||
+// "License"); you may not use this file except in compliance
|
||||
+// with the License. You may obtain a copy of the License at
|
||||
+//
|
||||
+// http://www.apache.org/licenses/LICENSE-2.0
|
||||
+//
|
||||
+// Unless required by applicable law or agreed to in writing,
|
||||
+// software distributed under the License is distributed on an
|
||||
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
+// KIND, either express or implied. See the License for the
|
||||
+// specific language governing permissions and limitations
|
||||
+// under the License.
|
||||
+
|
||||
+#pragma once
|
||||
+
|
||||
+#include <memory>
|
||||
+#include <string>
|
||||
+#include <vector>
|
||||
+
|
||||
+#include "arrow/util/span.h"
|
||||
+#include "parquet/properties.h"
|
||||
+#include "parquet/types.h"
|
||||
+
|
||||
+using parquet::ParquetCipher;
|
||||
+
|
||||
+namespace parquet::encryption {
|
||||
+
|
||||
+constexpr int32_t kGcmTagLength = 16;
|
||||
+constexpr int32_t kNonceLength = 12;
|
||||
+
|
||||
+// Module types
|
||||
+constexpr int8_t kFooter = 0;
|
||||
+constexpr int8_t kColumnMetaData = 1;
|
||||
+constexpr int8_t kDataPage = 2;
|
||||
+constexpr int8_t kDictionaryPage = 3;
|
||||
+constexpr int8_t kDataPageHeader = 4;
|
||||
+constexpr int8_t kDictionaryPageHeader = 5;
|
||||
+constexpr int8_t kColumnIndex = 6;
|
||||
+constexpr int8_t kOffsetIndex = 7;
|
||||
+constexpr int8_t kBloomFilterHeader = 8;
|
||||
+constexpr int8_t kBloomFilterBitset = 9;
|
||||
+
|
||||
+/// Performs AES encryption operations with GCM or CTR ciphers.
|
||||
+class PARQUET_EXPORT AesEncryptor {
|
||||
+ public:
|
||||
+ /// Can serve one key length only. Possible values: 16, 24, 32 bytes.
|
||||
+ /// If write_length is true, prepend ciphertext length to the ciphertext
|
||||
+ explicit AesEncryptor(ParquetCipher::type alg_id, int32_t key_len, bool metadata,
|
||||
+ bool write_length = true);
|
||||
+
|
||||
+ static std::unique_ptr<AesEncryptor> Make(ParquetCipher::type alg_id, int32_t key_len,
|
||||
+ bool metadata, bool write_length = true);
|
||||
+
|
||||
+ ~AesEncryptor();
|
||||
+
|
||||
+ /// The size of the ciphertext, for this cipher and the specified plaintext length.
|
||||
+ [[nodiscard]] int32_t CiphertextLength(int64_t plaintext_len) const;
|
||||
+
|
||||
+ /// Encrypts plaintext with the key and aad. Key length is passed only for validation.
|
||||
+ /// If different from value in constructor, exception will be thrown.
|
||||
+ int32_t Encrypt(::arrow::util::span<const uint8_t> plaintext,
|
||||
+ ::arrow::util::span<const uint8_t> key,
|
||||
+ ::arrow::util::span<const uint8_t> aad,
|
||||
+ ::arrow::util::span<uint8_t> ciphertext);
|
||||
+
|
||||
+ /// Encrypts plaintext footer, in order to compute footer signature (tag).
|
||||
+ int32_t SignedFooterEncrypt(::arrow::util::span<const uint8_t> footer,
|
||||
+ ::arrow::util::span<const uint8_t> key,
|
||||
+ ::arrow::util::span<const uint8_t> aad,
|
||||
+ ::arrow::util::span<const uint8_t> nonce,
|
||||
+ ::arrow::util::span<uint8_t> encrypted_footer);
|
||||
+
|
||||
+ private:
|
||||
+ // PIMPL Idiom
|
||||
+ class AesEncryptorImpl;
|
||||
+ std::unique_ptr<AesEncryptorImpl> impl_;
|
||||
+};
|
||||
+
|
||||
+/// Performs AES decryption operations with GCM or CTR ciphers.
|
||||
+class PARQUET_EXPORT AesDecryptor {
|
||||
+ public:
|
||||
+ /// \brief Construct an AesDecryptor
|
||||
+ ///
|
||||
+ /// \param alg_id the encryption algorithm to use
|
||||
+ /// \param key_len key length. Possible values: 16, 24, 32 bytes.
|
||||
+ /// \param metadata if true then this is a metadata decryptor
|
||||
+ /// \param contains_length if true, expect ciphertext length prepended to the ciphertext
|
||||
+ explicit AesDecryptor(ParquetCipher::type alg_id, int32_t key_len, bool metadata,
|
||||
+ bool contains_length = true);
|
||||
+
|
||||
+ static std::unique_ptr<AesDecryptor> Make(ParquetCipher::type alg_id, int32_t key_len,
|
||||
+ bool metadata);
|
||||
+
|
||||
+ ~AesDecryptor();
|
||||
+
|
||||
+ /// The size of the plaintext, for this cipher and the specified ciphertext length.
|
||||
+ [[nodiscard]] int32_t PlaintextLength(int32_t ciphertext_len) const;
|
||||
+
|
||||
+ /// The size of the ciphertext, for this cipher and the specified plaintext length.
|
||||
+ [[nodiscard]] int32_t CiphertextLength(int32_t plaintext_len) const;
|
||||
+
|
||||
+ /// Decrypts ciphertext with the key and aad. Key length is passed only for
|
||||
+ /// validation. If different from value in constructor, exception will be thrown.
|
||||
+ /// The caller is responsible for ensuring that the plaintext buffer is at least as
|
||||
+ /// large as PlaintextLength(ciphertext_len).
|
||||
+ int32_t Decrypt(::arrow::util::span<const uint8_t> ciphertext,
|
||||
+ ::arrow::util::span<const uint8_t> key,
|
||||
+ ::arrow::util::span<const uint8_t> aad,
|
||||
+ ::arrow::util::span<uint8_t> plaintext);
|
||||
+
|
||||
+ private:
|
||||
+ // PIMPL Idiom
|
||||
+ class AesDecryptorImpl;
|
||||
+ std::unique_ptr<AesDecryptorImpl> impl_;
|
||||
+};
|
||||
+
|
||||
+std::string CreateModuleAad(const std::string& file_aad, int8_t module_type,
|
||||
+ int16_t row_group_ordinal, int16_t column_ordinal,
|
||||
+ int32_t page_ordinal);
|
||||
+
|
||||
+std::string CreateFooterAad(const std::string& aad_prefix_bytes);
|
||||
+
|
||||
+// Update last two bytes of page (or page header) module AAD
|
||||
+void QuickUpdatePageAad(int32_t new_page_ordinal, std::string* AAD);
|
||||
+
|
||||
+// Wraps OpenSSL RAND_bytes function
|
||||
+void RandBytes(unsigned char* buf, size_t num);
|
||||
+
|
||||
+// Ensure OpenSSL is initialized.
|
||||
+//
|
||||
+// This is only necessary in specific situations since OpenSSL otherwise
|
||||
+// initializes itself automatically. For example, under Valgrind, a memory
|
||||
+// leak will be reported if OpenSSL is initialized for the first time from
|
||||
+// a worker thread; calling this function from the main thread prevents this.
|
||||
+void EnsureBackendInitialized();
|
||||
+
|
||||
+} // namespace parquet::encryption
|
||||
--- ceph-20.0.0-2362-ga9d20fc0/src/s3select/include/encryption_internal.h.orig 2024-10-06 07:18:41.000000000 -0400
|
||||
+++ ceph-20.0.0-2362-ga9d20fc0/src/s3select/include/encryption_internal.h 2025-07-08 07:40:29.809908891 -0400
|
||||
@@ -17,98 +17,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
-#include <memory>
|
||||
-#include <string>
|
||||
-#include <vector>
|
||||
-
|
||||
-#include "parquet/properties.h"
|
||||
-#include "parquet/types.h"
|
||||
-
|
||||
-using parquet::ParquetCipher;
|
||||
-
|
||||
-namespace parquet {
|
||||
-namespace encryption {
|
||||
-
|
||||
-constexpr int kGcmTagLength = 16;
|
||||
-constexpr int kNonceLength = 12;
|
||||
-
|
||||
-// Module types
|
||||
-constexpr int8_t kFooter = 0;
|
||||
-constexpr int8_t kColumnMetaData = 1;
|
||||
-constexpr int8_t kDataPage = 2;
|
||||
-constexpr int8_t kDictionaryPage = 3;
|
||||
-constexpr int8_t kDataPageHeader = 4;
|
||||
-constexpr int8_t kDictionaryPageHeader = 5;
|
||||
-constexpr int8_t kColumnIndex = 6;
|
||||
-constexpr int8_t kOffsetIndex = 7;
|
||||
-
|
||||
-/// Performs AES encryption operations with GCM or CTR ciphers.
|
||||
-class AesEncryptor {
|
||||
- public:
|
||||
- static AesEncryptor* Make(ParquetCipher::type alg_id, int key_len, bool metadata,
|
||||
- std::vector<AesEncryptor*>* all_encryptors);
|
||||
-
|
||||
- ~AesEncryptor();
|
||||
-
|
||||
- /// Size difference between plaintext and ciphertext, for this cipher.
|
||||
- int CiphertextSizeDelta();
|
||||
-
|
||||
- /// Encrypts plaintext with the key and aad. Key length is passed only for validation.
|
||||
- /// If different from value in constructor, exception will be thrown.
|
||||
- int Encrypt(const uint8_t* plaintext, int plaintext_len, const uint8_t* key,
|
||||
- int key_len, const uint8_t* aad, int aad_len, uint8_t* ciphertext);
|
||||
-
|
||||
- /// Encrypts plaintext footer, in order to compute footer signature (tag).
|
||||
- int SignedFooterEncrypt(const uint8_t* footer, int footer_len, const uint8_t* key,
|
||||
- int key_len, const uint8_t* aad, int aad_len,
|
||||
- const uint8_t* nonce, uint8_t* encrypted_footer);
|
||||
-
|
||||
- void WipeOut();
|
||||
-
|
||||
- private:
|
||||
- /// Can serve one key length only. Possible values: 16, 24, 32 bytes.
|
||||
- explicit AesEncryptor(ParquetCipher::type alg_id, int key_len, bool metadata);
|
||||
- // PIMPL Idiom
|
||||
- class AesEncryptorImpl;
|
||||
- std::unique_ptr<AesEncryptorImpl> impl_;
|
||||
-};
|
||||
-
|
||||
-/// Performs AES decryption operations with GCM or CTR ciphers.
|
||||
-class AesDecryptor {
|
||||
- public:
|
||||
- static AesDecryptor* Make(ParquetCipher::type alg_id, int key_len, bool metadata,
|
||||
- std::vector<AesDecryptor*>* all_decryptors);
|
||||
-
|
||||
- ~AesDecryptor();
|
||||
- void WipeOut();
|
||||
-
|
||||
- /// Size difference between plaintext and ciphertext, for this cipher.
|
||||
- int CiphertextSizeDelta();
|
||||
-
|
||||
- /// Decrypts ciphertext with the key and aad. Key length is passed only for
|
||||
- /// validation. If different from value in constructor, exception will be thrown.
|
||||
- int Decrypt(const uint8_t* ciphertext, int ciphertext_len, const uint8_t* key,
|
||||
- int key_len, const uint8_t* aad, int aad_len, uint8_t* plaintext);
|
||||
-
|
||||
- private:
|
||||
- /// Can serve one key length only. Possible values: 16, 24, 32 bytes.
|
||||
- explicit AesDecryptor(ParquetCipher::type alg_id, int key_len, bool metadata);
|
||||
- // PIMPL Idiom
|
||||
- class AesDecryptorImpl;
|
||||
- std::unique_ptr<AesDecryptorImpl> impl_;
|
||||
-};
|
||||
-
|
||||
-std::string CreateModuleAad(const std::string& file_aad, int8_t module_type,
|
||||
- int16_t row_group_ordinal, int16_t column_ordinal,
|
||||
- int16_t page_ordinal);
|
||||
-
|
||||
-std::string CreateFooterAad(const std::string& aad_prefix_bytes);
|
||||
-
|
||||
-// Update last two bytes of page (or page header) module AAD
|
||||
-void QuickUpdatePageAad(const std::string& AAD, int16_t new_page_ordinal);
|
||||
-
|
||||
-// Wraps OpenSSL RAND_bytes function
|
||||
-void RandBytes(unsigned char* buf, int num);
|
||||
-
|
||||
-} // namespace encryption
|
||||
-} // namespace parquet
|
||||
+#if ARROW_VERSION_MAJOR < 20
|
||||
+#include "encryption_internal_19.h"
|
||||
+#else
|
||||
+#include "encryption_internal_20.h"
|
||||
+#endif
|
||||
--- ceph-20.0.0-2362-ga9d20fc0/src/s3select/include/internal_file_decryptor_19.h.orig 2025-07-08 07:40:29.814292389 -0400
|
||||
+++ ceph-20.0.0-2362-ga9d20fc0/src/s3select/include/internal_file_decryptor_19.h 2025-07-08 07:40:29.813727465 -0400
|
||||
@@ -0,0 +1,121 @@
|
||||
+// Licensed to the Apache Software Foundation (ASF) under one
|
||||
+// or more contributor license agreements. See the NOTICE file
|
||||
+// distributed with this work for additional information
|
||||
+// regarding copyright ownership. The ASF licenses this file
|
||||
+// to you under the Apache License, Version 2.0 (the
|
||||
+// "License"); you may not use this file except in compliance
|
||||
+// with the License. You may obtain a copy of the License at
|
||||
+//
|
||||
+// http://www.apache.org/licenses/LICENSE-2.0
|
||||
+//
|
||||
+// Unless required by applicable law or agreed to in writing,
|
||||
+// software distributed under the License is distributed on an
|
||||
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
+// KIND, either express or implied. See the License for the
|
||||
+// specific language governing permissions and limitations
|
||||
+// under the License.
|
||||
+
|
||||
+#pragma once
|
||||
+
|
||||
+#include <map>
|
||||
+#include <memory>
|
||||
+#include <string>
|
||||
+#include <vector>
|
||||
+
|
||||
+#include "parquet/schema.h"
|
||||
+
|
||||
+namespace parquet {
|
||||
+
|
||||
+namespace encryption {
|
||||
+class AesDecryptor;
|
||||
+class AesEncryptor;
|
||||
+} // namespace encryption
|
||||
+
|
||||
+class FileDecryptionProperties;
|
||||
+
|
||||
+class PARQUET_EXPORT Decryptor {
|
||||
+ public:
|
||||
+ Decryptor(encryption::AesDecryptor* decryptor, const std::string& key,
|
||||
+ const std::string& file_aad, const std::string& aad,
|
||||
+ ::arrow::MemoryPool* pool);
|
||||
+
|
||||
+ const std::string& file_aad() const { return file_aad_; }
|
||||
+ void UpdateAad(const std::string& aad) { aad_ = aad; }
|
||||
+ ::arrow::MemoryPool* pool() { return pool_; }
|
||||
+
|
||||
+ int CiphertextSizeDelta();
|
||||
+ int Decrypt(const uint8_t* ciphertext, int ciphertext_len, uint8_t* plaintext);
|
||||
+
|
||||
+ private:
|
||||
+ encryption::AesDecryptor* aes_decryptor_;
|
||||
+ std::string key_;
|
||||
+ std::string file_aad_;
|
||||
+ std::string aad_;
|
||||
+ ::arrow::MemoryPool* pool_;
|
||||
+};
|
||||
+
|
||||
+class InternalFileDecryptor {
|
||||
+ public:
|
||||
+ explicit InternalFileDecryptor(FileDecryptionProperties* properties,
|
||||
+ const std::string& file_aad,
|
||||
+ ParquetCipher::type algorithm,
|
||||
+ const std::string& footer_key_metadata,
|
||||
+ ::arrow::MemoryPool* pool);
|
||||
+
|
||||
+ std::string& file_aad() { return file_aad_; }
|
||||
+
|
||||
+ std::string GetFooterKey();
|
||||
+
|
||||
+ ParquetCipher::type algorithm() { return algorithm_; }
|
||||
+
|
||||
+ std::string& footer_key_metadata() { return footer_key_metadata_; }
|
||||
+
|
||||
+ FileDecryptionProperties* properties() { return properties_; }
|
||||
+
|
||||
+ void WipeOutDecryptionKeys();
|
||||
+
|
||||
+ ::arrow::MemoryPool* pool() { return pool_; }
|
||||
+
|
||||
+ std::shared_ptr<Decryptor> GetFooterDecryptor();
|
||||
+ std::shared_ptr<Decryptor> GetFooterDecryptorForColumnMeta(const std::string& aad = "");
|
||||
+ std::shared_ptr<Decryptor> GetFooterDecryptorForColumnData(const std::string& aad = "");
|
||||
+ std::shared_ptr<Decryptor> GetColumnMetaDecryptor(
|
||||
+ const std::string& column_path, const std::string& column_key_metadata,
|
||||
+ const std::string& aad = "");
|
||||
+ std::shared_ptr<Decryptor> GetColumnDataDecryptor(
|
||||
+ const std::string& column_path, const std::string& column_key_metadata,
|
||||
+ const std::string& aad = "");
|
||||
+
|
||||
+ private:
|
||||
+ FileDecryptionProperties* properties_;
|
||||
+ // Concatenation of aad_prefix (if exists) and aad_file_unique
|
||||
+ std::string file_aad_;
|
||||
+ std::map<std::string, std::shared_ptr<Decryptor>> column_data_map_;
|
||||
+ std::map<std::string, std::shared_ptr<Decryptor>> column_metadata_map_;
|
||||
+
|
||||
+ std::shared_ptr<Decryptor> footer_metadata_decryptor_;
|
||||
+ std::shared_ptr<Decryptor> footer_data_decryptor_;
|
||||
+ ParquetCipher::type algorithm_;
|
||||
+ std::string footer_key_metadata_;
|
||||
+ std::vector<encryption::AesDecryptor*> all_decryptors_;
|
||||
+
|
||||
+ /// Key must be 16, 24 or 32 bytes in length. Thus there could be up to three
|
||||
+ // types of meta_decryptors and data_decryptors.
|
||||
+ std::unique_ptr<encryption::AesDecryptor> meta_decryptor_[3];
|
||||
+ std::unique_ptr<encryption::AesDecryptor> data_decryptor_[3];
|
||||
+
|
||||
+ ::arrow::MemoryPool* pool_;
|
||||
+
|
||||
+ std::shared_ptr<Decryptor> GetFooterDecryptor(const std::string& aad, bool metadata);
|
||||
+ std::shared_ptr<Decryptor> GetColumnDecryptor(const std::string& column_path,
|
||||
+ const std::string& column_key_metadata,
|
||||
+ const std::string& aad,
|
||||
+ bool metadata = false);
|
||||
+
|
||||
+ encryption::AesDecryptor* GetMetaAesDecryptor(size_t key_size);
|
||||
+ encryption::AesDecryptor* GetDataAesDecryptor(size_t key_size);
|
||||
+
|
||||
+ int MapKeyLenToDecryptorArrayIndex(int key_len);
|
||||
+};
|
||||
+
|
||||
+} // namespace parquet
|
||||
--- ceph-20.0.0-2362-ga9d20fc0/src/s3select/include/internal_file_decryptor_20.h.orig 2025-07-08 07:40:29.815411998 -0400
|
||||
+++ ceph-20.0.0-2362-ga9d20fc0/src/s3select/include/internal_file_decryptor_20.h 2025-07-08 07:40:29.815245155 -0400
|
||||
@@ -0,0 +1,148 @@
|
||||
+// Licensed to the Apache Software Foundation (ASF) under one
|
||||
+// or more contributor license agreements. See the NOTICE file
|
||||
+// distributed with this work for additional information
|
||||
+// regarding copyright ownership. The ASF licenses this file
|
||||
+// to you under the Apache License, Version 2.0 (the
|
||||
+// "License"); you may not use this file except in compliance
|
||||
+// with the License. You may obtain a copy of the License at
|
||||
+//
|
||||
+// http://www.apache.org/licenses/LICENSE-2.0
|
||||
+//
|
||||
+// Unless required by applicable law or agreed to in writing,
|
||||
+// software distributed under the License is distributed on an
|
||||
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
+// KIND, either express or implied. See the License for the
|
||||
+// specific language governing permissions and limitations
|
||||
+// under the License.
|
||||
+
|
||||
+#pragma once
|
||||
+
|
||||
+#include <memory>
|
||||
+#include <mutex>
|
||||
+#include <string>
|
||||
+#include <vector>
|
||||
+
|
||||
+#include "parquet/schema.h"
|
||||
+
|
||||
+namespace parquet {
|
||||
+
|
||||
+namespace encryption {
|
||||
+class AesDecryptor;
|
||||
+class AesEncryptor;
|
||||
+} // namespace encryption
|
||||
+
|
||||
+class ColumnCryptoMetaData;
|
||||
+class FileDecryptionProperties;
|
||||
+
|
||||
+// An object handling decryption using well-known encryption parameters
|
||||
+//
|
||||
+// CAUTION: Decryptor objects are not thread-safe.
|
||||
+class PARQUET_EXPORT Decryptor {
|
||||
+ public:
|
||||
+ Decryptor(std::unique_ptr<encryption::AesDecryptor> decryptor, const std::string& key,
|
||||
+ const std::string& file_aad, const std::string& aad,
|
||||
+ ::arrow::MemoryPool* pool);
|
||||
+ ~Decryptor();
|
||||
+
|
||||
+ const std::string& file_aad() const { return file_aad_; }
|
||||
+ void UpdateAad(const std::string& aad) { aad_ = aad; }
|
||||
+ ::arrow::MemoryPool* pool() { return pool_; }
|
||||
+
|
||||
+ [[nodiscard]] int32_t PlaintextLength(int32_t ciphertext_len) const;
|
||||
+ [[nodiscard]] int32_t CiphertextLength(int32_t plaintext_len) const;
|
||||
+ int32_t Decrypt(::arrow::util::span<const uint8_t> ciphertext,
|
||||
+ ::arrow::util::span<uint8_t> plaintext);
|
||||
+
|
||||
+ private:
|
||||
+ std::unique_ptr<encryption::AesDecryptor> aes_decryptor_;
|
||||
+ std::string key_;
|
||||
+ std::string file_aad_;
|
||||
+ std::string aad_;
|
||||
+ ::arrow::MemoryPool* pool_;
|
||||
+};
|
||||
+
|
||||
+class InternalFileDecryptor {
|
||||
+ public:
|
||||
+ explicit InternalFileDecryptor(std::shared_ptr<FileDecryptionProperties> properties,
|
||||
+ const std::string& file_aad,
|
||||
+ ParquetCipher::type algorithm,
|
||||
+ const std::string& footer_key_metadata,
|
||||
+ ::arrow::MemoryPool* pool);
|
||||
+
|
||||
+ const std::string& file_aad() const { return file_aad_; }
|
||||
+
|
||||
+ std::string GetFooterKey();
|
||||
+
|
||||
+ ParquetCipher::type algorithm() const { return algorithm_; }
|
||||
+
|
||||
+ const std::string& footer_key_metadata() const { return footer_key_metadata_; }
|
||||
+
|
||||
+ const std::shared_ptr<FileDecryptionProperties>& properties() const {
|
||||
+ return properties_;
|
||||
+ }
|
||||
+
|
||||
+ ::arrow::MemoryPool* pool() const { return pool_; }
|
||||
+
|
||||
+ // Get a Decryptor instance for the Parquet footer
|
||||
+ std::unique_ptr<Decryptor> GetFooterDecryptor();
|
||||
+
|
||||
+ // Get a Decryptor instance for column chunk metadata.
|
||||
+ std::unique_ptr<Decryptor> GetColumnMetaDecryptor(
|
||||
+ const std::string& column_path, const std::string& column_key_metadata,
|
||||
+ const std::string& aad = "") {
|
||||
+ return GetColumnDecryptor(column_path, column_key_metadata, aad, /*metadata=*/true);
|
||||
+ }
|
||||
+
|
||||
+ // Get a Decryptor instance for column chunk data.
|
||||
+ std::unique_ptr<Decryptor> GetColumnDataDecryptor(
|
||||
+ const std::string& column_path, const std::string& column_key_metadata,
|
||||
+ const std::string& aad = "") {
|
||||
+ return GetColumnDecryptor(column_path, column_key_metadata, aad, /*metadata=*/false);
|
||||
+ }
|
||||
+
|
||||
+ // Get a Decryptor factory for column chunk metadata.
|
||||
+ //
|
||||
+ // This is typically useful if multi-threaded decryption is expected.
|
||||
+ // This is a static function as it accepts a null `InternalFileDecryptor*`
|
||||
+ // argument if the column is not encrypted.
|
||||
+ static std::function<std::unique_ptr<Decryptor>()> GetColumnMetaDecryptorFactory(
|
||||
+ InternalFileDecryptor*, const ColumnCryptoMetaData* crypto_metadata,
|
||||
+ const std::string& aad = "");
|
||||
+ // Get a Decryptor factory for column chunk data.
|
||||
+ //
|
||||
+ // This is typically useful if multi-threaded decryption is expected.
|
||||
+ // This is a static function as it accepts a null `InternalFileDecryptor*`
|
||||
+ // argument if the column is not encrypted.
|
||||
+ static std::function<std::unique_ptr<Decryptor>()> GetColumnDataDecryptorFactory(
|
||||
+ InternalFileDecryptor*, const ColumnCryptoMetaData* crypto_metadata,
|
||||
+ const std::string& aad = "");
|
||||
+
|
||||
+ private:
|
||||
+ std::shared_ptr<FileDecryptionProperties> properties_;
|
||||
+ // Concatenation of aad_prefix (if exists) and aad_file_unique
|
||||
+ std::string file_aad_;
|
||||
+ ParquetCipher::type algorithm_;
|
||||
+ std::string footer_key_metadata_;
|
||||
+ ::arrow::MemoryPool* pool_;
|
||||
+
|
||||
+ // Protects footer_key_ updates
|
||||
+ std::mutex mutex_;
|
||||
+ std::string footer_key_;
|
||||
+
|
||||
+ std::string GetColumnKey(const std::string& column_path,
|
||||
+ const std::string& column_key_metadata);
|
||||
+
|
||||
+ std::unique_ptr<Decryptor> GetFooterDecryptor(const std::string& aad, bool metadata);
|
||||
+
|
||||
+ std::unique_ptr<Decryptor> GetColumnDecryptor(const std::string& column_path,
|
||||
+ const std::string& column_key_metadata,
|
||||
+ const std::string& aad, bool metadata);
|
||||
+
|
||||
+ std::function<std::unique_ptr<Decryptor>()> GetColumnDecryptorFactory(
|
||||
+ const ColumnCryptoMetaData* crypto_metadata, const std::string& aad, bool metadata);
|
||||
+};
|
||||
+
|
||||
+void UpdateDecryptor(Decryptor* decryptor, int16_t row_group_ordinal,
|
||||
+ int16_t column_ordinal, int8_t module_type);
|
||||
+
|
||||
+} // namespace parquet
|
||||
--- ceph-20.0.0-2362-ga9d20fc0/src/s3select/include/internal_file_decryptor.h.orig 2024-10-06 07:18:41.000000000 -0400
|
||||
+++ ceph-20.0.0-2362-ga9d20fc0/src/s3select/include/internal_file_decryptor.h 2025-07-08 07:40:29.813623143 -0400
|
||||
@@ -17,105 +17,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
-#include <map>
|
||||
-#include <memory>
|
||||
-#include <string>
|
||||
-#include <vector>
|
||||
-
|
||||
-#include "parquet/schema.h"
|
||||
-
|
||||
-namespace parquet {
|
||||
-
|
||||
-namespace encryption {
|
||||
-class AesDecryptor;
|
||||
-class AesEncryptor;
|
||||
-} // namespace encryption
|
||||
-
|
||||
-class FileDecryptionProperties;
|
||||
-
|
||||
-class PARQUET_EXPORT Decryptor {
|
||||
- public:
|
||||
- Decryptor(encryption::AesDecryptor* decryptor, const std::string& key,
|
||||
- const std::string& file_aad, const std::string& aad,
|
||||
- ::arrow::MemoryPool* pool);
|
||||
-
|
||||
- const std::string& file_aad() const { return file_aad_; }
|
||||
- void UpdateAad(const std::string& aad) { aad_ = aad; }
|
||||
- ::arrow::MemoryPool* pool() { return pool_; }
|
||||
-
|
||||
- int CiphertextSizeDelta();
|
||||
- int Decrypt(const uint8_t* ciphertext, int ciphertext_len, uint8_t* plaintext);
|
||||
-
|
||||
- private:
|
||||
- encryption::AesDecryptor* aes_decryptor_;
|
||||
- std::string key_;
|
||||
- std::string file_aad_;
|
||||
- std::string aad_;
|
||||
- ::arrow::MemoryPool* pool_;
|
||||
-};
|
||||
-
|
||||
-class InternalFileDecryptor {
|
||||
- public:
|
||||
- explicit InternalFileDecryptor(FileDecryptionProperties* properties,
|
||||
- const std::string& file_aad,
|
||||
- ParquetCipher::type algorithm,
|
||||
- const std::string& footer_key_metadata,
|
||||
- ::arrow::MemoryPool* pool);
|
||||
-
|
||||
- std::string& file_aad() { return file_aad_; }
|
||||
-
|
||||
- std::string GetFooterKey();
|
||||
-
|
||||
- ParquetCipher::type algorithm() { return algorithm_; }
|
||||
-
|
||||
- std::string& footer_key_metadata() { return footer_key_metadata_; }
|
||||
-
|
||||
- FileDecryptionProperties* properties() { return properties_; }
|
||||
-
|
||||
- void WipeOutDecryptionKeys();
|
||||
-
|
||||
- ::arrow::MemoryPool* pool() { return pool_; }
|
||||
-
|
||||
- std::shared_ptr<Decryptor> GetFooterDecryptor();
|
||||
- std::shared_ptr<Decryptor> GetFooterDecryptorForColumnMeta(const std::string& aad = "");
|
||||
- std::shared_ptr<Decryptor> GetFooterDecryptorForColumnData(const std::string& aad = "");
|
||||
- std::shared_ptr<Decryptor> GetColumnMetaDecryptor(
|
||||
- const std::string& column_path, const std::string& column_key_metadata,
|
||||
- const std::string& aad = "");
|
||||
- std::shared_ptr<Decryptor> GetColumnDataDecryptor(
|
||||
- const std::string& column_path, const std::string& column_key_metadata,
|
||||
- const std::string& aad = "");
|
||||
-
|
||||
- private:
|
||||
- FileDecryptionProperties* properties_;
|
||||
- // Concatenation of aad_prefix (if exists) and aad_file_unique
|
||||
- std::string file_aad_;
|
||||
- std::map<std::string, std::shared_ptr<Decryptor>> column_data_map_;
|
||||
- std::map<std::string, std::shared_ptr<Decryptor>> column_metadata_map_;
|
||||
-
|
||||
- std::shared_ptr<Decryptor> footer_metadata_decryptor_;
|
||||
- std::shared_ptr<Decryptor> footer_data_decryptor_;
|
||||
- ParquetCipher::type algorithm_;
|
||||
- std::string footer_key_metadata_;
|
||||
- std::vector<encryption::AesDecryptor*> all_decryptors_;
|
||||
-
|
||||
- /// Key must be 16, 24 or 32 bytes in length. Thus there could be up to three
|
||||
- // types of meta_decryptors and data_decryptors.
|
||||
- std::unique_ptr<encryption::AesDecryptor> meta_decryptor_[3];
|
||||
- std::unique_ptr<encryption::AesDecryptor> data_decryptor_[3];
|
||||
-
|
||||
- ::arrow::MemoryPool* pool_;
|
||||
-
|
||||
- std::shared_ptr<Decryptor> GetFooterDecryptor(const std::string& aad, bool metadata);
|
||||
- std::shared_ptr<Decryptor> GetColumnDecryptor(const std::string& column_path,
|
||||
- const std::string& column_key_metadata,
|
||||
- const std::string& aad,
|
||||
- bool metadata = false);
|
||||
-
|
||||
- encryption::AesDecryptor* GetMetaAesDecryptor(size_t key_size);
|
||||
- encryption::AesDecryptor* GetDataAesDecryptor(size_t key_size);
|
||||
-
|
||||
- int MapKeyLenToDecryptorArrayIndex(int key_len);
|
||||
-};
|
||||
-
|
||||
-} // namespace parquet
|
||||
+#if ARROW_VERSION_MAJOR < 20
|
||||
+#include "internal_file_decryptor_19.h"
|
||||
+#else
|
||||
+#include "internal_file_decryptor_20.h"
|
||||
+#endif
|
||||
--- ceph-20.0.0-2362-ga9d20fc0/src/s3select/include/s3select_parquet_intrf.h.orig 2024-10-06 07:18:41.000000000 -0400
|
||||
+++ ceph-20.0.0-2362-ga9d20fc0/src/s3select/include/s3select_parquet_intrf.h 2025-07-08 07:40:29.816727417 -0400
|
||||
@@ -1002,6 +1002,7 @@
|
||||
throw ParquetException("Encrypted files cannot contain more than 32767 row groups");
|
||||
}
|
||||
|
||||
+#if ARROW_VERSION_MAJOR < 20
|
||||
// The column is encrypted
|
||||
std::shared_ptr<::parquet::Decryptor> meta_decryptor;
|
||||
std::shared_ptr<Decryptor> data_decryptor;
|
||||
@@ -1035,6 +1036,25 @@
|
||||
false,
|
||||
#endif
|
||||
properties_.memory_pool(), &ctx);
|
||||
+#else
|
||||
+ // Arrow 20+ version uses factory functions instead of shared_ptr for decryptors
|
||||
+ std::function<std::unique_ptr<Decryptor>()> meta_decryptor_factory =
|
||||
+ InternalFileDecryptor::GetColumnMetaDecryptorFactory(file_decryptor_.get(), crypto_metadata.get());
|
||||
+ std::function<std::unique_ptr<Decryptor>()> data_decryptor_factory =
|
||||
+ InternalFileDecryptor::GetColumnDataDecryptorFactory(file_decryptor_.get(), crypto_metadata.get());
|
||||
+
|
||||
+ const CryptoContext ctx {
|
||||
+ col->has_dictionary_page(),
|
||||
+ row_group_ordinal_,
|
||||
+ static_cast<int16_t>(i),
|
||||
+ meta_decryptor_factory,
|
||||
+ data_decryptor_factory,
|
||||
+ };
|
||||
+
|
||||
+ return PageReader::Open(stream, col->num_values(), col->compression(),
|
||||
+ false,
|
||||
+ properties_.memory_pool(), &ctx);
|
||||
+#endif
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -1071,7 +1091,9 @@
|
||||
}
|
||||
|
||||
void Close() override {
|
||||
+#if ARROW_VERSION_MAJOR < 20
|
||||
if (file_decryptor_) file_decryptor_->WipeOutDecryptionKeys();
|
||||
+#endif
|
||||
}
|
||||
|
||||
std::shared_ptr<RowGroupReader> GetRowGroup(int i) override {
|
||||
@@ -1249,9 +1271,17 @@
|
||||
// Handle AAD prefix
|
||||
EncryptionAlgorithm algo = file_crypto_metadata->encryption_algorithm();
|
||||
std::string file_aad = HandleAadPrefix(file_decryption_properties, algo);
|
||||
+#if ARROW_VERSION_MAJOR < 20
|
||||
file_decryptor_ = std::make_shared<::parquet::InternalFileDecryptor>(
|
||||
file_decryption_properties, file_aad, algo.algorithm,
|
||||
file_crypto_metadata->key_metadata(), properties_.memory_pool());
|
||||
+#else
|
||||
+ // Arrow 20+ takes a shared_ptr to FileDecryptionProperties
|
||||
+ file_decryptor_ = std::make_shared<::parquet::InternalFileDecryptor>(
|
||||
+ std::shared_ptr<FileDecryptionProperties>(file_decryption_properties),
|
||||
+ file_aad, algo.algorithm,
|
||||
+ file_crypto_metadata->key_metadata(), properties_.memory_pool());
|
||||
+#endif
|
||||
|
||||
int64_t metadata_offset = source_size_ - kFooterSize - footer_len + crypto_metadata_len;
|
||||
uint32_t metadata_len = footer_len - crypto_metadata_len;
|
||||
@@ -1282,9 +1312,18 @@
|
||||
EncryptionAlgorithm algo = file_metadata_->encryption_algorithm();
|
||||
// Handle AAD prefix
|
||||
std::string file_aad = HandleAadPrefix(file_decryption_properties, algo);
|
||||
+#if ARROW_VERSION_MAJOR < 20
|
||||
file_decryptor_ = std::make_shared<::parquet::InternalFileDecryptor>(
|
||||
file_decryption_properties, file_aad, algo.algorithm,
|
||||
file_metadata_->footer_signing_key_metadata(), properties_.memory_pool());
|
||||
+#else
|
||||
+ // Arrow 20+ takes a shared_ptr to FileDecryptionProperties
|
||||
+ file_decryptor_ = std::make_shared<::parquet::InternalFileDecryptor>(
|
||||
+ std::shared_ptr<FileDecryptionProperties>(file_decryption_properties),
|
||||
+ file_aad, algo.algorithm,
|
||||
+ file_metadata_->footer_signing_key_metadata(), properties_.memory_pool());
|
||||
+ // In Arrow 20+, no need to set file_decryptor in metadata
|
||||
+#endif
|
||||
// set the InternalFileDecryptor in the metadata as well, as it's used
|
||||
// for signature verification and for ColumnChunkMetaData creation.
|
||||
#if GAL_set_file_decryptor_declare_private
|
||||
@@ -0,0 +1,10 @@
|
||||
--- ceph-20.2.0/src/crimson/common/smp_helpers.h.orig 2025-12-04 10:38:34.906915674 -0500
|
||||
+++ ceph-20.2.0/src/crimson/common/smp_helpers.h 2025-12-04 10:38:45.200845804 -0500
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <optional>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
+#include <coroutine>
|
||||
|
||||
#include <seastar/core/shared_future.hh>
|
||||
#include <seastar/core/smp.hh>
|
||||
@@ -0,0 +1,70 @@
|
||||
--- ceph-20.2.0/src/common/Formatter.h.orig 2026-01-06 17:47:18.437014517 -0500
|
||||
+++ ceph-20.2.0/src/common/Formatter.h 2026-01-06 17:47:53.015404074 -0500
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <stdarg.h>
|
||||
+#include <cstdint>
|
||||
#include <sstream>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
--- ceph-20.2.0/src/mds/Locker.cc.orig 2026-01-07 10:34:12.731210930 -0500
|
||||
+++ ceph-20.2.0/src/mds/Locker.cc 2026-01-07 10:34:35.627823155 -0500
|
||||
@@ -4489,7 +4489,7 @@
|
||||
dout(7) << "handle_client_lease client." << client << " renew on " << *dn
|
||||
<< (!dn->lock.can_lease(client)?", revoking lease":"") << dendl;
|
||||
if (dn->lock.can_lease(client)) {
|
||||
- auto reply = make_message<MClientLease>(*m);
|
||||
+ auto reply = ceph::make_message<MClientLease>(*m);
|
||||
int pool = 1; // fixme.. do something smart!
|
||||
reply->h.duration_ms = (int)(1000 * mdcache->client_lease_durations[pool]);
|
||||
reply->h.seq = ++l->seq;
|
||||
--- ceph-20.2.0/src/mds/Server.cc.orig 2026-01-07 11:27:13.532097596 -0500
|
||||
+++ ceph-20.2.0/src/mds/Server.cc 2026-01-07 11:28:42.411581266 -0500
|
||||
@@ -150,7 +150,7 @@
|
||||
}
|
||||
}
|
||||
batch_reqs.clear();
|
||||
- server->reply_client_request(mdr, make_message<MClientReply>(*mdr->client_request, r));
|
||||
+ server->reply_client_request(mdr, ceph::make_message<MClientReply>(*mdr->client_request, r));
|
||||
}
|
||||
void print(std::ostream& o) const override {
|
||||
o << "[batch front=" << *mdr << "]";
|
||||
@@ -2142,7 +2142,7 @@
|
||||
dout(20) << __func__ << ": batch head " << *mdr << dendl;
|
||||
mdr->release_batch_op()->respond(r);
|
||||
} else {
|
||||
- reply_client_request(mdr, make_message<MClientReply>(*mdr->client_request, r));
|
||||
+ reply_client_request(mdr, ceph::make_message<MClientReply>(*mdr->client_request, r));
|
||||
}
|
||||
} else if (mdr->internal_op > -1) {
|
||||
dout(10) << __func__ << ": completing with result " << cpp_strerror(r) << " on internal " << *mdr << dendl;
|
||||
@@ -2290,7 +2290,7 @@
|
||||
}
|
||||
|
||||
|
||||
- auto reply = make_message<MClientReply>(*req, 0);
|
||||
+ auto reply = ceph::make_message<MClientReply>(*req, 0);
|
||||
reply->set_unsafe();
|
||||
|
||||
// mark xlocks "done", indicating that we are exposing uncommitted changes.
|
||||
@@ -2632,7 +2632,7 @@
|
||||
req->get_op() != CEPH_MDS_OP_OPEN &&
|
||||
req->get_op() != CEPH_MDS_OP_CREATE)) {
|
||||
dout(5) << "already completed " << req->get_reqid() << dendl;
|
||||
- auto reply = make_message<MClientReply>(*req, 0);
|
||||
+ auto reply = ceph::make_message<MClientReply>(*req, 0);
|
||||
if (created != inodeno_t()) {
|
||||
bufferlist extra;
|
||||
set_reply_extra_bl(req, created, extra);
|
||||
--- ceph-20.2.0/src/mds/MDCache.cc.orig 2026-01-07 11:28:48.882470871 -0500
|
||||
+++ ceph-20.2.0/src/mds/MDCache.cc 2026-01-07 11:29:12.405069562 -0500
|
||||
@@ -10535,7 +10535,7 @@
|
||||
|
||||
|
||||
CInode *cur = 0;
|
||||
- auto reply = make_message<MDiscoverReply>(*dis);
|
||||
+ auto reply = ceph::make_message<MDiscoverReply>(*dis);
|
||||
|
||||
snapid_t snapid = dis->get_snapid();
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
--- ceph-0.80.5/src/perfglue/heap_profiler.cc.orig 2014-08-15 16:05:00.161794290 +0200
|
||||
+++ ceph-0.80.5/src/perfglue/heap_profiler.cc 2014-08-15 16:05:04.691794305 +0200
|
||||
@@ -12,8 +12,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
-#include <google/heap-profiler.h>
|
||||
-#include <google/malloc_extension.h>
|
||||
+#include <gperftools/heap-profiler.h>
|
||||
+#include <gperftools/malloc_extension.h>
|
||||
#include "heap_profiler.h"
|
||||
#include "common/environment.h"
|
||||
#include "common/LogClient.h"
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ceph-0.80.5/src/test/Makefile.am.orig 2014-08-15 16:30:18.831799418 +0200
|
||||
+++ ceph-0.80.5/src/test/Makefile.am 2014-08-15 16:23:17.758464663 +0200
|
||||
@@ -642,7 +642,7 @@ bin_DEBUGPROGRAMS += ceph_test_librbd
|
||||
if LINUX
|
||||
ceph_test_librbd_fsx_SOURCES = test/librbd/fsx.c
|
||||
ceph_test_librbd_fsx_LDADD = $(LIBRBD) $(LIBRADOS) -lm
|
||||
-ceph_test_librbd_fsx_CFLAGS = ${AM_CFLAGS} -Wno-format
|
||||
+ceph_test_librbd_fsx_CFLAGS = ${AM_CFLAGS}
|
||||
bin_DEBUGPROGRAMS += ceph_test_librbd_fsx
|
||||
endif
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake
|
||||
index 2e92132366..3cb1e3d958 100644
|
||||
--- a/cmake/modules/BuildBoost.cmake
|
||||
+++ b/cmake/modules/BuildBoost.cmake
|
||||
@@ -62,7 +62,7 @@ function(do_build_boost version)
|
||||
else()
|
||||
list(APPEND boost_features "address-model=32")
|
||||
endif()
|
||||
- set(BOOST_CXXFLAGS "-fPIC -w") # check on arm, etc <---XXX
|
||||
+ set(BOOST_CXXFLAGS "-fPIC -w -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -ftemplate-depth-1024 -fno-new-ttp-matching -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free") # check on arm, etc <---XXX
|
||||
list(APPEND boost_features "cxxflags=${BOOST_CXXFLAGS}")
|
||||
|
||||
set(boost_with_libs)
|
||||
Reference in New Issue
Block a user