Giter Site home page Giter Site logo

redirfs's People

Contributors

slavaim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

redirfs's Issues

comiple error

/home/user/Desktop/redirfs/redirfs/src/avflt/avflt_check.c:298:47: error: implicit declaration of function ‘current_cred’; did you mean ‘current_chrooted’? [-Werror=implicit-function-declaration]
file = dentry_open(&event->f_path, flags, current_cred());
^~~~~~~~~~~~
current_chrooted
/home/user/Desktop/redirfs/redirfs/src/avflt/avflt_check.c:298:47: warning: passing argument 3 of ‘dentry_open’ makes pointer from integer without a cast [-Wint-conversion]
file = dentry_open(&event->f_path, flags, current_cred());
^~~~~~~~~~~~~~
In file included from ./include/linux/poll.h:10,
from /home/user/Desktop/redirfs/redirfs/src/avflt/avflt.h:29,
from /home/user/Desktop/redirfs/redirfs/src/avflt/avflt_check.c:24:
./include/linux/fs.h:2469:22: note: expected ‘const struct cred *’ but argument is of type ‘int’
extern struct file * dentry_open(const struct path *, int, const struct cred *);
^~~~~~~~~~~
cc1: some warnings being treated as errors

Is this project support cifs filesystem?

HI,thank your reviving this project. And i have some questions to discuss.
There is a tag which say "cifs is not supported (version 0.7)" in file "CHANGELOG", but in file "rfs_path_check_fs.c",function 'rfs_path_check_fs' comment out some code. So,it has supported cifs now?
BTW,i'm not sure a problem with "rfs_cast_to_rdentry(dentry)" in file "rfs_dentry.c"? it maybe double add count of robject when using "rfs_dentry_get(rfs_cast_to_rdentry)"?

After file move, filter unregister failed

Dear @slavaim,

After some mv operations in filtetring area, we can not unregister filter module with msg of "Device or resource busy".

OS:

  • CentOS 6 or 7

Test:

  1. rfsctl -f mvflt -i /test1
  2. mv /test1/file1 /test1/file2
  3. rfsctl -f mvflt -c
  4. echo -n "1" > /sys/fs/redirfs/filters/mvflt/unregister
    bash: echo: write error: Device or resource busy

