Re: [PATCH] New phys_addr() syscall

Richard Gooch (Richard.Gooch@atnf.CSIRO.AU)
Sun, 19 Jul 1998 22:45:32 +1000


Alexander Kjeldaas writes:
> On Sun, Jul 19, 1998 at 03:53:24PM +1000, Richard.Gooch@atnf.csiro.au wrote:
> > Hi, all. I've implemented a simple new system call called
> > phys_addr() which converts a virtual address to a physical
> > address. This is useful for memory testing programmes so you can find
> > out which SIMM/DIMM is causing trouble (yeah, I've got intermittent
> > memory problems in one of my machines, and I want to nail the bugger).
> > Sure, I know about memtest86, but it doesn't seem to find the problem,
> > whereas my userspace tester does.
> >
> > People writing pure userspace network drivers may also find this handy
> > if they want to DMA directly into userspace.
> >
> > I've only bothered with ix86 syscalls for now. Comments welcome. Patch
> > against 2.1.109 below.
>
> I this is only useful for specialized utilities, I suggest you check
> for capable(CAP_SYS_ADMIN) in the system call.

Sorry, I don't see the connection with capabilities. The prctl(2)
syscall is also for specialised applications (actually, the
LinuxThreads library). We don't need to restrict that either.
I see no reason to restrict access to phys_addr(2). An ordinary
(unprivileged) process can't do anything with the information other
than print it out. A userspace network driver would indeed have
privileges, but those relate to accessing hardware, they have nothing
to do with translating addresses.

Shall we also add CAP_GETPID_ALLOWED? ;-)

Regards,

Richard....

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html