NetBSD-Bugs archive

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

Re: kern/55958: pciback.hide parsing error



On Tue, Jan 26, 2021 at 06:36:26PM -0800, Aleksey Arens wrote:
> I wonder if the following solution may be acceptable.  Since the
> change implies a difference in ABI, would it be possible to schedule
> it for a next major release (for instance, release 10)?  I also
> wonder, if the change could go into -current at this point; as I
> understand, -current is not expected to maintain strict binary
> compatibility.
> 
> I suppose that the proper approach to adding this might involve adding
> #ifdef-s that checks for COMPAT_XX options.  Though, I think that a
> more proper implementation would be to check at runtime for the module
> version, and decide upon what buffer length for parameter passing
> could be used accordingly.  I could work this code out, in principle;
> I would appreciate a suggestion on what would be the best, most
> compatible with the tradition, way to handle the hard-coded constant
> in the header file.

We must be able to boot a new kernel with an older /boot (this is a requirement
for upgrade anyway), so some compat mechanism at the boot structure 
level is neeed.

And actually it's easy: leave bi_modulelist alone, and define a
btinfo_modulelist2, associated with a BTINFO_MODULELIST2
Have the boot loader fill both, and the kernel check first BTINFO_MODULELIST2
and then BTINFO_MODULELIST. This way you can boot an old kernel with
newer /boot, or the opposite.
While there, put path[] at the end of bi_modulelist_entry2, so it can
be arbitrary long.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index