]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r328052: kldxref: handle modules with md_cval at end of allocated secs
authoremaste <emaste@FreeBSD.org>
Tue, 13 Feb 2018 22:40:33 +0000 (22:40 +0000)
committeremaste <emaste@FreeBSD.org>
Tue, 13 Feb 2018 22:40:33 +0000 (22:40 +0000)
commit680f34f59c45216292426191b2e013ba056e81c0
tree69cadaac63c746c1cb6a3f51f71195e0e80654f1
parent51c298f6bdbc2e708f2fbc9e470ac9c70408ab80
MFC r328052: kldxref: handle modules with md_cval at end of allocated secs

Attempting to retrieve an md_cval string from a kernel module with
kldxref would throw a offset error for modules created using lld, since
this value would be placed at the end of all allocated sections.

Add an ef_read_seg_string method to the ef interface, to allow reading
strings of varying size without attempting to read beyond the segment's
bounds.

PR: 224875
Submitted by: Mitchell Horne <mhorne063@gmail.com>
Sponsored by: The FreeBSD Foundation
usr.sbin/kldxref/ef.c
usr.sbin/kldxref/ef.h
usr.sbin/kldxref/ef_obj.c
usr.sbin/kldxref/kldxref.c