Re: 5.?? regression: strace testsuite OOpses kernel on ia64

2021-04-09 Thread Sergei Trofimovich
On Tue, 23 Feb 2021 18:53:21 + Sergei Trofimovich wrote: > The crash seems to be related to sock_filter-v test from strace: > https://github.com/strace/strace/blob/master/tests/seccomp-filter-v.c > > Here is an OOps: > > [ 818.089904] BUG: Bad page map in process

[PATCH v2] mm: page_poison: print page info when corruption is caught

2021-04-07 Thread Sergei Trofimovich
call_payload+0x50/0x80 Here we can see that page was freed by page migration but something managed to write to it afterwards. CC: Vlastimil Babka CC: Andrew Morton CC: linux...@kvack.org Signed-off-by: Sergei Trofimovich --- Change since v1: use more generic 'dump_page()' suggested

Re: [PATCH] mm: page_poison: print page owner info when corruption is caught

2021-04-07 Thread Sergei Trofimovich
On Wed, Apr 07, 2021 at 02:15:50PM +0200, Vlastimil Babka wrote: > On 4/4/21 4:17 PM, Sergei Trofimovich wrote: > > When page_poison detects page corruption it's useful to see who > > freed a page recently to have a guess where write-after-free > > corruption happens. >

Re: [PATCH] mm: page_owner: fetch backtrace only for tracked pages

2021-04-07 Thread Sergei Trofimovich
On Wed, Apr 07, 2021 at 05:49:14PM +0200, Vlastimil Babka wrote: > On 4/1/21 11:24 PM, Sergei Trofimovich wrote: > > Very minor optimization. > > I'm not entirely sure about accuracy of "only for tracked pages". Missing > page_ext is something I'm not even sure ho

Re: [PATCH 11/20] kbuild: ia64: use common install script

2021-04-07 Thread Sergei Trofimovich
> kernel. With that we can remove the ia64-only version of the file. > > Cc: linux-i...@vger.kernel.org > Signed-off-by: Greg Kroah-Hartman Reviewed-by: Sergei Trofimovich > --- > arch/ia64/Makefile | 2 +- > arch/ia64/install.sh | 40 ---

[PATCH] ia64: drop marked broken DISCONTIGMEM and VIRTUAL_MEM_MAP

2021-04-04 Thread Sergei Trofimovich
DISCONTIGMEM was marked BROKEN in 5.11. Let's remove it. Booted SPARSEMEM successfully on rx3600. CC: Andrew Morton CC: linux-i...@vger.kernel.org Signed-off-by: Sergei Trofimovich --- arch/ia64/Kconfig | 23 arch/ia64/configs/bigsur_defconfig | 1 - arch/ia64/include

[PATCH] mm: page_poison: print page owner info when corruption is caught

2021-04-04 Thread Sergei Trofimovich
was freed by page migration but something managed to write to it afterwards. CC: Andrew Morton CC: linux...@kvack.org Signed-off-by: Sergei Trofimovich --- mm/page_poison.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/page_poison.c b/mm/page_poison.c index 65cdf844c8ad

Re: [PATCH v2 3/3] hpsa: add an assert to prevent from __packed reintroduction

2021-04-03 Thread Sergei Trofimovich
On Fri, 2 Apr 2021 14:40:39 + "Elliott, Robert (Servers)" wrote: > It looks like ia64 implements atomic_t as a 64-bit value and expects atomic_t > to be 64-bit aligned, but does nothing to ensure that. > > For x86, atomic_t is a 32-bit value and atomic64_t is a 64-bit value, and > the

[PATCH] ia64: module: fix symbolizer crash on fdescr

2021-04-03 Thread Sergei Trofimovich
ot; address and size after module is relocated to a new place and before section headers are discarded. To make similar errors less obscure module_finalize() now zeroes out all variables relevant to module loading only. CC: Andrew Morton CC: linux-i...@vger.kernel.org Signed-off-by: Sergei Trofimo

[PATCH v2] mm: page_owner: detect page_owner recursion via task_struct

2021-04-02 Thread Sergei Trofimovich
gall CC: Mel Gorman CC: Daniel Bristot de Oliveira CC: Andrew Morton CC: linux...@kvack.org Signed-off-by: Sergei Trofimovich --- Change since v1: - use bit from task_struct instead of a new field - track only one recursion depth level so far include/linux/sched.h | 4 mm

Re: [PATCH] mm: page_owner: detect page_owner recursion via task_struct

2021-04-02 Thread Sergei Trofimovich
On Thu, 1 Apr 2021 17:05:19 -0700 Andrew Morton wrote: > On Thu, 1 Apr 2021 23:30:10 +0100 Sergei Trofimovich > wrote: > > > Before the change page_owner recursion was detected via fetching > > backtrace and inspecting it for current instruction pointer. >

[PATCH] mm: page_owner: detect page_owner recursion via task_struct

2021-04-01 Thread Sergei Trofimovich
CC: Ben Segall CC: Mel Gorman CC: Daniel Bristot de Oliveira CC: Andrew Morton CC: linux...@kvack.org Signed-off-by: Sergei Trofimovich --- include/linux/sched.h | 9 + init/init_task.c | 3 +++ mm/page_owner.c | 41 + 3 files chang

[PATCH] mm: page_owner: fetch backtrace only for tracked pages

2021-04-01 Thread Sergei Trofimovich
Very minor optimization. CC: Andrew Morton CC: linux...@kvack.org Signed-off-by: Sergei Trofimovich --- mm/page_owner.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/page_owner.c b/mm/page_owner.c index 63e4ecaba97b..7147fd34a948 100644 --- a/mm/page_owner.c

[PATCH] mm: page_owner: use kstrtobool() to parse bool option

