Re: [PATCH 12/14] dma-direct: handle the memory encryption bit in common code

2018-03-20 Thread Catalin Marinas
On Mon, Mar 19, 2018 at 08:49:30PM +0100, Christoph Hellwig wrote: > On Mon, Mar 19, 2018 at 06:01:41PM +0000, Catalin Marinas wrote: > > I don't particularly like maintaining an arm64-specific dma-direct.h > > either but arm64 seems to be the only architecture that needs to &

Re: [RFC PATCH 3/6] mm, arm64: untag user addresses in memory syscalls

2018-03-09 Thread Catalin Marinas
On Fri, Mar 09, 2018 at 03:02:01PM +0100, Andrey Konovalov wrote: > Memory subsystem syscalls accept user addresses as arguments, but don't use > copy_from_user and other similar functions, so we need to handle this case > separately. > > Untag user pointers passed to madvise, mbind, get_mempolicy

Re: [RFC PATCH 2/6] arm64: untag user addresses in copy_from_user and others

2018-03-09 Thread Catalin Marinas
). The "hack": -8<---------- >From 6df503651f73c923d91eb695e56f977ddcc52d43 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Tue, 6 Feb 2018 17:54:05 + Subject: [PATCH] arm64: Allow user pointer tags to be passed into the kernel The current tagged poi

[GIT PULL] arm64 fixes for 4.16-rc5

