Project

General

Profile

Actions

Bug #9091

closed

MDB smart-write

Added by Serapheim Dimitropoulos almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
mdb - modular debugger
Start date:
2018-02-10
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

Currently, if you want to write to a kernel tunable using
mdb, you need to use the /Z or /W flags to write 8 or 4
bytes respectively. If you use the wrong one, you will either
overwrite only part of the tunable, or overrun the end of the
tunable and zero out the next 4 bytes of memory. That second
option in particular can be disastrous. Given that MDB knows
the size of the tunables because it has CTF data, it would be
nice if MDB supported a "smart write" format string that
selected the size of the write based on the size of the thing
being written to. It should fail or require a size be specified
if we're writing to an area without a specific size.

Actions

Also available in: Atom PDF