History

Merge tag 'mm-hotfixes-stable-2023-03-24-17-09' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull misc fixes from Andrew Morton: "21 hotfixes, 8 of which are cc:stable. 11 are for MM, the remainder are for other subsystems" * tag 'mm-hotfixes-stable-2023-03-24-17-09' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (21 commits) mm: mmap: remove newline at the end of the trace mailmap: add entries for Richard Leitner kcsan: avoid passing -g for test kfence: avoid passing -g for test mm: kfence: fix using kfence_metadata without initialization in show_object() lib: dhry: fix unstable smp_processor_id(_) usage mailmap: add entry for Enric Balletbo i Serra mailmap: map Sai Prakash Ranjan's old address to his current one mailmap: map Rajendra Nayak's old address to his current one Revert "kasan: drop skip_kasan_poison variable in free_pages_prepare" mailmap: add entry for Tobias Klauser kasan, powerpc: don't rename memintrinsics if compiler adds prefixes mm/ksm: fix race with VMA iteration and mm_struct teardown kselftest: vm: fix unused variable warning mm: fix error handling for map_deny_write_exec mm: deduplicate error handling for map_deny_write_exec checksyscalls: ignore fstat to silence build warning on LoongArch nilfs2: fix kernel-infoleak in nilfs_ioctl_wrap_copy() test_maple_tree: add more testing for mas_empty_area() maple_tree: fix mas_skip_node() end slot detection ...

Linus Torvalds committed 3 years ago

Commit 65aca322 parents 90c8ce3 d0072ca19 files · +140 −53Browse files

Unified · Split

19 files
  1. .mailmap +11 −0
  2. arch/powerpc/include/asm/kasan.h +1 −1
  3. arch/powerpc/include/asm/string.h +11 −4
  4. arch/powerpc/kernel/prom_init_check.sh +7 −2
  5. fs/nilfs2/ioctl.c +1 −1
  6. include/trace/events/mmap.h +2 −2
  7. kernel/kcsan/Makefile +1 −1
  8. lib/dhry_run.c +4 −2
  9. lib/maple_tree.c +5 −19
  10. lib/test_maple_tree.c +48 −0
  11. mm/kfence/Makefile +1 −1
  12. mm/kfence/core.c +8 −2
  13. mm/ksm.c +9 −2
  14. mm/mmap.c +1 −6
  15. mm/mprotect.c +1 −1
  16. mm/page_alloc.c +2 −1
  17. mm/vmalloc.c +23 −5
  18. scripts/checksyscalls.sh +3 −1
  19. tools/testing/selftests/mm/mdwe_test.c +1 −2
