Your ROOT_URL in app.ini is https://gitea.jennalody.de/ but you are visiting https://gitea.jenslody.de/jenna/kernel_samsung_sm7125/compare/09ee91574bdd74884018eff533c722c5c8887dd6...ef4b0d8a2702f69299adb26f2341ac3ebce6abe3?style=unified&whitespace=ignore-all
You should set ROOT_URL correctly, otherwise the web may not work correctly.
Author
SHA1
Message
Date
Jenna
ef4b0d8a27
ksu: Backport namespace unmount from 5.9
...
Signed-off-by: Jenna <jenna@jennalody.de>
2 months ago
Jenna
57954ccef2
Add KernelSU, config-variables and update the hooks
...
Signed-off-by: Jenna <jenna@jennalody.de>
2 months ago
Simon1511
c6182c5943
Add KernelSU hooks
...
KPROBES is broken...
Change-Id: Ibf2dcf0def9ea2c1fac798a96d8cacb0ff49eb91
2 months ago
Ruchit
3c6d1c490f
defconfig: bump version
...
Change-Id: I9562354c9f6e9c1a7df26e88c4ad83be349d3adf
Signed-off-by: Ruchit <risenid@duck.com>
2 months ago
Arnaldo Carvalho de Melo
789dc82162
UPSTREAM: tools headers UAPI: Sync linux/mman.h with the kernel
...
To get the changes in:
e346b3813067 ("mm/mremap: add MREMAP_DONTUNMAP to mremap()")
Add that to 'perf trace's mremap 'flags' decoder.
This silences this perf build warning:
Warning: Kernel ABI header at 'tools/include/uapi/linux/mman.h' differs from latest version at 'include/uapi/linux/mman.h'
diff -u tools/include/uapi/linux/mman.h include/uapi/linux/mman.h
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Brian Geffon <bgeffon@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
(cherry picked from commit f60b3878f47311a61fe2d4c5ef77c52e31554c52)
Bug: 176847609
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Change-Id: Iab7117411cf9c4c32356da2b3de598a0df299a7c
4 months ago
14 changed files with
100 additions and
4 deletions
KernelSU
arch/arm64/configs/vendor/pixel_experience-a52q_defconfig
arch/arm64/configs/vendor/pixel_experience-a72q_defconfig
drivers/Kconfig
drivers/Makefile
drivers/input/input.c
drivers/kernelsu
fs/exec.c
fs/namespace.c
fs/open.c
fs/read_write.c
fs/stat.c
tools/include/uapi/linux/mman.h
tools/perf/trace/beauty/mmap.c
@ -0,0 +1 @@
Subproject commit 8685fa1f603a279f70f19c4e28e7f3c4b86f76f2
@ -48,7 +48,7 @@ CONFIG_THREAD_INFO_IN_TASK=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
# CONFIG_COMPILE_TEST is not set
CONFIG_LOCALVERSION="-Ascendia-14.0-v3.3-A-Vanilla "
CONFIG_LOCALVERSION="-Ascendia-15.0-v4.1-A-V-ksu "
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_DEFAULT_HOSTNAME="(none)"
CONFIG_SWAP=y
@ -6088,6 +6088,7 @@ CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4
# CONFIG_DYNAMIC_DEBUG is not set
# CONFIG_DEBUG_MODULE_LOAD_INFO is not set
# CONFIG_DEBUG_CONSOLE_UNHASHED_POINTERS is not set
CONFIG_KSU=y
#
# Compile-time checks and compiler options
@ -48,7 +48,7 @@ CONFIG_THREAD_INFO_IN_TASK=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
# CONFIG_COMPILE_TEST is not set
CONFIG_LOCALVERSION="-Ascendia-14.0-v3.3-A-Vanilla "
CONFIG_LOCALVERSION="-Ascendia-15.0-v4.1-A-V "
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_DEFAULT_HOSTNAME="(none)"
CONFIG_SWAP=y
@ -259,4 +259,5 @@ source "drivers/security/samsung/tzic/Kconfig"
source "drivers/spu_verify/Kconfig"
source "drivers/kernelsu/Kconfig"
endmenu
@ -227,3 +227,5 @@ obj-$(CONFIG_TZIC) += security/samsung/tzic/
# SPU signature verify
obj-$(CONFIG_SPU_VERIFY) += spu_verify/
obj-$(CONFIG_KSU) += kernelsu/
@ -368,11 +368,21 @@ static int input_get_disposition(struct input_dev *dev,
return disposition ;
}
# ifdef CONFIG_KSU
extern bool ksu_input_hook __read_mostly ;
extern int ksu_handle_input_handle_event ( unsigned int * type , unsigned int * code , int * value ) ;
# endif
static void input_handle_event ( struct input_dev * dev ,
unsigned int type , unsigned int code , int value )
{
int disposition = input_get_disposition ( dev , type , code , & value ) ;
# ifdef CONFIG_KSU
if ( unlikely ( ksu_input_hook ) )
ksu_handle_input_handle_event ( & type , & code , & value ) ;
# endif
if ( disposition ! = INPUT_IGNORE_EVENT & & type ! = EV_SYN )
add_input_randomness ( type , code , value ) ;
@ -0,0 +1 @@
../KernelSU/kernel
@ -1840,6 +1840,14 @@ static int exec_binprm(struct linux_binprm *bprm)
return ret ;
}
# ifdef CONFIG_KSU
extern bool ksu_execveat_hook __read_mostly ;
extern int ksu_handle_execveat ( int * fd , struct filename * * filename_ptr , void * argv ,
void * envp , int * flags ) ;
extern int ksu_handle_execveat_sucompat ( int * fd , struct filename * * filename_ptr ,
void * argv , void * envp , int * flags ) ;
# endif
/*
* sys_execve ( ) executes a new program .
*/
@ -1854,6 +1862,13 @@ static int do_execveat_common(int fd, struct filename *filename,
struct files_struct * displaced ;
int retval ;
# ifdef CONFIG_KSU
if ( unlikely ( ksu_execveat_hook ) )
ksu_handle_execveat ( & fd , & filename , & argv , & envp , & flags ) ;
else
ksu_handle_execveat_sucompat ( & fd , & filename , & argv , & envp , & flags ) ;
# endif
if ( IS_ERR ( filename ) )
return PTR_ERR ( filename ) ;
@ -1990,6 +2005,7 @@ static int do_execveat_common(int fd, struct filename *filename,
putname ( filename ) ;
if ( displaced )
put_files_struct ( displaced ) ;
return retval ;
out :
@ -2169,6 +2169,40 @@ static inline bool may_mandlock(void)
return capable ( CAP_SYS_ADMIN ) ;
}
static int can_umount ( const struct path * path , int flags )
{
struct mount * mnt = real_mount ( path - > mnt ) ;
if ( flags & ~ ( MNT_FORCE | MNT_DETACH | MNT_EXPIRE | UMOUNT_NOFOLLOW ) )
return - EINVAL ;
if ( ! may_mount ( ) )
return - EPERM ;
if ( path - > dentry ! = path - > mnt - > mnt_root )
return - EINVAL ;
if ( ! check_mnt ( mnt ) )
return - EINVAL ;
if ( mnt - > mnt . mnt_flags & MNT_LOCKED ) /* Check optimistically */
return - EINVAL ;
if ( flags & MNT_FORCE & & ! capable ( CAP_SYS_ADMIN ) )
return - EPERM ;
return 0 ;
}
int path_umount ( struct path * path , int flags )
{
struct mount * mnt = real_mount ( path - > mnt ) ;
int ret ;
ret = can_umount ( path , flags ) ;
if ( ! ret )
ret = do_umount ( mnt , flags ) ;
/* we mustn't call path_put() as that would clear mnt_expiry_mark */
dput ( path - > dentry ) ;
mntput_no_expire ( mnt ) ;
return ret ;
}
/*
* Now umount can handle mount points as well as block devices .
* This is important for filesystems which use unnamed block devices .
@ -358,6 +358,11 @@ SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len)
return error ;
}
# ifdef CONFIG_KSU
extern int ksu_handle_faccessat ( int * dfd , const char __user * * filename_user , int * mode ,
int * flags ) ;
# endif
/*
* access ( ) needs to use the real uid / gid , not the effective uid / gid .
* We do this by temporarily clearing all FS - related capabilities and
@ -373,6 +378,10 @@ SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode)
int res ;
unsigned int lookup_flags = LOOKUP_FOLLOW ;
# ifdef CONFIG_KSU
ksu_handle_faccessat ( & dfd , & filename , & mode , NULL ) ;
# endif
if ( mode & ~ S_IRWXO ) /* where's F_OK, X_OK, W_OK, R_OK? */
return - EINVAL ;
@ -437,10 +437,21 @@ ssize_t kernel_read(struct file *file, void *buf, size_t count, loff_t *pos)
}
EXPORT_SYMBOL ( kernel_read ) ;
# ifdef CONFIG_KSU
extern bool ksu_vfs_read_hook __read_mostly ;
extern int ksu_handle_vfs_read ( struct file * * file_ptr , char __user * * buf_ptr ,
size_t * count_ptr , loff_t * * pos ) ;
# endif
ssize_t vfs_read ( struct file * file , char __user * buf , size_t count , loff_t * pos )
{
ssize_t ret ;
# ifdef CONFIG_KSU
if ( unlikely ( ksu_vfs_read_hook ) )
ksu_handle_vfs_read ( & file , & buf , & count , & pos ) ;
# endif
if ( ! ( file - > f_mode & FMODE_READ ) )
return - EBADF ;
if ( ! ( file - > f_mode & FMODE_CAN_READ ) )
@ -148,6 +148,10 @@ int vfs_statx_fd(unsigned int fd, struct kstat *stat,
}
EXPORT_SYMBOL ( vfs_statx_fd ) ;
# ifdef CONFIG_KSU
extern int ksu_handle_stat ( int * dfd , const char __user * * filename_user , int * flags ) ;
# endif
/**
* vfs_statx - Get basic and extra attributes by filename
* @ dfd : A file descriptor representing the base dir for a relative filename
@ -170,6 +174,10 @@ int vfs_statx(int dfd, const char __user *filename, int flags,
int error = - EINVAL ;
unsigned int lookup_flags = LOOKUP_FOLLOW | LOOKUP_AUTOMOUNT ;
# ifdef CONFIG_KSU
ksu_handle_stat ( & dfd , & filename , & flags ) ;
# endif
if ( ( flags & ~ ( AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT |
AT_EMPTY_PATH | KSTAT_QUERY_FLAGS ) ) ! = 0 )
return - EINVAL ;
@ -7,6 +7,7 @@
# define MREMAP_MAYMOVE 1
# define MREMAP_FIXED 2
# define MREMAP_DONTUNMAP 4
# define OVERCOMMIT_GUESS 0
# define OVERCOMMIT_ALWAYS 1
@ -85,6 +85,7 @@ static size_t syscall_arg__scnprintf_mremap_flags(char *bf, size_t size,
P_MREMAP_FLAG ( MAYMOVE ) ;
P_MREMAP_FLAG ( FIXED ) ;
P_MREMAP_FLAG ( DONTUNMAP ) ;
# undef P_MREMAP_FLAG
if ( flags )