This is the mail archive of the libc-alpha@sources.redhat.com 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: [anton@samba.org: [PATCH]: Bug in ppc32 ld.so]


 
> > the kernel does not have to icache synchronise a zero filled page
> > when handing it out to a process,
> 
> Yes, it does.  To not do this violates process isolation.  What if
> there was sensitive information embedded in the code in the old page
> (eg. encryption keys that have been compiled into a program)?

Ignore that bit, we are icache syncronising zero filled pages in the
kernel. What I am arguing is that we also need to do the full dcbst...icbi
sequence in ld.so, do you agree?

> > -  MODIFIED_CODE_NOQUEUE (reloc_addr);
> > +  MODIFIED_CODE (reloc_addr);
> 
> The existing code is correct.  In fact, it's not necessary to use any
> MODIFIED_CODE macro here, its use is an optimisation.
> 
> I can even claim that adding an isync will not provide any performance
> benefit on any existing processor in any situation, because no
> existing processor has enough instruction lookahead to get to the PLT
> entry from before the invalidation.  In addition, if such a processor
> did exist, an isync would be so expensive (it would have to cost about
> 20 instructions at the minimum) that the rare cases in which it would
> help would be hugely outweighed by the cases in which it was an
> unnecessary expense.

OK you can kill that bit of the patch. It didnt occur to me that we can
do the relocation twice without a problem.

Anton


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