Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't be compiled on 4.x Linux(which I have expected) #9

Open
targetnull opened this issue Mar 30, 2016 · 4 comments
Open

Couldn't be compiled on 4.x Linux(which I have expected) #9

targetnull opened this issue Mar 30, 2016 · 4 comments

Comments

@targetnull
Copy link

Hi,
I'm trying it on the 4.4.0 arm linux and it couldn't be compiled, saying that

main.c:255:28: error: ‘struct file’ has no member named ‘f_dentry’
afinfo = PDE_DATA(filep->f_dentry->d_inode);

But I have expected this because the file structure could change from version to version. I'd like to know wether you plan to update this project to support the latest kernel. If you don't, could you provide me with some reference where I can find such examples?

BTW, since you can do hijackings, is there a way to defend such attacks? Take the keylogger as an example, you have registered a modified keyboad notifier, is there any method to prevent an unauthorized process from doing so?

Thanks

@bzgo
Copy link

bzgo commented May 12, 2016

This has not been tested, but it compiles now, theres 2 places in main.c that need this update:
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
afinfo = PDE(filep->f_dentry->d_inode)->data;
#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
afinfo = PDE_DATA(filep->f_dentry->d_inode);
#else
afinfo = PDE_DATA(filep->f_path.dentry->d_inode);
#endif

Shoaib0597 added a commit to Shoaib0597/CAF-MSM_4.9 that referenced this issue Aug 2, 2018
Shoaib0597 added a commit to Shoaib0597/CAF-MSM_4.9 that referenced this issue Aug 2, 2018
Shoaib0597 added a commit to Shoaib0597/CAF-MSM_4.9 that referenced this issue Aug 2, 2018
Shoaib0597 added a commit to Shoaib0597/CAF-MSM_4.9 that referenced this issue Aug 2, 2018
@q2dg
Copy link

q2dg commented Feb 17, 2019

Well, nowadays we have arrived at 5.x version...

@Mrdongzai
Copy link

Mrdongzai commented Apr 18, 2020

Well, nowadays we have arrived at 5.x version...

Hi, guys. I want to cross-compile it for Linux 4.1.x, but it threw out this error. What can I do?
1587189744(1)
it seems that it points to wrong lib. the asm/bitsperlong.h is in arch/arm/include/asm.

@Mrdongzai
Copy link

Well, nowadays we have arrived at 5.x version...

image
it's really strange. if I compile it in my Linux 4.15. it works well. but when I cross-compile it threw out the problem.
1587189744(1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants