This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] explicit_bzero final


On 12/16/2016 12:31 AM, Zack Weinberg wrote:
+/* This is the generic definition of __explicit_bzero_chk.  The
+   __explicit_bzero_chk symbol is used as the implementation of
+   explicit_bzero throughout glibc.  If this file is overriden by an
+   architecture, both __explicit_bzero_chk and
+   __explicit_bzero_chk_internal have to be defined (the latter not as
+   an IFUNC).  */

This file is not in sysdeps/generic, so it cannot be overridden (or is
that no longer the case? If so, why do we still have sysdeps/generic?)
and I don't think we need the capability to override it.  Better we
should get libc-internal references to memset going to the proper ifunc
for the architecture.
It can be overridden, and it has to be, otherwise you end up with
multiple definitions of the same symbol when linking libc.so.
??? Your patch doesn't have any overrides of it.

I meant it has to be overridden if you want to introduce architecture-specific implementations of explicit_bzero. The patch doesn't contain any, but should be compatible with future development.

Due the transitive nature of IFUNCs and the desire to avoid indirect calls, all memset/__memset_chk variants need an explicit_bzero/__explicit_bzero_chk wrapper, so this is quite involved.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]