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
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
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
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
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
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
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
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/
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
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
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/
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
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
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
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
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
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 +++
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
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
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
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 +
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.
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
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
---
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
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,
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
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
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
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
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
> -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
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
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
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
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
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
301 - 337 of 337 matches
Mail list logo