|
@@ -152,33 +152,33 @@ runs:
|
|
|
# our build matrix predate it, so fall back to a no-padding definition
|
|
# our build matrix predate it, so fall back to a no-padding definition
|
|
|
# when the real header/macro isn't present. This is version-agnostic and
|
|
# when the real header/macro isn't present. This is version-agnostic and
|
|
|
# a no-op wherever the real header already provides it.
|
|
# a no-op wherever the real header already provides it.
|
|
|
- if grep -q 'VMA_PAD_START(' fs/proc/task_mmu.c && ! grep -qE '#include <linux/pgsize_migration(_inline)?\.h>|define VMA_PAD_START' fs/proc/task_mmu.c; then
|
|
|
|
|
- sed -i '1a #ifndef VMA_PAD_START\n#define VMA_PAD_START(vma) ((vma)->vm_end)\n#endif' fs/proc/task_mmu.c
|
|
|
|
|
- echo "Added VMA_PAD_START fallback definition to fs/proc/task_mmu.c"
|
|
|
|
|
- fi
|
|
|
|
|
|
|
+ #if grep -q 'VMA_PAD_START(' fs/proc/task_mmu.c && ! grep -qE '#include <linux/pgsize_migration(_inline)?\.h>|define VMA_PAD_START' fs/proc/task_mmu.c; then
|
|
|
|
|
+ # sed -i '1a #ifndef VMA_PAD_START\n#define VMA_PAD_START(vma) ((vma)->vm_end)\n#endif' fs/proc/task_mmu.c
|
|
|
|
|
+ # echo "Added VMA_PAD_START fallback definition to fs/proc/task_mmu.c"
|
|
|
|
|
+ #fi
|
|
|
|
|
|
|
|
# Same story for __fold_filemap_fixup_entry(), declared in page_size_compat.h.
|
|
# Same story for __fold_filemap_fixup_entry(), declared in page_size_compat.h.
|
|
|
- if grep -q '__fold_filemap_fixup_entry' fs/proc/task_mmu.c && ! grep -q '#include <linux/page_size_compat.h>' fs/proc/task_mmu.c; then
|
|
|
|
|
- sed -i '/#include <linux\/pkeys.h>/a #include <linux/page_size_compat.h>' fs/proc/task_mmu.c
|
|
|
|
|
- echo "Added page_size_compat.h include to fs/proc/task_mmu.c"
|
|
|
|
|
- fi
|
|
|
|
|
|
|
+ #if grep -q '__fold_filemap_fixup_entry' fs/proc/task_mmu.c && ! grep -q '#include <linux/page_size_compat.h>' fs/proc/task_mmu.c; then
|
|
|
|
|
+ # sed -i '/#include <linux\/pkeys.h>/a #include <linux/page_size_compat.h>' fs/proc/task_mmu.c
|
|
|
|
|
+ # echo "Added page_size_compat.h include to fs/proc/task_mmu.c"
|
|
|
|
|
+ #fi
|
|
|
|
|
|
|
|
# Fix set_nameidata() calls for 5.10 kernels.
|
|
# Fix set_nameidata() calls for 5.10 kernels.
|
|
|
# The SUSFS patch adds set_nameidata(nd, old_dfd, fake_filename, NULL) with 4 args,
|
|
# The SUSFS patch adds set_nameidata(nd, old_dfd, fake_filename, NULL) with 4 args,
|
|
|
# but 5.10 kernels only have 3-param set_nameidata(p, dfd, name) — no root param.
|
|
# but 5.10 kernels only have 3-param set_nameidata(p, dfd, name) — no root param.
|
|
|
- if [[ "${{ inputs.version }}" == "android12-5.10" || "${{ inputs.version }}" == "android13-5.10" ]]; then
|
|
|
|
|
- if grep -q 'set_nameidata(nd, old_dfd, fake_filename, NULL)' fs/namei.c; then
|
|
|
|
|
- echo "Fixing set_nameidata calls for 5.10 (4-arg -> 3-arg)"
|
|
|
|
|
- sed -i 's/set_nameidata(nd, old_dfd, fake_filename, NULL)/set_nameidata(nd, old_dfd, fake_filename)/g' fs/namei.c
|
|
|
|
|
- fi
|
|
|
|
|
- fi
|
|
|
|
|
|
|
+ #if [[ "${{ inputs.version }}" == "android12-5.10" || "${{ inputs.version }}" == "android13-5.10" ]]; then
|
|
|
|
|
+ # if grep -q 'set_nameidata(nd, old_dfd, fake_filename, NULL)' fs/namei.c; then
|
|
|
|
|
+ # echo "Fixing set_nameidata calls for 5.10 (4-arg -> 3-arg)"
|
|
|
|
|
+ # sed -i 's/set_nameidata(nd, old_dfd, fake_filename, NULL)/set_nameidata(nd, old_dfd, fake_filename)/g' fs/namei.c
|
|
|
|
|
+ # fi
|
|
|
|
|
+ #fi
|
|
|
|
|
|
|
|
# Fix getname_flags() arity for 6.12: SUSFS patch emits 3-arg
|
|
# Fix getname_flags() arity for 6.12: SUSFS patch emits 3-arg
|
|
|
# getname_flags(filename, lookup_flags, NULL) but 6.12 fs.h declares
|
|
# getname_flags(filename, lookup_flags, NULL) but 6.12 fs.h declares
|
|
|
# only 2-arg getname_flags(const char *, int). Drop the trailing NULL.
|
|
# only 2-arg getname_flags(const char *, int). Drop the trailing NULL.
|
|
|
- if [[ "${{ inputs.version }}" == "android16-6.12" ]]; then
|
|
|
|
|
- if grep -q 'getname_flags(filename, lookup_flags, NULL)' fs/open.c; then
|
|
|
|
|
- echo "Fixing getname_flags 3-arg -> 2-arg for 6.12"
|
|
|
|
|
- sed -i 's/getname_flags(filename, lookup_flags, NULL)/getname_flags(filename, lookup_flags)/g' fs/open.c
|
|
|
|
|
- fi
|
|
|
|
|
- fi
|
|
|
|
|
|
|
+ #if [[ "${{ inputs.version }}" == "android16-6.12" ]]; then
|
|
|
|
|
+ # if grep -q 'getname_flags(filename, lookup_flags, NULL)' fs/open.c; then
|
|
|
|
|
+ # echo "Fixing getname_flags 3-arg -> 2-arg for 6.12"
|
|
|
|
|
+ # sed -i 's/getname_flags(filename, lookup_flags, NULL)/getname_flags(filename, lookup_flags)/g' fs/open.c
|
|
|
|
|
+ # fi
|
|
|
|
|
+ #fi
|