svn commit: r353935 - head/sys/dev/ksyms
Mark Johnston
markj at FreeBSD.org
Wed Oct 23 16:53:38 UTC 2019
Author: markj
Date: Wed Oct 23 16:53:37 2019
New Revision: 353935
URL: https://svnweb.freebsd.org/changeset/base/353935
Log:
Set OBJ_NOSPLIT on the ksyms(4) VM object.
The object does not provide anonymous memory.
Reported by: kib
Reviewed by: kib
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22123
Modified:
head/sys/dev/ksyms/ksyms.c
Modified: head/sys/dev/ksyms/ksyms.c
==============================================================================
--- head/sys/dev/ksyms/ksyms.c Wed Oct 23 16:48:22 2019 (r353934)
+++ head/sys/dev/ksyms/ksyms.c Wed Oct 23 16:53:37 2019 (r353935)
@@ -404,6 +404,7 @@ ksyms_open(struct cdev *dev, int flags, int fmt __unus
{
struct tsizes ts;
struct ksyms_softc *sc;
+ vm_object_t object;
vm_size_t elfsz;
int error, try;
@@ -441,8 +442,10 @@ ksyms_open(struct cdev *dev, int flags, int fmt __unus
ksyms_size_calc(&ts);
elfsz = sizeof(struct ksyms_hdr) + ts.ts_symsz + ts.ts_strsz;
- sc->sc_obj = vm_object_allocate(OBJT_DEFAULT,
+ object = vm_object_allocate(OBJT_DEFAULT,
OFF_TO_IDX(round_page(elfsz)));
+ vm_object_set_flag(object, OBJ_NOSPLIT);
+ sc->sc_obj = object;
sc->sc_objsz = elfsz;
error = ksyms_snapshot(sc, &ts);
More information about the svn-src-all
mailing list