NetBSD-Bugs archive

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

Re: kern/44582: 5.1's /sbin/sysctl fails to understand time_t and bool on current kernels



The following reply was made to PR kern/44582; it has been noted by GNATS.

From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: coypu%sdf.org@localhost
Cc: gnats-bugs%NetBSD.org@localhost
Subject: Re: kern/44582: 5.1's /sbin/sysctl fails to understand time_t and bool on current kernels
Date: Mon, 26 Nov 2018 11:05:41 +0700

     Date:        Sun, 25 Nov 2018 18:23:52 +0000
     From:        coypu%sdf.org@localhost
     Message-ID:  <20181125182352.GA9714%SDF.ORG@localhost>
 
   | FOr the boottime we have kre's reply:
 
 Note...
 
   |   | hmmm... feels like KERN_BOOTTIMESPEC should be added instead,
   |   | and the compat restored for this old API.
 
 That was about the API.   That one is a problem (or could be, this is
 probably not a big enough issue to be too worried about), whereas this
 PR is about the ABI.
 
 The intent was that should just work, there is still the old (32 bit) timeval
 sysctl with the same OID, which (for most apps) would (or should)
 just work (ie: a -5 or earlier binary with a newer kernel should get a
 timeval with a 32 bit time_t in it.)
 
 I suspect the issue with sysctl is that it is looking up the name kern.boottime
 (etc) and with a new kernel, that is returning the new version of that node,
 and not kern.obootime (the compat version) - but I don't know enough about
 how that is done to have any idea how it could be fixed.   Maybe the
 sysctl interface itself needs to be versioned whenever one of the nodes is,
 and the old version do lookups in the compat tree, or translate OIDs of
 new nodes into the compat versions, or something.
 
 This looks to be messy and very hard.
 
 kre
 
 


Home | Main Index | Thread Index | Old Index