Re: [PATCH v2 3/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when unmapping

2022-05-08 Thread Muchun Song
On Sun, May 08, 2022 at 05:36:41PM +0800, Baolin Wang wrote: > On some architectures (like ARM64), it can support CONT-PTE/PMD size > hugetlb, which means it can support not only PMD/PUD size hugetlb: > 2M and 1G, but also CONT-PTE/PMD size: 64K and 32M if a 4K page > size specified. > > When unma

[PATCH] powerpc/papr_scm: Fix leaking nvdimm_events_map elements

2022-05-08 Thread Vaibhav Jain
Right now 'char *' elements allocated individual 'stat_id' in 'papr_scm_priv.nvdimm_events_map' during papr_scm_pmu_check_events() leak in papr_scm_remove() and papr_scm_pmu_register(), papr_scm_pmu_check_events() error paths. Also individual 'stat_id' arent NULL terminated 'char *' instead they a

Re: [PATCH 1/2] powerpc/perf: Fix the threshold compare group constraint for power10

2022-05-08 Thread Athira Rajeev
> On 06-May-2022, at 11:40 AM, Kajol Jain wrote: > > Thresh compare bits for a event is used to program thresh compare > field in Monitor Mode Control Register A (MMCRA: 8-18 bits for power10). > When scheduling events as a group, all events in that group should > match value in threshold bits

Re: [PATCH v2 1/3] mm: change huge_ptep_clear_flush() to return the original pte

2022-05-08 Thread Christophe Leroy
Le 08/05/2022 à 15:09, Baolin Wang a écrit : > > > On 5/8/2022 7:09 PM, Muchun Song wrote: >> On Sun, May 08, 2022 at 05:36:39PM +0800, Baolin Wang wrote: >>> It is incorrect to use ptep_clear_flush() to nuke a hugetlb page >>> table when unmapping or migrating a hugetlb page, and will change >

[PATCH v3 21/25] powerpc/ftrace: Don't use copy_from_kernel_nofault() in module_trampoline_target()

2022-05-08 Thread Christophe Leroy
module_trampoline_target() is quite a hot path used when activating/deactivating function tracer. Avoid the heavy copy_from_kernel_nofault() by doing four calls to copy_inst_from_kernel_nofault(). Use __copy_inst_from_kernel_nofault() for the 3 last calls. First call is done to copy_from_kernel_n

[PATCH v3 23/25] powerpc/modules: Use PPC_LI macros instead of opencoding

2022-05-08 Thread Christophe Leroy
Use PPC_LI_MASK and PPC_LI() instead of opencoding. Signed-off-by: Christophe Leroy --- v2: Utilisation de PPC_LI() et PPC_LI_MASK --- arch/powerpc/kernel/module_32.c | 11 --- arch/powerpc/kernel/module_64.c | 3 +-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/arch/p

[PATCH v3 25/25] powerpc/opcodes: Remove unused PPC_INST_XXX macros

2022-05-08 Thread Christophe Leroy
The following PPC_INST_XXX macros are not used anymore outside ppc-opcode.h: - PPC_INST_LD - PPC_INST_STD - PPC_INST_ADDIS - PPC_INST_ADD - PPC_INST_DIVD Remove them. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/ppc-opcode.h | 13 -

[PATCH v3 22/25] powerpc/inst: Remove PPC_INST_BRANCH

2022-05-08 Thread Christophe Leroy
Convert last users of PPC_INST_BRANCH to PPC_RAW_BRANCH() And remove PPC_INST_BRANCH. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/ppc-opcode.h | 3 +-- arch/powerpc/lib/feature-fixups.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/incl

[PATCH v3 24/25] powerpc/inst: Remove PPC_INST_BL

2022-05-08 Thread Christophe Leroy
Convert last users of PPC_INST_BL to PPC_RAW_BL() And remove PPC_INST_BL. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/ppc-opcode.h | 1 - arch/powerpc/net/bpf_jit.h| 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/ppc-opc

[PATCH v3 05/25] powerpc/code-patching: Inline create_branch()

2022-05-08 Thread Christophe Leroy
create_branch() is a good candidate for inlining because: - Flags can be folded in. - Range tests are likely to be already done. Hence reducing the create_branch() to only a set of instructions. So inline it. It improves ftrace activation by 10%. Signed-off-by: Christophe Leroy --- arch/power

[PATCH v3 03/25] powerpc/code-patching: Inline is_offset_in_{cond}_branch_range()

2022-05-08 Thread Christophe Leroy
Test in is_offset_in_branch_range() and is_offset_in_cond_branch_range() are simple tests that are worth inlining. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/code-patching.h | 29 ++-- arch/powerpc/lib/code-patching.c | 27 -- 2 f

[PATCH v3 07/25] powerpc/ftrace: Use patch_instruction() return directly

2022-05-08 Thread Christophe Leroy
Instead of returning -EPERM when patch_instruction() fails, just return what patch_instruction returns. That simplifies ftrace_modify_code(): 0: 94 21 ff c0 stwur1,-64(r1) 4: 93 e1 00 3c stw r31,60(r1) 8: 7c 7f 1b 79 mr. r31,r3

[PATCH v3 08/25] powerpc: Add CONFIG_PPC64_ELF_ABI_V1 and CONFIG_PPC64_ELF_ABI_V2

2022-05-08 Thread Christophe Leroy
At the time being, we use CONFIG_CPU_LITTLE_ENDIAN and CONFIG_CPU_BIG_ENDIAN to pass -mabi=elfv1 or elfv2 to compiler, then define a PPC64_ELF_ABI_v1 or PPC64_ELF_ABI_v2 macro in asm/types.h based on _CALL_ELF define set by the compiler. Make it more straight forward with a CONFIG option that is d

[PATCH v3 11/25] powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64

2022-05-08 Thread Christophe Leroy
Since c93d4f6ecf4b ("powerpc/ftrace: Add module_trampoline_target() for PPC32"), __ftrace_make_nop() for PPC32 is very similar to the one for PPC64. Same for __ftrace_make_call(). Make them common. Signed-off-by: Christophe Leroy --- v2: - Fixed comment to -mprofile-kernel versus -mkernel_profi

[PATCH v3 02/25] powerpc/ftrace: Remove redundant create_branch() calls

2022-05-08 Thread Christophe Leroy
Since commit d5937db114e4 ("powerpc/code-patching: Fix patch_branch() return on out-of-range failure") patch_branch() fails with -ERANGE when trying to branch out of range. No need to perform the test twice. Remove redundant create_branch() calls. Signed-off-by: Christophe Leroy --- arch/powerp

[PATCH v3 01/25] powerpc/ftrace: Refactor prepare_ftrace_return()

2022-05-08 Thread Christophe Leroy
When we have CONFIG_DYNAMIC_FTRACE_WITH_ARGS, prepare_ftrace_return() is called by ftrace_graph_func() otherwise prepare_ftrace_return() is called from assembly. Refactor prepare_ftrace_return() into a static __prepare_ftrace_return() that will be called by both prepare_ftrace_return() and ftrace_

[PATCH v3 10/25] powerpc: Finalise cleanup around ABI use

2022-05-08 Thread Christophe Leroy
Now that we have CONFIG_PPC64_ELF_ABI_V1 and CONFIG_PPC64_ELF_ABI_V2, get rid of all indirect detection of ABI version. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig| 2 +- arch/powerpc/Makefile | 2 +- arch/powerpc/include/asm/types.h| 8

[PATCH v3 14/25] powerpc/ftrace: Remove ftrace_plt_tramps[]

2022-05-08 Thread Christophe Leroy
ftrace_plt_tramps table is never filled so it is useless. Remove it. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/trace/ftrace.c | 8 1 file changed, 8 deletions(-) diff --git a/arch/powerpc/kernel/trace/ftrace.c b/arch/powerpc/kernel/trace/ftrace.c index f89bcaa5f0fc..010

[PATCH v3 06/25] powerpc/ftrace: Inline ftrace_modify_code()

2022-05-08 Thread Christophe Leroy
Inlining ftrace_modify_code(), it increases a bit the size of ftrace code but brings 5% improvment on ftrace activation. Usually in C files we let gcc decide what to do but here it really help to 'help' gcc to decide to inline, thought we don't want to force it with an __always_inline that would b

[PATCH v3 00/25] powerpc: ftrace optimisation and cleanup and more [v3]

2022-05-08 Thread Christophe Leroy
This series provides optimisation and cleanup of ftrace on powerpc. With this series ftrace activation is about 20% faster on an 8xx. At the end of the series come additional cleanups around ppc-opcode, that would likely conflict with this series if posted separately. Change since v2: - The only

[PATCH v3 18/25] powerpc/ftrace: Simplify expected_nop_sequence()

2022-05-08 Thread Christophe Leroy
Avoid ifdefs around expected_nop_sequence(). While at it make it a bool. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/trace/ftrace.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/arch/powerpc/kernel/trace/ftrace.c b/arch/powerpc/kernel/t

[PATCH v3 12/25] powerpc/ftrace: Don't include ftrace.o for CONFIG_FTRACE_SYSCALLS

2022-05-08 Thread Christophe Leroy
Since commit 7bea7ac0ca01 ("powerpc/syscalls: Fix syscall tracing") ftrace.o is not needed anymore for CONFIG_FTRACE_SYSCALLS. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/trace/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/kernel/trace/Makefile b/arch/powe

[PATCH v3 19/25] powerpc/ftrace: Minimise number of #ifdefs

2022-05-08 Thread Christophe Leroy
A lot of #ifdefs can be replaced by IS_ENABLED() Do so. This requires to have kernel_toc_addr() defined at all time as well as PPC_INST_LD_TOC and PPC_INST_STD_LR. Signed-off-by: Christophe Leroy --- v2: Moved the setup of pop outside of the big if()/else() in __ftrace_make_nop() --- arch/powe

[PATCH v3 17/25] powerpc/ftrace: Use size macro instead of opencoding

2022-05-08 Thread Christophe Leroy
0x8000 is SZ_2G. Use it. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/trace/ftrace.c b/arch/powerpc/kernel/trace/ftrace.c index ac3f97dd1729..346b5485e7ef 100644 --- a/arch/powe

[PATCH v3 16/25] powerpc/ftrace: Use PPC_RAW_xxx() macros instead of opencoding.

2022-05-08 Thread Christophe Leroy
PPC_RAW_xxx() macros are self explanatory and less error prone than open coding. Use them in ftrace.c Signed-off-by: Christophe Leroy --- v2: - Replaced PPC_INST_OFFSET24_MASK by PPC_LI_MASK and added PPC_LI(). - Fix ADDI instead of ADDIS --- arch/powerpc/include/asm/ppc-opcode.h | 5 + ar

[PATCH v3 20/25] powerpc/inst: Add __copy_inst_from_kernel_nofault()

2022-05-08 Thread Christophe Leroy
On the same model as get_user() versus __get_user(), introduce __copy_inst_from_kernel_nofault() which doesn't check address. To be used by callers that have already checked that the adress is a kernel address. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/inst.h | 13 +--

[PATCH v3 13/25] powerpc/ftrace: Use CONFIG_FUNCTION_TRACER instead of CONFIG_DYNAMIC_FTRACE

2022-05-08 Thread Christophe Leroy
Since commit 0c0c52306f47 ("powerpc: Only support DYNAMIC_FTRACE not static"), CONFIG_DYNAMIC_FTRACE is always selected when CONFIG_FUNCTION_TRACER is selected. To avoid confusion and have the reader wonder what's happen when CONFIG_FUNCTION_TRACER is selected and CONFIG_DYNAMIC_FTRACE is not, use

[PATCH v3 15/25] powerpc/ftrace: Use BRANCH_SET_LINK instead of value 1

2022-05-08 Thread Christophe Leroy
To make it explicit, use BRANCH_SET_LINK instead of value 1 when calling create_branch(). Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/trace/ftrace.c b/arch/powerpc/kernel/trace/ftr

[PATCH v3 09/25] powerpc: Replace PPC64_ELF_ABI_v{1/2} by CONFIG_PPC64_ELF_ABI_V{1/2}

2022-05-08 Thread Christophe Leroy
Replace all uses of PPC64_ELF_ABI_v1 and PPC64_ELF_ABI_v2 by resp CONFIG_PPC64_ELF_ABI_V1 and CONFIG_PPC64_ELF_ABI_V2. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/code-patching.h | 12 ++-- arch/powerpc/include/asm/ftrace.h| 4 ++-- arch/powerpc/include/asm/link

[PATCH v3 04/25] powerpc/ftrace: Use is_offset_in_branch_range()

2022-05-08 Thread Christophe Leroy
Use is_offset_in_branch_range() instead of create_branch() to check if a target is within branch range. This patch together with the previous one improves ftrace activation time by 7% Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/trace/ftrace.c | 8 ++-- 1 file changed, 2 insertio

Re: [PATCH kernel] powerpc/llvm/lto: Allow LLVM LTO builds

2022-05-08 Thread Alexey Kardashevskiy
On 5/4/22 07:21, Nick Desaulniers wrote: On Thu, Apr 28, 2022 at 11:46 PM Alexey Kardashevskiy wrote: This enables LTO_CLANG builds on POWER with the upstream version of LLVM. LTO optimizes the output vmlinux binary and this may affect the FTP alternative section if alt branches use "bc" (

Re: [PATCH v4 00/14] kbuild: yet another series of cleanups (modpost, LTO, MODULE_REL_CRCS, export.h)

2022-05-08 Thread Masahiro Yamada
On Mon, May 9, 2022 at 4:09 AM Masahiro Yamada wrote: > > This is the third batch of cleanups in this development cycle. > > Major changes in v4: > - Move static EXPORT_SYMBOL check to a script > - Some refactoring > > Major changes in v3: > > - Generate symbol CRCs as C code, and remove CONFIG

Re: [PATCH v2 1/3] mm: change huge_ptep_clear_flush() to return the original pte

2022-05-08 Thread Muchun Song
On Sun, May 08, 2022 at 09:09:55PM +0800, Baolin Wang wrote: > > > On 5/8/2022 7:09 PM, Muchun Song wrote: > > On Sun, May 08, 2022 at 05:36:39PM +0800, Baolin Wang wrote: > > > It is incorrect to use ptep_clear_flush() to nuke a hugetlb page > > > table when unmapping or migrating a hugetlb page

Re: request_module DoS

2022-05-08 Thread Luis Chamberlain
On Sat, May 07, 2022 at 12:14:47PM -0700, Luis Chamberlain wrote: > On Sat, May 07, 2022 at 01:02:20AM -0700, Luis Chamberlain wrote: > > You can try to reproduce by using adding a new test type for crypto-aegis256 > > on lib/test_kmod.c. These tests however can try something similar but other > >

Re: [PATCH v2 2/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when migration

2022-05-08 Thread Muchun Song
On Sun, May 08, 2022 at 05:36:40PM +0800, Baolin Wang wrote: > On some architectures (like ARM64), it can support CONT-PTE/PMD size > hugetlb, which means it can support not only PMD/PUD size hugetlb: > 2M and 1G, but also CONT-PTE/PMD size: 64K and 32M if a 4K page > size specified. > > When migr

Re: [PATCH v2 1/3] mm: change huge_ptep_clear_flush() to return the original pte

2022-05-08 Thread Muchun Song
On Sun, May 08, 2022 at 05:36:39PM +0800, Baolin Wang wrote: > It is incorrect to use ptep_clear_flush() to nuke a hugetlb page > table when unmapping or migrating a hugetlb page, and will change > to use huge_ptep_clear_flush() instead in the following patches. > > So this is a preparation patch,

Re: [PATCH] ASoC: fsl_sai: fix incorrect mclk number in error message

2022-05-08 Thread Shengjiu Wang
On Sat, May 7, 2022 at 8:31 PM Pieterjan Camerlynck < pieterjan.camerly...@gmail.com> wrote: > In commit ("ASoC: fsl_sai: add sai master mode support") > the loop was changed to start iterating from 1 instead of 0. The error > message however was not updated, reporting the wrong clock to the user

[powerpc:fixes-test] BUILD SUCCESS 348c71344111d7a48892e3e52264ff11956fc196

2022-05-08 Thread kernel test robot
x86_64randconfig-c001 arm randconfig-c002-20220508 ia64defconfig m68k allyesconfig m68kdefconfig nios2 defconfig arc

[PATCH v4 14/14] kbuild: rebuild multi-object modules when objtool is updated

2022-05-08 Thread Masahiro Yamada
When CONFIG_LTO_CLANG or CONFIG_X86_KERNEL_IBT is enabled, objtool for multi-object modules is postponed until the objects are linked together. Make sure to re-run objtool and re-link multi-object modules when objtool is updated. Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook Acked-by: J

[PATCH v4 13/14] kbuild: add cmd_and_savecmd macro

2022-05-08 Thread Masahiro Yamada
Separate out the command execution part of if_changed, as we did for if_changed_dep. This allows us to reuse it in if_changed_rule. define rule_foo $(call cmd_and_savecmd,foo) $(call cmd,bar) endef Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook --- Changes in v4

[PATCH v4 07/14] kbuild: stop merging *.symversions

2022-05-08 Thread Masahiro Yamada
Now modpost reads symbol versions from .*.cmd files. The merged *.symversions are no longer needed. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Tested-by: Nathan Chancellor --- (no changes since v1) scripts/Makefile.build | 21 ++--- scripts/link-vmlinux.sh |

[PATCH v4 03/14] modpost: split the section mismatch checks into section-check.c

2022-05-08 Thread Masahiro Yamada
modpost.c is too big, and the half of the code is for section checks. Split it. I fixed some style issues in the moved code. Signed-off-by: Masahiro Yamada --- Changes in v4: - New patch scripts/mod/Makefile|2 +- scripts/mod/modpost.c | 1202 +-

[PATCH v4 11/14] kbuild: make built-in.a rule robust against too long argument error

2022-05-08 Thread Masahiro Yamada
Kbuild runs at the top of objtree instead of changing the working directory to subdirectories. I think this design is nice overall but some commands have a scalability issue. The build command of built-in.a is one of them whose length scales with: O(D * N) Here, D is the length of the direct

[PATCH v4 10/14] kbuild: check static EXPORT_SYMBOL* by script instead of modpost

2022-05-08 Thread Masahiro Yamada
The 'static' specifier and EXPORT_SYMBOL() are an odd combination. Commit 15bfc2348d54 ("modpost: check for static EXPORT_SYMBOL* functions") tried to detect it, but this check has false negatives. Here is the sample code. Makefile: obj-y += foo1.o foo2.o foo1.c: #include sta

[PATCH v4 12/14] kbuild: make *.mod rule robust against too long argument error

2022-05-08 Thread Masahiro Yamada
Like built-in.a, the command length of the *.mod rule scales with the depth of the directory times the number of objects in the Makefile. Add $(obj)/ by the shell command (awk) instead of by Make's builtin function. In-tree modules still have some room to the limit (ARG_MAX=2097152), but this is

[PATCH v4 06/14] kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS

2022-05-08 Thread Masahiro Yamada
include/{linux,asm-generic}/export.h defines a weak symbol, __crc_* as a placeholder. Genksyms writes the version CRCs into the linker script, which will be used for filling the __crc_* symbols. The linker script format depends on CONFIG_MODULE_REL_CRCS. If it is enabled, __crc_* holds the offset

[PATCH v4 08/14] genksyms: adjust the output format to modpost

2022-05-08 Thread Masahiro Yamada
Make genksyms output symbol versions in the format modpost expects, so the 'sed' is unneeded. This commit makes *.symversions completely unneeded. I will keep *.symversions in .gitignore and 'make clean' for a while. Otherwise, 'git status' might be surprising. Signed-off-by: Masahiro Yamada Re

[PATCH v4 09/14] kbuild: do not create *.prelink.o for Clang LTO or IBT

2022-05-08 Thread Masahiro Yamada
When CONFIG_LTO_CLANG=y, additional intermediate *.prelink.o is created for each module. Also, objtool is postponed until LLVM bitcode is converted to ELF. CONFIG_X86_KERNEL_IBT works in a similar way to postpone objtool until objects are merged together. This commit stops generating *.prelink.o,

[PATCH v4 02/14] modpost: change the license of EXPORT_SYMBOL to bool type

2022-05-08 Thread Masahiro Yamada
There were more EXPORT_SYMBOL types in the past. The following commits removed unused ones. - f1c3d73e973c ("module: remove EXPORT_SYMBOL_GPL_FUTURE") - 367948220fce ("module: remove EXPORT_UNUSED_SYMBOL*") There are 3 remaining in enum export, but export_unknown does not make any sense because

[PATCH v4 05/14] modpost: extract symbol versions from *.cmd files

2022-05-08 Thread Masahiro Yamada
Currently, CONFIG_MODVERSIONS needs extra link to embed the symbol versions into ELF objects. Then, modpost extracts the version CRCs from them. The following figures show how it currently works, and how I am trying to change it. Current implementation ==

[PATCH v4 00/14] kbuild: yet another series of cleanups (modpost, LTO, MODULE_REL_CRCS, export.h)

2022-05-08 Thread Masahiro Yamada
This is the third batch of cleanups in this development cycle. Major changes in v4: - Move static EXPORT_SYMBOL check to a script - Some refactoring Major changes in v3: - Generate symbol CRCs as C code, and remove CONFIG_MODULE_REL_CRCS. Major changes in v2: - V1 did not work with CONFIG_

[PATCH v4 01/14] modpost: remove left-over cross_compile declaration

2022-05-08 Thread Masahiro Yamada
This is a remnant of commit 6543becf26ff ("mod/file2alias: make modalias generation safe for cross compiling"). Signed-off-by: Masahiro Yamada --- Changes in v4: - New patch scripts/mod/modpost.h | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h

[PATCH v4 04/14] modpost: add sym_find_with_module() helper

2022-05-08 Thread Masahiro Yamada
find_symbol() returns the first symbol found in the hash table. This table is global, so it may return a symbol from an unexpected module. There is a case where we want to search for a symbol with a given name in a specified module. Add sym_find_with_module(), which receives the module pointer as

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.18-4 tag

2022-05-08 Thread pr-tracker-bot
The pull request you sent on Sun, 08 May 2022 22:13:14 +1000: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-5.18-4 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/e3de3a1cda5fdc3ac42cb0d45321fb254500595f Thank you! -- Deet-doot-d

Re: [PATCH v3 00/15] kbuild: yet another series of cleanups (modpost, LTO, MODULE_REL_CRCS)

2022-05-08 Thread Masahiro Yamada
On Thu, May 5, 2022 at 4:24 PM Masahiro Yamada wrote: > > > This is the third batch of cleanups in this development cycle. > > Major changes in v3: > > - Generate symbol CRCs as C code, and remove CONFIG_MODULE_REL_CRCS. > > Major changes in v2: > > - V1 did not work with CONFIG_MODULE_REL_CRCS.

Re: [PATCH v6 00/23] Rust support

2022-05-08 Thread Matthew Wilcox
On Sat, May 07, 2022 at 01:06:18AM -0700, Kees Cook wrote: > On Sat, May 07, 2022 at 07:23:58AM +0200, Miguel Ojeda wrote: > > ## Patch series status > > > > The Rust support is still to be considered experimental. However, > > support is good enough that kernel developers can start working on the

Re: [PATCH v2 2/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when migration

2022-05-08 Thread Baolin Wang
-migrating/20220508-174036 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything config: x86_64-randconfig-a013 (https://download.01.org/0day-ci/archive/20220508/202205081910.mstoc5rj-...@intel.com/config) compiler: gcc-11 (Debian 11.2.0-20) 11.2.0 reproduce (this is a

Re: [PATCH v2 1/3] mm: change huge_ptep_clear_flush() to return the original pte

2022-05-08 Thread Baolin Wang
On 5/8/2022 7:09 PM, Muchun Song wrote: On Sun, May 08, 2022 at 05:36:39PM +0800, Baolin Wang wrote: It is incorrect to use ptep_clear_flush() to nuke a hugetlb page table when unmapping or migrating a hugetlb page, and will change to use huge_ptep_clear_flush() instead in the following patch

[GIT PULL] Please pull powerpc/linux.git powerpc-5.18-4 tag

2022-05-08 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 5.18: The following changes since commit bb82c574691daf8f7fa9a160264d15c5804cb769: powerpc/perf: Fix 32bit compile (2022-04-21 23:26:47 +1000) are available in the git repository at: https://

Re: [PATCH v2 2/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when migration

2022-05-08 Thread kernel test robot
. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/intel-lab-lkp/linux/commits/Baolin-Wang/Fix-CONT-PTE-PMD-size-hugetlb-issue-when-unmapping-or-migrating/20220508-174036 base: https://git.kernel.o

Re: [PATCH v2 2/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when migration

2022-05-08 Thread kernel test robot
. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/intel-lab-lkp/linux/commits/Baolin-Wang/Fix-CONT-PTE-PMD-size-hugetlb-issue-when-unmapping-or-migrating/20220508-174036 base: https://git.kernel.o

Re: [PATCH] powerpc/pseries/vas: Use QoS credits from the userspace

2022-05-08 Thread Michael Ellerman
On Sat, 19 Mar 2022 02:28:09 -0700, Haren Myneni wrote: > The user can change the QoS credits dynamically with the > management console interface which notifies OS with sysfs. After > returning from the OS interface successfully, the management > console updates the hypervisor. Since the VAS capabi

Re: [PATCH] powerpc/vdso: Fix incorrect CFI in gettimeofday.S

2022-05-08 Thread Michael Ellerman
On Mon, 2 May 2022 22:50:10 +1000, Michael Ellerman wrote: > As reported by Alan, the CFI (Call Frame Information) in the VDSO time > routines is incorrect since commit ce7d8056e38b ("powerpc/vdso: Prepare > for switching VDSO to generic C implementation."). > > In particular the changes to the fr

Re: [PATCH] powerpc/papr_scm: Fix buffer overflow issue with CONFIG_FORTIFY_SOURCE

2022-05-08 Thread Michael Ellerman
On Thu, 5 May 2022 21:04:51 +0530, Kajol Jain wrote: > With CONFIG_FORTIFY_SOURCE enabled, string functions will also perform > dynamic checks for string size which can panic the kernel, > like incase of overflow detection. > > In papr_scm, papr_scm_pmu_check_events function uses stat->stat_id > w

[PATCH v2 2/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when migration

2022-05-08 Thread Baolin Wang
On some architectures (like ARM64), it can support CONT-PTE/PMD size hugetlb, which means it can support not only PMD/PUD size hugetlb: 2M and 1G, but also CONT-PTE/PMD size: 64K and 32M if a 4K page size specified. When migrating a hugetlb page, we will get the relevant page table entry by huge_p

[PATCH v2 3/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when unmapping

2022-05-08 Thread Baolin Wang
On some architectures (like ARM64), it can support CONT-PTE/PMD size hugetlb, which means it can support not only PMD/PUD size hugetlb: 2M and 1G, but also CONT-PTE/PMD size: 64K and 32M if a 4K page size specified. When unmapping a hugetlb page, we will get the relevant page table entry by huge_p

[PATCH v2 1/3] mm: change huge_ptep_clear_flush() to return the original pte

2022-05-08 Thread Baolin Wang
It is incorrect to use ptep_clear_flush() to nuke a hugetlb page table when unmapping or migrating a hugetlb page, and will change to use huge_ptep_clear_flush() instead in the following patches. So this is a preparation patch, which changes the huge_ptep_clear_flush() to return the original pte t

[PATCH v2 0/3] Fix CONT-PTE/PMD size hugetlb issue when unmapping or migrating

2022-05-08 Thread Baolin Wang
Hi, Now migrating a hugetlb page or unmapping a poisoned hugetlb page, we'll use ptep_clear_flush() and set_pte_at() to nuke the page table entry and remap it, and this is incorrect for CONT-PTE or CONT-PMD size hugetlb page, which will cause potential data consistent issue. This patch set will ch

Re: [PATCH 2/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when migration

2022-05-08 Thread Baolin Wang
On 5/7/2022 10:33 AM, Baolin Wang wrote: On 5/7/2022 1:56 AM, Mike Kravetz wrote: On 5/5/22 20:39, Baolin Wang wrote: On 5/6/2022 7:53 AM, Mike Kravetz wrote: On 4/29/22 01:14, Baolin Wang wrote: On some architectures (like ARM64), it can support CONT-PTE/PMD size hugetlb, which means i