2021-04-01 Thread Sergei Trofimovich
/page_owner.o.before 12320 321 17 126583172 mm/page_owner.o.after CC: Andrew Morton CC: linux...@kvack.org Signed-off-by: Sergei Trofimovich --- mm/page_owner.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/mm/page_owner.c b/mm/page_owner.c index d15c7c4994f5

Re: [PATCH] ia64: fix user_stack_pointer() for ptrace()

2021-04-01 Thread Sergei Trofimovich
On Wed, 31 Mar 2021 17:49:08 -0700 Andrew Morton wrote: > On Wed, 31 Mar 2021 09:44:47 +0100 Sergei Trofimovich > wrote: > > > ia64 has two stacks: > > - memory stack (or stack), pointed at by by r12 > > - register backing store (register stack), pointed

[PATCH] ia64: fix user_stack_pointer() for ptrace()

2021-03-31 Thread Sergei Trofimovich
oo.org/769614 Reported-by: Dmitry V. Levin Signed-off-by: Sergei Trofimovich --- arch/ia64/include/asm/ptrace.h | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/ia64/include/asm/ptrace.h b/arch/ia64/include/asm/ptrace.h index b3aa46090101..08179135905c 100644 ---

Re: [PATCH mm v2] mm, kasan: fix for "integrate page_alloc init with HW_TAGS"

2021-03-30 Thread Sergei Trofimovich
gt; to complaints from the page unpoisoning code, as the poison pattern gets > > overwritten for __GFP_ZERO allocations. > > > > Fix by restoring the initial order. Also add a warning comment. > > > > Reported-by: Vlastimil Babka > > Reported-by: Sergei Trofimovich >

[PATCH v2 3/3] hpsa: add an assert to prevent from __packed reintroduction

2021-03-30 Thread Sergei Trofimovich
quot;scsi: hpsa: Correct dev cmds outstanding for retried cmds" Signed-off-by: Sergei Trofimovich --- drivers/scsi/hpsa_cmd.h | 12 1 file changed, 12 insertions(+) diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h index 885b1f1fb20a..ba6a3aa8d954 100644 --- a/drivers/s

[PATCH v2 2/3] hpsa: fix boot on ia64 (atomic_t alignment)

2021-03-30 Thread Sergei Trofimovich
Paul Adrian Glaubitz Suggested-by: Don Brace Fixes: f749d8b7a "scsi: hpsa: Correct dev cmds outstanding for retried cmds" Signed-off-by: Sergei Trofimovich --- drivers/scsi/hpsa_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi

[PATCH v2 1/3] hpsa: use __packed on individual structs, not header-wide

2021-03-30 Thread Sergei Trofimovich
Don Brace Fixes: f749d8b7a "scsi: hpsa: Correct dev cmds outstanding for retried cmds" Signed-off-by: Sergei Trofimovich --- drivers/scsi/hpsa_cmd.h | 68 - 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/drivers/scsi/hpsa_cmd.h b/dri

[PATCH v3] mm: page_alloc: ignore init_on_free=1 for debug_pagealloc=1

2021-03-29 Thread Sergei Trofimovich
astimil Babka Fixes: 8db26a3d4735 ("mm, page_poison: use static key more efficiently") Cc: CC: Andrew Morton CC: linux...@kvack.org CC: David Hildenbrand CC: Andrey Konovalov Link: https://lkml.org/lkml/2021/3/26/443 Signed-off-by: Sergei Trofimovich --- Change since v2: - Added 'Fixes

Re: [PATCH] ia64: tools: add generic errno.h definition

2021-03-28 Thread Sergei Trofimovich
On Sat, 27 Mar 2021 10:18:18 + Sergei Trofimovich wrote: > On Fri, Mar 12, 2021 at 07:51:35AM +0000, Sergei Trofimovich wrote: > > Noticed missing header when build bpfilter helper: > > > > CC [U] net/bpfilter/main.o > > In file included from /

[PATCH] ia64: mca: always make IA64_MCA_DEBUG an expression

2021-03-28 Thread Sergei Trofimovich
ocessor_id(), sal_info_type < ARRAY_SIZE(rec_name) ? rec_name[sal_info_type] : "UNKNOWN"); ... } Instead of fixing all callers the change expicitly makes IA64_MCA_DEBUG a non-empty expression. CC: Andrew Morton CC: linux-i...@vger.kernel.org Signed-off-by: Sergei Trofimovich

[PATCH v2] ia64: fix EFI_DEBUG build

2021-03-28 Thread Sergei Trofimovich
C: linux-i...@vger.kernel.org Signed-off-by: Sergei Trofimovich --- Change since v1: mention explicitly format string change arch/ia64/kernel/efi.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index c5fe21de46a8..31

[PATCH v2] ia64: simplify code flow around swiotlb init

2021-03-28 Thread Sergei Trofimovich
Before the change CONFIG_INTEL_IOMMU && !CONFIG_SWIOTLB && !CONFIG_FLATMEM could skip `set_max_mapnr(max_low_pfn);` if iommu is not present on system. CC: Andrew Morton CC: John Paul Adrian Glaubitz CC: linux-i...@vger.kernel.org Signed-off-by: Sergei Trofimovich --- Change

Re: [PATCH] mm: add page_owner_stack=off to make stack collection optional

2021-03-27 Thread Sergei Trofimovich
On Sun, 21 Mar 2021 21:25:01 + Sergei Trofimovich wrote: > On some architectures (like ia64) stack walking is slow > and currently requires memory allocation. This causes stack > collection for page_owner=on to fall into recursion. > > This patch implements a page_owner_sta

[PATCH v2] mm: page_alloc: ignore init_on_free=1 for debug_pagealloc=1

