History

Merge branch 'akpm' (patches from Andrew)

Merge more updates from Andrew Morton: - MM remainders - various misc things - kcov updates * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (27 commits) lib/test_printf.c: call wait_for_random_bytes() before plain %p tests hexagon: drop the unused variable zero_page_mask hexagon: fix printk format warning in setup.c mm: fix oom_kill event handling treewide: use PHYS_ADDR_MAX to avoid type casting ULLONG_MAX mm: use octal not symbolic permissions ipc: use new return type vm_fault_t sysvipc/sem: mitigate semnum index against spectre v1 fault-injection: reorder config entries arm: port KCOV to arm sched/core / kcov: avoid kcov_area during task switch kcov: prefault the kcov_area kcov: ensure irq code sees a valid area kernel/relay.c: change return type to vm_fault_t exofs: avoid VLA in structures coredump: fix spam with zero VMA process fat: use fat_fs_error() instead of BUG_ON() in __fat_get_block() proc: skip branch in /proc/*/* lookup mremap: remove LATENCY_LIMIT from mremap to reduce the number of TLB shootdowns mm/memblock: add missing include <linux/bootmem.h> ...

Linus Torvalds committed 8 years ago

Commit b5d903c2 parents 7a93251 ee410f156 files · +397 −212Browse files

Unified · Split

56 files
  1. arch/arm/Kconfig +2 −1
  2. arch/arm/boot/compressed/Makefile +3 −0
  3. arch/arm/kvm/hyp/Makefile +8 −0
  4. arch/arm/vdso/Makefile +3 −0
  5. arch/arm64/mm/init.c +3 −3
  6. arch/hexagon/include/asm/pgtable.h +0 −1
  7. arch/hexagon/kernel/setup.c +1 −1
  8. arch/hexagon/mm/init.c +0 −3
  9. arch/mips/kernel/setup.c +2 −2
  10. arch/powerpc/mm/mem.c +1 −1
  11. arch/sparc/mm/init_64.c +1 −1
  12. arch/x86/mm/init.c +3 −1
  13. arch/x86/mm/init_32.c +1 −1
  14. arch/x86/mm/init_64.c +1 −1
  15. drivers/firmware/efi/arm-init.c +1 −1
  16. drivers/remoteproc/qcom_q6v5_pil.c +1 −1
  17. drivers/soc/qcom/mdt_loader.c +2 −2
  18. fs/binfmt_elf.c +9 −8
  19. fs/exofs/ore.c +49 −35
  20. fs/exofs/ore_raid.c +55 −20
  21. fs/exofs/super.c +11 −12
  22. fs/fat/inode.c +7 −1
  23. fs/proc/base.c +3 −6
  24. include/linux/kcov.h +14 −0
  25. include/linux/memcontrol.h +22 −4
  26. include/linux/sched.h +1 −1
  27. include/linux/slab.h +1 −0
  28. ipc/sem.c +14 −4
  29. ipc/shm.c +1 −1
  30. kernel/fork.c +8 −0
  31. kernel/kcov.c +19 −2
  32. kernel/kexec_core.c +4 −0
  33. kernel/relay.c +1 −1
  34. kernel/sched/core.c +4 −0
  35. lib/Kconfig.debug +18 −18
  36. lib/test_printf.c +7 −0
  37. mm/cleancache.c +4 −6
  38. mm/cma_debug.c +10 −15
  39. mm/compaction.c +1 −1
  40. mm/dmapool.c +1 −1
  41. mm/failslab.c +1 −1
  42. mm/frontswap.c +5 −6
  43. mm/ksm.c +10 −4
  44. mm/memblock.c +7 −3
  45. mm/memcontrol.c +8 −2
  46. mm/mremap.c +0 −4
  47. mm/oom_kill.c +1 −1
  48. mm/page_alloc.c +1 −1
  49. mm/page_idle.c +1 −1
  50. mm/page_owner.c +2 −2
  51. mm/shmem.c +5 −4
  52. mm/slab_common.c +34 −3
  53. mm/swapfile.c +1 −1
  54. mm/vmalloc.c +2 −2
  55. mm/zsmalloc.c +3 −2
  56. mm/zswap.c +19 −19
arch/arm/Kconfig+2−1
@@ -8,9 +8,10 @@ config ARM · 7 unmodified lines
88 select ARCH_HAS_DEVMEM_IS_ALLOWED
99 select ARCH_HAS_ELF_RANDOMIZE
1010 select ARCH_HAS_FORTIFY_SOURCE
11+ select ARCH_HAS_KCOV
1112 select ARCH_HAS_PTE_SPECIAL if ARM_LPAE
12− select ARCH_HAS_SET_MEMORY
1313 select ARCH_HAS_PHYS_TO_DMA
14+ select ARCH_HAS_SET_MEMORY
1415 select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL
1516 select ARCH_HAS_STRICT_MODULE_RWX if MMU
1617 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
arch/arm/boot/compressed/Makefile+3−0
@@ -25,6 +25,9 @@ endif · 24 unmodified lines
2525
2626 GCOV_PROFILE := n
2727
28+# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
29+KCOV_INSTRUMENT := n
30+
2831 #
2932 # Architecture dependencies
3033 #
arch/arm/kvm/hyp/Makefile+8−0
@@ -23,3 +23,11 @@ obj-$(CONFIG_KVM_ARM_HOST) += hyp-entry.o · 22 unmodified lines
2323 obj-$(CONFIG_KVM_ARM_HOST) += switch.o
2424 CFLAGS_switch.o += $(CFLAGS_ARMV7VE)
2525 obj-$(CONFIG_KVM_ARM_HOST) += s2-setup.o
26+
27+# KVM code is run at a different exception code with a different map, so
28+# compiler instrumentation that inserts callbacks or checks into the code may
29+# cause crashes. Just disable it.
30+GCOV_PROFILE := n
31+KASAN_SANITIZE := n
32+UBSAN_SANITIZE := n
33+KCOV_INSTRUMENT := n
arch/arm/vdso/Makefile+3−0
@@ -30,6 +30,9 @@ CFLAGS_vgettimeofday.o = -O2 · 29 unmodified lines
3030 # Disable gcov profiling for VDSO code
3131 GCOV_PROFILE := n
3232
33+# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
34+KCOV_INSTRUMENT := n
35+
3336 # Force dependency
3437 $(obj)/vdso.o : $(obj)/vdso.so
3538
arch/arm64/mm/init.c+3−3
@@ -310,7 +310,7 @@ static void __init arm64_memory_present(void) · 309 unmodified lines
310310 }
311311 #endif
312312
313−static phys_addr_t memory_limit = (phys_addr_t)ULLONG_MAX;
313+static phys_addr_t memory_limit = PHYS_ADDR_MAX;
314314
315315 /*
316316 * Limit the memory size that was specified via FDT.
@@ -401,7 +401,7 @@ void __init arm64_memblock_init(void) · 84 unmodified lines
401401 * high up in memory, add back the kernel region that must be accessible
402402 * via the linear mapping.
403403 */
404− if (memory_limit != (phys_addr_t)ULLONG_MAX) {
404+ if (memory_limit != PHYS_ADDR_MAX) {
405405 memblock_mem_limit_remove_map(memory_limit);
406406 memblock_add(__pa_symbol(_text), (u64)(_end - _text));
407407 }
@@ -666,7 +666,7 @@ __setup("keepinitrd", keepinitrd_setup); · 258 unmodified lines
666666 */
667667 static int dump_mem_limit(struct notifier_block *self, unsigned long v, void *p)
668668 {
669− if (memory_limit != (phys_addr_t)ULLONG_MAX) {
669+ if (memory_limit != PHYS_ADDR_MAX) {
670670 pr_emerg("Memory Limit: %llu MB\n", memory_limit >> 20);
671671 } else {
672672 pr_emerg("Memory Limit: none\n");
arch/hexagon/include/asm/pgtable.h+0−1
@@ -30,7 +30,6 @@ · 29 unmodified lines
3030
3131 /* A handy thing to have if one has the RAM. Declared in head.S */
3232 extern unsigned long empty_zero_page;
33−extern unsigned long zero_page_mask;
3433
3534 /*
3635 * The PTE model described here is that of the Hexagon Virtual Machine,
arch/hexagon/kernel/setup.c+1−1
@@ -66,7 +66,7 @@ void __init setup_arch(char **cmdline_p) · 65 unmodified lines
6666 */
6767 __vmsetvec(_K_VM_event_vector);
6868
69− printk(KERN_INFO "PHYS_OFFSET=0x%08x\n", PHYS_OFFSET);
69+ printk(KERN_INFO "PHYS_OFFSET=0x%08lx\n", PHYS_OFFSET);
7070
7171 /*
7272 * Simulator has a few differences from the hardware.
arch/hexagon/mm/init.c+0−3
@@ -39,9 +39,6 @@ unsigned long __phys_offset; /* physical kernel offset >> 12 */ · 38 unmodified lines
3939 /* Set as variable to limit PMD copies */
4040 int max_kernel_seg = 0x303;
4141
42−/* think this should be (page_size-1) the way it's used...*/
43−unsigned long zero_page_mask;
44−
4542 /* indicate pfn's of high memory */
4643 unsigned long highstart_pfn, highend_pfn;
4744
arch/mips/kernel/setup.c+2−2
@@ -93,7 +93,7 @@ void __init add_memory_region(phys_addr_t start, phys_addr_t size, long type) · 92 unmodified lines
9393 * If the region reaches the top of the physical address space, adjust
9494 * the size slightly so that (start + size) doesn't overflow
9595 */
96− if (start + size - 1 == (phys_addr_t)ULLONG_MAX)
96+ if (start + size - 1 == PHYS_ADDR_MAX)
9797 --size;
9898
9999 /* Sanity check */
@@ -376,7 +376,7 @@ static void __init bootmem_init(void) · 276 unmodified lines
376376 unsigned long reserved_end;
377377 unsigned long mapstart = ~0UL;
378378 unsigned long bootmap_size;
379− phys_addr_t ramstart = (phys_addr_t)ULLONG_MAX;
379+ phys_addr_t ramstart = PHYS_ADDR_MAX;
380380 bool bootmap_valid = false;
381381 int i;
382382
arch/powerpc/mm/mem.c+1−1
@@ -215,7 +215,7 @@ void __init mem_topology_setup(void) · 214 unmodified lines
215215 /* Place all memblock_regions in the same node and merge contiguous
216216 * memblock_regions
217217 */
218− memblock_set_node(0, (phys_addr_t)ULLONG_MAX, &memblock.memory, 0);
218+ memblock_set_node(0, PHYS_ADDR_MAX, &memblock.memory, 0);
219219 }
220220
221221 void __init initmem_init(void)
arch/sparc/mm/init_64.c+1−1
@@ -1620,7 +1620,7 @@ static void __init bootmem_init_nonnuma(void) · 1619 unmodified lines
16201620 (top_of_ram - total_ram) >> 20);
16211621
16221622 init_node_masks_nonnuma();
1623− memblock_set_node(0, (phys_addr_t)ULLONG_MAX, &memblock.memory, 0);
1623+ memblock_set_node(0, PHYS_ADDR_MAX, &memblock.memory, 0);
16241624 allocate_node_data(0);
16251625 node_set_online(0);
16261626 }
arch/x86/mm/init.c+3−1
@@ -706,7 +706,9 @@ void __init init_mem_mapping(void) · 705 unmodified lines
706706 */
707707 int devmem_is_allowed(unsigned long pagenr)
708708 {
709− if (page_is_ram(pagenr)) {
709+ if (region_intersects(PFN_PHYS(pagenr), PAGE_SIZE,
710+ IORESOURCE_SYSTEM_RAM, IORES_DESC_NONE)
711+ != REGION_DISJOINT) {
710712 /*
711713 * For disallowed memory regions in the low 1MB range,
712714 * request that the page be shown as all zeros.
arch/x86/mm/init_32.c+1−1
@@ -692,7 +692,7 @@ void __init initmem_init(void) · 691 unmodified lines
692692 high_memory = (void *) __va(max_low_pfn * PAGE_SIZE - 1) + 1;
693693 #endif
694694
695− memblock_set_node(0, (phys_addr_t)ULLONG_MAX, &memblock.memory, 0);
695+ memblock_set_node(0, PHYS_ADDR_MAX, &memblock.memory, 0);
696696 sparse_memory_present_with_active_regions(0);
697697
698698 #ifdef CONFIG_FLATMEM
arch/x86/mm/init_64.c+1−1
@@ -742,7 +742,7 @@ kernel_physical_mapping_init(unsigned long paddr_start, · 741 unmodified lines
742742 #ifndef CONFIG_NUMA
743743 void __init initmem_init(void)
744744 {
745− memblock_set_node(0, (phys_addr_t)ULLONG_MAX, &memblock.memory, 0);
745+ memblock_set_node(0, PHYS_ADDR_MAX, &memblock.memory, 0);
746746 }
747747 #endif
748748
drivers/firmware/efi/arm-init.c+1−1
@@ -193,7 +193,7 @@ static __init void reserve_regions(void) · 192 unmodified lines
193193 * uses its own memory map instead.
194194 */
195195 memblock_dump_all();
196− memblock_remove(0, (phys_addr_t)ULLONG_MAX);
196+ memblock_remove(0, PHYS_ADDR_MAX);
197197
198198 for_each_efi_memory_desc(md) {
199199 paddr = md->phys_addr;
drivers/remoteproc/qcom_q6v5_pil.c+1−1
@@ -686,7 +686,7 @@ static int q6v5_mpss_load(struct q6v5 *qproc) · 685 unmodified lines
686686 struct elf32_hdr *ehdr;
687687 phys_addr_t mpss_reloc;
688688 phys_addr_t boot_addr;
689− phys_addr_t min_addr = (phys_addr_t)ULLONG_MAX;
689+ phys_addr_t min_addr = PHYS_ADDR_MAX;
690690 phys_addr_t max_addr = 0;
691691 bool relocate = false;
692692 char seg_name[10];
drivers/soc/qcom/mdt_loader.c+2−2
@@ -50,7 +50,7 @@ ssize_t qcom_mdt_get_size(const struct firmware *fw) · 49 unmodified lines
5050 const struct elf32_phdr *phdrs;
5151 const struct elf32_phdr *phdr;
5252 const struct elf32_hdr *ehdr;
53− phys_addr_t min_addr = (phys_addr_t)ULLONG_MAX;
53+ phys_addr_t min_addr = PHYS_ADDR_MAX;
5454 phys_addr_t max_addr = 0;
5555 int i;
5656
@@ -97,7 +97,7 @@ int qcom_mdt_load(struct device *dev, const struct firmware *fw, · 40 unmodified lines
9797 const struct elf32_hdr *ehdr;
9898 const struct firmware *seg_fw;
9999 phys_addr_t mem_reloc;
100− phys_addr_t min_addr = (phys_addr_t)ULLONG_MAX;
100+ phys_addr_t min_addr = PHYS_ADDR_MAX;
101101 phys_addr_t max_addr = 0;
102102 size_t fw_name_len;
103103 ssize_t offset;
fs/binfmt_elf.c+9−8
@@ -1621,8 +1621,8 @@ static int fill_files_note(struct memelfnote *note) · 1620 unmodified lines
16211621 if (size >= MAX_FILE_NOTE_SIZE) /* paranoia check */
16221622 return -EINVAL;
16231623 size = round_up(size, PAGE_SIZE);
1624− data = vmalloc(size);
1625− if (!data)
1624+ data = kvmalloc(size, GFP_KERNEL);
1625+ if (ZERO_OR_NULL_PTR(data))
16261626 return -ENOMEM;
16271627
16281628 start_end_ofs = data + 2;
@@ -1639,7 +1639,7 @@ static int fill_files_note(struct memelfnote *note) · 10 unmodified lines
16391639 filename = file_path(file, name_curpos, remaining);
16401640 if (IS_ERR(filename)) {
16411641 if (PTR_ERR(filename) == -ENAMETOOLONG) {
1642− vfree(data);
1642+ kvfree(data);
16431643 size = size * 5 / 4;
16441644 goto alloc;
16451645 }
@@ -1932,7 +1932,7 @@ static void free_note_info(struct elf_note_info *info) · 286 unmodified lines
19321932 kfree(t);
19331933 }
19341934 kfree(info->psinfo.data);
1935− vfree(info->files.data);
1935+ kvfree(info->files.data);
19361936 }
19371937
19381938 #else
@@ -2148,7 +2148,7 @@ static void free_note_info(struct elf_note_info *info) · 209 unmodified lines
21482148
21492149 /* Free data possibly allocated by fill_files_note(): */
21502150 if (info->notes_files)
2151− vfree(info->notes_files->data);
2151+ kvfree(info->notes_files->data);
21522152
21532153 kfree(info->prstatus);
21542154 kfree(info->psinfo);
@@ -2294,8 +2294,9 @@ static int elf_core_dump(struct coredump_params *cprm) · 139 unmodified lines
22942294
22952295 if (segs - 1 > ULONG_MAX / sizeof(*vma_filesz))
22962296 goto end_coredump;
2297− vma_filesz = vmalloc(array_size(sizeof(*vma_filesz), (segs - 1)));
2298− if (!vma_filesz)
2297+ vma_filesz = kvmalloc(array_size(sizeof(*vma_filesz), (segs - 1)),
2298+ GFP_KERNEL);
2299+ if (ZERO_OR_NULL_PTR(vma_filesz))
22992300 goto end_coredump;
23002301
23012302 for (i = 0, vma = first_vma(current, gate_vma); vma != NULL;
@@ -2402,7 +2403,7 @@ end_coredump: · 100 unmodified lines
24022403 cleanup:
24032404 free_note_info(&info);
24042405 kfree(shdr4extnum);
2405− vfree(vma_filesz);
2406+ kvfree(vma_filesz);
24062407 kfree(phdr4note);
24072408 kfree(elf);
24082409 out:
fs/exofs/ore.c+49−35
@@ -146,68 +146,82 @@ int _ore_get_io_state(struct ore_layout *layout, · 145 unmodified lines
146146 struct ore_io_state **pios)
147147 {
148148 struct ore_io_state *ios;
149− struct page **pages;
150− struct osd_sg_entry *sgilist;
149+ size_t size_ios, size_extra, size_total;
150+ void *ios_extra;
151+
152+ /*
153+ * The desired layout looks like this, with the extra_allocation
154+ * items pointed at from fields within ios or per_dev:
155+
151156 struct __alloc_all_io_state {
152157 struct ore_io_state ios;
153158 struct ore_per_dev_state per_dev[numdevs];
154159 union {
155160 struct osd_sg_entry sglist[sgs_per_dev * numdevs];
156161 struct page *pages[num_par_pages];
157− };
158− } *_aios;
159−
160− if (likely(sizeof(*_aios) <= PAGE_SIZE)) {
161− _aios = kzalloc(sizeof(*_aios), GFP_KERNEL);
162− if (unlikely(!_aios)) {
163− ORE_DBGMSG("Failed kzalloc bytes=%zd\n",
164− sizeof(*_aios));
162+ } extra_allocation;
163+ } whole_allocation;
164+
165+ */
166+
167+ /* This should never happen, so abort early if it ever does. */
168+ if (sgs_per_dev && num_par_pages) {
169+ ORE_DBGMSG("Tried to use both pages and sglist\n");
170+ *pios = NULL;
171+ return -EINVAL;
172+ }
173+
174+ if (numdevs > (INT_MAX - sizeof(*ios)) /
175+ sizeof(struct ore_per_dev_state))
176+ return -ENOMEM;
177+ size_ios = sizeof(*ios) + sizeof(struct ore_per_dev_state) * numdevs;
178+
179+ if (sgs_per_dev * numdevs > INT_MAX / sizeof(struct osd_sg_entry))
180+ return -ENOMEM;
181+ if (num_par_pages > INT_MAX / sizeof(struct page *))
182+ return -ENOMEM;
183+ size_extra = max(sizeof(struct osd_sg_entry) * (sgs_per_dev * numdevs),
184+ sizeof(struct page *) * num_par_pages);
185+
186+ size_total = size_ios + size_extra;
187+
188+ if (likely(size_total <= PAGE_SIZE)) {
189+ ios = kzalloc(size_total, GFP_KERNEL);
190+ if (unlikely(!ios)) {
191+ ORE_DBGMSG("Failed kzalloc bytes=%zd\n", size_total);
165192 *pios = NULL;
166193 return -ENOMEM;
167194 }
168− pages = num_par_pages ? _aios->pages : NULL;
169− sgilist = sgs_per_dev ? _aios->sglist : NULL;
170− ios = &_aios->ios;
195+ ios_extra = (char *)ios + size_ios;
171196 } else {
172− struct __alloc_small_io_state {
173− struct ore_io_state ios;
174− struct ore_per_dev_state per_dev[numdevs];
175− } *_aio_small;
176− union __extra_part {
177− struct osd_sg_entry sglist[sgs_per_dev * numdevs];
178− struct page *pages[num_par_pages];
179− } *extra_part;
180−
181− _aio_small = kzalloc(sizeof(*_aio_small), GFP_KERNEL);
182− if (unlikely(!_aio_small)) {
197+ ios = kzalloc(size_ios, GFP_KERNEL);
198+ if (unlikely(!ios)) {
183199 ORE_DBGMSG("Failed alloc first part bytes=%zd\n",
184− sizeof(*_aio_small));
200+ size_ios);
185201 *pios = NULL;
186202 return -ENOMEM;
187203 }
188− extra_part = kzalloc(sizeof(*extra_part), GFP_KERNEL);
189− if (unlikely(!extra_part)) {
204+ ios_extra = kzalloc(size_extra, GFP_KERNEL);
205+ if (unlikely(!ios_extra)) {
190206 ORE_DBGMSG("Failed alloc second part bytes=%zd\n",
191− sizeof(*extra_part));
192− kfree(_aio_small);
207+ size_extra);
208+ kfree(ios);
193209 *pios = NULL;
194210 return -ENOMEM;
195211 }
196212
197− pages = num_par_pages ? extra_part->pages : NULL;
198− sgilist = sgs_per_dev ? extra_part->sglist : NULL;
199213 /* In this case the per_dev[0].sgilist holds the pointer to
200214 * be freed
201215 */
202− ios = &_aio_small->ios;
203216 ios->extra_part_alloc = true;
204217 }
205218
206− if (pages) {
207− ios->parity_pages = pages;
219+ if (num_par_pages) {
220+ ios->parity_pages = ios_extra;
208221 ios->max_par_pages = num_par_pages;
209222 }
210− if (sgilist) {
223+ if (sgs_per_dev) {
224+ struct osd_sg_entry *sgilist = ios_extra;
211225 unsigned d;
212226
213227 for (d = 0; d < numdevs; ++d) {
fs/exofs/ore_raid.c+55−20
@@ -71,6 +71,11 @@ static int _sp2d_alloc(unsigned pages_in_unit, unsigned group_width, · 70 unmodified lines
7171 {
7272 struct __stripe_pages_2d *sp2d;
7373 unsigned data_devs = group_width - parity;
74+
75+ /*
76+ * Desired allocation layout is, though when larger than PAGE_SIZE,
77+ * each struct __alloc_1p_arrays is separately allocated:
78+
7479 struct _alloc_all_bytes {
7580 struct __alloc_stripe_pages_2d {
7681 struct __stripe_pages_2d sp2d;
@@ -82,55 +87,85 @@ static int _sp2d_alloc(unsigned pages_in_unit, unsigned group_width, · 5 unmodified lines
8287 char page_is_read[data_devs];
8388 } __a1pa[pages_in_unit];
8489 } *_aab;
90+
8591 struct __alloc_1p_arrays *__a1pa;
8692 struct __alloc_1p_arrays *__a1pa_end;
87− const unsigned sizeof__a1pa = sizeof(_aab->__a1pa[0]);
93+
94+ */
95+
96+ char *__a1pa;
97+ char *__a1pa_end;
98+
99+ const size_t sizeof_stripe_pages_2d =
100+ sizeof(struct __stripe_pages_2d) +
101+ sizeof(struct __1_page_stripe) * pages_in_unit;
102+ const size_t sizeof__a1pa =
103+ ALIGN(sizeof(struct page *) * (2 * group_width) + data_devs,
104+ sizeof(void *));
105+ const size_t sizeof__a1pa_arrays = sizeof__a1pa * pages_in_unit;
106+ const size_t alloc_total = sizeof_stripe_pages_2d +
107+ sizeof__a1pa_arrays;
108+
88109 unsigned num_a1pa, alloc_size, i;
89110
90111 /* FIXME: check these numbers in ore_verify_layout */
91− BUG_ON(sizeof(_aab->__asp2d) > PAGE_SIZE);
112+ BUG_ON(sizeof_stripe_pages_2d > PAGE_SIZE);
92113 BUG_ON(sizeof__a1pa > PAGE_SIZE);
93114
94− if (sizeof(*_aab) > PAGE_SIZE) {
95− num_a1pa = (PAGE_SIZE - sizeof(_aab->__asp2d)) / sizeof__a1pa;
96− alloc_size = sizeof(_aab->__asp2d) + sizeof__a1pa * num_a1pa;
115+ /*
116+ * If alloc_total would be larger than PAGE_SIZE, only allocate
117+ * as many a1pa items as would fill the rest of the page, instead
118+ * of the full pages_in_unit count.
119+ */
120+ if (alloc_total > PAGE_SIZE) {
121+ num_a1pa = (PAGE_SIZE - sizeof_stripe_pages_2d) / sizeof__a1pa;
122+ alloc_size = sizeof_stripe_pages_2d + sizeof__a1pa * num_a1pa;
97123 } else {
98124 num_a1pa = pages_in_unit;
99− alloc_size = sizeof(*_aab);
125+ alloc_size = alloc_total;
100126 }
101127
102− _aab = kzalloc(alloc_size, GFP_KERNEL);
103− if (unlikely(!_aab)) {
128+ *psp2d = sp2d = kzalloc(alloc_size, GFP_KERNEL);
129+ if (unlikely(!sp2d)) {
104130 ORE_DBGMSG("!! Failed to alloc sp2d size=%d\n", alloc_size);
105131 return -ENOMEM;
106132 }
133+ /* From here Just call _sp2d_free */
107134
108− sp2d = &_aab->__asp2d.sp2d;
109− *psp2d = sp2d; /* From here Just call _sp2d_free */
110−
111− __a1pa = _aab->__a1pa;
112− __a1pa_end = __a1pa + num_a1pa;
135+ /* Find start of a1pa area. */
136+ __a1pa = (char *)sp2d + sizeof_stripe_pages_2d;
137+ /* Find end of the _allocated_ a1pa area. */
138+ __a1pa_end = __a1pa + alloc_size;
113139
140+ /* Allocate additionally needed a1pa items in PAGE_SIZE chunks. */
114141 for (i = 0; i < pages_in_unit; ++i) {
142+ struct __1_page_stripe *stripe = &sp2d->_1p_stripes[i];
143+
115144 if (unlikely(__a1pa >= __a1pa_end)) {
116145 num_a1pa = min_t(unsigned, PAGE_SIZE / sizeof__a1pa,
117146 pages_in_unit - i);
147+ alloc_size = sizeof__a1pa * num_a1pa;
118148
119− __a1pa = kcalloc(num_a1pa, sizeof__a1pa, GFP_KERNEL);
149+ __a1pa = kzalloc(alloc_size, GFP_KERNEL);
120150 if (unlikely(!__a1pa)) {
121151 ORE_DBGMSG("!! Failed to _alloc_1p_arrays=%d\n",
122152 num_a1pa);
123153 return -ENOMEM;
124154 }
125− __a1pa_end = __a1pa + num_a1pa;
155+ __a1pa_end = __a1pa + alloc_size;
126156 /* First *pages is marked for kfree of the buffer */
127− sp2d->_1p_stripes[i].alloc = true;
157+ stripe->alloc = true;
128158 }
129159
130− sp2d->_1p_stripes[i].pages = __a1pa->pages;
131− sp2d->_1p_stripes[i].scribble = __a1pa->scribble ;
132− sp2d->_1p_stripes[i].page_is_read = __a1pa->page_is_read;
133− ++__a1pa;
160+ /*
161+ * Attach all _lp_stripes pointers to the allocation for
162+ * it which was either part of the original PAGE_SIZE
163+ * allocation or the subsequent allocation in this loop.
164+ */
165+ stripe->pages = (void *)__a1pa;
166+ stripe->scribble = stripe->pages + group_width;
167+ stripe->page_is_read = (char *)stripe->scribble + group_width;
168+ __a1pa += sizeof__a1pa;
134169 }
135170
136171 sp2d->parity = parity;
fs/exofs/super.c+11−12
@@ -549,27 +549,26 @@ static int exofs_devs_2_odi(struct exofs_dt_device_info *dt_dev, · 548 unmodified lines
549549 static int __alloc_dev_table(struct exofs_sb_info *sbi, unsigned numdevs,
550550 struct exofs_dev **peds)
551551 {
552− struct __alloc_ore_devs_and_exofs_devs {
553− /* Twice bigger table: See exofs_init_comps() and comment at
554− * exofs_read_lookup_dev_table()
555− */
556− struct ore_dev *oreds[numdevs * 2 - 1];
557− struct exofs_dev eds[numdevs];
558− } *aoded;
552+ /* Twice bigger table: See exofs_init_comps() and comment at
553+ * exofs_read_lookup_dev_table()
554+ */
555+ const size_t numores = numdevs * 2 - 1;
559556 struct exofs_dev *eds;
560557 unsigned i;
561558
562− aoded = kzalloc(sizeof(*aoded), GFP_KERNEL);
563− if (unlikely(!aoded)) {
559+ sbi->oc.ods = kzalloc(numores * sizeof(struct ore_dev *) +
560+ numdevs * sizeof(struct exofs_dev), GFP_KERNEL);
561+ if (unlikely(!sbi->oc.ods)) {
564562 EXOFS_ERR("ERROR: failed allocating Device array[%d]\n",
565563 numdevs);
566564 return -ENOMEM;
567565 }
568566
569− sbi->oc.ods = aoded->oreds;
570− *peds = eds = aoded->eds;
567+ /* Start of allocated struct exofs_dev entries */
568+ *peds = eds = (void *)sbi->oc.ods[numores];
569+ /* Initialize pointers into struct exofs_dev */
571570 for (i = 0; i < numdevs; ++i)
572− aoded->oreds[i] = &eds[i].ored;
571+ sbi->oc.ods[i] = &eds[i].ored;
573572 return 0;
574573 }
575574
fs/fat/inode.c+7−1
@@ -158,8 +158,14 @@ static inline int __fat_get_block(struct inode *inode, sector_t iblock, · 157 unmodified lines
158158 err = fat_bmap(inode, iblock, &phys, &mapped_blocks, create, false);
159159 if (err)
160160 return err;
161+ if (!phys) {
162+ fat_fs_error(sb,
163+ "invalid FAT chain (i_pos %lld, last_block %llu)",
164+ MSDOS_I(inode)->i_pos,
165+ (unsigned long long)last_block);
166+ return -EIO;
167+ }
161168
162− BUG_ON(!phys);
163169 BUG_ON(*max_blocks != mapped_blocks);
164170 set_buffer_new(bh_result);
165171 map_bh(bh_result, sb, phys);
fs/proc/base.c+3−6
@@ -2439,14 +2439,11 @@ static struct dentry *proc_pident_lookup(struct inode *dir, · 2438 unmodified lines
24392439 for (p = ents; p < last; p++) {
24402440 if (p->len != dentry->d_name.len)
24412441 continue;
2442− if (!memcmp(dentry->d_name.name, p->name, p->len))
2442+ if (!memcmp(dentry->d_name.name, p->name, p->len)) {
2443+ res = proc_pident_instantiate(dentry, task, p);
24432444 break;
2445+ }
24442446 }
2445− if (p >= last)
2446− goto out;
2447−
2448− res = proc_pident_instantiate(dentry, task, p);
2449−out:
24502447 put_task_struct(task);
24512448 out_no_task:
24522449 return res;
include/linux/kcov.h+14−0
@@ -22,13 +22,27 @@ enum kcov_mode { · 21 unmodified lines
2222 KCOV_MODE_TRACE_CMP = 3,
2323 };
2424
25+#define KCOV_IN_CTXSW (1 << 30)
26+
2527 void kcov_task_init(struct task_struct *t);
2628 void kcov_task_exit(struct task_struct *t);
2729
30+#define kcov_prepare_switch(t) \
31+do { \
32+ (t)->kcov_mode |= KCOV_IN_CTXSW; \
33+} while (0)
34+
35+#define kcov_finish_switch(t) \
36+do { \
37+ (t)->kcov_mode &= ~KCOV_IN_CTXSW; \
38+} while (0)
39+
2840 #else
2941
3042 static inline void kcov_task_init(struct task_struct *t) {}
3143 static inline void kcov_task_exit(struct task_struct *t) {}
44+static inline void kcov_prepare_switch(struct task_struct *t) {}
45+static inline void kcov_finish_switch(struct task_struct *t) {}
3246
3347 #endif /* CONFIG_KCOV */
3448 #endif /* _LINUX_KCOV_H */
include/linux/memcontrol.h+22−4
@@ -53,6 +53,7 @@ enum memcg_memory_event { · 52 unmodified lines
5353 MEMCG_HIGH,
5454 MEMCG_MAX,
5555 MEMCG_OOM,
56+ MEMCG_OOM_KILL,
5657 MEMCG_SWAP_MAX,
5758 MEMCG_SWAP_FAIL,
5859 MEMCG_NR_MEMORY_EVENTS,
@@ -720,11 +721,8 @@ static inline void count_memcg_event_mm(struct mm_struct *mm, · 661 unmodified lines
720721
721722 rcu_read_lock();
722723 memcg = mem_cgroup_from_task(rcu_dereference(mm->owner));
723− if (likely(memcg)) {
724+ if (likely(memcg))
724725 count_memcg_events(memcg, idx, 1);
725− if (idx == OOM_KILL)
726− cgroup_file_notify(&memcg->events_file);
727− }
728726 rcu_read_unlock();
729727 }
730728
@@ -735,6 +733,21 @@ static inline void memcg_memory_event(struct mem_cgroup *memcg, · 4 unmodified lines
735733 cgroup_file_notify(&memcg->events_file);
736734 }
737735
736+static inline void memcg_memory_event_mm(struct mm_struct *mm,
737+ enum memcg_memory_event event)
738+{
739+ struct mem_cgroup *memcg;
740+
741+ if (mem_cgroup_disabled())
742+ return;
743+
744+ rcu_read_lock();
745+ memcg = mem_cgroup_from_task(rcu_dereference(mm->owner));
746+ if (likely(memcg))
747+ memcg_memory_event(memcg, event);
748+ rcu_read_unlock();
749+}
750+
738751 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
739752 void mem_cgroup_split_huge_fixup(struct page *head);
740753 #endif
@@ -756,6 +769,11 @@ static inline void memcg_memory_event(struct mem_cgroup *memcg, · 15 unmodified lines
756769 {
757770 }
758771
772+static inline void memcg_memory_event_mm(struct mm_struct *mm,
773+ enum memcg_memory_event event)
774+{
775+}
776+
759777 static inline enum mem_cgroup_protection mem_cgroup_protected(
760778 struct mem_cgroup *root, struct mem_cgroup *memcg)
761779 {
include/linux/sched.h+1−1
@@ -1130,7 +1130,7 @@ struct task_struct { · 1129 unmodified lines
11301130
11311131 #ifdef CONFIG_KCOV
11321132 /* Coverage collection mode enabled for this task (0 if disabled): */
1133− enum kcov_mode kcov_mode;
1133+ unsigned int kcov_mode;
11341134
11351135 /* Size of the kcov_area: */
11361136 unsigned int kcov_size;
include/linux/slab.h+1−0
@@ -600,6 +600,7 @@ struct memcg_cache_params { · 599 unmodified lines
600600 struct memcg_cache_array __rcu *memcg_caches;
601601 struct list_head __root_caches_node;
602602 struct list_head children;
603+ bool dying;
603604 };
604605 struct {
605606 struct mem_cgroup *memcg;
ipc/sem.c+14−4
@@ -85,6 +85,7 @@ · 84 unmodified lines
8585 #include <linux/nsproxy.h>
8686 #include <linux/ipc_namespace.h>
8787 #include <linux/sched/wake_q.h>
88+#include <linux/nospec.h>
8889
8990 #include <linux/uaccess.h>
9091 #include "util.h"
@@ -368,6 +369,7 @@ static inline int sem_lock(struct sem_array *sma, struct sembuf *sops, · 277 unmodified lines
368369 int nsops)
369370 {
370371 struct sem *sem;
372+ int idx;
371373
372374 if (nsops != 1) {
373375 /* Complex operation - acquire a full lock */
@@ -385,7 +387,8 @@ static inline int sem_lock(struct sem_array *sma, struct sembuf *sops, · 11 unmodified lines
385387 *
386388 * Both facts are tracked by use_global_mode.
387389 */
388− sem = &sma->sems[sops->sem_num];
390+ idx = array_index_nospec(sops->sem_num, sma->sem_nsems);
391+ sem = &sma->sems[idx];
389392
390393 /*
391394 * Initial check for use_global_lock. Just an optimization,
@@ -638,7 +641,8 @@ static int perform_atomic_semop_slow(struct sem_array *sma, struct sem_queue *q) · 246 unmodified lines
638641 un = q->undo;
639642
640643 for (sop = sops; sop < sops + nsops; sop++) {
641− curr = &sma->sems[sop->sem_num];
644+ int idx = array_index_nospec(sop->sem_num, sma->sem_nsems);
645+ curr = &sma->sems[idx];
642646 sem_op = sop->sem_op;
643647 result = curr->semval;
644648
@@ -718,7 +722,9 @@ static int perform_atomic_semop(struct sem_array *sma, struct sem_queue *q) · 73 unmodified lines
718722 * until the operations can go through.
719723 */
720724 for (sop = sops; sop < sops + nsops; sop++) {
721− curr = &sma->sems[sop->sem_num];
725+ int idx = array_index_nospec(sop->sem_num, sma->sem_nsems);
726+
727+ curr = &sma->sems[idx];
722728 sem_op = sop->sem_op;
723729 result = curr->semval;
724730
@@ -1356,6 +1362,7 @@ static int semctl_setval(struct ipc_namespace *ns, int semid, int semnum, · 631 unmodified lines
13561362 return -EIDRM;
13571363 }
13581364
1365+ semnum = array_index_nospec(semnum, sma->sem_nsems);
13591366 curr = &sma->sems[semnum];
13601367
13611368 ipc_assert_locked_object(&sma->sem_perm);
@@ -1509,6 +1516,8 @@ static int semctl_main(struct ipc_namespace *ns, int semid, int semnum, · 147 unmodified lines
15091516 err = -EIDRM;
15101517 goto out_unlock;
15111518 }
1519+
1520+ semnum = array_index_nospec(semnum, nsems);
15121521 curr = &sma->sems[semnum];
15131522
15141523 switch (cmd) {
@@ -2081,7 +2090,8 @@ static long do_semtimedop(int semid, struct sembuf __user *tsops, · 566 unmodified lines
20812090 */
20822091 if (nsops == 1) {
20832092 struct sem *curr;
2084− curr = &sma->sems[sops->sem_num];
2093+ int idx = array_index_nospec(sops->sem_num, sma->sem_nsems);
2094+ curr = &sma->sems[idx];
20852095
20862096 if (alter) {
20872097 if (sma->complex_count) {
ipc/shm.c+1−1
@@ -408,7 +408,7 @@ void exit_shm(struct task_struct *task) · 407 unmodified lines
408408 up_write(&shm_ids(ns).rwsem);
409409 }
410410
411−static int shm_fault(struct vm_fault *vmf)
411+static vm_fault_t shm_fault(struct vm_fault *vmf)
412412 {
413413 struct file *file = vmf->vma->vm_file;
414414 struct shm_file_data *sfd = shm_file_data(file);
kernel/fork.c+8−0
@@ -440,6 +440,14 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, · 439 unmodified lines
440440 continue;
441441 }
442442 charge = 0;
443+ /*
444+ * Don't duplicate many vmas if we've been oom-killed (for
445+ * example)
446+ */
447+ if (fatal_signal_pending(current)) {
448+ retval = -EINTR;
449+ goto out;
450+ }
443451 if (mpnt->vm_flags & VM_ACCOUNT) {
444452 unsigned long len = vma_pages(mpnt);
445453
kernel/kcov.c+19−2
@@ -58,7 +58,7 @@ struct kcov { · 57 unmodified lines
5858
5959 static bool check_kcov_mode(enum kcov_mode needed_mode, struct task_struct *t)
6060 {
61− enum kcov_mode mode;
61+ unsigned int mode;
6262
6363 /*
6464 * We are interested in code coverage as a function of a syscall inputs,
@@ -241,7 +241,8 @@ static void kcov_put(struct kcov *kcov) · 176 unmodified lines
241241
242242 void kcov_task_init(struct task_struct *t)
243243 {
244− t->kcov_mode = KCOV_MODE_DISABLED;
244+ WRITE_ONCE(t->kcov_mode, KCOV_MODE_DISABLED);
245+ barrier();
245246 t->kcov_size = 0;
246247 t->kcov_area = NULL;
247248 t->kcov = NULL;
@@ -323,6 +324,21 @@ static int kcov_close(struct inode *inode, struct file *filep) · 75 unmodified lines
323324 return 0;
324325 }
325326
327+/*
328+ * Fault in a lazily-faulted vmalloc area before it can be used by
329+ * __santizer_cov_trace_pc(), to avoid recursion issues if any code on the
330+ * vmalloc fault handling path is instrumented.
331+ */
332+static void kcov_fault_in_area(struct kcov *kcov)
333+{
334+ unsigned long stride = PAGE_SIZE / sizeof(unsigned long);
335+ unsigned long *area = kcov->area;
336+ unsigned long offset;
337+
338+ for (offset = 0; offset < kcov->size; offset += stride)
339+ READ_ONCE(area[offset]);
340+}
341+
326342 static int kcov_ioctl_locked(struct kcov *kcov, unsigned int cmd,
327343 unsigned long arg)
328344 {
@@ -371,6 +387,7 @@ static int kcov_ioctl_locked(struct kcov *kcov, unsigned int cmd, · 42 unmodified lines
371387 #endif
372388 else
373389 return -EINVAL;
390+ kcov_fault_in_area(kcov);
374391 /* Cache in task struct for performance. */
375392 t->kcov_size = kcov->size;
376393 t->kcov_area = kcov->area;
kernel/kexec_core.c+4−0
@@ -829,6 +829,8 @@ static int kimage_load_normal_segment(struct kimage *image, · 828 unmodified lines
829829 else
830830 buf += mchunk;
831831 mbytes -= mchunk;
832+
833+ cond_resched();
832834 }
833835 out:
834836 return result;
@@ -893,6 +895,8 @@ static int kimage_load_crash_segment(struct kimage *image, · 58 unmodified lines
893895 else
894896 buf += mchunk;
895897 mbytes -= mchunk;
898+
899+ cond_resched();
896900 }
897901 out:
898902 return result;
kernel/relay.c+1−1
@@ -39,7 +39,7 @@ static void relay_file_mmap_close(struct vm_area_struct *vma) · 38 unmodified lines
3939 /*
4040 * fault() vm_op implementation for relay file mapping.
4141 */
42−static int relay_buf_fault(struct vm_fault *vmf)
42+static vm_fault_t relay_buf_fault(struct vm_fault *vmf)
4343 {
4444 struct page *page;
4545 struct rchan_buf *buf = vmf->vma->vm_private_data;
kernel/sched/core.c+4−0
@@ -10,6 +10,8 @@ · 9 unmodified lines
1010 #include <linux/kthread.h>
1111 #include <linux/nospec.h>
1212
13+#include <linux/kcov.h>
14+
1315 #include <asm/switch_to.h>
1416 #include <asm/tlb.h>
1517
@@ -2633,6 +2635,7 @@ static inline void · 2617 unmodified lines
26332635 prepare_task_switch(struct rq *rq, struct task_struct *prev,
26342636 struct task_struct *next)
26352637 {
2638+ kcov_prepare_switch(prev);
26362639 sched_info_switch(rq, prev, next);
26372640 perf_event_task_sched_out(prev, next);
26382641 rseq_preempt(prev);
@@ -2702,6 +2705,7 @@ static struct rq *finish_task_switch(struct task_struct *prev) · 63 unmodified lines
27022705 finish_task(prev);
27032706 finish_lock_switch(rq);
27042707 finish_arch_post_lock_switch();
2708+ kcov_finish_switch(current);
27052709
27062710 fire_sched_in_preempt_notifiers(current);
27072711 /*
lib/Kconfig.debug+18−18
@@ -1506,6 +1506,10 @@ config NETDEV_NOTIFIER_ERROR_INJECT · 1505 unmodified lines
15061506
15071507 If unsure, say N.
15081508
1509+config FUNCTION_ERROR_INJECTION
1510+ def_bool y
1511+ depends on HAVE_FUNCTION_ERROR_INJECTION && KPROBES
1512+
15091513 config FAULT_INJECTION
15101514 bool "Fault-injection framework"
15111515 depends on DEBUG_KERNEL
@@ -1513,10 +1517,6 @@ config FAULT_INJECTION · 1 unmodified line
15131517 Provide fault-injection framework.
15141518 For more details, see Documentation/fault-injection/.
15151519
1516−config FUNCTION_ERROR_INJECTION
1517− def_bool y
1518− depends on HAVE_FUNCTION_ERROR_INJECTION && KPROBES
1519−
15201520 config FAILSLAB
15211521 bool "Fault-injection capability for kmalloc"
15221522 depends on FAULT_INJECTION
@@ -1547,16 +1547,6 @@ config FAIL_IO_TIMEOUT · 24 unmodified lines
15471547 Only works with drivers that use the generic timeout handling,
15481548 for others it wont do anything.
15491549
1550−config FAIL_MMC_REQUEST
1551− bool "Fault-injection capability for MMC IO"
1552− depends on FAULT_INJECTION_DEBUG_FS && MMC
1553− help
1554− Provide fault-injection capability for MMC IO.
1555− This will make the mmc core return data errors. This is
1556− useful to test the error handling in the mmc block device
1557− and to test how the mmc host driver handles retries from
1558− the block device.
1559−
15601550 config FAIL_FUTEX
15611551 bool "Fault-injection capability for futexes"
15621552 select DEBUG_FS
@@ -1564,6 +1554,12 @@ config FAIL_FUTEX · 1 unmodified line
15641554 help
15651555 Provide fault-injection capability for futexes.
15661556
1557+config FAULT_INJECTION_DEBUG_FS
1558+ bool "Debugfs entries for fault-injection capabilities"
1559+ depends on FAULT_INJECTION && SYSFS && DEBUG_FS
1560+ help
1561+ Enable configuration of fault-injection capabilities via debugfs.
1562+
15671563 config FAIL_FUNCTION
15681564 bool "Fault-injection capability for functions"
15691565 depends on FAULT_INJECTION_DEBUG_FS && FUNCTION_ERROR_INJECTION
@@ -1574,11 +1570,15 @@ config FAIL_FUNCTION · 4 unmodified lines
15741570 an error value and have to handle it. This is useful to test the
15751571 error handling in various subsystems.
15761572
1577−config FAULT_INJECTION_DEBUG_FS
1578− bool "Debugfs entries for fault-injection capabilities"
1579− depends on FAULT_INJECTION && SYSFS && DEBUG_FS
1573+config FAIL_MMC_REQUEST
1574+ bool "Fault-injection capability for MMC IO"
1575+ depends on FAULT_INJECTION_DEBUG_FS && MMC
15801576 help
1581− Enable configuration of fault-injection capabilities via debugfs.
1577+ Provide fault-injection capability for MMC IO.
1578+ This will make the mmc core return data errors. This is
1579+ useful to test the error handling in the mmc block device
1580+ and to test how the mmc host driver handles retries from
1581+ the block device.
15821582
15831583 config FAULT_INJECTION_STACKTRACE_FILTER
15841584 bool "stacktrace filter for fault-injection capabilities"
lib/test_printf.c+7−0
@@ -260,6 +260,13 @@ plain(void) · 259 unmodified lines
260260 {
261261 int err;
262262
263+ /*
264+ * Make sure crng is ready. Otherwise we get "(ptrval)" instead
265+ * of a hashed address when printing '%p' in plain_hash() and
266+ * plain_format().
267+ */
268+ wait_for_random_bytes();
269+
263270 err = plain_hash();
264271 if (err) {
265272 pr_warn("plain 'p' does not appear to be hashed\n");
mm/cleancache.c+4−6
@@ -307,12 +307,10 @@ static int __init init_cleancache(void) · 306 unmodified lines
307307 struct dentry *root = debugfs_create_dir("cleancache", NULL);
308308 if (root == NULL)
309309 return -ENXIO;
310− debugfs_create_u64("succ_gets", S_IRUGO, root, &cleancache_succ_gets);
311− debugfs_create_u64("failed_gets", S_IRUGO,
312− root, &cleancache_failed_gets);
313− debugfs_create_u64("puts", S_IRUGO, root, &cleancache_puts);
314− debugfs_create_u64("invalidates", S_IRUGO,
315− root, &cleancache_invalidates);
310+ debugfs_create_u64("succ_gets", 0444, root, &cleancache_succ_gets);
311+ debugfs_create_u64("failed_gets", 0444, root, &cleancache_failed_gets);
312+ debugfs_create_u64("puts", 0444, root, &cleancache_puts);
313+ debugfs_create_u64("invalidates", 0444, root, &cleancache_invalidates);
316314 #endif
317315 return 0;
318316 }
mm/cma_debug.c+10−15
@@ -172,23 +172,18 @@ static void cma_debugfs_add_one(struct cma *cma, int idx) · 171 unmodified lines
172172
173173 tmp = debugfs_create_dir(name, cma_debugfs_root);
174174
175− debugfs_create_file("alloc", S_IWUSR, tmp, cma,
176− &cma_alloc_fops);
177−
178− debugfs_create_file("free", S_IWUSR, tmp, cma,
179− &cma_free_fops);
180−
181− debugfs_create_file("base_pfn", S_IRUGO, tmp,
182− &cma->base_pfn, &cma_debugfs_fops);
183− debugfs_create_file("count", S_IRUGO, tmp,
184− &cma->count, &cma_debugfs_fops);
185− debugfs_create_file("order_per_bit", S_IRUGO, tmp,
186− &cma->order_per_bit, &cma_debugfs_fops);
187− debugfs_create_file("used", S_IRUGO, tmp, cma, &cma_used_fops);
188− debugfs_create_file("maxchunk", S_IRUGO, tmp, cma, &cma_maxchunk_fops);
175+ debugfs_create_file("alloc", 0200, tmp, cma, &cma_alloc_fops);
176+ debugfs_create_file("free", 0200, tmp, cma, &cma_free_fops);
177+ debugfs_create_file("base_pfn", 0444, tmp,
178+ &cma->base_pfn, &cma_debugfs_fops);
179+ debugfs_create_file("count", 0444, tmp, &cma->count, &cma_debugfs_fops);
180+ debugfs_create_file("order_per_bit", 0444, tmp,
181+ &cma->order_per_bit, &cma_debugfs_fops);
182+ debugfs_create_file("used", 0444, tmp, cma, &cma_used_fops);
183+ debugfs_create_file("maxchunk", 0444, tmp, cma, &cma_maxchunk_fops);
189184
190185 u32s = DIV_ROUND_UP(cma_bitmap_maxno(cma), BITS_PER_BYTE * sizeof(u32));
191− debugfs_create_u32_array("bitmap", S_IRUGO, tmp, (u32*)cma->bitmap, u32s);
186+ debugfs_create_u32_array("bitmap", 0444, tmp, (u32 *)cma->bitmap, u32s);
192187 }
193188
194189 static int __init cma_debugfs_init(void)
mm/compaction.c+1−1
@@ -1899,7 +1899,7 @@ static ssize_t sysfs_compact_node(struct device *dev, · 1898 unmodified lines
18991899
19001900 return count;
19011901 }
1902−static DEVICE_ATTR(compact, S_IWUSR, NULL, sysfs_compact_node);
1902+static DEVICE_ATTR(compact, 0200, NULL, sysfs_compact_node);
19031903
19041904 int compaction_register_node(struct node *node)
19051905 {
mm/dmapool.c+1−1
@@ -105,7 +105,7 @@ show_pools(struct device *dev, struct device_attribute *attr, char *buf) · 104 unmodified lines
105105 return PAGE_SIZE - size;
106106 }
107107
108−static DEVICE_ATTR(pools, S_IRUGO, show_pools, NULL);
108+static DEVICE_ATTR(pools, 0444, show_pools, NULL);
109109
110110 /**
111111 * dma_pool_create - Creates a pool of consistent memory blocks, for dma.
mm/failslab.c+1−1
@@ -42,7 +42,7 @@ __setup("failslab=", setup_failslab); · 41 unmodified lines
4242 static int __init failslab_debugfs_init(void)
4343 {
4444 struct dentry *dir;
45− umode_t mode = S_IFREG | S_IRUSR | S_IWUSR;
45+ umode_t mode = S_IFREG | 0600;
4646
4747 dir = fault_create_debugfs_attr("failslab", NULL, &failslab.attr);
4848 if (IS_ERR(dir))
mm/frontswap.c+5−6
@@ -486,12 +486,11 @@ static int __init init_frontswap(void) · 485 unmodified lines
486486 struct dentry *root = debugfs_create_dir("frontswap", NULL);
487487 if (root == NULL)
488488 return -ENXIO;
489− debugfs_create_u64("loads", S_IRUGO, root, &frontswap_loads);
490− debugfs_create_u64("succ_stores", S_IRUGO, root, &frontswap_succ_stores);
491− debugfs_create_u64("failed_stores", S_IRUGO, root,
492− &frontswap_failed_stores);
493− debugfs_create_u64("invalidates", S_IRUGO,
494− root, &frontswap_invalidates);
489+ debugfs_create_u64("loads", 0444, root, &frontswap_loads);
490+ debugfs_create_u64("succ_stores", 0444, root, &frontswap_succ_stores);
491+ debugfs_create_u64("failed_stores", 0444, root,
492+ &frontswap_failed_stores);
493+ debugfs_create_u64("invalidates", 0444, root, &frontswap_invalidates);
495494 #endif
496495 return 0;
497496 }
mm/ksm.c+10−4
@@ -216,6 +216,8 @@ struct rmap_item { · 215 unmodified lines
216216 #define SEQNR_MASK 0x0ff /* low bits of unstable tree seqnr */
217217 #define UNSTABLE_FLAG 0x100 /* is a node of the unstable tree */
218218 #define STABLE_FLAG 0x200 /* is listed from the stable tree */
219+#define KSM_FLAG_MASK (SEQNR_MASK|UNSTABLE_FLAG|STABLE_FLAG)
220+ /* to mask all the flags */
219221
220222 /* The stable and unstable tree heads */
221223 static struct rb_root one_stable_tree[1] = { RB_ROOT };
@@ -2598,10 +2600,15 @@ again: · 2376 unmodified lines
25982600 anon_vma_lock_read(anon_vma);
25992601 anon_vma_interval_tree_foreach(vmac, &anon_vma->rb_root,
26002602 0, ULONG_MAX) {
2603+ unsigned long addr;
2604+
26012605 cond_resched();
26022606 vma = vmac->vma;
2603− if (rmap_item->address < vma->vm_start ||
2604− rmap_item->address >= vma->vm_end)
2607+
2608+ /* Ignore the stable/unstable/sqnr flags */
2609+ addr = rmap_item->address & ~KSM_FLAG_MASK;
2610+
2611+ if (addr < vma->vm_start || addr >= vma->vm_end)
26052612 continue;
26062613 /*
26072614 * Initially we examine only the vma which covers this
@@ -2615,8 +2622,7 @@ again: · 7 unmodified lines
26152622 if (rwc->invalid_vma && rwc->invalid_vma(vma, rwc->arg))
26162623 continue;
26172624
2618− if (!rwc->rmap_one(page, vma,
2619− rmap_item->address, rwc->arg)) {
2625+ if (!rwc->rmap_one(page, vma, addr, rwc->arg)) {
26202626 anon_vma_unlock_read(anon_vma);
26212627 return;
26222628 }
mm/memblock.c+7−3
@@ -20,6 +20,7 @@ · 19 unmodified lines
2020 #include <linux/kmemleak.h>
2121 #include <linux/seq_file.h>
2222 #include <linux/memblock.h>
23+#include <linux/bootmem.h>
2324
2425 #include <asm/sections.h>
2526 #include <linux/io.h>
@@ -1808,10 +1809,13 @@ static int __init memblock_init_debugfs(void) · 1782 unmodified lines
18081809 struct dentry *root = debugfs_create_dir("memblock", NULL);
18091810 if (!root)
18101811 return -ENXIO;
1811− debugfs_create_file("memory", S_IRUGO, root, &memblock.memory, &memblock_debug_fops);
1812− debugfs_create_file("reserved", S_IRUGO, root, &memblock.reserved, &memblock_debug_fops);
1812+ debugfs_create_file("memory", 0444, root,
1813+ &memblock.memory, &memblock_debug_fops);
1814+ debugfs_create_file("reserved", 0444, root,
1815+ &memblock.reserved, &memblock_debug_fops);
18131816 #ifdef CONFIG_HAVE_MEMBLOCK_PHYS_MAP
1814− debugfs_create_file("physmem", S_IRUGO, root, &memblock.physmem, &memblock_debug_fops);
1817+ debugfs_create_file("physmem", 0444, root,
1818+ &memblock.physmem, &memblock_debug_fops);
18151819 #endif
18161820
18171821 return 0;
mm/memcontrol.c+8−2
@@ -3550,7 +3550,8 @@ static int mem_cgroup_oom_control_read(struct seq_file *sf, void *v) · 3549 unmodified lines
35503550
35513551 seq_printf(sf, "oom_kill_disable %d\n", memcg->oom_kill_disable);
35523552 seq_printf(sf, "under_oom %d\n", (bool)memcg->under_oom);
3553− seq_printf(sf, "oom_kill %lu\n", memcg_sum_events(memcg, OOM_KILL));
3553+ seq_printf(sf, "oom_kill %lu\n",
3554+ atomic_long_read(&memcg->memory_events[MEMCG_OOM_KILL]));
35543555 return 0;
35553556 }
35563557
@@ -5239,7 +5240,8 @@ static int memory_events_show(struct seq_file *m, void *v) · 1682 unmodified lines
52395240 atomic_long_read(&memcg->memory_events[MEMCG_MAX]));
52405241 seq_printf(m, "oom %lu\n",
52415242 atomic_long_read(&memcg->memory_events[MEMCG_OOM]));
5242− seq_printf(m, "oom_kill %lu\n", memcg_sum_events(memcg, OOM_KILL));
5243+ seq_printf(m, "oom_kill %lu\n",
5244+ atomic_long_read(&memcg->memory_events[MEMCG_OOM_KILL]));
52435245
52445246 return 0;
52455247 }
@@ -5480,6 +5482,10 @@ enum mem_cgroup_protection mem_cgroup_protected(struct mem_cgroup *root, · 234 unmodified lines
54805482 elow = memcg->memory.low;
54815483
54825484 parent = parent_mem_cgroup(memcg);
5485+ /* No parent means a non-hierarchical mode on v1 memcg */
5486+ if (!parent)
5487+ return MEMCG_PROT_NONE;
5488+
54835489 if (parent == root)
54845490 goto exit;
54855491
mm/mremap.c+0−4
@@ -191,8 +191,6 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, · 190 unmodified lines
191191 drop_rmap_locks(vma);
192192 }
193193
194−#define LATENCY_LIMIT (64 * PAGE_SIZE)
195−
196194 unsigned long move_page_tables(struct vm_area_struct *vma,
197195 unsigned long old_addr, struct vm_area_struct *new_vma,
198196 unsigned long new_addr, unsigned long len,
@@ -247,8 +245,6 @@ unsigned long move_page_tables(struct vm_area_struct *vma, · 48 unmodified lines
247245 next = (new_addr + PMD_SIZE) & PMD_MASK;
248246 if (extent > next - new_addr)
249247 extent = next - new_addr;
250− if (extent > LATENCY_LIMIT)
251− extent = LATENCY_LIMIT;
252248 move_ptes(vma, old_pmd, old_addr, old_addr + extent, new_vma,
253249 new_pmd, new_addr, need_rmap_locks, &need_flush);
254250 }
mm/oom_kill.c+1−1
@@ -913,7 +913,7 @@ static void oom_kill_process(struct oom_control *oc, const char *message) · 912 unmodified lines
913913
914914 /* Raise event before sending signal: task reaper must see this */
915915 count_vm_event(OOM_KILL);
916− count_memcg_event_mm(mm, OOM_KILL);
916+ memcg_memory_event_mm(mm, MEMCG_OOM_KILL);
917917
918918 /*
919919 * We should send SIGKILL before granting access to memory reserves
mm/page_alloc.c+1−1
@@ -3061,7 +3061,7 @@ static bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order) · 3060 unmodified lines
30613061
30623062 static int __init fail_page_alloc_debugfs(void)
30633063 {
3064− umode_t mode = S_IFREG | S_IRUSR | S_IWUSR;
3064+ umode_t mode = S_IFREG | 0600;
30653065 struct dentry *dir;
30663066
30673067 dir = fault_create_debugfs_attr("fail_page_alloc", NULL,
mm/page_idle.c+1−1
@@ -201,7 +201,7 @@ static ssize_t page_idle_bitmap_write(struct file *file, struct kobject *kobj, · 200 unmodified lines
201201 }
202202
203203 static struct bin_attribute page_idle_bitmap_attr =
204− __BIN_ATTR(bitmap, S_IRUSR | S_IWUSR,
204+ __BIN_ATTR(bitmap, 0600,
205205 page_idle_bitmap_read, page_idle_bitmap_write, 0);
206206
207207 static struct bin_attribute *page_idle_bin_attrs[] = {
mm/page_owner.c+2−2
@@ -631,8 +631,8 @@ static int __init pageowner_init(void) · 630 unmodified lines
631631 return 0;
632632 }
633633
634− dentry = debugfs_create_file("page_owner", S_IRUSR, NULL,
635− NULL, &proc_page_owner_operations);
634+ dentry = debugfs_create_file("page_owner", 0400, NULL,
635+ NULL, &proc_page_owner_operations);
636636
637637 return PTR_ERR_OR_ZERO(dentry);
638638 }
mm/shmem.c+5−4
@@ -3013,7 +3013,8 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s · 3012 unmodified lines
30133013 if (len > PAGE_SIZE)
30143014 return -ENAMETOOLONG;
30153015
3016− inode = shmem_get_inode(dir->i_sb, dir, S_IFLNK|S_IRWXUGO, 0, VM_NORESERVE);
3016+ inode = shmem_get_inode(dir->i_sb, dir, S_IFLNK | 0777, 0,
3017+ VM_NORESERVE);
30173018 if (!inode)
30183019 return -ENOSPC;
30193020
@@ -3445,7 +3446,7 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root) · 425 unmodified lines
34453446 sbinfo->max_blocks << (PAGE_SHIFT - 10));
34463447 if (sbinfo->max_inodes != shmem_default_max_inodes())
34473448 seq_printf(seq, ",nr_inodes=%lu", sbinfo->max_inodes);
3448− if (sbinfo->mode != (S_IRWXUGO | S_ISVTX))
3449+ if (sbinfo->mode != (0777 | S_ISVTX))
34493450 seq_printf(seq, ",mode=%03ho", sbinfo->mode);
34503451 if (!uid_eq(sbinfo->uid, GLOBAL_ROOT_UID))
34513452 seq_printf(seq, ",uid=%u",
@@ -3486,7 +3487,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent) · 34 unmodified lines
34863487 if (!sbinfo)
34873488 return -ENOMEM;
34883489
3489− sbinfo->mode = S_IRWXUGO | S_ISVTX;
3490+ sbinfo->mode = 0777 | S_ISVTX;
34903491 sbinfo->uid = current_fsuid();
34913492 sbinfo->gid = current_fsgid();
34923493 sb->s_fs_info = sbinfo;
@@ -3929,7 +3930,7 @@ static struct file *__shmem_file_setup(struct vfsmount *mnt, const char *name, l · 436 unmodified lines
39293930 d_set_d_op(path.dentry, &anon_ops);
39303931
39313932 res = ERR_PTR(-ENOSPC);
3932− inode = shmem_get_inode(sb, NULL, S_IFREG | S_IRWXUGO, 0, flags);
3933+ inode = shmem_get_inode(sb, NULL, S_IFREG | 0777, 0, flags);
39333934 if (!inode)
39343935 goto put_memory;
39353936
mm/slab_common.c+34−3
@@ -136,6 +136,7 @@ void slab_init_memcg_params(struct kmem_cache *s) · 135 unmodified lines
136136 s->memcg_params.root_cache = NULL;
137137 RCU_INIT_POINTER(s->memcg_params.memcg_caches, NULL);
138138 INIT_LIST_HEAD(&s->memcg_params.children);
139+ s->memcg_params.dying = false;
139140 }
140141
141142 static int init_memcg_params(struct kmem_cache *s,
@@ -608,7 +609,7 @@ void memcg_create_kmem_cache(struct mem_cgroup *memcg, · 466 unmodified lines
608609 * The memory cgroup could have been offlined while the cache
609610 * creation work was pending.
610611 */
611− if (memcg->kmem_state != KMEM_ONLINE)
612+ if (memcg->kmem_state != KMEM_ONLINE || root_cache->memcg_params.dying)
612613 goto out_unlock;
613614
614615 idx = memcg_cache_id(memcg);
@@ -712,6 +713,9 @@ void slab_deactivate_memcg_cache_rcu_sched(struct kmem_cache *s, · 97 unmodified lines
712713 WARN_ON_ONCE(s->memcg_params.deact_fn))
713714 return;
714715
716+ if (s->memcg_params.root_cache->memcg_params.dying)
717+ return;
718+
715719 /* pin memcg so that @s doesn't get destroyed in the middle */
716720 css_get(&s->memcg_params.memcg->css);
717721
@@ -823,11 +827,36 @@ static int shutdown_memcg_caches(struct kmem_cache *s) · 105 unmodified lines
823827 return -EBUSY;
824828 return 0;
825829 }
830+
831+static void flush_memcg_workqueue(struct kmem_cache *s)
832+{
833+ mutex_lock(&slab_mutex);
834+ s->memcg_params.dying = true;
835+ mutex_unlock(&slab_mutex);
836+
837+ /*
838+ * SLUB deactivates the kmem_caches through call_rcu_sched. Make
839+ * sure all registered rcu callbacks have been invoked.
840+ */
841+ if (IS_ENABLED(CONFIG_SLUB))
842+ rcu_barrier_sched();
843+
844+ /*
845+ * SLAB and SLUB create memcg kmem_caches through workqueue and SLUB
846+ * deactivates the memcg kmem_caches through workqueue. Make sure all
847+ * previous workitems on workqueue are processed.
848+ */
849+ flush_workqueue(memcg_kmem_cache_wq);
850+}
826851 #else
827852 static inline int shutdown_memcg_caches(struct kmem_cache *s)
828853 {
829854 return 0;
830855 }
856+
857+static inline void flush_memcg_workqueue(struct kmem_cache *s)
858+{
859+}
831860 #endif /* CONFIG_MEMCG && !CONFIG_SLOB */
832861
833862 void slab_kmem_cache_release(struct kmem_cache *s)
@@ -845,6 +874,8 @@ void kmem_cache_destroy(struct kmem_cache *s) · 11 unmodified lines
845874 if (unlikely(!s))
846875 return;
847876
877+ flush_memcg_workqueue(s);
878+
848879 get_online_cpus();
849880 get_online_mems();
850881
@@ -1212,9 +1243,9 @@ void cache_random_seq_destroy(struct kmem_cache *cachep) · 361 unmodified lines
12121243
12131244 #if defined(CONFIG_SLAB) || defined(CONFIG_SLUB_DEBUG)
12141245 #ifdef CONFIG_SLAB
1215−#define SLABINFO_RIGHTS (S_IWUSR | S_IRUSR)
1246+#define SLABINFO_RIGHTS (0600)
12161247 #else
1217−#define SLABINFO_RIGHTS S_IRUSR
1248+#define SLABINFO_RIGHTS (0400)
12181249 #endif
12191250
12201251 static void print_slabinfo_header(struct seq_file *m)
mm/swapfile.c+1−1
@@ -100,7 +100,7 @@ atomic_t nr_rotate_swap = ATOMIC_INIT(0); · 99 unmodified lines
100100
101101 static inline unsigned char swap_count(unsigned char ent)
102102 {
103− return ent & ~SWAP_HAS_CACHE; /* may include SWAP_HAS_CONT flag */
103+ return ent & ~SWAP_HAS_CACHE; /* may include COUNT_CONTINUED flag */
104104 }
105105
106106 /* returns 1 if swap entry is freed */
mm/vmalloc.c+2−2
@@ -2741,11 +2741,11 @@ static const struct seq_operations vmalloc_op = { · 2740 unmodified lines
27412741 static int __init proc_vmalloc_init(void)
27422742 {
27432743 if (IS_ENABLED(CONFIG_NUMA))
2744− proc_create_seq_private("vmallocinfo", S_IRUSR, NULL,
2744+ proc_create_seq_private("vmallocinfo", 0400, NULL,
27452745 &vmalloc_op,
27462746 nr_node_ids * sizeof(unsigned int), NULL);
27472747 else
2748− proc_create_seq("vmallocinfo", S_IRUSR, NULL, &vmalloc_op);
2748+ proc_create_seq("vmallocinfo", 0400, NULL, &vmalloc_op);
27492749 return 0;
27502750 }
27512751 module_init(proc_vmalloc_init);
mm/zsmalloc.c+3−2
@@ -661,8 +661,9 @@ static void zs_pool_stat_create(struct zs_pool *pool, const char *name) · 660 unmodified lines
661661 }
662662 pool->stat_dentry = entry;
663663
664− entry = debugfs_create_file("classes", S_IFREG | S_IRUGO,
665− pool->stat_dentry, pool, &zs_stats_size_fops);
664+ entry = debugfs_create_file("classes", S_IFREG | 0444,
665+ pool->stat_dentry, pool,
666+ &zs_stats_size_fops);
666667 if (!entry) {
667668 pr_warn("%s: debugfs file entry <%s> creation failed\n",
668669 name, "classes");
mm/zswap.c+19−19
@@ -1256,26 +1256,26 @@ static int __init zswap_debugfs_init(void) · 1255 unmodified lines
12561256 if (!zswap_debugfs_root)
12571257 return -ENOMEM;
12581258
1259− debugfs_create_u64("pool_limit_hit", S_IRUGO,
1260− zswap_debugfs_root, &zswap_pool_limit_hit);
1261− debugfs_create_u64("reject_reclaim_fail", S_IRUGO,
1262− zswap_debugfs_root, &zswap_reject_reclaim_fail);
1263− debugfs_create_u64("reject_alloc_fail", S_IRUGO,
1264− zswap_debugfs_root, &zswap_reject_alloc_fail);
1265− debugfs_create_u64("reject_kmemcache_fail", S_IRUGO,
1266− zswap_debugfs_root, &zswap_reject_kmemcache_fail);
1267− debugfs_create_u64("reject_compress_poor", S_IRUGO,
1268− zswap_debugfs_root, &zswap_reject_compress_poor);
1269− debugfs_create_u64("written_back_pages", S_IRUGO,
1270− zswap_debugfs_root, &zswap_written_back_pages);
1271− debugfs_create_u64("duplicate_entry", S_IRUGO,
1272− zswap_debugfs_root, &zswap_duplicate_entry);
1273− debugfs_create_u64("pool_total_size", S_IRUGO,
1274− zswap_debugfs_root, &zswap_pool_total_size);
1275− debugfs_create_atomic_t("stored_pages", S_IRUGO,
1276− zswap_debugfs_root, &zswap_stored_pages);
1259+ debugfs_create_u64("pool_limit_hit", 0444,
1260+ zswap_debugfs_root, &zswap_pool_limit_hit);
1261+ debugfs_create_u64("reject_reclaim_fail", 0444,
1262+ zswap_debugfs_root, &zswap_reject_reclaim_fail);
1263+ debugfs_create_u64("reject_alloc_fail", 0444,
1264+ zswap_debugfs_root, &zswap_reject_alloc_fail);
1265+ debugfs_create_u64("reject_kmemcache_fail", 0444,
1266+ zswap_debugfs_root, &zswap_reject_kmemcache_fail);
1267+ debugfs_create_u64("reject_compress_poor", 0444,
1268+ zswap_debugfs_root, &zswap_reject_compress_poor);
1269+ debugfs_create_u64("written_back_pages", 0444,
1270+ zswap_debugfs_root, &zswap_written_back_pages);
1271+ debugfs_create_u64("duplicate_entry", 0444,
1272+ zswap_debugfs_root, &zswap_duplicate_entry);
1273+ debugfs_create_u64("pool_total_size", 0444,
1274+ zswap_debugfs_root, &zswap_pool_total_size);
1275+ debugfs_create_atomic_t("stored_pages", 0444,
1276+ zswap_debugfs_root, &zswap_stored_pages);
12771277 debugfs_create_atomic_t("same_filled_pages", 0444,
1278− zswap_debugfs_root, &zswap_same_filled_pages);
1278+ zswap_debugfs_root, &zswap_same_filled_pages);
12791279
12801280 return 0;
12811281 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t