FW: LD_PRELOAD checker for clock_gettime and consorts
norbert.lange at andritz.com
Fri Jan 11 10:51:11 CET 2019
> -----Original Message-----
> From: Jan Kiszka <jan.kiszka at siemens.com>
> Sent: Freitag, 11. Jänner 2019 03:26
> To: Lange Norbert <norbert.lange at andritz.com>; Xenomai
> (xenomai at xenomai.org) <xenomai at xenomai.org>
> Subject: Re: FW: LD_PRELOAD checker for clock_gettime and consorts
> E-MAIL FROM A NON-ANDRITZ SOURCE: AS A SECURITY MEASURE, PLEASE
> EXERCISE CAUTION WITH E-MAIL CONTENT AND ANY LINKS OR
> On 11.01.19 02:14, Lange Norbert via Xenomai wrote:
> > And heres a checker for malloc/free and consorts. This one is a bit trickier
> and I have barely tested it.
> Looks useful, thanks for sharing!
> In order to make it more easily accessible to users, we could provide it as
> "libcobalt-modecheck.so" or so in-tree and descibe its usage.
> I think, rather than the gcc-dependent open-coded solution, pthread_once
> should address your needs to initialize pointers and state on first invocation.
What if pthread_once calls the overridden functions? I haven’t fully understood
the order the linker calls into DSO startups, but a library thing like pthread_once
would make this harder and more fragile.
I have to work around libdl and libc DSO startup and its transitive calls, AFAIK
pthread_once will go live a lot later so not solve anything.
If anything, then rtld-audit could probably be used, but that would be highly dependent
Also, what gcc-dependent part is troublesome to you?
The only *functional required* thing would be the barrier
__asm__ __volatile__("" ::: "memory")
and that’s primary because you don’t have any standardized
way of doing that before C11.
> What would also be good is to have a couple of tests for it that stress the
> basic and also non-trival cases the tool should catch.
Indeed, ist only a matter of time allocation =)
This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system.
ANDRITZ HYDRO GmbH
Rechtsform/ Legal form: Gesellschaft mit beschränkter Haftung / Corporation
Firmensitz/ Registered seat: Wien
Firmenbuchgericht/ Court of registry: Handelsgericht Wien
Firmenbuchnummer/ Company registration: FN 61833 g
More information about the Xenomai