tech-kern archive

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

Re: Time to merge the pgoyette-compat branch



Well, there's been a lot of work since the last time I thought I was
ready for the merge.  Most importantly, a MP-safe mechanism was built
to prevent modules from being unloaded while their code was being
executed (or, perhaps, about-to-be-executed).  (A very big Thanks! to
riastradh@ for the suggestion, and for template code.)  Additionally,
all of the compat_netbsd32 machine-dependent code has been split out
from the main compat_netbsd32 module and into the version-specific
modules.

The file src/doc/TODO.compat-branch documents these and other work
done on the branch.

Once again, I'm (just about) ready for the big merge/commit, with just
some last-minute testing.  Any timely and constructive feedback will
be greatly appreciated and welcomed.

Assuming there aren't any show-stopper issues brought up during review,
I'd like to plan to commit in a couple of weeks.

Thanks in advance!




On Fri, 7 Sep 2018, Paul Goyette wrote:

Folks,

After several months of work, it's now (nearly) time to merge the
pgoyette-compat branch.  (Yeah, I know that many/most of you don't
"allow" modules into your environments in the first place, so none
of this really affects you at all.)


This branch includes the following major changes:

* Separation of the single "monolithic" compat module into multiple
 modules, one for each older version of NetBSD.

 With this, you can load only as much compat code as you want, without
 having to build a custom compat module.  (You still need a custom
 kernel to start with, in order not to have all the compat code being
 built-in.)  Sys-calls that are implemented in the compat module will
 now load only the necessary compat code, rather than the entire
 monolithic module.

* Introduction of module "aliases".  In addition to its own name, a
 module can now provide alias names.  This is useful for the
 monolithic compat module, which now contains the functionality of
 the many version-specific modules.  If you load the monolithic module,
 its aliases will prevent you from also loading individual-version
 compat modules.

* Elimination of the limit on the number of "required" modules (or
 "dependencies") for a module.  There was previously a limit of
 MAXMODDEPS (value 10), with a statically-allocated array;  now the
 array is dynamically allocated and expanded as needed.

* Extraction of some COMPAT_xx code that was previously intertwined
 with the main kernel build and not available in non-built-in modules.
 One example of this is the COMPAT_70 code for rtsock (which bit me
 when it was introduced, and was the main reason for undertaking the
 work on this branch).

* Removed linking of the .o kernel compat library into all kernels.
 This caused problems, since the library included lots of compat
 symbols, but did not include module linkage; attempts to subsequently
 load some modules would fail due to multiply-defined symbols.

* Reverting of some previous intentionally-introduced breakage in the
 sysv_ipc module.  (The breakage was introduced to work-around the
 above compat library issue.)

Other activity is documented in src/doc/COMPAT-branch-notes file.

There are a number of activities that still need to be worked on;  these
are also listed in the src/doc/COMPAT-branch-notes file.  None of these
activites should prevent merging of the branch, as the short-comings are
already present on the mainline.

I welcome any timely review and constructive feedback.  I'd like to get
this committed sometime in the next two or three weeks if possible.


+------------------+--------------------------+----------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+


+------------------+--------------------------+----------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+


Home | Main Index | Thread Index | Old Index