[Pdbg] [PATCH] main: Run as root
Michael Neuling
mikey at neuling.org
Wed Mar 28 16:19:03 AEDT 2018
On Wed, 2018-03-28 at 16:00 +1100, Amitay Isaacs wrote:
> On Wed, 2018-03-28 at 15:19 +1100, Michael Neuling wrote:
> > Thanks Amitay,
> >
> > There are some parts of pgdb that won't need root. Seems like we
> > should add
> > something like this when we actually try to open a device and get an
> > EPERM.
>
> What parts are those?
I don't know either, I'm just guessing these exist.
"git grep open\(" shows a bunch of things that would be candidates.
libpdbg/bmcfsi.c:453: mem_fd = open("/dev/mem", O_RDWR | O_SYNC);
libpdbg/htm.c:418: file = fopen(DEBUGFS_MEMTRACE_ENABLE, "r+");
libpdbg/i2c.c:141: i2c_data->fd = open(bus, O_RDWR);
libpdbg/kernel.c:99: fd = open(FSI_SCAN_PATH, O_WRONLY | O_SYNC);
libpdbg/kernel.c:117: fsi_fd = open(FSI_CFAM_PATH, O_RDWR | O_SYNC);
> From my (non-existent) understanding of pdbg, all of it requires root
> privileges.
We are adding a bunch of smarts to pdbg what are just analysing normal files
which wouldn't need to touch anything that's privileged. Hence I'd prefer if we
avoid a blanket "run as root" rule.
Al is the maintainer so he might disagree.... although he'd be wrong :-P
Mikey
More information about the Pdbg
mailing list