tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

RE: setsockopt() compat issue



It should be noted that in the man page for setsockopt() and getsockopt()
the option value said to be an "int", and does not specify a particular size
of said int.  If on the Alpha platform the default size of an "int" is
64bits then (in my opinion) the functions should accept that platform's
default integer size.  Any size of integer for this task should be fine for
that matter.

Bryce Simonds

-----Original Message-----
From: tech-kern-owner%NetBSD.org@localhost 
[mailto:tech-kern-owner%NetBSD.org@localhost] On
Behalf Of Robert Elz
Sent: Thursday, October 16, 2008 3:40 PM
To: Manuel Bouyer
Cc: Christos Zoulas; tech-kern%NetBSD.org@localhost
Subject: Re: setsockopt() compat issue 

    Date:        Thu, 16 Oct 2008 21:52:37 +0200
    From:        Manuel Bouyer <bouyer%antioche.eu.org@localhost>
    Message-ID:  <20081016195237.GA2935%antioche.eu.org@localhost>

  | Well, maybe we should then. If we're claiming backward compatibility, we
  | should also be bug-compatible, or a software that did run, may not run
any
  | more ...

I'd say it depends upon the nature of the bug that was fixed (or is
being exploited in the old cade).

If its the kind of thing where the behaviour was simply undefined (like
for example, assuming that *0 == 0 which some old cade did), then simply
trash it - "undefined" includes "might not work he same way tomorrow",
so if the program was incorrectly using something (setcockopt in this
case I guess) in  a way that just happened to work by accident in older
systems, then tough luck, it works no more.

On the other hand, if the bug was "this is a broken interface, and cannot
possibly work in general, we have to change it" (regardless of how
correct that statement is) and the program in question was simply using
the old interface the way it had been defined to be used (either explicitly
or by common example) and it worked OK (well enough for the prpgram,
perhaps only on the architecture the program was running on), then
the old way should continue to be supported via a compat function.

kre
is running on, then


No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.173 / Virus Database: 270.8.1/1728 - Release Date: 10/16/2008
7:38 AM



Home | Main Index | Thread Index | Old Index