public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libsanitizer: Add __interceptor_sigsetjmp_internal
@ 2022-12-16 21:31 H.J. Lu
  2023-01-31  9:09 ` Jakub Jelinek
  0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2022-12-16 21:31 UTC (permalink / raw)
  To: gcc-patches

Add an internal alias to __interceptor_sigsetjmp to avoid R_X86_64_PC32
relocation for "jmp __interceptor_sigsetjmp" with old assemblers.

	PR sanitizer/108106
	* hwasan/hwasan_setjmp_x86_64.S (__interceptor_sigsetjmp): Add
	an internal alias, __interceptor_sigsetjmp_internal.
---
 libsanitizer/hwasan/hwasan_setjmp_x86_64.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libsanitizer/hwasan/hwasan_setjmp_x86_64.S b/libsanitizer/hwasan/hwasan_setjmp_x86_64.S
index 7566c1ea0a5..071dcdcf613 100644
--- a/libsanitizer/hwasan/hwasan_setjmp_x86_64.S
+++ b/libsanitizer/hwasan/hwasan_setjmp_x86_64.S
@@ -37,13 +37,14 @@ __interceptor_setjmp:
   CFI_STARTPROC
   _CET_ENDBR
   xorl %esi, %esi
-  jmp	__interceptor_sigsetjmp
+  jmp	__interceptor_sigsetjmp_internal
   CFI_ENDPROC
 ASM_SIZE(__interceptor_setjmp)
 
 .global __interceptor_sigsetjmp
 ASM_TYPE_FUNCTION(__interceptor_sigsetjmp)
 __interceptor_sigsetjmp:
+__interceptor_sigsetjmp_internal:
   CFI_STARTPROC
   _CET_ENDBR
 
-- 
2.38.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] libsanitizer: Add __interceptor_sigsetjmp_internal
  2022-12-16 21:31 [PATCH] libsanitizer: Add __interceptor_sigsetjmp_internal H.J. Lu
@ 2023-01-31  9:09 ` Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2023-01-31  9:09 UTC (permalink / raw)
  To: H.J. Lu, Martin Liška; +Cc: gcc-patches

On Fri, Dec 16, 2022 at 01:31:32PM -0800, H.J. Lu via Gcc-patches wrote:
> Add an internal alias to __interceptor_sigsetjmp to avoid R_X86_64_PC32
> relocation for "jmp __interceptor_sigsetjmp" with old assemblers.

I think the patch is ok, but because libsanitizer is just downstream
from sanitizers in LLVM, this should be filed in
https://reviews.llvm.org/differential/diff/create/
first (with diff -p -U10000 or something similar I think they want there).
It can be then cherry-picked into GCC, or at least wait until there is
some agreement on what they want or whether they completely reject it
and we'd need to carry it as a GCC local patch (in that case it should
be in libsanitizer/LOCAL_PATCHES).

> 	PR sanitizer/108106
> 	* hwasan/hwasan_setjmp_x86_64.S (__interceptor_sigsetjmp): Add
> 	an internal alias, __interceptor_sigsetjmp_internal.
> ---
>  libsanitizer/hwasan/hwasan_setjmp_x86_64.S | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libsanitizer/hwasan/hwasan_setjmp_x86_64.S b/libsanitizer/hwasan/hwasan_setjmp_x86_64.S
> index 7566c1ea0a5..071dcdcf613 100644
> --- a/libsanitizer/hwasan/hwasan_setjmp_x86_64.S
> +++ b/libsanitizer/hwasan/hwasan_setjmp_x86_64.S
> @@ -37,13 +37,14 @@ __interceptor_setjmp:
>    CFI_STARTPROC
>    _CET_ENDBR
>    xorl %esi, %esi
> -  jmp	__interceptor_sigsetjmp
> +  jmp	__interceptor_sigsetjmp_internal
>    CFI_ENDPROC
>  ASM_SIZE(__interceptor_setjmp)
>  
>  .global __interceptor_sigsetjmp
>  ASM_TYPE_FUNCTION(__interceptor_sigsetjmp)
>  __interceptor_sigsetjmp:
> +__interceptor_sigsetjmp_internal:
>    CFI_STARTPROC
>    _CET_ENDBR
>  

	Jakub


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-31  9:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-16 21:31 [PATCH] libsanitizer: Add __interceptor_sigsetjmp_internal H.J. Lu
2023-01-31  9:09 ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).