elf_helper: support for objects in user memory
Some forthcoming kernel object types like futexes need to be tracked, but do not contain data that is private to the kernel. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
ce6210e479
commit
c235e167fa
3 changed files with 40 additions and 30 deletions
|
@ -471,14 +471,6 @@ class ElfHelper:
|
|||
# Never linked; gc-sections deleted it
|
||||
continue
|
||||
|
||||
if ((addr < kram_start or addr >= kram_end) and
|
||||
(addr < krom_start or addr >= krom_end)):
|
||||
|
||||
self.debug_die(die,
|
||||
"object '%s' found in invalid location %s"
|
||||
% (name, hex(addr)))
|
||||
continue
|
||||
|
||||
type_obj = type_env[type_offset]
|
||||
objs = type_obj.get_kobjects(addr)
|
||||
all_objs.update(objs)
|
||||
|
@ -497,6 +489,16 @@ class ElfHelper:
|
|||
if ko.type_obj.api:
|
||||
continue
|
||||
|
||||
_, user_ram_allowed = kobjects[ko.type_obj.name]
|
||||
if (not user_ram_allowed and
|
||||
(addr < kram_start or addr >= kram_end) and
|
||||
(addr < krom_start or addr >= krom_end)):
|
||||
|
||||
self.debug_die(die,
|
||||
"object '%s' found in invalid location %s"
|
||||
% (name, hex(addr)))
|
||||
continue
|
||||
|
||||
if ko.type_obj.name != "device":
|
||||
# Not a device struct so we immediately know its type
|
||||
ko.type_name = kobject_to_enum(ko.type_obj.name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue