Source-Changes-D archive

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

Re: CVS commit: src/sys/arch/amd64/conf



Le 03/08/2017 à 23:32, coypu%sdf.org@localhost a écrit :
On Fri, Jul 28, 2017 at 04:10:29PM +0000, Maxime Villard wrote:
Module Name:	src
Committed By:	maxv
Date:		Fri Jul 28 16:10:29 UTC 2017

Modified Files:
	src/sys/arch/amd64/conf: GENERIC XEN3_DOM0 XEN3_DOMU

Log Message:
After a careful review, and all things considered, disable compat43 by
default on amd64. The use case is limited, the potential for damage too
high, and it is safer to run a BSD4.3 binary on i386 since the kernel does
not have to go through netbsd32 - which may not correctly reproduce i386.


To generate a diff of this commit:
cvs rdiff -u -r1.461 -r1.462 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.136 -r1.137 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/amd64/conf/XEN3_DOMU

This breaks running compat_linux as a kernel module:

Aug  4 00:19:19 loggy /netbsd: kobj_checksyms, 974: [compat_linux]: linker error: symbol `compat_43_sys_sethostname' not found
Aug  4 00:19:19 loggy /netbsd: kobj_checksyms, 974: [compat_linux]: linker error: symbol `compat_43_sys_lseek' not found
Aug  4 00:19:19 loggy /netbsd: WARNING: module error: unable to affix module `compat_linux', error 8

I believe paulg made PR kern/51597 for similar issues

Yes, I saw that too a few days later when moving the compat_freebsd files and
trying to do a modload. I went "what the hell is this", but didn't do anything.

What I could see, is that many of our compat options are at some point using
at least one compat_43_* function, even if they have nothing to do with 4.3BSD.

It appears that people just chose to use them, because they were convenient,
instead of re-writing them on purpose. The assumption was that the compat_43
functions would always be there; that's obviously a wrong assumption.

As a quick fix, I can revert my change. But that does not fix this mess; we
would have to either rename compat_43_* to compat_common_* and compile them by
default (ie, without depending on an #ifdef COMPAT_43), or we would have to
implement the functions in all of the compat options with proper names (eg
compat_43_sys_lseek -> freebsd_sys_lseek).

Frankly, this is a huge mess.

Maxime


Home | Main Index | Thread Index | Old Index