2021-03-27 Thread Sergei Trofimovich
ew Morton CC: linux...@kvack.org CC: David Hildenbrand CC: Andrey Konovalov Link: https://lkml.org/lkml/2021/3/26/443 Signed-off-by: Sergei Trofimovich --- mm/page_alloc.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.

Re: [PATCH] mm: page_alloc: ignore init_on_free=1 for page alloc

2021-03-27 Thread Sergei Trofimovich
On Fri, 26 Mar 2021 17:25:22 + Sergei Trofimovich wrote: > On Fri, 26 Mar 2021 15:17:00 +0100 > Vlastimil Babka wrote: > > > On 3/26/21 12:26 PM, Sergei Trofimovich wrote: > > > init_on_free=1 does not guarantee that free pages contain only zero bytes. > > &

Re: [PATCH] hpsa: fix boot on ia64 (atomic_t alignment)

2021-03-27 Thread Sergei Trofimovich
On Wed, 17 Mar 2021 18:28:31 +0100 John Paul Adrian Glaubitz wrote: > Hi Sergei! > > On 3/12/21 11:27 PM, Sergei Trofimovich wrote: > > The failure initially observed as boot failure on rx3600 ia64 machine > > with RAID bus controller: Hewlett-Packard Com

Re: [PATCH] ia64: tools: add generic errno.h definition

2021-03-27 Thread Sergei Trofimovich
On Fri, Mar 12, 2021 at 07:51:35AM +, Sergei Trofimovich wrote: > Noticed missing header when build bpfilter helper: > > CC [U] net/bpfilter/main.o > In file included from /usr/include/linux/errno.h:1, >from /usr/include/bits/errno.h:26, >

Re: [PATCH] mm: page_alloc: ignore init_on_free=1 for page alloc

2021-03-26 Thread Sergei Trofimovich
On Fri, 26 Mar 2021 15:17:00 +0100 Vlastimil Babka wrote: > On 3/26/21 12:26 PM, Sergei Trofimovich wrote: > > init_on_free=1 does not guarantee that free pages contain only zero bytes. > > > > Some examples: > > 1. page_poison=on takes presedence over init_on_alloc=1

Re: [PATCH] mm: page_alloc: ignore init_on_free=1 for page alloc

2021-03-26 Thread Sergei Trofimovich
On Fri, 26 Mar 2021 16:00:34 +0100 Andrey Konovalov wrote: > On Fri, Mar 26, 2021 at 2:49 PM David Hildenbrand wrote: > > > > > I observed use of poisoned pages as the crash on ia64 booted with > > > init_on_free=1 init_on_alloc=1 (CONFIG_PAGE_POISONING=y config). > > > There pmd page

[PATCH] mm: page_alloc: ignore init_on_free=1 for page alloc

2021-03-26 Thread Sergei Trofimovich
k.org Signed-off-by: Sergei Trofimovich --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index cfc72873961d..d57d9b4f7089 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2301,7 +2301,7 @@ inline void post_alloc_hook

[PATCH] ia64: simplify code flow around swiotlb init

2021-03-25 Thread Sergei Trofimovich
Before the change CONFIG_INTEL_IOMMU && !CONFIG_SWIOTLB && !CONFIG_FLATMEM could skip `set_max_mapnr(max_low_pfn);` is iommu is not present on system. CC: Andrew Morton CC: linux-i...@vger.kernel.org Signed-off-by: Sergei Trofimovich --- arch/ia64/mm/init.c | 7 +-- 1

[PATCH] ia64: drop unused IA64_FW_EMU ifdef

2021-03-23 Thread Sergei Trofimovich
It's a remnant of deleted hpsim emulation target removed in fc5bad037 ("ia64: remove the hpsim platform"). CC: Andrew Morton CC: linux-i...@vger.kernel.org Signed-off-by: Sergei Trofimovich --- arch/ia64/kernel/head.S | 5 - 1 file changed, 5 deletions(-) diff --git a/arch/i

Re: [PATCH] ia64: mca: allocate early mca with GFP_ATOMIC

2021-03-23 Thread Sergei Trofimovich
On Tue, 23 Mar 2021 16:15:06 +0100 John Paul Adrian Glaubitz wrote: > Hi Andrew! > > On 3/15/21 9:50 AM, Sergei Trofimovich wrote: > > The sleep warning happens at early boot right at > > secondary CPU activation bootup: > > > > smp: Bringing up seconda

[PATCH] mm: add page_owner_stack=off to make stack collection optional

2021-03-21 Thread Sergei Trofimovich
On some architectures (like ia64) stack walking is slow and currently requires memory allocation. This causes stack collection for page_owner=on to fall into recursion. This patch implements a page_owner_stack=off to allow page stats collection. Signed-off-by: Sergei Trofimovich --- .../admin

Re: [PATCH] ia64: Ensure proper NUMA distance and possible map initialization

2021-03-19 Thread Sergei Trofimovich
t; > memset(numa_slit, -1, sizeof(numa_slit)); > > @@ -514,6 +515,8 @@ void __init acpi_numa_fixup(void) > > printk("\n"); > > } > > #endif > > +out: > > + node_possible_map = node_online_map; > > } > > #endif /* CONFIG_ACPI_NUMA */ > > > > > > Tested-by: John Paul Adrian Glaubitz > > Could you send this patch through Andrew Morton's tree? The ia64 port > currently > has no maintainer, so we have to use an alternative tree. > > @Sergei: Could you test/ack this patch as well? Booted successfully without problems on rx3600. Tested-by: Sergei Trofimovich -- Sergei

Re: [PATCH 0/1] sched/topology: NUMA distance deduplication

