]> git.pld-linux.org Git - packages/kernel.git/blob - android-enable-building-binder-as-module.patch
26da1d1ea8542ffe9206c1da7eb77fd44cb3616b
[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/security/security.c
67 +++ b/security/security.c
68 @@ -752,24 +752,28 @@ int security_binder_set_context_mgr(cons
69  {
70         return call_int_hook(binder_set_context_mgr, 0, mgr);
71  }
72 +EXPORT_SYMBOL_GPL(security_binder_set_context_mgr);
73  
74  int security_binder_transaction(const struct cred *from,
75                                 const struct cred *to)
76  {
77         return call_int_hook(binder_transaction, 0, from, to);
78  }
79 +EXPORT_SYMBOL_GPL(security_binder_transaction);
80  
81  int security_binder_transfer_binder(const struct cred *from,
82                                     const struct cred *to)
83  {
84         return call_int_hook(binder_transfer_binder, 0, from, to);
85  }
86 +EXPORT_SYMBOL_GPL(security_binder_transfer_binder);
87  
88  int security_binder_transfer_file(const struct cred *from,
89                                   const struct cred *to, struct file *file)
90  {
91         return call_int_hook(binder_transfer_file, 0, from, to, file);
92  }
93 +EXPORT_SYMBOL_GPL(security_binder_transfer_file);
94  
95  int security_ptrace_access_check(struct task_struct *child, unsigned int mode)
96  {
97 --- a/ipc/namespace.c~  2022-12-11 23:15:18.000000000 +0100
98 +++ b/ipc/namespace.c   2022-12-29 16:10:27.771070995 +0100
99 @@ -188,6 +188,7 @@
100                         schedule_work(&free_ipc_work);
101         }
102  }
103 +EXPORT_SYMBOL_GPL(put_ipc_ns);
104  
105  static inline struct ipc_namespace *to_ipc_ns(struct ns_common *ns)
106  {
107 --- a/kernel/sched/wait.c~      2022-12-11 23:15:18.000000000 +0100
108 +++ b/kernel/sched/wait.c       2022-12-29 16:11:51.746470281 +0100
109 @@ -243,6 +243,7 @@
110         /* POLLFREE must have cleared the queue. */
111         WARN_ON_ONCE(waitqueue_active(wq_head));
112  }
113 +EXPORT_SYMBOL_GPL(__wake_up_pollfree);
114  
115  /*
116   * Note: we use "set_current_state()" _after_ the wait-queue add,
117 --- a/ipc/msgutil.c~    2022-12-11 23:15:18.000000000 +0100
118 +++ b/ipc/msgutil.c     2022-12-29 16:22:49.139136583 +0100
119 @@ -33,6 +33,7 @@
120         .ns.ops = &ipcns_operations,
121  #endif
122  };
123 +EXPORT_SYMBOL_GPL(init_ipc_ns);
124  
125  struct msg_msgseg {
126         struct msg_msgseg *next;
127 --- linux-6.3/mm/memory.c.orig  2023-04-23 21:02:52.000000000 +0200
128 +++ linux-6.3/mm/memory.c       2023-04-26 10:57:23.873394940 +0200
129 @@ -1728,6 +1728,7 @@
130         mmu_notifier_invalidate_range_end(&range);
131         tlb_finish_mmu(&tlb);
132  }
133 +EXPORT_SYMBOL_GPL(zap_page_range_single);
134  
135  /**
136   * zap_vma_ptes - remove ptes mapping the vma
This page took 0.047928 seconds and 2 git commands to generate.