[PATCH 02/19] elf: Move arch_setup_additional_pages() to generic elf.h

2020-11-07 Thread Dmitry Safonov
Ifdef the function in the header, not in the code. Following kernel style, move it to Kconfig. All it makes it easier to follow when the option is enabled/disabled. Remove re-definition from compat_binfmt_elf, as it's always defined under compat_arch_setup_additional_pages (to be reworked). Signed

[PATCH 03/19] arm64: Use in_compat_task() in arch_setup_additional_pages()

2020-11-07 Thread Dmitry Safonov
Instead of providing compat_arch_setup_additional_pages(), check if the task is compatible from personality, which is set earlier in load_elf_binary(). That will align code with powerpc and sparc, also it'll allow to completely remove compat_arch_setyp_addtional_pages() macro after doing the same f

[PATCH 05/19] elf: Remove compat_arch_setup_additional_pages()

2020-11-07 Thread Dmitry Safonov
Now that all users rely on detecting bitness of new-born task checking personality, remove compat_arch_setup_additional_pages() macro, simplifying the code. Signed-off-by: Dmitry Safonov --- fs/compat_binfmt_elf.c | 5 - 1 file changed, 5 deletions(-) diff --git a/fs/compat_binfmt_elf.c b/f

[PATCH 00/19] Add generic user_landing tracking

2020-11-07 Thread Dmitry Safonov
Started from discussion [1], where was noted that currently a couple of architectures support mremap() for vdso/sigpage, but not munmap(). If an application maps something on the ex-place of vdso/sigpage, later after processing signal it will land there (good luck!) Patches set is based on linux-n

[PATCH 04/19] x86: Remove compat_arch_setup_additional_pages()

2020-11-07 Thread Dmitry Safonov
The same as for x32 task, detect ia32 task by in_ia32_syscall(). It's valid as new-execed task is pretending to be in a syscall of relevant bitness/ABI, see the comment near in_32bit_syscall(). Removing compat_arch_setup_additional_pages() provides single point of entry - arch_setup_additional_pag

[PATCH 01/19] x86/elf: Check in_x32_syscall() in compat_arch_setup_additional_pages()

