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

2021-03-17 Thread Anatoly Pugachev
On Thu, Mar 18, 2021 at 12:42 AM Sergei Trofimovich  wrote:
> > > 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 node distances). You should be able to double check
> > >> this with something like:
> > >>
> > >> $ acpidump > acpi.dump
> > >> $ acpixtract -a acpi.dump
> > >> $ iasl -d *.dat
> > >> $ cat slit.dsl
> > >
> >
>
> Looking at 'arch/ia64/**' NUMA presence is detected by SRAT ACPI
> tables (and generic ACPI also wants SLIT, those probably exist on large
> ia64 boxes?)

hardware is HPE Integrity BL870c i4 nPar, debian sid/unstable ia64
installed (one of the buildd(s) of debian-ports):

mator@lifshitz:~/acpi$ cat slit.dsl
/*
 * Intel ACPI Component Architecture
 * AML/ASL+ Disassembler version 20200925 (64-bit version)
 * Copyright (c) 2000 - 2020 Intel Corporation
 *
 * Disassembly of slit.dat, Wed Mar 17 21:52:16 2021
 *
 * ACPI Data Table [SLIT]
 *
 * Format: [HexOffset DecimalOffset ByteLength]  FieldName : FieldValue
 */

[000h    4]Signature : "SLIT"[System
Locality Information Table]
[004h 0004   4] Table Length : 003C
[008h 0008   1] Revision : 01
[009h 0009   1] Checksum : 7B
[00Ah 0010   6]   Oem ID : "HP"
[010h 0016   8] Oem Table ID : "BL860C-4"
[018h 0024   4] Oem Revision : 0001
[01Ch 0028   4]  Asl Compiler ID : "HP  "
[020h 0032   4]Asl Compiler Revision : 0001

[024h 0036   8]   Localities : 0004
[02Ch 0044   4] Locality   0 : 0A FF 14 FF
[030h 0048   4] Locality   1 : FF 0A FF FF
[034h 0052   4] Locality   2 : 14 FF 0A FF
[038h 0056   4] Locality   3 : FF FF FF 0A

Raw Table Data: Length 60 (0x3C)

: 53 4C 49 54 3C 00 00 00 01 7B 48 50 20 20 20 20  // SLIT<{HP
0010: 42 4C 38 36 30 43 2D 34 01 00 00 00 48 50 20 20  // BL860C-4HP
0020: 01 00 00 00 04 00 00 00 00 00 00 00 0A FF 14 FF  // 
0030: FF 0A FF FF 14 FF 0A FF FF FF FF 0A  // 


Re: [PATCH v2] mm: Move mem_init_print_info() into mm_init()

2021-03-17 Thread Anatoly Pugachev
On Wed, Mar 17, 2021 at 4:51 AM Kefeng Wang  wrote:
>
> mem_init_print_info() is called in mem_init() on each architecture,
> and pass NULL argument, so using void argument and move it into mm_init().
>
> Acked-by: Dave Hansen 
> Signed-off-by: Kefeng Wang 
> ---
> v2:
> - Cleanup 'str' line suggested by Christophe and ACK

applied patch (5.12.0-rc3-00020-g1df27313f50a-dirty) over linus.git
and tested boot on a sparc64 virtual machine (ldom) - boots.


Re: [PATCH v2] vio: make remove callback return void

2021-02-24 Thread Anatoly Pugachev
On Wed, Feb 24, 2021 at 11:17 AM Uwe Kleine-König  
wrote:
>
> The driver core ignores the return value of struct bus_type::remove()
> because there is only little that can be done. To simplify the quest to
> make this function return void, let struct vio_driver::remove() return
> void, too. All users already unconditionally return 0, this commit makes
> it obvious that returning an error code is a bad idea and makes it
> obvious for future driver authors that returning an error code isn't
> intended.
>
> Note there are two nominally different implementations for a vio bus:
> one in arch/sparc/kernel/vio.c and the other in
> arch/powerpc/platforms/pseries/vio.c. I didn't care to check which
> driver is using which of these busses (or if even some of them can be
> used with both) and simply adapt all drivers and the two bus codes in
> one go.

Applied over current git kernel, boots on my sparc64 LDOM (sunvdc
block driver which uses vio).
Linux ttip 5.11.0-10201-gc03c21ba6f4e-dirty #189 SMP Wed Feb 24
13:48:37 MSK 2021 sparc64 GNU/Linux
boot logs (and kernel config) on [1] for "5.11.0-10201-gc03c21ba6f4e-dirty".
Up to you to add "tested-by".
Thanks.

1. https://github.com/mator/sparc64-dmesg

PS: going to check with ppc64 later as well on LPAR (uses vio).


Re: [PATCH v2] sparc: make copy_thread honor pid namespaces

2021-02-23 Thread Anatoly Pugachev
On Sat, Feb 20, 2021 at 1:51 AM Dmitry V. Levin  wrote:
>
> On sparc, fork and clone syscalls have an unusual semantics of
> returning the pid of the parent process to the child process.
>
> Apparently, the implementation did not honor pid namespaces at all,
> so the child used to get the pid of its parent in the init namespace.
>
> Fortunately, most users of these syscalls are not affected by this bug
> because they use another register to distinguish the parent process
> from its child, and the pid of the parent process is often discarded.
>
> Reproducer:

tested on my sparc64 ldom:

1. non-patched kernel (kernel 5.11.0-03615-g55f62bc87347), reproducer/test run:

$ gcc -Wall -O2 sparc-fork-namespace2.c
$ ./a.out
current: 72544, parent: 69045, fork returned: 72545
current: 72545, parent: 72544, fork returned: 72544
current: 72544, parent: 69045, fork returned: 72546
current: 1, parent: 0, fork returned: 72544

2. kernel patch applied, test run:

$ uname -a
Linux ttip 5.11.0-09279-g7c70f3a7488d-dirty #185 SMP Tue Feb 23
00:50:11 MSK 2021 sparc64 GNU/Linux

$ ./a.out
current: 939, parent: 918, fork returned: 940
current: 940, parent: 939, fork returned: 939
current: 939, parent: 918, fork returned: 941
a.out: wait: 0x9

and console/kernel logs:

[   72.204212] Kernel unaligned access at TPC[4060c8] ret_from_fork+0x1c/0x2c
[   72.204254] Unsupported unaligned load/store trap for kernel at
<004060c8>.
[   72.204267]   \|/  \|/
[   72.204267]   "@'/ .. \`@"
[   72.204267]   /_| \__/ |_\
[   72.204267]  \__U_/
[   72.204284] a.out(941): Kernel does fpu/atomic unaligned load/store. [#3]
[   72.204298] CPU: 6 PID: 941 Comm: a.out Tainted: G  D E
5.11.0-09279-g7c70f3a7488d-dirty #185
[   72.204315] TSTATE: 004411001600 TPC: 004060c8 TNPC:
004060cc Y: 00cfTainted: G  D E
[   72.204330] TPC: 
[   72.204340] g0:  g1:  g2:
0006 g3: 
[   72.204349] g4: fff841482700 g5: fff80021a989 g6:
fff841038000 g7: 030800010804
[   72.204359] o0:  o1: 1fff o2:
fff841482780 o3: 
[   72.204369] o4: 0001 o5:  sp:
fff84103b6a1 ret_pc: 004060b0
[   72.204378] RPC: 
[   72.204387] l0: 030800010800 l1: 0002 l2:
00450cf4 l3: 
[   72.204396] l4: 0264 l5: 011eb9f0 l6:
fff845018000 l7: 006c7840
[   72.204406] i0: 00efcd60 i1: 00450df4 i2:
03dc i3: 03dc
[   72.204415] i4: 00eebc78 i5:  i6:
07feffa56811 i7: 01000ad8
[   72.204424] I7: <0x1000ad8>
[   72.204432] Call Trace:
[   72.204439] Caller[01000ad8]: 0x1000ad8
[   72.204446] Instruction DUMP:
[   72.204449]  0aca0072
[   72.204456]  e059a008
[   72.204461]  e25ba8c7
[   72.204467] <9fc44000>
[   72.204472]  d05ba8cf
[   72.204477]  1068006d
[   72.204483]  90102000
[   72.204488]  0f0011a9
[   72.204493]  10680004
[   72.204499]


So something is actually wrong with the patch.

Thanks.


Re: [PATCH 00/27] arch: syscalls: unifiy all syscalltbl.sh into scripts/syscalltbl.sh

2021-01-28 Thread Anatoly Pugachev
Masahiro,

wanted to test on sparc64, but I'm unable to cleanly apply your patch
series to current master of
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

saved in all patches from mutt MUA to mbox (syscalltbl-mbox) file
format (except of 00/27) and tried to apply via git-am:

$ git desc
v5.11-rc5-40-g76c057c84d28

$ git am < ~/syscalltbl-mbox
Applying: xtensa: syscalls: switch to generic syscalltbl.sh
error: patch failed: arch/xtensa/kernel/syscalls/Makefile:16
error: arch/xtensa/kernel/syscalls/Makefile: patch does not apply
Patch failed at 0001 xtensa: syscalls: switch to generic syscalltbl.sh
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

But if take out body of the first patch (xtensa.patch) out of mbox, it
does cleanly applies via "patch -p1"

Can someone suggest how do i apply this patch series to my local git tree?
Thanks.


Re: [sparc64] running stress-ng and a sparc64 hardware / kernel woes

2021-01-03 Thread Anatoly Pugachev
just to give you another sample:

running stress-ng in ssh session:

stress-ng --opcode 1 --timeout 60 --metrics-brief

get the following on the console:

[  813.208349] Kernel unaligned access at TPC[4cf720] lock_acquire+0x100/0x200
[  813.208378] Unable to handle kernel paging request in mna handler
[  813.208419]  at virtual address 794b00a7d6fbfb37
[  813.208460] current->{active_,}mm->context = 1774
[  813.208483] current->{active_,}mm->pgd = fff84a6cc000
[  813.208506]   \|/  \|/
[  813.208506]   "@'/ .. \`@"
[  813.208506]   /_| \__/ |_\
[  813.208506]  \__U_/
[  813.208555] stress-ng-opcod(5955): Oops [#1]
[  813.208577] CPU: 0 PID: 5955 Comm: stress-ng-opcod Tainted: G
 E 5.11.0-rc1-00073-g3516bd729358 #173
[  813.208618] TSTATE: 80e01602 TPC: 004cf720 TNPC:
004cf724 Y: Tainted: GE
[  813.208659] TPC: 
[  813.208680] g0:  g1: 0001 g2:
4023 g3: 01502400
[  813.208712] g4: fff84a9faf80 g5: 794b00a7d5ede977 g6:
fff84071c000 g7: 
[  813.208744] o0: 0007 o1: 00dd6070 o2:
fff84058bb30 o3: 
[  813.208779] o4: 0034 o5: 000b sp:
fff84058aaf1 ret_pc: 0042aa84
[  813.208812] RPC: 
[  813.208836] l0: 010e11c0 l1: 00edbc78 l2:
0048f2c0 l3: 0020
[  813.208869] l4: 794b00a7d6fbfb37 l5: 000e l6:
fff84071c000 l7: 80001002
[  813.208901] i0: 00f737a8 i1:  i2:
 i3: 0002
[  813.208933] i4: 010e11c0 i5:  i6:
fff84058abc1 i7: 0048f2f0
[  813.208966] I7: 
[  813.208993] Call Trace:
[  813.209008] Disabling lock debugging due to kernel taint
[  813.209016] Instruction DUMP:
[  813.209019]  21004384
[  813.209025]  a01421c0
[  813.209031]  b8100010
[  813.209037] 
[  813.209043]  80a06000
[  813.209049]  1240001d
[  813.209054]  0100
[  813.209060]  c2012874
[  813.209065]  80a06000
[  813.209071]
[  813.209142] CPU[0]: Args were cnt(1) cpulist_pa(34c4a000)
mondo_block_pa(3040d680)
[  813.209160] Kernel panic - not syncing: Unexpected SUN4V mondo error 6
[  813.210744] sun4v_cpu_stop() failed err=6
[  813.211316] Press Stop-A (L1-A) from sun keyboard or send break
[  813.211316] twice on console to return to the boot prom
[  813.211327] ---[ end Kernel panic - not syncing: Unexpected SUN4V
mondo error 6 ]---


[sparc64] running stress-ng and a sparc64 hardware / kernel woes

2021-01-03 Thread Anatoly Pugachev
Hello!

Running a simple stress-ng as a non-privileged (non root) user :

stress-ng --opcode 1 --timeout 60 --metrics-brief

will almost always bring the linux kernel to an unusable state,
starting from "Unable to handle kernel NULL pointer dereference",
"Bogus kernel PC [] in fault handler", "Kernel
unaligned access at TPC", "Unable to handle kernel paging request at
virtual address" and "rcu: INFO: rcu_sched detected stalls on
CPUs/tasks"...

Can you please suggest a basic linux kernel config "debug" option(s)
to start with to try to debug this issue(s) and report kernel logs ?

Thanks.

PS: kernel logs with the last run:

[  144.386901] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[  144.386954] rcu: 0-...!: (3 GPs behind) idle=574/0/0x0
softirq=427/427 fqs=1  (false positive?)
[  144.387029]  (detected by 13, t=5252 jiffies, g=3145, q=224)
[  144.387161]   CPU[  0]: TSTATE[004480001600]
TPC[0042c324] TNPC[0042c328] TASK[swapper/0:0]
[  144.387202]  TPC[arch_cpu_idle+0xa4/0xc0]
O7[arch_cpu_idle+0x90/0xc0] I7[default_idle_call+0xd8/0x1a0]
RPC[do_idle+0x110/0x1a0]
[  144.387278] rcu: rcu_sched kthread starved for 5248 jiffies! g3145
f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=23
[  144.387317] rcu: Unless rcu_sched kthread gets sufficient CPU
time, OOM is now expected behavior.
[  144.387349] rcu: RCU grace-period kthread stack dump:
[  144.387371] task:rcu_sched   state:I stack:0 pid:   10
ppid: 2 flags:0x0700
[  144.387410] Call Trace:
[  144.387425] [<00bf9c4c>] schedule+0x8c/0x100
[  144.387455] [<00bfef2c>] schedule_timeout+0x16c/0x1a0
[  144.387481] [<004f2290>] rcu_gp_fqs_loop+0x1d0/0x5e0
[  144.387508] [<004f5318>] rcu_gp_kthread+0x258/0x2a0
[  144.387534] [<0048c0e0>] kthread+0x100/0x120
[  144.387558] [<004060c8>] ret_from_fork+0x1c/0x2c
[  144.387591] [<>] 0x0
[  165.393918] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[  165.393975] rcu: 23-...0: (1 GPs behind)
idle=16a/1/0x4000 softirq=1365/1366 fqs=1750
[  165.394041]  (detected by 13, t=5252 jiffies, g=3149, q=182)
[  165.394185]   CPU[ 23]: TSTATE[]
TPC[] TNPC[] TASK[NULL:-1]
[  165.394223]  TPC[0] O7[0] I7[0] RPC[0]
[  205.290596] Unable to handle kernel paging request at virtual
address 0190
[  205.290657] tsk->{mm,active_mm}->context = 0b3c
[  205.290683] tsk->{mm,active_mm}->pgd = fff845abc000
[  205.290707]   \|/  \|/
[  205.290707]   "@'/ .. \`@"
[  205.290707]   /_| \__/ |_\
[  205.290707]  \__U_/
[  205.290760] kworker/u512:3(394): Oops [#1]
[  205.290786] CPU: 20 PID: 394 Comm: kworker/u512:3 Tainted: G
E 5.11.0-rc1-00073-g3516bd729358 #172
[  205.290831] Workqueue: events_unbound flush_to_ldisc
[  205.290868] TSTATE: 80e01605 TPC: 0049c0d4 TNPC:
0049c0d8 Y: Tainted: GE
[  205.290911] TPC: 
[  205.290943] g0:  g1: 01900100 g2:
010fbd00 g3: 01100100
[  205.290977] g4: fff83c27d680 g5: fff80021a9c2 g6:
fff83df98000 g7: fff835e58880
[  205.291013] o0: fff83041ca80 o1: 004743d8 o2:
0a20 o3: 0001
[  205.291048] o4: fff83df9b0d8 o5: dfccfb3737fbd15f sp:
fff83df9a841 ret_pc: 0068db94
[  205.291083] RPC: 
[  205.291114] l0: 010e11c0 l1: 000e l2:
00474300 l3: 00de1250
[  205.291149] l4: 00e20ad0 l5: 00edcc00 l6:
fff837482a98 l7: 0114a888
[  205.291184] i0:  i1: 0a20 i2:
fff840443078 i3: 00edc800
[  205.291219] i4: 00edbc78 i5: fff83041ca80 i6:
fff83df9a8f1 i7: 00474c3c
[  205.291253] I7: 
[  205.291279] Call Trace:
[  205.291295] [<00474c3c>] complete_signal+0x5c/0x2e0
[  205.291322] [<004754c4>] __send_signal+0x2c4/0x4a0
[  205.291348] [<00476cd0>] send_signal+0x170/0x180
[  205.291375] [<00478a20>] group_send_sig_info+0xa0/0xe0
[  205.291404] [<00478a98>] __kill_pgrp_info+0x38/0x80
[  205.291430] [<00478b00>] kill_pgrp+0x20/0x40
[  205.291455] [<009a1490>] isig+0x70/0x140
[  205.291485] [<009a1770>] n_tty_receive_signal_char+0x10/0x80
[  205.291514] [<009a2cac>] n_tty_receive_char_special+0xcc/0x6a0
[  205.291544] [<009a3408>] n_tty_receive_buf_fast+0x188/0x220
[  205.291573] [<009a396c>] __receive_buf+0x1cc/0x300
[  205.291600] [<009a3bfc>] n_tty_receive_buf_common+0x15c/0x2e0
[  205.291629] [<009a3d9c>] n_tty_receive_buf2+0x1c/0x40
[  205.291656] [<009a6864>] tty_ldisc_receive_buf+0x24/0x80
[  205.291686] [<009a74b8>] tty_port_default_receive_buf+0x38/0x60
[  205.291716] [<009a6e30>] flush_to_ldisc+0xb0/0x120
[  

Re: [sparc64] ftrace: kernel startup-tests unaligned access

2020-12-14 Thread Anatoly Pugachev
On Mon, Dec 14, 2020 at 7:26 PM Steven Rostedt  wrote:
> On Mon, 14 Dec 2020 11:15:12 -0500 Steven Rostedt  wrote:
>
> > Does sparc64 require 8 byte alignment for 8 byte words?
> >
>
> In other words, does this patch fix anything?
>
> -- Steve
>
> diff --git a/arch/Kconfig b/arch/Kconfig
> index 56b6ccc0e32d..fa716994f77e 100644
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -143,6 +143,22 @@ config UPROBES
> managed by the kernel and kept transparent to the probed
> application. )
>
> +config HAVE_64BIT_ALIGNED_ACCESS
...

Steven,

yes, this patch fully fixes ftrace sparc64 "unaligned access". Thanks!

$ journalctl -b -k --no-hostname -o short-monotonic | grep -c unaligned
0

$ diff -u <(gzip -dc ~/dmesg/config-5.10.0.gz) <(gzip -dc /proc/config.gz)
--- /dev/fd/63  2020-12-14 20:11:10.442415669 +0300
+++ /dev/fd/62  2020-12-14 20:11:10.438415619 +0300
@@ -305,6 +305,7 @@
 CONFIG_JUMP_LABEL=y
 # CONFIG_STATIC_KEYS_SELFTEST is not set
 CONFIG_UPROBES=y
+CONFIG_HAVE_64BIT_ALIGNED_ACCESS=y
 CONFIG_KRETPROBES=y
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
@@ -2842,7 +2843,10 @@
 # CONFIG_TRACEPOINT_BENCHMARK is not set
 # CONFIG_RING_BUFFER_BENCHMARK is not set
 # CONFIG_TRACE_EVAL_MAP_FILE is not set
-# CONFIG_FTRACE_STARTUP_TEST is not set
+CONFIG_FTRACE_SELFTEST=y
+CONFIG_FTRACE_STARTUP_TEST=y
+CONFIG_EVENT_TRACE_STARTUP_TEST=y
+# CONFIG_EVENT_TRACE_TEST_SYSCALLS is not set
 # CONFIG_RING_BUFFER_STARTUP_TEST is not set
 # CONFIG_PREEMPTIRQ_DELAY_TEST is not set
 # CONFIG_KPROBE_EVENT_GEN_TEST is not set


[sparc64] ftrace: kernel startup-tests unaligned access

2020-12-14 Thread Anatoly Pugachev
Hello!

Enabled ftrace startup tests on a sparc64 test VM/LDOM:

$ diff -u <(gzip -dc ~/dmesg/config-5.10.0.gz) <(gzip -dc /proc/config.gz)
--- /dev/fd/63  2020-12-14 16:19:38.239372599 +0300
+++ /dev/fd/62  2020-12-14 16:19:38.235372433 +0300
@@ -2842,7 +2842,10 @@
 # CONFIG_TRACEPOINT_BENCHMARK is not set
 # CONFIG_RING_BUFFER_BENCHMARK is not set
 # CONFIG_TRACE_EVAL_MAP_FILE is not set
-# CONFIG_FTRACE_STARTUP_TEST is not set
+CONFIG_FTRACE_SELFTEST=y
+CONFIG_FTRACE_STARTUP_TEST=y
+CONFIG_EVENT_TRACE_STARTUP_TEST=y
+# CONFIG_EVENT_TRACE_TEST_SYSCALLS is not set
 # CONFIG_RING_BUFFER_STARTUP_TEST is not set
 # CONFIG_PREEMPTIRQ_DELAY_TEST is not set
 # CONFIG_KPROBE_EVENT_GEN_TEST is not set


Got the following results with kernel boot logs:

Dec 14 13:48:15 kernel: clocksource: jiffies: mask: 0x
max_cycles: 0x, max_idle_ns: 764504178510 ns
Dec 14 13:48:15 kernel: futex hash table entries: 65536 (order: 9,
4194304 bytes, linear)
Dec 14 13:48:15 kernel: Running postponed tracer tests:
Dec 14 13:48:15 kernel: Testing tracer function:
Dec 14 13:48:15 kernel: Kernel unaligned access at TPC[552a20]
trace_function+0x40/0x140
Dec 14 13:48:15 kernel: Kernel unaligned access at TPC[552a24]
trace_function+0x44/0x140
Dec 14 13:48:15 kernel: Kernel unaligned access at TPC[552a20]
trace_function+0x40/0x140
Dec 14 13:48:15 kernel: Kernel unaligned access at TPC[552a24]
trace_function+0x44/0x140
Dec 14 13:48:15 kernel: Kernel unaligned access at TPC[552a20]
trace_function+0x40/0x140
Dec 14 13:48:15 kernel: PASSED
Dec 14 13:48:15 kernel: Testing dynamic ftrace: PASSED
...
Dec 14 13:48:15 kernel: Testing event workqueue_execute_end:
Dec 14 13:48:15 kernel: log_unaligned: 194175 callbacks suppressed
Dec 14 13:48:15 kernel: Kernel unaligned access at TPC[47faa4]
trace_event_raw_event_workqueue_execute_end+0x44/0xa0
Dec 14 13:48:15 kernel: Kernel unaligned access at TPC[47fab0]
trace_event_raw_event_workqueue_execute_end+0x50/0xa0
Dec 14 13:48:15 kernel: Kernel unaligned access at TPC[47faa4]
trace_event_raw_event_workqueue_execute_end+0x44/0xa0
Dec 14 13:48:15 kernel: Kernel unaligned access at TPC[47fab0]
trace_event_raw_event_workqueue_execute_end+0x50/0xa0
Dec 14 13:48:15 kernel: Kernel unaligned access at TPC[47faa4]
trace_event_raw_event_workqueue_execute_end+0x44/0xa0
Dec 14 13:48:15 kernel: OK
...
Dec 14 13:48:15 kernel: Testing event sched_waking: OK
Dec 14 13:48:15 kernel: Testing event sched_kthread_stop_ret:
Dec 14 13:48:15 kernel: log_unaligned: 401755 callbacks suppressed
Dec 14 13:48:15 kernel: Kernel unaligned access at TPC[f4c538]
function_test_events_call+0x84/0x188
Dec 14 13:48:15 kernel: Kernel unaligned access at TPC[f4c53c]
function_test_events_call+0x88/0x188
Dec 14 13:48:15 kernel: Kernel unaligned access at TPC[f4c538]
function_test_events_call+0x84/0x188
Dec 14 13:48:15 kernel: Kernel unaligned access at TPC[f4c53c]
function_test_events_call+0x88/0x188
Dec 14 13:48:15 kernel: Kernel unaligned access at TPC[f4c538]
function_test_events_call+0x84/0x188
Dec 14 13:48:15 kernel: OK
Dec 14 13:48:15 kernel: Testing event sched_kthread_stop: OK
...

full log is at  https://gist.github.com/mator/a44eb39d5103aaaea2f1b2f3856c391d

Looking at the most encountered function list in dmesg (journalctl -b
-k) output:

$ zgrep 'Kernel unaligned access at TPC' kernel-ftrace.log.gz | awk
'{print $NF}' | cut -f1 -d'+' | sort  | uniq -c
313 function_test_events_call
  4 trace_event_raw_event_kmem_alloc
  4 trace_event_raw_event_kmem_free
  1 trace_event_raw_event_mm_page
  1 trace_event_raw_event_mm_page_alloc
  2 trace_event_raw_event_rcu_utilization
  5 trace_event_raw_event_sched_switch
  3 trace_event_raw_event_timer_class
  2 trace_event_raw_event_timer_expire_entry
  8 trace_event_raw_event_workqueue_execute_end
  2 trace_event_raw_event_workqueue_execute_start
  5 trace_function

Can someone look for unaligned access at least in
function_test_events_call() to fix it?

Thanks.


Re: [sparc64] current git kernel networking is broken

2020-12-08 Thread Anatoly Pugachev
On Tue, Dec 8, 2020 at 3:42 AM Al Viro  wrote:
>
> On Tue, Dec 08, 2020 at 03:09:47AM +0300, Anatoly Pugachev wrote:
> > Hello!
> >
> > Sorry for the late report, being 5.10-rc7 is out, but current git
> > kernel 
> > (git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git)
> > is broken with the networking. It affects my openvpn tunnel and even
> > internet networking.
> >
> > ping to a local ethernet network (i.e. gateway ping) works, but i
> > cannot download files from the internet.
> > openvpn tunnel does not work.
>
> 
> 
> Could you check if the following typo fix is sufficient for your
> reproducer?
>
> diff --git a/arch/sparc/lib/csum_copy.S b/arch/sparc/lib/csum_copy.S
> index 0c0268e77155..d839956407a7 100644
> --- a/arch/sparc/lib/csum_copy.S
> +++ b/arch/sparc/lib/csum_copy.S
> @@ -71,7 +71,7 @@
>  FUNC_NAME: /* %o0=src, %o1=dst, %o2=len */
> LOAD(prefetch, %o0 + 0x000, #n_reads)
> xor %o0, %o1, %g1
> -   mov 1, %o3
> +   mov -1, %o3
> clr %o4
> andcc   %g1, 0x3, %g0
> bne,pn  %icc, 95f


Thanks Al, this patch fixes networking for me.


Re: [sparc64] current git kernel networking is broken

2020-12-07 Thread Anatoly Pugachev
On Tue, Dec 8, 2020 at 3:09 AM Anatoly Pugachev  wrote:
> bisected kernel to the following commit:
>
> linux-2.6$ git bisect good
> fdf8bee96f9aeaac4559725c2dfae6e1bd7b7043 is the first bad commit

forgot to add, that reverting this commit, fixes networking for me.


[sparc64] current git kernel networking is broken

2020-12-07 Thread Anatoly Pugachev
Hello!

Sorry for the late report, being 5.10-rc7 is out, but current git
kernel (git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git)
is broken with the networking. It affects my openvpn tunnel and even
internet networking.

ping to a local ethernet network (i.e. gateway ping) works, but i
cannot download files from the internet.
openvpn tunnel does not work.

bisected kernel to the following commit:

linux-2.6$ git bisect good
fdf8bee96f9aeaac4559725c2dfae6e1bd7b7043 is the first bad commit
commit fdf8bee96f9aeaac4559725c2dfae6e1bd7b7043
Author: Al Viro 
Date:   Sun Jul 19 18:31:07 2020 -0400

sparc64: propagate the calling convention changes down to
__csum_partial_copy_...()

... and rename them into csum_and_copy_...() - the wrappers become
pointless.
[braino fixed]

Signed-off-by: Al Viro 

 arch/sparc/include/asm/checksum.h|  1 +
 arch/sparc/include/asm/checksum_32.h |  2 --
 arch/sparc/include/asm/checksum_64.h | 41 +++-
 arch/sparc/lib/csum_copy.S   |  5 +++--
 arch/sparc/lib/csum_copy_from_user.S |  4 ++--
 arch/sparc/lib/csum_copy_to_user.S   |  4 ++--
 6 files changed, 11 insertions(+), 46 deletions(-)



full git bisect log:

$ git bisect log
git bisect start
# bad: [0477e92881850d44910a7e94fc2c46f96faa131f] Linux 5.10-rc7
git bisect bad 0477e92881850d44910a7e94fc2c46f96faa131f
# good: [bbf5c979011a099af5dc76498918ed7df445635b] Linux 5.9
git bisect good bbf5c979011a099af5dc76498918ed7df445635b
# bad: [4d0e9df5e43dba52d38b251e3b909df8fa1110be] lib, uaccess: add
failure injection to usercopy functions
git bisect bad 4d0e9df5e43dba52d38b251e3b909df8fa1110be
# bad: [f888bdf9823c85fe945c4eb3ba353f749dec3856] Merge tag
'devicetree-for-5.10' of
git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
git bisect bad f888bdf9823c85fe945c4eb3ba353f749dec3856
# bad: [57218d7f2e87069f73c7a841b6ed6c1cc7acf616] Merge tag
'regmap-v5.10' of
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
git bisect bad 57218d7f2e87069f73c7a841b6ed6c1cc7acf616
# bad: [39a5101f989e8d2be557136704d53990f9b402c8] Merge branch 'linus'
of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
git bisect bad 39a5101f989e8d2be557136704d53990f9b402c8
# good: [ed016af52ee3035b4799ebd7d53f9ae59d5782c4] Merge tag
'locking-core-2020-10-12' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect good ed016af52ee3035b4799ebd7d53f9ae59d5782c4
# good: [50d228345a03c882dfe11928ab41b42458b3f922] Merge tag
'docs-5.10' of git://git.lwn.net/linux
git bisect good 50d228345a03c882dfe11928ab41b42458b3f922
# good: [0f5e8323777bfc1c1d2cba71242db6a361de03b6] crypto:
arm/sha512-neon - avoid ADRL pseudo instruction
git bisect good 0f5e8323777bfc1c1d2cba71242db6a361de03b6
# good: [c2fb644638ae45cc4a34aa51a18d687d4781f8a1] hwrng: npcm -
modify readl to readb
git bisect good c2fb644638ae45cc4a34aa51a18d687d4781f8a1
# bad: [85ed13e78dbedf9433115a62c85429922bc5035c] Merge branch
'work.iov_iter' of
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
git bisect bad 85ed13e78dbedf9433115a62c85429922bc5035c
# good: [1cd95ab85df730b140156baac92fd2640290a5e5] mips: propagate the
calling convention change down into __csum_partial_copy_..._user()
git bisect good 1cd95ab85df730b140156baac92fd2640290a5e5
# good: [598b3cec831fd6ccb3cbe4919a722e868c6364a8] fs: remove
compat_sys_vmsplice
git bisect good 598b3cec831fd6ccb3cbe4919a722e868c6364a8
# bad: [70d65cd555c5e43c613700f604a47f7ebcf7b6f1] ppc: propagate the
calling conventions change down to csum_partial_copy_generic()
git bisect bad 70d65cd555c5e43c613700f604a47f7ebcf7b6f1
# bad: [fdf8bee96f9aeaac4559725c2dfae6e1bd7b7043] sparc64: propagate
the calling convention changes down to __csum_partial_copy_...()
git bisect bad fdf8bee96f9aeaac4559725c2dfae6e1bd7b7043
# good: [2a5d2bd159f33ef34484ee14705dcf8634061f2c] xtensa: propagate
the calling conventions change down into csum_partial_copy_generic()
git bisect good 2a5d2bd159f33ef34484ee14705dcf8634061f2c
# first bad commit: [fdf8bee96f9aeaac4559725c2dfae6e1bd7b7043]
sparc64: propagate the calling convention changes down to
__csum_partial_copy_...()


Re: possible lockdep regression introduced by 4d004099a668 ("lockdep: Fix lockdep recursion")

2020-10-27 Thread Anatoly Pugachev
On Mon, Oct 26, 2020 at 6:23 PM Peter Zijlstra  wrote:
> On Mon, Oct 26, 2020 at 01:55:24PM +0100, Peter Zijlstra wrote:
> > On Mon, Oct 26, 2020 at 11:56:03AM +, Filipe Manana wrote:
> > > > That smells like the same issue reported here:
> > > >
> > > >   
> > > > https://lkml.kernel.org/r/20201022111700.gz2...@hirez.programming.kicks-ass.net
> > > >
> > > > Make sure you have commit:
> > > >
> > > >   f8e48a3dca06 ("lockdep: Fix preemption WARN for spurious IRQ-enable")
> > > >
> > > > (in Linus' tree by now) and do you have CONFIG_DEBUG_PREEMPT enabled?
> > >
> > > Yes, CONFIG_DEBUG_PREEMPT is enabled.
> >
> > Bummer :/
> >
> > > I'll try with that commit and let you know, however it's gonna take a
> > > few hours to build a kernel and run all fstests (on that test box it
> > > takes over 3 hours) to confirm that fixes the issue.
> >
> > *ouch*, 3 hours is painful. How long to make it sick with the current
> > kernel? quicker I would hope?
> >
> > > Thanks for the quick reply!
> >
> > Anyway, I don't think that commit can actually explain the issue :/
> >
> > The false positive on lockdep_assert_held() happens when the recursion
> > count is !0, however we _should_ be having IRQs disabled when
> > lockdep_recursion > 0, so that should never be observable.
> >
> > My hope was that DEBUG_PREEMPT would trigger on one of the
> > __this_cpu_{inc,dec}(lockdep_recursion) instance, because that would
> > then be a clear violation.
> >
> > And you're seeing this on x86, right?
> >
> > Let me puzzle moar..
>
> So I might have an explanation for the Sparc64 fail, but that can't
> explain x86 :/
>
> I initially thought raw_cpu_read() was OK, since if it is !0 we have
> IRQs disabled and can't get migrated, so if we get migrated both CPUs
> must have 0 and it doesn't matter which 0 we read.
>
> And while that is true; it isn't the whole store, on pretty much all
> architectures (except x86) this can result in computing the address for
> one CPU, getting migrated, the old CPU continuing execution with another
> task (possibly setting recursion) and then the new CPU reading the value
> of the old CPU, which is no longer 0.
>
> I already fixed a bunch of that in:
>
>   baffd723e44d ("lockdep: Revert "lockdep: Use raw_cpu_*() for per-cpu 
> variables"")
>
> but clearly this one got crossed.
>
> Still, that leaves me puzzled over you seeing this on x86 :/
>
> Anatoly, could you try linus+tip/locking/urgent and the below on your
> Sparc, please?

Peter,
let me test first. Thanks.

PS: sorry for the delay, a weekend and got ill a bit ...


[sparc64] lockdep: Fix lockdep recursion - call trace

2020-10-22 Thread Anatoly Pugachev
Hello!

Bisected the following linux calltrace after v5.9 :

[8.650198] systemd[1]: Started Journal Service.
[9.028125] [ cut here ]
[9.028171] WARNING: CPU: 11 PID: 499 at
net/netfilter/nf_tables_api.c:622 nft_chain_parse_hook+0x7c/0x360
[nf_tables]
[9.028185] Modules linked in: nf_tables nfnetlink sunrpc ip_tables
x_tables ipv6 crc_ccitt autofs4 ext4 crc16 mbcache jbd2 raid10 raid456
async_raid6_recov async_mem
cpy async_pq async_xor xor async_tx raid6_pq raid1 raid0 multipath
linear md_mod crc32c_sparc64
[9.028243] CPU: 11 PID: 499 Comm: nft Tainted: GW
5.9.0-rc8-00209-gbaffd723e44d #111
[9.028255] Call Trace:
[9.028269] [<004727e8>] __warn+0xa8/0x120
[9.028278] [<00472c20>] warn_slowpath_fmt+0x34/0x74
[9.028291] [<100c19fc>] nft_chain_parse_hook+0x7c/0x360 [nf_tables]
[9.028305] [<100c4ca8>]
nf_tables_addchain.constprop.0+0x48/0x5a0 [nf_tables]
[9.028320] [<100c5908>] nf_tables_newchain+0x708/0x820 [nf_tables]
[9.028331] [<100ae9c4>] nfnetlink_rcv_batch+0x4a4/0x780 [nfnetlink]
[9.028341] [<100aedb0>] nfnetlink_rcv+0x110/0x140 [nfnetlink]
[9.028353] [<00b2acb0>] netlink_unicast+0x150/0x2a0
[9.028362] [<00b2bc1c>] netlink_sendmsg+0x3dc/0x460
[9.028374] [<00a96f14>] sock_sendmsg+0x34/0x80
[9.028382] [<00a985ec>] sys_sendmsg+0x1ac/0x220
[9.028392] [<00a9a688>] ___sys_sendmsg+0x48/0x80
[9.028400] [<00a9a768>] __sys_sendmsg+0x48/0x80
[9.028409] [<00a9a7b8>] sys_sendmsg+0x18/0x40
[9.028419] [<004062b4>] linux_sparc_syscall+0x34/0x44
[9.028428] irq event stamp: 0
[9.028437] hardirqs last  enabled at (0): [<>] 0x0
[9.028447] hardirqs last disabled at (0): [<004703f8>]
copy_process+0x738/0x1840
[9.028459] softirqs last  enabled at (0): [<004703f8>]
copy_process+0x738/0x1840
[9.028470] softirqs last disabled at (0): [<>] 0x0
[9.028479] ---[ end trace 87e5247a47db0aa8 ]---
[   10.691838] sha1_sparc64: Using sparc64 sha1 opcode optimized SHA-1
implementation


git commit id:

$ git bisect good
4d004099a668c41522242aa146a38cc4eb59cb1e is the first bad commit
commit 4d004099a668c41522242aa146a38cc4eb59cb1e
Author: Peter Zijlstra 
Date:   Fri Oct 2 11:04:21 2020 +0200

lockdep: Fix lockdep recursion

Steve reported that lockdep_assert*irq*(), when nested inside lockdep
itself, will trigger a false-positive.

One example is the stack-trace code, as called from inside lockdep,
triggering tracing, which in turn calls RCU, which then uses
lockdep_assert_irqs_disabled().

Fixes: a21ee6055c30 ("lockdep: Change hardirq{s_enabled,_context}
to per-cpu variables")
Reported-by: Steven Rostedt 
Signed-off-by: Peter Zijlstra (Intel) 
Signed-off-by: Ingo Molnar 

 include/linux/lockdep.h  | 13 ---
 kernel/locking/lockdep.c | 99 +---
 2 files changed, 67 insertions(+), 45 deletions(-)



full bisect log:


$ git bisect log
git bisect start
# bad: [7cf726a59435301046250c42131554d9ccc566b8] Merge tag
'linux-kselftest-kunit-5.10-rc1' of
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
git bisect bad 7cf726a59435301046250c42131554d9ccc566b8
# good: [bbf5c979011a099af5dc76498918ed7df445635b] Linux 5.9
git bisect good bbf5c979011a099af5dc76498918ed7df445635b
# bad: [726eb70e0d34dc4bc4dada71f52bba8ed638431e] Merge tag
'char-misc-5.10-rc1' of
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
git bisect bad 726eb70e0d34dc4bc4dada71f52bba8ed638431e
# bad: [527f6750d92beb9c787d8aba48477b1e834d64e5] kasan: remove
mentions of unsupported Clang versions
git bisect bad 527f6750d92beb9c787d8aba48477b1e834d64e5
# bad: [647412daeb454b6dad12a6c6961ab90aac9e5d29] Merge tag
'mmc-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
git bisect bad 647412daeb454b6dad12a6c6961ab90aac9e5d29
# bad: [3bff6112c80cecb76af5fe485506f96e8adb6122] Merge tag
'perf-core-2020-10-12' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect bad 3bff6112c80cecb76af5fe485506f96e8adb6122
# good: [f5f59336a9ae8f683772d6b8cb2d6732b5e567ea] Merge tag
'timers-core-2020-10-12' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect good f5f59336a9ae8f683772d6b8cb2d6732b5e567ea
# good: [edaa5ddf3833669a25654d42c0fb653dfdd906df] Merge tag
'sched-core-2020-10-12' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect good edaa5ddf3833669a25654d42c0fb653dfdd906df
# bad: [e6412f9833db23740ee848ab3d6e7af18dff82a6] Merge tag
'efi-core-2020-10-12' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect bad e6412f9833db23740ee848ab3d6e7af18dff82a6
# bad: [e705d397965811ac528d7213b42d74ffe43caf38] Merge branch
'locking/urgent' into locking/core, to pick up fixes
git bisect bad 

Re: [PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race

2020-09-14 Thread Anatoly Pugachev
On Mon, Sep 14, 2020 at 10:00 AM Nicholas Piggin  wrote:
>
> Excerpts from Nicholas Piggin's message of September 14, 2020 2:52 pm:
>
> [...]
>
> > The basic fix for sparc64 is to remove its mm_cpumask clearing code. The
> > optimisation could be effectively restored by sending IPIs to mm_cpumask
> > members and having them remove themselves from mm_cpumask. This is more
> > tricky so I leave it as an exercise for someone with a sparc64 SMP.
> > powerpc has a (currently similarly broken) example.
>
> So this compiles and boots on qemu, but qemu does not support any
> sparc64 machines with SMP. Attempting some simple hacks doesn't get
> me far because openbios isn't populating an SMP device tree, which
> blows up everywhere.
>
> The patch is _relatively_ simple, hopefully it shouldn't explode, so
> it's probably ready for testing on real SMP hardware, if someone has
> a few cycles.

Nick,

applied this patch to over 'v5.9-rc5' tag , used my test VM (ldom)
with 32 vcpus.
Machine boot, stress-ng test ( run as
"stress-ng --cpu 8 --io 8 --vm 8 --vm-bytes 2G --fork 8 --timeout 15m" )
finishes without errors.


[sparc64] kernel OOPS bisected from "lockdep: improve current->(hard|soft)irqs_enabled synchronisation with actual irq state"

2020-09-10 Thread Anatoly Pugachev
Hello!

The following git patch 044d0d6de9f50192f9697583504a382347ee95ca
(linux git master branch) introduced the following kernel OOPS upon
kernel boot on my sparc64 T5-2 ldom (VM):

$ uname -a
Linux ttip 5.9.0-rc2-00011-g044d0d6de9f5 #59 SMP Thu Sep 10 13:07:45
MSK 2020 sparc64 GNU/Linux

(OOPS is from the latest tag, but the same on commit above)
...
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
[ cut here ]
WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:4875 check_flags+0x9c/0x2c0
DEBUG_LOCKS_WARN_ON(lockdep_hardirqs_enabled())
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.9.0-rc4 #36
Call Trace:
[<004727a8>] __warn+0xa8/0x120
[<00472c10>] warn_slowpath_fmt+0x64/0x74
[<004e859c>] check_flags+0x9c/0x2c0
[<00c17ca0>] lock_is_held_type+0x20/0x140
[<005095f4>] rcu_read_lock_sched_held+0x54/0xa0
[<004ed4c0>] lock_acquire+0x120/0x480
[<00c21610>] _raw_spin_lock+0x30/0x60
[<009b9bdc>] p1275_cmd_direct+0x1c/0x60
[<009b9ab0>] prom_startcpu_cpuid+0x30/0x40
[<004427e4>] __cpu_up+0x184/0x3a0
[<00474600>] bringup_cpu+0x20/0x120
[<0047378c>] cpuhp_invoke_callback+0xec/0x340
[<004753d4>] cpu_up+0x154/0x220
[<00475c60>] bringup_nonboot_cpus+0x60/0xa0
[<00fbc338>] smp_init+0x28/0xa0
[<00fad3b4>] kernel_init_freeable+0x18c/0x300
irq event stamp: 5135
hardirqs last  enabled at (5135): [<00c21a28>]
_raw_spin_unlock_irqrestore+0x28/0x60
hardirqs last disabled at (5134): [<00c217e0>]
_raw_spin_lock_irqsave+0x20/0x80
softirqs last  enabled at (1474): [<00c245a0>] __do_softirq+0x4e0/0x560
softirqs last disabled at (1467): [<0042d394>]
do_softirq_own_stack+0x34/0x60
random: get_random_bytes called from __warn+0xc8/0x120 with crng_init=0
---[ end trace 4cf960ae85148e2e ]---
possible reason: unannotated irqs-off.
irq event stamp: 5135
hardirqs last  enabled at (5135): [<00c21a28>]
_raw_spin_unlock_irqrestore+0x28/0x60
hardirqs last disabled at (5134): [<00c217e0>]
_raw_spin_lock_irqsave+0x20/0x80
softirqs last  enabled at (1474): [<00c245a0>] __do_softirq+0x4e0/0x560
softirqs last disabled at (1467): [<0042d394>]
do_softirq_own_stack+0x34/0x60
smp: Brought up 1 node, 32 CPUs
devtmpfs: initialized
...

full boot log in [1], kernel config in [2]

linux-2.6$ git bisect log
git bisect start
# good: [d012a7190fc1fd72ed48911e77ca97ba4521bccd] Linux 5.9-rc2
git bisect good d012a7190fc1fd72ed48911e77ca97ba4521bccd
# bad: [34d4ddd359dbcdf6c5fb3f85a179243d7a1cb7f8] Merge tag
'linux-kselftest-5.9-rc5' of
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
git bisect bad 34d4ddd359dbcdf6c5fb3f85a179243d7a1cb7f8
# bad: [e1d0126ca3a66c284a02b083a42e2b39558002cd] Merge tag
'xfs-5.9-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
git bisect bad e1d0126ca3a66c284a02b083a42e2b39558002cd
# good: [24148d8648e37f8c15bedddfa50d14a31a0582c5] Merge tag
'io_uring-5.9-2020-08-28' of git://git.kernel.dk/linux-block
git bisect good 24148d8648e37f8c15bedddfa50d14a31a0582c5
# bad: [b69bea8a657b681442765b06be92a2607b1bd875] Merge tag
'locking-urgent-2020-08-30' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect bad b69bea8a657b681442765b06be92a2607b1bd875
# good: [20934c0de13b49a072fb1e0ca79fe0fe0e40eae5] usb: storage: Add
unusual_uas entry for Sony PSZ drives
git bisect good 20934c0de13b49a072fb1e0ca79fe0fe0e40eae5
# good: [c4011283a7d5d64a50991dd3baa9acdf3d49092c] Merge tag
'dma-mapping-5.9-2' of git://git.infradead.org/users/hch/dma-mapping
git bisect good c4011283a7d5d64a50991dd3baa9acdf3d49092c
# good: [8bb5021cc2ee5d5dd129a9f2f5ad2bb76eea297d] Merge tag
'powerpc-5.9-4' of
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect good 8bb5021cc2ee5d5dd129a9f2f5ad2bb76eea297d
# good: [00b0ed2d4997af6d0a93edef820386951fd66d94] locking/lockdep: Cleanup
git bisect good 00b0ed2d4997af6d0a93edef820386951fd66d94
# bad: [044d0d6de9f50192f9697583504a382347ee95ca] lockdep: Only trace IRQ edges
git bisect bad 044d0d6de9f50192f9697583504a382347ee95ca
# good: [021c109330ebc1f54b546c63a078ea3c31356ecb] arm64: Implement
arch_irqs_disabled()
git bisect good 021c109330ebc1f54b546c63a078ea3c31356ecb
# good: [99dc56feb7932020502d40107a712fa302b32082] mips: Implement
arch_irqs_disabled()
git bisect good 99dc56feb7932020502d40107a712fa302b32082
# first bad commit: [044d0d6de9f50192f9697583504a382347ee95ca]
lockdep: Only trace IRQ edges


1. https://github.com/mator/sparc64-dmesg/blob/master/dmesg-5.9.0-rc4
2. https://github.com/mator/sparc64-dmesg/blob/master/config-5.9.0-rc4.gz


Re: [sparc64] kernel OOPS bisected from "lockdep: improve current->(hard|soft)irqs_enabled synchronisation with actual irq state"

2020-09-10 Thread Anatoly Pugachev
On Thu, Sep 10, 2020 at 4:40 PM  wrote:
>
> On Thu, Sep 10, 2020 at 02:43:13PM +0300, Anatoly Pugachev wrote:
> > Hello!
> >
> > The following git patch 044d0d6de9f50192f9697583504a382347ee95ca
> > (linux git master branch) introduced the following kernel OOPS upon
> > kernel boot on my sparc64 T5-2 ldom (VM):
>
> https://lkml.kernel.org/r/20200908154157.gv1362...@hirez.programming.kicks-ass.net

Peter, thanks!

That fixes the issue for me.


Re: [sparc64] enabling CONFIG_PROVE_LOCKING makes kernel unable to build

2020-08-10 Thread Anatoly Pugachev
On Tue, Aug 4, 2020 at 4:34 PM  wrote:
>
> On Tue, Aug 04, 2020 at 04:17:16PM +0300, Anatoly Pugachev wrote:
> > Hello!
> >
> > Linus git master sources:
> >
> > $ git desc
> > v5.8-2483-gc0842fbc1b18
> >
>
> Ooh, it looks like that series wasn't cut back far enough :/
>
> 859247d39fb0 ("seqlock: lockdep assert non-preemptibility on seqcount_t
> write") does indeed also introduce problems.
>
> I've been working on untangling the header mess for the full series and
> the below patch is what I currently have.
>
> ---
> Subject: seqlock,headers: Untangle the spaghetti monster
> From: Peter Zijlstra 
> Date: Thu Jul 30 13:20:47 CEST 2020
>
> By using lockdep_assert_*() from seqlock.h, the spaghetti monster
> attacked.

Thanks Peter!

It doesn't apply cleanly over master git, but it least makes kernel
compilable / bootable on sparc64:

linux-2.6$ git desc
v5.8-11991-gfc80c51fd4b2

linux-2.6$ patch -p1 < ~/headers.patch
patching file arch/ia64/include/asm/smp.h
patching file arch/ia64/include/asm/xtp.h
patching file arch/ia64/kernel/iosapic.c
patching file arch/ia64/kernel/irq.c
patching file arch/ia64/kernel/process.c
Hunk #1 succeeded at 47 (offset -1 lines).
patching file arch/ia64/kernel/sal.c
patching file arch/ia64/kernel/setup.c
patching file arch/ia64/kernel/smp.c
Hunk #1 succeeded at 45 (offset -1 lines).
patching file arch/parisc/include/asm/timex.h
patching file arch/sh/include/asm/io.h
patching file arch/sh/kernel/machvec.c
patching file arch/sparc/include/asm/timer_64.h
patching file arch/sparc/include/asm/vvar.h
patching file arch/sparc/kernel/vdso.c
patching file arch/x86/include/asm/fixmap.h
patching file arch/x86/kernel/apic/apic_noop.c
patching file arch/x86/kernel/apic/hw_nmi.c
patching file arch/x86/kernel/apic/probe_64.c
patching file arch/x86/kernel/cpu/amd.c
patching file arch/x86/kernel/cpu/common.c
patching file arch/x86/kernel/cpu/hygon.c
patching file arch/x86/kernel/cpu/intel.c
patching file arch/x86/kernel/jailhouse.c
patching file arch/x86/kernel/tsc_msr.c
patching file arch/x86/mm/init_32.c
patching file arch/x86/xen/apic.c
patching file arch/x86/xen/smp_hvm.c
patching file arch/x86/xen/suspend_pv.c
patching file include/linux/dynamic_queue_limits.h
patching file include/linux/hrtimer.h
patching file include/linux/ktime.h
patching file include/linux/lockdep.h
patching file include/linux/mutex.h
patching file include/linux/sched.h
patching file include/linux/seqlock.h
Hunk #1 FAILED at 19.
1 out of 1 hunk FAILED -- saving rejects to file include/linux/seqlock.h.rej
patching file include/linux/time.h
patching file include/linux/videodev2.h
patching file include/linux/ww_mutex.h
mator@ttip:~/linux-2.6$ make -j arch/sparc
  UPD include/config/kernel.release
  UPD include/generated/utsrelease.h
  CALLscripts/atomic/check-atomics.sh
  CC  arch/sparc/kernel/asm-offsets.s
  CALLscripts/checksyscalls.sh
:1511:2: warning: #warning syscall clone3 not implemented [-Wcpp]
  CC  arch/sparc/math-emu/math_64.o
  CC  arch/sparc/net/bpf_jit_comp_64.o
  CC  arch/sparc/mm/tlb.o
  CC  arch/sparc/mm/tsb.o
  CC  arch/sparc/vdso/vclock_gettime.o
  CC  arch/sparc/mm/fault_64.o
  CC  arch/sparc/mm/init_64.o
  CC  arch/sparc/mm/hugetlbpage.o
  CC  arch/sparc/vdso/vma.o
  CC  arch/sparc/vdso/vdso32/vclock_gettime.o
  CC  arch/sparc/crypto/aes_glue.o
  CC  arch/sparc/crypto/des_glue.o
  CC  arch/sparc/crypto/camellia_glue.o
  CC [M]  arch/sparc/crypto/sha1_glue.o
  CC [M]  arch/sparc/crypto/sha256_glue.o
  CC [M]  arch/sparc/crypto/sha512_glue.o
  CC [M]  arch/sparc/crypto/md5_glue.o
  CC [M]  arch/sparc/crypto/crc32c_glue.o
  VDSOarch/sparc/vdso/vdso64.so.dbg
  CC  arch/sparc/kernel/traps_64.o
  CC  arch/sparc/kernel/irq_64.o
  CC  arch/sparc/kernel/process_64.o
  CC  arch/sparc/kernel/process.o
  CC  arch/sparc/kernel/signal_64.o
  CC  arch/sparc/kernel/sigutil_64.o
  OBJCOPY arch/sparc/vdso/vdso64.so
  CC  arch/sparc/kernel/setup_64.o
  CC  arch/sparc/kernel/idprom.o
  CC  arch/sparc/kernel/sys_sparc_64.o
  VDSO2C  arch/sparc/vdso/vdso-image-64.c
  CC  arch/sparc/kernel/time_64.o
  CC  arch/sparc/kernel/cpu.o
  CC  arch/sparc/kernel/vdso.o
  CC  arch/sparc/vdso/vdso-image-64.o
  CC  arch/sparc/kernel/ptrace_64.o
  CC  arch/sparc/kernel/unaligned_64.o
  CC  arch/sparc/kernel/prom_common.o
  CC  arch/sparc/kernel/prom_64.o
  CC  arch/sparc/kernel/of_device_common.o
  CC  arch/sparc/kernel/of_device_64.o
  CC  arch/sparc/kernel/prom_irqtrans.o
  CC  arch/sparc/kernel/reboot.o
  CC  arch/sparc/kernel/sysfs.o
  CC  arch/sparc/kernel/iommu.o
  CC  arch/sparc/kernel/iommu-common.o
  CC  arch/sparc/kernel/central.o
  CC  arch/sparc/kernel/starfire.o
  CC  arch/sparc/kernel/power.o
  CC  arch/sparc/kernel/sbus.o
  CC

[sparc64] enabling CONFIG_PROVE_LOCKING makes kernel unable to build

2020-08-04 Thread Anatoly Pugachev
Hello!

Linus git master sources:

$ git desc
v5.8-2483-gc0842fbc1b18

If built without "kernel debugging" option CONFIG_PROVE_LOCKING
enabled, builds successfully.

If I enable
CONFIG_PROVE_LOCKING=y

it does not build:

linux-2.6$ make  arch/sparc
scripts/kconfig/conf  --syncconfig Kconfig

WARNING: unmet direct dependencies detected for FRAME_POINTER
  Depends on [n]: DEBUG_KERNEL [=y] && (M68K || UML || SUPERH) ||
ARCH_WANT_FRAME_POINTERS [=n] || MCOUNT [=n]
  Selected by [y]:
  - LOCKDEP [=y] && DEBUG_KERNEL [=y] && LOCK_DEBUGGING_SUPPORT [=y]
&& !MIPS && !PPC && !ARM && !S390 && !MICROBLAZE && !ARC && !X86

WARNING: unmet direct dependencies detected for FRAME_POINTER
  Depends on [n]: DEBUG_KERNEL [=y] && (M68K || UML || SUPERH) ||
ARCH_WANT_FRAME_POINTERS [=n] || MCOUNT [=n]
  Selected by [y]:
  - LOCKDEP [=y] && DEBUG_KERNEL [=y] && LOCK_DEBUGGING_SUPPORT [=y]
&& !MIPS && !PPC && !ARM && !S390 && !MICROBLAZE && !ARC && !X86

WARNING: unmet direct dependencies detected for FRAME_POINTER
  Depends on [n]: DEBUG_KERNEL [=y] && (M68K || UML || SUPERH) ||
ARCH_WANT_FRAME_POINTERS [=n] || MCOUNT [=n]
  Selected by [y]:
  - LOCKDEP [=y] && DEBUG_KERNEL [=y] && LOCK_DEBUGGING_SUPPORT [=y]
&& !MIPS && !PPC && !ARM && !S390 && !MICROBLAZE && !ARC && !X86

  CALLscripts/checksyscalls.sh
:1511:2: warning: #warning syscall clone3 not implemented [-Wcpp]
  CALLscripts/atomic/check-atomics.sh
  CC  arch/sparc/vdso/vclock_gettime.o
In file included from ./arch/sparc/include/asm/bug.h:25,
 from ./include/linux/bug.h:5,
 from ./include/linux/thread_info.h:12,
 from ./include/asm-generic/preempt.h:5,
 from ./arch/sparc/include/generated/asm/preempt.h:1,
 from ./include/linux/preempt.h:78,
 from ./include/linux/spinlock.h:51,
 from ./include/linux/seqlock.h:15,
 from ./include/linux/time.h:6,
 from arch/sparc/vdso/vclock_gettime.c:16:
./include/linux/seqlock.h: In function ‘write_seqcount_begin_nested’:
./arch/sparc/include/asm/percpu_64.h:19:25: error:
‘__local_per_cpu_offset’ undeclared (first use in this function); did
you mean ‘per_cpu_offset’?
   19 | #define __my_cpu_offset __local_per_cpu_offset
  | ^~
./include/asm-generic/bug.h:145:27: note: in definition of macro ‘WARN_ON_ONCE’
  145 |  int __ret_warn_once = !!(condition);   \
  |   ^
././include/linux/compiler_types.h:301:2: note: in expansion of macro
‘__compiletime_assert’
  301 |  __compiletime_assert(condition, msg, prefix, suffix)
  |  ^~~~
././include/linux/compiler_types.h:313:2: note: in expansion of macro
‘_compiletime_assert’
  313 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
  |  ^~~
./include/asm-generic/rwonce.h:36:2: note: in expansion of macro
‘compiletime_assert’
   36 |  compiletime_assert(__native_word(t) || sizeof(t) ==
sizeof(long long), \
  |  ^~
./include/asm-generic/rwonce.h:36:21: note: in expansion of macro
‘__native_word’
   36 |  compiletime_assert(__native_word(t) || sizeof(t) ==
sizeof(long long), \
  | ^
./include/asm-generic/rwonce.h:49:2: note: in expansion of macro
‘compiletime_assert_rwonce_type’
   49 |  compiletime_assert_rwonce_type(x);\
  |  ^~
./include/asm-generic/percpu.h:119:10: note: in expansion of macro ‘READ_ONCE’
  119 |  __ret = READ_ONCE(*raw_cpu_ptr(&(pcp)));   \
  |  ^
./include/linux/percpu-defs.h:231:2: note: in expansion of macro ‘RELOC_HIDE’
  231 |  RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset))
  |  ^~
./include/asm-generic/percpu.h:44:31: note: in expansion of macro
‘SHIFT_PERCPU_PTR’
   44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
  |   ^~~~
./include/asm-generic/percpu.h:44:53: note: in expansion of macro
‘__my_cpu_offset’
   44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
  | ^~~
./include/linux/percpu-defs.h:242:2: note: in expansion of macro
‘arch_raw_cpu_ptr’
  242 |  arch_raw_cpu_ptr(ptr);  \
  |  ^~~~
./include/asm-generic/percpu.h:119:21: note: in expansion of macro ‘raw_cpu_ptr’
  119 |  __ret = READ_ONCE(*raw_cpu_ptr(&(pcp)));   \
  | ^~~
./include/asm-generic/percpu.h:138:11: note: in expansion of macro
‘__this_cpu_generic_read_nopreempt’
  138 |   __ret = __this_cpu_generic_read_nopreempt(pcp);  \
  |   ^
./include/asm-generic/percpu.h:320:31: note: in expansion of macro
‘this_cpu_generic_read’
  320 | #define this_cpu_read_1(pcp)  this_cpu_generic_read(pcp)
  |

Re: [sparc64] unable to build v5.8 / master on sparc64 , bisect attached

2020-08-03 Thread Anatoly Pugachev
On Mon, Aug 3, 2020 at 12:24 PM John Paul Adrian Glaubitz
 wrote:
>
> Hi Anatoly!
>
> On 8/3/20 11:18 AM, Anatoly Pugachev wrote:
> > # bad: [bcf876870b95592b52519ed4aafcf9d95999bc9c] Linux 5.8
> > git bisect bad bcf876870b95592b52519ed4aafcf9d95999bc9c
> > # good: [92ed301919932f13b9172e525674157e983d] Linux 5.8-rc7
> > git bisect good 92ed301919932f13b9172e525674157e983d
> > # bad: [0ae3495b6502cf93634cbd027cb2f6f9f83a406f] Merge tag
> > 'for-linus-2020-08-01' of
> > git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux
> > git bisect bad 0ae3495b6502cf93634cbd027cb2f6f9f83a406f
> > # bad: [aa54ea903abb02303bf55855fb51e3fcee135d70] ARM: percpu.h: fix build 
> > error
> > git bisect bad aa54ea903abb02303bf55855fb51e3fcee135d70
> > # good: [c2f3850df7f95537e79c561f7be49df2e4ad8060] Merge tag
> > 'drm-fixes-2020-07-29' of git://anongit.freedesktop.org/drm/drm into
> > master
> > git bisect good c2f3850df7f95537e79c561f7be49df2e4ad8060
> > # bad: [0513b9d75c07cbcdfda3778b636d3d131d679eb1] Merge tag
> > 'io_uring-5.8-2020-07-30' of git://git.kernel.dk/linux-block
> > git bisect bad 0513b9d75c07cbcdfda3778b636d3d131d679eb1
> > # good: [d3590ebf6f91350192737dd1d1b219c05277f067] Merge tag
> > 'audit-pr-20200729' of
> > git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit
> > git bisect good d3590ebf6f91350192737dd1d1b219c05277f067
> > # good: [4ae6dbd683860b9edc254ea8acf5e04b5ae242e5] io_uring: fix
> > lockup in io_fail_links()
> > git bisect good 4ae6dbd683860b9edc254ea8acf5e04b5ae242e5
> > # bad: [1c9df907da83812e4f33b59d3d142c864d9da57f] random: fix circular
> > include dependency on arm64 after addition of percpu.h
> > git bisect bad 1c9df907da83812e4f33b59d3d142c864d9da57f
>
> Did you find the offending commit?

the last one v5.8-rc7-41-g1c9df907da83 ? In commit log it tells about
"x86_64, arm64, arm, and mips" and nothing about sparc,
probably forgotten, i'm not an expert , but the following code change
fixes kernel compilation for me:

linux-2.6$ git diff
diff --git a/arch/sparc/include/asm/percpu.h b/arch/sparc/include/asm/percpu.h
index 0cd704ef5ff9..fe284c508f01 100644
--- a/arch/sparc/include/asm/percpu.h
+++ b/arch/sparc/include/asm/percpu.h
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_PERCPU_H
 #define ___ASM_SPARC_PERCPU_H
+
+#include 
+
 #if defined(__sparc__) && defined(__arch64__)
 #include 
 #else


[sparc64] unable to build v5.8 / master on sparc64 , bisect attached

2020-08-03 Thread Anatoly Pugachev
Hello!

I'm unable to build kernel (master git) with the following messages:

linux-2.6$ make
...
  CC  crypto/drbg.o
In file included from ./arch/sparc/include/asm/percpu_64.h:11,
 from ./arch/sparc/include/asm/percpu.h:5,
 from ./include/linux/random.h:14,
 from ./include/crypto/drbg.h:43,
 from crypto/drbg.c:100:
./arch/sparc/include/asm/trap_block.h:54:39: error: ‘NR_CPUS’
undeclared here (not in a function)
   54 | extern struct trap_per_cpu trap_block[NR_CPUS];
  |   ^~~
make[1]: *** [scripts/Makefile.build:281: crypto/drbg.o] Error 1
make: *** [Makefile:1756: crypto] Error 2

can someone help me please? Thanks.

git bisect log:

git bisect start
# bad: [bcf876870b95592b52519ed4aafcf9d95999bc9c] Linux 5.8
git bisect bad bcf876870b95592b52519ed4aafcf9d95999bc9c
# good: [92ed301919932f13b9172e525674157e983d] Linux 5.8-rc7
git bisect good 92ed301919932f13b9172e525674157e983d
# bad: [0ae3495b6502cf93634cbd027cb2f6f9f83a406f] Merge tag
'for-linus-2020-08-01' of
git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux
git bisect bad 0ae3495b6502cf93634cbd027cb2f6f9f83a406f
# bad: [aa54ea903abb02303bf55855fb51e3fcee135d70] ARM: percpu.h: fix build error
git bisect bad aa54ea903abb02303bf55855fb51e3fcee135d70
# good: [c2f3850df7f95537e79c561f7be49df2e4ad8060] Merge tag
'drm-fixes-2020-07-29' of git://anongit.freedesktop.org/drm/drm into
master
git bisect good c2f3850df7f95537e79c561f7be49df2e4ad8060
# bad: [0513b9d75c07cbcdfda3778b636d3d131d679eb1] Merge tag
'io_uring-5.8-2020-07-30' of git://git.kernel.dk/linux-block
git bisect bad 0513b9d75c07cbcdfda3778b636d3d131d679eb1
# good: [d3590ebf6f91350192737dd1d1b219c05277f067] Merge tag
'audit-pr-20200729' of
git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit
git bisect good d3590ebf6f91350192737dd1d1b219c05277f067
# good: [4ae6dbd683860b9edc254ea8acf5e04b5ae242e5] io_uring: fix
lockup in io_fail_links()
git bisect good 4ae6dbd683860b9edc254ea8acf5e04b5ae242e5
# bad: [1c9df907da83812e4f33b59d3d142c864d9da57f] random: fix circular
include dependency on arm64 after addition of percpu.h
git bisect bad 1c9df907da83812e4f33b59d3d142c864d9da57f


Re: [PATCH 1/2] sparc64: Deselect IRQ_PREFLOW_FASTEOI

2020-07-03 Thread Anatoly Pugachev
On Fri, Jul 3, 2020 at 6:58 PM Valentin Schneider
 wrote:
>
> sparc64 hasn't needed to select this since commit:
>
>   ee6a9333fa58 ("sparc64: sparse irq")
>
> which got rid of the calls to __irq_set_preflow_handler() first installed
> by commit:
>
>   fcd8d4f49869 ("sparc: Use the new genirq functionality")
>
> Deselect this option.
>
> Signed-off-by: Valentin Schneider 
> ---
>  arch/sparc/Kconfig | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
> index da515fdad83d..ed35760043e8 100644
> --- a/arch/sparc/Kconfig
> +++ b/arch/sparc/Kconfig
> @@ -81,7 +81,6 @@ config SPARC64
> select RTC_DRV_STARFIRE
> select HAVE_PERF_EVENTS
> select PERF_USE_VMALLOC
> -   select IRQ_PREFLOW_FASTEOI
> select ARCH_HAVE_NMI_SAFE_CMPXCHG
> select HAVE_C_RECORDMCOUNT
> select HAVE_ARCH_AUDITSYSCALL


tried/tested this patch on my test sparc64 ldom , boots ok


unable to compile after "module: Make module_enable_ro() static again"

2020-06-05 Thread Anatoly Pugachev
Hello!

i'm unable to compile kernel on debian sid/unstable (tested on sparc64
and ppc64) after commit e6eff4376e2897c2e14b70d87bf7284cdb093830

~/linux-2.6$ git bisect bad
e6eff4376e2897c2e14b70d87bf7284cdb093830 is the first bad commit
commit e6eff4376e2897c2e14b70d87bf7284cdb093830
Author: Josh Poimboeuf 
Date:   Wed Apr 29 10:24:53 2020 -0500

module: Make module_enable_ro() static again

Now that module_enable_ro() has no more external users, make it static
again.

Suggested-by: Jessica Yu 
Signed-off-by: Josh Poimboeuf 
Acked-by: Jessica Yu 
Signed-off-by: Jiri Kosina 

 include/linux/module.h | 6 --
 kernel/module.c| 3 ++-
 2 files changed, 2 insertions(+), 7 deletions(-)


git bisect log :

~/linux-2.6$ git bisect log
git bisect start
# bad: [435faf5c218a47fd6258187f62d9bb1009717896] Merge tag
'riscv-for-linus-5.8-mw0' of
git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
git bisect bad 435faf5c218a47fd6258187f62d9bb1009717896
# good: [6929f71e46bdddbf1c4d67c2728648176c67c555] atomisp: avoid
warning about unused function
git bisect good 6929f71e46bdddbf1c4d67c2728648176c67c555
# bad: [694b5a5d313f3997764b67d52bab66ec7e59e714] Merge tag
'arm-soc-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
git bisect bad 694b5a5d313f3997764b67d52bab66ec7e59e714
# good: [d9b8fbf15d05350b36081eddafcf7b15aa1add50] ALSA: es1688: Add
the missed snd_card_free()
git bisect good d9b8fbf15d05350b36081eddafcf7b15aa1add50
# bad: [9ff7258575d5fee011649d20cc56de720a395191] Merge branch
'proc-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
git bisect bad 9ff7258575d5fee011649d20cc56de720a395191
# good: [acf25aa66371359f542d14e8d993b530fe25d7ac] Merge tag
'Smack-for-5.8' of git://github.com/cschaufler/smack-next
git bisect good acf25aa66371359f542d14e8d993b530fe25d7ac
# good: [86c67ce20d080bdfefafd461d3068cad0a49a66b] Merge tag
'leds-5.8-rc1' of
git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds
git bisect good 86c67ce20d080bdfefafd461d3068cad0a49a66b
# bad: [9fb4c5250f10dc4d8257cd766991be690eb25c5b] Merge branch
'for-linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching
git bisect bad 9fb4c5250f10dc4d8257cd766991be690eb25c5b
# good: [16ba7e312045cd5d32fba0156312b4303f200787] Merge branches
'for-5.7/upstream-fixes', 'for-5.8/apple', 'for-5.8/asus',
'for-5.8/core', 'for-5.8/intel-ish', 'for-5.8/logitech',
'for-5.8/mcp2221' and 'for-5.8/multitouch' into for-linus
git bisect good 16ba7e312045cd5d32fba0156312b4303f200787
# good: [5b384f933590a086ca9a0abdc2e55e41107ac440] x86/module: Use
text_mutex in apply_relocate_add()
git bisect good 5b384f933590a086ca9a0abdc2e55e41107ac440
# bad: [f55d9895884b1e816f95b5109b4b3827ae18c4ab] MAINTAINERS: add
lib/livepatch to LIVE PATCHING
git bisect bad f55d9895884b1e816f95b5109b4b3827ae18c4ab
# bad: [2a4248749624a38ebddcd1fd82bbab8132d655ad] MAINTAINERS: adjust
to livepatch .klp.arch removal
git bisect bad 2a4248749624a38ebddcd1fd82bbab8132d655ad
# bad: [e6eff4376e2897c2e14b70d87bf7284cdb093830] module: Make
module_enable_ro() static again
git bisect bad e6eff4376e2897c2e14b70d87bf7284cdb093830
# first bad commit: [e6eff4376e2897c2e14b70d87bf7284cdb093830] module:
Make module_enable_ro() static again



error message is :

~/linux-2.6$ make  -j 24
  CALLscripts/atomic/check-atomics.sh
  CALLscripts/checksyscalls.sh
:1511:2: warning: #warning syscall clone3 not implemented [-Wcpp]
  CHK include/generated/compile.h
  CC  kernel/module.o
kernel/module.c: In function ‘do_init_module’:
kernel/module.c:3576:2: error: implicit declaration of function
‘module_enable_ro’; did you mean ‘module_enable_x’?
[-Werror=implicit-function-declaration]
 3576 |  module_enable_ro(mod, true);
  |  ^~~~
  |  module_enable_x
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:266: kernel/module.o] Error 1
make: *** [Makefile:1722: kernel] Error 2


$ gcc --version
gcc (Debian 9.3.0-12) 9.3.0


Re: [PATCH] sparc: vdso: fix build error of vdso32

2019-10-18 Thread Anatoly Pugachev
On Fri, Sep 27, 2019 at 6:47 PM Masahiro Yamada
 wrote:
>
> On Sun, Sep 22, 2019 at 8:36 PM Masahiro Yamada
>  wrote:
> >
> > Since commit 54b8ae66ae1a ("kbuild: change *FLAGS_.o to
> > take the path relative to $(obj)"), sparc allmodconfig fails to build
> > as follows:
> >
> >   CC  arch/sparc/vdso/vdso32/vclock_gettime.o
> > unrecognized e_machine 18 arch/sparc/vdso/vdso32/vclock_gettime.o
> > arch/sparc/vdso/vdso32/vclock_gettime.o: failed
> >
> > The cause of the breakage is that -pg flag not being dropped.
> >
> > The vdso32 files are located in the vdso32/ subdirectory, but I missed
> > to update the Makefile.
> >
> > Fixes: 54b8ae66ae1a ("kbuild: change *FLAGS_.o to take the path 
> > relative to $(obj)")
> > Reported-by: Anatoly Pugachev 
> > Signed-off-by: Masahiro Yamada 
> > ---
> >
>
>
> I am copy-pasting Tested-by from the reporter:
>
> Tested-by: Anatoly Pugachev 
>
> It was given here:
>
> https://lkml.org/lkml/2019/9/25/197
>
>
>
>
> >  arch/sparc/vdso/Makefile | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile
> > index 324a23947585..399bc22b1cf8 100644
> > --- a/arch/sparc/vdso/Makefile
> > +++ b/arch/sparc/vdso/Makefile
> > @@ -67,12 +67,14 @@ $(vobjs): KBUILD_CFLAGS := $(filter-out 
> > $(GCC_PLUGINS_CFLAGS) $(SPARC_REG_CFLAGS
> >  #
> >  CFLAGS_REMOVE_vdso-note.o = -pg
> >  CFLAGS_REMOVE_vclock_gettime.o = -pg
> > +CFLAGS_REMOVE_vdso32/vdso-note.o = -pg
> > +CFLAGS_REMOVE_vdso32/vclock_gettime.o = -pg
> >
> >  $(obj)/%.so: OBJCOPYFLAGS := -S
> >  $(obj)/%.so: $(obj)/%.so.dbg FORCE
> > $(call if_changed,objcopy)
> >
> > -CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
> > +CPPFLAGS_vdso32/vdso32.lds = $(CPPFLAGS_vdso.lds)
> >  VDSO_LDFLAGS_vdso32.lds = -m elf32_sparc -soname linux-gate.so.1
> >
> >  #This makes sure the $(obj) subdirectory exists even though vdso32/


Hello!

Can someone please pull/apply this to master ?!

Thanks!


Re: latest git kernel (v5.3-11506-gf7c3bf8fa7e5) does not compile

2019-09-25 Thread Anatoly Pugachev
On Sun, Sep 22, 2019 at 2:38 PM Masahiro Yamada
 wrote:
> On Sun, Sep 22, 2019 at 5:33 PM Anatoly Pugachev  wrote:
> > On Sun, Sep 22, 2019 at 11:13 AM Anatoly Pugachev  
> > wrote:
> > >
> > > Hello!
> > >
> > > Latest git kernel does not compile for me:
> > >
> > > ~/linux-2.6$ git desc
> > > v5.3-11506-gf7c3bf8fa7e5
> > >
> > > ~/linux-2.6$ make
> > >   CALLscripts/checksyscalls.sh
> > > :1511:2: warning: #warning syscall clone3 not implemented [-Wcpp]
> > >   CALLscripts/atomic/check-atomics.sh
> > >   CHK include/generated/compile.h
> > >   CC  arch/sparc/vdso/vdso32/vclock_gettime.o
> > > unrecognized e_machine 18 arch/sparc/vdso/vdso32/vclock_gettime.o
> > > arch/sparc/vdso/vdso32/vclock_gettime.o: failed
> > > make[2]: *** [scripts/Makefile.build:266:
> > > arch/sparc/vdso/vdso32/vclock_gettime.o] Error 1
> > > make[2]: *** Deleting file 'arch/sparc/vdso/vdso32/vclock_gettime.o'
> > > make[1]: *** [scripts/Makefile.build:509: arch/sparc/vdso] Error 2
> > > make: *** [Makefile:1667: arch/sparc] Error
> > >
> > > but I was able to compile successfully v5.3-10169-g574cc4539762
>
>
> Thanks for the report, and apology for the breakage.
>
> Please check this patch.
> https://lore.kernel.org/patchwork/patch/1130469/
>
> I hope it will fix the build error.

Masahiro,

fixes kernel compilation for me, thanks!

David,

can we please push it to current git kernel , so later bisect sessions
does not need yet another patch... Thanks.

Tested-by: Anatoly Pugachev 


Re: latest git kernel (v5.3-11506-gf7c3bf8fa7e5) does not compile

2019-09-22 Thread Anatoly Pugachev
On Sun, Sep 22, 2019 at 2:38 PM Masahiro Yamada
 wrote:
>
> Hi Anatoly,
>
> On Sun, Sep 22, 2019 at 5:33 PM Anatoly Pugachev  wrote:
> >
> > On Sun, Sep 22, 2019 at 11:13 AM Anatoly Pugachev  
> > wrote:
> > >
> > > Hello!
> > >
> > > Latest git kernel does not compile for me:
> > >
> > > ~/linux-2.6$ git desc
> > > v5.3-11506-gf7c3bf8fa7e5
> > >
> > > ~/linux-2.6$ make
> > >   CALLscripts/checksyscalls.sh
> > > :1511:2: warning: #warning syscall clone3 not implemented [-Wcpp]
> > >   CALLscripts/atomic/check-atomics.sh
> > >   CHK include/generated/compile.h
> > >   CC  arch/sparc/vdso/vdso32/vclock_gettime.o
> > > unrecognized e_machine 18 arch/sparc/vdso/vdso32/vclock_gettime.o
> > > arch/sparc/vdso/vdso32/vclock_gettime.o: failed
> > > make[2]: *** [scripts/Makefile.build:266:
> > > arch/sparc/vdso/vdso32/vclock_gettime.o] Error 1
> > > make[2]: *** Deleting file 'arch/sparc/vdso/vdso32/vclock_gettime.o'
> > > make[1]: *** [scripts/Makefile.build:509: arch/sparc/vdso] Error 2
> > > make: *** [Makefile:1667: arch/sparc] Error
> > >
> > > but I was able to compile successfully v5.3-10169-g574cc4539762
>
>
> Thanks for the report, and apology for the breakage.
>
> Please check this patch.
> https://lore.kernel.org/patchwork/patch/1130469/
>
> I hope it will fix the build error.


It does. Thanks Masahiro!


Re: latest git kernel (v5.3-11506-gf7c3bf8fa7e5) does not compile

2019-09-22 Thread Anatoly Pugachev
On Sun, Sep 22, 2019 at 11:13 AM Anatoly Pugachev  wrote:
>
> Hello!
>
> Latest git kernel does not compile for me:
>
> ~/linux-2.6$ git desc
> v5.3-11506-gf7c3bf8fa7e5
>
> ~/linux-2.6$ make
>   CALLscripts/checksyscalls.sh
> :1511:2: warning: #warning syscall clone3 not implemented [-Wcpp]
>   CALLscripts/atomic/check-atomics.sh
>   CHK include/generated/compile.h
>   CC  arch/sparc/vdso/vdso32/vclock_gettime.o
> unrecognized e_machine 18 arch/sparc/vdso/vdso32/vclock_gettime.o
> arch/sparc/vdso/vdso32/vclock_gettime.o: failed
> make[2]: *** [scripts/Makefile.build:266:
> arch/sparc/vdso/vdso32/vclock_gettime.o] Error 1
> make[2]: *** Deleting file 'arch/sparc/vdso/vdso32/vclock_gettime.o'
> make[1]: *** [scripts/Makefile.build:509: arch/sparc/vdso] Error 2
> make: *** [Makefile:1667: arch/sparc] Error
>
> but I was able to compile successfully v5.3-10169-g574cc4539762
>
> Not sure my bisect log is right, but here it is:
>
> $ git bisect good
> 54b8ae66ae1a3454a7645d159a482c31cd89ab33 is the first bad commit
> commit 54b8ae66ae1a3454a7645d159a482c31cd89ab33
> Author: Masahiro Yamada 
> Date:   Fri Aug 30 13:34:01 2019 +0900
>
> kbuild: change *FLAGS_.o to take the path relative to $(obj)
>
> Kbuild provides per-file compiler flag addition/removal:
>
>   CFLAGS_.o
>   CFLAGS_REMOVE_.o
>   AFLAGS_.o
>   AFLAGS_REMOVE_.o
>   CPPFLAGS_.lds
>   HOSTCFLAGS_.o
>   HOSTCXXFLAGS_.o
>
> The  is the filename of the target with its directory and
> suffix stripped.
>
> This syntax comes into a trouble when two files with the same basename
> appear in one Makefile, for example:
>
>   obj-y += foo.o
>   obj-y += dir/foo.o
>   CFLAGS_foo.o := 
>
> Here, the  applies to both foo.o and dir/foo.o
>
> The real world problem is:
>
>   scripts/kconfig/util.c
>   scripts/kconfig/lxdialog/util.c
>
> Both files are compiled into scripts/kconfig/mconf, but only the
> latter should be given with the ncurses flags.
>
> It is more sensible to use the relative path to the Makefile, like this:
>
>   obj-y += foo.o
>   CFLAGS_foo.o := 
>   obj-y += dir/foo.o
>   CFLAGS_dir/foo.o := 
>
> At first, I attempted to replace $(basetarget) with $*. The $* variable
> is replaced with the stem ('%') part in a pattern rule. This works with
> most of cases, but does not for explicit rules.
>
> For example, arch/ia64/lib/Makefile reuses rule_as_o_S in its own
> explicit rules, so $* will be empty, resulting in ignoring the per-file
> AFLAGS.
>
> I introduced a new variable, target-stem, which can be used also from
> explicit rules.
>
> Signed-off-by: Masahiro Yamada 
> Acked-by: Marc Zyngier 
>
>  arch/arm/kvm/Makefile |  5 +++--
>  arch/x86/entry/vdso/Makefile  |  3 ++-
>  drivers/gpu/drm/amd/display/dc/calcs/Makefile |  6 +++---
>  drivers/gpu/drm/amd/display/dc/dcn20/Makefile |  2 +-
>  drivers/gpu/drm/amd/display/dc/dml/Makefile   | 17 +++--
>  drivers/gpu/drm/amd/display/dc/dsc/Makefile   |  7 +++
>  drivers/gpu/drm/i915/Makefile |  2 +-
>  scripts/Makefile.host | 22 +++---
>  scripts/Makefile.lib  | 13 -
>  scripts/kconfig/Makefile  |  8 
>  10 files changed, 43 insertions(+), 42 deletions(-)
> mator@ttip:~/linux-2.6$
>
>
> If someone wants to check how kernel compiles on sparc64, could use
> gcc compile farm machine (gcc202) to try on.

and i cannot test compile 54b8ae66ae1a3454a7645d159a482c31cd89ab33 as well :

~/linux-2.6$ git checkout 54b8ae66ae1a3454a7645d159a482c31cd89ab33
HEAD is now at 54b8ae66ae1a kbuild: change *FLAGS_.o to
take the path relative to $(obj)

~/linux-2.6$ make -j clean; make -j olddefconfig && nice make -j24
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX scripts/kconfig/lexer.lex.c
  YACCscripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --olddefconfig Kconfig
#
# No change to .config
#
scripts/kconfig/conf  --syncconfig Kconfig
{ command -v gcc; } >/dev/null 2>&1 && echo "n" || echo "y": Cannot
allocate memory
make[2]: *** [scripts/kconfig/Makefile:73: syncconfig] Error 1
make[1]: *** [Makefile:584: syncconfig] Error 2
make: *** [Makefile:695: include/config/auto.conf.cmd] Error 2
~/linux-2.6$



PS: unable to compile kernel makes its bisection impossible =(


Re: [sparc64] Kernel unaligned access at TPC lzo1x_1_do_compress

2019-09-09 Thread Anatoly Pugachev
On Mon, Sep 9, 2019 at 1:11 PM Dave Rodgman  wrote:
>
> Thanks Anatoly, I'll take a look at this. Could you please let me know the 
> exact hardware you're running on?

Dave,

machine is a LDOM on T5-2 server.

OS is debian unstable/sid linux with latest git kernel, currently :

$ uname -a
Linux ttip 5.3.0-rc8-dirty #1211 SMP Mon Sep 9 10:20:40 MSK 2019
sparc64 GNU/Linux

-dirty cause non-mainline (yet) fix for IPC [1] and reverted
HAVE_GENERIC_GUP patch [2].

$ gcc --version
gcc (Debian 9.2.1-7) 9.2.1 20190905

$ ld -V
GNU ld (GNU Binutils for Debian) 2.32.51.20190821

$ ldd --version
ldd (Debian GLIBC 2.28-10) 2.28


I could give you  account on this box to test or fix kernel if you would like.

Thanks.

1. https://marc.info/?l=linux-kernel=156769723218727
2. https://marc.info/?l=linux-sparc=156026414826151


[sparc64] Kernel unaligned access at TPC lzo1x_1_do_compress

2019-09-08 Thread Anatoly Pugachev
Hello!

trying to use zram block device, shows the following:

# zramctl -f -s 16g
# cat /sys/block/zram0/comp_algorithm
lzo [lzo-rle] lz4 lz4hc 842 zstd
# zramctl
NAME   ALGORITHM DISKSIZE  DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lzo-rle16G 10.4M4K  112K  32

# mkfs.xfs /dev/zram0
...

[   71.095998] zram: Added device: zram0
[   71.765591] zram0: detected capacity change from 0 to 17179869184
[   80.058772] Kernel unaligned access at TPC[8f2534]
lzo1x_1_do_compress+0x1b4/0x820
[   80.073832] Kernel unaligned access at TPC[8f2534]
lzo1x_1_do_compress+0x1b4/0x820
[   80.073866] Kernel unaligned access at TPC[8f2534]
lzo1x_1_do_compress+0x1b4/0x820
[   80.074709] Kernel unaligned access at TPC[8f2534]
lzo1x_1_do_compress+0x1b4/0x820
[   80.074923] Kernel unaligned access at TPC[8f2534]
lzo1x_1_do_compress+0x1b4/0x820


all other tested compression algorithms (lzo, lz4, lz4hc, deflate,
842) work without producing kernel TPC.


Re: [PATCH 2/2] ipc: fix sparc64 ipc() wrapper

2019-09-05 Thread Anatoly Pugachev
On Thu, Sep 5, 2019 at 9:39 PM Arnd Bergmann  wrote:
>
> Matt bisected a sparc64 specific issue with semctl, shmctl and msgctl
> to a commit from my y2038 series in linux-5.1, as I missed the custom
> sys_ipc() wrapper that sparc64 uses in place of the generic version that
> I patched.
>
> The problem is that the sys_{sem,shm,msg}ctl() functions in the kernel
> now do not allow being called with the IPC_64 flag any more, resulting
> in a -EINVAL error when they don't recognize the command.
>
> Instead, the correct way to do this now is to call the internal
> ksys_old_{sem,shm,msg}ctl() functions to select the API version.
>
> As we generally move towards these functions anyway, change all of
> sparc_ipc() to consistently use those in place of the sys_*() versions,
> and move the required ksys_*() declarations into linux/syscalls.h
>
> Reported-by: Matt Turner 
> Fixes: 275f22148e87 ("ipc: rename old-style shmctl/semctl/msgctl syscalls")
> Cc: sta...@vger.kernel.org
> Signed-off-by: Arnd Bergmann 


Not Matt,

but this patch fixes util-linux.git ipcs test-suite (make check)
regression for me on current sparc64 git kernel (5.3.0-rc7), which was
broken somewhere in between 4.19 (debian unstable kernel) and 5.3-rcX.

Thanks!

PS: wanted to bisect kernel, but Matt did it first.


Re: [PATCH 09/16] sparc64: use the generic get_user_pages_fast code

2019-08-11 Thread Anatoly Pugachev
On Sat, Aug 10, 2019 at 10:36 PM Mikael Pettersson  wrote:
> For the record the futex test case OOPSes a 5.3-rc3 kernel running on
> a Sun Blade 2500 (2 x USIIIi).  This system runs a custom distro with
> a custom toolchain (gcc-8.3 based), so I doubt it's a distro problem.

Mikael, Khalid,

can you please test util-linux source code with 'make check' on
current git kernel and post the results?
https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git

Thanks.

As with my test machine/LDOM, util-linux 'make check' hangs git kernel
with the OOPS in the end of this message.

PS: And I was able to revert patch so current kernel git master branch
works again, futex strace test works as before (not being killed and
does not produce kernel OOPS), as well util-linux 'make check' does
not kills kernel. If anyone interested I can post the patch, but I'm
not sure it's a right thing to do, if all other architectures were
converted to use generic GUP code (mm/gup.c).


[   47.600488] BUG: Bad rss-counter state mm:ae46ef00 idx:0 val:-17
[   47.600645] BUG: Bad rss-counter state mm:ae46ef00 idx:1 val:102
[   47.673090] fdisk[4270]: segfault at 20 ip fff800017ed8 (rpc
fff800017e30) sp 07feffe79661 error 1 in
ld-2.28.so[fff80001+22000]
[   47.674415] BUG: Bad rss-counter state mm:ca65883c idx:0 val:17
[   47.674722] BUG: Bad rss-counter state mm:ca65883c idx:1 val:1
[   47.785453] [ cut here ]
[   47.785722] WARNING: CPU: 17 PID: 96 at mm/slab.h:410
kmem_cache_free+0xb4/0x300
[   47.785880] virt_to_cache: Object is not a Slab page!
[   47.786003] Modules linked in: tun ip_set_hash_net ip_set nf_tables
nfnetlink binfmt_misc camellia_sparc64 des_sparc64 des_generic
aes_sparc64 md5_sparc64 sha512_sparc64 sha256_sparc64 n2_rng rng_core
flash sha1_sparc64 ip_tables x_tables ipv6 nf_defrag_ipv6 autofs4 ext4
crc16 mbcache jbd2 raid10 raid456 async_raid6_recov async_memcpy
async_pq async_xor xor async_tx raid6_pq raid1 raid0 multipath linear
md_mod crc32c_sparc64
[   47.787041] CPU: 17 PID: 96 Comm: ksoftirqd/17 Not tainted 5.3.0-rc3 #1143
[   47.787181] Call Trace:
[   47.787268]  [00464540] __warn+0xc0/0x100
[   47.787384]  [004645b4] warn_slowpath_fmt+0x34/0x60
[   47.787512]  [006758f4] kmem_cache_free+0xb4/0x300
[   47.787648]  [00451b68] pgtable_free+0x28/0x40
[   47.787779]  [006470fc] tlb_remove_table_rcu+0x3c/0x80
[   47.787928]  [004fae94] rcu_core+0xbd4/0x1000
[   47.788048]  [004fb7ac] rcu_core_si+0xc/0x20
[   47.788177]  [00abc648] __do_softirq+0x288/0x500
[   47.788296]  [0046beb0] run_ksoftirqd+0x30/0x80
[   47.788433]  [00493c64] smpboot_thread_fn+0x244/0x280
[   47.788575]  [0048ef50] kthread+0x110/0x140
[   47.788707]  [004060e4] ret_from_fork+0x1c/0x2c
[   47.788835]  [] 0x0
[   47.788927] irq event stamp: 19420
[   47.789028] hardirqs last  enabled at (19428): [<004e2910>]
console_unlock+0x630/0x6c0
[   47.789230] hardirqs last disabled at (19435): [<004e23dc>]
console_unlock+0xfc/0x6c0
[   47.789420] softirqs last  enabled at (19254): [<00abc854>]
__do_softirq+0x494/0x500
[   47.789612] softirqs last disabled at (19259): [<0046beb0>]
run_ksoftirqd+0x30/0x80
[   47.789795] ---[ end trace afb11a4826780c48 ]---
[   47.925975] Unable to handle kernel paging request at virtual
address 00061200
[   47.926088] tsk->{mm,active_mm}->context = 1b68
[   47.926150] tsk->{mm,active_mm}->pgd = fff8002438f9
[   47.926202]   \|/  \|/
[   47.926202]   "@'/ .. \`@"
[   47.926202]   /_| \__/ |_\
[   47.926202]  \__U_/
[   47.926311] kworker/25:2(653): Oops [#1]
[   47.926354] CPU: 25 PID: 653 Comm: kworker/25:2 Tainted: GW
5.3.0-rc3 #1143
[   47.926433] Workqueue: xfs-conv/dm-0 xfs_end_io
[   47.926479] TSTATE: 80001605 TPC: 0067588c TNPC:
00675890 Y: Tainted: GW
[   47.926570] TPC: 
[   47.926611] g0: 00675668 g1: 00061200 g2:
0040 g3: 0006
[   47.926682] g4: fff80024938c8e40 g5: fff80024a83bc000 g6:
fff8002490254000 g7: 0102
[   47.926751] o0:  o1: 00d02c30 o2:
fff80024938c96b8 o3: c000
[   47.926821] o4: 014c3000 o5:  sp:
fff80024ad577121 ret_pc: 004d5148
[   47.926898] RPC: 
[   47.926940] l0:  l1:  l2:
f000 l3: 0080
[   47.927010] l4: 00d953c0 l5: 00d953c0 l6:
0002 l7: 000b
[   47.927080] i0: fff83040b1e0 i1:  i2:
fff80024938c96b8 i3: fff80024938c8e40
[   47.927149] i4: 0004 i5: fff80024938c9730 i6:
fff80024ad5771d1 i7: 006409f4
[   47.927223] I7: 
[   47.927261] Call Trace:
[   47.927291]  [006409f4] 

Re: [PATCH 09/16] sparc64: use the generic get_user_pages_fast code

2019-08-09 Thread Anatoly Pugachev
On Thu, Jul 18, 2019 at 12:59 AM Dmitry V. Levin  wrote:
> On Tue, Jun 25, 2019 at 04:37:08PM +0200, Christoph Hellwig wrote:
> > The sparc64 code is mostly equivalent to the generic one, minus various
> > bugfixes and two arch overrides that this patch adds to pgtable.h.
> >
> > Signed-off-by: Christoph Hellwig 
> > Reviewed-by: Khalid Aziz 
> > ---
> >  arch/sparc/Kconfig  |   1 +
> >  arch/sparc/include/asm/pgtable_64.h |  18 ++
> >  arch/sparc/mm/Makefile  |   2 +-
> >  arch/sparc/mm/gup.c | 340 
> >  4 files changed, 20 insertions(+), 341 deletions(-)
> >  delete mode 100644 arch/sparc/mm/gup.c
>
> So this ended up as commit 7b9afb86b6328f10dc2cad9223d7def12d60e505

I've tried to revert this commit on a current master branch , but i'm getting :

linux-2.6$ git show 7b9afb86b632 > /tmp/gup.patch
linux-2.6$ patch -p1 -R < /tmp/gup.patch
...
linux-2.6$ make -j && make -j modules
...
  CALLscripts/atomic/check-atomics.sh
  CALLscripts/checksyscalls.sh
:1511:2: warning: #warning syscall clone3 not implemented [-Wcpp]
  CHK include/generated/compile.h
  CHK include/generated/autoksyms.h
  GEN .version
  CHK include/generated/compile.h
  UPD include/generated/compile.h
  CC  init/version.o
  AR  init/built-in.a
  LD  vmlinux.o
ld: mm/gup.o: in function `__get_user_pages_fast':
gup.c:(.text+0x1bc0): multiple definition of `__get_user_pages_fast';
arch/sparc/mm/gup.o:gup.c:(.text+0x620): first defined here
ld: mm/gup.o: in function `get_user_pages_fast':
gup.c:(.text+0x1be0): multiple definition of `get_user_pages_fast';
arch/sparc/mm/gup.o:gup.c:(.text+0x740): first defined here
make: *** [Makefile:1060: vmlinux] Error 1

Can someone help me to revert this commit? Is it even possible? Since
it's not only futex strace calls getting killed and producing OOPS,
even util-linux.git 'make check' hangs machine/LDOM with multiple OOPS
in logs, while previous (before this commit) kernel passes tests ok
(and without kernel OOPS). I've already tried to compile current
master with gcc-6, gcc-7, gcc-8 debian versions, but all produce same
OOPS.

Thanks.


Re: [PATCH 09/16] sparc64: use the generic get_user_pages_fast code

2019-07-28 Thread Anatoly Pugachev
On Sun, Jul 28, 2019 at 5:09 AM David Miller  wrote:
> From: Anatoly Pugachev 
> Date: Thu, 25 Jul 2019 21:33:24 +0300
> > there's vmlinuz-5.3.0-rc1 kernel and archive 5.3.0-rc1-modules.tar.gz
> > of /lib/modules/5.3.0-rc1/
> > this is from oracle sparclinux LDOM , compiled with 7.4.0 gcc
>
> Please, I really really need the unstripped kernel image with all the
> symbols.  This vmlinuz file is stripped already.  The System.map does
> not serve as a replacement.

David,

http://u164.east.ru/kernel2/

I'm sorry missed debug kernel first. Enabled CONFIG_DEBUG_INFO=y


Re: [PATCH 09/16] sparc64: use the generic get_user_pages_fast code

2019-07-25 Thread Anatoly Pugachev
On Wed, Jul 24, 2019 at 11:13 PM David Miller  wrote:
>
> From: Anatoly Pugachev 
> Date: Wed, 24 Jul 2019 22:32:17 +0300
>
> > the first test where it was discovered was done on my test LDOM named
> > ttip, hardware (hypervisor) is T5-2 server, running under Solaris 11.4
> > OS.
> > ttip LDOM is debian sparc64 unstable , so with almost all the latest
> > software (gcc 8.3.0, binutils 2.32.51.20190707-1, debian GLIBC
> > 2.28-10, etc..)
> >
> > For another test, i also installed LDOM with oracle sparc linux
> > https://oss.oracle.com/projects/linux-sparc/ , but I've to install a
> > more fresh version of gcc on it first, since system installed gcc 4.4
> > is too old for a git kernel (linux-2.6/Documentation/Changes lists gcc
> > 4.6 as a minimal version), so I choose to install gcc-7.4.0 to /opt/
> > (leaving system installed gcc 4.4 under /usr/bin). Compiled and
> > installed git kernel version, i.e. last tag 5.3.0-rc1 and ran the
> > test. Kernel still produced oops.
>
> I suspect, therefore, that we have a miscompile.
>
> Please put your unstripped vmlinux image somewhere so I can take a closer
> look.

David,

http://u164.east.ru/kernel/

there's vmlinuz-5.3.0-rc1 kernel and archive 5.3.0-rc1-modules.tar.gz
of /lib/modules/5.3.0-rc1/
this is from oracle sparclinux LDOM , compiled with 7.4.0 gcc

Thank you.


Re: [PATCH 09/16] sparc64: use the generic get_user_pages_fast code

2019-07-24 Thread Anatoly Pugachev
On Fri, Jul 19, 2019 at 12:14 AM David Miller  wrote:
> > So this ended up as commit 7b9afb86b6328f10dc2cad9223d7def12d60e505
> > (thanks to Anatoly for bisecting) and introduced a regression:
> > futex.test from the strace test suite now causes an Oops on sparc64
> > in futex syscall.
> >
> > Here is a heavily stripped down reproducer:
>
> Does not reproduce for me on a T4-2 machine.
>
> So this problem might depend on the type of system you are on,
> I suspect it's one of those "pre-Niagara vs. Niagara and later"
> situations because that's the dividing line between two set of
> wildly different TLB and cache management methods.
>
> What kind of machine are you on?

David,

the first test where it was discovered was done on my test LDOM named
ttip, hardware (hypervisor) is T5-2 server, running under Solaris 11.4
OS.
ttip LDOM is debian sparc64 unstable , so with almost all the latest
software (gcc 8.3.0, binutils 2.32.51.20190707-1, debian GLIBC
2.28-10, etc..)

For another test, i also installed LDOM with oracle sparc linux
https://oss.oracle.com/projects/linux-sparc/ , but I've to install a
more fresh version of gcc on it first, since system installed gcc 4.4
is too old for a git kernel (linux-2.6/Documentation/Changes lists gcc
4.6 as a minimal version), so I choose to install gcc-7.4.0 to /opt/
(leaving system installed gcc 4.4 under /usr/bin). Compiled and
installed git kernel version, i.e. last tag 5.3.0-rc1 and ran the
test. Kernel still produced oops.


Re: [PATCH] sparc: Remove redundant copy of the LGPL-2.0

2019-06-19 Thread Anatoly Pugachev
On Thu, Jun 13, 2019 at 03:14:56PM -0700, David Miller wrote:
> > On 13/06/2019, David Miller  wrote:
> >> From: Thomas Huth 
> >> Date: Mon, 27 May 2019 18:32:53 +0200
> >>
> >>> We already provide the LGPL-2.0 text in LICENSES/preferred/LGPL-2.0,
> >>> so there is no need for this additional copy here.
> >>>
> >>> Signed-off-by: Thomas Huth 
> >>
> >> Applied.
> >>
> > 
> > Shouldn't the SPDX license identifiers in in arch/sparc/lib be adjusted to
> > reflect the original intent of LGPL licensing?
> 
> Yes, can someone cook up a quick patch for me for that?
> 
> Thanks.

David,

can you please review this quick one? 

Thanks.
Update arch/sparc/lib/* to LGPL-2.0+ to be in order with original arch/sparc/lib/COPYING.LIB

sed -i 's/SPDX-License-Identifier: \(.*\) */SPDX-License-Identifier: LGPL-2.0+ *\//' arch/sparc/lib/*

Fixes: b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifier to files with no license")
Signed-off-by: Anatoly Pugachev 
CC: Kate Stewart 
CC: Philippe Ombredanne 
CC: Thomas Gleixner 
CC: David S. Miller 
---
 arch/sparc/lib/GENbzero.S| 2 +-
 arch/sparc/lib/GENcopy_from_user.S   | 2 +-
 arch/sparc/lib/GENcopy_to_user.S | 2 +-
 arch/sparc/lib/GENmemcpy.S   | 2 +-
 arch/sparc/lib/GENpage.S | 2 +-
 arch/sparc/lib/GENpatch.S| 2 +-
 arch/sparc/lib/Makefile  | 2 +-
 arch/sparc/lib/NG2copy_from_user.S   | 2 +-
 arch/sparc/lib/NG2copy_to_user.S | 2 +-
 arch/sparc/lib/NG2memcpy.S   | 2 +-
 arch/sparc/lib/NG2patch.S| 2 +-
 arch/sparc/lib/NG4clear_page.S   | 2 +-
 arch/sparc/lib/NG4copy_from_user.S   | 2 +-
 arch/sparc/lib/NG4copy_page.S| 2 +-
 arch/sparc/lib/NG4copy_to_user.S | 2 +-
 arch/sparc/lib/NG4memcpy.S   | 2 +-
 arch/sparc/lib/NG4memset.S   | 2 +-
 arch/sparc/lib/NG4patch.S| 2 +-
 arch/sparc/lib/NGbzero.S | 2 +-
 arch/sparc/lib/NGcopy_from_user.S| 2 +-
 arch/sparc/lib/NGcopy_to_user.S  | 2 +-
 arch/sparc/lib/NGmemcpy.S| 2 +-
 arch/sparc/lib/NGpage.S  | 2 +-
 arch/sparc/lib/NGpatch.S | 2 +-
 arch/sparc/lib/PeeCeeI.c | 2 +-
 arch/sparc/lib/U1copy_from_user.S| 2 +-
 arch/sparc/lib/U1copy_to_user.S  | 2 +-
 arch/sparc/lib/U1memcpy.S| 2 +-
 arch/sparc/lib/U3copy_from_user.S| 2 +-
 arch/sparc/lib/U3copy_to_user.S  | 2 +-
 arch/sparc/lib/U3memcpy.S| 2 +-
 arch/sparc/lib/U3patch.S | 2 +-
 arch/sparc/lib/VISsave.S | 2 +-
 arch/sparc/lib/ashldi3.S | 2 +-
 arch/sparc/lib/ashrdi3.S | 2 +-
 arch/sparc/lib/atomic32.c| 2 +-
 arch/sparc/lib/atomic_64.S   | 2 +-
 arch/sparc/lib/bitext.c  | 2 +-
 arch/sparc/lib/bitops.S  | 2 +-
 arch/sparc/lib/blockops.S| 2 +-
 arch/sparc/lib/bzero.S   | 2 +-
 arch/sparc/lib/checksum_32.S | 2 +-
 arch/sparc/lib/checksum_64.S | 2 +-
 arch/sparc/lib/clear_page.S  | 2 +-
 arch/sparc/lib/cmpdi2.c  | 2 +-
 arch/sparc/lib/copy_in_user.S| 2 +-
 arch/sparc/lib/copy_page.S   | 2 +-
 arch/sparc/lib/copy_user.S   | 2 +-
 arch/sparc/lib/csum_copy.S   | 2 +-
 arch/sparc/lib/csum_copy_from_user.S | 2 +-
 arch/sparc/lib/csum_copy_to_user.S   | 2 +-
 arch/sparc/lib/divdi3.S  | 2 +-
 arch/sparc/lib/ffs.S | 2 +-
 arch/sparc/lib/hweight.S | 2 +-
 arch/sparc/lib/iomap.c   | 2 +-
 arch/sparc/lib/ipcsum.S  | 2 +-
 arch/sparc/lib/libgcc.h  | 2 +-
 arch/sparc/lib/locks.S   | 2 +-
 arch/sparc/lib/lshrdi3.S | 2 +-
 arch/sparc/lib/mcount.S  | 2 +-
 arch/sparc/lib/memcmp.S  | 2 +-
 arch/sparc/lib/memcpy.S  | 2 +-
 arch/sparc/lib/memmove.S | 2 +-
 arch/sparc/lib/memscan_32.S  | 2 +-
 arch/sparc/lib/memscan_64.S  | 2 +-
 arch/sparc/lib/memset.S  | 2 +-
 arch/sparc/lib/muldi3.S  | 2 +-
 arch/sparc/lib/multi3.S  | 2 +-
 arch/sparc/lib/strlen.S  | 2 +-
 arch/sparc/lib/strncmp_32.S  | 2 +-
 arch/sparc/lib/strncmp_64.S  | 2 +-
 arch/sparc/lib/ucmpdi2.c | 2 +-
 arch/sparc/lib/udivdi3.S | 2 +-
 arch/sparc/lib/xor.S | 2 +-
 74 files changed, 74 insertions(+), 74 deletions(-)

diff --git a/arch/sparc/lib/GENbzero.S b/arch/sparc/lib/GENbzero.S
index 63d618857d49..534347838dc2 100644
--- a/arch/sparc/lib/GENbzero.S
+++ b/arch/sparc/lib/GENbzero.S
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+/* SPDX-License-Identifier: LGPL-2.0+ */
 /* GENbzero.S: Generic sparc64 memset/clear_user.
  *
  * Copyright (C) 2007 David S. Miller (da...@davemloft.net)
diff --git a/arch/sparc

Re: strace-4.18 test suite oopses sparc64 4.12 and 4.13-rc kernels

2017-07-31 Thread Anatoly Pugachev
On Tue, Aug 1, 2017 at 12:51 AM, David Miller <da...@davemloft.net> wrote:
> From: Anatoly Pugachev <mator...@gmail.com>
> Date: Tue, 1 Aug 2017 00:48:07 +0300
>
>> Aug 01 00:35:11 v215 kernel: sched_xetattr(1527): Oops [#1]
>> Aug 01 00:35:11 v215 kernel: CPU: 1 PID: 1527 Comm: sched_xetattr Not
>> tainted 4.12.0 #365
>> Aug 01 00:35:11 v215 kernel: task: fff0001231d41340 task.stack: 
>> fff000123dfc4000
>> Aug 01 00:35:11 v215 kernel: TSTATE: 004411001604 TPC:
>> 00a121fc TNPC: 00a12210 Y: Not tainted
>> Aug 01 00:35:11 v215 kernel: TPC: <__bzero+0x20/0xc0>
>> Aug 01 00:35:11 v215 kernel: g0: fff000123dfc7d20 g1: 
>> g2: 0030 g3: 
>> Aug 01 00:35:11 v215 kernel: g4: fff0001231d41340 g5: fff000123ed08000
>> g6: fff000123dfc4000 g7: 0030
>> Aug 01 00:35:11 v215 kernel: o0: 0030 o1: fff000123dfc7e70
>> o2:  o3: 0030
>> Aug 01 00:35:11 v215 kernel: o4: fff000123dfc7e70 o5: 000a
>> sp: fff000123dfc75c1 ret_pc: 0049b294
>> Aug 01 00:35:11 v215 kernel: RPC: <SyS_sched_setattr+0x174/0x1a0>
>
> Please run gdb on this kernel image and tell it:
>
> (gdb) x/20i 0x49b294 - 16
>
> Thanks.
>
> I think perhaps one of Al Viro's changes in the bisected commit causes
> a branch to either have an overflowed offset field, or get mispatched
> to the wrong destination.

David,

I don't know how to run on a running kernel , but as I understood:

root@v215:strace# gzip -dc /boot/vmlinuz-4.12.0 > vmlinux
root@v215:strace# gdb -q vmlinux
Reading symbols from vmlinux...(no debugging symbols found)...done.
(gdb) x/20i 0x49b294 - 16
   0x49b284 <_start+619140>:mov  -22, %o0
   0x49b288 <_start+619144>:sub  %i5, %o0, %o0
   0x49b28c <_start+619148>:mov  %i3, %o2
   0x49b290 <_start+619152>:clr  %o1
   0x49b294 <_start+619156>:call  0xa121b8 <_start+6349240>
   0x49b298 <_start+619160>:add  %o0, 0x30, %o0
   0x49b29c <_start+619164>:cmp  %i3, 0
   0x49b2a0 <_start+619168>:be  %icc, 0x49b20c <_start+619020>
   0x49b2a4 <_start+619172>:mov  -14, %i0
   0x49b2a8 <_start+619176>:rett  %i7 + 8
   0x49b2ac <_start+619180>:nop
   0x49b2b0 <_start+619184>:b,a   %xcc, 0x49b2c0 <_start+619200>
   0x49b2b4 <_start+619188>:nop
   0x49b2b8 <_start+619192>:nop
   0x49b2bc <_start+619196>:nop
   0x49b2c0 <_start+619200>:save  %sp, -176, %sp
   0x49b2c4 <_start+619204>:call  0xa136c0 <_start+6354624>
   0x49b2c8 <_start+619208>:nop
   0x49b2cc <_start+619212>:cmp  %i0, 0
   0x49b2d0 <_start+619216>:bl,pn   %icc, 0x49b318 <_start+619288>
   0x49b2d4 <_start+619220>:mov  -22, %o0
(gdb)


Re: strace-4.18 test suite oopses sparc64 4.12 and 4.13-rc kernels

2017-07-31 Thread Anatoly Pugachev
On Tue, Aug 1, 2017 at 12:51 AM, David Miller  wrote:
> From: Anatoly Pugachev 
> Date: Tue, 1 Aug 2017 00:48:07 +0300
>
>> Aug 01 00:35:11 v215 kernel: sched_xetattr(1527): Oops [#1]
>> Aug 01 00:35:11 v215 kernel: CPU: 1 PID: 1527 Comm: sched_xetattr Not
>> tainted 4.12.0 #365
>> Aug 01 00:35:11 v215 kernel: task: fff0001231d41340 task.stack: 
>> fff000123dfc4000
>> Aug 01 00:35:11 v215 kernel: TSTATE: 004411001604 TPC:
>> 00a121fc TNPC: 00a12210 Y: Not tainted
>> Aug 01 00:35:11 v215 kernel: TPC: <__bzero+0x20/0xc0>
>> Aug 01 00:35:11 v215 kernel: g0: fff000123dfc7d20 g1: 
>> g2: 0030 g3: 
>> Aug 01 00:35:11 v215 kernel: g4: fff0001231d41340 g5: fff000123ed08000
>> g6: fff000123dfc4000 g7: 0030
>> Aug 01 00:35:11 v215 kernel: o0: 0030 o1: fff000123dfc7e70
>> o2:  o3: 0030
>> Aug 01 00:35:11 v215 kernel: o4: fff000123dfc7e70 o5: 000a
>> sp: fff000123dfc75c1 ret_pc: 0049b294
>> Aug 01 00:35:11 v215 kernel: RPC: 
>
> Please run gdb on this kernel image and tell it:
>
> (gdb) x/20i 0x49b294 - 16
>
> Thanks.
>
> I think perhaps one of Al Viro's changes in the bisected commit causes
> a branch to either have an overflowed offset field, or get mispatched
> to the wrong destination.

David,

I don't know how to run on a running kernel , but as I understood:

root@v215:strace# gzip -dc /boot/vmlinuz-4.12.0 > vmlinux
root@v215:strace# gdb -q vmlinux
Reading symbols from vmlinux...(no debugging symbols found)...done.
(gdb) x/20i 0x49b294 - 16
   0x49b284 <_start+619140>:mov  -22, %o0
   0x49b288 <_start+619144>:sub  %i5, %o0, %o0
   0x49b28c <_start+619148>:mov  %i3, %o2
   0x49b290 <_start+619152>:clr  %o1
   0x49b294 <_start+619156>:call  0xa121b8 <_start+6349240>
   0x49b298 <_start+619160>:add  %o0, 0x30, %o0
   0x49b29c <_start+619164>:cmp  %i3, 0
   0x49b2a0 <_start+619168>:be  %icc, 0x49b20c <_start+619020>
   0x49b2a4 <_start+619172>:mov  -14, %i0
   0x49b2a8 <_start+619176>:rett  %i7 + 8
   0x49b2ac <_start+619180>:nop
   0x49b2b0 <_start+619184>:b,a   %xcc, 0x49b2c0 <_start+619200>
   0x49b2b4 <_start+619188>:nop
   0x49b2b8 <_start+619192>:nop
   0x49b2bc <_start+619196>:nop
   0x49b2c0 <_start+619200>:save  %sp, -176, %sp
   0x49b2c4 <_start+619204>:call  0xa136c0 <_start+6354624>
   0x49b2c8 <_start+619208>:nop
   0x49b2cc <_start+619212>:cmp  %i0, 0
   0x49b2d0 <_start+619216>:bl,pn   %icc, 0x49b318 <_start+619288>
   0x49b2d4 <_start+619220>:mov  -22, %o0
(gdb)


Re: strace-4.18 test suite oopses sparc64 4.12 and 4.13-rc kernels

2017-07-31 Thread Anatoly Pugachev
On Mon, Jul 31, 2017 at 8:14 PM, Mikael Pettersson <mikpeli...@gmail.com> wrote:
> Mikael Pettersson writes:
>  > Anatoly Pugachev writes:
>  >  > On Fri, Jul 28, 2017 at 11:45 AM, Mikael Pettersson
>  >  > <mikpeli...@gmail.com> wrote:
>  >  > > It's an rpmbuild --rebuild of Fedora's strace-4.18-1.fc24.src.rpm, 
> but according to the
>  >  > > build log the following should do it:
>  >  > >
>  >  > > export CFLAGS='-O2 -g -pipe -Wall -Werror=format-security 
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
> --param=ssp-buffer-size=4 -grecord-gcc-switches  -m32 -mcpu=ultrasparc'
>  >  > > ./configure --build=sparcv9-unknown-linux-gnu 
> --host=sparcv9-unknown-linux-gnu --program-prefix= 
> --disable-dependency-tracking --prefix=/usr --exec-prefix=/u
>  >  > > sr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc 
> --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib 
> --libexecdir=/usr/libexec --local
>  >  > > statedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man 
> --infodir=/usr/share/info
>  >  > > make -j2
>  >  > > make -j2 -k check VERBOSE=1
>  >  >
>  >  > cant' reproduce it here on debian sparc64 LDOM:
>  >
>  > DaveM was also unable to reproduce it.
>  >
>  > I'll be investigating a possible kernel miscompile next.
>
> I don't think it's a miscompile.
>
> First I recompiled 4.13-rc2 with each of gcc-7, gcc-6, and gcc-5, each
> bootstrapped and regtested from the head of the respective FSF GCC branch:
> no change, kernel 4.11 works while kernels >= 4.12 OOPS.  So a miscompile
> seems unlikely.
>
> Then I ran a git bisect between v4.11 (good) and v4.12 (bad), booting
> each kernel and trying the problematic strace test binaries.  That
> identified the following as the first bad commit:
>
> commit 31af2f36d50e3b9b2fb7f17aa430c11c91f946c4
> Author: Al Viro <v...@zeniv.linux.org.uk>
> Date:   Tue Mar 21 17:04:45 2017 -0400
>
> sparc: switch to RAW_COPY_USER
>
> ... and drop zeroing in sparc32.
>
> Signed-off-by: Al Viro <v...@zeniv.linux.org.uk>
>
> That touches the CPU model specific assembly code in arch/sparc/lib/ for
> copy_{to,from}_user and changes how it's wired into the rest of the kernel.
> There's different code for different UltraSPARC and Niagara generations,
> so if there is a bug in e.g. the USIII code, you won't see it on Niagara.

Just to let you know, just reproduced this OOPS on my v215 debian sparc64:

Aug 01 00:34:56 v215 kernel: capability: warning: `caps' uses
deprecated v2 capabilities in a way that may be insecure
Aug 01 00:34:56 v215 kernel: capability: warning: `caps' uses 32-bit
capabilities (legacy support in use)
Aug 01 00:35:00 v215 kernel: Netfilter messages via NETLINK v0.30.
Aug 01 00:35:00 v215 kernel: Initializing XFRM netlink socket
Aug 01 00:35:09 v215 kernel: mmap: remap_file_page (1155) uses
deprecated remap_file_pages() syscall. See
Documentation/vm/remap_file_pages.txt.
Aug 01 00:35:10 v215 kernel: Unable to handle kernel NULL pointer dereference
Aug 01 00:35:10 v215 kernel: tsk->{mm,active_mm}->context = 0de6
Aug 01 00:35:10 v215 kernel: tsk->{mm,active_mm}->pgd = fff000123d478000
Aug 01 00:35:10 v215 kernel:   \|/  \|/
   "@'/ .. \`@"
   /_| \__/ |_\
  \__U_/
Aug 01 00:35:11 v215 kernel: sched_xetattr(1527): Oops [#1]
Aug 01 00:35:11 v215 kernel: CPU: 1 PID: 1527 Comm: sched_xetattr Not
tainted 4.12.0 #365
Aug 01 00:35:11 v215 kernel: task: fff0001231d41340 task.stack: fff000123dfc4000
Aug 01 00:35:11 v215 kernel: TSTATE: 004411001604 TPC:
00a121fc TNPC: 00a12210 Y: Not tainted
Aug 01 00:35:11 v215 kernel: TPC: <__bzero+0x20/0xc0>
Aug 01 00:35:11 v215 kernel: g0: fff000123dfc7d20 g1: 
g2: 0030 g3: 
Aug 01 00:35:11 v215 kernel: g4: fff0001231d41340 g5: fff000123ed08000
g6: fff000123dfc4000 g7: 0030
Aug 01 00:35:11 v215 kernel: o0: 0030 o1: fff000123dfc7e70
o2:  o3: 0030
Aug 01 00:35:11 v215 kernel: o4: fff000123dfc7e70 o5: 000a
sp: fff000123dfc75c1 ret_pc: 0049b294
Aug 01 00:35:11 v215 kernel: RPC: <SyS_sched_setattr+0x174/0x1a0>
Aug 01 00:35:11 v215 kernel: l0:  l1: 
l2:  l3: 
Aug 01 00:35:11 v215 kernel: l4:  l5: 
l6:  l7: f7d58000
Aug 01 00:35:12 v215 kernel: i0:  i1: f7bc5ffc
i2:  i3: fff000123dfc7e70
Aug 01 00:35:12

Re: strace-4.18 test suite oopses sparc64 4.12 and 4.13-rc kernels

2017-07-31 Thread Anatoly Pugachev
On Mon, Jul 31, 2017 at 8:14 PM, Mikael Pettersson  wrote:
> Mikael Pettersson writes:
>  > Anatoly Pugachev writes:
>  >  > On Fri, Jul 28, 2017 at 11:45 AM, Mikael Pettersson
>  >  >  wrote:
>  >  > > It's an rpmbuild --rebuild of Fedora's strace-4.18-1.fc24.src.rpm, 
> but according to the
>  >  > > build log the following should do it:
>  >  > >
>  >  > > export CFLAGS='-O2 -g -pipe -Wall -Werror=format-security 
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
> --param=ssp-buffer-size=4 -grecord-gcc-switches  -m32 -mcpu=ultrasparc'
>  >  > > ./configure --build=sparcv9-unknown-linux-gnu 
> --host=sparcv9-unknown-linux-gnu --program-prefix= 
> --disable-dependency-tracking --prefix=/usr --exec-prefix=/u
>  >  > > sr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc 
> --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib 
> --libexecdir=/usr/libexec --local
>  >  > > statedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man 
> --infodir=/usr/share/info
>  >  > > make -j2
>  >  > > make -j2 -k check VERBOSE=1
>  >  >
>  >  > cant' reproduce it here on debian sparc64 LDOM:
>  >
>  > DaveM was also unable to reproduce it.
>  >
>  > I'll be investigating a possible kernel miscompile next.
>
> I don't think it's a miscompile.
>
> First I recompiled 4.13-rc2 with each of gcc-7, gcc-6, and gcc-5, each
> bootstrapped and regtested from the head of the respective FSF GCC branch:
> no change, kernel 4.11 works while kernels >= 4.12 OOPS.  So a miscompile
> seems unlikely.
>
> Then I ran a git bisect between v4.11 (good) and v4.12 (bad), booting
> each kernel and trying the problematic strace test binaries.  That
> identified the following as the first bad commit:
>
> commit 31af2f36d50e3b9b2fb7f17aa430c11c91f946c4
> Author: Al Viro 
> Date:   Tue Mar 21 17:04:45 2017 -0400
>
> sparc: switch to RAW_COPY_USER
>
> ... and drop zeroing in sparc32.
>
> Signed-off-by: Al Viro 
>
> That touches the CPU model specific assembly code in arch/sparc/lib/ for
> copy_{to,from}_user and changes how it's wired into the rest of the kernel.
> There's different code for different UltraSPARC and Niagara generations,
> so if there is a bug in e.g. the USIII code, you won't see it on Niagara.

Just to let you know, just reproduced this OOPS on my v215 debian sparc64:

Aug 01 00:34:56 v215 kernel: capability: warning: `caps' uses
deprecated v2 capabilities in a way that may be insecure
Aug 01 00:34:56 v215 kernel: capability: warning: `caps' uses 32-bit
capabilities (legacy support in use)
Aug 01 00:35:00 v215 kernel: Netfilter messages via NETLINK v0.30.
Aug 01 00:35:00 v215 kernel: Initializing XFRM netlink socket
Aug 01 00:35:09 v215 kernel: mmap: remap_file_page (1155) uses
deprecated remap_file_pages() syscall. See
Documentation/vm/remap_file_pages.txt.
Aug 01 00:35:10 v215 kernel: Unable to handle kernel NULL pointer dereference
Aug 01 00:35:10 v215 kernel: tsk->{mm,active_mm}->context = 0de6
Aug 01 00:35:10 v215 kernel: tsk->{mm,active_mm}->pgd = fff000123d478000
Aug 01 00:35:10 v215 kernel:   \|/  \|/
   "@'/ .. \`@"
   /_| \__/ |_\
  \__U_/
Aug 01 00:35:11 v215 kernel: sched_xetattr(1527): Oops [#1]
Aug 01 00:35:11 v215 kernel: CPU: 1 PID: 1527 Comm: sched_xetattr Not
tainted 4.12.0 #365
Aug 01 00:35:11 v215 kernel: task: fff0001231d41340 task.stack: fff000123dfc4000
Aug 01 00:35:11 v215 kernel: TSTATE: 004411001604 TPC:
00a121fc TNPC: 00a12210 Y: Not tainted
Aug 01 00:35:11 v215 kernel: TPC: <__bzero+0x20/0xc0>
Aug 01 00:35:11 v215 kernel: g0: fff000123dfc7d20 g1: 
g2: 0030 g3: 
Aug 01 00:35:11 v215 kernel: g4: fff0001231d41340 g5: fff000123ed08000
g6: fff000123dfc4000 g7: 0030
Aug 01 00:35:11 v215 kernel: o0: 0030 o1: fff000123dfc7e70
o2:  o3: 0030
Aug 01 00:35:11 v215 kernel: o4: fff000123dfc7e70 o5: 000a
sp: fff000123dfc75c1 ret_pc: 0049b294
Aug 01 00:35:11 v215 kernel: RPC: 
Aug 01 00:35:11 v215 kernel: l0:  l1: 
l2:  l3: 
Aug 01 00:35:11 v215 kernel: l4:  l5: 
l6:  l7: f7d58000
Aug 01 00:35:12 v215 kernel: i0:  i1: f7bc5ffc
i2:  i3: fff000123dfc7e70
Aug 01 00:35:12 v215 kernel: i4:  i5: fff000123dfc7e70
i6: fff000123dfc76a1 i7: 004061b4
Aug 01 00:35:12 v215 kernel: I7: 
Aug 01 00:35:12 v215 kern

Re: strace-4.18 test suite oopses sparc64 4.12 and 4.13-rc kernels

2017-07-29 Thread Anatoly Pugachev
On Fri, Jul 28, 2017 at 11:45 AM, Mikael Pettersson
 wrote:
> It's an rpmbuild --rebuild of Fedora's strace-4.18-1.fc24.src.rpm, but 
> according to the
> build log the following should do it:
>
> export CFLAGS='-O2 -g -pipe -Wall -Werror=format-security 
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
> --param=ssp-buffer-size=4 -grecord-gcc-switches  -m32 -mcpu=ultrasparc'
> ./configure --build=sparcv9-unknown-linux-gnu 
> --host=sparcv9-unknown-linux-gnu --program-prefix= 
> --disable-dependency-tracking --prefix=/usr --exec-prefix=/u
> sr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc 
> --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib 
> --libexecdir=/usr/libexec --local
> statedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man 
> --infodir=/usr/share/info
> make -j2
> make -j2 -k check VERBOSE=1

cant' reproduce it here on debian sparc64 LDOM:

used git version of strace ( https://github.com/strace/strace )

strace$ make -j24 check VERBOSE=1
...

Testsuite summary for strace 4.18.0.134.805d

# TOTAL: 443
# PASS:  389
# SKIP:  40
# XFAIL: 0
# FAIL:  14
# XPASS: 0
# ERROR: 0


while in kernel logs (journalctl -k -f):

Jul 29 12:49:22 ttip kernel: mmap: remap_file_page (77341) uses
deprecated remap_file_pages() syscall. See
Documentation/vm/remap_file_pages.txt.
Jul 29 12:49:22 ttip kernel: capability: warning: `caps' uses
deprecated v2 capabilities in a way that may be insecure
Jul 29 12:49:22 ttip kernel: capability: warning: `caps' uses 32-bit
capabilities (legacy support in use)
Jul 29 12:49:22 ttip kernel: [ cut here ]
Jul 29 12:49:22 ttip kernel: WARNING: CPU: 18 PID: 78388 at
arch/sparc/kernel/sys_sparc32.c:150
compat_SyS_sparc_sigaction+0x3c/0x60
Jul 29 12:49:22 ttip kernel: Modules linked in: tcp_diag inet_diag
xfrm_user xfrm_algo nfnetlink netlink_diag xt_tcpudp xt_multiport
xt_conntrack tun iptable_filter iptable_nat nf_conntrack_ipv4
nf_defrag_ipv4 nf_nat_ipv4 xfs camellia_sparc64 des_sparc64
des_generic aes_sparc64 n2_rng md5_sparc64 rng_core flash
sha512_sparc64 sha256_sparc64 sha1_sparc64 nf_nat_pptp
nf_nat_proto_gre nf_conntrack_pptp nf_conntrack_proto_gre nf_nat
nf_conntrack libcrc32c crc32c_generic ip_tables x_tables autofs4 ext4
crc16 mbcache jbd2 crc32c_sparc64
Jul 29 12:49:22 ttip kernel: CPU: 18 PID: 78388 Comm: sigaction Not
tainted 4.13.0-rc2-00220-g0a07b238e5f4 #376
Jul 29 12:49:22 ttip kernel: Call Trace:
Jul 29 12:49:22 ttip kernel:  [0046c074] __warn+0xb4/0xe0
Jul 29 12:49:22 ttip kernel:  [0046c120] warn_slowpath_null+0x20/0x40
Jul 29 12:49:22 ttip kernel:  [0044b7bc]
compat_SyS_sparc_sigaction+0x3c/0x60
Jul 29 12:49:22 ttip kernel:  [004061d4] linux_sparc_syscall32+0x34/0x60
Jul 29 12:49:22 ttip kernel: ---[ end trace 1ad5184278304e6d ]---
Jul 29 12:49:25 ttip kernel: pc[83378]: segfault at 7974 ip
7974 (rpc 796c) sp ffdd9438 error
30001 in pc[7001+2000]


Re: strace-4.18 test suite oopses sparc64 4.12 and 4.13-rc kernels

2017-07-29 Thread Anatoly Pugachev
On Fri, Jul 28, 2017 at 11:45 AM, Mikael Pettersson
 wrote:
> It's an rpmbuild --rebuild of Fedora's strace-4.18-1.fc24.src.rpm, but 
> according to the
> build log the following should do it:
>
> export CFLAGS='-O2 -g -pipe -Wall -Werror=format-security 
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
> --param=ssp-buffer-size=4 -grecord-gcc-switches  -m32 -mcpu=ultrasparc'
> ./configure --build=sparcv9-unknown-linux-gnu 
> --host=sparcv9-unknown-linux-gnu --program-prefix= 
> --disable-dependency-tracking --prefix=/usr --exec-prefix=/u
> sr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc 
> --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib 
> --libexecdir=/usr/libexec --local
> statedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man 
> --infodir=/usr/share/info
> make -j2
> make -j2 -k check VERBOSE=1

cant' reproduce it here on debian sparc64 LDOM:

used git version of strace ( https://github.com/strace/strace )

strace$ make -j24 check VERBOSE=1
...

Testsuite summary for strace 4.18.0.134.805d

# TOTAL: 443
# PASS:  389
# SKIP:  40
# XFAIL: 0
# FAIL:  14
# XPASS: 0
# ERROR: 0


while in kernel logs (journalctl -k -f):

Jul 29 12:49:22 ttip kernel: mmap: remap_file_page (77341) uses
deprecated remap_file_pages() syscall. See
Documentation/vm/remap_file_pages.txt.
Jul 29 12:49:22 ttip kernel: capability: warning: `caps' uses
deprecated v2 capabilities in a way that may be insecure
Jul 29 12:49:22 ttip kernel: capability: warning: `caps' uses 32-bit
capabilities (legacy support in use)
Jul 29 12:49:22 ttip kernel: [ cut here ]
Jul 29 12:49:22 ttip kernel: WARNING: CPU: 18 PID: 78388 at
arch/sparc/kernel/sys_sparc32.c:150
compat_SyS_sparc_sigaction+0x3c/0x60
Jul 29 12:49:22 ttip kernel: Modules linked in: tcp_diag inet_diag
xfrm_user xfrm_algo nfnetlink netlink_diag xt_tcpudp xt_multiport
xt_conntrack tun iptable_filter iptable_nat nf_conntrack_ipv4
nf_defrag_ipv4 nf_nat_ipv4 xfs camellia_sparc64 des_sparc64
des_generic aes_sparc64 n2_rng md5_sparc64 rng_core flash
sha512_sparc64 sha256_sparc64 sha1_sparc64 nf_nat_pptp
nf_nat_proto_gre nf_conntrack_pptp nf_conntrack_proto_gre nf_nat
nf_conntrack libcrc32c crc32c_generic ip_tables x_tables autofs4 ext4
crc16 mbcache jbd2 crc32c_sparc64
Jul 29 12:49:22 ttip kernel: CPU: 18 PID: 78388 Comm: sigaction Not
tainted 4.13.0-rc2-00220-g0a07b238e5f4 #376
Jul 29 12:49:22 ttip kernel: Call Trace:
Jul 29 12:49:22 ttip kernel:  [0046c074] __warn+0xb4/0xe0
Jul 29 12:49:22 ttip kernel:  [0046c120] warn_slowpath_null+0x20/0x40
Jul 29 12:49:22 ttip kernel:  [0044b7bc]
compat_SyS_sparc_sigaction+0x3c/0x60
Jul 29 12:49:22 ttip kernel:  [004061d4] linux_sparc_syscall32+0x34/0x60
Jul 29 12:49:22 ttip kernel: ---[ end trace 1ad5184278304e6d ]---
Jul 29 12:49:25 ttip kernel: pc[83378]: segfault at 7974 ip
7974 (rpc 796c) sp ffdd9438 error
30001 in pc[7001+2000]


Re: sparc gcc 7.1 compile issue

2017-06-01 Thread Anatoly Pugachev
on the same topic , latest git does not compile for me with gcc-7.0.1
gcc version 7.0.1 20170407 (experimental) [trunk revision 246759]
(Debian 7-20170407-1)

$ make
...
  CC  arch/sparc/kernel/ds.o
arch/sparc/kernel/ds.c: In function ‘register_services’:
arch/sparc/kernel/ds.c:912:3: error: ‘strcpy’: writing at least 1 byte
into a region of size 0 overflows the destination
[-Werror=stringop-overflow ]
   strcpy(pbuf.req.svc_id, cp->service_id);
   ^~~
cc1: all warnings being treated as errors
scripts/Makefile.build:302: recipe for target 'arch/sparc/kernel/ds.o' failed
make[2]: *** [arch/sparc/kernel/ds.o] Error 1
scripts/Makefile.build:561: recipe for target 'arch/sparc/kernel' failed
make[1]: *** [arch/sparc/kernel] Error 2
Makefile:1016: recipe for target 'arch/sparc' failed
make: *** [arch/sparc] Error 2

I'm able to pass arch/sparc/kernel/ compilation, if I change/add to
arch/sparc/kernel/Makefile :

-ccflags-y := -Werror
+ccflags-y := -Werror -Wno-error=stringop-overflow

but even with that hack, i'm unable to compile kernel, getting in the
end of make:
...
  LD  init/built-in.o
  LD  vmlinux.o
  MODPOST vmlinux.o
ipc/built-in.o: In function `mq_attr_ok.isra.0':
mqueue.c:(.text+0xc490): undefined reference to `__multi3'
drivers/built-in.o: In function `dm_vcalloc':
(.text+0xc9e98): undefined reference to `__multi3'
Makefile:997: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1


Re: sparc gcc 7.1 compile issue

2017-06-01 Thread Anatoly Pugachev
on the same topic , latest git does not compile for me with gcc-7.0.1
gcc version 7.0.1 20170407 (experimental) [trunk revision 246759]
(Debian 7-20170407-1)

$ make
...
  CC  arch/sparc/kernel/ds.o
arch/sparc/kernel/ds.c: In function ‘register_services’:
arch/sparc/kernel/ds.c:912:3: error: ‘strcpy’: writing at least 1 byte
into a region of size 0 overflows the destination
[-Werror=stringop-overflow ]
   strcpy(pbuf.req.svc_id, cp->service_id);
   ^~~
cc1: all warnings being treated as errors
scripts/Makefile.build:302: recipe for target 'arch/sparc/kernel/ds.o' failed
make[2]: *** [arch/sparc/kernel/ds.o] Error 1
scripts/Makefile.build:561: recipe for target 'arch/sparc/kernel' failed
make[1]: *** [arch/sparc/kernel] Error 2
Makefile:1016: recipe for target 'arch/sparc' failed
make: *** [arch/sparc] Error 2

I'm able to pass arch/sparc/kernel/ compilation, if I change/add to
arch/sparc/kernel/Makefile :

-ccflags-y := -Werror
+ccflags-y := -Werror -Wno-error=stringop-overflow

but even with that hack, i'm unable to compile kernel, getting in the
end of make:
...
  LD  init/built-in.o
  LD  vmlinux.o
  MODPOST vmlinux.o
ipc/built-in.o: In function `mq_attr_ok.isra.0':
mqueue.c:(.text+0xc490): undefined reference to `__multi3'
drivers/built-in.o: In function `dm_vcalloc':
(.text+0xc9e98): undefined reference to `__multi3'
Makefile:997: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1


Re: Build regressions/improvements in v4.9-rc7

2016-11-29 Thread Anatoly Pugachev
On Mon, Nov 28, 2016 at 11:43 PM, David Miller <da...@davemloft.net> wrote:
> From: Anatoly Pugachev <mator...@gmail.com>
> Date: Mon, 28 Nov 2016 23:40:34 +0300
>
>> On Mon, Nov 28, 2016 at 5:29 PM, Geert Uytterhoeven
>> <ge...@linux-m68k.org> wrote:
>>> On Mon, Nov 28, 2016 at 3:27 PM, Geert Uytterhoeven
>>> <ge...@linux-m68k.org> wrote:
>>>> JFYI, when comparing v4.9-rc7[1] to v4.9-rc6[3], the summaries are:
>>>>   - build errors: +10/-4
>>>
>>>   + /home/kisskb/slave/src/drivers/scsi/qlogicpti.c: error: passing
>>> argument 3 of 'dma_alloc_coherent' from incompatible pointer type
>>> [-Werror=incompatible-pointer-types]:  => 813:9, 822:9
>>>   + /home/kisskb/slave/src/sound/sparc/dbri.c: error: passing argument
>>> 3 of 'dma_zalloc_coherent' from incompatible pointer type
>>> [-Werror=incompatible-pointer-types]:  => 2538:6
>>>
>>> sparc64-allmodconfig
>>>
>>>> [1] 
>>>> http://kisskb.ellerman.id.au/kisskb/head/e5517c2a5a49ed5e99047008629f1cd60246ea0e/
>>>>  (all 267 configs)
>>>> [3] 
>>>> http://kisskb.ellerman.id.au/kisskb/head/9c763584b7c8911106bb77af7e648bef09af9d80/
>>>>  (all 267 configs)
>>
>> I'm unable to compile kernel as well, bisected in between 4.9-rc7
>> (bad) and 4.9-rc6 (good):
>
> We know about these problems and are working on it.

Latest git (v4.9-rc7-7-g88abd82) fixes kernel compile issue for me.
Thanks.


Re: Build regressions/improvements in v4.9-rc7

2016-11-29 Thread Anatoly Pugachev
On Mon, Nov 28, 2016 at 11:43 PM, David Miller  wrote:
> From: Anatoly Pugachev 
> Date: Mon, 28 Nov 2016 23:40:34 +0300
>
>> On Mon, Nov 28, 2016 at 5:29 PM, Geert Uytterhoeven
>>  wrote:
>>> On Mon, Nov 28, 2016 at 3:27 PM, Geert Uytterhoeven
>>>  wrote:
>>>> JFYI, when comparing v4.9-rc7[1] to v4.9-rc6[3], the summaries are:
>>>>   - build errors: +10/-4
>>>
>>>   + /home/kisskb/slave/src/drivers/scsi/qlogicpti.c: error: passing
>>> argument 3 of 'dma_alloc_coherent' from incompatible pointer type
>>> [-Werror=incompatible-pointer-types]:  => 813:9, 822:9
>>>   + /home/kisskb/slave/src/sound/sparc/dbri.c: error: passing argument
>>> 3 of 'dma_zalloc_coherent' from incompatible pointer type
>>> [-Werror=incompatible-pointer-types]:  => 2538:6
>>>
>>> sparc64-allmodconfig
>>>
>>>> [1] 
>>>> http://kisskb.ellerman.id.au/kisskb/head/e5517c2a5a49ed5e99047008629f1cd60246ea0e/
>>>>  (all 267 configs)
>>>> [3] 
>>>> http://kisskb.ellerman.id.au/kisskb/head/9c763584b7c8911106bb77af7e648bef09af9d80/
>>>>  (all 267 configs)
>>
>> I'm unable to compile kernel as well, bisected in between 4.9-rc7
>> (bad) and 4.9-rc6 (good):
>
> We know about these problems and are working on it.

Latest git (v4.9-rc7-7-g88abd82) fixes kernel compile issue for me.
Thanks.


Re: Build regressions/improvements in v4.9-rc7

2016-11-28 Thread Anatoly Pugachev
On Mon, Nov 28, 2016 at 5:29 PM, Geert Uytterhoeven
 wrote:
> On Mon, Nov 28, 2016 at 3:27 PM, Geert Uytterhoeven
>  wrote:
>> JFYI, when comparing v4.9-rc7[1] to v4.9-rc6[3], the summaries are:
>>   - build errors: +10/-4
>
>   + /home/kisskb/slave/src/drivers/scsi/qlogicpti.c: error: passing
> argument 3 of 'dma_alloc_coherent' from incompatible pointer type
> [-Werror=incompatible-pointer-types]:  => 813:9, 822:9
>   + /home/kisskb/slave/src/sound/sparc/dbri.c: error: passing argument
> 3 of 'dma_zalloc_coherent' from incompatible pointer type
> [-Werror=incompatible-pointer-types]:  => 2538:6
>
> sparc64-allmodconfig
>
>> [1] 
>> http://kisskb.ellerman.id.au/kisskb/head/e5517c2a5a49ed5e99047008629f1cd60246ea0e/
>>  (all 267 configs)
>> [3] 
>> http://kisskb.ellerman.id.au/kisskb/head/9c763584b7c8911106bb77af7e648bef09af9d80/
>>  (all 267 configs)

I'm unable to compile kernel as well, bisected in between 4.9-rc7
(bad) and 4.9-rc6 (good):

$ git bisect start
... (compile iterations)
$ git bisect  good
d30a6b84df00128e03588564925dc828a53e6865 is the first bad commit
commit d30a6b84df00128e03588564925dc828a53e6865
Author: Tushar Dave 
Date:   Fri Oct 28 10:12:45 2016 -0700

sparc64: Enable 64-bit DMA

ATU 64bit addressing allows PCIe devices with 64bit DMA capabilities
to use ATU for 64bit DMA.

Signed-off-by: Tushar Dave 
Reviewed-by: chris hyser 
Acked-by: Sowmini Varadhan 
Signed-off-by: David S. Miller 

:04 04 abde3a8ed14eebe2b73645787b570ba41310530c
be19f6854a06402f2b629b7b7b46babcbbc6f516 M  arch

$ git bisect log
git bisect start
# bad: [e5517c2a5a49ed5e99047008629f1cd60246ea0e] Linux 4.9-rc7
git bisect bad e5517c2a5a49ed5e99047008629f1cd60246ea0e
# good: [9c763584b7c8911106bb77af7e648bef09af9d80] Linux 4.9-rc6
git bisect good 9c763584b7c8911106bb77af7e648bef09af9d80
# bad: [ded9b5dd205ef04aa095c3b731c635b201191a59] Merge branch
'perf-urgent-for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect bad ded9b5dd205ef04aa095c3b731c635b201191a59
# good: [3f0ae05d6fea0ed5b19efdbc9c9f8e02685a3af3] rtnl: fix the loop
index update error in rtnl_dump_ifinfo()
git bisect good 3f0ae05d6fea0ed5b19efdbc9c9f8e02685a3af3
# bad: [8e5bfa8c1f8471aa4a2d30be631ef2b50e10abaf] sched/autogroup: Do
not use autogroup->tg in zombie threads
git bisect bad 8e5bfa8c1f8471aa4a2d30be631ef2b50e10abaf
# bad: [e6b5f1be7afe1657c40c08082c562b1a036a54c1] config: Adding the
new config parameter CONFIG_PROVE_LOCKING_SMALL for sparc
git bisect bad e6b5f1be7afe1657c40c08082c562b1a036a54c1
# good: [31f077dc7dffd4a444932a9fe7fe84d9c7b90b73] sparc64: Initialize
iommu_map_table and iommu_pool
git bisect good 31f077dc7dffd4a444932a9fe7fe84d9c7b90b73
# bad: [d30a6b84df00128e03588564925dc828a53e6865] sparc64: Enable 64-bit DMA
git bisect bad d30a6b84df00128e03588564925dc828a53e6865
# good: [f08978b0fdbf37d3c91efb60a20bdee3ba8f59c6] sparc64: Enable
sun4v dma ops to use IOMMU v2 APIs
git bisect good f08978b0fdbf37d3c91efb60a20bdee3ba8f59c6
# first bad commit: [d30a6b84df00128e03588564925dc828a53e6865]
sparc64: Enable 64-bit DMA


Re: Build regressions/improvements in v4.9-rc7

2016-11-28 Thread Anatoly Pugachev
On Mon, Nov 28, 2016 at 5:29 PM, Geert Uytterhoeven
 wrote:
> On Mon, Nov 28, 2016 at 3:27 PM, Geert Uytterhoeven
>  wrote:
>> JFYI, when comparing v4.9-rc7[1] to v4.9-rc6[3], the summaries are:
>>   - build errors: +10/-4
>
>   + /home/kisskb/slave/src/drivers/scsi/qlogicpti.c: error: passing
> argument 3 of 'dma_alloc_coherent' from incompatible pointer type
> [-Werror=incompatible-pointer-types]:  => 813:9, 822:9
>   + /home/kisskb/slave/src/sound/sparc/dbri.c: error: passing argument
> 3 of 'dma_zalloc_coherent' from incompatible pointer type
> [-Werror=incompatible-pointer-types]:  => 2538:6
>
> sparc64-allmodconfig
>
>> [1] 
>> http://kisskb.ellerman.id.au/kisskb/head/e5517c2a5a49ed5e99047008629f1cd60246ea0e/
>>  (all 267 configs)
>> [3] 
>> http://kisskb.ellerman.id.au/kisskb/head/9c763584b7c8911106bb77af7e648bef09af9d80/
>>  (all 267 configs)

I'm unable to compile kernel as well, bisected in between 4.9-rc7
(bad) and 4.9-rc6 (good):

$ git bisect start
... (compile iterations)
$ git bisect  good
d30a6b84df00128e03588564925dc828a53e6865 is the first bad commit
commit d30a6b84df00128e03588564925dc828a53e6865
Author: Tushar Dave 
Date:   Fri Oct 28 10:12:45 2016 -0700

sparc64: Enable 64-bit DMA

ATU 64bit addressing allows PCIe devices with 64bit DMA capabilities
to use ATU for 64bit DMA.

Signed-off-by: Tushar Dave 
Reviewed-by: chris hyser 
Acked-by: Sowmini Varadhan 
Signed-off-by: David S. Miller 

:04 04 abde3a8ed14eebe2b73645787b570ba41310530c
be19f6854a06402f2b629b7b7b46babcbbc6f516 M  arch

$ git bisect log
git bisect start
# bad: [e5517c2a5a49ed5e99047008629f1cd60246ea0e] Linux 4.9-rc7
git bisect bad e5517c2a5a49ed5e99047008629f1cd60246ea0e
# good: [9c763584b7c8911106bb77af7e648bef09af9d80] Linux 4.9-rc6
git bisect good 9c763584b7c8911106bb77af7e648bef09af9d80
# bad: [ded9b5dd205ef04aa095c3b731c635b201191a59] Merge branch
'perf-urgent-for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect bad ded9b5dd205ef04aa095c3b731c635b201191a59
# good: [3f0ae05d6fea0ed5b19efdbc9c9f8e02685a3af3] rtnl: fix the loop
index update error in rtnl_dump_ifinfo()
git bisect good 3f0ae05d6fea0ed5b19efdbc9c9f8e02685a3af3
# bad: [8e5bfa8c1f8471aa4a2d30be631ef2b50e10abaf] sched/autogroup: Do
not use autogroup->tg in zombie threads
git bisect bad 8e5bfa8c1f8471aa4a2d30be631ef2b50e10abaf
# bad: [e6b5f1be7afe1657c40c08082c562b1a036a54c1] config: Adding the
new config parameter CONFIG_PROVE_LOCKING_SMALL for sparc
git bisect bad e6b5f1be7afe1657c40c08082c562b1a036a54c1
# good: [31f077dc7dffd4a444932a9fe7fe84d9c7b90b73] sparc64: Initialize
iommu_map_table and iommu_pool
git bisect good 31f077dc7dffd4a444932a9fe7fe84d9c7b90b73
# bad: [d30a6b84df00128e03588564925dc828a53e6865] sparc64: Enable 64-bit DMA
git bisect bad d30a6b84df00128e03588564925dc828a53e6865
# good: [f08978b0fdbf37d3c91efb60a20bdee3ba8f59c6] sparc64: Enable
sun4v dma ops to use IOMMU v2 APIs
git bisect good f08978b0fdbf37d3c91efb60a20bdee3ba8f59c6
# first bad commit: [d30a6b84df00128e03588564925dc828a53e6865]
sparc64: Enable 64-bit DMA


Re: 4.7-rc6, ext4, sparc64: Unable to handle kernel paging request at ...

2016-07-04 Thread Anatoly Pugachev
On Mon, Jul 4, 2016 at 2:36 PM, Meelis Roos  wrote:
> Just got this on bootup of my Sun T2000:
>...
> I have not seen it before, this includes 4.6.0 4.6.0-08907-g7639dad
> 4.7.0-rc1-00094-g6b15d66 4.7.0-rc4-00014-g67016f6.
>
> It is not reproducible, did not appear on next reboot of the same
> kernel.


mine T5120 boots ok 4.7.0-rc6, rootfs being on ext4 .


Re: 4.7-rc6, ext4, sparc64: Unable to handle kernel paging request at ...

2016-07-04 Thread Anatoly Pugachev
On Mon, Jul 4, 2016 at 2:36 PM, Meelis Roos  wrote:
> Just got this on bootup of my Sun T2000:
>...
> I have not seen it before, this includes 4.6.0 4.6.0-08907-g7639dad
> 4.7.0-rc1-00094-g6b15d66 4.7.0-rc4-00014-g67016f6.
>
> It is not reproducible, did not appear on next reboot of the same
> kernel.


mine T5120 boots ok 4.7.0-rc6, rootfs being on ext4 .


Re: 4.6-rc*: Kernel unaligned access at pci_bus_read_config_dword+0x64/0x80

2016-06-16 Thread Anatoly Pugachev
On Wed, Jun 15, 2016 at 1:38 AM, Anatoly Pugachev <mator...@gmail.com> wrote:
> On Tue, Jun 14, 2016 at 4:02 PM, Anatoly Pugachev <mator...@gmail.com> wrote:
>> On Mon, Jun 13, 2016 at 3:49 PM, Meelis Roos <mr...@linux.ee> wrote:
>>>> > Between 4.5.0 and 4.6.0-rc3, my Spar Enterprise T5120 has started
>>>> > showing the following messages during bootup:
>>> [...]
>>>>
>>>> got the same messages on my t5120 with kernel 4.6.1 :
>>> [...]
>>>> but 4.7.0-rc2+ (from git), does not have it, probably fixed.
>>>
>>> Nope, I still get them on 4.7-rc3:
>>>
>>> [ 4742.646120] Kernel unaligned access at TPC[6a5724] 
>>> pci_bus_read_config_dword+0x64/0x80
>>> [ 4742.646197] Kernel unaligned access at TPC[6a5724] 
>>> pci_bus_read_config_dword+0x64/0x80
>>> [ 4742.646265] Kernel unaligned access at TPC[6a5724] 
>>> pci_bus_read_config_dword+0x64/0x80
>>> [ 4742.646333] Kernel unaligned access at TPC[6a5724] 
>>> pci_bus_read_config_dword+0x64/0x80
>>> [ 4742.646401] Kernel unaligned access at TPC[6a5724] 
>>> pci_bus_read_config_dword+0x64/0x80
>>
>>
>> Still don't see it with current git (4.7.0-rc3+) kernel on my T5120.
>> Probably difference with kernel config file. Can you please share your
>> kernel config file, so I can try it on my t5120 ?
>
> Got config, compared and it was indeed different kernel config files.
> Tracked down it , that enabling CONFIG_PCIEPORTBUS=y makes this
> messages appear on my t5120 as well.

bisected to git commit 63e3027
(git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git),
which introduced CONFIG_PCIEPORTBUS as well this TPC on T5120.
Anything else I could do to fix that ?

Boot log with debug:

[0.00] PROMLIB: Sun IEEE Boot Prom 'OBP 4.33.6.g 2016/03/11 06:05'
[0.00] PROMLIB: Root node compatible: sun4v
[0.00] Linux version 4.5.0+ (mator@nvg5120) (gcc version 5.4.0
20160603 (Debian 5.4.0-3) ) #11 SMP Wed Jun 15 19:49:52 MSK 2016
[0.00] debug: skip boot console de-registration.
[0.00] bootconsole [earlyprom0] enabled
[0.00] ARCH: SUN4V
[0.00] Ethernet address: 00:14:4f:ac:4a:18
[0.00] MM: PAGE_OFFSET is 0x8000 (max_phys_bits == 39)
[0.00] MM: VMALLOC [0x0001 --> 0x6000]
[0.00] MM: VMEMMAP [0x6000 --> 0xc000]
[0.00] Kernel: Using 3 locked TLB entries for main kernel image.
[0.00] Remapping the kernel... done.
[0.00] OF stdout device is: /virtual-devices@100/console@1
[0.00] PROM: Built device tree with 195069 bytes of memory.
[0.00] MDESC: Size is 61728 bytes.
[0.00] PLATFORM: banner-name [SPARC Enterprise T5120]
[0.00] PLATFORM: name [SUNW,SPARC-Enterprise-T5120]
[0.00] PLATFORM: hostid [84ac4a18]
[0.00] PLATFORM: serial# [00ab4130]
[0.00] PLATFORM: stick-frequency [457646c0]
[0.00] PLATFORM: mac-address [144fac4a18]
[0.00] PLATFORM: watchdog-resolution [1000 ms]
[0.00] PLATFORM: watchdog-max-timeout [3153600 ms]
[0.00] PLATFORM: max-cpus [64]
[0.00] Top of RAM: 0x3ffb16000, Total RAM: 0x3f76ac000
[0.00] Memory hole size: 132MB
[0.00] Allocated 16384 bytes for kernel page tables.
[0.00] Zone ranges:
[0.00]   Normal   [mem 0x0840-0x0003ffb15fff]
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x0840-0x0003ffa89fff]
[0.00]   node   0: [mem 0x0003ffa9a000-0x0003ffaadfff]
[0.00]   node   0: [mem 0x0003ffb08000-0x0003ffb15fff]
[0.00] Initmem setup node 0 [mem 0x0840-0x0003ffb15fff]
[0.00] On node 0 totalpages: 2079574
[0.00]   Normal zone: 18278 pages used for memmap
[0.00]   Normal zone: 0 pages reserved
[0.00]   Normal zone: 2079574 pages, LIFO batch:15
[0.00] Booting Linux...
[0.00] CPU CAPS: [flush,stbar,swap,muldiv,v9,blkinit,n2,mul32]
[0.00] CPU CAPS: [div32,v8plus,popc,vis,vis2,ASIBlkInit]
[0.00] PERCPU: Embedded 8 pages/cpu @8003ff40 s28440
r8192 d28904 u65536
[0.00] pcpu-alloc: s28440 r8192 d28904 u65536 alloc=1*4194304
[0.00] pcpu-alloc: [0] 00 01 02 03 04 05 06 07 08 09 10 11 12
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
59 60 61 62 63
[0.00] SUN4V: Mondo queue sizes [cpu(8192) dev(16384) r(8192) nr(256)]
[0.00] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 2061296
[0.00] Kernel command line: root=/dev/mapper/vg1-root ro

Re: 4.6-rc*: Kernel unaligned access at pci_bus_read_config_dword+0x64/0x80

2016-06-16 Thread Anatoly Pugachev
On Wed, Jun 15, 2016 at 1:38 AM, Anatoly Pugachev  wrote:
> On Tue, Jun 14, 2016 at 4:02 PM, Anatoly Pugachev  wrote:
>> On Mon, Jun 13, 2016 at 3:49 PM, Meelis Roos  wrote:
>>>> > Between 4.5.0 and 4.6.0-rc3, my Spar Enterprise T5120 has started
>>>> > showing the following messages during bootup:
>>> [...]
>>>>
>>>> got the same messages on my t5120 with kernel 4.6.1 :
>>> [...]
>>>> but 4.7.0-rc2+ (from git), does not have it, probably fixed.
>>>
>>> Nope, I still get them on 4.7-rc3:
>>>
>>> [ 4742.646120] Kernel unaligned access at TPC[6a5724] 
>>> pci_bus_read_config_dword+0x64/0x80
>>> [ 4742.646197] Kernel unaligned access at TPC[6a5724] 
>>> pci_bus_read_config_dword+0x64/0x80
>>> [ 4742.646265] Kernel unaligned access at TPC[6a5724] 
>>> pci_bus_read_config_dword+0x64/0x80
>>> [ 4742.646333] Kernel unaligned access at TPC[6a5724] 
>>> pci_bus_read_config_dword+0x64/0x80
>>> [ 4742.646401] Kernel unaligned access at TPC[6a5724] 
>>> pci_bus_read_config_dword+0x64/0x80
>>
>>
>> Still don't see it with current git (4.7.0-rc3+) kernel on my T5120.
>> Probably difference with kernel config file. Can you please share your
>> kernel config file, so I can try it on my t5120 ?
>
> Got config, compared and it was indeed different kernel config files.
> Tracked down it , that enabling CONFIG_PCIEPORTBUS=y makes this
> messages appear on my t5120 as well.

bisected to git commit 63e3027
(git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git),
which introduced CONFIG_PCIEPORTBUS as well this TPC on T5120.
Anything else I could do to fix that ?

Boot log with debug:

[0.00] PROMLIB: Sun IEEE Boot Prom 'OBP 4.33.6.g 2016/03/11 06:05'
[0.00] PROMLIB: Root node compatible: sun4v
[0.00] Linux version 4.5.0+ (mator@nvg5120) (gcc version 5.4.0
20160603 (Debian 5.4.0-3) ) #11 SMP Wed Jun 15 19:49:52 MSK 2016
[0.00] debug: skip boot console de-registration.
[0.00] bootconsole [earlyprom0] enabled
[0.00] ARCH: SUN4V
[0.00] Ethernet address: 00:14:4f:ac:4a:18
[0.00] MM: PAGE_OFFSET is 0x8000 (max_phys_bits == 39)
[0.00] MM: VMALLOC [0x0001 --> 0x6000]
[0.00] MM: VMEMMAP [0x6000 --> 0xc000]
[0.00] Kernel: Using 3 locked TLB entries for main kernel image.
[0.00] Remapping the kernel... done.
[0.00] OF stdout device is: /virtual-devices@100/console@1
[0.00] PROM: Built device tree with 195069 bytes of memory.
[0.00] MDESC: Size is 61728 bytes.
[0.00] PLATFORM: banner-name [SPARC Enterprise T5120]
[0.00] PLATFORM: name [SUNW,SPARC-Enterprise-T5120]
[0.00] PLATFORM: hostid [84ac4a18]
[0.00] PLATFORM: serial# [00ab4130]
[0.00] PLATFORM: stick-frequency [457646c0]
[0.00] PLATFORM: mac-address [144fac4a18]
[0.00] PLATFORM: watchdog-resolution [1000 ms]
[0.00] PLATFORM: watchdog-max-timeout [3153600 ms]
[0.00] PLATFORM: max-cpus [64]
[0.00] Top of RAM: 0x3ffb16000, Total RAM: 0x3f76ac000
[0.00] Memory hole size: 132MB
[0.00] Allocated 16384 bytes for kernel page tables.
[0.00] Zone ranges:
[0.00]   Normal   [mem 0x0840-0x0003ffb15fff]
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x0840-0x0003ffa89fff]
[0.00]   node   0: [mem 0x0003ffa9a000-0x0003ffaadfff]
[0.00]   node   0: [mem 0x0003ffb08000-0x0003ffb15fff]
[0.00] Initmem setup node 0 [mem 0x0840-0x0003ffb15fff]
[0.00] On node 0 totalpages: 2079574
[0.00]   Normal zone: 18278 pages used for memmap
[0.00]   Normal zone: 0 pages reserved
[0.00]   Normal zone: 2079574 pages, LIFO batch:15
[0.00] Booting Linux...
[0.00] CPU CAPS: [flush,stbar,swap,muldiv,v9,blkinit,n2,mul32]
[0.00] CPU CAPS: [div32,v8plus,popc,vis,vis2,ASIBlkInit]
[0.00] PERCPU: Embedded 8 pages/cpu @8003ff40 s28440
r8192 d28904 u65536
[0.00] pcpu-alloc: s28440 r8192 d28904 u65536 alloc=1*4194304
[0.00] pcpu-alloc: [0] 00 01 02 03 04 05 06 07 08 09 10 11 12
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
59 60 61 62 63
[0.00] SUN4V: Mondo queue sizes [cpu(8192) dev(16384) r(8192) nr(256)]
[0.00] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 2061296
[0.00] Kernel command line: root=/dev/mapper/vg1-root ro
keep_bootcon console=ttyS0 noresume zswap.enabled=1 debug
[0.00] log_

Re: 4.6-rc*: Kernel unaligned access at pci_bus_read_config_dword+0x64/0x80

2016-06-14 Thread Anatoly Pugachev
On Tue, Jun 14, 2016 at 4:02 PM, Anatoly Pugachev <mator...@gmail.com> wrote:
> On Mon, Jun 13, 2016 at 3:49 PM, Meelis Roos <mr...@linux.ee> wrote:
>>> > Between 4.5.0 and 4.6.0-rc3, my Spar Enterprise T5120 has started
>>> > showing the following messages during bootup:
>> [...]
>>>
>>> got the same messages on my t5120 with kernel 4.6.1 :
>> [...]
>>> but 4.7.0-rc2+ (from git), does not have it, probably fixed.
>>
>> Nope, I still get them on 4.7-rc3:
>>
>> [ 4742.646120] Kernel unaligned access at TPC[6a5724] 
>> pci_bus_read_config_dword+0x64/0x80
>> [ 4742.646197] Kernel unaligned access at TPC[6a5724] 
>> pci_bus_read_config_dword+0x64/0x80
>> [ 4742.646265] Kernel unaligned access at TPC[6a5724] 
>> pci_bus_read_config_dword+0x64/0x80
>> [ 4742.646333] Kernel unaligned access at TPC[6a5724] 
>> pci_bus_read_config_dword+0x64/0x80
>> [ 4742.646401] Kernel unaligned access at TPC[6a5724] 
>> pci_bus_read_config_dword+0x64/0x80
>
>
> Still don't see it with current git (4.7.0-rc3+) kernel on my T5120.
> Probably difference with kernel config file. Can you please share your
> kernel config file, so I can try it on my t5120 ?

Got config, compared and it was indeed different kernel config files.
Tracked down it , that enabling CONFIG_PCIEPORTBUS=y makes this
messages appear on my t5120 as well.


Re: 4.6-rc*: Kernel unaligned access at pci_bus_read_config_dword+0x64/0x80

2016-06-14 Thread Anatoly Pugachev
On Tue, Jun 14, 2016 at 4:02 PM, Anatoly Pugachev  wrote:
> On Mon, Jun 13, 2016 at 3:49 PM, Meelis Roos  wrote:
>>> > Between 4.5.0 and 4.6.0-rc3, my Spar Enterprise T5120 has started
>>> > showing the following messages during bootup:
>> [...]
>>>
>>> got the same messages on my t5120 with kernel 4.6.1 :
>> [...]
>>> but 4.7.0-rc2+ (from git), does not have it, probably fixed.
>>
>> Nope, I still get them on 4.7-rc3:
>>
>> [ 4742.646120] Kernel unaligned access at TPC[6a5724] 
>> pci_bus_read_config_dword+0x64/0x80
>> [ 4742.646197] Kernel unaligned access at TPC[6a5724] 
>> pci_bus_read_config_dword+0x64/0x80
>> [ 4742.646265] Kernel unaligned access at TPC[6a5724] 
>> pci_bus_read_config_dword+0x64/0x80
>> [ 4742.646333] Kernel unaligned access at TPC[6a5724] 
>> pci_bus_read_config_dword+0x64/0x80
>> [ 4742.646401] Kernel unaligned access at TPC[6a5724] 
>> pci_bus_read_config_dword+0x64/0x80
>
>
> Still don't see it with current git (4.7.0-rc3+) kernel on my T5120.
> Probably difference with kernel config file. Can you please share your
> kernel config file, so I can try it on my t5120 ?

Got config, compared and it was indeed different kernel config files.
Tracked down it , that enabling CONFIG_PCIEPORTBUS=y makes this
messages appear on my t5120 as well.


Re: 4.6-rc*: Kernel unaligned access at pci_bus_read_config_dword+0x64/0x80

2016-06-14 Thread Anatoly Pugachev
On Mon, Jun 13, 2016 at 3:49 PM, Meelis Roos  wrote:
>> > Between 4.5.0 and 4.6.0-rc3, my Spar Enterprise T5120 has started
>> > showing the following messages during bootup:
> [...]
>>
>> got the same messages on my t5120 with kernel 4.6.1 :
> [...]
>> but 4.7.0-rc2+ (from git), does not have it, probably fixed.
>
> Nope, I still get them on 4.7-rc3:
>
> [ 4742.646120] Kernel unaligned access at TPC[6a5724] 
> pci_bus_read_config_dword+0x64/0x80
> [ 4742.646197] Kernel unaligned access at TPC[6a5724] 
> pci_bus_read_config_dword+0x64/0x80
> [ 4742.646265] Kernel unaligned access at TPC[6a5724] 
> pci_bus_read_config_dword+0x64/0x80
> [ 4742.646333] Kernel unaligned access at TPC[6a5724] 
> pci_bus_read_config_dword+0x64/0x80
> [ 4742.646401] Kernel unaligned access at TPC[6a5724] 
> pci_bus_read_config_dword+0x64/0x80


Still don't see it with current git (4.7.0-rc3+) kernel on my T5120.
Probably difference with kernel config file. Can you please share your
kernel config file, so I can try it on my t5120 ?

Thanks.


Re: 4.6-rc*: Kernel unaligned access at pci_bus_read_config_dword+0x64/0x80

2016-06-14 Thread Anatoly Pugachev
On Mon, Jun 13, 2016 at 3:49 PM, Meelis Roos  wrote:
>> > Between 4.5.0 and 4.6.0-rc3, my Spar Enterprise T5120 has started
>> > showing the following messages during bootup:
> [...]
>>
>> got the same messages on my t5120 with kernel 4.6.1 :
> [...]
>> but 4.7.0-rc2+ (from git), does not have it, probably fixed.
>
> Nope, I still get them on 4.7-rc3:
>
> [ 4742.646120] Kernel unaligned access at TPC[6a5724] 
> pci_bus_read_config_dword+0x64/0x80
> [ 4742.646197] Kernel unaligned access at TPC[6a5724] 
> pci_bus_read_config_dword+0x64/0x80
> [ 4742.646265] Kernel unaligned access at TPC[6a5724] 
> pci_bus_read_config_dword+0x64/0x80
> [ 4742.646333] Kernel unaligned access at TPC[6a5724] 
> pci_bus_read_config_dword+0x64/0x80
> [ 4742.646401] Kernel unaligned access at TPC[6a5724] 
> pci_bus_read_config_dword+0x64/0x80


Still don't see it with current git (4.7.0-rc3+) kernel on my T5120.
Probably difference with kernel config file. Can you please share your
kernel config file, so I can try it on my t5120 ?

Thanks.


Re: 4.6-rc*: Kernel unaligned access at pci_bus_read_config_dword+0x64/0x80

2016-06-09 Thread Anatoly Pugachev
On Thu, Jun 2, 2016 at 10:11 PM, Meelis Roos  wrote:
> Between 4.5.0 and 4.6.0-rc3, my Spar Enterprise T5120 has started
> showing the following messages during bootup:
>
> [   64.564608] Kernel unaligned access at TPC[69fb04] 
> pci_bus_read_config_dword+0x64/0x80
> [   64.564688] Kernel unaligned access at TPC[69fb04] 
> pci_bus_read_config_dword+0x64/0x80
> [   64.564760] Kernel unaligned access at TPC[69fb04] 
> pci_bus_read_config_dword+0x64/0x80
> [   64.564832] Kernel unaligned access at TPC[69fb04] 
> pci_bus_read_config_dword+0x64/0x80
> [   64.564904] Kernel unaligned access at TPC[69fb04] 
> pci_bus_read_config_dword+0x64/0x80

got the same messages on my t5120 with kernel 4.6.1 :

Jun 09 15:48:24 nvg5120 kernel: io scheduler cfq registered (default)
Jun 09 15:48:24 nvg5120 kernel: Kernel unaligned access at TPC[73b92c]
pci_bus_read_config_dword+0x6c/0x80
Jun 09 15:48:24 nvg5120 kernel: Kernel unaligned access at TPC[73b92c]
pci_bus_read_config_dword+0x6c/0x80
Jun 09 15:48:24 nvg5120 kernel: Kernel unaligned access at TPC[73b92c]
pci_bus_read_config_dword+0x6c/0x80
Jun 09 15:48:24 nvg5120 kernel: Kernel unaligned access at TPC[73b92c]
pci_bus_read_config_dword+0x6c/0x80
Jun 09 15:48:24 nvg5120 kernel: Kernel unaligned access at TPC[73b92c]
pci_bus_read_config_dword+0x6c/0x80
Jun 09 15:48:24 nvg5120 kernel: f0286d78: ttyS0 at I/O 0x0 (irq = 17,
base_baud = 115200) is a SUN4V HCONS

but 4.7.0-rc2+ (from git), does not have it, probably fixed.


Re: 4.6-rc*: Kernel unaligned access at pci_bus_read_config_dword+0x64/0x80

2016-06-09 Thread Anatoly Pugachev
On Thu, Jun 2, 2016 at 10:11 PM, Meelis Roos  wrote:
> Between 4.5.0 and 4.6.0-rc3, my Spar Enterprise T5120 has started
> showing the following messages during bootup:
>
> [   64.564608] Kernel unaligned access at TPC[69fb04] 
> pci_bus_read_config_dword+0x64/0x80
> [   64.564688] Kernel unaligned access at TPC[69fb04] 
> pci_bus_read_config_dword+0x64/0x80
> [   64.564760] Kernel unaligned access at TPC[69fb04] 
> pci_bus_read_config_dword+0x64/0x80
> [   64.564832] Kernel unaligned access at TPC[69fb04] 
> pci_bus_read_config_dword+0x64/0x80
> [   64.564904] Kernel unaligned access at TPC[69fb04] 
> pci_bus_read_config_dword+0x64/0x80

got the same messages on my t5120 with kernel 4.6.1 :

Jun 09 15:48:24 nvg5120 kernel: io scheduler cfq registered (default)
Jun 09 15:48:24 nvg5120 kernel: Kernel unaligned access at TPC[73b92c]
pci_bus_read_config_dword+0x6c/0x80
Jun 09 15:48:24 nvg5120 kernel: Kernel unaligned access at TPC[73b92c]
pci_bus_read_config_dword+0x6c/0x80
Jun 09 15:48:24 nvg5120 kernel: Kernel unaligned access at TPC[73b92c]
pci_bus_read_config_dword+0x6c/0x80
Jun 09 15:48:24 nvg5120 kernel: Kernel unaligned access at TPC[73b92c]
pci_bus_read_config_dword+0x6c/0x80
Jun 09 15:48:24 nvg5120 kernel: Kernel unaligned access at TPC[73b92c]
pci_bus_read_config_dword+0x6c/0x80
Jun 09 15:48:24 nvg5120 kernel: f0286d78: ttyS0 at I/O 0x0 (irq = 17,
base_baud = 115200) is a SUN4V HCONS

but 4.7.0-rc2+ (from git), does not have it, probably fixed.