2021-03-17 Thread Sergei Trofimovich
On Wed, 17 Mar 2021 20:04:07 + Valentin Schneider wrote: > On 17/03/21 20:47, John Paul Adrian Glaubitz wrote: > > Helo Valentin! > > > > On 3/17/21 8:36 PM, Valentin Schneider wrote: > >> I see ACPI in your boot logs, so I'm guessing you have a bogus SLIT table > >> (the ACPI table with

[PATCH] ia64: mca: allocate early mca with GFP_ATOMIC

2021-03-15 Thread Sergei Trofimovich
has a lot of memory. There is little chance to sleep and switch to GFP_ATOMIC should be a no-op. CC: Andrew Morton CC: linux-i...@vger.kernel.org Signed-off-by: Sergei Trofimovich --- arch/ia64/kernel/mca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/kernel/mca.c

[PATCH] ia64: fix format strings for err_inject

2021-03-13 Thread Sergei Trofimovich
sprintf(buf, "%lx\n", name[cpu]); \ | ^~~ CC: linux-i...@vger.kernel.org Signed-off-by: Sergei Trofimovich --- arch/ia64/kernel/err_inject.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/arch/ia64/kernel/err_

[PATCH] ia64: fix format string for ia64-acpi-cpu-freq

2021-03-13 Thread Sergei Trofimovich
'} [-Wformat=] CC: "Rafael J. Wysocki" CC: Viresh Kumar CC: linux...@vger.kernel.org Signed-off-by: Sergei Trofimovich --- drivers/cpufreq/ia64-acpi-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq

[PATCH] hpsa: fix boot on ia64 (atomic_t alignment)

2021-03-12 Thread Sergei Trofimovich
i: hpsa: Correct dev cmds outstanding for retried cmds" Signed-off-by: Sergei Trofimovich --- drivers/scsi/hpsa_cmd.h | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h index d126bb877250..617bdae9a7de 100644

[PATCH] ia64: tools: add generic errno.h definition

2021-03-11 Thread Sergei Trofimovich
rg CC: net...@vger.kernel.org CC: b...@vger.kernel.org Signed-off-by: Sergei Trofimovich --- tools/arch/ia64/include/uapi/asm/errno.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 tools/arch/ia64/include/uapi/asm/errno.h diff --git a/tools/arch/ia64/include/uapi/asm/errno.h b/tools/arch/ia64/in

[PATCH] docs: don't include Documentation/Kconfig twice

2021-03-07 Thread Sergei Trofimovich
entries in both top level menu and in 'Kernel hacking' menu. The patch keeps entries only in 'Kernel hacking'. CC: Mauro Carvalho Chehab CC: Jonathan Corbet Signed-off-by: Sergei Trofimovich --- Kconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/Kconfig b/Kconfig index 745bc773f567..97ed6389c

Re: [bisected] 5.12-rc1 hpsa regression: "scsi: hpsa: Correct dev cmds outstanding for retried cmds" breaks hpsa P600

2021-03-03 Thread Sergei Trofimovich
On Wed, 3 Mar 2021 00:22:36 + Sergei Trofimovich wrote: > On Tue, 2 Mar 2021 23:31:32 +0100 > John Paul Adrian Glaubitz wrote: > > > Hi Sergei! > > > > On 3/2/21 11:26 PM, Sergei Trofimovich wrote: > > > Gave v5.12-rc1 a try today and got a similar

[bisected] 5.12-rc1 hpsa regression: "scsi: hpsa: Correct dev cmds outstanding for retried cmds" breaks hpsa P600

2021-03-03 Thread Sergei Trofimovich
On Tue, 2 Mar 2021 23:31:32 +0100 John Paul Adrian Glaubitz wrote: > Hi Sergei! > > On 3/2/21 11:26 PM, Sergei Trofimovich wrote: > > Gave v5.12-rc1 a try today and got a similar boot failure around > > hpsa queue initialization, but my failure is later: > > htt

Re: [PATCH] ia64: fix ptrace(PTRACE_SYSCALL_INFO_EXIT) sign

2021-03-03 Thread Sergei Trofimovich
On Sun, 21 Feb 2021 00:25:54 + Sergei Trofimovich wrote: > In https://bugs.gentoo.org/769614 Dmitry noticed that > `ptrace(PTRACE_GET_SYSCALL_INFO)` does not return error sign properly. > > The bug is in mismatch between get/set errors: > > static inline long syscal

Re: [PATCH] ia64: fix ia64_syscall_get_set_arguments() for break-based syscalls

2021-03-03 Thread Sergei Trofimovich
On Sun, 21 Feb 2021 00:25:53 + Sergei Trofimovich wrote: > In https://bugs.gentoo.org/769614 Dmitry noticed that > `ptrace(PTRACE_GET_SYSCALL_INFO)` does not work for syscalls called > via glibc's syscall() wrapper. > > ia64 has two ways to call syscalls from userspace: via

Re: 5.11 regression: "ia64: add support for TIF_NOTIFY_SIGNAL" breaks ia64 boot

2021-03-02 Thread Sergei Trofimovich
On Tue, 23 Feb 2021 08:08:30 + Sergei Trofimovich wrote: > On Mon, 22 Feb 2021 17:43:58 -0700 > Jens Axboe wrote: > > > On 2/22/21 5:41 PM, Jens Axboe wrote: > > > On 2/22/21 5:34 PM, Jens Axboe wrote: > > >> On 2/22/21 4:53 PM, Sergei Trofimovi

5.?? regression: strace testsuite OOpses kernel on ia64

2021-02-23 Thread Sergei Trofimovich
The crash seems to be related to sock_filter-v test from strace: https://github.com/strace/strace/blob/master/tests/seccomp-filter-v.c Here is an OOps: [ 818.089904] BUG: Bad page map in process sock_filter-v pte:0001 pmd:118580001 [ 818.089904] page:e6a429c8 refcount:1

