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
0x2e0 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()

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 ev

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

2021-04-07 Thread Sergei Trofimovich
ernel. 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/in

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

2021-04-04 Thread Sergei Trofimovich
e 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 65cdf84

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 defini

[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
Rostedt CC: Ben Segall 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/s

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. > > It h

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

2021-04-01 Thread Sergei Trofimovich
CC: Steven Rostedt 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 +---

[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
ca mm/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 d15c7c4

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

2021-03-31 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 at &g

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

2021-03-31 Thread Sergei Trofimovich
tps://bugs.gentoo.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..081791359

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
-by: John 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/dr

[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
: Vlastimil 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 '

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: Ard Biesheuvel CC: linux-...@vger.kernel.org CC: 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

[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 s

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
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 --- mm/page_alloc.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/mm/page_alloc.c

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 containe

[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/a

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
} > > > > 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 no

[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
27;long long unsigned int'} 62 | return 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(+), 1

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

2021-03-13 Thread Sergei Trofimovich
type 's64' {aka 'long long int'} [-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/driv

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

2021-03-12 Thread Sergei Trofimovich
"scsi: 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..617bdae9a

[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
config' 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

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:

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 mapcou

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
nux-kernel@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/i

[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: https://lists.sr.ht/~philmd/qemu/%3C20190604071915.2880

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

2019-03-10 Thread Sergei Trofimovich
dowkeys ru4 & wait The 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,

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

2019-02-25 Thread Sergei Trofimovich
dowkeys ru4 & wait The 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,

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] O

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

2018-12-31 Thread Sergei Trofimovich
okshaysky 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 tr

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

2018-12-30 Thread Sergei Trofimovich
is one of scratch 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

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 inside sch

[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
en 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 ---

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++] >

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__memmo

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 http://xenbits.xensource.com/ext/ia64/linux-2.6.18-xen.

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

2018-03-09 Thread Sergei Trofimovich
ug: https://github.com/strace/strace/issues/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

[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 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" 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
Luck CC: Fenghua Yu 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 Signed-off-by: Sergei Trofimovich --- arch/ia64/include/asm/sections.h | 1 - arch/ia64/kernel/unwind.c| 15

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 condition check here? It's done onc

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 quest

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
'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 Trofimovi

[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
7;btrfs' kernel modules. 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 v1: added 'Test

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

2017-03-19 Thread Sergei Trofimovich
7;btrfs' kernel modules. Cc: H. J. Lu Cc: Tony Luck Cc: Fenghua Yu Cc: linux-i...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Bug: https://bugs.gentoo.org/601014 Signed-off-by: Sergei Trofimovich --- arch/ia64/kernel/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) di

[PATCH] nfc: ia64: fix redefinition of 'put_unaligned_be64'

2017-03-18 Thread Sergei Trofimovich
^ The error here is the inclusion of #include header instead of #include for unaligned helpers. CC: Charles Gorand CC: linux-wirel...@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: linux-...@lists.01.org Signed-off-by: Sergei Trofimovich --- drivers/nfc/nfcmrvl/fw_dnld.c

[PATCH] net/mac80211/rate.c: fix wrong sizeof()

2015-09-09 Thread Sergei Trofimovich
From: Sergei Trofimovich Noticed by gcc-5.2.0: net/mac80211/rate.c: In function 'rate_control_cap_mask': net/mac80211/rate.c:719:25: warning: 'sizeof' on array function parameter 'mcs_mask' will return size of 'u8 * {aka unsigned char *}' [-Wsiz

[tip:perf/core] perf tools: Fix makefile generation under dash

2015-07-21 Thread tip-bot for Sergei Trofimovich
Commit-ID: 52c0a18b9010fb19d10889e8a00aa784197d357c Gitweb: http://git.kernel.org/tip/52c0a18b9010fb19d10889e8a00aa784197d357c Author: Sergei Trofimovich AuthorDate: Sun, 19 Jul 2015 10:30:05 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 20 Jul 2015 17:49:50 -0300 perf

[PATCH] perf: fix makefile generation under dash

2015-07-19 Thread Sergei Trofimovich
Under dash 'echo -n' yields '-n' to stdout. Use printf "" instead. CC: Peter Zijlstra CC: Ingo Molnar CC: Arnaldo Carvalho de Melo CC: Jiri Olsa CC: Namhyung Kim CC: Adrian Hunter CC: linux-kernel@vger.kernel.org Signed-off-by: Sergei Trofimovich --- tools/

[PATCH] cpts: add missing

2014-04-06 Thread Sergei Trofimovich
From: Sergei Trofimovich gcc complains as: drivers/net/ethernet/ti/cpts.c: In function 'cpts_match': drivers/net/ethernet/ti/cpts.c:266:12: error: 'ETH_HLEN' undeclared (first use in this function) drivers/net/ethernet/ti/cpts.c:266:12: note: each undeclared ide

[PATCH] arch/avr32/boards/mimc200/fram.c: add missing 'module.h' for MODULE_LICENSE

2014-01-10 Thread Sergei Trofimovich
kbuild test robot CC: Mark Jackson CC: Hans-Christian Egtvedt CC: Haavard Skinnemoen Signed-off-by: Sergei Trofimovich --- arch/avr32/boards/mimc200/fram.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/avr32/boards/mimc200/fram.c b/arch/avr32/boards/mimc200/fram.c index 9764a1a..76cb51d

[PATCH v3] Makefile: enable -Werror=implicit-int and -Werror=strict-prototypes by default

2013-08-23 Thread Sergei Trofimovich
fatal error. Tested on x86_64 allyesconfig. Signed-off-by: Sergei Trofimovich Cc: Michal Marek Cc: linux-kbu...@vger.kernel.org Cc: Andrew Morton Cc: Geert Uytterhoeven --- Makefile | 6 +++ 1 file changed, 6 insertions(+) Change since v2: - moved CFLAGS checks lower to catch $(CROSS)

Re: [PATCH v2] Makefile: enable -Werror=implicit-int and -Werror=strict-prototypes by default

2013-08-23 Thread Sergei Trofimovich
On Fri, 23 Aug 2013 14:18:02 +0200 Geert Uytterhoeven wrote: > On Thu, Aug 15, 2013 at 8:37 PM, Sergei Trofimovich wrote: > > diff --git a/Makefile b/Makefile > > index 6e48848..53f4776 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -374,6 +374,11 @@

[PATCH v2] Makefile: enable -Werror=implicit-int and -Werror=strict-prototypes by default

2013-08-15 Thread Sergei Trofimovich
#x27;s a fata error. Tested on x86_64 allyesconfig. Signed-off-by: Sergei Trofimovich Cc: Michal Marek Cc: linux-kbu...@vger.kernel.org Cc: Andrew Morton --- Makefile | 5 + 1 file changed, 5 insertions(+) Change since v1: - use 'cc-option' to respect old gccs - fix typos. Thanks

[PATCH] cleanup: add forward declarations for inplace syscall wrappers

2013-08-14 Thread Sergei Trofimovich
ux/include/linux/syscalls.h:183:2: note: in expansion of macro '__SYSCALL_DEFINEx' __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) ^ and adds forward declaration right before definition. Cc: Al Viro Cc: Andrew Morton Signed-off-by: Sergei Trofimovich --- include/linux/compat.h

[PATCH] btrfs: mark some local function as 'static'

2013-08-14 Thread Sergei Trofimovich
Cc: Josef Bacik Cc: Chris Mason Signed-off-by: Sergei Trofimovich --- fs/btrfs/ctree.h | 2 -- fs/btrfs/disk-io.c | 8 fs/btrfs/extent_io.c | 2 +- fs/btrfs/extent_io.h | 1 - fs/btrfs/root-tree.c | 4 ++-- fs/btrfs/transaction.c | 2 +- fs/btrfs/transaction.h | 2

[PATCH] Makefile: enable -Werror=implicit-int and -Werror=strict-prototypes by default

2013-08-14 Thread Sergei Trofimovich
fatal error. Tested on x86_64 allyesconfig. Cc: Michal Marek Cc: linux-kbu...@vger.kernel.org Signed-off-by: Sergei Trofimovich --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 6e48848..eda0126 100644 --- a/Makefile +++ b/Makefile @@ -372,6 +372,8 @@ K

Re: [PATCH 0/7] uselex.rb as a tiny tool to find dead code

2013-08-07 Thread Sergei Trofimovich
On Wed, 07 Aug 2013 17:02:23 -0500 Eric Sandeen wrote: > On 8/7/13 4:43 PM, Sergei Trofimovich wrote: > > ... > > > Meet uselex.rb: one-file script to parse 'nm' output: > > > > https://github.com/trofi/uselex/blob/master/uselex.rb > >

[PATCH 2/7] btrfs: cleanup: mark 'set_state_private' as static

2013-08-07 Thread Sergei Trofimovich
From: Sergei Trofimovich Found by uselex.rb: > set_state_private: [R]: exported from: fs/btrfs/disk-io.o fs/btrfs/built-in.o > fs/btrfs/btrfs.o Signed-off-by: Sergei Trofimovich --- fs/btrfs/extent_io.c | 2 +- fs/btrfs/extent_io.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)

[PATCH 1/7] btrfs: cleanup: mark 'btrfs_lookup_fs_root' as static

2013-08-07 Thread Sergei Trofimovich
From: Sergei Trofimovich Found by uselex.rb: > btrfs_lookup_fs_root: [R]: exported from: fs/btrfs/disk-io.o > fs/btrfs/built-in.o fs/btrfs/btrfs.o Signed-off-by: Sergei Trofimovich --- fs/btrfs/disk-io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrf

[PATCH 7/7] btrfs: cleanup: removed unused 'btrfs_get_inode_ref_index'

2013-08-07 Thread Sergei Trofimovich
From: Sergei Trofimovich Found by uselex.rb: > btrfs_get_inode_ref_index: [R]: exported from: fs/btrfs/inode-item.o > fs/btrfs/btrfs.o fs/btrfs/built-in.o Signed-off-by: Sergei Trofimovich --- fs/btrfs/ctree.h | 6 - fs/btrfs/inode-item.

[PATCH 4/7] btrfs: cleanup: removed unused 'btrfs_start_transaction_lflush'

2013-08-07 Thread Sergei Trofimovich
From: Sergei Trofimovich Found by uselex.rb: > btrfs_start_transaction_lflush: [R]: exported from: fs/btrfs/btrfs.o > fs/btrfs/transaction.o fs/btrfs/built-in.o Signed-off-by: Sergei Trofimovich --- fs/btrfs/transaction.c | 7 --- fs/btrfs/transaction.h | 2 -- 2 files chan

[PATCH 3/7] btrfs: cleanup: mark 'btrfs_write_and_wait_marked_extents' as static

2013-08-07 Thread Sergei Trofimovich
From: Sergei Trofimovich Found by uselex.rb: > btrfs_write_and_wait_marked_extents: [R]: exported from: fs/btrfs/btrfs.o > fs/btrfs/transaction.o fs/btrfs/built-in.o Signed-off-by: Sergei Trofimovich --- fs/btrfs/transaction.c | 4 ++-- fs/btrfs/transaction.h | 2 -- 2 files chan

  1   2   >