diff --git a/pkg/debian/kernel/0001-Export-symbols-needed-by-Android-drivers.patch b/pkg/debian/kernel/0001-Export-symbols-needed-by-Android-drivers.patch index ff8a99b06..c1b5d690c 100644 --- a/pkg/debian/kernel/0001-Export-symbols-needed-by-Android-drivers.patch +++ b/pkg/debian/kernel/0001-Export-symbols-needed-by-Android-drivers.patch @@ -1,4 +1,4 @@ -From 26b30d0e613aa61df7cb5105c52a68f254b52c01 Mon Sep 17 00:00:00 2001 +From 2cd850987436405547384feb707200c7dad4a675 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 7 Sep 2020 02:51:53 +0100 Subject: [PATCH 1/2] Export symbols needed by Android drivers @@ -20,10 +20,10 @@ Export the currently un-exported symbols they depend on. 7 files changed, 10 insertions(+) diff --git a/fs/file.c b/fs/file.c -index 3bcc1ecc314a..6ff78a4c27a9 100644 +index 7893ea161d770..066f90a4f572f 100644 --- a/fs/file.c +++ b/fs/file.c -@@ -813,6 +813,7 @@ struct file *close_fd_get_file(unsigned int fd) +@@ -814,6 +814,7 @@ struct file *close_fd_get_file(unsigned int fd) return file; } @@ -32,10 +32,10 @@ index 3bcc1ecc314a..6ff78a4c27a9 100644 void do_close_on_exec(struct files_struct *files) { diff --git a/kernel/sched/core.c b/kernel/sched/core.c -index ee28253c9ac0..37667d4aaac7 100644 +index 0d18c3969f904..d1e20b1aad9c3 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -7052,6 +7052,7 @@ static bool is_nice_reduction(const struct task_struct *p, const int nice) +@@ -7183,6 +7183,7 @@ static bool is_nice_reduction(const struct task_struct *p, const int nice) return (nice_rlim <= task_rlimit(p, RLIMIT_NICE)); } @@ -44,10 +44,10 @@ index ee28253c9ac0..37667d4aaac7 100644 /* * can_nice - check if a task can reduce its nice value diff --git a/kernel/sched/wait.c b/kernel/sched/wait.c -index 9860bb9a847c..ad76d49bf4e1 100644 +index 133b74730738b..a2a3381ede737 100644 --- a/kernel/sched/wait.c +++ b/kernel/sched/wait.c -@@ -243,6 +243,7 @@ void __wake_up_pollfree(struct wait_queue_head *wq_head) +@@ -247,6 +247,7 @@ void __wake_up_pollfree(struct wait_queue_head *wq_head) /* POLLFREE must have cleared the queue. */ WARN_ON_ONCE(waitqueue_active(wq_head)); } @@ -56,7 +56,7 @@ index 9860bb9a847c..ad76d49bf4e1 100644 /* * Note: we use "set_current_state()" _after_ the wait-queue add, diff --git a/kernel/task_work.c b/kernel/task_work.c -index dff75bcde151..5f9a42a388f1 100644 +index 065e1ef8fc8d7..7d06ea82a53e4 100644 --- a/kernel/task_work.c +++ b/kernel/task_work.c @@ -73,6 +73,7 @@ int task_work_add(struct task_struct *task, struct callback_head *work, @@ -68,34 +68,34 @@ index dff75bcde151..5f9a42a388f1 100644 /** * task_work_cancel_match - cancel a pending work added by task_work_add() diff --git a/mm/memory.c b/mm/memory.c -index a78814413ac0..c48cca22b9f4 100644 +index 01a23ad48a042..8762b48854243 100644 --- a/mm/memory.c +++ b/mm/memory.c -@@ -1757,6 +1757,7 @@ void zap_page_range(struct vm_area_struct *vma, unsigned long start, +@@ -1728,6 +1728,7 @@ void zap_page_range_single(struct vm_area_struct *vma, unsigned long address, mmu_notifier_invalidate_range_end(&range); tlb_finish_mmu(&tlb); } -+EXPORT_SYMBOL_GPL(zap_page_range); ++EXPORT_SYMBOL_GPL(zap_page_range_single); /** - * zap_page_range_single - remove user pages in a given range + * zap_vma_ptes - remove ptes mapping the vma diff --git a/mm/shmem.c b/mm/shmem.c -index 42e5888bf84d..afa1c0999644 100644 +index 448f393d8ab2b..b14ac0867f27d 100644 --- a/mm/shmem.c +++ b/mm/shmem.c -@@ -4245,6 +4245,7 @@ int shmem_zero_setup(struct vm_area_struct *vma) +@@ -4318,6 +4318,7 @@ int shmem_zero_setup(struct vm_area_struct *vma) return 0; } +EXPORT_SYMBOL_GPL(shmem_zero_setup); /** - * shmem_read_mapping_page_gfp - read into page cache, using specified page allocation flags. + * shmem_read_folio_gfp - read into page cache, using specified page allocation flags. diff --git a/security/security.c b/security/security.c -index 4b95de24bc8d..515d9509c001 100644 +index cf6cc576736f3..5401a0c5a1472 100644 --- a/security/security.c +++ b/security/security.c -@@ -752,24 +752,28 @@ int security_binder_set_context_mgr(const struct cred *mgr) +@@ -782,24 +782,28 @@ int security_binder_set_context_mgr(const struct cred *mgr) { return call_int_hook(binder_set_context_mgr, 0, mgr); } @@ -125,5 +125,5 @@ index 4b95de24bc8d..515d9509c001 100644 int security_ptrace_access_check(struct task_struct *child, unsigned int mode) { -- -2.38.0 +2.40.1 diff --git a/pkg/debian/kernel/0001-Revert-integrity-Only-use-machine-keyring-when-uefi_.patch b/pkg/debian/kernel/0001-Revert-integrity-Only-use-machine-keyring-when-uefi_.patch index 68a6010bb..00f689868 100644 --- a/pkg/debian/kernel/0001-Revert-integrity-Only-use-machine-keyring-when-uefi_.patch +++ b/pkg/debian/kernel/0001-Revert-integrity-Only-use-machine-keyring-when-uefi_.patch @@ -1,4 +1,4 @@ -From 2ad8da4c6f2924447824cfae9a1aafb78c0caaee Mon Sep 17 00:00:00 2001 +From e79c4bebdeeb42325394c95fa13f36042f9a34fa Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 26 Aug 2022 21:24:36 +0200 Subject: [PATCH] Revert "integrity: Only use machine keyring when @@ -22,7 +22,7 @@ See https://github.com/linux-surface/linux-surface/issues/906. 4 files changed, 2 insertions(+), 23 deletions(-) diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c -index 8a82a6c7f48a..c0c2fd0a6c71 100644 +index f2193c531f4a4..4a1d0bb2ffd42 100644 --- a/security/integrity/digsig.c +++ b/security/integrity/digsig.c @@ -113,7 +113,7 @@ static int __init __integrity_init_keyring(const unsigned int id, @@ -35,7 +35,7 @@ index 8a82a6c7f48a..c0c2fd0a6c71 100644 if (id == INTEGRITY_KEYRING_IMA) load_module_cert(keyring[id]); diff --git a/security/integrity/integrity.h b/security/integrity/integrity.h -index 7167a6e99bdc..1dbb494c86c0 100644 +index 7167a6e99bdc0..1dbb494c86c07 100644 --- a/security/integrity/integrity.h +++ b/security/integrity/integrity.h @@ -320,14 +320,9 @@ static inline void __init add_to_platform_keyring(const char *source, @@ -54,7 +54,7 @@ index 7167a6e99bdc..1dbb494c86c0 100644 -} #endif diff --git a/security/integrity/platform_certs/keyring_handler.c b/security/integrity/platform_certs/keyring_handler.c -index 8a1124e4d769..b22e0125a483 100644 +index 8a1124e4d7696..b22e0125a4833 100644 --- a/security/integrity/platform_certs/keyring_handler.c +++ b/security/integrity/platform_certs/keyring_handler.c @@ -61,7 +61,7 @@ __init efi_element_handler_t get_handler_for_db(const efi_guid_t *sig_type) @@ -67,7 +67,7 @@ index 8a1124e4d769..b22e0125a483 100644 else return add_to_platform_keyring; diff --git a/security/integrity/platform_certs/machine_keyring.c b/security/integrity/platform_certs/machine_keyring.c -index 7aaed7950b6e..09fd8f20c756 100644 +index 7aaed7950b6e3..09fd8f20c7560 100644 --- a/security/integrity/platform_certs/machine_keyring.c +++ b/security/integrity/platform_certs/machine_keyring.c @@ -8,8 +8,6 @@ @@ -98,5 +98,5 @@ index 7aaed7950b6e..09fd8f20c756 100644 - return trust_mok; -} -- -2.38.0 +2.40.1 diff --git a/pkg/debian/kernel/0002-android-Enable-building-ashmem-and-binder-as-modules.patch b/pkg/debian/kernel/0002-android-Enable-building-ashmem-and-binder-as-modules.patch index f16c77d80..5383f8dfe 100644 --- a/pkg/debian/kernel/0002-android-Enable-building-ashmem-and-binder-as-modules.patch +++ b/pkg/debian/kernel/0002-android-Enable-building-ashmem-and-binder-as-modules.patch @@ -1,4 +1,4 @@ -From de94f5f892e13432abc0be24aac6fc0c34aed461 Mon Sep 17 00:00:00 2001 +From bcc03c72770a9602dcf6afe560346ef02ae84e1e Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 22 Jun 2018 17:27:00 +0100 Subject: [PATCH 2/2] android: Enable building ashmem and binder as modules @@ -26,7 +26,7 @@ Consequently, the ashmem part of this patch has been removed. 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/android/Kconfig b/drivers/android/Kconfig -index 07aa8ae0a058..94a3a86f9bd4 100644 +index 07aa8ae0a058c..94a3a86f9bd4f 100644 --- a/drivers/android/Kconfig +++ b/drivers/android/Kconfig @@ -2,7 +2,7 @@ @@ -39,7 +39,7 @@ index 07aa8ae0a058..94a3a86f9bd4 100644 default n help diff --git a/drivers/android/Makefile b/drivers/android/Makefile -index c9d3d0c99c25..55411d9a9c2a 100644 +index c9d3d0c99c257..55411d9a9c2a1 100644 --- a/drivers/android/Makefile +++ b/drivers/android/Makefile @@ -1,6 +1,7 @@ @@ -54,7 +54,7 @@ index c9d3d0c99c25..55411d9a9c2a 100644 +binder_linux-$(CONFIG_ANDROID_BINDERFS) += binderfs.o +binder_linux-$(CONFIG_ANDROID_BINDER_IPC_SELFTEST) += binder_alloc_selftest.o diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c -index 9b1778c00610..48afb2c5b8bf 100644 +index 55a3c3c2409f0..7014ec2f212b5 100644 --- a/drivers/android/binder_alloc.c +++ b/drivers/android/binder_alloc.c @@ -38,7 +38,7 @@ enum { @@ -67,5 +67,5 @@ index 9b1778c00610..48afb2c5b8bf 100644 #define binder_alloc_debug(mask, x...) \ -- -2.38.0 +2.40.1