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

Thanks for your testcase, I have submitted a patch to fix this:
https://lore.kernel.org/all/20250821105806.1453833-1-wangzijie1@xxxxxxxxx




[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