Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150407182422.GJ6817@brightrain.aerifal.cx>
Date: Tue, 7 Apr 2015 14:24:22 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] MIPS big endian and *stat syscalls return value

On Tue, Apr 07, 2015 at 09:18:33PM +0300, Eugene Yudin wrote:
> Thanks for a quick response!
> 
> On Tue, Apr 7, 2015 at 5:34 PM, Rich Felker <dalias@...c.org> wrote:
> 
> > I'm
> > guessing you need -O0 to trigger it, no?
> 
> 
> I'm experience problem with optimization for size (-Os).
> It's look like behaviour was changed in later GCC (at least from 4.8.3).
> I will test another optimization levels.

OK. In any case I committed the fix. Thanks for catching this!

> > > i wonder if __stat_fix could be inlined in a way that the
> > > compiler knows it shouldnt clobber r2.
> >
> > In practice it always is, at least for me. But relying on that for
> > semantic purposes is not valid.
> 
> I read that in linux kernel are used attribute "always_inline" for critical
> parts.

Yes, and that's an ugly/broken hack. If the code is semantically wrong
(i.e. if the old code doesn't formally preclude clobbering) then it
needs to be fixed, not painted over with forced inlining.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.