Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xcap
xcap-capability-linux
Commits
99fa00f6
Commit
99fa00f6
authored
Dec 05, 2018
by
Vikram Narayanan
Browse files
lcds: Remove old unused lcd init syscalls
parent
42c1246d
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/linux/syscalls.h
View file @
99fa00f6
...
...
@@ -898,7 +898,4 @@ asmlinkage long sys_copy_file_range(int fd_in, loff_t __user *off_in,
size_t
len
,
unsigned
int
flags
);
asmlinkage
long
sys_mlock2
(
unsigned
long
start
,
size_t
len
,
int
flags
);
asmlinkage
long
sys_init_lcd
(
void
__user
*
umod
,
unsigned
long
len
,
const
char
__user
*
uargs
);
#endif
kernel/module.c
View file @
99fa00f6
...
...
@@ -3805,165 +3805,6 @@ static int load_module(struct load_info *info, const char __user *uargs,
return
err
;
}
#ifdef CONFIG_LCD
static
int
load_lcd
(
struct
load_info
*
info
,
const
char
__user
*
uargs
,
int
flags
)
{
struct
lcd
*
lcd
;
struct
module
*
mod
;
long
err
;
err
=
module_sig_check
(
info
);
if
(
err
)
goto
free_copy
;
err
=
elf_header_check
(
info
);
if
(
err
)
goto
free_copy
;
/* Figure out module layout, and allocate all the memory. */
mod
=
layout_and_allocate
(
info
,
flags
,
for_lcd
);
if
(
IS_ERR
(
mod
))
{
err
=
PTR_ERR
(
mod
);
goto
free_copy
;
}
/* Reserve our place in the list. */
err
=
add_unformed_module
(
mod
);
if
(
err
)
goto
free_module
;
#ifdef CONFIG_MODULE_SIG
mod
->
sig_ok
=
info
->
sig_ok
;
if
(
!
mod
->
sig_ok
)
{
printk_once
(
KERN_NOTICE
"%s: module verification failed: signature and/or"
" required key missing - tainting kernel
\n
"
,
mod
->
name
);
add_taint_module
(
mod
,
TAINT_FORCED_MODULE
,
LOCKDEP_STILL_OK
);
}
#endif
/* To avoid stressing percpu allocator, do this once we're unique. */
err
=
alloc_module_percpu
(
mod
,
info
);
if
(
err
)
goto
unlink_mod
;
/* Now module is in final location, initialize linked lists, etc. */
err
=
module_unload_init
(
mod
);
if
(
err
)
goto
unlink_mod
;
/* Now we've got everything in the final locations, we can
* find optional sections. */
find_module_sections
(
mod
,
info
);
err
=
check_module_license_and_versions
(
mod
);
if
(
err
)
goto
free_unload
;
/* Set up MODINFO_ATTR fields */
setup_modinfo
(
mod
,
info
);
/* Fix up syms, so that st_value is a pointer to location. */
err
=
simplify_symbols
(
mod
,
info
);
if
(
err
<
0
)
goto
free_modinfo
;
err
=
apply_relocations
(
mod
,
info
);
if
(
err
<
0
)
goto
free_modinfo
;
err
=
post_relocation
(
mod
,
info
,
for_lcd
);
if
(
err
<
0
)
goto
free_modinfo
;
flush_module_icache
(
mod
);
/* Now copy in args */
mod
->
args
=
strndup_user
(
uargs
,
~
0UL
>>
1
);
if
(
IS_ERR
(
mod
->
args
))
{
err
=
PTR_ERR
(
mod
->
args
);
goto
free_arch_cleanup
;
}
dynamic_debug_setup
(
info
->
debug
,
info
->
num_debug
);
/* Finally it's fully formed, ready to start executing. */
err
=
complete_formation
(
mod
,
info
);
if
(
err
)
goto
ddebug_cleanup
;
/* Module is ready to execute: parsing args may do that. */
err
=
parse_args
(
mod
->
name
,
mod
->
args
,
mod
->
kp
,
mod
->
num_kp
,
-
32768
,
32767
,
&
ddebug_dyndbg_module_param_cb
);
if
(
err
<
0
)
goto
bug_cleanup
;
/* Link in to syfs. */
err
=
mod_sysfs_setup
(
mod
,
info
,
mod
->
kp
,
mod
->
num_kp
);
if
(
err
<
0
)
goto
bug_cleanup
;
/* Get rid of temporary copy. */
free_copy
(
info
);
/* Done! */
trace_module_load
(
mod
);
return
do_init_module
(
mod
,
for_lcd
);
bug_cleanup:
/* module_bug_cleanup needs module_mutex protection */
mutex_lock
(
&
module_mutex
);
module_bug_cleanup
(
mod
);
mutex_unlock
(
&
module_mutex
);
ddebug_cleanup:
dynamic_debug_remove
(
info
->
debug
);
synchronize_sched
();
kfree
(
mod
->
args
);
free_arch_cleanup:
module_arch_cleanup
(
mod
);
free_modinfo:
free_modinfo
(
mod
);
free_unload:
module_unload_free
(
mod
);
unlink_mod:
mutex_lock
(
&
module_mutex
);
/* Unlink carefully: kallsyms could be walking list. */
list_del_rcu
(
&
mod
->
list
);
wake_up_all
(
&
module_wq
);
mutex_unlock
(
&
module_mutex
);
free_module:
module_deallocate
(
mod
,
info
);
free_copy:
free_copy
(
info
);
return
err
;
}
#endif
#ifdef CONFIG_LCD
SYSCALL_DEFINE3
(
init_lcd
,
void
__user
*
,
umod
,
unsigned
long
,
len
,
const
char
__user
*
,
uargs
)
{
int
err
;
struct
load_info
info
=
{
};
err
=
may_init_module
();
if
(
err
)
return
err
;
pr_debug
(
"init_module: umod=%p, len=%lu, uargs=%p
\n
"
,
umod
,
len
,
uargs
);
err
=
copy_module_from_user
(
umod
,
len
,
&
info
);
if
(
err
)
return
err
;
return
load_lcd
(
&
info
,
uargs
,
0
);
}
#endif
int
do_sys_init_module
(
void
__user
*
umod
,
unsigned
long
len
,
const
char
__user
*
uargs
,
int
for_lcd
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment