public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Revert: [AArch64] MTE corefile support
@ 2021-09-06 18:19 Luis Machado
  0 siblings, 0 replies; 4+ messages in thread
From: Luis Machado @ 2021-09-06 18:19 UTC (permalink / raw)
  To: Binutils, Nick Clifton

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

Hi,

I'd like to revert commit 894982bfccec66a1496785bbef4d46423345b8c8 for 
both master binutils-gdb and binutils 2.37.

The kernel developers would like to discuss the ABI further in lkml 
before making a decision about what the MTE corefile format will look like.

Given nobody is using these two constants yet (NT_MEMTAG and 
NT_MEMTAG_TYPE_AARCH_MTE), I think this won't be harmful.

GDB 11 hasn't released yet, and I plan to drop these constants from that 
branch as well.

OK?

[-- Attachment #2: nt_memtag.diff --]
[-- Type: text/x-patch, Size: 2494 bytes --]

Revert: [AArch64] MTE corefile support

    Revert commit 894982bfccec66a1496785bbef4d46423345b8c8.
    
    bfd     * elf.c (elfcore_make_memtag_note_section): New function.
	    (elfcore_grok_note): Handle NT_MEMTAG note types.
    
    binutils* readelf.c (get_note_type): Handle NT_MEMTAG note types.
    
    include * elf/common.h (NT_MEMTAG): New constant.
	    (NT_MEMTAG_TYPE_AARCH_MTE): New constant.

diff --git a/bfd/elf.c b/bfd/elf.c
index 9c3f34c415b..7a722841acf 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -9599,23 +9599,6 @@ elfcore_make_auxv_note_section (bfd *abfd, Elf_Internal_Note *note,
   return true;
 }
 
-static bool
-elfcore_make_memtag_note_section (bfd *abfd, Elf_Internal_Note *note,
-				  size_t offs)
-{
-  asection *sect = bfd_make_section_anyway_with_flags (abfd, ".memtag",
-						       SEC_HAS_CONTENTS);
-
-  if (sect == NULL)
-    return false;
-
-  sect->size = note->descsz - offs;
-  sect->filepos = note->descpos + offs;
-  sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32;
-
-  return true;
-}
-
 /* prstatus_t exists on:
      solaris 2.5+
      linux 2.[01] + glibc
@@ -10676,8 +10659,6 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
       return elfcore_make_note_pseudosection (abfd, ".note.linuxcore.siginfo",
 					      note);
 
-    case NT_MEMTAG:
-      return elfcore_make_memtag_note_section (abfd, note, 0);
     }
 }
 
diff --git a/binutils/readelf.c b/binutils/readelf.c
index a6073f7ec80..af10bcd0e17 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -18843,8 +18843,6 @@ get_note_type (Filedata * filedata, unsigned e_type)
 	return _("NT_SIGINFO (siginfo_t data)");
       case NT_FILE:
 	return _("NT_FILE (mapped files)");
-      case NT_MEMTAG:
-	return _("NT_MEMTAG (memory tags)");
       default:
 	break;
       }
diff --git a/include/elf/common.h b/include/elf/common.h
index 0cca28673dd..7eefef9c7c4 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -685,12 +685,6 @@
 /* The range 0xff000000 to 0xffffffff is set aside for notes that don't
    originate from any particular operating system.  */
 #define NT_GDB_TDESC	0xff000000	/* Contains copy of GDB's target description XML.  */
-#define NT_MEMTAG	0xff000001	/* Contains a copy of the memory tags.  */
-
-/* NT_MEMTAG record types.  */
-
-/* ARM-specific NT_MEMTAG types.  */
-#define NT_MEMTAG_TYPE_AARCH_MTE  0x400	/* MTE memory tags for AArch64.  */
 
 /* Note segments for core files on dir-style procfs systems.  */
 

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

* Re: Revert: [AArch64] MTE corefile support
  2021-09-07  8:37 ` Nick Clifton
@ 2021-09-07 14:09   ` Luis Machado
  0 siblings, 0 replies; 4+ messages in thread
From: Luis Machado @ 2021-09-07 14:09 UTC (permalink / raw)
  To: Nick Clifton, Binutils

On 9/7/21 5:37 AM, Nick Clifton wrote:
> Hi Luis,
> 
>> I'd like to revert commit 894982bfccec66a1496785bbef4d46423345b8c8 for 
>> both master binutils-gdb and binutils 2.37.
> 
> Sure - go ahead.
> 
> Cheers
>    Nick
> 

Thanks Nick. Reverted now for both 2.37 and master.

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

* Re: Revert: [AArch64] MTE corefile support
  2021-09-06 18:19 Luis Machado
@ 2021-09-07  8:37 ` Nick Clifton
  2021-09-07 14:09   ` Luis Machado
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Clifton @ 2021-09-07  8:37 UTC (permalink / raw)
  To: Luis Machado, Binutils

Hi Luis,

> I'd like to revert commit 894982bfccec66a1496785bbef4d46423345b8c8 for both master binutils-gdb and binutils 2.37.

Sure - go ahead.

Cheers
   Nick


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

* Revert: [AArch64] MTE corefile support
@ 2021-09-06 18:19 Luis Machado
  2021-09-07  8:37 ` Nick Clifton
  0 siblings, 1 reply; 4+ messages in thread
From: Luis Machado @ 2021-09-06 18:19 UTC (permalink / raw)
  To: Binutils, Nick Clifton

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

Hi,

I'd like to revert commit 894982bfccec66a1496785bbef4d46423345b8c8 for 
both master binutils-gdb and binutils 2.37.

The kernel developers would like to discuss the ABI further in lkml 
before making a decision about what the MTE corefile format will look like.

Given nobody is using these two constants yet (NT_MEMTAG and 
NT_MEMTAG_TYPE_AARCH_MTE), I think this won't be harmful.

GDB 11 hasn't released yet, and I plan to drop these constants from that 
branch as well.

OK?

[-- Attachment #2: nt_memtag.diff --]
[-- Type: text/x-patch, Size: 2494 bytes --]

Revert: [AArch64] MTE corefile support

    Revert commit 894982bfccec66a1496785bbef4d46423345b8c8.
    
    bfd     * elf.c (elfcore_make_memtag_note_section): New function.
	    (elfcore_grok_note): Handle NT_MEMTAG note types.
    
    binutils* readelf.c (get_note_type): Handle NT_MEMTAG note types.
    
    include * elf/common.h (NT_MEMTAG): New constant.
	    (NT_MEMTAG_TYPE_AARCH_MTE): New constant.

diff --git a/bfd/elf.c b/bfd/elf.c
index 9c3f34c415b..7a722841acf 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -9599,23 +9599,6 @@ elfcore_make_auxv_note_section (bfd *abfd, Elf_Internal_Note *note,
   return true;
 }
 
-static bool
-elfcore_make_memtag_note_section (bfd *abfd, Elf_Internal_Note *note,
-				  size_t offs)
-{
-  asection *sect = bfd_make_section_anyway_with_flags (abfd, ".memtag",
-						       SEC_HAS_CONTENTS);
-
-  if (sect == NULL)
-    return false;
-
-  sect->size = note->descsz - offs;
-  sect->filepos = note->descpos + offs;
-  sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32;
-
-  return true;
-}
-
 /* prstatus_t exists on:
      solaris 2.5+
      linux 2.[01] + glibc
@@ -10676,8 +10659,6 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
       return elfcore_make_note_pseudosection (abfd, ".note.linuxcore.siginfo",
 					      note);
 
-    case NT_MEMTAG:
-      return elfcore_make_memtag_note_section (abfd, note, 0);
     }
 }
 
diff --git a/binutils/readelf.c b/binutils/readelf.c
index a6073f7ec80..af10bcd0e17 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -18843,8 +18843,6 @@ get_note_type (Filedata * filedata, unsigned e_type)
 	return _("NT_SIGINFO (siginfo_t data)");
       case NT_FILE:
 	return _("NT_FILE (mapped files)");
-      case NT_MEMTAG:
-	return _("NT_MEMTAG (memory tags)");
       default:
 	break;
       }
diff --git a/include/elf/common.h b/include/elf/common.h
index 0cca28673dd..7eefef9c7c4 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -685,12 +685,6 @@
 /* The range 0xff000000 to 0xffffffff is set aside for notes that don't
    originate from any particular operating system.  */
 #define NT_GDB_TDESC	0xff000000	/* Contains copy of GDB's target description XML.  */
-#define NT_MEMTAG	0xff000001	/* Contains a copy of the memory tags.  */
-
-/* NT_MEMTAG record types.  */
-
-/* ARM-specific NT_MEMTAG types.  */
-#define NT_MEMTAG_TYPE_AARCH_MTE  0x400	/* MTE memory tags for AArch64.  */
 
 /* Note segments for core files on dir-style procfs systems.  */
 

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

end of thread, other threads:[~2021-09-07 14:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06 18:19 Revert: [AArch64] MTE corefile support Luis Machado
2021-09-06 18:19 Luis Machado
2021-09-07  8:37 ` Nick Clifton
2021-09-07 14:09   ` Luis Machado

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).