Re: [PATCH] ia64: fix ptrace(PTRACE_SYSCALL_INFO_EXIT) sign

2021-02-21 Thread Sergei Trofimovich
On Sun, 21 Feb 2021 10:21:56 +0100 John Paul Adrian Glaubitz wrote: > Hi Sergei! > > On 2/21/21 1:25 AM, Sergei Trofimovich wrote: > > In https://bugs.gentoo.org/769614 Dmitry noticed that > > `ptrace(PTRACE_GET_SYSCALL_INFO)` does not return error sign properly. > >

[PATCH] ia64: fix ia64_syscall_get_set_arguments() for break-based syscalls

2021-02-20 Thread Sergei Trofimovich
@vger.kernel.org CC: Andrew Morton Reported-by: Dmitry V. Levin Bug: https://bugs.gentoo.org/769614 Signed-off-by: Sergei Trofimovich --- arch/ia64/kernel/ptrace.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel

[PATCH] ia64: fix ptrace(PTRACE_SYSCALL_INFO_EXIT) sign

2021-02-20 Thread Sergei Trofimovich
= -1; } else { regs->r8 = val; regs->r10 = 0; } } Tested on v5.10 on rx3600 machine (ia64 9040 CPU). CC: linux-i...@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: Andrew Morton Reported-by: Dmitry V. Levin Bug: https://bugs.gentoo.org/769614 Signed

linux-headers-5.2 and proper use of SIOCGSTAMP

2019-07-20 Thread Sergei Trofimovich
Commit https://github.com/torvalds/linux/commit/0768e17073dc527ccd18ed5f96ce85f9985e9115 ("net: socket: implement 64-bit timestamps") caused a bit of userspace breakage for existing programs: - firefox: https://bugs.gentoo.org/689808 - qemu:

[RESEND, PATCH] tty/vt: fix write/write race in ioctl(KDSKBSENT) handler

2019-03-10 Thread Sergei Trofimovich
e change adds lock on write path only. Reads are still racy. CC: Greg Kroah-Hartman CC: Jiri Slaby Link: https://lkml.org/lkml/2019/2/17/256 Signed-off-by: Sergei Trofimovich --- drivers/tty/vt/keyboard.c | 33 +++-- 1 file changed, 27 insertions(+), 6 deletions

[PATCH] tty/vt: fix write/write race in ioctl(KDSKBSENT) handler

2019-02-25 Thread Sergei Trofimovich
e change adds lock on write path only. Reads are still racy. CC: Greg Kroah-Hartman CC: Jiri Slaby Link: https://lkml.org/lkml/2019/2/17/256 Signed-off-by: Sergei Trofimovich --- drivers/tty/vt/keyboard.c | 33 +++-- 1 file changed, 27 insertions(+), 6 deletions

Re: 5.0.0-rc6+: Oops at boot: RIP: 0010:__memmove+0x81/0x1a0 / vt_do_kdgkb_ioctl+0x34d/0x440 (race at reenter?)

