RE: Walking all the physical memory in an x86 system

From: Jan Engelhardt
Date: Wed Dec 01 2004 - 03:41:25 EST


>[Jon M. Hanson] I tried the filp_open() approach like this:
>
>struct file *mem_fd;
>
>mem_fd = filp_open("/dev/mem", O_RDONLY | O_LARGEFILE, 0);
>
>I then have a check if IS_ERR(mem_fd) is true immediately afterwards
>along with a printk saying it failed. This condition is true when I ran
>it. It seems to fail with -EACCES (permission denied) as the error code.
>
>I can see the exact code that's causing the -EACCES in open_namei(). It
>makes a check if the thing being opened is a character device and
>returns the -EACCES, so obviously filp_open() can't do this.

Mh, non-files... here's a real blind shot: cdev_open



Jan Engelhardt
--
ENOSPC
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/