[rescue] Help with SunFire V240 Server

Cory Smelosky b4 at gewt.net
Sun Apr 7 12:35:20 CDT 2013

On 04/07/2013 12:49 PM, Peter Corlett wrote:
> On Sun, Apr 07, 2013 at 11:34:05AM -0400, Carl R. Friend wrote:
> [...]
>> On signed arithmetic for logical-block addressing -- WHY? The cynic in me
>> leans towards laziness or lack of attention to detail. Surely a negative
>> block would lead to either a seek-to-spindle event or an unload (depending on
>> where cylinder 0 is). Why not use the whole width of the word to express an
>> absolute offset and be done with? You get twice as many blocks by not wasting
>> the sign bit.
> It's not always obvious from API documentation whether a field is signed or
> unsigned, and signed values will often get shoved into an int, whether by
> accident, laziness, or a feature/bug in one's language. So it's defensive
> design to treat unsigned values with a MSB of 1 as an error.
> You'll see this pattern all over the place. For example, userspace pointers in
> x86_64 operating systems are always positive when cast to int64_t. Java doesn't
> allow unsigned integers at all to avoid just this problem.

x86_64 operating systems aren't exactly an example of "everything on 
this architecture is done right." ;)

> _______________________________________________
> rescue list - http://www.sunhelp.org/mailman/listinfo/rescue

Cory Smelosky
http://gewt.net Personal stuff
http://gimme-sympathy.org Experiments

More information about the rescue mailing list