2019-02-24 Thread Sergei Trofimovich
On Mon, 18 Feb 2019 09:38:10 +0100 Greg Kroah-Hartman wrote: > On Sun, Feb 17, 2019 at 11:39:57PM +0000, Sergei Trofimovich wrote: > > [ Copying as is from https://bugzilla.kernel.org/show_bug.cgi?id=202605 > > and sending to LKML. Greg, Jiri, can you clarify mailing > >

5.0.0-rc6+: Oops at boot: RIP: 0010:__memmove+0x81/0x1a0 / vt_do_kdgkb_ioctl+0x34d/0x440 (race at reenter?)

2019-02-17 Thread Sergei Trofimovich
[ Copying as is from https://bugzilla.kernel.org/show_bug.cgi?id=202605 and sending to LKML. Greg, Jiri, can you clarify mailing list im MAINTAINERS as well? https://github.com/torvalds/linux/blob/master/MAINTAINERS#L15527 mentions no list for tty/vt/. ] Kernel Oops [ 38.739241]

[PATCH v2] alpha: fix page fault handling for r16-r18 targets

2018-12-31 Thread Sergei Trofimovich
aysky Cc: Matt Turner Cc: linux-al...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reported-and-reviewed-by: "Dmitry V. Levin" Cc: sta...@vger.kernel.org # v2.1.32+ Bug: https://bugs.gentoo.org/672040 Signed-off-by: Sergei Trofimovich --- Changes since V1: - expanded bug origin tracke

[PATCH] alpha: fix page fault handling for r16-r18 targets

2018-12-30 Thread Sergei Trofimovich
ratch registers. Any kernel function call would re-calculate `gp`. CC: Dmitry V. Levin CC: Richard Henderson CC: Ivan Kokshaysky CC: Matt Turner CC: linux-al...@vger.kernel.org CC: linux-kernel@vger.kernel.org Reported-by: Dmitry V. Levin Bug: https://bugs.gentoo.org/672040 Signed-off-by: Se

Re: [PATCH] ia64: enable GENERIC_HWEIGHT

2018-10-15 Thread Sergei Trofimovich
On Fri, 14 Sep 2018 08:06:46 +0100 Sergei Trofimovich wrote: > Noticed on a single driver failure: > ERROR: "__sw_hweight8" [drivers/net/wireless/mediatek/mt76/mt76.ko] > undefined! > > CC: Tony Luck > CC: Fenghua Yu > CC: linux-i...@vger.kernel.org > CC:

Re: [PATCH] ia64: enable GENERIC_HWEIGHT

2018-10-15 Thread Sergei Trofimovich
On Fri, 14 Sep 2018 08:06:46 +0100 Sergei Trofimovich wrote: > Noticed on a single driver failure: > ERROR: "__sw_hweight8" [drivers/net/wireless/mediatek/mt76/mt76.ko] > undefined! > > CC: Tony Luck > CC: Fenghua Yu > CC: linux-i...@vger.kernel.org > CC:

Re: [PATCH] ia64: disable SCHED_STACK_END_CHECK

2018-10-15 Thread Sergei Trofimovich
On Fri, 14 Sep 2018 08:06:17 +0100 Sergei Trofimovich wrote: > SCHED_STACK_END_CHECK assumes stack grows in one direction. > ia64 is a rare case where it is not. > > As a result kernel fails at startup as: > Kernel panic - not syncing: corrupted stack end detected i

Re: [PATCH] ia64: disable SCHED_STACK_END_CHECK

2018-10-15 Thread Sergei Trofimovich
On Fri, 14 Sep 2018 08:06:17 +0100 Sergei Trofimovich wrote: > SCHED_STACK_END_CHECK assumes stack grows in one direction. > ia64 is a rare case where it is not. > > As a result kernel fails at startup as: > Kernel panic - not syncing: corrupted stack end detected i

[PATCH] ia64: enable GENERIC_HWEIGHT

2018-09-14 Thread Sergei Trofimovich
Noticed on a single driver failure: ERROR: "__sw_hweight8" [drivers/net/wireless/mediatek/mt76/mt76.ko] undefined! CC: Tony Luck CC: Fenghua Yu CC: linux-i...@vger.kernel.org CC: Andrew Morton CC: linux-kernel@vger.kernel.org Signed-off-by: Sergei Trofimovich --- arch/ia64/K

[PATCH] ia64: disable SCHED_STACK_END_CHECK

2018-09-14 Thread Sergei Trofimovich
on top of canary value. Disable SCHED_STACK_END_CHECK on ia64 as there is no good place for canary without moving initial stack address. CC: Tony Luck CC: Fenghua Yu CC: linux-i...@vger.kernel.org CC: Andrew Morton CC: linux-kernel@vger.kernel.org Signed-off-by: Sergei Trofimovich --- lib

[PATCH] ia64: enable GENERIC_HWEIGHT

2018-09-14 Thread Sergei Trofimovich
Noticed on a single driver failure: ERROR: "__sw_hweight8" [drivers/net/wireless/mediatek/mt76/mt76.ko] undefined! CC: Tony Luck CC: Fenghua Yu CC: linux-i...@vger.kernel.org CC: Andrew Morton CC: linux-kernel@vger.kernel.org Signed-off-by: Sergei Trofimovich --- arch/ia64/K

[PATCH] ia64: disable SCHED_STACK_END_CHECK

2018-09-14 Thread Sergei Trofimovich
on top of canary value. Disable SCHED_STACK_END_CHECK on ia64 as there is no good place for canary without moving initial stack address. CC: Tony Luck CC: Fenghua Yu CC: linux-i...@vger.kernel.org CC: Andrew Morton CC: linux-kernel@vger.kernel.org Signed-off-by: Sergei Trofimovich --- lib

Re: [PATCH v2, simpler] ia64: fix ptrace(PTRACE_GETREGS) (unbreaks strace, gdb)

2018-08-04 Thread Sergei Trofimovich
On Fri, 9 Mar 2018 23:15:55 + Sergei Trofimovich wrote: I tried to explain in more detail breakage mechanics of unwinder and gcc code generation quirks at: https://trofi.github.io/posts/210-ptrace-and-accidental-boot-fix-on-ia64.html Hopefully it gives better intuition of code change

Re: [PATCH v2, simpler] ia64: fix ptrace(PTRACE_GETREGS) (unbreaks strace, gdb)

2018-08-04 Thread Sergei Trofimovich
On Fri, 9 Mar 2018 23:15:55 + Sergei Trofimovich wrote: I tried to explain in more detail breakage mechanics of unwinder and gcc code generation quirks at: https://trofi.github.io/posts/210-ptrace-and-accidental-boot-fix-on-ia64.html Hopefully it gives better intuition of code change

Re: x86_64: movdqu rarely stores bad data (movdqu works fine). Kernel bug, fried CPU or glibc bug?

2018-06-17 Thread Sergei Trofimovich
On Sat, 16 Jun 2018 22:22:50 +0100 Sergei Trofimovich wrote: > TL;DR: on master string/test-memmove glibc test fails on my machine > and I don't know why. Other tests work fine. > ... > This fails: > loop { > movdqu [src++],%xmm0 > movntdq %xmm0,[dst++] > }

Re: x86_64: movdqu rarely stores bad data (movdqu works fine). Kernel bug, fried CPU or glibc bug?

2018-06-17 Thread Sergei Trofimovich
On Sat, 16 Jun 2018 22:22:50 +0100 Sergei Trofimovich wrote: > TL;DR: on master string/test-memmove glibc test fails on my machine > and I don't know why. Other tests work fine. > ... > This fails: > loop { > movdqu [src++],%xmm0 > movntdq %xmm0,[dst++] > }

x86_64: movdqu rarely stores bad data (movdqu works fine). Kernel bug, fried CPU or glibc bug?

2018-06-16 Thread Sergei Trofimovich
TL;DR: on master string/test-memmove glibc test fails on my machine and I don't know why. Other tests work fine. $ elf/ld.so --inhibit-cache --library-path . string/test-memmove simple_memmove __memmove_ssse3_rep __memmove_ssse3 __memmove_sse2_unaligned

x86_64: movdqu rarely stores bad data (movdqu works fine). Kernel bug, fried CPU or glibc bug?

2018-06-16 Thread Sergei Trofimovich
TL;DR: on master string/test-memmove glibc test fails on my machine and I don't know why. Other tests work fine. $ elf/ld.so --inhibit-cache --library-path . string/test-memmove simple_memmove __memmove_ssse3_rep __memmove_ssse3 __memmove_sse2_unaligned

Re: [PATCH] modify one dead link

2018-03-20 Thread Sergei Trofimovich
On Tue, 20 Mar 2018 10:54:22 -0400 Dongliang Mu wrote: > -# hg clone http://xenbits.xensource.com/ext/ia64/xen-unstable.hg > +# hg clone http://xenbits.xensource.com/ext/ia64/xen-unstable > # cd xen-unstable.hg > # hg clone

Re: [PATCH] modify one dead link

2018-03-20 Thread Sergei Trofimovich
On Tue, 20 Mar 2018 10:54:22 -0400 Dongliang Mu wrote: > -# hg clone http://xenbits.xensource.com/ext/ia64/xen-unstable.hg > +# hg clone http://xenbits.xensource.com/ext/ia64/xen-unstable > # cd xen-unstable.hg > # hg clone

[PATCH v2, simpler] ia64: fix ptrace(PTRACE_GETREGS) (unbreaks strace, gdb)

2018-03-09 Thread Sergei Trofimovich
vger.kernel.org Bug: https://github.com/strace/strace/issues/33 Bug: https://gcc.gnu.org/PR84184 Reported-by: Émeric Maschino <emeric.masch...@gmail.com> Tested-by: stanton_a...@mail.com Signed-off-by: Sergei Trofimovich <sly...@gentoo.org> --- arch/ia64/kernel/unwind.c | 9 - 1

[PATCH v2, simpler] ia64: fix ptrace(PTRACE_GETREGS) (unbreaks strace, gdb)

2018-03-09 Thread Sergei Trofimovich
ues/33 Bug: https://gcc.gnu.org/PR84184 Reported-by: Émeric Maschino Tested-by: stanton_a...@mail.com Signed-off-by: Sergei Trofimovich --- arch/ia64/kernel/unwind.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/ia64/kernel/unwind.c b/arch/ia64/kernel/unwind.c in

[PATCH] ia64: doc: tweak whitespace for 'console=' parameter

2018-02-24 Thread Sergei Trofimovich
CC: Tony Luck <tony.l...@intel.com> CC: Fenghua Yu <fenghua...@intel.com> CC: linux-i...@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Sergei Trofimovich <sly...@gentoo.org> --- Documentation/ia64/serial.txt | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH] ia64: doc: tweak whitespace for 'console=' parameter

2018-02-24 Thread Sergei Trofimovich
CC: Tony Luck CC: Fenghua Yu CC: linux-i...@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Sergei Trofimovich --- Documentation/ia64/serial.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/ia64/serial.txt b/Documentation/ia64/serial.txt

Re: [PATCH] ia64: fix ptrace(PTRACE_GETREGS) (unbreaks strace, gdb)

2018-02-11 Thread Sergei Trofimovich
On Fri, 2 Feb 2018 23:02:20 + Sergei Trofimovich <sly...@gentoo.org> wrote: > On Fri, 2 Feb 2018 14:22:32 -0800 > "Luck, Tony" <tony.l...@intel.com> wrote: > > > On Fri, Feb 02, 2018 at 10:12:24PM +, Sergei Trofimovich wrote: > > > The s

Re: [PATCH] ia64: fix ptrace(PTRACE_GETREGS) (unbreaks strace, gdb)

2018-02-11 Thread Sergei Trofimovich
On Fri, 2 Feb 2018 23:02:20 + Sergei Trofimovich wrote: > On Fri, 2 Feb 2018 14:22:32 -0800 > "Luck, Tony" wrote: > > > On Fri, Feb 02, 2018 at 10:12:24PM +, Sergei Trofimovich wrote: > > > The strace breakage looks like that: > > > ./str

Re: [PATCH] ia64: fix ptrace(PTRACE_GETREGS) (unbreaks strace, gdb)

2018-02-02 Thread Sergei Trofimovich
On Fri, 2 Feb 2018 14:22:32 -0800 "Luck, Tony" <tony.l...@intel.com> wrote: > On Fri, Feb 02, 2018 at 10:12:24PM +, Sergei Trofimovich wrote: > > The strace breakage looks like that: > > ./strace: get_regs: get_regs_error: Input/output error > > >

Re: [PATCH] ia64: fix ptrace(PTRACE_GETREGS) (unbreaks strace, gdb)

2018-02-02 Thread Sergei Trofimovich
On Fri, 2 Feb 2018 14:22:32 -0800 "Luck, Tony" wrote: > On Fri, Feb 02, 2018 at 10:12:24PM +, Sergei Trofimovich wrote: > > The strace breakage looks like that: > > ./strace: get_regs: get_regs_error: Input/output error > > > > It happens because ia64 ne

[PATCH] ia64: fix ptrace(PTRACE_GETREGS) (unbreaks strace, gdb)

2018-02-02 Thread Sergei Trofimovich
<fenghua...@intel.com> CC: linux-i...@vger.kernel.org CC: linux-kernel@vger.kernel.org Bug: https://github.com/strace/strace/issues/33 Bug: https://gcc.gnu.org/PR84184 Reported-by: Émeric Maschino <emeric.masch...@gmail.com> Signed-off-by: Sergei Trofimovich <sly...@gentoo.org>

[PATCH] ia64: fix ptrace(PTRACE_GETREGS) (unbreaks strace, gdb)

2018-02-02 Thread Sergei Trofimovich
x-i...@vger.kernel.org CC: linux-kernel@vger.kernel.org Bug: https://github.com/strace/strace/issues/33 Bug: https://gcc.gnu.org/PR84184 Reported-by: Émeric Maschino Signed-off-by: Sergei Trofimovich --- arch/ia64/include/asm/sections.h | 1 - arch/ia64/kernel/unwind.c| 15 ++- 2 files chan

Re: [PATCH v3] ia64: fix module loading for gcc-5.4

2017-04-29 Thread Sergei Trofimovich
On Sat, 8 Apr 2017 20:53:18 +0100 Sergei Trofimovich <sly...@gentoo.org> wrote: > Starting from gcc-5.4+ gcc generates MLX > instructions in more cases to refer local > symbols: > https://gcc.gnu.org/PR60465 > > That caused ia64 module loader to choke > on su

Re: [PATCH v3] ia64: fix module loading for gcc-5.4

2017-04-29 Thread Sergei Trofimovich
On Sat, 8 Apr 2017 20:53:18 +0100 Sergei Trofimovich wrote: > Starting from gcc-5.4+ gcc generates MLX > instructions in more cases to refer local > symbols: > https://gcc.gnu.org/PR60465 > > That caused ia64 module loader to choke > on such instructions: > fus

Re: [PATCH v3] ia64: fix module loading for gcc-5.4+

2017-04-10 Thread Sergei Trofimovich
On Mon, 10 Apr 2017 19:23:28 +0200 SF Markus Elfring wrote: > > - if (slot(insn) != 2) { > > + if (slot(insn) != 1 && slot(insn) != 2) { > > + int const s = slot(insn); > + if (s < 1 || s > 2) { > > Do run time characteristics matter for such a

Re: [PATCH v3] ia64: fix module loading for gcc-5.4+

2017-04-10 Thread Sergei Trofimovich
On Mon, 10 Apr 2017 19:23:28 +0200 SF Markus Elfring wrote: > > - if (slot(insn) != 2) { > > + if (slot(insn) != 1 && slot(insn) != 2) { > > + int const s = slot(insn); > + if (s < 1 || s > 2) { > > Do run time characteristics matter for such a condition check here? It's done

Re: ia64: fix module loading for gcc-5.4

2017-04-09 Thread Sergei Trofimovich
On Sun, 9 Apr 2017 11:02:43 +0200 SF Markus Elfring wrote: > >>> That caused ia64 module loader to choke > >>> on such instructions: > >>> fuse: invalid slot number 1 for IMM64 > >> > >> Why does it matter to check such a value? > > > > I'm not sure I

Re: ia64: fix module loading for gcc-5.4

2017-04-09 Thread Sergei Trofimovich
On Sun, 9 Apr 2017 11:02:43 +0200 SF Markus Elfring wrote: > >>> That caused ia64 module loader to choke > >>> on such instructions: > >>> fuse: invalid slot number 1 for IMM64 > >> > >> Why does it matter to check such a value? > > > > I'm not sure I follow the question. Is your

Re: [PATCH v3] ia64: fix module loading for gcc-5.4

2017-04-09 Thread Sergei Trofimovich
On Sun, 9 Apr 2017 10:27:52 +0200 SF Markus Elfring wrote: > > That caused ia64 module loader to choke > > on such instructions: > > fuse: invalid slot number 1 for IMM64 > > Why does it matter to check such a value? I'm not sure I follow the question. Is

Re: [PATCH v3] ia64: fix module loading for gcc-5.4

2017-04-09 Thread Sergei Trofimovich
On Sun, 9 Apr 2017 10:27:52 +0200 SF Markus Elfring wrote: > > That caused ia64 module loader to choke > > on such instructions: > > fuse: invalid slot number 1 for IMM64 > > Why does it matter to check such a value? I'm not sure I follow the question. Is your question about linux kernel

[PATCH v3] ia64: fix module loading for gcc-5.4

2017-04-08 Thread Sergei Trofimovich
on <a...@linux-foundation.org> Bug: https://bugs.gentoo.org/601014 Tested-by: Émeric MASCHINO <emeric.masch...@gmail.com> Signed-off-by: Sergei Trofimovich <sly...@gentoo.org> --- Change since v1: added 'Tested-by' Change since v2: checkpatched, fixed typos by found by Markus

[PATCH v3] ia64: fix module loading for gcc-5.4

2017-04-08 Thread Sergei Trofimovich
d on 'fuse' and 'btrfs' kernel modules. Cc: Markus Elfring Cc: H. J. Lu Cc: Tony Luck Cc: Fenghua Yu Cc: linux-i...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Andrew Morton Bug: https://bugs.gentoo.org/601014 Tested-by: Émeric MASCHINO Signed-off-by: Sergei Trofimovich --- Change since

[PATCH] alpha: cleanup: remove __NR_sys_epoll_*, leave __NR_epoll_*

2017-04-08 Thread Sergei Trofimovich
g Cc: linux-kernel@vger.kernel.org Signed-off-by: Sergei Trofimovich <sly...@gentoo.org> --- arch/alpha/include/uapi/asm/unistd.h | 5 - 1 file changed, 5 deletions(-) diff --git a/arch/alpha/include/uapi/asm/unistd.h b/arch/alpha/include/uapi/asm/unistd.h index aa33bf5aacb6..650d339a8df6 100644

[PATCH] alpha: cleanup: remove __NR_sys_epoll_*, leave __NR_epoll_*

2017-04-08 Thread Sergei Trofimovich
__NR_sys_epoll_create and friends are alpha-specific while __NR_epoll_create is a generic name for other arches. Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: linux-al...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Sergei Trofimovich --- arch/alpha/include

[PATCH (resend)] ia64: fix module loading for gcc-5.4

2017-04-08 Thread Sergei Trofimovich
sted-by: Émeric MASCHINO <emeric.masch...@gmail.com> Signed-off-by: Sergei Trofimovich <sly...@gentoo.org> --- Change since v1: added 'Tested-by' arch/ia64/kernel/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/modul

  1   2   >