public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/nsz/mtag] malloc: Simplify __mtag_tag_new_usable
@ 2021-03-11 17:38 Szabolcs Nagy
0 siblings, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2021-03-11 17:38 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=474064c5d992d292aa6e6d535fc030a340d380e9
commit 474064c5d992d292aa6e6d535fc030a340d380e9
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Thu Feb 4 11:38:23 2021 +0000
malloc: Simplify __mtag_tag_new_usable
The chunk cannot be a dumped one here. The only non-obvious cases
are free and realloc which may be called on a dumped area chunk,
but in both cases it can be verified that tagging is already
avoided for dumped area chunks.
Reviewed-by: DJ Delorie <dj@redhat.com>
Diff:
---
malloc/arena.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/malloc/arena.c b/malloc/arena.c
index bf17be27d4..0777dc70c6 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -298,11 +298,6 @@ __mtag_tag_new_usable (void *ptr)
if (ptr)
{
mchunkptr cp = mem2chunk(ptr);
- /* This likely will never happen, but we can't handle retagging
- chunks from the dumped main arena. So just return the
- existing pointer. */
- if (DUMPED_MAIN_ARENA_CHUNK (cp))
- return ptr;
ptr = __libc_mtag_tag_region (__libc_mtag_new_tag (ptr),
CHUNK_AVAILABLE_SIZE (cp) - CHUNK_HDR_SZ);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [glibc/nsz/mtag] malloc: Simplify __mtag_tag_new_usable
@ 2021-03-19 11:57 Szabolcs Nagy
0 siblings, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2021-03-19 11:57 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=67c2661c42f047abb0863c95dd385eaa656bcb47
commit 67c2661c42f047abb0863c95dd385eaa656bcb47
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Thu Feb 4 11:38:23 2021 +0000
malloc: Simplify __mtag_tag_new_usable
The chunk cannot be a dumped one here. The only non-obvious cases
are free and realloc which may be called on a dumped area chunk,
but in both cases it can be verified that tagging is already
avoided for dumped area chunks.
Reviewed-by: DJ Delorie <dj@redhat.com>
Diff:
---
malloc/arena.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/malloc/arena.c b/malloc/arena.c
index bf17be27d4..0777dc70c6 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -298,11 +298,6 @@ __mtag_tag_new_usable (void *ptr)
if (ptr)
{
mchunkptr cp = mem2chunk(ptr);
- /* This likely will never happen, but we can't handle retagging
- chunks from the dumped main arena. So just return the
- existing pointer. */
- if (DUMPED_MAIN_ARENA_CHUNK (cp))
- return ptr;
ptr = __libc_mtag_tag_region (__libc_mtag_new_tag (ptr),
CHUNK_AVAILABLE_SIZE (cp) - CHUNK_HDR_SZ);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [glibc/nsz/mtag] malloc: Simplify __mtag_tag_new_usable
@ 2021-03-11 17:40 Szabolcs Nagy
0 siblings, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2021-03-11 17:40 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=474064c5d992d292aa6e6d535fc030a340d380e9
commit 474064c5d992d292aa6e6d535fc030a340d380e9
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Thu Feb 4 11:38:23 2021 +0000
malloc: Simplify __mtag_tag_new_usable
The chunk cannot be a dumped one here. The only non-obvious cases
are free and realloc which may be called on a dumped area chunk,
but in both cases it can be verified that tagging is already
avoided for dumped area chunks.
Reviewed-by: DJ Delorie <dj@redhat.com>
Diff:
---
malloc/arena.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/malloc/arena.c b/malloc/arena.c
index bf17be27d4..0777dc70c6 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -298,11 +298,6 @@ __mtag_tag_new_usable (void *ptr)
if (ptr)
{
mchunkptr cp = mem2chunk(ptr);
- /* This likely will never happen, but we can't handle retagging
- chunks from the dumped main arena. So just return the
- existing pointer. */
- if (DUMPED_MAIN_ARENA_CHUNK (cp))
- return ptr;
ptr = __libc_mtag_tag_region (__libc_mtag_new_tag (ptr),
CHUNK_AVAILABLE_SIZE (cp) - CHUNK_HDR_SZ);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [glibc/nsz/mtag] malloc: Simplify __mtag_tag_new_usable
@ 2021-03-04 16:25 Szabolcs Nagy
0 siblings, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2021-03-04 16:25 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=94bbedf7f5a7005d681999061f317baae91f4056
commit 94bbedf7f5a7005d681999061f317baae91f4056
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Thu Feb 4 11:38:23 2021 +0000
malloc: Simplify __mtag_tag_new_usable
The chunk cannot be a dumped one here. The only non-obvious cases
are free and realloc which may be called on a dumped area chunk,
but in both cases it can be verified that tagging is already
avoided for dumped area chunks.
Diff:
---
malloc/arena.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/malloc/arena.c b/malloc/arena.c
index bf17be27d4..0777dc70c6 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -298,11 +298,6 @@ __mtag_tag_new_usable (void *ptr)
if (ptr)
{
mchunkptr cp = mem2chunk(ptr);
- /* This likely will never happen, but we can't handle retagging
- chunks from the dumped main arena. So just return the
- existing pointer. */
- if (DUMPED_MAIN_ARENA_CHUNK (cp))
- return ptr;
ptr = __libc_mtag_tag_region (__libc_mtag_new_tag (ptr),
CHUNK_AVAILABLE_SIZE (cp) - CHUNK_HDR_SZ);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-19 11:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 17:38 [glibc/nsz/mtag] malloc: Simplify __mtag_tag_new_usable Szabolcs Nagy
-- strict thread matches above, loose matches on Subject: below --
2021-03-19 11:57 Szabolcs Nagy
2021-03-11 17:40 Szabolcs Nagy
2021-03-04 16:25 Szabolcs Nagy
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).