This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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][MIPS] Add linker emulation for N64 ABI with forced 32-bit symbols


On Thu, 15 Nov 2012, Richard Sandiford wrote:

> > The interesting case is where a program executes without immediately
> > crashing, but because it uses 32-bit addresses it does some wrong things
> > -- writing wrong data into a database, or things like that.  So this
> > isn't a case of lecturing, it's a security improvement.
> 
> People who want that can still ask for it, just as people who want
> address santisation, stack protection, PIEs, etc., can ask for
> those features.
> 
> x86_64, PPC64 and s390x all use 32-bit start addresses by default.
> I think the security implications would be the same across all
> 4 architectures.

 Alpha does not though, even though it does not have 32-bit legacy.  I've 
checked and SPARC64 is another example, as are some others, perhaps more 
obscure.  I don't know what drove x86_64, PPC64 or s390x port designers, 
or whether they considered such an arrangement at all in the first place.  
I do know what drove the Alpha port designers, although regrettably after 
so many years I cannot readily find the original reference anymore.

 Overall I think both ways have some advantages and some disadvantages.  
My personal view is the gain from avoiding the two new linker script 
templates and the resulting handful of extra final linker scripts is 
negligible compared to the loss of the extra safety check.

 And 15+ years on since the Alpha/Linux port was done (never mind 20+ 
years since the R4000) I wish I could say all the currently used software 
has been made 64-bit-clean, although the overall quality is certainly much 
better than when I started my 64-bit experience back then.  I don't 
remember when I last saw the check trigger, so perhaps its importance is 
not as high as it used to be.

 But of course one can say exactly the opposite to what you suggest: 
people who want to get rid of this extra safety check are free to cook up 
their own linker scripts.

  Maciej


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