2020-11-07 Thread Dmitry Safonov
Partly revert commit 3316ec8ccd34 ("x86/elf: Use e_machine to check for x32/ia32 in setup_additional_pages()") and commit 9a29a671902c ("elf: Expose ELF header on arch_setup_additional_pages()". Both patches did a good thing: removed usage of TIF_X32, but with a price of additional macros ARCH_SETU

[PATCH 07/19] elf: Use sysinfo_ehdr in ARCH_DLINFO()

2020-11-07 Thread Dmitry Safonov
Instead mm->context.vdso use the pointer provided by elf loader. That allows to drop the pointer on arm/s390/sparc. Cc: Christian Borntraeger Cc: Heiko Carstens Cc: Vasily Gorbik Cc: linux-s...@vger.kernel.org Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org Signed-off-by: Dmitry Safonov

[PATCH 09/19] s390/vdso: Remove vdso_base pointer from mm->context

2020-11-07 Thread Dmitry Safonov
Not used any more. Cc: Christian Borntraeger Cc: Heiko Carstens Cc: Vasily Gorbik Cc: linux-s...@vger.kernel.org Signed-off-by: Dmitry Safonov --- arch/s390/include/asm/mmu.h | 1 - arch/s390/kernel/vdso.c | 10 -- 2 files changed, 11 deletions(-) diff --git a/arch/s390/include/

[PATCH 12/19] x86/signal: Land on &frame->retcode when vdso isn't mapped

2020-11-07 Thread Dmitry Safonov
Since commit 9fbbd4dd17d0 ("x86: Don't require the vDSO for handling a.out signals") after processing 32-bit signal if there is no vdso mapped frame->retcode is used as a landing. Do the same for rt ia32 signals. This shouldn't be mistaken for encouragement for running binaries with executable sta

[PATCH 15/19] x86/vdso: Migrate to user_landing

2020-11-07 Thread Dmitry Safonov
Generic way to track the land vma area. As a bonus, after unmapping vdso, kernel won't try to land on its previous position. Signed-off-by: Dmitry Safonov --- arch/x86/Kconfig| 1 + arch/x86/entry/common.c | 3 ++- arch/x86/entry/vdso/vma.c | 9 - arch/x86/ia32/ia32_sig

[PATCH 10/19] sparc/vdso: Remove vdso pointer from mm->context

2020-11-07 Thread Dmitry Safonov
Not used any more. Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org Signed-off-by: Dmitry Safonov --- arch/sparc/include/asm/mmu_64.h | 1 - arch/sparc/vdso/vma.c | 5 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/sparc/include/asm/mmu_64.h b/arch/sparc/

[PATCH 14/19] mm: Add user_landing in mm_struct

2020-11-07 Thread Dmitry Safonov
Instead of having every architecture to define vdso_base/vdso_addr etc, provide a generic mechanism to track landing in userspace. It'll minimize per-architecture difference, the number of callbacks to provide. Originally, it started from thread [1] where the need for .close() callback on vm_speci

[PATCH 08/19] arm/vdso: Remove vdso pointer from mm->context

2020-11-07 Thread Dmitry Safonov
Not used any more. Signed-off-by: Dmitry Safonov --- arch/arm/include/asm/mmu.h | 3 --- arch/arm/kernel/vdso.c | 12 2 files changed, 15 deletions(-) diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h index 1592a4264488..2397b0a19f59 100644 --- a/arch/arm/in

[PATCH 11/19] mm/mmap: Make vm_special_mapping::mremap return void

2020-11-07 Thread Dmitry Safonov
Previously .mremap() callback needed (int) return to provide way to restrict resizing of a special mapping. Now it's restricted by providing .may_split = special_mapping_split. Removing (int) return simplifies further changes to special_mapping_mremap() as it won't need save ret code from the call

[PATCH 16/19] arm/vdso: Migrate to user_landing

2020-11-07 Thread Dmitry Safonov
Generic way to track the land vma area. As a bonus, after unmapping sigpage, kernel won't try to land on its previous position. Signed-off-by: Dmitry Safonov --- arch/arm/Kconfig | 1 + arch/arm/kernel/process.c | 9 + arch/arm/kernel/signal.c | 6 +- 3 files changed, 7 ins

[PATCH 17/19] arm64/vdso: Migrate compat signals to user_landing

2020-11-07 Thread Dmitry Safonov
Generic way to track the land vma area. As a bonus, after unmapping sigpage, kernel won't try to land on its previous position. Signed-off-by: Dmitry Safonov --- arch/arm64/Kconfig | 1 + arch/arm64/kernel/signal32.c | 17 - arch/arm64/kernel/vdso.c | 2 +- 3 file

[PATCH 19/19] mips/vdso: Migrate to user_landing

2020-11-07 Thread Dmitry Safonov
Generic way to track the land vma area. As a bonus, after unmapping sigpage, kernel won't try to land on its previous position. Cc: Thomas Bogendoerfer Cc: linux-m...@vger.kernel.org Signed-off-by: Dmitry Safonov --- arch/mips/Kconfig | 1 + arch/mips/kernel/signal.c | 11 +++

[PATCH 06/19] elf/vdso: Reuse arch_setup_additional_pages() parameters

2020-11-07 Thread Dmitry Safonov
Both parameters of arch_setup_additional_pages() are currently unused. commit fc5243d98ac2 ("[S390] arch_setup_additional_pages arguments") tried to introduce useful arguments, but they still are not used. Remove old parameters and introduce sysinfo_ehdr argument that will be used to return vdso a

Re: [PATCH net-next] net: dlci: Deprecate the DLCI driver (aka the Frame Relay layer)

2020-11-07 Thread Xie He
On Sat, Oct 31, 2020 at 3:04 PM Jakub Kicinski wrote: > > On Sat, 31 Oct 2020 22:41:30 +0100 Arnd Bergmann wrote: > > > > I think it can just go in the bin directly. > > Ack, fine by me. > > > I actually submitted a couple of patches to clean up drivers/net/wan > > last year but didn't follow up w

mmotm 2020-11-07-21-40 uploaded

2020-11-07 Thread akpm
The mm-of-the-moment snapshot 2020-11-07-21-40 has been uploaded to https://www.ozlabs.org/~akpm/mmotm/ mmotm-readme.txt says README for mm-of-the-moment: https://www.ozlabs.org/~akpm/mmotm/ This is a snapshot of my -mm patch queue. Uploaded at random hopefully more than once a week. You

[PATCH] s390/qeth: remove useless if/else

2020-11-07 Thread xiakaixu1987
From: Kaixu Xia Fix the following coccinelle report: ./drivers/s390/net/qeth_l3_main.c:107:2-4: WARNING: possible condition with no effect (if == else) Both branches are the same, so remove them. Reported-by: Tosk Robot Signed-off-by: Kaixu Xia --- drivers/s390/net/qeth_l3_main.c | 5 +

[PATCH] security/smack: remove unused varible 'rc'

2020-11-07 Thread Alex Shi
This varible isn't used and can be removed to avoid a gcc warning: security/smack/smack_lsm.c:3873:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] Signed-off-by: Alex Shi Cc: Casey Schaufler Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-security-mod...@vger.kernel.

Re: [PATCH] mm/zsmalloc: include sparsemem.h for MAX_PHYSMEM_BITS

2020-11-07 Thread Mike Rapoport
On Sat, Nov 07, 2020 at 04:22:06PM +0100, Stefan Agner wrote: > Most architectures define MAX_PHYSMEM_BITS in asm/sparsemem.h and don't > include it in asm/pgtable.h. Include asm/sparsemem.h directly to get > the MAX_PHYSMEM_BITS define on all architectures. > > This fixes a crash when accessing z

[PATCH] x86/tlb: remove unused varible 'cpu'

2020-11-07 Thread Alex Shi
It's not used, we could remove it to avoid a W1 warning: arch/x86/mm/tlb.c:318:6: warning: variable ‘cpu’ set but not used [-Wunused-but-set-variable] Signed-off-by: Alex Shi Cc: Dave Hansen Cc: Andy Lutomirski Cc: x...@kernel.org Cc: "H. Peter Anvin" Cc: linux-kernel@vger.kernel.org ---

[PATCH v5 2/5] slab: debug: split slab_kernel_map() to map and unmap variants

2020-11-07 Thread Mike Rapoport
From: Mike Rapoport Instead of using slab_kernel_map() with 'map' parameter to remap pages when DEBUG_PAGEALLOC is enabled, use dedicated helpers slab_kernel_map() and slab_kernel_unmap(). Signed-off-by: Mike Rapoport --- mm/slab.c | 26 +++--- 1 file changed, 15 insertions

[PATCH v5 0/5] arch, mm: improve robustness of direct map manipulation

2020-11-07 Thread Mike Rapoport
From: Mike Rapoport Hi, During recent discussion about KVM protected memory, David raised a concern about usage of __kernel_map_pages() outside of DEBUG_PAGEALLOC scope [1]. Indeed, for architectures that define CONFIG_ARCH_HAS_SET_DIRECT_MAP it is possible that __kernel_map_pages() would fail,

[PATCH v5 1/5] mm: introduce debug_pagealloc_{map,unmap}_pages() helpers

2020-11-07 Thread Mike Rapoport
From: Mike Rapoport When CONFIG_DEBUG_PAGEALLOC is enabled, it unmaps pages from the kernel direct mapping after free_pages(). The pages than need to be mapped back before they could be used. Theese mapping operations use __kernel_map_pages() guarded with with debug_pagealloc_enabled(). The only

[PATCH v5 3/5] PM: hibernate: make direct map manipulations more explicit

2020-11-07 Thread Mike Rapoport
From: Mike Rapoport When DEBUG_PAGEALLOC or ARCH_HAS_SET_DIRECT_MAP is enabled a page may be not present in the direct map and has to be explicitly mapped before it could be copied. Introduce hibernate_map_page() and hibernation_unmap_page() that will explicitly use set_direct_map_{default,inval

[PATCH v5 4/5] arch, mm: restore dependency of __kernel_map_pages() on DEBUG_PAGEALLOC

2020-11-07 Thread Mike Rapoport
From: Mike Rapoport The design of DEBUG_PAGEALLOC presumes that __kernel_map_pages() must never fail. With this assumption is wouldn't be safe to allow general usage of this function. Moreover, some architectures that implement __kernel_map_pages() have this function guarded by #ifdef DEBUG_PAGE

[PATCH v5 5/5] arch, mm: make kernel_page_present() always available

2020-11-07 Thread Mike Rapoport
From: Mike Rapoport For architectures that enable ARCH_HAS_SET_MEMORY having the ability to verify that a page is mapped in the kernel direct map can be useful regardless of hibernation. Add RISC-V implementation of kernel_page_present(), update its forward declarations and stubs to be a part of

Re: [PATCH] netfilter: conntrack: fix -Wformat

2020-11-07 Thread Lukas Bulwahn
On Sat, 7 Nov 2020, Joe Perches wrote: > On Fri, 2020-11-06 at 23:55 -0800, Nick Desaulniers wrote: > > Clang is more aggressive about -Wformat warnings when the format flag > > specifies a type smaller than the parameter. Fixes 8 instances of: > > > > warning: format specifies type 'unsigned s

RE: [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS

2020-11-07 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: John Hubbard [mailto:jhubb...@nvidia.com] > Sent: Sunday, November 8, 2020 5:56 PM > To: Randy Dunlap ; Song Bao Hua (Barry Song) > ; a...@linux-foundation.org; > linux...@kvack.org; linux-kernel@vger.kernel.org > Cc: Linuxarm ; Ralph Campbell > ; John Garry

About regression caused by commit aea6cb99703e ("regulator: resolve supply after creating regulator")

2020-11-07 Thread Qu Wenruo
Hi Michał, Recently when testing v5.10-rc2, I found my RK3399 boards failed to boot from NVME. It turns out that, commit aea6cb99703e ("regulator: resolve supply after creating regulator") seems to be the cause. In RK3399 board, vpcie1v8 and vpcie0v9 of the pcie controller is provided by RK808 r

[PATCH] fs/ntfs: remove unused varibles

2020-11-07 Thread Alex Shi
We actually don't use these varibles, so remove them to avoid gcc warning: fs/ntfs/file.c:326:14: warning: variable ‘base_ni’ set but not used [-Wunused-but-set-variable] fs/ntfs/logfile.c:481:21: warning: variable ‘log_page_mask’ set but not used [-Wunused-but-set-variable] Signed-off-by: Alex Sh

Re: About regression caused by commit aea6cb99703e ("regulator: resolve supply after creating regulator")

2020-11-07 Thread Qu Wenruo
Also add Rockchip and device tree mail lists to the CC, just in case we need to update the device tree for RK808. On 2020/11/8 下午3:35, Qu Wenruo wrote: > Hi Michał, > > Recently when testing v5.10-rc2, I found my RK3399 boards failed to boot > from NVME. > > It turns out that, commit aea6cb99703

Re: [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS

2020-11-07 Thread John Hubbard
On 11/7/20 11:35 PM, Song Bao Hua (Barry Song) wrote: Or do you want this ? (Code B) diff --git a/mm/Kconfig b/mm/Kconfig index 01b0ae0cd9d3..a7ff0d31afd5 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -836,6 +836,7 @@ config PERCPU_STATS config GUP_TEST bool "Enable infrastructure for

[PATCH] fs/ntfs: remove unused varible attr_len

2020-11-07 Thread Alex Shi
This varible isn't used anymore, remove it to skip W=1 warning: fs/ntfs/inode.c:2350:6: warning: variable ‘attr_len’ set but not used [-Wunused-but-set-variable] Signed-off-by: Alex Shi Cc: Anton Altaparmakov Cc: linux-ntfs-...@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org --- fs/nt

<    1   2   3   4