]> git.pld-linux.org Git - packages/kernel.git/blob - android-enable-building-binder-as-module.patch
- enable and build android binder as module
[packages/kernel.git] / android-enable-building-binder-as-module.patch
1 --- a/drivers/android/Kconfig
2 +++ b/drivers/android/Kconfig
3 @@ -2,7 +2,7 @@
4  menu "Android"
5  
6  config ANDROID_BINDER_IPC
7 -       bool "Android Binder IPC Driver"
8 +       tristate "Android Binder IPC Driver"
9         depends on MMU
10         default n
11         help
12 --- a/drivers/android/Makefile
13 +++ b/drivers/android/Makefile
14 @@ -1,6 +1,7 @@
15  # SPDX-License-Identifier: GPL-2.0-only
16  ccflags-y += -I$(src)                  # needed for trace events
17  
18 -obj-$(CONFIG_ANDROID_BINDERFS)         += binderfs.o
19 -obj-$(CONFIG_ANDROID_BINDER_IPC)       += binder.o binder_alloc.o
20 -obj-$(CONFIG_ANDROID_BINDER_IPC_SELFTEST) += binder_alloc_selftest.o
21 +obj-$(CONFIG_ANDROID_BINDER_IPC)       += binder_linux.o
22 +binder_linux-y := binder.o binder_alloc.o
23 +binder_linux-$(CONFIG_ANDROID_BINDERFS)        += binderfs.o
24 +binder_linux-$(CONFIG_ANDROID_BINDER_IPC_SELFTEST) += binder_alloc_selftest.o
25 --- a/drivers/android/binder_alloc.c
26 +++ b/drivers/android/binder_alloc.c
27 @@ -38,7 +38,7 @@ enum {
28  };
29  static uint32_t binder_alloc_debug_mask = BINDER_DEBUG_USER_ERROR;
30  
31 -module_param_named(debug_mask, binder_alloc_debug_mask,
32 +module_param_named(alloc_debug_mask, binder_alloc_debug_mask,
33                    uint, 0644);
34  
35  #define binder_alloc_debug(mask, x...) \
36 --- a/fs/file.c
37 +++ b/fs/file.c
38 @@ -813,6 +813,7 @@ struct file *close_fd_get_file(unsigned
39  
40         return file;
41  }
42 +EXPORT_SYMBOL_GPL(close_fd_get_file);
43  
44  void do_close_on_exec(struct files_struct *files)
45  {
46 --- a/kernel/sched/core.c
47 +++ b/kernel/sched/core.c
48 @@ -7052,6 +7052,7 @@ static bool is_nice_reduction(const stru
49  
50         return (nice_rlim <= task_rlimit(p, RLIMIT_NICE));
51  }
52 +EXPORT_SYMBOL_GPL(can_nice);
53  
54  /*
55   * can_nice - check if a task can reduce its nice value
56 --- a/kernel/task_work.c
57 +++ b/kernel/task_work.c
58 @@ -73,6 +73,7 @@ int task_work_add(struct task_struct *ta
59  
60         return 0;
61  }
62 +EXPORT_SYMBOL_GPL(task_work_add);
63  
64  /**
65   * task_work_cancel_match - cancel a pending work added by task_work_add()
66 --- a/mm/memory.c
67 +++ b/mm/memory.c
68 @@ -1757,6 +1757,7 @@ void zap_page_range(struct vm_area_struc
69         mmu_notifier_invalidate_range_end(&range);
70         tlb_finish_mmu(&tlb);
71  }
72 +EXPORT_SYMBOL_GPL(zap_page_range);
73  
74  /**
75   * zap_page_range_single - remove user pages in a given range
76 --- a/security/security.c
77 +++ b/security/security.c
78 @@ -752,24 +752,28 @@ int security_binder_set_context_mgr(cons
79  {
80         return call_int_hook(binder_set_context_mgr, 0, mgr);
81  }
82 +EXPORT_SYMBOL_GPL(security_binder_set_context_mgr);
83  
84  int security_binder_transaction(const struct cred *from,
85                                 const struct cred *to)
86  {
87         return call_int_hook(binder_transaction, 0, from, to);
88  }
89 +EXPORT_SYMBOL_GPL(security_binder_transaction);
90  
91  int security_binder_transfer_binder(const struct cred *from,
92                                     const struct cred *to)
93  {
94         return call_int_hook(binder_transfer_binder, 0, from, to);
95  }
96 +EXPORT_SYMBOL_GPL(security_binder_transfer_binder);
97  
98  int security_binder_transfer_file(const struct cred *from,
99                                   const struct cred *to, struct file *file)
100  {
101         return call_int_hook(binder_transfer_file, 0, from, to, file);
102  }
103 +EXPORT_SYMBOL_GPL(security_binder_transfer_file);
104  
105  int security_ptrace_access_check(struct task_struct *child, unsigned int mode)
106  {
This page took 0.053935 seconds and 3 git commands to generate.