2018-03-09 Thread Catalin Marinas
Hi Linus, Please pull the arm64 fixes below. Thanks. The following changes since commit 4a3928c6f8a53fa1aed28ccba227742486e8ddcb: Linux 4.16-rc3 (2018-02-25 18:50:41 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux tags/arm64-fixes f

Re: [RFC PATCH 3/6] mm, arm64: untag user addresses in memory syscalls

2018-03-14 Thread Catalin Marinas
On Wed, Mar 14, 2018 at 04:45:20PM +0100, Andrey Konovalov wrote: > On Fri, Mar 9, 2018 at 6:42 PM, Evgenii Stepanov wrote: > > On Fri, Mar 9, 2018 at 9:31 AM, Andrey Konovalov > > wrote: > >> On Fri, Mar 9, 2018 at 4:53 PM, Catalin Marinas > >> wrote:

Re: [REVIEW][PATCH 00/15] signal/arm64: siginfo cleanups

2018-09-26 Thread Catalin Marinas
Hi Eric, On Mon, Sep 24, 2018 at 11:07:05AM +0200, Eric W. Biederman wrote: > This is the continuation of my work to sort out signaling of exceptions > with siginfo. The old signal sending functions by taking a siginfo > argument resulted in their callers having to deal with the fiddly nature > o

Re: [REVIEW][PATCH 00/15] signal/arm64: siginfo cleanups

2018-09-27 Thread Catalin Marinas
On Thu, Sep 27, 2018 at 11:39:35AM +0200, Eric W. Biederman wrote: > Catalin Marinas writes: > > On Mon, Sep 24, 2018 at 11:07:05AM +0200, Eric W. Biederman wrote: > >> After these patches have had a chance to be reviewed I plan to merge > >> them by my siginfo tree

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

2018-09-28 Thread Catalin Marinas
On Fri, Sep 28, 2018 at 01:49:29PM +1000, Stephen Rothwell wrote: > diff --cc arch/arm64/kernel/traps.c > index 21689c6a985f,856b32aa03d8.. > --- a/arch/arm64/kernel/traps.c > +++ b/arch/arm64/kernel/traps.c > @@@ -353,12 -366,6 +368,9 @@@ void force_signal_inject(int signal, in >

Re: [PATCH v2] kmemleak: Turn kmemleak_lock to raw spinlock on RT

2018-11-23 Thread Catalin Marinas
On Fri, Nov 23, 2018 at 12:06:11PM +0100, Sebastian Andrzej Siewior wrote: > On 2018-11-23 12:02:55 [+0100], Andrea Parri wrote: > > > is this an RT-only problem? Because mainline should not allow read->read > > > locking or read->write locking for reader-writer locks. If this only > > > happens on

Re: [PATCH V3 4/5] arm64/mm: Enable HugeTLB migration

2018-11-23 Thread Catalin Marinas
CONT PTEPMDCONT PMDPUD >------ > 4K: NA 2M NA 1G > 16K:NA32M NA > 64K:NA 512M NA > > Reviewed-by: Naoya Horiguchi > Signed-off-by: Anshuman Khandual Acked-by: Catalin Marinas

Re: [PATCH V3 5/5] arm64/mm: Enable HugeTLB migration for contiguous bit HugeTLB pages

2018-11-23 Thread Catalin Marinas
2M32M 1G > 16K:2M 32M 1G > 64K:2M512M16G > > Reviewed-by: Naoya Horiguchi > Signed-off-by: Anshuman Khandual Acked-by: Catalin Marinas

[GIT PULL] arm64 fixes for 4.20-rc4

2018-11-24 Thread Catalin Marinas
Hi Linus, Please pull the arm64 fixes below. Thanks. The following changes since commit 9ff01193a20d391e8dbce4403dd5ef87c7eaaca6: Linux 4.20-rc3 (2018-11-18 13:33:44 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux tags/arm64-fixes f

Re: [PATCH v4] debugobjects: scale the static pool size

2018-11-26 Thread Catalin Marinas
On Mon, Nov 26, 2018 at 04:45:54AM -0500, Qian Cai wrote: > On 11/25/18 11:52 PM, Qian Cai wrote: > > BTW, calling debug_objects_mem_init() before kmemleak_init() actually > > could trigger a loop on machines with 160+ CPUs until the pool is filled > > up, > > > > debug_objects_pool_min_level += n

Re: [PATCH] debugobjects: avoid recursive calls with kmemleak

2018-11-26 Thread Catalin Marinas
_cache_create() to not register a > newly allocated debug objects at all. > > Suggested-by: Catalin Marinas > Signed-off-by: Qian Cai Acked-by: Catalin Marinas

Re: [PATCH] mm/memblock: skip kmemleak for kasan_init()

2018-11-28 Thread Catalin Marinas
On Wed, Nov 28, 2018 at 12:40:33PM -0500, Qian Cai wrote: > Kmemleak does not play well with KASAN (tested on both HPE Apollo 70 and > Huawei TaiShan 2280 aarch64 servers). > > After calling start_kernel()->setup_arch()->kasan_init(), kmemleak early > log buffer went from something like 280 to 260

Re: [PATCH v2] arm64: ftrace: Fix to enable syscall events on arm64

2018-11-29 Thread Catalin Marinas
On Thu, Nov 29, 2018 at 02:39:33PM +0900, Masami Hiramatsu wrote: > Since commit 4378a7d4be30 ("arm64: implement syscall wrappers") > introduced "__arm64_" prefix to all syscall wrapper symbols in > sys_call_table, syscall tracer can not find corresponding > metadata from syscall name. In the resul

Re: [PATCH v2] mm/memblock: skip kmemleak for kasan_init()

2018-11-29 Thread Catalin Marinas
addr != end) > [3] while (pudp++, addr = next, addr != end && pud_none(READ_ONCE(*pudp))) > [4] while (pmdp++, addr = next, addr != end && pmd_none(READ_ONCE(*pmdp))) > [5] while (ptep++, addr = next, addr != end && pte_none(READ_ONCE(*ptep))) > > Signed-off-by: Qian Cai Acked-by: Catalin Marinas (for both the kmemleak and arm64 changes)

Re: [PATCH v6 05/24] irqchip/gic-v3: Switch to PMR masking before calling IRQ handler

2018-12-04 Thread Catalin Marinas
On Mon, Nov 12, 2018 at 11:56:56AM +, Julien Thierry wrote: > Mask the IRQ priority through PMR and re-enable IRQs at CPU level, > allowing only higher priority interrupts to be received during interrupt > handling. > > Signed-off-by: Julien Thierry > Cc: Catalin Marinas

Re: [PATCH v6 07/24] arm64: Make PMR part of task context

2018-12-04 Thread Catalin Marinas
On Mon, Nov 12, 2018 at 11:56:58AM +, Julien Thierry wrote: > diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S > index 039144e..eb8120e 100644 > --- a/arch/arm64/kernel/entry.S > +++ b/arch/arm64/kernel/entry.S > @@ -249,6 +249,12 @@ alternative_else_nop_endif > msr

Re: [PATCH v6 10/24] arm64: irqflags: Use ICC_PMR_EL1 for interrupt masking

2018-12-04 Thread Catalin Marinas
On Mon, Nov 12, 2018 at 11:57:01AM +, Julien Thierry wrote: > diff --git a/arch/arm64/include/asm/irqflags.h > b/arch/arm64/include/asm/irqflags.h > index 24692ed..e0a32e4 100644 > --- a/arch/arm64/include/asm/irqflags.h > +++ b/arch/arm64/include/asm/irqflags.h > @@ -18,7 +18,27 @@ > > #if

Re: [PATCH v6 15/24] arm64: Switch to PMR masking when starting CPUs

2018-12-04 Thread Catalin Marinas
On Mon, Nov 12, 2018 at 11:57:06AM +, Julien Thierry wrote: > diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c > index 8dc9dde..e495360 100644 > --- a/arch/arm64/kernel/smp.c > +++ b/arch/arm64/kernel/smp.c > @@ -35,6 +35,7 @@ > #include > #include > #include > +#include >

Re: [PATCH v6 21/24] arm64: Handle serror in NMI context

2018-12-04 Thread Catalin Marinas
On Mon, Nov 12, 2018 at 11:57:12AM +, Julien Thierry wrote: > diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c > index 5f4d9ac..66344cd 100644 > --- a/arch/arm64/kernel/traps.c > +++ b/arch/arm64/kernel/traps.c > @@ -897,13 +897,17 @@ bool arm64_is_fatal_ras_serror(struct pt_r

Re: [PATCH v6 10/24] arm64: irqflags: Use ICC_PMR_EL1 for interrupt masking

2018-12-05 Thread Catalin Marinas
On Wed, Dec 05, 2018 at 04:55:54PM +, Julien Thierry wrote: > On 04/12/18 17:36, Catalin Marinas wrote: > > On Mon, Nov 12, 2018 at 11:57:01AM +, Julien Thierry wrote: > >> diff --git a/arch/arm64/include/asm/irqflags.h > >> b/arch/arm64/include/asm/irqflags.h

Re: [PATCH] arm64: hugetlb: Register hugepages during arch init

2018-12-06 Thread Catalin Marinas
It seems that we somehow missed this patch. Cc'ing a few more people that touched hugetlbpage.c. Catalin On Tue, Oct 23, 2018 at 06:36:57AM +0530, Allen Pais wrote: > Add hstate for each supported hugepage size using arch initcall. > > * no hugepage parameters > > Without hugepage parameters,

Re: [RESEND PATCH] drivers/base: kmemleak ignore a known leak

2018-12-06 Thread Catalin Marinas
> Since this leak has been existed for more than 8-year now and it does not > reference other part of the memory, let kmemleak ignore it, so users don't > need to waste time reporting this in the future. > > Signed-off-by: Qian Cai Acked-by: Catalin Marinas

Re: [PATCH v2 2/2] arm64: uaccess: Implement unsafe accessors

2018-12-06 Thread Catalin Marinas
On Mon, Dec 03, 2018 at 01:55:18PM +, Julien Thierry wrote: > diff --git a/arch/arm64/include/asm/uaccess.h > b/arch/arm64/include/asm/uaccess.h > index 07c3408..cabfcae 100644 > --- a/arch/arm64/include/asm/uaccess.h > +++ b/arch/arm64/include/asm/uaccess.h > @@ -233,6 +233,23 @@ static inlin

Re: [PATCH] mm, kmemleak: Little optimization while scanning

2018-12-07 Thread Catalin Marinas
eak_scan: > > # echo "scan" > /sys/kernel/debug/kmemleak > > before the patch: > > kmemleak: time spend: 41596 us > > after the patch: > > kmemleak: time spend: 34899 us > > Signed-off-by: Oscar Salvador Acked-by: Catalin Marinas

[GIT PULL] arm64 fixes for 4.20-rc6

2018-12-07 Thread Catalin Marinas
Hi Linus, Please pull the arm64 fix below. Thanks. The following changes since commit 2595646791c319cadfdbf271563aac97d0843dc7: Linux 4.20-rc5 (2018-12-02 15:07:55 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux tags/arm64-fixes for

Re: [PATCH v8 0/8] arm64: untag user pointers passed to the kernel

2018-12-06 Thread Catalin Marinas
On Thu, Dec 06, 2018 at 01:44:24PM +0100, Andrey Konovalov wrote: > On Thu, Nov 29, 2018 at 7:16 PM Catalin Marinas > wrote: > > On Thu, Nov 08, 2018 at 03:48:10PM +0100, Andrey Konovalov wrote: > > > On Thu, Nov 8, 2018 at 3:36 PM, Andrey Konovalov > > >

Re: [RESEND PATCH] efi: let kmemleak ignore false positives

2018-12-06 Thread Catalin Marinas
= kmalloc(sizeof(*rsv), GFP_ATOMIC); > > Kmemleak has a known limitation that can only track pointers in the kernel > virtual space. Hence, it will report false positives due to "rsv" will only > reference to other physical addresses, > > rsv->next = efi_memreserve_root->next; > efi_memreserve_root->next = __pa(rsv); > > Signed-off-by: Qian Cai Acked-by: Catalin Marinas

Re: [REPOST PATCH v6 0/4] kgdb: Fix kgdb_roundup_cpus()

2018-12-07 Thread Catalin Marinas
On Tue, Dec 04, 2018 at 07:38:24PM -0800, Douglas Anderson wrote: > Douglas Anderson (4): > kgdb: Remove irq flags from roundup > kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function() > kgdb: Don't round up a CPU that failed rounding up before > kdb: Don't back trace on a cp

Re: [PATCH v6 01/24] arm64: Remove unused daif related functions/macros

2018-11-30 Thread Catalin Marinas
Signed-off-by: Julien Thierry > Cc: Catalin Marinas > Cc: Will Deacon > Cc: James Morse Acked-by: Catalin Marinas IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the

Re: [PATCH v6 02/24] arm64: cpufeature: Set SYSREG_GIC_CPUIF as a boot system feature

2018-11-30 Thread Catalin Marinas
ICC_SRE_EL1.SRE, it cannot be > turned off if found on a CPU. > > Set the feature as STRICT_BOOT, if boot CPU has it, all other CPUs are > required to have it. > > Signed-off-by: Julien Thierry > Suggested-by: Daniel Thompson > Cc: Catalin Marinas > Cc: Will Deacon

Re: [PATCH v6 03/24] arm64: cpufeature: Add cpufeature for IRQ priority masking

2018-11-30 Thread Catalin Marinas
On Mon, Nov 12, 2018 at 11:56:54AM +, Julien Thierry wrote: > Add a cpufeature indicating whether a cpu supports masking interrupts > by priority. > > The feature will be properly enabled in a later patch. > > Signed-off-by: Julien Thierry > Cc: Catalin Marinas > Cc:

Re: [PATCH v6 04/24] arm/arm64: gic-v3: Add PMR and RPR accessors

2018-11-30 Thread Catalin Marinas
On Mon, Nov 12, 2018 at 11:56:55AM +, Julien Thierry wrote: > Add helper functions to access system registers related to interrupt > priorities: PMR and RPR. > > Signed-off-by: Julien Thierry > Cc: Russell King > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Marc Zyn

[GIT PULL] arm64 fixes for 4.20-rc5

2018-11-30 Thread Catalin Marinas
enable syscall events on arm64 - Fix uninitialised pointer in iort_get_platform_device_domain() Catalin Marinas (1): arm64: Add workaround for Cortex-A76 erratum 1286807 Lorenzo Pieralisi (1): ACPI/IORT: Fix

[GIT PULL] arm64 fixes for 4.20-rc2

2018-11-10 Thread Catalin Marinas
Hi Linus, Please pull the arm64 fixes below. Thanks. The following changes since commit 651022382c7f8da46cb4872a545ee1da6d097d2a: Linux 4.20-rc1 (2018-11-04 15:37:52 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux tags/arm64-fixes f

Re: kmemleak: Early log buffer exceeded (525980) during boot

2018-11-10 Thread Catalin Marinas
On Sat, Nov 10, 2018 at 10:08:10AM -0500, Qian Cai wrote: > On Nov 8, 2018, at 4:23 PM, Qian Cai wrote: > > The maximum value for DEBUG_KMEMLEAK_EARLY_LOG_SIZE is only 4, so it > > disables kmemleak every time on this aarch64 server running the latest > > mainline > > (b00d209). > > > > # ec

[GIT PULL] arm64 fixes for 4.18-rc3

2018-06-29 Thread Catalin Marinas
() which itself uses alternatives. Change the code to use an unpatched variant of cache maintenance - Remove unnecessary ISBs from set_{pte,pmd,pud} - perf: xgene_pmu: Fix IOB SLOW PMU parser error Catalin Marinas (1): Merge

Re: [PATCH 2/2] arm64: add support for 43bit physical address

2018-07-03 Thread Catalin Marinas
On Mon, Jul 02, 2018 at 02:04:51PM -0700, Nikunj Kela wrote: > This patch adds support for 43bit physical address. Additionally, > this patch adds support for 27bit section size. This is useful in > reducing kernel memory usage. One usecase is in kdump kernel. Some numbers please. -- Catalin

Re: [PATCH] arm64: Clear the stack

2018-07-03 Thread Catalin Marinas
On Tue, Jul 03, 2018 at 01:14:41PM +0100, Mark Rutland wrote: > On Mon, Jul 02, 2018 at 11:48:05AM -0700, Laura Abbott wrote: > > On 07/02/2018 06:02 AM, Alexander Popov wrote: > > > On 29.06.2018 22:05, Laura Abbott wrote: > > > > Implementation of stackleak based heavily on the x86 version > > >

[GIT PULL] arm64 fixes for 4.18-rc4

2018-07-07 Thread Catalin Marinas
Hi Linus, Please pull the arm64 patches below. Thanks. The following changes since commit 021c91791a5e7e85c567452f1be3e4c2c6cb6063: Linux 4.18-rc3 (2018-07-01 16:04:53 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux tags/arm64-fixes

Re: [GIT PULL] arm64: updates for 4.17

2018-05-11 Thread Catalin Marinas
gt; so the diffstat strays slightly out of arm64 due to his changes. > {snip} > > > > Catalin Marinas (1): > > arm64: Revert L1_CACHE_SHIFT back to 6 (64-byte cache line size) > > I'm wondering if we are changing the L1_CACHE_SHIFT to 6 in 4.17? > This is causing bi

Re: [PATCH] arm64: make secondary_start_kernel() notrace

2018-06-18 Thread Catalin Marinas
On Tue, Jun 12, 2018 at 05:07:37PM +0800, Zhizhou Zhang wrote: > We can't call function trace hook before setup percpu offset. > When entering secondary_start_kernel(), percpu offset has not > been initialized. So this lead hotplug malfunction. > Here is the flow to reproduce this bug: > > echo 0

Re: [PATCH v2 00/17] arm64 SSBD (aka Spectre-v4) mitigation

2018-05-31 Thread Catalin Marinas
On Tue, May 29, 2018 at 01:11:04PM +0100, Marc Zyngier wrote: > Marc Zyngier (17): > arm/arm64: smccc: Add SMCCC-specific return codes > arm64: Call ARCH_WORKAROUND_2 on transitions between EL0 and EL1 > arm64: Add per-cpu infrastructure to call ARCH_WORKAROUND_2 > arm64: Add ARCH_WORKAROUN

Re: [PATCH 2/2] arm64: add support for 43bit physical address

2018-07-05 Thread Catalin Marinas
On Tue, Jul 03, 2018 at 06:35:32PM +, Nikunj Kela (nkela) wrote: > We are trying to reduce the memory allocation needed for kdump kernel. > We want to reserve less than 32M for kdump kernel if possible. We are > able to get ~14M saving by the proposed change. Have you tried disabling SPARSEMEM

Re: [PATCH v9 00/12] Support PPTT for ARM64

2018-05-17 Thread Catalin Marinas
On Fri, May 11, 2018 at 06:57:55PM -0500, Jeremy Linton wrote: > Jeremy Linton (12): > drivers: base: cacheinfo: move cache_setup_of_node() > drivers: base: cacheinfo: setup DT cache properties early > cacheinfo: rename of_node to fw_token > arm64/acpi: Create arch specific cpu to acpi id h

Re: [RESEND PATCH v10 1/6] arm: arm64: introduce CONFIG_HAVE_MEMBLOCK_PFN_VALID

2018-08-17 Thread Catalin Marinas
On Fri, Jul 06, 2018 at 05:01:10PM +0800, Jia He wrote: > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 42c090c..26d75f4 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -778,6 +778,10 @@ config ARCH_SELECT_MEMORY_MODEL > config HAVE_ARCH_PFN_VALID > def_bool

Re: [PATCH V2] kmemleak: Add config to select auto scan

2018-12-12 Thread Catalin Marinas
On Wed, Dec 12, 2018 at 12:14:29PM +0530, Prateek Patel wrote: > On 10/29/2018 4:13 PM, Catalin Marinas wrote: > > On Mon, Oct 22, 2018 at 11:38:43PM +0530, Prateek Patel wrote: > > > From: Sri Krishna chowdary > > > > > > Kmemleak scan can be cpu intensi

Re: [RFC][PATCH 0/3] arm64 relaxed ABI

2018-12-12 Thread Catalin Marinas
Hi Andrey, On Wed, Dec 12, 2018 at 03:23:25PM +0100, Andrey Konovalov wrote: > On Mon, Dec 10, 2018 at 3:31 PM Vincenzo Frascino > wrote: > > On arm64 the TCR_EL1.TBI0 bit has been set since Linux 3.x hence > > the userspace (EL0) is allowed to set a non-zero value in the top > > byte but the res

Re: Can we drop upstream Linux x32 support?

2018-12-13 Thread Catalin Marinas
On Wed, Dec 12, 2018 at 10:03:30AM -0800, Andy Lutomirski wrote: > On Wed, Dec 12, 2018 at 8:52 AM Rich Felker wrote: > > On Wed, Dec 12, 2018 at 08:39:53AM -0800, Andy Lutomirski wrote: > > > I'm proposing another alternative. Given that x32 already proves that > > > the user bitness model doesn

Re: [PATCH v2] kmemleak: Turn kmemleak_lock to raw spinlock on RT

2018-12-18 Thread Catalin Marinas
On Tue, Dec 18, 2018 at 06:51:41PM +0800, He Zhe wrote: > On 2018/12/6 03:14, Sebastian Andrzej Siewior wrote: > > With raw locks you wouldn't have multiple readers at the same time. > > Maybe you wouldn't have recursion but since you can't have multiple > > readers you would add lock contention wh

Re: [PATCH v2] kmemleak: Turn kmemleak_lock to raw spinlock on RT

2018-12-18 Thread Catalin Marinas
gt; ksys_ioctl+0x67/0x90 > __x64_sys_ioctl+0x1a/0x20 > do_syscall_64+0x4d/0xf0 > entry_SYSCALL_64_after_hwframe+0x44/0xa9 > > kmemleak is an error detecting feature. We would not expect as good > performance > as without it. As there is no raw rwlock defining helpers, we turn > kmemleak_lock > to a raw spinlock. > > Signed-off-by: He Zhe > Cc: catalin.mari...@arm.com > Cc: bige...@linutronix.de > Cc: t...@linutronix.de > Cc: rost...@goodmis.org As I replied already, I don't think this patch would increase the kmemleak latency (or performance), although I haven't actually tested it. FWIW: Acked-by: Catalin Marinas

Re: [RFC][PATCH 0/3] arm64 relaxed ABI

2018-12-18 Thread Catalin Marinas
On Tue, Dec 18, 2018 at 04:03:38PM +0100, Andrey Konovalov wrote: > On Wed, Dec 12, 2018 at 4:02 PM Catalin Marinas > wrote: > > The summary of our internal discussions (mostly between kernel > > developers) is that we can't properly describe a user ABI that covers > &g

[GIT PULL] arm64 fixes for 4.20

2018-12-14 Thread Catalin Marinas
Hi Linus, Please pull the arm64 fix below. Thanks. The following changes since commit 40e020c129cfc991e8ab4736d2665351ffd1468d: Linux 4.20-rc6 (2018-12-09 15:31:00 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux tags/arm64-fixes for

Re: [PATCH v10 5/6] arm64: select ACPI PCI code only both features are enabled

2018-12-17 Thread Catalin Marinas
t; + select PCI_ECAM if (ACPI && PCI) > > select POWER_RESET > > select POWER_SUPPLY > > select REFCOUNT_FULL > > > > I need a maintainer ACK here. Acked-by: Catalin Marinas

Re: [PATCH v6 08/13] arm64: expose user PAC bit positions via ptrace

2018-12-10 Thread Catalin Marinas
On Sun, Dec 09, 2018 at 09:41:31AM -0600, Richard Henderson wrote: > On 12/7/18 12:39 PM, Kristina Martsenko wrote: > > When pointer authentication is in use, data/instruction pointers have a > > number of PAC bits inserted into them. The number and position of these > > bits depends on the configu

Re: [REPOST PATCH v6 0/4] kgdb: Fix kgdb_roundup_cpus()

2018-12-10 Thread Catalin Marinas
Hi Doug, On Fri, Dec 07, 2018 at 10:40:24AM -0800, Doug Anderson wrote: > On Fri, Dec 7, 2018 at 9:42 AM Catalin Marinas > wrote: > > On Tue, Dec 04, 2018 at 07:38:24PM -0800, Douglas Anderson wrote: > > > Douglas Anderson (4): > > > kgdb: Remove irq flags

Re: [PATCH v6 10/24] arm64: irqflags: Use ICC_PMR_EL1 for interrupt masking

2018-12-10 Thread Catalin Marinas
On Thu, Dec 06, 2018 at 09:50:18AM +, Julien Thierry wrote: > On 05/12/18 18:26, Catalin Marinas wrote: > > On Wed, Dec 05, 2018 at 04:55:54PM +, Julien Thierry wrote: > >> On 04/12/18 17:36, Catalin Marinas wrote: > >>> On Mon, Nov 12, 2018 at 11:57:01

Re: [PATCH v2 2/2] arm64: uaccess: Implement unsafe accessors

2018-12-10 Thread Catalin Marinas
On Fri, Dec 07, 2018 at 08:38:11AM +, Julien Thierry wrote: > > > On 12/06/2018 06:25 PM, Catalin Marinas wrote: > > On Mon, Dec 03, 2018 at 01:55:18PM +, Julien Thierry wrote: > > > diff --git a/arch/arm64/include/asm/uaccess.h > > > b/arch/arm64/

Re: [PATCH v6 08/13] arm64: expose user PAC bit positions via ptrace

2018-12-10 Thread Catalin Marinas
On Mon, Dec 10, 2018 at 02:29:45PM +, Will Deacon wrote: > On Mon, Dec 10, 2018 at 08:22:06AM -0600, Richard Henderson wrote: > > On 12/10/18 6:03 AM, Catalin Marinas wrote: > > >> However, it won't be too long before someone implements support for > > >>

Re: linux-next: manual merge of the arm64 tree with Linus' tree

2018-12-11 Thread Catalin Marinas
On Tue, Dec 11, 2018 at 08:52:57AM +1100, Stephen Rothwell wrote: > Today's linux-next merge of the arm64 tree got conflicts in: > > Documentation/arm64/silicon-errata.txt > arch/arm64/Kconfig > > between commit: > > ce8c80c536da ("arm64: Add workaround for Cortex-A76 erratum 1286807") >

Re: Can we drop upstream Linux x32 support?

2018-12-11 Thread Catalin Marinas
On Tue, Dec 11, 2018 at 10:02:45AM +0100, Arnd Bergmann wrote: > On Tue, Dec 11, 2018 at 6:35 AM Andy Lutomirski wrote: > > I tried to understand what's going on. As far as I can tell, most of > > the magic is the fact that __kernel_long_t and __kernel_ulong_t are > > 64-bit as seen by x32 user c

Re: Can we drop upstream Linux x32 support?

2018-12-11 Thread Catalin Marinas
On Tue, Dec 11, 2018 at 12:37:42PM +0100, Florian Weimer wrote: > * Catalin Marinas: > > On Tue, Dec 11, 2018 at 10:02:45AM +0100, Arnd Bergmann wrote: > >> On Tue, Dec 11, 2018 at 6:35 AM Andy Lutomirski wrote: > >> > I tried to understand what's going

Re: [PATCH] mm: kmemleak: Turn kmemleak_lock to spin lock and RCU primitives

2019-01-04 Thread Catalin Marinas
On Fri, Jan 04, 2019 at 10:29:13PM +0800, zhe...@windriver.com wrote: > It's not necessary to keep consistency between readers and writers of > kmemleak_lock. RCU is more proper for this case. And in order to gain better > performance, we turn the reader locks to RCU read locks and writer locks to

Re: kmemleak: Cannot allocate a kmemleak_object structure - Kernel 4.19.13

2019-01-07 Thread Catalin Marinas
Hi Nathan, On Tue, Jan 01, 2019 at 01:17:06PM -0600, Nathan Royce wrote: > I had a leak somewhere and I was directed to look into SUnreclaim > which was 5.5 GB after an uptime of a little over 1 month on an 8 GB > system. kmalloc-2048 was a problem. > I just had enough and needed to find out the c

Re: [PATCH] mm: kmemleak: Turn kmemleak_lock to spin lock and RCU primitives

2019-01-07 Thread Catalin Marinas
On Mon, Jan 07, 2019 at 03:31:18PM +0800, He Zhe wrote: > On 1/5/19 2:37 AM, Catalin Marinas wrote: > > On Fri, Jan 04, 2019 at 10:29:13PM +0800, zhe...@windriver.com wrote: > >> It's not necessary to keep consistency between readers and writers of > >> kmemleak_l

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

2019-01-07 Thread Catalin Marinas
On Thu, Jan 03, 2019 at 06:07:35PM +0100, Michal Hocko wrote: > > > On Wed 02-01-19 13:06:19, Qian Cai wrote: > > > [...] > > >> diff --git a/mm/kmemleak.c b/mm/kmemleak.c > > >> index f9d9dc250428..9e1aa3b7df75 100644 > > >> --- a/mm/kmemleak.c > > >> +++ b/mm/kmemleak.c > > >> @@ -576,6 +576,16 @

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

2019-01-02 Thread Catalin Marinas
Hi Qian, On Wed, Jan 02, 2019 at 11:08:49AM -0500, 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 [1]. > > First, it unnecessarily attempt to al

Re: [PATCH V2] kmemleak: Add config to select auto scan

2018-10-29 Thread Catalin Marinas
ect first_run with DEBUG_KMEMLEAK_AUTO_SCAN as this is meant > for only first automatic scan. > > Signed-off-by: Sri Krishna chowdary > Signed-off-by: Sachin Nikam > Signed-off-by: Prateek Looks fine to me. Reviewed-by: Catalin Marinas

Re: [PATCH v2 0/3] arm64: cpufeature: Fix handling of CTR_EL0

2018-10-16 Thread Catalin Marinas
On Tue, Oct 09, 2018 at 02:47:03PM +0100, Suzuki K. Poulose wrote: > This series makes sure that we handle the CTR_EL0 field mismatches > properly, especially for the IDC field. Also, skip trapping CTR > accesses on a CPU if it matches the safe value. > > Applies on arm64 for-next/core. > > Chang

Re: [PATCH] kmemleak: Add config to select auto scan

2018-10-17 Thread Catalin Marinas
On Wed, Oct 17, 2018 at 01:33:28PM +0530, Prateek Patel wrote: > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index e5e7c03..9542852 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -593,6 +593,17 @@ config DEBUG_KMEMLEAK_DEFAULT_OFF > Say Y here to disable kmemleak b

Re: [PATCH] lib/raid6: Fix arm64 test build

2018-11-06 Thread Catalin Marinas
On Tue, Nov 06, 2018 at 09:16:04AM +0100, Ard Biesheuvel wrote: > (+ Catalin, Will) > > On 6 November 2018 at 01:14, Jeremy Linton wrote: > > The lib/raid6/test fails to build the neon objects > > on arm64 because the correct machine type is 'aarch64'. > > > > Once this is correctly enabled, the

Re: [PATCH] arm64: fix commit style in the comments

2018-11-07 Thread Catalin Marinas
On Wed, Nov 07, 2018 at 11:39:11PM +0800, Peng Hao wrote: > Use git commit description style 'commit <12+ chars of sha1> > ("")' in the comments. > > Signed-off-by: Peng Hao > --- > arch/arm64/kernel/sys32.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64

Re: [PATCH v2 1/2] mm: Introduce common STRUCT_PAGE_MAX_SHIFT define

2018-11-08 Thread Catalin Marinas
nstead of > set and checked with a build bug. This also allows us to use the same > define for riscv. > > Signed-off-by: Logan Gunthorpe > Acked-by: Will Deacon > Acked-by: Andrew Morton > Cc: Catalin Marinas > Cc: Arnd Bergmann > Cc: Christoph Hellwig Acked-by: Catalin Marinas

Re: [PATCH 10/10] arm64: use the generic swiotlb_dma_ops

2018-10-12 Thread Catalin Marinas
(dev, size, vaddr, dma_handle, attrs); > + if (!__free_from_pool(vaddr, PAGE_ALIGN(size))) > + void *kaddr = phys_to_virt(dma_to_phys(dev, dma_handle)); > + > + vunmap(vaddr); > + dma_direct_free_pages(dev, size, kaddr, dma_handle, attrs); > + } > } > > long arch_dma_coherent_to_pfn(struct device *dev, void *cpu_addr, With this fix: Acked-by: Catalin Marinas

Re: [PATCH 3/5] arm64: mm: make use of new memblocks_present() helper

2018-10-05 Thread Catalin Marinas
-- > arch/arm64/mm/init.c | 20 +--- > 1 file changed, 1 insertion(+), 19 deletions(-) Acked-by: Catalin Marinas

Re: [PATCH v2] arm64: kdump: fix small typo

2018-11-02 Thread Catalin Marinas
On Fri, Nov 02, 2018 at 08:36:19AM -0400, Yangtao Li wrote: > This brings the kernel doc in line with the function signature. > > Signed-off-by: Yangtao Li Queued for 4.20. Thanks. -- Catalin IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privi

Re: [PATCH v2] arm64: kprobe: make page to RO mode when allocate it

2018-11-02 Thread Catalin Marinas
0 > [3.254103] ret_from_fork+0x10/0x18 > > kprobes allocates a writable executable page with module_alloc() in > order to store executable code. > Reworked to that when allocate a page it sets mode RO. Inspired by > commit 63fef14fc98a ("kprobes/x86: Make insn buffer alw

Re: [PATCH v2] arm64: kprobe: make page to RO mode when allocate it

2018-11-02 Thread Catalin Marinas
0x12c/0x238 > >> [3.253417] ptdump_check_wx+0x68/0xf8 > >> [3.253637] mark_rodata_ro+0x68/0x98 > >> [3.253847] kernel_init+0x38/0x160 > >> [3.254103] ret_from_fork+0x10/0x18 > >> > >> kprobes allocates a writable executa

Re: [PATCH] arm64: hide unused swiotlb functions

2018-11-02 Thread Catalin Marinas
On Fri, Nov 02, 2018 at 04:26:07PM +0100, Arnd Bergmann wrote: > After a good chunk of the swiotlb code has been replaced with the generic > version, two functions are only used from inside of an #ifdef: > > arch/arm64/mm/dma-mapping.c:174:12: error: '__swiotlb_mmap_pfn' defined but > not used [-

[GIT PULL] arm64 2nd round of updates for 4.20

2018-11-03 Thread Catalin Marinas
Hi Linus, Please pull the arm64 updates below. Thank you. The following changes since commit 4debef5510071032c6d5dace31ca1cc42a120073: arm64: KVM: Guests can skip __install_bp_hardening_cb()s HYP work (2018-10-19 15:37:25 +0100) are available in the git repository at: git://git.kernel.org

Re: [PATCH] mailmap: Update email for Punit Agrawal

2018-11-05 Thread Catalin Marinas
On Fri, Nov 02, 2018 at 04:57:52PM +, Punit Agrawal wrote: > As I'll no longer be working with Arm, add a mailmap entry so any mail > directed towards me reaches the appropriate mailbox. > > Signed-off-by: Punit Agrawal I'll pick this up for 4.20-rc2 (unless Linus applies it directly). Good

Re: [RFC 12/17] arm64: move ptrauth keys to thread_info

2018-10-19 Thread Catalin Marinas
On Fri, Oct 05, 2018 at 09:47:49AM +0100, Kristina Martsenko wrote: > From: Mark Rutland > > To use pointer authentication in the kernel, we'll need to switch keys > in the entry assembly. This patch moves the pointer auth keys into > thread_info to make this possible. > > There should be no fun

[GIT PULL] arm64 updated for 4.20

2018-10-19 Thread Catalin Marinas
Hi Linus, Greg, I'm sending the pull request for 4.20 slightly earlier as I'm on holiday next week (not in Edinburgh). Apart from some new arm64 features and clean-ups, this request also contains the core mmu_gather changes for tracking the levels of the page table being cleared and a minor update

Re: [PATCH] tracing: Inform kmemleak of saved_cmdlines allocation

2024-02-19 Thread Catalin Marinas
+0x14/0xa0 > [] start_kernel+0x12e/0x3c0 > [] x86_64_start_reservations+0x18/0x30 > [] x86_64_start_kernel+0x7b/0x80 > [] secondary_startup_64_no_verify+0x15e/0x16b > > Link: https://lore.kernel.org/linux-trace-kernel/87r0hfnr9r....@kernel.org/ > > Fixes: 44dc5c41b5b1 ("tracing: Fix wasted memory in saved_cmdlines logic") > Reported-by: Kalle Valo > Signed-off-by: Steven Rostedt (Google) Reviewed-by: Catalin Marinas

Re: [PATCH RFC 06/37] mm: page_alloc: Allocate from movable pcp lists only if ALLOC_FROM_METADATA

2023-10-17 Thread Catalin Marinas
On Mon, Oct 16, 2023 at 01:41:15PM +0100, Alexandru Elisei wrote: > On Thu, Oct 12, 2023 at 10:25:11AM +0900, Hyesoo Yu wrote: > > I don't think it would be effcient when the majority of movable pages > > do not use GFP_TAGGED. > > > > Metadata pages have a low probability of being in the pcp list

Re: [PATCH RFC 00/37] Add support for arm64 MTE dynamic tag storage reuse

2023-10-27 Thread Catalin Marinas
On Wed, Oct 25, 2023 at 05:52:58PM +0900, Hyesoo Yu wrote: > If we only avoid using ALLOC_CMA for __GFP_TAGGED, would we still be able to > use > the next iteration even if the hardware does not support "tag of tag" ? It depends on how the next iteration looks like. The plan was not to support t

Re: [PATCH 4/5] kbuild: unify vdso_install rules

2023-10-27 Thread Catalin Marinas
ch/arm64/kernel/vdso32/Makefile | 10 -- For arm64: Acked-by: Catalin Marinas

Re: [PATCH] module: Refine kmemleak scanned areas

2024-09-07 Thread Catalin Marinas
reas which > intended to limit kmemleak scan to sections containing writable data. > This means sections such as .text and .rodata are scanned by kmemleak. > > Refine the scanned areas for modules by limiting it to MOD_TEXT and > MOD_INIT_TEXT mod_mem regions. > > CC: Son

Re: [PATCH] module: Refine kmemleak scanned areas

2024-09-09 Thread Catalin Marinas
On Mon, Sep 09, 2024 at 08:40:34AM +0100, Vincent Donnefort wrote: > On Sat, Sep 07, 2024 at 03:12:13PM +0100, Catalin Marinas wrote: > > On Fri, Sep 06, 2024 at 04:38:56PM +0100, Vincent Donnefort wrote: > > > commit ac3b43283923 ("module: replace module_la

Re: [PATCH RFC 00/37] Add support for arm64 MTE dynamic tag storage reuse

2023-09-11 Thread Catalin Marinas
On Wed, Sep 06, 2023 at 12:23:21PM +0100, Alexandru Elisei wrote: > On Thu, Aug 24, 2023 at 04:24:30PM +0100, Catalin Marinas wrote: > > On Thu, Aug 24, 2023 at 01:25:41PM +0200, David Hildenbrand wrote: > > > On 24.08.23 13:06, David Hildenbrand wrote: > > > > Re

Re: [PATCH RFC 00/37] Add support for arm64 MTE dynamic tag storage reuse

2023-09-13 Thread Catalin Marinas
On Mon, Sep 11, 2023 at 02:29:03PM +0200, David Hildenbrand wrote: > On 11.09.23 13:52, Catalin Marinas wrote: > > On Wed, Sep 06, 2023 at 12:23:21PM +0100, Alexandru Elisei wrote: > > > On Thu, Aug 24, 2023 at 04:24:30PM +0100, Catalin Marinas wrote: > > > > On T

Re: [PATCH RFC 00/37] Add support for arm64 MTE dynamic tag storage reuse

2023-09-14 Thread Catalin Marinas
Hi Kuan-Ying, On Wed, Sep 13, 2023 at 08:11:40AM +, Kuan-Ying Lee (李冠穎) wrote: > On Wed, 2023-08-23 at 14:13 +0100, Alexandru Elisei wrote: > > diff --git a/arch/arm64/boot/dts/arm/fvp-base-revc.dts > > b/arch/arm64/boot/dts/arm/fvp-base-revc.dts > > index 60472d65a355..bd050373d6cf 100644 > >

Re: KASAN: invalid-access Write in enqueue_timer

2021-02-16 Thread Catalin Marinas
Adding Jason and Ard. It may be a use-after-free in the wireguard driver. Catalin On Mon, Feb 15, 2021 at 04:06:16PM -0800, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:f40ddce8 Linux 5.11 > git tree: upstream > console output: https://syzkaller.apps

Re: KASAN: invalid-access Write in enqueue_timer

2021-02-16 Thread Catalin Marinas
On Tue, Feb 16, 2021 at 06:50:20PM +0100, Jason A. Donenfeld wrote: > On Tue, Feb 16, 2021 at 6:46 PM Jason A. Donenfeld wrote: > > On Tue, Feb 16, 2021 at 6:28 PM Catalin Marinas > > wrote: > > > > hlist_add_head include/linux/list.h:883 [inline] > > > &g

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-04-08 Thread Catalin Marinas
On Wed, Apr 07, 2021 at 04:52:54PM +0100, Steven Price wrote: > On 07/04/2021 16:14, Catalin Marinas wrote: > > On Wed, Apr 07, 2021 at 11:20:18AM +0100, Steven Price wrote: > > > On 31/03/2021 19:43, Catalin Marinas wrote: > > > > When a slot is added by the VMM, i

Re: [PATCH v2] arm64: Add __init section marker to some functions

2021-04-08 Thread Catalin Marinas
On Tue, 30 Mar 2021 13:54:49 +0800, Jisheng Zhang wrote: > They are not needed after booting, so mark them as __init to move them > to the .init section. Applied to arm64 (for-next/misc), thanks! [1/1] arm64: Add __init section marker to some functions https://git.kernel.org/arm64/c/a7dcf58

Re: [PATCH] arm64: mte: Remove unused mte_assign_mem_tag_range()

2021-04-08 Thread Catalin Marinas
On Wed, 7 Apr 2021 14:38:17 +0100, Vincenzo Frascino wrote: > mte_assign_mem_tag_range() was added in commit 85f49cae4dfc > ("arm64: mte: add in-kernel MTE helpers") in 5.11 but moved out of > mte.S by commit 2cb34276427a ("arm64: kasan: simplify and inline > MTE functions") in 5.12 and renamed to

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-04-08 Thread Catalin Marinas
On Thu, Apr 08, 2021 at 08:16:17PM +0200, David Hildenbrand wrote: > On 08.04.21 16:18, Catalin Marinas wrote: > > On Wed, Apr 07, 2021 at 04:52:54PM +0100, Steven Price wrote: > > > On 07/04/2021 16:14, Catalin Marinas wrote: > > > > On Wed, Apr 07, 2021 at 11:20:

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