- 12 Jul, 2024 3 commits
-
-
Masahiro Yamada authored
This reverts commit eb8f6890 ("Use separate sections for __dev/ _cpu/__mem code/data"). Check section mismatch to __meminit* only when CONFIG_MEMORY_HOTPLUG=n. With this change, the linker script and modpost become simpler, and we can get rid of the __ref annotations from the memory hotplug code. [sfr@canb.auug.org.au: remove MEM_KEEP from arch/powerpc/kernel/vmlinux.lds.S] Link: https://lkml.kernel.org/r/20240710093213.2aefb25f@canb.auug.org.au Link: https://lkml.kernel.org/r/20240706160511.2331061-2-masahiroy@kernel.orgSigned-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Reviewed-by: Wei Yang <richard.weiyang@gmail.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Masahiro Yamada authored
These macros are not used anywhere. Link: https://lkml.kernel.org/r/20240706160511.2331061-1-masahiroy@kernel.orgSigned-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Wei Yang <richard.weiyang@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Christophe JAILLET authored
'struct kobj_type' is not modified in this driver. It is only used with kobject_init_and_add() which takes a "const struct kobj_type *" parameter. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 22403 4184 24 26611 67f3 fs/nilfs2/sysfs.o After: ===== text data bss dec hex filename 22723 3928 24 26675 6833 fs/nilfs2/sysfs.o Link: https://lkml.kernel.org/r/20240708143242.3296-1-konishi.ryusuke@gmail.comSigned-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 05 Jul, 2024 8 commits
-
-
Ryusuke Konishi authored
According to the C standard 3.4.3p3, the result of signed integer overflow is undefined. The macro nilfs_cnt32_ge(), which compares two sequence numbers, uses signed integer subtraction that can overflow, and therefore the result of the calculation may differ from what is expected due to undefined behavior in different environments. Similar to an earlier change to the jiffies-related comparison macros in commit 5a581b36 ("jiffies: Avoid undefined behavior from signed overflow"), avoid this potential issue by changing the definition of the macro to perform the subtraction as unsigned integers, then cast the result to a signed integer for comparison. Link: https://lkml.kernel.org/r/20130727225828.GA11864@linux.vnet.ibm.com Link: https://lkml.kernel.org/r/20240702183512.6390-1-konishi.ryusuke@gmail.com Fixes: 9ff05123 ("nilfs2: segment constructor") Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Jeff Johnson authored
With ARCH=sh, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/math/rational.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240702-md-sh-lib-math-v1-1-93f4ac4fa8fd@quicinc.comSigned-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Jeff Johnson authored
With ARCH=csky, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/zlib_deflate/zlib_deflate.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240613-md-csky-lib-zlib_deflate-v1-1-83504d9a27d6@quicinc.comSigned-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Cc: Guo Ren <guoren@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Jeff Johnson authored
Fix make W=1 warning: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/ufs/ufs.o Link: https://lkml.kernel.org/r/20240510-ufs-md-v1-1-85eaff8c6beb@quicinc.comSigned-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Cc: Evgeniy Dushistov <dushistov@mail.ru> Cc: Christian Brauner <brauner@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Hsin Chang Yu authored
Replace the "Sr" with "sr", the example is wrong if sl and N don't have child nodes, so sr should be red node. Link: https://lkml.kernel.org/r/20240628142229.69419-1-zxcvb600870024@gmail.comSigned-off-by: Hsin Chang Yu <zxcvb600870024@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
lei lu authored
This adds sanity checks for ocfs2_dir_entry to make sure all members of ocfs2_dir_entry don't stray beyond valid memory region. Link: https://lkml.kernel.org/r/20240626104433.163270-1-llfamsec@gmail.comSigned-off-by: lei lu <llfamsec@gmail.com> Reviewed-by: Heming Zhao <heming.zhao@suse.com> Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Changwei Ge <gechangwei@live.cn> Cc: Gang He <ghe@suse.com> Cc: Jun Piao <piaojun@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Yang Li authored
This commit adds kernel-doc style comments with complete parameter descriptions for the function ocfs2_prepare_orphan_dir. Link: https://lkml.kernel.org/r/20240322063718.88183-1-yang.lee@linux.alibaba.comSigned-off-by: Yang Li <yang.lee@linux.alibaba.com> Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Changwei Ge <gechangwei@live.cn> Cc: Gang He <ghe@suse.com> Cc: Jun Piao <piaojun@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Oleg Nesterov authored
After commit 0258b5fd ("coredump: Limit coredumps to a single thread group") zap_process() doesn't need the "task_struct *start" arg, zap_threads() can pass "signal_struct *signal" instead. This simplifies the code and allows to use __for_each_thread() which is slightly more efficient. Link: https://lkml.kernel.org/r/20240625140311.GA20787@redhat.comSigned-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Christian Brauner <brauner@kernel.org> Cc: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 29 Jun, 2024 14 commits
-
-
Jeff Johnson authored
make allmodconfig && make W=1 C=1 now reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_fpu.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240622-md-i386-lib-test_fpu_glue-v1-1-a4e40b7b1264@quicinc.com Fixes: 9613736d ("selftests/fpu: move FP code to a separate translation unit") Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: Samuel Holland <samuel.holland@sifive.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Alexey Dobriyan authored
-Wdeclaration-after-statement used since forever required statement expressions to inject __kcsan_disable_current(), __kcsan_enable_current() to mark data race. Now that it is gone, make macro expansion simpler. __unqual_scalar_typeof() is wordy macro by itself. "expr" is expanded twice. Link: https://lkml.kernel.org/r/fb62163f-ba21-4661-be5b-bb5124abc87d@p183Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Reviewed-by: Marco Elver <elver@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Alexey Dobriyan authored
Neither ELF spec not ELF loader require program header to be placed right after ELF header, but build-id code very much assumes such placement: See find_get_page(vma->vm_file->f_mapping, 0); line and checks against PAGE_SIZE. Returns errors for now until someone rewrites build-id parser to be more inline with load_elf_binary(). Link: https://lkml.kernel.org/r/d58bc281-6ca7-467a-9a64-40fa214bd63e@p183Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Reviewed-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Jeff Johnson authored
Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/resource_kunit.o Link: https://lkml.kernel.org/r/20240529-md-kernel-resource_kunit-v1-1-bb719784b714@quicinc.comSigned-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Jeff Johnson authored
make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/bytestream-example.o WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/dma-example.o WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/inttype-example.o WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/record-example.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240601-md-samples-kfifo-v1-1-de34345c5fd8@quicinc.comSigned-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Stefani Seibold <stefani@seibold.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Kuan-Ying Lee authored
We encounter the following issue after commit a6c1d9cb ("stackdepot: rename pool_index to pool_index_plus_1"). (gdb) lx-dump-page-owner --pfn 262144 ... Python Exception <class 'gdb.error'>: There is no member named pool_index. Error occurred in Python: There is no member named pool_index. We rename pool_index to pool_index_plus_1 to fix this issue. Link: https://lkml.kernel.org/r/20240619074911.100434-7-kuan-ying.lee@canonical.com Fixes: a6c1d9cb ("stackdepot: rename pool_index to pool_index_plus_1") Signed-off-by: Kuan-Ying Lee <kuan-ying.lee@canonical.com> Cc: Jan Kiszka <jan.kiszka@siemens.com> Cc: Kieran Bingham <kbingham@kernel.org> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Kuan-Ying Lee authored
Change VA_BITS_MIN when we use 16K page. Link: https://lkml.kernel.org/r/20240619074911.100434-6-kuan-ying.lee@canonical.com Fixes: 9684ec18 ("arm64: Enable LPA2 at boot if supported by the system") Signed-off-by: Kuan-Ying Lee <kuan-ying.lee@canonical.com> Cc: Jan Kiszka <jan.kiszka@siemens.com> Cc: Kieran Bingham <kbingham@kernel.org> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Kuan-Ying Lee authored
We encounter the following issue after commit 9cce9c6c ("arm64: mm: Handle LVA support as a CPU feature"). (gdb) lx-slabinfo Python Exception <class 'gdb.error'>: No symbol "vabits_actual" in current context. Error occurred in Python: No symbol "vabits_actual" in current context. We set vabits_actual based on TCR_EL1 value when VA_BITS is bigger than 48. Link: https://lkml.kernel.org/r/20240619074911.100434-5-kuan-ying.lee@canonical.com Fixes: 9cce9c6c ("arm64: mm: Handle LVA support as a CPU feature") Signed-off-by: Kuan-Ying Lee <kuan-ying.lee@canonical.com> Cc: Jan Kiszka <jan.kiszka@siemens.com> Cc: Kieran Bingham <kbingham@kernel.org> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Kuan-Ying Lee authored
We need to change the layout of vmemmap in gdb scripts after commit 32697ff3 ("arm64: vmemmap: Avoid base2 order of struct page size to dimension region") changed it. Link: https://lkml.kernel.org/r/20240619074911.100434-4-kuan-ying.lee@canonical.com Fixes: 32697ff3 ("arm64: vmemmap: Avoid base2 order of struct page size to dimension region") Signed-off-by: Kuan-Ying Lee <kuan-ying.lee@canonical.com> Cc: Jan Kiszka <jan.kiszka@siemens.com> Cc: Kieran Bingham <kbingham@kernel.org> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Kuan-Ying Lee authored
After we enlarge the module VA range, we also change the module VA range in gdb scripts. Link: https://lkml.kernel.org/r/20240619074911.100434-3-kuan-ying.lee@canonical.com Fixes: 3e35d303 ("arm64: module: rework module VA range selection") Signed-off-by: Kuan-Ying Lee <kuan-ying.lee@canonical.com> Cc: Jan Kiszka <jan.kiszka@siemens.com> Cc: Kieran Bingham <kbingham@kernel.org> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Kuan-Ying Lee authored
Patch series "Fix GDB command error". This patchset fixes some GDB command errors. 1. Since memory layout of AARCH64 has been changed, we need to modify the layout in GDB scripts as well. 2. Fix pool_index naming of stackdepot. This patch (of 6): Change the definition of MAX_ORDER to be inclusive. Link: https://lkml.kernel.org/r/20240619074911.100434-1-kuan-ying.lee@canonical.com Link: https://lkml.kernel.org/r/20240619074911.100434-2-kuan-ying.lee@canonical.com Fixes: 23baf831 ("mm, treewide: redefine MAX_ORDER sanely") Signed-off-by: Kuan-Ying Lee <kuan-ying.lee@canonical.com> Cc: Jan Kiszka <jan.kiszka@siemens.com> Cc: Kieran Bingham <kbingham@kernel.org> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Jesse Brandeburg authored
There were several instances of the string "assocat" in the kernel, which should have been spelled "associat", with the various endings of -ive, -ed, -ion, and sometimes beginnging with dis-. Add to the spelling dictionary the corrections so that future instances will be caught by checkpatch, and fix the instances found. Originally noticed by accident with a 'git grep socat'. Link: https://lkml.kernel.org/r/20240612001247.356867-1-jesse.brandeburg@intel.comSigned-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Cc: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Amer Al Shanawany authored
fix the following warning: proc-empty-vm.c:385:17: warning: ignoring return value of `write' declared with attribute `warn_unused_result' [-Wunused-result] 385 | write(1, buf, rv); | ^~~~~~~~~~~~~~~~~ Link: https://lkml.kernel.org/r/20240603124220.33778-1-amer.shanawany@gmail.comSigned-off-by: Amer Al Shanawany <amer.shanawany@gmail.com> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/r/202404010211.ygidvMwa-lkp@intel.com/ Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Hugh Dickins <hughd@google.com> Cc: Javier Carrasco <javier.carrasco.cruz@gmail.com> Cc: Shuah Khan <shuah@kernel.org> Cc: Swarup Laxman Kotiaklapudi <swarupkotikalapudi@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Sidhartha Kumar authored
Userspace builds of the radix-tree testing suite fails because of patch KUnit: add missing MODULE_DESCRIPTION() macros for lib/test_*.ko. Add the proper defines to tools/testing/radix-tree/idr-test.c so MODULE_DESCRIPTION has a definition. This allows the build to succeed. Link: https://lkml.kernel.org/r/20240626232100.306130-1-sidhartha.kumar@oracle.com Fixes: f069e33d ("KUnit: add missing MODULE_DESCRIPTION() macros for lib/test_*.ko") Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com> Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> Cc: Jeff Johnson <quic_jjohnson@quicinc.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
- 25 Jun, 2024 15 commits
-
-
Jeff Johnson authored
make allmodconfig && make W=1 C=1 reports for lib/test_*.ko: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_hexdump.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_dhry.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_firmware.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_sysctl.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_hash.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_ida.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_list_sort.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_min_heap.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_module.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_sort.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_static_keys.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_static_key_base.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_memcat_p.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_blackhole_dev.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_meminit.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_free_pages.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_kprobes.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_ref_tracker.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_bits.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240619-md-lib-test-v2-1-301e30eeba1e@quicinc.comSigned-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: Kees Cook <kees@kernel.org> Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Masami Hiramatsu (Google) <mhiramat@kernel.org> Cc: "Naveen N. Rao" <naveen.n.rao@linux.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Suren Baghdasaryan authored
To make it easier to identify the crashing process, report effective UID when dumping the stack. Link: https://lkml.kernel.org/r/20240615041358.103791-1-surenb@google.comSigned-off-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Sidhartha Kumar authored
Userspace builds of the radix-tree testing suite fails because of commit test_maple_tree: add the missing MODULE_DESCRIPTION() macro. Add the proper defines to tools/testing/radix-tree/maple.c and tools/testing/radix-tree/xarray.c so MODULE_DESCRIPTION has a definition. This allows the build to succeed. Link: https://lkml.kernel.org/r/20240617195221.106565-1-sidhartha.kumar@oracle.com Fixes: 9f8090e8c4d1 ("test_maple_tree: add the missing MODULE_DESCRIPTION() macro") Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com> Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> Cc: Jeff Johnson <quic_jjohnson@quicinc.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Christophe JAILLET authored
"struct ocfs2_stack_operations" are not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. In order to do it, "struct ocfs2_stack_plugin" also needs to be adjusted to this new const qualifier. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 6241 644 0 6885 1ae5 fs/ocfs2/stack_o2cb.o After: ===== text data bss dec hex filename 6337 548 0 6885 1ae5 fs/ocfs2/stack_o2cb.o Link: https://lkml.kernel.org/r/f52dab89ee0049ec6271de29183a781efbb275ab.1718398605.git.christophe.jaillet@wanadoo.frSigned-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Joseph Qi <jiangqi903@gmail.com> Cc: Changwei Ge <gechangwei@live.cn> Cc: Gang He <ghe@suse.com> Cc: Jun Piao <piaojun@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Christophe JAILLET authored
"struct ocfs2_lock_res_ops" are not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. In order to do it, "struct ocfs2_lock_res" also needs to be adjusted to this new const qualifier. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 83038 2632 400 86070 15036 fs/ocfs2/dlmglue.o After: ===== text data bss dec hex filename 83806 1992 272 86070 15036 fs/ocfs2/dlmglue.o Link: https://lkml.kernel.org/r/43d3e2ae3a97d3cbe93d6ba6ce48ae5ec04d7526.1718382288.git.christophe.jaillet@wanadoo.frSigned-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Joseph Qi <jiangqi903@gmail.com> Cc: Changwei Ge <gechangwei@live.cn> Cc: Gang He <ghe@suse.com> Cc: Jun Piao <piaojun@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
I Hsin Cheng authored
Worst case scenario of plist_add() happens when the priority of the inserted plist_node is going to be the largest after the insertion is done. The cost is going to be more significant when the original plist is longer, because the iterator is going to traverse the whole plist to find the correct position to insert the new node. The situation can be avoided by using a reverse iterator at the same time, doing so the maximum possible number of iteration is going to shrink from N to N/2. The proposed change of plist_add pasts the test in lib/plist.c to validate its correctness, also add the worst case scenario test for plist_add() in plist_test(). The worst case test are tested with the size of test_data and test_node growing from 200 to 1000. The result are showned in the following table, in which we can observed that the proposed change of plist_add performs better than the original version, and the difference between these two implementations are more significant with the size of N growing. The random case test [1], and best case test [2] are also provided, with result showing the proposed change performs slightly better in random case test while the original implementation performs slightly better in best case test, while the difference in both test are minor, we can see them as even in those two situations. ----------------------------------------------------------- | Test size | 200 | 400 | 600 | 800 | 1000 | ----------------------------------------------------------- | new_plist_add | 140911| 548681| 1220512| 2048493| 3763755| ----------------------------------------------------------- | old_plist_add | 188198| 774222| 1643547| 3008929| 4947435| ----------------------------------------------------------- Link: https://lkml.kernel.org/r/20240614154603.65203-1-richard120310@gmail.comSigned-off-by: I Hsin Cheng <richard120310@gmail.com> Signed-off-by: Ching-Chun (Jim) Huang <jserv@ccns.ncku.edu.tw> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Yongliang Gao authored
If hung_task_panic is enabled, don't consider the value of hung_task_warnings and display the information of the hung tasks. In some cases, hung_task_panic might not be initially set up, after several hung tasks occur, the hung_task_warnings count reaches zero. If hung_task_panic is set up later, it may not display any helpful hung task info in dmesg, only showing messages like: Kernel panic - not syncing: hung_task: blocked tasks CPU: 3 PID: 58 Comm: khungtaskd Not tainted 6.10.0-rc3 #19 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) Call Trace: <TASK> panic+0x2f3/0x320 watchdog+0x2dd/0x510 ? __pfx_watchdog+0x10/0x10 kthread+0xe0/0x110 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2f/0x40 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 </TASK> Link: https://lkml.kernel.org/r/20240613033159.3446265-1-leonylgao@gmail.comSigned-off-by: Yongliang Gao <leonylgao@tencent.com> Reviewed-by: Huang Cun <cunhuang@tencent.com> Cc: Joel Granados <j.granados@samsung.com> Cc: John Siddle <jsiddle@redhat.com> Cc: Kent Overstreet <kent.overstreet@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Dan Carpenter authored
This check looks for common words that probably indicate a patch is a fix. For now the regex is: (?:(?:BUG: K.|UB)SAN: |Call Trace:|stable\@|syzkaller)/) Why are stable patches encouraged to have a fixes tag? Some people mark their stable patches as "# 5.10" etc. This is useful but a Fixes tag is still a good idea. For example, the Fixes tag helps in review. It helps people to not cherry-pick buggy patches without also cherry-picking the fix. Also if a bug affects the 5.7 kernel some people will round it up to 5.10+ because 5.7 is not supported on kernel.org. It's possible the Bad Binder bug was caused by this sort of gap where companies outside of kernel.org are supporting different kernels from kernel.org. Should it be counted as a Fix when a patch just silences harmless WARN_ON() stack trace. Yes. Definitely. Is silencing compiler warnings a fix? It seems unfair to the original authors, but we use -Werror now, and warnings break the build so let's just add Fixes tags. I tell people that silencing static checker warnings is not a fix but the rules on this vary by subsystem. Is fixing a minor LTP issue (Linux Test Project) a fix? Probably? It's hard to know what to do if the LTP test has technically always been broken. One clear false positive from this check is when someone updated their debug output and included before and after Call Traces. Or when crashes are introduced deliberately for testing. In those cases, you should just ignore checkpatch. Link: https://lkml.kernel.org/r/ZmhUgZBKeF_8ixA6@morotoSigned-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Kees Cook <keescook@chromium.org> Cc: Andy Whitcroft <apw@canonical.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Dwaipayan Ray <dwaipayanray1@gmail.com> Cc: Joe Perches <joe@perches.com> Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com> Cc: Sasha Levin <sashal@kernel.org> Cc: Thorsten Leemhuis <linux@leemhuis.info> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Wolfram Sang authored
For a printout to happen, all types must be set to "show". So, AND is needed for the flags, not OR, if we want to ignore something. Link: https://lkml.kernel.org/r/20240610150420.2279-2-wsa+renesas@sang-engineering.com Fixes: 47e0c88b ("checkpatch: categorize some long line length checks") Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Joe Perches <joe@perches.com> Cc: Andy Whitcroft <apw@canonical.com> Cc: Dwaipayan Ray <dwaipayanray1@gmail.com> Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Ryusuke Konishi authored
Call mark_buffer_dirty() for segment summary and super root block buffers on the backing device's page cache, thereby indirectly calling inode_attach_wb(). Then remove the no longer needed call to inode_attach_wb() in nilfs_attach_log_writer(), resolving the concern about its layer-violating use. Link: https://lkml.kernel.org/r/20240610160029.7673-3-konishi.ryusuke@gmail.comSigned-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Ryusuke Konishi authored
Patch series "nilfs2: eliminate the call to inode_attach_wb()". This series eliminates the inode_attach_wb() call from nilfs2, which was introduced as a workaround for a kernel bug but is suspected of layer violation (in fact, it is undesirable since it exposes a reference to the backing device). Removal of the inode_attach_wb() call is done by simply using mark_buffer_dirty() on the backing device's buffers. To use it safely, this series will prepare it in patch 1/2, and perform the replacement itself in patch 2/2. This patch (of 2): In preparation for inode_attach_wb(), which is currently called when attaching the log writer, to be done via mark_buffer_dirty(), change the order of preparation for log writing. Specifically, the function call that adds checksums to segment summary and super root blocks, which correspond to the log header and trailer, is made before starting writeback of folios containing those blocks. The current steps are as follows: 1. Put the folios of segment summary blocks in writeback state. 2. Put the folios of data blocks, metadata file blocks, and btree node blocks (collectively called payload blocks) into writeback state. 3. Put the super root block folio in writeback state. 4. Add checksums. Change these as follows: 1. Put the folios of payload blocks in writeback state. 2. Add checksums. 3. Put the folios of segment summary blocks in writeback state. 4. Put the super root block folio in writeback state. In this order, the contents of segment summaries and super root block that directly use buffer/folio of the backing device can be determined including the addition of checksums, before preparing to write. Step (1), which puts the payload block folios in writeback state, is performed first because if there are memory-mapped data blocks, a valid checksum can only be calculated after step (1). Link: https://lkml.kernel.org/r/20240610160029.7673-2-konishi.ryusuke@gmail.comSigned-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Christophe JAILLET authored
ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). Note that the upper limit of ida_simple_get() is exclusive, but the one of ida_alloc_max() is inclusive. So a -1 has been added when needed. Link: https://lkml.kernel.org/r/ae10003feb87d240163d0854de95f09e1f00be7d.1717855701.git.christophe.jaillet@wanadoo.frSigned-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Alistar Popple <alistair@popple.id.au> Cc: Christian Gromm <christian.gromm@microchip.com> Cc: Eddie James <eajames@linux.ibm.com> Cc: Jeremy Kerr <jk@ozlabs.org> Cc: Joel Stanley <joel@jms.id.au> Cc: Parthiban Veerasooran <parthiban.veerasooran@microchip.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Christophe JAILLET authored
ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Link: https://lkml.kernel.org/r/ddbb2e3f249ba90417dc7ab01713faa1091fb44c.1717855701.git.christophe.jaillet@wanadoo.frSigned-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Alistar Popple <alistair@popple.id.au> Cc: Christian Gromm <christian.gromm@microchip.com> Cc: Eddie James <eajames@linux.ibm.com> Cc: Jeremy Kerr <jk@ozlabs.org> Cc: Joel Stanley <joel@jms.id.au> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Christophe JAILLET authored
Patch series "Remove usage of the deprecated ida_simple_xx() API". The series removes the *last* usages of the deprecated ida_simple_xx() API. This patch (of 3): ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). Note that the upper limit of ida_simple_get() is exclusive, but the one of ida_alloc_range() is inclusive. So, this upper limit, INT_MAX, should have been changed to INT_MAX-1. But, it is likely that the INT_MAX 'idx' is valid that the max value passed to ida_simple_get() should have been 0. So, allow this INT_MAX 'idx' value now. Link: https://lkml.kernel.org/r/cover.1717855701.git.christophe.jaillet@wanadoo.fr Link: https://lkml.kernel.org/r/8e28b0c45fe8f28ca4475fe0027f8099c41259f0.1717855701.git.christophe.jaillet@wanadoo.frSigned-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Eddie James <eajames@linux.ibm.com> Cc: Alistar Popple <alistair@popple.id.au> Cc: Christian Gromm <christian.gromm@microchip.com> Cc: Jeremy Kerr <jk@ozlabs.org> Cc: Joel Stanley <joel@jms.id.au> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-
Wenchao Hao authored
Following warning is reported, so remove these duplicated header including: ./kernel/crash_reserve.c: linux/kexec.h is included more than once. This is just a clean code, no logic changed. Link: https://lkml.kernel.org/r/20240606091427.3512314-1-haowenchao22@gmail.comSigned-off-by: Wenchao Hao <haowenchao22@gmail.com> Acked-by: Baoquan He <bhe@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-