CVS commit: src/tests/rump/modautoload
Module Name:src Committed By: christos Date: Tue May 26 18:52:29 UTC 2020 Modified Files: src/tests/rump/modautoload: Makefile Log Message: Fix alpha build (relocation truncated to fit: GPREL16 against symbol ...) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47230 To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/tests/rump/modautoload/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/modautoload/Makefile diff -u src/tests/rump/modautoload/Makefile:1.11 src/tests/rump/modautoload/Makefile:1.12 --- src/tests/rump/modautoload/Makefile:1.11 Sat May 16 08:54:27 2020 +++ src/tests/rump/modautoload/Makefile Tue May 26 14:52:29 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2020/05/16 12:54:27 christos Exp $ +# $NetBSD: Makefile,v 1.12 2020/05/26 18:52:29 christos Exp $ # .include @@ -14,6 +14,9 @@ SRCS.t_modautoload+= t_modautoload.c # on amd64. This is the reason we keep this test in its own # subdirectory -- otherwise the LDADD lines would get a little hairy. LDFLAGS+= -Wl,-E +.if ${MACHINE} == "alpha" +LDFLAGS+= -Wl,--no-relax +.endif LDADD+= \ -Wl,--whole-archive -Wl,-Bstatic \ -lrumpvfs_nofifofs -lrumpvfs -lrump \
CVS commit: src/tests/rump/modautoload
Module Name:src Committed By: christos Date: Sat May 16 12:54:27 UTC 2020 Modified Files: src/tests/rump/modautoload: Makefile Log Message: Do the same thing with linker flags instead of directly specifying the archives. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/rump/modautoload/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/modautoload/Makefile diff -u src/tests/rump/modautoload/Makefile:1.10 src/tests/rump/modautoload/Makefile:1.11 --- src/tests/rump/modautoload/Makefile:1.10 Sat May 16 08:44:42 2020 +++ src/tests/rump/modautoload/Makefile Sat May 16 08:54:27 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2020/05/16 12:44:42 christos Exp $ +# $NetBSD: Makefile,v 1.11 2020/05/16 12:54:27 christos Exp $ # .include @@ -15,11 +15,9 @@ SRCS.t_modautoload+= t_modautoload.c # subdirectory -- otherwise the LDADD lines would get a little hairy. LDFLAGS+= -Wl,-E LDADD+= \ --Wl,--whole-archive \ -${DESTDIR}/usr/lib/librumpvfs_nofifofs.a \ -${DESTDIR}/usr/lib/librumpvfs.a \ -${DESTDIR}/usr/lib/librump.a \ --Wl,--no-whole-archive +-Wl,--whole-archive -Wl,-Bstatic \ + -lrumpvfs_nofifofs -lrumpvfs -lrump \ +-Wl,-Bdynamic -Wl,--no-whole-archive LDADD+= -lrumpuser -lpthread DPADD+= ${LIBRUMPVFS} ${LIBRUMP} ${LIBRUMPUSER}
CVS commit: src/tests/rump/modautoload
Module Name:src Committed By: christos Date: Sat May 16 12:44:42 UTC 2020 Modified Files: src/tests/rump/modautoload: Makefile Log Message: more nofifofs To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/tests/rump/modautoload/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/modautoload/Makefile diff -u src/tests/rump/modautoload/Makefile:1.9 src/tests/rump/modautoload/Makefile:1.10 --- src/tests/rump/modautoload/Makefile:1.9 Sat Aug 17 00:04:28 2019 +++ src/tests/rump/modautoload/Makefile Sat May 16 08:44:42 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2019/08/17 04:04:28 kamil Exp $ +# $NetBSD: Makefile,v 1.10 2020/05/16 12:44:42 christos Exp $ # .include @@ -14,9 +14,13 @@ SRCS.t_modautoload+= t_modautoload.c # on amd64. This is the reason we keep this test in its own # subdirectory -- otherwise the LDADD lines would get a little hairy. LDFLAGS+= -Wl,-E -LDADD+= -Wl,--whole-archive ${DESTDIR}/usr/lib/librumpvfs.a \ - ${DESTDIR}/usr/lib/librump.a \ - -Wl,--no-whole-archive +LDADD+= \ +-Wl,--whole-archive \ +${DESTDIR}/usr/lib/librumpvfs_nofifofs.a \ +${DESTDIR}/usr/lib/librumpvfs.a \ +${DESTDIR}/usr/lib/librump.a \ +-Wl,--no-whole-archive + LDADD+= -lrumpuser -lpthread DPADD+= ${LIBRUMPVFS} ${LIBRUMP} ${LIBRUMPUSER}
CVS commit: src/tests/rump/modautoload
Module Name:src Committed By: christos Date: Fri Oct 14 16:02:35 UTC 2016 Modified Files: src/tests/rump/modautoload: Makefile Log Message: Disable aslr too since we are playing address space range tricks. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/rump/modautoload/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/modautoload/Makefile diff -u src/tests/rump/modautoload/Makefile:1.7 src/tests/rump/modautoload/Makefile:1.8 --- src/tests/rump/modautoload/Makefile:1.7 Sat Sep 10 07:04:24 2016 +++ src/tests/rump/modautoload/Makefile Fri Oct 14 12:02:35 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2016/09/10 11:04:24 christos Exp $ +# $NetBSD: Makefile,v 1.8 2016/10/14 16:02:35 christos Exp $ # .include @@ -6,7 +6,7 @@ TESTSDIR= ${TESTSBASE}/rump/modautoload TESTS_C= t_modautoload -PAXCTL_FLAGS= +m +PAXCTL_FLAGS= +ma SRCS.t_modautoload+= t_modautoload.c
CVS commit: src/tests/rump/modautoload
Module Name:src Committed By: ozaki-r Date: Wed Sep 14 03:19:11 UTC 2016 Modified Files: src/tests/rump/modautoload: t_modautoload.c Log Message: Fill old_len which is required by sysctlbyname To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/rump/modautoload/t_modautoload.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/modautoload/t_modautoload.c diff -u src/tests/rump/modautoload/t_modautoload.c:1.4 src/tests/rump/modautoload/t_modautoload.c:1.5 --- src/tests/rump/modautoload/t_modautoload.c:1.4 Sun Dec 27 08:21:44 2015 +++ src/tests/rump/modautoload/t_modautoload.c Wed Sep 14 03:19:11 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: t_modautoload.c,v 1.4 2015/12/27 08:21:44 pgoyette Exp $ */ +/* $NetBSD: t_modautoload.c,v 1.5 2016/09/14 03:19:11 ozaki-r Exp $ */ #include #include @@ -46,6 +46,7 @@ mountkernfs(void) atf_tc_fail_errno("mkdir /kern"); new_autoload = true; + old_len = sizeof(old_autoload); new_len = sizeof(new_autoload); error = sysctlbyname("kern.module.autoload", _autoload, _len,
CVS commit: src/tests/rump/modautoload
Module Name:src Committed By: christos Date: Sat Sep 10 11:04:24 UTC 2016 Modified Files: src/tests/rump/modautoload: Makefile Log Message: need bsd.init.mk To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/rump/modautoload/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/modautoload/Makefile diff -u src/tests/rump/modautoload/Makefile:1.6 src/tests/rump/modautoload/Makefile:1.7 --- src/tests/rump/modautoload/Makefile:1.6 Sat Aug 27 10:23:54 2016 +++ src/tests/rump/modautoload/Makefile Sat Sep 10 07:04:24 2016 @@ -1,6 +1,8 @@ -# $NetBSD: Makefile,v 1.6 2016/08/27 14:23:54 christos Exp $ +# $NetBSD: Makefile,v 1.7 2016/09/10 11:04:24 christos Exp $ # +.include + TESTSDIR= ${TESTSBASE}/rump/modautoload TESTS_C= t_modautoload
CVS commit: src/tests/rump/modautoload
Module Name:src Committed By: christos Date: Sat Aug 27 14:23:54 UTC 2016 Modified Files: src/tests/rump/modautoload: Makefile Log Message: don't disable PIE To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/rump/modautoload/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/modautoload/Makefile diff -u src/tests/rump/modautoload/Makefile:1.5 src/tests/rump/modautoload/Makefile:1.6 --- src/tests/rump/modautoload/Makefile:1.5 Sat Aug 27 10:21:07 2016 +++ src/tests/rump/modautoload/Makefile Sat Aug 27 10:23:54 2016 @@ -1,9 +1,8 @@ -# $NetBSD: Makefile,v 1.5 2016/08/27 14:21:07 christos Exp $ +# $NetBSD: Makefile,v 1.6 2016/08/27 14:23:54 christos Exp $ # TESTSDIR= ${TESTSBASE}/rump/modautoload -.include -NOPIE=yes + TESTS_C= t_modautoload PAXCTL_FLAGS= +m
CVS commit: src/tests/rump/modautoload
Module Name:src Committed By: christos Date: Sat Aug 27 14:21:07 UTC 2016 Modified Files: src/tests/rump/modautoload: Makefile Log Message: needs mprotect disable since it loads kernel code and relocates it. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/rump/modautoload/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/modautoload/Makefile diff -u src/tests/rump/modautoload/Makefile:1.4 src/tests/rump/modautoload/Makefile:1.5 --- src/tests/rump/modautoload/Makefile:1.4 Sat Aug 20 13:06:18 2016 +++ src/tests/rump/modautoload/Makefile Sat Aug 27 10:21:07 2016 @@ -1,9 +1,11 @@ -# $NetBSD: Makefile,v 1.4 2016/08/20 17:06:18 christos Exp $ +# $NetBSD: Makefile,v 1.5 2016/08/27 14:21:07 christos Exp $ # TESTSDIR= ${TESTSBASE}/rump/modautoload - +.include +NOPIE=yes TESTS_C= t_modautoload +PAXCTL_FLAGS= +m SRCS.t_modautoload+= t_modautoload.c
CVS commit: src/tests/rump/modautoload
Module Name:src Committed By: christos Date: Sat Aug 20 17:06:18 UTC 2016 Modified Files: src/tests/rump/modautoload: Makefile Log Message: add missing library dependencies. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/rump/modautoload/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/modautoload/Makefile diff -u src/tests/rump/modautoload/Makefile:1.3 src/tests/rump/modautoload/Makefile:1.4 --- src/tests/rump/modautoload/Makefile:1.3 Sun Dec 27 01:36:36 2015 +++ src/tests/rump/modautoload/Makefile Sat Aug 20 13:06:18 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2015/12/27 06:36:36 pgoyette Exp $ +# $NetBSD: Makefile,v 1.4 2016/08/20 17:06:18 christos Exp $ # TESTSDIR= ${TESTSBASE}/rump/modautoload @@ -15,6 +15,7 @@ LDADD+= -Wl,--whole-archive ${DESTDIR}/ ${DESTDIR}/usr/lib/librump.a \ -Wl,--no-whole-archive LDADD+= -lrumpuser -lpthread +DPADD+= ${LIBRUMPVFS} ${LIBRUMP} ${LIBRUMPUSER} WARNS= 4
CVS commit: src/tests/rump/modautoload
Module Name:src Committed By: pgoyette Date: Sun Dec 27 08:21:44 UTC 2015 Modified Files: src/tests/rump/modautoload: t_modautoload.c Log Message: Remove a left-over debugging variable. Fix the build. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/rump/modautoload/t_modautoload.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/modautoload/t_modautoload.c diff -u src/tests/rump/modautoload/t_modautoload.c:1.3 src/tests/rump/modautoload/t_modautoload.c:1.4 --- src/tests/rump/modautoload/t_modautoload.c:1.3 Sun Dec 27 06:36:36 2015 +++ src/tests/rump/modautoload/t_modautoload.c Sun Dec 27 08:21:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_modautoload.c,v 1.3 2015/12/27 06:36:36 pgoyette Exp $ */ +/* $NetBSD: t_modautoload.c,v 1.4 2015/12/27 08:21:44 pgoyette Exp $ */ #include #include @@ -45,7 +45,7 @@ mountkernfs(void) if (rump_sys_mkdir("/kern", 0777) == -1) atf_tc_fail_errno("mkdir /kern"); - new_autoload = new_verbose = true; + new_autoload = true; new_len = sizeof(new_autoload); error = sysctlbyname("kern.module.autoload", _autoload, _len,
CVS commit: src/tests/rump/modautoload
Module Name:src Committed By: pgoyette Date: Sun Dec 27 06:36:36 UTC 2015 Modified Files: src/tests/rump/modautoload: Makefile t_modautoload.c Log Message: When MODULAR kernels grew a MODULAR_DEFAULT_AUTOLOAD option, (in rev 1.98 of src/sys/kern/kern_module.c), the default was "off" for all kernels including rump kernels. While many (most?) kernel config files were updated to include the new option, rump kernels weren't so lucky. Thus, rump kernels still had autoload disabled. This commit uses rump_sysctl to change the module_autoload_on value to true (ie, enabled) before trying to test if autoloading actually works. For now, I am _not_ changing the default for all rump kernels. I'll leave that for another day, after all appropriate discussion has occurred. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/rump/modautoload/Makefile \ src/tests/rump/modautoload/t_modautoload.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/modautoload/Makefile diff -u src/tests/rump/modautoload/Makefile:1.2 src/tests/rump/modautoload/Makefile:1.3 --- src/tests/rump/modautoload/Makefile:1.2 Mon Mar 10 22:38:53 2014 +++ src/tests/rump/modautoload/Makefile Sun Dec 27 06:36:36 2015 @@ -1,10 +1,12 @@ -# $NetBSD: Makefile,v 1.2 2014/03/10 22:38:53 pooka Exp $ +# $NetBSD: Makefile,v 1.3 2015/12/27 06:36:36 pgoyette Exp $ # TESTSDIR= ${TESTSBASE}/rump/modautoload TESTS_C= t_modautoload +SRCS.t_modautoload+= t_modautoload.c + # Note: we link the rump kernel into the application to make this work # on amd64. This is the reason we keep this test in its own # subdirectory -- otherwise the LDADD lines would get a little hairy. @@ -16,4 +18,11 @@ LDADD+= -lrumpuser -lpthread WARNS= 4 +# To include a rump version of sysctlbyname() + +.PATH: ${NETBSDSRCDIR}/lib/libc/gen +SRCS.t_modautoload+= sysctlbyname.c +SRCS.t_modautoload+= sysctlgetmibinfo.c +CPPFLAGS+= -DRUMP_ACTION + .include Index: src/tests/rump/modautoload/t_modautoload.c diff -u src/tests/rump/modautoload/t_modautoload.c:1.2 src/tests/rump/modautoload/t_modautoload.c:1.3 --- src/tests/rump/modautoload/t_modautoload.c:1.2 Mon Mar 10 22:38:53 2014 +++ src/tests/rump/modautoload/t_modautoload.c Sun Dec 27 06:36:36 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_modautoload.c,v 1.2 2014/03/10 22:38:53 pooka Exp $ */ +/* $NetBSD: t_modautoload.c,v 1.3 2015/12/27 06:36:36 pgoyette Exp $ */ #include #include @@ -33,6 +33,9 @@ ATF_TC_HEAD(modautoload, tc) static void mountkernfs(void) { + bool old_autoload, new_autoload; + size_t old_len, new_len; + int error; if (!rump_nativeabi_p()) atf_tc_skip("host kernel modules not supported"); @@ -41,6 +44,15 @@ mountkernfs(void) if (rump_sys_mkdir("/kern", 0777) == -1) atf_tc_fail_errno("mkdir /kern"); + + new_autoload = new_verbose = true; + new_len = sizeof(new_autoload); + error = sysctlbyname("kern.module.autoload", + _autoload, _len, + _autoload, new_len); + if (error != 0) + atf_tc_fail_errno("could not enable module autoload"); + if (rump_sys_mount(MOUNT_KERNFS, "/kern", 0, NULL, 0) == -1) atf_tc_fail_errno("could not mount kernfs"); }