Cause:

  • counter mismatch error at following line on "redirfs_unregister_filter" function:
    -- if (atomic_read(&rflt->count) != 3) {

Would you please give me some solution?

Thanks.

Getting it work on linux-kernel 5.x?

Just got in need of redirfs trying to recover Comodo Antivirus still using redirfs. Are there any plans for resurrection for linux-kernel 5.x (5.1)? Tried to compile recent version of this repository, but it failed :-(

Question about multiple redirfs

I change the Redirfs Exported symbol name and sysfs name things and kmem_cache names things.
And I loaded two redirfs module. After that I registered kernel module into each redirfs filter.
And I added the path each of them.
When I tried to add path of second redirfs-registered kernel module. panic happened
so my question is, is it possible to make two redirfs load on two kernel, and to make operate well?

Linux 4.17 compatibility

You did a great job reviving this kernel module! Could you please also make it compatible with Linux 4.17? I could really make use of it with COMODO antivirus, which needs this to work. I tried to do this myself, but I didn't succeed...

Empty directory of read-only attribute can be deleted

[root@localhost 11]# ls -la
total 4
drwxr-xr-x 2 root root 6 Aug 20 06:06 .
drwxr-xr-x 3 root root 4096 Aug 20 06:06 ..
[root@localhost 11]# pwd
/root/test/test_1/11
[root@localhost 11]# cat /sys/fs/redirfs/filters/roflt/paths
i:0:/root/test/test_1/11[root@localhost 11]# cd ../
[root@localhost test_1]# rm -fr 11
[root@localhost test_1]#

kernel panic during umount

Dear @slavaim,

Could you please give me some help?
There is kernel panic if umount without deleting path.

test step:

  1. insmod roflt
  2. rfsctl -f roflt -i /test1
  3. mount /dev/sdxx /test1
  4. umount /dev/sdxx

dump stack:
#0 [ffff98e3f2ccfac0] machine_kexec at ffffffffaf063674
#1 [ffff98e3f2ccfb20] __crash_kexec at ffffffffaf11cf32
#2 [ffff98e3f2ccfbf0] crash_kexec at ffffffffaf11d020
#3 [ffff98e3f2ccfc08] oops_end at ffffffffaf76d758
#4 [ffff98e3f2ccfc30] die at ffffffffaf02f95b
#5 [ffff98e3f2ccfc60] do_trap at ffffffffaf76cea0
#6 [ffff98e3f2ccfcb0] do_invalid_op at ffffffffaf02c2a4
#7 [ffff98e3f2ccfd60] invalid_op at ffffffffaf77912e
[exception RIP: shrink_dcache_for_umount_subtree+460]
RIP: ffffffffaf25a9bc RSP: ffff98e3f2ccfe10 RFLAGS: 00010246
RAX: 000000000000004d RBX: ffff98e354797680 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffff98e49f013898 RDI: ffff98e49f013898
RBP: ffff98e3f2ccfe30 R8: 6e6544203a475542 R9: 66207972746e6544
R10: 0000000000000833 R11: 3533653839666666 R12: ffff98e354797680
R13: 00000000000003f3 R14: ffffffffb00e65b0 R15: ffff98e3e1a85910
ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018
#8 [ffff98e3f2ccfe38] shrink_dcache_for_umount at ffffffffaf25c2ef
#9 [ffff98e3f2ccfe50] generic_shutdown_super at ffffffffaf24416f
#10 [ffff98e3f2ccfe70] kill_block_super at ffffffffaf244627
#11 [ffff98e3f2ccfe90] deactivate_locked_super at ffffffffaf24496e
#12 [ffff98e3f2ccfeb0] deactivate_super at ffffffffaf2450f6
#13 [ffff98e3f2ccfec8] cleanup_mnt at ffffffffaf26366f
#14 [ffff98e3f2ccfee0] __cleanup_mnt at ffffffffaf263702
#15 [ffff98e3f2ccfef0] task_work_run at ffffffffaf0be7db
#16 [ffff98e3f2ccff30] do_notify_resume at ffffffffaf02bc65
#17 [ffff98e3f2ccff50] int_signal at ffffffffaf776124

Notes:

  1. If i delete path by "rfsctl -f roflt -c" before umount then no problem.
  2. If i hold some mounted file like "tail -f /test1/locktest" and umount by "umount -l /dev/sdxx" wirh lazy option then no problem.
  3. OS is CentOS 7.

thanks.

system stuck when mv normal file to redirfs dir

for example:
insmod redirfs.ko
insmod dummyflt.ko
echo "c" > /sys/fs/redirfs/filters/dummyflt/paths
echo -n "a:i:/home/work/test" > /sys/fs/redirfs/filters/dummyflt/paths
mv /home/work/normal/hhh > /home/work/test/
//then the system will stuck,and dmesg will print

[ +0.000008] [] schedule_preempt_disabled+0x29/0x70
[ +0.000003] [] __mutex_lock_slowpath+0xc7/0x1d0
[ +0.000003] [] mutex_lock+0x1f/0x2f
[ +0.000008] [] rfs_inode_mutex_lock+0x1e/0x20 [redirfs]
[ +0.000006] [] rfs_dcache_get_subs_mutex+0x47/0x77 [redirfs]
[ +0.000045] [] rfs_dcache_walk+0x10d/0x1fd [redirfs]
[ +0.000056] [] ? rfs_dcache_add_dir+0x62/0x62 [redirfs]
[ +0.000004] [] ? kzalloc+0x33/0x35 [redirfs]
[ +0.000006] [] rfs_info_add+0x79/0xa9 [redirfs]
[ +0.000004] [] rfs_fsrename_add_dentry+0x166/0x1c8 [redirfs]
[ +0.000002] [] rfs_fsrename_add+0xda/0xee [redirfs]
[ +0.000002] [] rfs_fsrename+0x14e/0x192 [redirfs]
[ +0.000004] [] rfs_rename+0x291/0x3d2 [redirfs]
[ +0.000003] [] vfs_rename+0x82d/0x880
[ +0.000002] [] SYSC_renameat2+0x503/0x5a0
[ +0.000002] [] ? __do_page_fault+0x1bc/0x4f0
[ +0.000002] [] SyS_renameat2+0xe/0x10
[ +0.000002] [] system_call_fastpath+0x1c/0x21

win like path

Can redirfs redict win path to file on Linux? for exmaple,
One process read "c:\test\test.txt", the read file it read located "/mnt/test/test.txt"

With mvflt.ko module, move-in operation failed on CentOS 7

Dear @slavaim,

Threre is OS version problem during move-in test with mvflt sample module.
On the CentOS 6.4, rename_in callback captures move-in operation, successfully.
But on the CentOS 7.6, move-in operation failed. mv command be hung.

dmesg log:

2월 13 10:17:12 drbd9-01 kernel: INFO: task mv:44495 blocked for more than 120 seconds.
2월 13 10:17:12 drbd9-01 kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
2월 13 10:17:12 drbd9-01 kernel: mv D ffff8b18d9dcb200 0 44495 21987 0x00000080
2월 13 10:17:12 drbd9-01 kernel: Call Trace:
2월 13 10:17:12 drbd9-01 kernel: [] schedule_preempt_disabled+0x29/0x70
2월 13 10:17:12 drbd9-01 kernel: [] __mutex_lock_slowpath+0xc7/0x1d0
2월 13 10:17:12 drbd9-01 kernel: [] mutex_lock+0x1f/0x2f
2월 13 10:17:12 drbd9-01 kernel: [] rfs_dcache_walk+0xaf/0x2a0 [redirfs]
2월 13 10:17:12 drbd9-01 kernel: [] ? kmem_cache_alloc_trace+0x1d6/0x200
2월 13 10:17:12 drbd9-01 kernel: [] ? rfs_dcache_add_dir+0x40/0x40 [redirfs]
2월 13 10:17:12 drbd9-01 kernel: [] rfs_info_add+0x36/0x80 [redirfs]
2월 13 10:17:12 drbd9-01 kernel: [] rfs_fsrename+0x497/0x670 [redirfs]
2월 13 10:17:12 drbd9-01 kernel: [] rfs_rename+0x27d/0x3e0 [redirfs]
2월 13 10:17:12 drbd9-01 kernel: [] ? legitimize_mnt+0x16/0x40
2월 13 10:17:12 drbd9-01 kernel: [] ? mutex_lock+0x12/0x2f
2월 13 10:17:12 drbd9-01 kernel: [] vfs_rename+0x82d/0x880
2월 13 10:17:12 drbd9-01 kernel: [] SYSC_renameat2+0x503/0x5a0
2월 13 10:17:12 drbd9-01 kernel: [] ? system_call_after_swapgs+0xae/0x146
2월 13 10:17:12 drbd9-01 kernel: [] ? system_call_after_swapgs+0xa2/0x146
2월 13 10:17:12 drbd9-01 kernel: [] ? system_call_after_swapgs+0xae/0x146
2월 13 10:17:12 drbd9-01 kernel: [] ? system_call_after_swapgs+0xa2/0x146
2월 13 10:17:12 drbd9-01 kernel: [] ? system_call_after_swapgs+0xae/0x146
2월 13 10:17:12 drbd9-01 kernel: [] ? system_call_after_swapgs+0xa2/0x146
2월 13 10:17:12 drbd9-01 kernel: [] SyS_renameat2+0xe/0x10
2월 13 10:17:12 drbd9-01 kernel: [] system_call_fastpath+0x22/0x27
2월 13 10:17:12 drbd9-01 kernel: [] ? system_call_after_swapgs+0xae/0x146

Thanks.

How to rmmod redirfs.ko

HI, I want ro rmmod redirfs.ko, and add the code:
"
static void __exit rfs_exit(void)
{
rfs_sysfs_delete();
rfs_file_cache_destory();
rfs_inode_cache_destroy();
rfs_dentry_cache_destory();
if (rfs_info_none)
rfs_info_put(rfs_info_none);
}
module_exit(rfs_exit);
"

/rfsctl/rfsctl -f roflt -i /home/test
/rfsctl/rfsctl -f roflt -R /home/test
/rfsctl/rfsctl -f roflt -u
rmmod roflt.ko
rmmod redirfs.ko
The system has been restarted, How can i rmmod redirfs.ko

System total freeze when used with COMODO antivirus

I installed kernel 4.14.78 to test the current RedirFS version with the COMODO antivirus. The original RedirFS driver provided with it only compiles on kernel < 2.6, so I wanted to give it a try. Successfully compiled, installed and loaded the module, but 2 seconds after "modprobe avflt" and COMODO starting to use the redirfs and avflt modules, the whole system freezes as if it cannot read any file from the disk. I cannot even login from other tty, the only solution being to restart and boot with another kernel.
Is it not compatible with COMODO for some reason?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.