Re: [PATCH] proc: use the same treatment to check proc_lseek as ones for proc_read_iter et.al.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

This change makes /proc/net/dev a non-seekable file.  There is
software that depends on it to be seekable (1), surprisingly some
other files in /proc still work fine after this change.

Minimal C testcase:
==
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>

int main() {
	int fd = open("/proc/net/dev", 0);
	off_t o = lseek(fd, 0, SEEK_SET);
	if (o == -1) {
		perror("lseek");
	}
}
==

1) https://github.com/scottchiefbaker/dool/issues/111

--
ŁPM




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux