Re: [PATCH 0/4] arm64: wire up VM_FLUSH_RESET_PERMS

2019-06-24 Thread Catalin Marinas
On Mon, Jun 24, 2019 at 04:29:39PM +0200, Ard Biesheuvel wrote: > On Mon, 24 Jun 2019 at 13:23, Ard Biesheuvel wrote: > > On 6/24/19 1:16 PM, Will Deacon wrote: > > > On Tue, May 28, 2019 at 11:04:20AM +0100, Will Deacon wrote: > > >> On Thu, May 23, 2019 at 11:22:52AM +0100, Ard Biesheuvel

Re: [PATCH v7 00/25] Unify vDSOs across more architectures

2019-06-24 Thread Catalin Marinas
On Mon, Jun 24, 2019 at 03:23:46PM +0100, Russell King wrote: > On Mon, Jun 24, 2019 at 04:18:28PM +0200, Thomas Gleixner wrote: > > Vincenzo, > > > > On Mon, 24 Jun 2019, Thomas Gleixner wrote: > > > > > I did not merge the ARM and MIPS parts as they lack any form of > > > acknowlegment from

Re: [PATCH v7 10/25] arm64: compat: Add vDSO

2019-06-24 Thread Catalin Marinas
y traps and emulates them by default). Also your Makefile changes never define a __LINUX_ARM_ARCH__ lower than 7. Fix-up below: --8<--- >From 5655a0313ce7bb731bfed6a19bcfe6b1100b542a Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Mon, 24 Jun 2019 12:16:06 +0100

Re: [PATCH v7 04/25] arm64: Substitute gettimeofday with C implementation

2019-06-24 Thread Catalin Marinas
LANK(); >DEFINE(TVAL_TV_SEC,offsetof(struct timeval, tv_sec)); >DEFINE(TSPEC_TV_SEC, offsetof(struct timespec, tv_sec)); Now that we are moving this to C, do we actually need the asm-offsets? If not, here's a clean-up patch: ---8<

Re: [PATCH v7 01/25] kernel: Standardize vdso_datapage

2019-06-24 Thread Catalin Marinas
mers/vdso branch): 8<-- >From 2e09fa6fca341b3ec7ecaf0b67a313a167bb4ff2 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Mon, 24 Jun 2019 12:19:23 +0100 Subject: [PATCH] vdso: Remove superfluous #ifdef __KERNEL__ in vdso/datapage.h With

Re: [PATCH] arm64: defconfig: update and enable CONFIG_RANDOMIZE_BASE

2019-06-24 Thread Catalin Marinas
On Thu, Jun 20, 2019 at 08:46:58AM +0100, Will Deacon wrote: > On Wed, Jun 19, 2019 at 05:32:42PM -0700, Nick Desaulniers wrote: > > Generated via: > > $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make defconfig > > $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make menuconfig > > > > $

Re: linux-next: Fixes tags need some work in the arm64 tree

2019-06-21 Thread Catalin Marinas
On Fri, Jun 21, 2019 at 09:36:15PM +1000, Stephen Rothwell wrote: > In commit > > 86fc32fee888 ("arm64: Fix incorrect irqflag restore for priority masking") > > Fixes tag > > Fixes: commit 4a503217ce37 ("arm64: irqflags: Use ICC_PMR_EL1 for interrupt > masking") > > has these problem(s):

Re: [PATCH v4 0/8] arm64: IRQ priority masking and Pseudo-NMI fixes

2019-06-21 Thread Catalin Marinas
On Tue, Jun 11, 2019 at 10:38:05AM +0100, Julien Thierry wrote: > Julien Thierry (7): > arm64: Do not enable IRQs for ct_user_exit > arm64: irqflags: Pass flags as readonly operand to restore instruction > arm64: irqflags: Add condition flags to inline asm clobber list > arm64: Fix

Re: [PATCH v2] arm64/mm: Correct the cache line size warning with non coherent device

2019-06-17 Thread Catalin Marinas
On Mon, Jun 17, 2019 at 07:00:34PM +0800, Zhangshaokun wrote: > On 2019/6/17 18:45, Catalin Marinas wrote: > > On Sat, Jun 15, 2019 at 10:44:33AM +0800, Zhangshaokun wrote: > >> On 2019/6/14 21:11, Masayoshi Mizuma wrote: > >>> diff --git a/arch/arm64/mm/dma-mapping.c

Re: [PATCH v2] arm64/mm: Correct the cache line size warning with non coherent device

2019-06-17 Thread Catalin Marinas
On Sat, Jun 15, 2019 at 10:44:33AM +0800, Zhangshaokun wrote: > On 2019/6/14 21:11, Masayoshi Mizuma wrote: > > diff --git a/arch/arm64/kernel/cacheinfo.c b/arch/arm64/kernel/cacheinfo.c > > index 6eaf1c07aa4e..7fa6828bb488 100644 > > --- a/arch/arm64/kernel/cacheinfo.c > > +++

Re: [PATCH v17 03/15] arm64: Introduce prctl() options to control the tagged user addresses ABI

2019-06-13 Thread Catalin Marinas
On Thu, Jun 13, 2019 at 04:45:54PM +0100, Vincenzo Frascino wrote: > On 13/06/2019 16:35, Catalin Marinas wrote: > > On Thu, Jun 13, 2019 at 12:16:59PM +0100, Dave P Martin wrote: > >> On Wed, Jun 12, 2019 at 01:43:20PM +0200, Andrey Konovalov wrote: > >>> + > >

Re: [PATCH 1/2] arm64/mm: check cpu cache line size with non-coherent device

2019-06-13 Thread Catalin Marinas
On Tue, Jun 11, 2019 at 06:02:47PM -0400, Masayoshi Mizuma wrote: > On Tue, Jun 11, 2019 at 07:00:07PM +0100, Catalin Marinas wrote: > > On Tue, Jun 11, 2019 at 11:17:30AM -0400, Masayoshi Mizuma wrote: > > > --- a/arch/arm64/mm/dma-mapping.c > > > +++ b/arch/arm64/mm/dm

Re: [PATCH v4 1/2] arm64: Define Documentation/arm64/tagged-address-abi.txt

2019-06-13 Thread Catalin Marinas
Hi Szabolcs, On Wed, Jun 12, 2019 at 05:30:34PM +0100, Szabolcs Nagy wrote: > On 12/06/2019 15:21, Vincenzo Frascino wrote: > > +2. ARM64 Tagged Address ABI > > +--- > > + > > +From the kernel syscall interface prospective, we define, for the purposes >

Re: [PATCH v4 1/2] arm64: Define Documentation/arm64/tagged-address-abi.txt

2019-06-13 Thread Catalin Marinas
On Thu, Jun 13, 2019 at 02:23:43PM +0100, Dave P Martin wrote: > On Thu, Jun 13, 2019 at 01:28:21PM +0100, Catalin Marinas wrote: > > On Thu, Jun 13, 2019 at 12:37:32PM +0100, Dave P Martin wrote: > > > On Thu, Jun 13, 2019 at 11:15:34AM +0100, Vincenzo Frascino wrote: > >

Re: [PATCH v17 03/15] arm64: Introduce prctl() options to control the tagged user addresses ABI

2019-06-13 Thread Catalin Marinas
On Thu, Jun 13, 2019 at 12:16:59PM +0100, Dave P Martin wrote: > On Wed, Jun 12, 2019 at 01:43:20PM +0200, Andrey Konovalov wrote: > > From: Catalin Marinas > > > > It is not desirable to relax the ABI to allow tagged user addresses into > > the kernel indiscrimina

Re: [PATCH v17 03/15] arm64: Introduce prctl() options to control the tagged user addresses ABI

2019-06-13 Thread Catalin Marinas
Hi Dave, On Thu, Jun 13, 2019 at 12:02:35PM +0100, Dave P Martin wrote: > On Wed, Jun 12, 2019 at 01:43:20PM +0200, Andrey Konovalov wrote: > > +/* > > + * Global sysctl to disable the tagged user addresses support. This control > > + * only prevents the tagged address ABI enabling via prctl()

Re: [PATCH v2 1/2] mm: kmemleak: change error at _write when kmemleak is disabled

2019-06-13 Thread Catalin Marinas
Change this error code to a more appropriate one. > > Signed-off-by: André Almeida Acked-by: Catalin Marinas

Re: [PATCH v2 2/2] docs: kmemleak: add more documentation details

2019-06-13 Thread Catalin Marinas
on about how to use > the kmemleak-test module to test the memory leak scanning. > > Signed-off-by: André Almeida Acked-by: Catalin Marinas

Re: [PATCH 1/2] arm64/mm: check cpu cache line size with non-coherent device

2019-06-11 Thread Catalin Marinas
On Tue, Jun 11, 2019 at 11:17:30AM -0400, Masayoshi Mizuma wrote: > --- a/arch/arm64/mm/dma-mapping.c > +++ b/arch/arm64/mm/dma-mapping.c > @@ -91,10 +91,6 @@ static int __swiotlb_mmap_pfn(struct vm_area_struct *vma, > > static int __init arm64_dma_init(void) > { > -

Re: [PATCH 2/2] arm64/mm: show TAINT_CPU_OUT_OF_SPEC warning if the cache size is over the spec.

2019-06-11 Thread Catalin Marinas
On Tue, Jun 11, 2019 at 11:17:31AM -0400, Masayoshi Mizuma wrote: > From: Masayoshi Mizuma > > Show the warning and taints as TAINT_CPU_OUT_OF_SPEC if the cache line > size is greater than the maximum. In general the "out of spec" part is a misnomer, we tend to apply it to CPU features that are

Re: [PATCH v16 02/16] arm64: untag user pointers in access_ok and __uaccess_mask_ptr

2019-06-11 Thread Catalin Marinas
On Mon, Jun 10, 2019 at 06:53:27PM +0100, Catalin Marinas wrote: > On Mon, Jun 03, 2019 at 06:55:04PM +0200, Andrey Konovalov wrote: > > diff --git a/arch/arm64/include/asm/uaccess.h > > b/arch/arm64/include/asm/uaccess.h > > index e5d5f31c6d36..9164ecb5feca 100644 > &g

Re: [PATCH] clocksource/arm_arch_timer: extract elf_hwcap use to arch-helper

2019-06-10 Thread Catalin Marinas
On Tue, Apr 30, 2019 at 02:14:13PM +0100, Andrew Murray wrote: > diff --git a/arch/arm/include/asm/arch_timer.h > b/arch/arm/include/asm/arch_timer.h > index 0a8d7bba2cb0..f21e038dc9f3 100644 > --- a/arch/arm/include/asm/arch_timer.h > +++ b/arch/arm/include/asm/arch_timer.h > @@ -4,6 +4,7 @@ >

Re: [PATCH V3 1/2] arm64/mm: Consolidate page fault information capture

2019-06-07 Thread Catalin Marinas
some > > cycles by replacing multiple user_mode() calls into a single one earlier > > during the fault. > > > > Signed-off-by: Anshuman Khandual > > Cc: Catalin Marinas > > Cc: Will Deacon > > Cc: Mark Rutland > > Cc: James Morse &g

Re: [PATCH] arm64: Fix comment after #endif

2019-06-07 Thread Catalin Marinas
On Fri, Jun 07, 2019 at 01:49:10AM +0200, Odin Ugedal wrote: > The config value used in the if was changed in > b433dce056d3814dc4b33e5a8a533d6401ffcfb0, but the comment on the > corresponding end was not changed. > > Signed-off-by: Odin Ugedal Queued for 5.3. Thanks. -- Catalin

Re: [PATCH 4/8] arm64: Basic Branch Target Identification support

2019-06-06 Thread Catalin Marinas
On Fri, May 24, 2019 at 03:53:06PM +0100, Dave P Martin wrote: > On Fri, May 24, 2019 at 02:02:17PM +0100, Mark Rutland wrote: > > On Fri, May 24, 2019 at 11:25:29AM +0100, Dave Martin wrote: > > > #endif /* _UAPI__ASM_HWCAP_H */ > > > diff --git a/arch/arm64/include/uapi/asm/mman.h > > >

Re: [PATCH V2 4/4] arm64/mm: Drop local variable vm_fault_t from __do_page_fault()

2019-06-06 Thread Catalin Marinas
On Thu, Jun 06, 2019 at 10:24:01AM +0530, Anshuman Khandual wrote: > On 06/04/2019 08:26 PM, Catalin Marinas wrote: > > On Mon, Jun 03, 2019 at 12:11:25PM +0530, Anshuman Khandual wrote: > >> diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c > >> in

Re: [PATCH V2 3/4] arm64/mm: Consolidate page fault information capture

2019-06-06 Thread Catalin Marinas
On Thu, Jun 06, 2019 at 10:38:11AM +0100, Mark Rutland wrote: > On Tue, Jun 04, 2019 at 03:42:09PM +0100, Catalin Marinas wrote: > > On Mon, Jun 03, 2019 at 12:11:24PM +0530, Anshuman Khandual wrote: > > > diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c > >

Re: [PATCH v4 0/4] ptrace: cleanup PTRACE_SYSEMU handling and add support for arm64

2019-06-05 Thread Catalin Marinas
On Thu, May 23, 2019 at 10:06:14AM +0100, Sudeep Holla wrote: > Sudeep Holla (4): > ptrace: move clearing of TIF_SYSCALL_EMU flag to core > x86: simplify _TIF_SYSCALL_EMU handling > arm64: add PTRACE_SYSEMU{,SINGLESTEP} definations to uapi headers > arm64: ptrace: add support for syscall

Re: [PATCH 0/2] Allow assembly code to use BIT(), GENMASK(), etc. and clean-up arm64 header

2019-06-05 Thread Catalin Marinas
On Mon, May 27, 2019 at 05:34:10PM +0900, Masahiro Yamada wrote: > Some in-kernel headers use _BITUL() instead of BIT(). > > arch/arm64/include/asm/sysreg.h > arch/s390/include/asm/*.h > > I think the reason is because BIT() is currently not available > in assembly. It hard-codes 1UL, which is

Re: [PATCH V2 4/4] arm64/mm: Drop local variable vm_fault_t from __do_page_fault()

2019-06-04 Thread Catalin Marinas
On Mon, Jun 03, 2019 at 12:11:25PM +0530, Anshuman Khandual wrote: > __do_page_fault() is over complicated with multiple goto statements. This > cleans up the code flow and while there drops local variable vm_fault_t. I'd change the subject as well here to something like refactor or simplify

Re: [PATCH V2 2/4] arm64/mm: Drop task_struct argument from __do_page_fault()

2019-06-04 Thread Catalin Marinas
Anshuman Khandual > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Mark Rutland > Cc: James Morse > Cc: Andrey Konovalov Queued for 5.3. Thanks. -- Catalin

Re: [PATCH V2 1/4] arm64/mm: Drop mmap_sem before calling __do_kernel_fault()

2019-06-04 Thread Catalin Marinas
;& is_el1_permission_fault) > > Signed-off-by: Anshuman Khandual > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Mark Rutland > Cc: James Morse > Cc: Andrey Konovalov Queued for 5.3. Thanks. -- Catalin

Re: [PATCH V2 3/4] arm64/mm: Consolidate page fault information capture

2019-06-04 Thread Catalin Marinas
On Mon, Jun 03, 2019 at 12:11:24PM +0530, Anshuman Khandual wrote: > diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c > index da02678..4bb65f3 100644 > --- a/arch/arm64/mm/fault.c > +++ b/arch/arm64/mm/fault.c > @@ -435,6 +435,14 @@ static bool is_el0_instruction_abort(unsigned int esr)

Re: [PATCH V2] arm64/mm: Change BUG_ON() to VM_BUG_ON() in [pmd|pud]_set_huge()

2019-06-04 Thread Catalin Marinas
> Signed-off-by: Anshuman Khandual > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Mark Rutland > Cc: Ard Biesheuvel Queued for 5.3. Thanks. -- Catalin

Re: [PATCH] arm64: kernel: use aff3 instead of aff2 in comment

2019-06-04 Thread Catalin Marinas
On Sat, Jun 01, 2019 at 10:08:08AM +0800, Liu Song wrote: > From: Liu Song > > Should use aff3 instead of aff2 in comment. > > Signed-off-by: Liu Song Queued for 5.3. Thanks. -- Catalin

Re: [PATCH] arm64/cpufeature: Convert hook_lock to raw_spin_lock_t in cpu_enable_ssbs()

2019-06-04 Thread Catalin Marinas
On Thu, May 30, 2019 at 12:30:58PM +0100, Julien Grall wrote: > cpu_enable_ssbs() is called via stop_machine() as part of the cpu_enable > callback. A spin lock is used to ensure the hook is registered before > the rest of the callback is executed. > > On -RT spin_lock() may sleep. However, all

Re: [PATCH v2] arm64: mm: make CONFIG_ZONE_DMA32 configurable

2019-06-04 Thread Catalin Marinas
On Wed, May 29, 2019 at 12:08:20AM +0800, Miles Chen wrote: > This change makes CONFIG_ZONE_DMA32 defuly y and allows users > to overwrite it only when CONFIG_EXPERT=y. > > For the SoCs that do not need CONFIG_ZONE_DMA32, this is the > first step to manage all available memory by a single >

Re: [PATCH] arm64/mm: Simplify protection flag creation for kernel huge mappings

2019-06-04 Thread Catalin Marinas
are same, > we should use page table level specific macros to be consistent as per the > MMU specifications. Create page table level specific wrappers for kernel > huge mapping entries and just drop mk_sect_prot() which does not have any > other user. > > Signed-off-by: Anshu

Re: [PATCH v4 1/2] drivers: base: cacheinfo: Add variable to record max cache line size

2019-06-04 Thread Catalin Marinas
he_line_size() for arm64. > > Cc: Greg Kroah-Hartman > Cc: "Rafael J. Wysocki" > Cc: Sudeep Holla > Cc: Catalin Marinas > Cc: Jeremy Linton > Cc: Will Deacon > Signed-off-by: Shaokun Zhang Both patches queued for 5.3. Thanks. -- Catalin

Re: [PATCH v2] uaccess: add noop untagged_addr definition

2019-06-04 Thread Catalin Marinas
This patch adds an > > untagged_addr() macro, which is defined as noop for architectures that do > > not support memory tagging. The oncoming patch series will define it at > > least for sparc64 and arm64. > > > > Acked-by: Catalin Marinas > > Reviewed-by: Khalid Aziz >

Re: [PATCH v4 05/14] arm64, mm: Make randomization selected by generic topdown mmap layout

2019-06-03 Thread Catalin Marinas
to have elf > randomization and no MMU: without MMU, the security added by randomization > is worth nothing. Not planning on this anytime soon ;). Acked-by: Catalin Marinas

Re: [PATCH v4 04/14] arm64, mm: Move generic mmap layout functions to mm

2019-06-03 Thread Catalin Marinas
set by other architectures to benefit from those functions. > Note that this new config depends on MMU being enabled, if selected > without MMU support, a warning will be thrown. > > Suggested-by: Christoph Hellwig > Signed-off-by: Alexandre Ghiti > Reviewed-by: Christoph Hellwig Acked-by: Catalin Marinas

Re: [PATCH v4 03/14] arm64: Consider stack randomization for mmap base only when necessary

2019-06-03 Thread Catalin Marinas
s Cook > Reviewed-by: Christoph Hellwig Acked-by: Catalin Marinas

Re: [PATCH v4 02/14] arm64: Make use of is_compat_task instead of hardcoding this test

2019-06-03 Thread Catalin Marinas
Ghiti > Acked-by: Kees Cook > Reviewed-by: Christoph Hellwig Acked-by: Catalin Marinas

Re: [PATCH REBASE v2 1/2] x86, arm64: Move ARCH_WANT_HUGE_PMD_SHARE config in arch/Kconfig

2019-06-03 Thread Catalin Marinas
elt > --- > arch/Kconfig | 3 +++ > arch/arm64/Kconfig | 2 +- > arch/x86/Kconfig | 4 +--- > 3 files changed, 5 insertions(+), 4 deletions(-) For arm64: Acked-by: Catalin Marinas

Re: [PATCH v4 2/4] x86: simplify _TIF_SYSCALL_EMU handling

2019-06-03 Thread Catalin Marinas
On Thu, May 23, 2019 at 10:06:16AM +0100, Sudeep Holla wrote: > The usage of emulated/_TIF_SYSCALL_EMU flags in syscall_trace_enter > seems to be bit overcomplicated than required. Let's simplify it. > > Cc: Andy Lutomirski > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov >

Re: [PATCH] arm64/mm: Move PTE_VALID from SW defined to HW page table entry definitions

2019-06-03 Thread Catalin Marinas
propriate > header file. > > Signed-off-by: Anshuman Khandual > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Steve Capper > Cc: Suzuki Poulose > Cc: James Morse Queued for 5.3. Thanks. -- Catalin

Re: [PATCH] arm64/hugetlb: Use macros for contiguous huge page sizes

2019-06-03 Thread Catalin Marinas
nge makes it > consistently use the same mnemonic. > > Signed-off-by: Anshuman Khandual > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Steve Capper > Cc: Mark Rutland Queued for 5.3. Thanks. -- Catalin

Re: [RFC/PATCH 4/5] arm64: Add support for arch_memremap_ro()

2019-06-03 Thread Catalin Marinas
Bjorn Andersson > Cc: Andy Gross > Cc: Will Deacon > Cc: Catalin Marinas > Cc: Dan Williams > Signed-off-by: Stephen Boyd Not sure what the plans are with this series but if you need an ack for arm64: Acked-by: Catalin Marinas

Re: [PATCH v6 15/19] arm64: Add vDSO compat support

2019-06-01 Thread Catalin Marinas
On Thu, May 30, 2019 at 03:15:27PM +0100, Vincenzo Frascino wrote: > Add vDSO compat support to the arm64 building system. > > Cc: Catalin Marinas > Cc: Will Deacon > Signed-off-by: Vincenzo Frascino > --- > arch/arm64/Kconfig | 1 + > arch/ar

Re: [PATCH v15 05/17] arms64: untag user pointers passed to memory syscalls

2019-05-29 Thread Catalin Marinas
On Wed, May 29, 2019 at 01:42:25PM +0100, Dave P Martin wrote: > On Tue, May 28, 2019 at 05:34:00PM +0100, Catalin Marinas wrote: > > On Tue, May 28, 2019 at 04:56:45PM +0100, Dave P Martin wrote: > > > On Tue, May 28, 2019 at 04:40:58PM +0100, Cat

Re: [PATCH 4/6] mm: add a gup_fixup_start_addr hook

2019-05-29 Thread Catalin Marinas
Hi Christoph, On Sat, 25 May 2019 at 14:33, Christoph Hellwig wrote: > diff --git a/mm/gup.c b/mm/gup.c > index f173fcbaf1b2..1c21ecfbf38b 100644 > --- a/mm/gup.c > +++ b/mm/gup.c > @@ -2117,6 +2117,10 @@ static void gup_pgd_range(unsigned long addr, unsigned > long end, > } while

Re: [PATCH v15 00/17] arm64: untag user pointers passed to the kernel

2019-05-23 Thread Catalin Marinas
On Thu, May 23, 2019 at 11:42:57AM +0100, Dave P Martin wrote: > On Wed, May 22, 2019 at 09:20:52PM -0300, Jason Gunthorpe wrote: > > On Wed, May 22, 2019 at 02:49:28PM +0100, Dave Martin wrote: > > > If multiple people will care about this, perhaps we should try to > > > annotate types more

Re: [PATCH] kmemleak: fix check for softirq context

2019-05-18 Thread Catalin Marinas
, "softirq", sizeof(object->comm)); > > > } else { > > > > What are the user-visible runtime effects of this change? > > If user does cat from /sys/kernel/debug/kmemleak previously they would > see this, which is clearly wrong, this is system call context (see the > comm): Indeed, with your patch you get the correct output. Acked-by: Catalin Marinas Thanks. -- Catalin

Re: [PATCH] arch64: export __flush_dcache_area

2019-05-17 Thread Catalin Marinas
On Fri, May 17, 2019 at 12:59:56PM -0700, Mark Salyzyn wrote: > Some (out of tree modular) drivers feel a need to ensure > data is flushed to the DDR before continuing flow. > > Signed-off-by: Mark Salyzyn > Cc: linux-kernel@vger.kernel.org > Cc: kernel-t...@android.com > --- >

Re: icache_is_aliasing and big.LITTLE

2019-05-09 Thread Catalin Marinas
Hi, On Wed, May 08, 2019 at 11:45:03AM -0700, Salman Qazi wrote: > What is the intention behind icache_is_aliasing on big.LITTLE systems > where some icaches are VIPT and others are PIPT? Is it meant to be > conservative in some sense or should it be made per-CPU? It needs to cover the worst

Re: [PATCH v14 13/17] IB/mlx4, arm64: untag user pointers in mlx4_get_umem_mr

2019-05-03 Thread Catalin Marinas
On Tue, Apr 30, 2019 at 03:25:09PM +0200, Andrey Konovalov wrote: > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > mlx4_get_umem_mr() uses provided user

Re: [PATCH v14 10/17] fs, arm64: untag user pointers in fs/userfaultfd.c

2019-05-03 Thread Catalin Marinas
On Tue, Apr 30, 2019 at 03:25:06PM +0200, Andrey Konovalov wrote: > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > userfaultfd_register() and

Re: implement generic dma_map_ops for IOMMUs v4

2019-05-03 Thread Catalin Marinas
On Thu, May 02, 2019 at 03:22:08PM +0200, Christoph Hellwig wrote: > can you quickly look over the arm64 parts? I'd really like to still > get this series in for this merge window as it would conflict with > a lot of dma-mapping work for next merge window, and we also have > the amd and possibly

Re: [PATCH v13 16/20] IB/mlx4, arm64: untag user pointers in mlx4_get_umem_mr

2019-04-30 Thread Catalin Marinas
(trimmed down the cc list slightly as the message bounces) On Mon, Apr 29, 2019 at 09:09:15PM +0300, Leon Romanovsky wrote: > On Wed, Mar 20, 2019 at 03:51:30PM +0100, Andrey Konovalov wrote: > > This patch is a part of a series that extends arm64 kernel ABI to allow to > > pass tagged user

[GIT PULL] arm64 fixes for 5.1-rc7

2019-04-26 Thread Catalin Marinas
Hi Linus, Please pull the arm64 fixes below. Thanks. The following changes since commit 085b7755808aa11f78ab9377257e1dad2e6fa4bb: Linux 5.1-rc6 (2019-04-21 10:45:57 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux tags/arm64-fixes

Re: [PATCH v13 04/20] mm, arm64: untag user pointers passed to memory syscalls

2019-04-26 Thread Catalin Marinas
On Tue, Apr 02, 2019 at 02:47:34PM +0200, Andrey Konovalov wrote: > On Fri, Mar 29, 2019 at 11:30 AM Catalin Marinas > wrote: > > On Thu, Mar 28, 2019 at 02:19:34PM -0400, Steven Rostedt wrote: > > > On Thu, 28 Mar 2019 19:10:07 +0100 > > > Andrey Konovalov wrote

Re: [PATCH] x86/mm: fix a crash with kmemleak_scan()

2019-04-24 Thread Catalin Marinas
() even if not all > address ranges passed to this function are known to kmemleak. > > Signed-off-by: Qian Cai Reviewed-by: Catalin Marinas

Re: [PATCH] x86/mm/mem_encrypt: fix a crash with kmemleak_scan

2019-04-23 Thread Catalin Marinas
Hi Boris, On Tue, Apr 23, 2019 at 03:25:18PM +0200, Borislav Petkov wrote: > On Thu, Apr 18, 2019 at 10:50:15AM +0100, Catalin Marinas wrote: > > Kmemleak is basically a tri-colour marking tracing garbage collector [1] > > Thanks for that - interesting read. > > > but w

[GIT PULL] arm64 fixes for 5.1-rc6

2019-04-18 Thread Catalin Marinas
Hi Linus, Please pull the arm64 fix below. Thanks. The following changes since commit dc4060a5dc2557e6b5aa813bf5b73677299d62d2: Linux 5.1-rc5 (2019-04-14 15:17:41 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux tags/arm64-fixes for

Re: [PATCH] x86/mm/mem_encrypt: fix a crash with kmemleak_scan

2019-04-18 Thread Catalin Marinas
On Thu, Apr 18, 2019 at 09:45:10AM +0200, Borislav Petkov wrote: > On Tue, Apr 16, 2019 at 08:38:30PM -0400, Qian Cai wrote: > > kmemleak_init() will register the data/bss sections (only register > > .data..ro_after_init if not within .data) and then kmemleak_scan() will scan > > those address and

Re: [PATCH 1/1] arm: mm: Export __sync_icache_dcache() for xen-privcmd

2019-04-17 Thread Catalin Marinas
On Wed, Apr 17, 2019 at 10:41:37AM +0100, Russell King wrote: > On Sun, Apr 14, 2019 at 10:51:09PM -0700, Christoph Hellwig wrote: > > On Sat, Apr 13, 2019 at 06:30:52PM +0200, Heinrich Schuchardt wrote: > > > This patch avoids > > > ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko]

Re: [PATCH] arm64: futex: Restore oldval initialization to work around buggy compilers

2019-04-17 Thread Catalin Marinas
On Wed, Apr 17, 2019 at 12:21:21AM -0700, Nathan Chancellor wrote: > Commit 045afc24124d ("arm64: futex: Fix FUTEX_WAKE_OP atomic ops with > non-zero result value") removed oldval's zero initialization in > arch_futex_atomic_op_inuser because it is not necessary. Unfortunately, > Android's arm64

Re: [PATCH] x86/mm/mem_encrypt: fix a crash with kmemleak_scan

2019-04-16 Thread Catalin Marinas
gt; kthread+0x1d2/0x1f0 > ret_from_fork+0x35/0x40 > > Signed-off-by: Qian Cai It seems that commit 298a32b13208 ("kmemleak: powerpc: skip scanning holes in the .bss section") has other uses as well. Acked-by: Catalin Marinas

Re: [PATCH] kmemleak: fix unused-function warning

2019-04-16 Thread Catalin Marinas
> > Add a new #ifdef around it. > > Fixes: 298a32b13208 ("kmemleak: powerpc: skip scanning holes in the .bss > section") > Signed-off-by: Arnd Bergmann Acked-by: Catalin Marinas

Re: [PATCH] arm64: mm: check virtual addr in virt_to_page() if CONFIG_DEBUG_VIRTUAL=y

2019-04-16 Thread Catalin Marinas
AP) || defined(CONFIG_DEBUG_VIRTUAL) > #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) > #define _virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) > #else IIUC, this shouldn't change the behaviour of virt_addr_valid(). The patch looks fine to me. Acked-by: Catalin Marinas

[GIT PULL] arm64 fixes for -rc4

2019-04-05 Thread Catalin Marinas
Hi Linus, Please pull the arm64 fix below. The following changes since commit 79a3aaa7b82e3106be97842dedfd8429248896e6: Linux 5.1-rc3 (2019-03-31 14:39:29 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux tags/arm64-fixes for you to

Re: [PATCH v4] kmemleak: survive in a low-memory situation

2019-04-05 Thread Catalin Marinas
On Mon, Apr 01, 2019 at 10:12:01PM +0200, Michal Hocko wrote: > On Fri 29-03-19 16:16:38, Catalin Marinas wrote: > > On Fri, Mar 29, 2019 at 01:02:37PM +0100, Michal Hocko wrote: > > > On Thu 28-03-19 14:59:17, Catalin Marinas wrote: > &g

Re: [PATCH 4.4 078/131] PM / Hibernate: Call flush_icache_range() on pages restored in-place

2019-04-03 Thread Catalin Marinas
nteed to be executable on these architectures. > > > > Signed-off-by: James Morse > > Acked-by: Pavel Machek > > Acked-by: Rafael J. Wysocki > > Acked-by: Catalin Marinas > > [will: make clean_pages_on_* static and remove initialisers] > > Signed

Re: [PATCH] arm64: mm: fix max_mapnr is assigned the wrong value

2019-04-01 Thread Catalin Marinas
So in a sense, the patch is > meaningless. > > But I think since it is a problem, why not fix it (Even if max_mapnr > is not be used)? > What is your opinion? I'm ok with fixing, only that it's not urgent. Will can pick it up for the 5.2 merging window. Reviewed-by: Catalin Marinas

Re: [PATCH] arm64: mm: fix max_mapnr is assigned the wrong value

2019-04-01 Thread Catalin Marinas
On Sat, Mar 30, 2019 at 09:13:46PM +0800, Muchun Song wrote: > When we not use flat memory, the mem_map will be NULL and > pfn_to_page(max_pfn) is a pointer which is located in kernel space. So > max_mapnr is assigned a very large number(e.g., 0x_) - fix > it. > > Signed-off-by:

[GIT PULL] arm64 fixes for 5.1-rc3

2019-03-29 Thread Catalin Marinas
Hi Linus, Please pull the arm64 fix below. Thanks. The following changes since commit 8c2ffd9174779014c3fe1f96d9dc3641d9175f00: Linux 5.1-rc2 (2019-03-24 14:02:26 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux tags/arm64-fixes for

Re: [PATCH v4] kmemleak: survive in a low-memory situation

2019-03-29 Thread Catalin Marinas
On Fri, Mar 29, 2019 at 01:02:37PM +0100, Michal Hocko wrote: > On Thu 28-03-19 14:59:17, Catalin Marinas wrote: > [...] > > >From 09eba8f0235eb16409931e6aad77a45a12bedc82 Mon Sep 17 00:00:00 2001 > > From: Catalin Marinas > > Date: Thu, 28 Mar 2019 13:26:07 +0

Re: [PATCH v13 04/20] mm, arm64: untag user pointers passed to memory syscalls

2019-03-29 Thread Catalin Marinas
(I trimmed down the cc list a bit since it's always bouncing) On Thu, Mar 28, 2019 at 02:19:34PM -0400, Steven Rostedt wrote: > On Thu, 28 Mar 2019 19:10:07 +0100 > Andrey Konovalov wrote: > > > > > Signed-off-by: Andrey Konovalov > > > > --- > > > > ipc/shm.c | 2 ++ > > > >

Re: [PATCH v4] kmemleak: survive in a low-memory situation

2019-03-28 Thread Catalin Marinas
y I am not that brave soul, but I'm wondering what the > > > complication here is? It shouldn't be too hard to teach calculate_sizes() > > > in > > > SLUB about a new SLAB_KMEMLEAK flag that reserves spaces for the metadata. > > On 28/03/2019 12.30, Catalin Marinas wr

Re: [PATCH v4] kmemleak: survive in a low-memory situation

2019-03-28 Thread Catalin Marinas
On Wed, Mar 27, 2019 at 02:02:27PM -0400, Qian Cai wrote: > On 3/27/19 1:29 PM, Catalin Marinas wrote: > > From dc4194539f8191bb754901cea74c86e7960886f8 Mon Sep 17 00:00:00 2001 > > From: Catalin Marinas > > Date: Wed, 27 Mar 2019 17:20:57 + > > Subject: [PATCH] mm:

Re: [PATCH v4] kmemleak: survive in a low-memory situation

2019-03-28 Thread Catalin Marinas
On Wed, Mar 27, 2019 at 11:21:58AM -0700, Matthew Wilcox wrote: > On Wed, Mar 27, 2019 at 05:29:57PM +0000, Catalin Marinas wrote: > > On Wed, Mar 27, 2019 at 09:44:32AM +0100, Michal Hocko wrote: > > > As long as there is an implicit __GFP_NOFAIL then kmemleak is simply >

Re: [PATCH v4] kmemleak: survive in a low-memory situation

2019-03-28 Thread Catalin Marinas
On Thu, Mar 28, 2019 at 08:05:31AM +0200, Pekka Enberg wrote: > On 27/03/2019 2.59, Qian Cai wrote: > > Unless there is a brave soul to reimplement the kmemleak to embed it's > > metadata into the tracked memory itself in a foreseeable future, this > > provides a good balance between enabling

Re: [PATCH v4] kmemleak: survive in a low-memory situation

2019-03-27 Thread Catalin Marinas
eat from? Quick attempt below and it needs some more testing (pretty random pick of the EMERGENCY_POOL_SIZE value). Also, with __GFP_NOFAIL removed, are the other flags safe or we should trim them further? ---8<--- >From dc4194539f8191bb754901cea74c86e

Re: [PATCH v3] kmemleaak: survive in a low-memory situation

2019-03-26 Thread Catalin Marinas
On Tue, Mar 26, 2019 at 09:05:36AM -0700, Matthew Wilcox wrote: > On Tue, Mar 26, 2019 at 11:43:38AM -0400, Qian Cai wrote: > > Unless there is a brave soul to reimplement the kmemleak to embed it's > > metadata into the tracked memory itself in a foreseeable future, this > > provides a good

Re: [PATCH v3] kmemleaak: survive in a low-memory situation

2019-03-26 Thread Catalin Marinas
On Tue, Mar 26, 2019 at 11:43:38AM -0400, Qian Cai wrote: > Kmemleak could quickly fail to allocate an object structure and then > disable itself in a low-memory situation. For example, running a mmap() > workload triggering swapping and OOM. This is especially problematic for > running things

Re: [PATCH v6 00/10] arm64: add system vulnerability sysfs entries

2019-03-25 Thread Catalin Marinas
s. The v6 logic looks fine to me. For the whole series: Reviewed-by: Catalin Marinas

[GIT PULL] arm64 updates for 5.1-rc2

2019-03-21 Thread Catalin Marinas
Hi Linus, Please pull the arm64 changes below. It's mostly fixes apart from the kprobe blacklist checking which was deferred because of conflicting with a fix merged after I pinned the arm64 for-next/core branch (f2b3d8566d81 "arm64: kprobe: Always blacklist the KVM world-switch code"). Thanks.

Re: [PATCH] arm64: remove obsolete selection of MULTI_IRQ_HANDLER

2019-03-20 Thread Catalin Marinas
On Wed, Mar 20, 2019 at 10:20:56AM -0700, Matthias Kaehlcke wrote: > The arm64 config selects MULTI_IRQ_HANDLER, which was renamed to > GENERIC_IRQ_MULTI_HANDLER by commit 4c301f9b6a94 ("ARM: Convert > to GENERIC_IRQ_MULTI_HANDLER"). The 'new' option is already > selected, so just remove the

Re: [PATCH v2 1/1] initrd: move initrd_start calculate within linear mapping range check

2019-03-19 Thread Catalin Marinas
On Thu, Mar 14, 2019 at 11:20:47AM +0800, pierre Kuo wrote: > in the previous case, initrd_start and initrd_end can be successfully > returned either (base < memblock_start_of_DRAM()) or (base + size > > memblock_start_of_DRAM() + linear_region_size). > > That means even linear mapping range

Re: linux-next: Signed-off-by missing for commit in the arm64-fixes tree

2019-03-19 Thread Catalin Marinas
Hi Stephen, On Wed, Mar 20, 2019 at 01:43:12AM +1100, Stephen Rothwell wrote: > Commit > > a4d17a19c493 ("arm64: apply workaround on A64FX v1r0") > > is missing a Signed-off-by from its author. Thanks for this. The patch is indeed confusing, sent by Takayuki with a signed-off-by from Zhang

Re: [PATCH] arm64/stacktrace: Export save_stack_trace_regs()

2019-03-19 Thread Catalin Marinas
On Fri, Mar 01, 2019 at 03:00:41PM -0500, William Cohen wrote: > The ARM64 implements the save_stack_trace_regs function, but it is > unusable for any diagnostic tooling compiled as a kernel module due > the missing EXPORT_SYMBOL_GPL for the function. Export > save_stack_trace_regs() to align

Re: [RESEND PATCH] Make Fujitsu Erratum 010001 patch can be applied on A64FX v1r0

2019-03-19 Thread Catalin Marinas
On Mon, Mar 18, 2019 at 12:06:06PM +, Mark Rutland wrote: > From 6439e9c0b1525e9d4c7be65552e6f2b1f9d1dbe0 Mon Sep 17 00:00:00 2001 > From: "Okamoto, Takayuki" > Date: Fri, 15 Mar 2019 12:22:36 + > Subject: [PATCH] arm64: apply workaround on A64FX v1r0 > > Fujitsu erratum 010001 applies

[PATCH] NFS: Fix nfs4_lock_state refcounting in nfs4_alloc_{lock,unlock}data()

2019-03-18 Thread Catalin Marinas
6c62a0f>] 0x This patch removes the original refcount_inc(>ls_count) that was paired with the memcpy() lock copying. Fixes: 7b587e1a5a6c ("NFS: use locks_copy_lock() to copy locks.") Cc: # 5.0.x- Cc: NeilBrown Signed-off-by: Catalin Marinas --- fs/nfs/nfs4proc.c | 2 --

Re: [GIT PULL] arm64 updates for 5.1-rc1

2019-03-10 Thread Catalin Marinas
Hi Linus, On Fri, Mar 08, 2019 at 04:42:23PM +, Catalin Marinas wrote: > The following changes since commit 6e4933a006616343f66c4702dc4fc56bb25e7b02: > > irqdesc: Add domain handler for NMIs (2019-02-05 14:37:05 +) > > are available in the Git repository

[GIT PULL] arm64 updates for 5.1-rc1

2019-03-08 Thread Catalin Marinas
in NEON recovery routine Arnd Bergmann (1): arm64: avoid clang warning about self-assignment Catalin Marinas (3): Merge branch 'irq/generic-nmi' of git://git.kernel.org/.../maz/arm-platforms Merge branch 'for-next/perf' of git://git.kernel.org/.../will/linux Revert "

Re: [PATCH v5 03/10] arm64: add sysfs vulnerability show for meltdown

2019-03-01 Thread Catalin Marinas
On Fri, Mar 01, 2019 at 10:53:50AM -0600, Jeremy Linton wrote: > On 3/1/19 10:20 AM, Catalin Marinas wrote: > > On Fri, Mar 01, 2019 at 10:12:09AM -0600, Jeremy Linton wrote: > > > On 3/1/19 1:11 AM, Andre Przywara wrote: > > > > On 2/26/19 7:05 PM, Jeremy Li

Re: [PATCH v10 07/12] fs, arm64: untag user pointers in fs/userfaultfd.c

2019-03-01 Thread Catalin Marinas
On Tue, Feb 26, 2019 at 03:39:08PM +0100, Andrey Konovalov wrote: > On Sat, Feb 23, 2019 at 12:06 AM Dave Hansen wrote: > > > > On 2/22/19 4:53 AM, Andrey Konovalov wrote: > > > userfaultfd_register() and userfaultfd_unregister() use provided user > > > pointers for vma lookups, which can only by

Re: [PATCH v5 03/10] arm64: add sysfs vulnerability show for meltdown

2019-03-01 Thread Catalin Marinas
On Fri, Mar 01, 2019 at 10:12:09AM -0600, Jeremy Linton wrote: > On 3/1/19 1:11 AM, Andre Przywara wrote: > > On 2/26/19 7:05 PM, Jeremy Linton wrote: > > > Display the mitigation status if active, otherwise > > > assume the cpu is safe unless it doesn't have CSV3 > > > and isn't in our whitelist.

Re: linux-next: manual merge of the arm-soc tree with the arm64 tree

2019-03-01 Thread Catalin Marinas
On Fri, Mar 01, 2019 at 09:10:36AM +1100, Stephen Rothwell wrote: > Today's linux-next merge of the arm-soc tree got a conflict in: > > arch/arm64/Kconfig.platforms > > between commit: > > a29c78234942 ("arm64: Kconfig.platforms: fix warning unmet direct > dependencies") > > from the

<    4   5   6   7   8   9   10   11   12   13   >