Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Merge BoringSSL through 538b2a6cf0497cf8bb61ae726a484a3d7a34e54e #2226

Merged
merged 24 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c77d0f8
Document and fix up name hashing functions
davidben Dec 7, 2023
547221f
Assume the Arm assembler can handle ADR
davidben Dec 12, 2023
fcec139
Disable 32-bit Arm assembly optimizations on iOS
davidben Dec 12, 2023
62f43f5
sha: Move Armv7 dispatching to C
davidben Dec 12, 2023
23d5842
Fix X509_ATTRIBUTE_set1_data with negative attributes
davidben Dec 13, 2023
b251d81
Change certificate depth limit to match OpenSSL and document
davidben Dec 11, 2023
7460d74
Support medium memory models.
agl Dec 14, 2023
56112cc
Skip emitting empty <pre> blocks in documentation
davidben Dec 15, 2023
9c821af
Add conf.h to the documentation output
davidben Dec 15, 2023
faac623
Restore the X509 ASN1_ITEM
davidben Dec 17, 2023
3d5a848
Give time.h a title and move to low-level infra group
davidben Dec 16, 2023
3599db2
sha: Add SSSE3 check to SHAEXT SHA-256 implementation.
briansmith Dec 6, 2023
a942d57
Support lists and code blocks in doc.go
davidben Dec 14, 2023
89dd8d9
Give WARNING paragraphs a splash of color
davidben Dec 16, 2023
538b2a6
Restore the X509_EXTENSION ASN1_ITEM too
davidben Dec 18, 2023
c13fc5b
Ignore BoringSSL c77d0f8.
briansmith Jan 14, 2025
33f65d1
Take BoringSSL 547221f: Assume the Arm assembler can handle ADR
briansmith Jan 14, 2025
b939c18
Merge BoringSSL fcec139: Disable 32-bit Arm assembly optimizations on…
briansmith Jan 14, 2025
9c9c51f
Skip BoringSSL 62f43f5.
briansmith Jan 14, 2025
3264679
Ignore BoringSSL 23d5842..b251d81.
briansmith Jan 14, 2025
162cd4e
Ignore BoringSSL 7460d74.
briansmith Jan 14, 2025
ead0f33
Ignore BoringSSL 56112cc..3d5a848.
briansmith Jan 14, 2025
1c020ee
No-op merge of BoringSSL 3599db2: sha: Add SSSE3 check to SHAEXT SHA-…
briansmith Jan 14, 2025
9ad3069
Ignore BoringSSL a942d57..538b2a6.
briansmith Jan 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions crypto/chacha/asm/chacha-armv4.pl
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ sub ROUND {
.extern OPENSSL_armcap_P
.hidden OPENSSL_armcap_P
.LOPENSSL_armcap:
.word OPENSSL_armcap_P-.LChaCha20_ctr32
.word OPENSSL_armcap_P-.Lsigma
#else
.word -1
#endif
Expand All @@ -212,11 +212,7 @@ sub ROUND {
.LChaCha20_ctr32:
ldr r12,[sp,#0] @ pull pointer to counter and nonce
stmdb sp!,{r0-r2,r4-r11,lr}
#if __ARM_ARCH<7 && !defined(__thumb2__)
sub r14,pc,#16 @ ChaCha20_ctr32
#else
adr r14,.LChaCha20_ctr32
#endif
adr r14,.Lsigma
cmp r2,#0 @ len==0?
#ifdef __thumb2__
itt eq
Expand All @@ -226,7 +222,7 @@ sub ROUND {
#if __ARM_MAX_ARCH__>=7
cmp r2,#192 @ test len
bls .Lshort
ldr r4,[r14,#-32]
ldr r4,[r14,#32]
ldr r4,[r14,r4]
# ifdef __APPLE__
ldr r4,[r4]
Expand All @@ -237,7 +233,6 @@ sub ROUND {
#endif
ldmia r12,{r4-r7} @ load counter and nonce
sub sp,sp,#4*(16) @ off-load area
sub r14,r14,#64 @ .Lsigma
stmdb sp!,{r4-r7} @ copy counter and nonce
ldmia r3,{r4-r11} @ load key
ldmia r14,{r0-r3} @ load sigma
Expand Down
6 changes: 2 additions & 4 deletions crypto/fipsmodule/sha/asm/sha256-armv4.pl
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,7 @@ sub BODY_16_XX {
.type sha256_block_data_order,%function
sha256_block_data_order:
.Lsha256_block_data_order:
#if __ARM_ARCH<7 && !defined(__thumb2__)
sub r3,pc,#8 @ sha256_block_data_order
#else
adr r3,.Lsha256_block_data_order
#endif
#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
ldr r12,.LOPENSSL_armcap
ldr r12,[r3,r12] @ OPENSSL_armcap_P
Expand All @@ -248,6 +244,8 @@ sub BODY_16_XX {
add $len,$inp,$len,lsl#6 @ len to point at the end of inp
stmdb sp!,{$ctx,$inp,$len,r4-r11,lr}
ldmia $ctx,{$A,$B,$C,$D,$E,$F,$G,$H}
@ TODO(davidben): When the OPENSSL_armcap logic above is removed,
@ replace this with a simple ADR.
sub $Ktbl,r3,#256+32 @ K256
sub sp,sp,#16*4 @ alloca(X[16])
.Loop:
Expand Down
6 changes: 2 additions & 4 deletions crypto/fipsmodule/sha/asm/sha512-armv4.pl
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,7 @@ ()
.type sha512_block_data_order,%function
sha512_block_data_order:
.Lsha512_block_data_order:
#if __ARM_ARCH<7 && !defined(__thumb2__)
sub r3,pc,#8 @ sha512_block_data_order
#else
adr r3,.Lsha512_block_data_order
#endif
#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
ldr r12,.LOPENSSL_armcap
ldr r12,[r3,r12] @ OPENSSL_armcap_P
Expand All @@ -306,6 +302,8 @@ ()
#endif
add $len,$inp,$len,lsl#7 @ len to point at the end of inp
stmdb sp!,{r4-r12,lr}
@ TODO(davidben): When the OPENSSL_armcap logic above is removed,
@ replace this with a simple ADR.
sub $Ktbl,r3,#672 @ K512
sub sp,sp,#9*8

Expand Down
6 changes: 6 additions & 0 deletions include/ring-core/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@
#endif
#endif

// Disable 32-bit Arm assembly on Apple platforms. The last iOS version that
// supported 32-bit Arm was iOS 10.
#if defined(OPENSSL_APPLE) && defined(OPENSSL_ARM)
#define OPENSSL_ASM_INCOMPATIBLE
#endif

#if defined(OPENSSL_ASM_INCOMPATIBLE)
#undef OPENSSL_ASM_INCOMPATIBLE
#if !defined(OPENSSL_NO_ASM)
Expand Down