Skip to content

Commit

Permalink
Add attribute noinline to OPENSSL_malloc (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
pennyannn authored Feb 15, 2024
1 parent 3a03619 commit cb1ae3c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions SAW/patch/noinline-OPENSSL_malloc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/crypto/mem.c b/crypto/mem.c
index 7e58609c0..b92a0e555 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -187,6 +187,7 @@ static const uint8_t kBoringSSLBinaryTag[18] = {
0,
};

+__attribute__((noinline))
void *OPENSSL_malloc(size_t size) {
if (malloc_impl != NULL) {
assert(OPENSSL_memory_alloc == NULL);
1 change: 1 addition & 0 deletions SAW/scripts/x86_64/entrypoint_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ go env -w GOPROXY=direct
apply_patch "rsa-encrypt"
apply_patch "nomuxrsp"
apply_patch "ec_GFp_nistp384_point_mul_public"
apply_patch "noinline-OPENSSL_malloc"
apply_patch "noinline-aes_gcm_from_cipher_ctx"
apply_patch "noinline-bn_mod_add_words"
apply_patch "noinline-bn_reduce_once_in_place"
Expand Down

0 comments on commit cb1ae3c

Please sign in to comment.