All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Arm32: memset() & friends
@ 2022-08-19  7:48 Jan Beulich
  2022-08-19  7:49 ` [PATCH 1/2] Arm32: correct string.h functions for "int" -> "unsigned char" conversion Jan Beulich
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Jan Beulich @ 2022-08-19  7:48 UTC (permalink / raw)
  To: xen-devel
  Cc: Julien Grall, Stefano Stabellini, Volodymyr Babchuk, Bertrand Marquis

Note that while the original Linux code has the same issue, I don't
really fancy sending there a patch similar to patch 1. That's because
my XSA-307 related "make find_next_{,zero_}bit() have well defined
behavior" was entirely ignored, so I would expect nothing better here.

1: correct string.h functions for "int" -> "unsigned char" conversion
2: tidy the memset() macro

Really I happened to be looking at the memset() macro, being a little
surprised of the special casing of 0 there. As a result I was curious to
see how much more efficient __memzero() really was compared to memset().
The first thing which actually caught my attention is that part of
__memzero()'s code lives outside of the function (i.e. ahead of
ENTRY()). This saves a branch (and interestingly memset() does _not_ do
the same), but (a) renders the ELF symbol table somewhat wrong and (b)
leaves debug info generated with gas 2.39 not covering the entire
function in the new subprogram DIE that it generates (line number info
and .debug_ranges are correct nevertheless).

Jan


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

end of thread, other threads:[~2022-08-25 14:36 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-19  7:48 [PATCH 0/2] Arm32: memset() & friends Jan Beulich
2022-08-19  7:49 ` [PATCH 1/2] Arm32: correct string.h functions for "int" -> "unsigned char" conversion Jan Beulich
2022-08-19  8:28   ` Julien Grall
2022-08-19  7:50 ` [PATCH 2/2] Arm32: tidy the memset() macro Jan Beulich
2022-08-19  7:58   ` Julien Grall
2022-08-19  8:02     ` Jan Beulich
2022-08-19  8:06       ` Julien Grall
2022-08-19  8:11         ` Jan Beulich
2022-08-19  8:24           ` Julien Grall
2022-08-19  8:31             ` Jan Beulich
2022-08-19  8:33               ` Julien Grall
2022-08-19  7:59   ` Wei Chen
2022-08-19  8:04     ` Jan Beulich
2022-08-19  9:41       ` Wei Chen
2022-08-19 12:39         ` Jan Beulich
2022-08-19  8:32 ` [PATCH 0/2] Arm32: memset() & friends Julien Grall
2022-08-19  8:41   ` Jan Beulich
2022-08-24 12:33 ` [PATCH v2] Arm32: correct string.h functions for "int" -> "unsigned char" conversion Jan Beulich
2022-08-24 12:44   ` Bertrand Marquis
2022-08-25 14:31     ` Julien Grall
2022-08-25 14:34       ` Jan Beulich
2022-08-25 14:36         ` Julien Grall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.