.mailmap+11−0
@@ -133,6 +133,8 @@ Dmitry Safonov <0x7f454c46@gmail.com> <dsafonov@virtuozzo.com> · 132 unmodified lines
133133 Domen Puncer <domen@coderock.org>
134134 Douglas Gilbert <dougg@torque.net>
135135 Ed L. Cashin <ecashin@coraid.com>
136+Enric Balletbo i Serra <eballetbo@kernel.org> <enric.balletbo@collabora.com>
137+Enric Balletbo i Serra <eballetbo@kernel.org> <eballetbo@iseebcn.com>
136138 Erik Kaneda <erik.kaneda@intel.com> <erik.schmauss@intel.com>
137139 Eugen Hristev <eugen.hristev@collabora.com> <eugen.hristev@microchip.com>
138140 Evgeniy Polyakov <johnpol@2ka.mipt.ru>
@@ -379,6 +381,7 @@ Quentin Monnet <quentin@isovalent.com> <quentin.monnet@netronome.com> · 240 unmodified lines
379381 Quentin Perret <qperret@qperret.net> <quentin.perret@arm.com>
380382 Rafael J. Wysocki <rjw@rjwysocki.net> <rjw@sisk.pl>
381383 Rajeev Nandan <quic_rajeevny@quicinc.com> <rajeevny@codeaurora.org>
384+Rajendra Nayak <quic_rjendra@quicinc.com> <rnayak@codeaurora.org>
382385 Rajesh Shah <rajesh.shah@intel.com>
383386 Ralf Baechle <ralf@linux-mips.org>
384387 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
@@ -387,6 +390,9 @@ Rémi Denis-Courmont <rdenis@simphalempin.com> · 2 unmodified lines
387390 Ricardo Ribalda <ribalda@kernel.org> <ricardo@ribalda.com>
388391 Ricardo Ribalda <ribalda@kernel.org> Ricardo Ribalda Delgado <ribalda@kernel.org>
389392 Ricardo Ribalda <ribalda@kernel.org> <ricardo.ribalda@gmail.com>
393+Richard Leitner <richard.leitner@linux.dev> <dev@g0hl1n.net>
394+Richard Leitner <richard.leitner@linux.dev> <me@g0hl1n.net>
395+Richard Leitner <richard.leitner@linux.dev> <richard.leitner@skidata.com>
390396 Robert Foss <rfoss@kernel.org> <robert.foss@linaro.org>
391397 Roman Gushchin <roman.gushchin@linux.dev> <guro@fb.com>
392398 Roman Gushchin <roman.gushchin@linux.dev> <guroan@gmail.com>
@@ -397,6 +403,7 @@ Ross Zwisler <zwisler@kernel.org> <ross.zwisler@linux.intel.com> · 4 unmodified lines
397403 Rudolf Marek <R.Marek@sh.cvut.cz>
398404 Rui Saraiva <rmps@joel.ist.utl.pt>
399405 Sachin P Sant <ssant@in.ibm.com>
406+Sai Prakash Ranjan <quic_saipraka@quicinc.com> <saiprakash.ranjan@codeaurora.org>
400407 Sakari Ailus <sakari.ailus@linux.intel.com> <sakari.ailus@iki.fi>
401408 Sam Ravnborg <sam@mars.ravnborg.org>
402409 Sankeerth Billakanti <quic_sbillaka@quicinc.com> <sbillaka@codeaurora.org>
@@ -437,6 +444,10 @@ Thomas Graf <tgraf@suug.ch> · 34 unmodified lines
437444 Thomas Körper <socketcan@esd.eu> <thomas.koerper@esd.eu>
438445 Thomas Pedersen <twp@codeaurora.org>
439446 Tiezhu Yang <yangtiezhu@loongson.cn> <kernelpatch@126.com>
447+Tobias Klauser <tklauser@distanz.ch> <tobias.klauser@gmail.com>
448+Tobias Klauser <tklauser@distanz.ch> <klto@zhaw.ch>
449+Tobias Klauser <tklauser@distanz.ch> <tklauser@nuerscht.ch>
450+Tobias Klauser <tklauser@distanz.ch> <tklauser@xenon.tklauser.home>
440451 Todor Tomov <todor.too@gmail.com> <todor.tomov@linaro.org>
441452 Tony Luck <tony.luck@intel.com>
442453 TripleX Chung <xxx.phy@gmail.com> <triplex@zh-kernel.org>
arch/powerpc/include/asm/kasan.h+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 #ifndef __ASM_KASAN_H
33 #define __ASM_KASAN_H
44
5−#ifdef CONFIG_KASAN
5+#if defined(CONFIG_KASAN) && !defined(CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX)
66 #define _GLOBAL_KASAN(fn) _GLOBAL(__##fn)
77 #define _GLOBAL_TOC_KASAN(fn) _GLOBAL_TOC(__##fn)
88 #define EXPORT_SYMBOL_KASAN(fn) EXPORT_SYMBOL(__##fn)
arch/powerpc/include/asm/string.h+11−4
@@ -30,11 +30,17 @@ extern int memcmp(const void *,const void *,__kernel_size_t); · 29 unmodified lines
3030 extern void * memchr(const void *,int,__kernel_size_t);
3131 void memcpy_flushcache(void *dest, const void *src, size_t size);
3232
33+#ifdef CONFIG_KASAN
34+/* __mem variants are used by KASAN to implement instrumented meminstrinsics. */
35+#ifdef CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX
36+#define __memset memset
37+#define __memcpy memcpy
38+#define __memmove memmove
39+#else /* CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX */
3340 void *__memset(void *s, int c, __kernel_size_t count);
3441 void *__memcpy(void *to, const void *from, __kernel_size_t n);
3542 void *__memmove(void *to, const void *from, __kernel_size_t n);
36−
37−#if defined(CONFIG_KASAN) && !defined(__SANITIZE_ADDRESS__)
43+#ifndef __SANITIZE_ADDRESS__
3844 /*
3945 * For files that are not instrumented (e.g. mm/slub.c) we
4046 * should use not instrumented version of mem* functions.
@@ -46,8 +52,9 @@ void *__memmove(void *to, const void *from, __kernel_size_t n); · 5 unmodified lines
4652 #ifndef __NO_FORTIFY
4753 #define __NO_FORTIFY /* FORTIFY_SOURCE uses __builtin_memcpy, etc. */
4854 #endif
49−
50−#endif
55+#endif /* !__SANITIZE_ADDRESS__ */
56+#endif /* CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX */
57+#endif /* CONFIG_KASAN */
5158
5259 #ifdef CONFIG_PPC64
5360 #ifndef CONFIG_KASAN
arch/powerpc/kernel/prom_init_check.sh+7−2
@@ -13,8 +13,13 @@ · 12 unmodified lines
1313 # If you really need to reference something from prom_init.o add
1414 # it to the list below:
1515
16−grep "^CONFIG_KASAN=y$" ${KCONFIG_CONFIG} >/dev/null
17−if [ $? -eq 0 ]
16+has_renamed_memintrinsics()
17+{
18+ grep -q "^CONFIG_KASAN=y$" ${KCONFIG_CONFIG} && \
19+ ! grep -q "^CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX=y" ${KCONFIG_CONFIG}
20+}
21+
22+if has_renamed_memintrinsics
1823 then
1924 MEM_FUNCS="__memcpy __memset"
2025 else
fs/nilfs2/ioctl.c+1−1
@@ -71,7 +71,7 @@ static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs, · 70 unmodified lines
7171 if (argv->v_index > ~(__u64)0 - argv->v_nmembs)
7272 return -EINVAL;
7373
74− buf = (void *)__get_free_pages(GFP_NOFS, 0);
74+ buf = (void *)get_zeroed_page(GFP_NOFS);
7575 if (unlikely(!buf))
7676 return -ENOMEM;
7777 maxmembs = PAGE_SIZE / argv->v_size;
include/trace/events/mmap.h+2−2
@@ -35,7 +35,7 @@ TRACE_EVENT(vm_unmapped_area, · 34 unmodified lines
3535 __entry->align_offset = info->align_offset;
3636 ),
3737
38− TP_printk("addr=0x%lx err=%ld total_vm=0x%lx flags=0x%lx len=0x%lx lo=0x%lx hi=0x%lx mask=0x%lx ofs=0x%lx\n",
38+ TP_printk("addr=0x%lx err=%ld total_vm=0x%lx flags=0x%lx len=0x%lx lo=0x%lx hi=0x%lx mask=0x%lx ofs=0x%lx",
3939 IS_ERR_VALUE(__entry->addr) ? 0 : __entry->addr,
4040 IS_ERR_VALUE(__entry->addr) ? __entry->addr : 0,
4141 __entry->total_vm, __entry->flags, __entry->length,
@@ -110,7 +110,7 @@ TRACE_EVENT(exit_mmap, · 68 unmodified lines
110110 __entry->mt = &mm->mm_mt;
111111 ),
112112
113− TP_printk("mt_mod %p, DESTROY\n",
113+ TP_printk("mt_mod %p, DESTROY",
114114 __entry->mt
115115 )
116116 );
kernel/kcsan/Makefile+1−1
@@ -16,6 +16,6 @@ obj-y := core.o debugfs.o report.o · 15 unmodified lines
1616 KCSAN_INSTRUMENT_BARRIERS_selftest.o := y
1717 obj-$(CONFIG_KCSAN_SELFTEST) += selftest.o
1818
19−CFLAGS_kcsan_test.o := $(CFLAGS_KCSAN) -g -fno-omit-frame-pointer
19+CFLAGS_kcsan_test.o := $(CFLAGS_KCSAN) -fno-omit-frame-pointer
2020 CFLAGS_kcsan_test.o += $(DISABLE_STRUCTLEAK_PLUGIN)
2121 obj-$(CONFIG_KCSAN_KUNIT_TEST) += kcsan_test.o
lib/dhry_run.c+4−2
@@ -31,6 +31,7 @@ MODULE_PARM_DESC(iterations, · 30 unmodified lines
3131
3232 static void dhry_benchmark(void)
3333 {
34+ unsigned int cpu = get_cpu();
3435 int i, n;
3536
3637 if (iterations > 0) {
@@ -45,9 +46,10 @@ static void dhry_benchmark(void) · 8 unmodified lines
4546 }
4647
4748 report:
49+ put_cpu();
4850 if (n >= 0)
49− pr_info("CPU%u: Dhrystones per Second: %d (%d DMIPS)\n",
50− smp_processor_id(), n, n / DHRY_VAX);
51+ pr_info("CPU%u: Dhrystones per Second: %d (%d DMIPS)\n", cpu,
52+ n, n / DHRY_VAX);
5153 else if (n == -EAGAIN)
5254 pr_err("Please increase the number of iterations\n");
5355 else
lib/maple_tree.c+5−19
@@ -5099,35 +5099,21 @@ static inline bool mas_rewind_node(struct ma_state *mas) · 5098 unmodified lines
50995099 */
51005100 static inline bool mas_skip_node(struct ma_state *mas)
51015101 {
5102− unsigned char slot, slot_count;
5103− unsigned long *pivots;
5104− enum maple_type mt;
5102+ if (mas_is_err(mas))
5103+ return false;
51055104
5106− mt = mte_node_type(mas->node);
5107− slot_count = mt_slots[mt] - 1;
51085105 do {
51095106 if (mte_is_root(mas->node)) {
5110− slot = mas->offset;
5111− if (slot > slot_count) {
5107+ if (mas->offset >= mas_data_end(mas)) {
51125108 mas_set_err(mas, -EBUSY);
51135109 return false;
51145110 }
51155111 } else {
51165112 mas_ascend(mas);
5117− slot = mas->offset;
5118− mt = mte_node_type(mas->node);
5119− slot_count = mt_slots[mt] - 1;
51205113 }
5121− } while (slot > slot_count);
5122−
5123− mas->offset = ++slot;
5124− pivots = ma_pivots(mas_mn(mas), mt);
5125− if (slot > 0)
5126− mas->min = pivots[slot - 1] + 1;
5127−
5128− if (slot <= slot_count)
5129− mas->max = pivots[slot];
5114+ } while (mas->offset >= mas_data_end(mas));
51305115
5116+ mas->offset++;
51315117 return true;
51325118 }
51335119
lib/test_maple_tree.c+48−0
@@ -2670,6 +2670,49 @@ static noinline void check_empty_area_window(struct maple_tree *mt) · 2669 unmodified lines
26702670 rcu_read_unlock();
26712671 }
26722672
2673+static noinline void check_empty_area_fill(struct maple_tree *mt)
2674+{
2675+ const unsigned long max = 0x25D78000;
2676+ unsigned long size;
2677+ int loop, shift;
2678+ MA_STATE(mas, mt, 0, 0);
2679+
2680+ mt_set_non_kernel(99999);
2681+ for (shift = 12; shift <= 16; shift++) {
2682+ loop = 5000;
2683+ size = 1 << shift;
2684+ while (loop--) {
2685+ mas_set(&mas, 0);
2686+ mas_lock(&mas);
2687+ MT_BUG_ON(mt, mas_empty_area(&mas, 0, max, size) != 0);
2688+ MT_BUG_ON(mt, mas.last != mas.index + size - 1);
2689+ mas_store_gfp(&mas, (void *)size, GFP_KERNEL);
2690+ mas_unlock(&mas);
2691+ mas_reset(&mas);
2692+ }
2693+ }
2694+
2695+ /* No space left. */
2696+ size = 0x1000;
2697+ rcu_read_lock();
2698+ MT_BUG_ON(mt, mas_empty_area(&mas, 0, max, size) != -EBUSY);
2699+ rcu_read_unlock();
2700+
2701+ /* Fill a depth 3 node to the maximum */
2702+ for (unsigned long i = 629440511; i <= 629440800; i += 6)
2703+ mtree_store_range(mt, i, i + 5, (void *)i, GFP_KERNEL);
2704+ /* Make space in the second-last depth 4 node */
2705+ mtree_erase(mt, 631668735);
2706+ /* Make space in the last depth 4 node */
2707+ mtree_erase(mt, 629506047);
2708+ mas_reset(&mas);
2709+ /* Search from just after the gap in the second-last depth 4 */
2710+ rcu_read_lock();
2711+ MT_BUG_ON(mt, mas_empty_area(&mas, 629506048, 690000000, 0x5000) != 0);
2712+ rcu_read_unlock();
2713+ mt_set_non_kernel(0);
2714+}
2715+
26732716 static DEFINE_MTREE(tree);
26742717 static int maple_tree_seed(void)
26752718 {
@@ -2926,6 +2969,11 @@ static int maple_tree_seed(void) · 250 unmodified lines
29262969 check_empty_area_window(&tree);
29272970 mtree_destroy(&tree);
29282971
2972+ mt_init_flags(&tree, MT_FLAGS_ALLOC_RANGE);
2973+ check_empty_area_fill(&tree);
2974+ mtree_destroy(&tree);
2975+
2976+
29292977 #if defined(BENCH)
29302978 skip:
29312979 #endif
mm/kfence/Makefile+1−1
@@ -2,5 +2,5 @@ · 1 unmodified line
22
33 obj-y := core.o report.o
44
5−CFLAGS_kfence_test.o := -g -fno-omit-frame-pointer -fno-optimize-sibling-calls
5+CFLAGS_kfence_test.o := -fno-omit-frame-pointer -fno-optimize-sibling-calls
66 obj-$(CONFIG_KFENCE_KUNIT_TEST) += kfence_test.o
mm/kfence/core.c+8−2
@@ -726,10 +726,14 @@ static const struct seq_operations objects_sops = { · 725 unmodified lines
726726 };
727727 DEFINE_SEQ_ATTRIBUTE(objects);
728728
729−static int __init kfence_debugfs_init(void)
729+static int kfence_debugfs_init(void)
730730 {
731− struct dentry *kfence_dir = debugfs_create_dir("kfence", NULL);
731+ struct dentry *kfence_dir;
732732
733+ if (!READ_ONCE(kfence_enabled))
734+ return 0;
735+
736+ kfence_dir = debugfs_create_dir("kfence", NULL);
733737 debugfs_create_file("stats", 0444, kfence_dir, NULL, &stats_fops);
734738 debugfs_create_file("objects", 0400, kfence_dir, NULL, &objects_fops);
735739 return 0;
@@ -883,6 +887,8 @@ static int kfence_init_late(void) · 147 unmodified lines
883887 }
884888
885889 kfence_init_enable();
890+ kfence_debugfs_init();
891+
886892 return 0;
887893 }
888894
mm/ksm.c+9−2
@@ -988,9 +988,15 @@ static int unmerge_and_remove_all_rmap_items(void) · 987 unmodified lines
988988
989989 mm = mm_slot->slot.mm;
990990 mmap_read_lock(mm);
991+
992+ /*
993+ * Exit right away if mm is exiting to avoid lockdep issue in
994+ * the maple tree
995+ */
996+ if (ksm_test_exit(mm))
997+ goto mm_exiting;
998+
991999 for_each_vma(vmi, vma) {
992− if (ksm_test_exit(mm))
993− break;
9941000 if (!(vma->vm_flags & VM_MERGEABLE) || !vma->anon_vma)
9951001 continue;
9961002 err = unmerge_ksm_pages(vma,
@@ -999,6 +1005,7 @@ static int unmerge_and_remove_all_rmap_items(void) · 2 unmodified lines
9991005 goto error;
10001006 }
10011007
1008+mm_exiting:
10021009 remove_trailing_rmap_items(&mm_slot->rmap_list);
10031010 mmap_read_unlock(mm);
10041011
mm/mmap.c+1−6
@@ -2621,12 +2621,7 @@ cannot_expand: · 2620 unmodified lines
26212621
26222622 if (map_deny_write_exec(vma, vma->vm_flags)) {
26232623 error = -EACCES;
2624− if (file)
2625− goto close_and_free_vma;
2626− else if (vma->vm_file)
2627− goto unmap_and_free_vma;
2628− else
2629− goto free_vma;
2624+ goto close_and_free_vma;
26302625 }
26312626
26322627 /* Allow architectures to sanity-check the vm_flags */
mm/mprotect.c+1−1
@@ -805,7 +805,7 @@ static int do_mprotect_pkey(unsigned long start, size_t len, · 804 unmodified lines
805805
806806 if (map_deny_write_exec(vma, newflags)) {
807807 error = -EACCES;
808− goto out;
808+ break;
809809 }
810810
811811 /* Allow architectures to sanity-check the new flags */
mm/page_alloc.c+2−1
@@ -1398,6 +1398,7 @@ static __always_inline bool free_pages_prepare(struct page *page, · 1397 unmodified lines
13981398 unsigned int order, bool check_free, fpi_t fpi_flags)
13991399 {
14001400 int bad = 0;
1401+ bool skip_kasan_poison = should_skip_kasan_poison(page, fpi_flags);
14011402 bool init = want_init_on_free();
14021403
14031404 VM_BUG_ON_PAGE(PageTail(page), page);
@@ -1470,7 +1471,7 @@ static __always_inline bool free_pages_prepare(struct page *page, · 66 unmodified lines
14701471 * With hardware tag-based KASAN, memory tags must be set before the
14711472 * page becomes unavailable via debug_pagealloc or arch_free_page.
14721473 */
1473− if (!should_skip_kasan_poison(page, fpi_flags)) {
1474+ if (!skip_kasan_poison) {
14741475 kasan_poison_pages(page, order, init);
14751476
14761477 /* Memory is already initialized if KASAN did it internally. */
mm/vmalloc.c+23−5
@@ -2883,6 +2883,8 @@ vm_area_alloc_pages(gfp_t gfp, int nid, · 2882 unmodified lines
28832883 unsigned int order, unsigned int nr_pages, struct page **pages)
28842884 {
28852885 unsigned int nr_allocated = 0;
2886+ gfp_t alloc_gfp = gfp;
2887+ bool nofail = false;
28862888 struct page *page;
28872889 int i;
28882890
@@ -2893,6 +2895,7 @@ vm_area_alloc_pages(gfp_t gfp, int nid, · 4 unmodified lines
28932895 * more permissive.
28942896 */
28952897 if (!order) {
2898+ /* bulk allocator doesn't support nofail req. officially */
28962899 gfp_t bulk_gfp = gfp & ~__GFP_NOFAIL;
28972900
28982901 while (nr_allocated < nr_pages) {
@@ -2931,20 +2934,35 @@ vm_area_alloc_pages(gfp_t gfp, int nid, · 32 unmodified lines
29312934 if (nr != nr_pages_request)
29322935 break;
29332936 }
2937+ } else if (gfp & __GFP_NOFAIL) {
2938+ /*
2939+ * Higher order nofail allocations are really expensive and
2940+ * potentially dangerous (pre-mature OOM, disruptive reclaim
2941+ * and compaction etc.
2942+ */
2943+ alloc_gfp &= ~__GFP_NOFAIL;
2944+ nofail = true;
29342945 }
29352946
29362947 /* High-order pages or fallback path if "bulk" fails. */
2937−
29382948 while (nr_allocated < nr_pages) {
29392949 if (fatal_signal_pending(current))
29402950 break;
29412951
29422952 if (nid == NUMA_NO_NODE)
2943− page = alloc_pages(gfp, order);
2953+ page = alloc_pages(alloc_gfp, order);
29442954 else
2945− page = alloc_pages_node(nid, gfp, order);
2946− if (unlikely(!page))
2947− break;
2955+ page = alloc_pages_node(nid, alloc_gfp, order);
2956+ if (unlikely(!page)) {
2957+ if (!nofail)
2958+ break;
2959+
2960+ /* fall back to the zero order allocations */
2961+ alloc_gfp |= __GFP_NOFAIL;
2962+ order = 0;
2963+ continue;
2964+ }
2965+
29482966 /*
29492967 * Higher order allocations must be able to be treated as
29502968 * indepdenent small pages by callers (as they can with
scripts/checksyscalls.sh+3−1
@@ -114,7 +114,6 @@ cat << EOF · 113 unmodified lines
114114 #define __IGNORE_truncate
115115 #define __IGNORE_stat
116116 #define __IGNORE_lstat
117−#define __IGNORE_fstat
118117 #define __IGNORE_fcntl
119118 #define __IGNORE_fadvise64
120119 #define __IGNORE_newfstatat
@@ -255,6 +254,9 @@ cat << EOF · 134 unmodified lines
255254 /* 64-bit ports never needed these, and new 32-bit ports can use statx */
256255 #define __IGNORE_fstat64
257256 #define __IGNORE_fstatat64
257+
258+/* Newer ports are not required to provide fstat in favor of statx */
259+#define __IGNORE_fstat
258260 EOF
259261 }
260262
tools/testing/selftests/mm/mdwe_test.c+1−2
@@ -163,9 +163,8 @@ TEST_F(mdwe, mprotect_WRITE_EXEC) · 162 unmodified lines
163163
164164 TEST_F(mdwe, mmap_FIXED)
165165 {
166− void *p, *p2;
166+ void *p;
167167
168− p2 = mmap(NULL, self->size, PROT_READ | PROT_EXEC, self->flags, 0, 0);
169168 self->p = mmap(NULL, self->size, PROT_READ, self->flags, 0, 0);
170169 ASSERT_NE(self->p, MAP_FAILED);
171170