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

vfs_statx hook doesn't work in 6.1 kernel... #2312

Open
3 tasks done
chiteroman opened this issue Dec 23, 2024 · 0 comments
Open
3 tasks done

vfs_statx hook doesn't work in 6.1 kernel... #2312

chiteroman opened this issue Dec 23, 2024 · 0 comments

Comments

@chiteroman
Copy link

chiteroman commented Dec 23, 2024

Please check before submitting an issue

  • I have searched the issues and haven't found anything relevant
  • I will upload bugreport file in KernelSU Manager - Settings - Report log
  • I know how to reproduce the issue which may not be specific to my device

Describe the bug

#ifdef CONFIG_KSU
extern int ksu_handle_stat(int *dfd, const char __user **filename_user,
			   int *flags);
#endif

static int vfs_statx(int dfd, struct filename *filename, int flags,
	      struct kstat *stat, u32 request_mask)
{
	struct path path;
	unsigned int lookup_flags = getname_statx_lookup_flags(flags);
	int error;

#ifdef CONFIG_KSU
	ksu_handle_stat(&dfd, (const char **)&filename, &flags);
#endif

...

}

I can build the kernel but if I run su command:
marcos@fedora:/mnt/ext/boot$ adb shell su -c uname -a
/system/bin/sh: su: inaccessible or not found

Shell has su perms, if I move the hook to vfs_fstatat and use the statx_flags it works!

Why it doesn't work vfs_statx hook ?

To Reproduce

No response

Expected behavior

No response

Screenshots

No response

Logs

No response

Device info

  • Device: POCO X6 Pro
  • OS Version: 14
  • KernelSU Version: 11997
  • Kernel Version: 6.1.119-android14-11

Additional context

No response

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

1 participant