Netdev List
 help / color / mirror / Atom feed
* [PATCH bpf-next 5/9] selftest/bpf: centralize libbpf logging management for test_progs
From: Andrii Nakryiko @ 2019-07-26 20:37 UTC (permalink / raw)
  To: bpf, netdev, ast, daniel; +Cc: andrii.nakryiko, kernel-team, Andrii Nakryiko
In-Reply-To: <20190726203747.1124677-1-andriin@fb.com>

Make test_progs test runner own libbpf logging. Also introduce two
levels of verbosity: -v and -vv. First one will be used in subsequent
patches to enable test log output always. Second one increases verbosity
level of libbpf logging further to include debug output as well.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
---
 .../bpf/prog_tests/bpf_verif_scale.c          |  6 +++-
 .../bpf/prog_tests/reference_tracking.c       | 15 +++-------
 tools/testing/selftests/bpf/test_progs.c      | 29 +++++++++++++++++++
 3 files changed, 38 insertions(+), 12 deletions(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c b/tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c
index e1b55261526f..2c4d9ef099b4 100644
--- a/tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c
+++ b/tools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c
@@ -70,10 +70,11 @@ void test_bpf_verif_scale(void)
 	const char *cg_sysctl[] = {
 		"./test_sysctl_loop1.o", "./test_sysctl_loop2.o",
 	};
+	libbpf_print_fn_t old_print_fn = NULL;
 	int err, i;
 
 	if (verifier_stats)
-		libbpf_set_print(libbpf_debug_print);
+		old_print_fn = libbpf_swap_print(libbpf_debug_print);
 
 	err = check_load("./loop3.o", BPF_PROG_TYPE_RAW_TRACEPOINT);
 	printf("test_scale:loop3:%s\n", err ? (error_cnt--, "OK") : "FAIL");
@@ -97,4 +98,7 @@ void test_bpf_verif_scale(void)
 
 	err = check_load("./test_seg6_loop.o", BPF_PROG_TYPE_LWT_SEG6LOCAL);
 	printf("test_scale:test_seg6_loop:%s\n", err ? "FAIL" : "OK");
+
+	if (verifier_stats)
+		libbpf_set_print(old_print_fn);
 }
diff --git a/tools/testing/selftests/bpf/prog_tests/reference_tracking.c b/tools/testing/selftests/bpf/prog_tests/reference_tracking.c
index 5633be43828f..c9a6ef809bd1 100644
--- a/tools/testing/selftests/bpf/prog_tests/reference_tracking.c
+++ b/tools/testing/selftests/bpf/prog_tests/reference_tracking.c
@@ -1,15 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <test_progs.h>
 
-static int libbpf_debug_print(enum libbpf_print_level level,
-			      const char *format, va_list args)
-{
-	if (level == LIBBPF_DEBUG)
-		return 0;
-
-	return vfprintf(stderr, format, args);
-}
-
 void test_reference_tracking(void)
 {
 	const char *file = "./test_sk_lookup_kern.o";
@@ -36,9 +27,11 @@ void test_reference_tracking(void)
 
 		/* Expect verifier failure if test name has 'fail' */
 		if (strstr(title, "fail") != NULL) {
-			libbpf_set_print(NULL);
+			libbpf_print_fn_t old_print_fn;
+
+			old_print_fn = libbpf_swap_print(NULL);
 			err = !bpf_program__load(prog, "GPL", 0);
-			libbpf_set_print(libbpf_debug_print);
+			libbpf_set_print(old_print_fn);
 		} else {
 			err = bpf_program__load(prog, "GPL", 0);
 		}
diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c
index 6e04b9f83777..94b6951b90b3 100644
--- a/tools/testing/selftests/bpf/test_progs.c
+++ b/tools/testing/selftests/bpf/test_progs.c
@@ -186,6 +186,8 @@ enum ARG_KEYS {
 	ARG_TEST_NUM = 'n',
 	ARG_TEST_NAME = 't',
 	ARG_VERIFIER_STATS = 's',
+
+	ARG_VERBOSE = 'v',
 };
 	
 static const struct argp_option opts[] = {
@@ -195,6 +197,8 @@ static const struct argp_option opts[] = {
 	  "Run tests with names containing NAME" },
 	{ "verifier-stats", ARG_VERIFIER_STATS, NULL, 0,
 	  "Output verifier statistics", },
+	{ "verbose", ARG_VERBOSE, "LEVEL", OPTION_ARG_OPTIONAL,
+	  "Verbose output (use -vv for extra verbose output)" },
 	{},
 };
 
@@ -202,12 +206,22 @@ struct test_env {
 	int test_num_selector;
 	const char *test_name_selector;
 	bool verifier_stats;
+	bool verbose;
+	bool very_verbose;
 };
 
 static struct test_env env = {
 	.test_num_selector = -1,
 };
 
+static int libbpf_print_fn(enum libbpf_print_level level,
+			   const char *format, va_list args)
+{
+	if (!env.very_verbose && level == LIBBPF_DEBUG)
+		return 0;
+	return vfprintf(stderr, format, args);
+}
+
 static error_t parse_arg(int key, char *arg, struct argp_state *state)
 {
 	struct test_env *env = state->input;
@@ -229,6 +243,19 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state)
 	case ARG_VERIFIER_STATS:
 		env->verifier_stats = true;
 		break;
+	case ARG_VERBOSE:
+		if (arg) {
+			if (strcmp(arg, "v") == 0) {
+				env->very_verbose = true;
+			} else {
+				fprintf(stderr,
+					"Unrecognized verbosity setting ('%s'), only -v and -vv are supported\n",
+					arg);
+				return -EINVAL;
+			}
+		}
+		env->verbose = true;
+		break;
 	case ARGP_KEY_ARG:
 		argp_usage(state);
 		break;
@@ -255,6 +282,8 @@ int main(int argc, char **argv)
 	if (err)
 		return err;
 
+	libbpf_set_print(libbpf_print_fn);
+
 	srand(time(NULL));
 
 	jit_enabled = is_jit_enabled();
-- 
2.17.1


^ permalink raw reply related

* Re: next-20190723: bpf/seccomp - systemd/journald issue?
From: Sedat Dilek @ 2019-07-26 20:38 UTC (permalink / raw)
  To: Yonghong Song
  Cc: Alexei Starovoitov, Daniel Borkmann, Martin Lau, Song Liu,
	netdev@vger.kernel.org, bpf@vger.kernel.org, Clang-Built-Linux ML,
	Kees Cook, Nick Desaulniers, Nathan Chancellor
In-Reply-To: <c2524c96-d71c-d7db-22ec-12da905dc180@fb.com>

Hi Yonghong Song,

On Fri, Jul 26, 2019 at 5:45 PM Yonghong Song <yhs@fb.com> wrote:
>
>
>
> On 7/26/19 1:26 AM, Sedat Dilek wrote:
> > Hi,
> >
> > I have opened a new issue in the ClangBuiltLinux issue tracker.
>
> Glad to know clang 9 has asm goto support and now It can compile
> kernel again.
>

Yupp.

> >
> > I am seeing a problem in the area bpf/seccomp causing
> > systemd/journald/udevd services to fail.
> >
> > [Fri Jul 26 08:08:43 2019] systemd[453]: systemd-udevd.service: Failed
> > to connect stdout to the journal socket, ignoring: Connection refused
> >
> > This happens when I use the (LLVM) LLD ld.lld-9 linker but not with
> > BFD linker ld.bfd on Debian/buster AMD64.
> > In both cases I use clang-9 (prerelease).
>
> Looks like it is a lld bug.
>
> I see the stack trace has __bpf_prog_run32() which is used by
> kernel bpf interpreter. Could you try to enable bpf jit
>    sysctl net.core.bpf_jit_enable = 1
> If this passed, it will prove it is interpreter related.
>

After...

sysctl -w net.core.bpf_jit_enable=1

I can start all failed systemd services.

systemd-journald.service
systemd-udevd.service
haveged.service

This is in maintenance mode.

What is next: Do set a permanent sysctl setting for net.core.bpf_jit_enable?

Regards,
- Sedat -

> >
> > Base for testing: next-20190723.
> >
> > The call-trace looks like this:
> >
> > [Fri Jul 26 08:08:42 2019] BUG: unable to handle page fault for
> > address: ffffffff85403370
> > [Fri Jul 26 08:08:42 2019] #PF: supervisor read access in kernel mode
> > [Fri Jul 26 08:08:42 2019] #PF: error_code(0x0000) - not-present page
> > [Fri Jul 26 08:08:42 2019] PGD 7620e067 P4D 7620e067 PUD 7620f063 PMD
> > 44fe85063 PTE 800fffff8a3fc062
> > [Fri Jul 26 08:08:42 2019] Oops: 0000 [#1] SMP PTI
> > [Fri Jul 26 08:08:42 2019] CPU: 2 PID: 417 Comm: (journald) Not
> > tainted 5.3.0-rc1-5-amd64-cbl-asmgoto #5~buster+dileks1
> > [Fri Jul 26 08:08:42 2019] Hardware name: LENOVO
> > 20HDCTO1WW/20HDCTO1WW, BIOS N1QET83W (1.58 ) 04/18/2019
> > [Fri Jul 26 08:08:42 2019] RIP: 0010:___bpf_prog_run+0x40/0x14f0
> > [Fri Jul 26 08:08:42 2019] Code: f3 eb 24 48 83 f8 38 0f 84 a9 0c 00
> > 00 48 83 f8 39 0f 85 8a 14 00 00 0f 1f 00 48 0f bf 43 02 48 8d 1c c3
> > 48 83 c3 08 0f b6 33 <48> 8b 04 f5 10 2e 40 85 48 83 f8 3b 7f 62 48 83
> > f8 1e 0f 8f c8 00
> > [Fri Jul 26 08:08:42 2019] RSP: 0018:ffff992ec028fcb8 EFLAGS: 00010246
> > [Fri Jul 26 08:08:42 2019] RAX: ffff992ec028fd60 RBX: ffff992ec00e9038
> > RCX: 0000000000000002
> > [Fri Jul 26 08:08:42 2019] RDX: ffff992ec028fd40 RSI: 00000000000000ac
> > RDI: ffff992ec028fce0
> > [Fri Jul 26 08:08:42 2019] RBP: ffff992ec028fcd0 R08: 0000000000000000
> > R09: ffff992ec028ff58
> > [Fri Jul 26 08:08:42 2019] R10: 0000000000000000 R11: ffffffff849b8210
> > R12: 000000007fff0000
> > [Fri Jul 26 08:08:42 2019] R13: ffff992ec028feb8 R14: 0000000000000000
> > R15: ffff992ec028fce0
> > [Fri Jul 26 08:08:42 2019] FS:  00007f5d20f1d940(0000)
> > GS:ffff8ba3d2500000(0000) knlGS:0000000000000000
> > [Fri Jul 26 08:08:42 2019] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > [Fri Jul 26 08:08:42 2019] CR2: ffffffff85403370 CR3: 0000000445b3e001
> > CR4: 00000000003606e0
> > [Fri Jul 26 08:08:42 2019] Call Trace:
> > [Fri Jul 26 08:08:42 2019]  __bpf_prog_run32+0x44/0x70
> > [Fri Jul 26 08:08:42 2019]  ? flush_tlb_func_common+0xd8/0x230
> > [Fri Jul 26 08:08:42 2019]  ? mem_cgroup_commit_charge+0x8c/0x120
> > [Fri Jul 26 08:08:42 2019]  ? wp_page_copy+0x464/0x7a0
> > [Fri Jul 26 08:08:42 2019]  seccomp_run_filters+0x54/0x110
> > [Fri Jul 26 08:08:42 2019]  __seccomp_filter+0xf7/0x6e0
> > [Fri Jul 26 08:08:42 2019]  ? do_wp_page+0x32b/0x5d0
> > [Fri Jul 26 08:08:42 2019]  ? handle_mm_fault+0x90d/0xbf0
> > [Fri Jul 26 08:08:42 2019]  syscall_trace_enter+0x182/0x290
> > [Fri Jul 26 08:08:42 2019]  do_syscall_64+0x30/0x90
> > [Fri Jul 26 08:08:42 2019]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
> > [Fri Jul 26 08:08:42 2019] RIP: 0033:0x7f5d220d7f59
> > [Fri Jul 26 08:08:42 2019] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00
> > 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8
> > 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00
> > f7 d8 64 89 01 48
> > [Fri Jul 26 08:08:42 2019] RSP: 002b:00007ffd11332b48 EFLAGS: 00000246
> > ORIG_RAX: 000000000000013d
> > [Fri Jul 26 08:08:42 2019] RAX: ffffffffffffffda RBX: 000055bf8ab34010
> > RCX: 00007f5d220d7f59
> > [Fri Jul 26 08:08:42 2019] RDX: 000055bf8ab34010 RSI: 0000000000000000
> > RDI: 0000000000000001
> > [Fri Jul 26 08:08:42 2019] RBP: 000055bf8ab97fb0 R08: 000055bf8abbe180
> > R09: 00000000c000003e
> > [Fri Jul 26 08:08:42 2019] R10: 000055bf8abbe1e0 R11: 0000000000000246
> > R12: 00007ffd11332ba0
> > [Fri Jul 26 08:08:42 2019] R13: 00007ffd11332b98 R14: 00007f5d21f087f8
> > R15: 000000000000002c
> > [Fri Jul 26 08:08:42 2019] Modules linked in: i2c_dev parport_pc
> > sunrpc ppdev lp parport efivarfs ip_tables x_tables autofs4 ext4
> > crc32c_generic mbcache crc16 jbd2 btrfs zstd_decompress zstd_compress
> > algif_skcipher af_alg sd_mod dm_crypt dm_mod raid10 raid456
> > async_raid6_recov async_memcpy async_pq async_xor async_tx xor
> > raid6_pq libcrc32c raid1 uas raid0 usb_storage multipath linear
> > scsi_mod md_mod hid_cherry hid_generic usbhid hid crct10dif_pclmul
> > crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64
> > i915 glue_helper crypto_simd nvme i2c_algo_bit cryptd psmouse xhci_pci
> > drm_kms_helper e1000e i2c_i801 xhci_hcd intel_lpss_pci nvme_core
> > intel_lpss drm usbcore thermal wmi video button
> > [Fri Jul 26 08:08:42 2019] CR2: ffffffff85403370
> > [Fri Jul 26 08:08:42 2019] ---[ end trace 867b35c7d6c6705a ]---
> > [Fri Jul 26 08:08:42 2019] RIP: 0010:___bpf_prog_run+0x40/0x14f0
> > [Fri Jul 26 08:08:42 2019] Code: f3 eb 24 48 83 f8 38 0f 84 a9 0c 00
> > 00 48 83 f8 39 0f 85 8a 14 00 00 0f 1f 00 48 0f bf 43 02 48 8d 1c c3
> > 48 83 c3 08 0f b6 33 <48> 8b 04 f5 10 2e 40 85 48 83 f8 3b 7f 62 48 83
> > f8 1e 0f 8f c8 00
> > [Fri Jul 26 08:08:42 2019] RSP: 0018:ffff992ec028fcb8 EFLAGS: 00010246
> > [Fri Jul 26 08:08:42 2019] RAX: ffff992ec028fd60 RBX: ffff992ec00e9038
> > RCX: 0000000000000002
> > [Fri Jul 26 08:08:42 2019] RDX: ffff992ec028fd40 RSI: 00000000000000ac
> > RDI: ffff992ec028fce0
> > [Fri Jul 26 08:08:42 2019] RBP: ffff992ec028fcd0 R08: 0000000000000000
> > R09: ffff992ec028ff58
> > [Fri Jul 26 08:08:42 2019] R10: 0000000000000000 R11: ffffffff849b8210
> > R12: 000000007fff0000
> > [Fri Jul 26 08:08:42 2019] R13: ffff992ec028feb8 R14: 0000000000000000
> > R15: ffff992ec028fce0
> > [Fri Jul 26 08:08:42 2019] FS:  00007f5d20f1d940(0000)
> > GS:ffff8ba3d2500000(0000) knlGS:0000000000000000
> > [Fri Jul 26 08:08:42 2019] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > [Fri Jul 26 08:08:42 2019] CR2: ffffffff85403370 CR3: 0000000445b3e001
> > CR4: 00000000003606e0
> >
> > More details in [1] and what I tried (for example CONFIG_SECCOMP=n)
> >
> > I have no clue about BPF or SECCOMP.
> >
> > Can you comment on this?
> >
> > If this touches BPF: Can you give me some hints and instructions in debugging?
> >
> > My kernel-config and dmesg-log are attached.
> >
> > Thanks.
> >
> > Regards,
> > - Sedat -
> >
> > [1] https://github.com/ClangBuiltLinux/linux/issues/619
> >

^ permalink raw reply

* Re: [REGRESSION] 5.3-rc1: r8169: remove 1000/Half from supported modes
From: Bernhard Held @ 2019-07-26 20:45 UTC (permalink / raw)
  To: Heiner Kallweit, linux-kernel, netdev; +Cc: David S. Miller
In-Reply-To: <0a48ecd7-7134-222d-833d-c1f65e055c02@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 786 bytes --]

On 26.07.19 at 22:24, Heiner Kallweit wrote:
> On 26.07.2019 22:16, Bernhard Held wrote:
>> Hi Heiner,
>>
>> with commit a6851c613fd7 "r8169: remove 1000/Half from supported modes" my RTL8111B GB-link stops working. It thinks that it established a link, however nothing is actually transmitted. Setting the mode with `mii-tool -F 100baseTx-HD` establishes a successful connection.
>>
> Can you provide standard ethtool output w/ and w/o this patch? Also a full dmesg output
> with the patch would be helpful.
> Is "100baseTx-HD" a typo and you mean GBit? And any special reason why you set half duplex?
>

The requested files are attached.

mii-tool doesn't offer GBit settings. I used HD only while playing around, both FD and HD are working.

Hope it helps!
Bernhard

[-- Attachment #2: dmesg.bad --]
[-- Type: text/plain, Size: 64574 bytes --]

[    0.000000] Linux version 5.3.0-rc1-linus+ (berny@quad) (gcc version 9.1.1 20190723 [gcc-9-branch revision 273734] (SUSE Linux)) #597 SMP PREEMPT Fri Jul 26 21:33:15 CEST 2019
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-5.3.0-rc1-linus+ root=/dev/mapper/VGMX300-root resume=/dev/sda2 showopts radeon.dpm=1 plymouth.enable=0 memmap=1$0xe4fd net.ifnames=0 kvm-intel.vmentry_l1d_flush=never noibrs noibpb nospectre_v1 no_stf_barrier mitigations=off
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   zhaoxin   Shanghai  
[    0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[    0.000000] x86/fpu: Enabled xstate features 0x3, context size is 576 bytes, using 'standard' format.
[    0.000000] BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009dbff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009f800-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000cfedffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000cfee0000-0x00000000cfee2fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000cfee3000-0x00000000cfeeffff] ACPI data
[    0.000000] BIOS-e820: [mem 0x00000000cfef0000-0x00000000cfefffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000d0000000-0x00000000dfffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x00000001afffffff] usable
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] user-defined physical RAM map:
[    0.000000] user: [mem 0x0000000000000000-0x000000000000e4fc] usable
[    0.000000] user: [mem 0x000000000000e4fd-0x000000000000e4fd] reserved
[    0.000000] user: [mem 0x000000000000e4fe-0x000000000009dbff] usable
[    0.000000] user: [mem 0x000000000009f800-0x000000000009ffff] reserved
[    0.000000] user: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[    0.000000] user: [mem 0x0000000000100000-0x00000000cfedffff] usable
[    0.000000] user: [mem 0x00000000cfee0000-0x00000000cfee2fff] ACPI NVS
[    0.000000] user: [mem 0x00000000cfee3000-0x00000000cfeeffff] ACPI data
[    0.000000] user: [mem 0x00000000cfef0000-0x00000000cfefffff] reserved
[    0.000000] user: [mem 0x00000000d0000000-0x00000000dfffffff] reserved
[    0.000000] user: [mem 0x00000000fec00000-0x00000000ffffffff] reserved
[    0.000000] user: [mem 0x0000000100000000-0x00000001afffffff] usable
[    0.000000] SMBIOS 2.4 present.
[    0.000000] DMI: Gigabyte Technology Co., Ltd. G33-DS3R/G33-DS3R, BIOS F7L 07/31/2009
[    0.000000] tsc: Fast TSC calibration using PIT
[    0.000000] tsc: Detected 3000.288 MHz processor
[    0.003646] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.003648] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.003651] last_pfn = 0x1b0000 max_arch_pfn = 0x400000000
[    0.003655] MTRR default type: uncachable
[    0.003655] MTRR fixed ranges enabled:
[    0.003656]   00000-9FFFF write-back
[    0.003657]   A0000-BFFFF uncachable
[    0.003657]   C0000-CDFFF write-protect
[    0.003658]   CE000-EFFFF uncachable
[    0.003658]   F0000-FFFFF write-through
[    0.003659] MTRR variable ranges enabled:
[    0.003660]   0 base 0000000000 mask 0F00000000 write-back
[    0.003661]   1 base 00E0000000 mask 0FE0000000 uncachable
[    0.003662]   2 base 00D0000000 mask 0FF0000000 uncachable
[    0.003663]   3 base 0100000000 mask 0F00000000 write-back
[    0.003664]   4 base 01C0000000 mask 0FC0000000 uncachable
[    0.003664]   5 base 01B0000000 mask 0FF0000000 uncachable
[    0.003665]   6 base 00CFF00000 mask 0FFFF00000 uncachable
[    0.003666]   7 disabled
[    0.005930] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WP  UC- WT  
[    0.006189] mtrr: your BIOS has configured an incorrect mask, fixing it.
[    0.006194] mtrr: your BIOS has configured an incorrect mask, fixing it.
[    0.006195] mtrr: your BIOS has configured an incorrect mask, fixing it.
[    0.006196] mtrr: your BIOS has configured an incorrect mask, fixing it.
[    0.006196] mtrr: your BIOS has configured an incorrect mask, fixing it.
[    0.006197] mtrr: your BIOS has configured an incorrect mask, fixing it.
[    0.006198] mtrr: your BIOS has configured an incorrect mask, fixing it.
[    0.006203] total RAM covered: 6143M
[    0.006525] Found optimal setting for mtrr clean up
[    0.006527]  gran_size: 64K 	chunk_size: 2M 	num_reg: 7  	lose cover RAM: 0G
[    0.007753] e820: update [mem 0xcff00000-0xffffffff] usable ==> reserved
[    0.007757] last_pfn = 0xcfee0 max_arch_pfn = 0x400000000
[    0.007772] Kernel/User page tables isolation: disabled on command line.
[    0.007776] BRK [0x02601000, 0x02601fff] PGTABLE
[    0.007778] BRK [0x02602000, 0x02602fff] PGTABLE
[    0.007779] BRK [0x02603000, 0x02603fff] PGTABLE
[    0.007841] BRK [0x02604000, 0x02604fff] PGTABLE
[    0.008266] BRK [0x02605000, 0x02605fff] PGTABLE
[    0.008277] BRK [0x02606000, 0x02606fff] PGTABLE
[    0.008334] RAMDISK: [mem 0x36ba7000-0x375cafff]
[    0.008339] ACPI: Early table checksum verification disabled
[    0.008344] ACPI: RSDP 0x00000000000F6ED0 000014 (v00 GBT   )
[    0.008348] ACPI: RSDT 0x00000000CFEE3040 000038 (v01 GBT    GBTUACPI 42302E31 GBTU 01010101)
[    0.008353] ACPI: FACP 0x00000000CFEE30C0 000074 (v01 GBT    GBTUACPI 42302E31 GBTU 01010101)
[    0.008358] ACPI: DSDT 0x00000000CFEE3180 0053A1 (v01 GBT    GBTUACPI 00001000 MSFT 0100000C)
[    0.008362] ACPI: FACS 0x00000000CFEE0000 000040
[    0.008364] ACPI: HPET 0x00000000CFEE8680 000038 (v01 GBT    GBTUACPI 42302E31 GBTU 00000098)
[    0.008367] ACPI: MCFG 0x00000000CFEE8700 00003C (v01 GBT    GBTUACPI 42302E31 GBTU 01010101)
[    0.008370] ACPI: APIC 0x00000000CFEE8580 000084 (v01 GBT    GBTUACPI 42302E31 GBTU 01010101)
[    0.008373] ACPI: SSDT 0x00000000CFEE9060 0003AB (v01 PmRef  CpuPm    00003000 INTL 20040311)
[    0.008382] ACPI: Local APIC address 0xfee00000
[    0.008401] Zone ranges:
[    0.008402]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.008403]   DMA32    [mem 0x0000000001000000-0x00000000ffffffff]
[    0.008405]   Normal   [mem 0x0000000100000000-0x00000001afffffff]
[    0.008406] Movable zone start for each node
[    0.008407] Early memory node ranges
[    0.008408]   node   0: [mem 0x0000000000001000-0x000000000000dfff]
[    0.008409]   node   0: [mem 0x000000000000f000-0x000000000009cfff]
[    0.008410]   node   0: [mem 0x0000000000100000-0x00000000cfedffff]
[    0.008411]   node   0: [mem 0x0000000100000000-0x00000001afffffff]
[    0.008419] Zeroed struct page in unavailable ranges: 389 pages
[    0.008421] Initmem setup node 0 [mem 0x0000000000001000-0x00000001afffffff]
[    0.008423] On node 0 totalpages: 1572475
[    0.008424]   DMA zone: 64 pages used for memmap
[    0.008425]   DMA zone: 20 pages reserved
[    0.008426]   DMA zone: 3995 pages, LIFO batch:0
[    0.008480]   DMA32 zone: 13244 pages used for memmap
[    0.008481]   DMA32 zone: 847584 pages, LIFO batch:63
[    0.040854]   Normal zone: 11264 pages used for memmap
[    0.040855]   Normal zone: 720896 pages, LIFO batch:63
[    0.070497] ACPI: PM-Timer IO Port: 0x408
[    0.070500] ACPI: Local APIC address 0xfee00000
[    0.070506] ACPI: LAPIC_NMI (acpi_id[0x00] dfl dfl lint[0x1])
[    0.070508] ACPI: LAPIC_NMI (acpi_id[0x01] dfl dfl lint[0x1])
[    0.070509] ACPI: LAPIC_NMI (acpi_id[0x02] dfl dfl lint[0x1])
[    0.070510] ACPI: LAPIC_NMI (acpi_id[0x03] dfl dfl lint[0x1])
[    0.070520] IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-23
[    0.070522] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.070524] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.070525] ACPI: IRQ0 used by override.
[    0.070526] ACPI: IRQ9 used by override.
[    0.070528] Using ACPI (MADT) for SMP configuration information
[    0.070529] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[    0.070534] smpboot: Allowing 4 CPUs, 0 hotplug CPUs
[    0.070547] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.070549] PM: Registered nosave memory: [mem 0x0000e000-0x0000efff]
[    0.070550] PM: Registered nosave memory: [mem 0x0000e000-0x0000efff]
[    0.070551] PM: Registered nosave memory: [mem 0x0009d000-0x0009ffff]
[    0.070552] PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
[    0.070553] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
[    0.070555] PM: Registered nosave memory: [mem 0xcfee0000-0xcfee2fff]
[    0.070556] PM: Registered nosave memory: [mem 0xcfee3000-0xcfeeffff]
[    0.070556] PM: Registered nosave memory: [mem 0xcfef0000-0xcfefffff]
[    0.070557] PM: Registered nosave memory: [mem 0xcff00000-0xcfffffff]
[    0.070558] PM: Registered nosave memory: [mem 0xd0000000-0xdfffffff]
[    0.070559] PM: Registered nosave memory: [mem 0xe0000000-0xfebfffff]
[    0.070560] PM: Registered nosave memory: [mem 0xfec00000-0xffffffff]
[    0.070562] [mem 0xe0000000-0xfebfffff] available for PCI devices
[    0.070566] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
[    0.153969] setup_percpu: NR_CPUS:4 nr_cpumask_bits:4 nr_cpu_ids:4 nr_node_ids:1
[    0.154904] percpu: Embedded 51 pages/cpu s170328 r8192 d30376 u524288
[    0.154911] pcpu-alloc: s170328 r8192 d30376 u524288 alloc=1*2097152
[    0.154912] pcpu-alloc: [0] 0 1 2 3 
[    0.154931] Built 1 zonelists, mobility grouping on.  Total pages: 1547883
[    0.154934] Kernel command line: BOOT_IMAGE=/vmlinuz-5.3.0-rc1-linus+ root=/dev/mapper/VGMX300-root resume=/dev/sda2 showopts radeon.dpm=1 plymouth.enable=0 memmap=1$0xe4fd net.ifnames=0 kvm-intel.vmentry_l1d_flush=never noibrs noibpb nospectre_v1 no_stf_barrier mitigations=off
[    0.155128] printk: log_buf_len individual max cpu contribution: 131072 bytes
[    0.155129] printk: log_buf_len total cpu_extra contributions: 393216 bytes
[    0.155130] printk: log_buf_len min size: 131072 bytes
[    0.155363] printk: log_buf_len: 524288 bytes
[    0.155364] printk: early log buf free: 120700(92%)
[    0.158215] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[    0.159960] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.160009] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.257128] Memory: 6078932K/6289900K available (10243K kernel code, 840K rwdata, 3308K rodata, 1016K init, 1232K bss, 210968K reserved, 0K cma-reserved)
[    0.257193] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.257368] rcu: Preemptible hierarchical RCU implementation.
[    0.257370] 	Tasks RCU enabled.
[    0.257371] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.257566] NR_IRQS: 4352, nr_irqs: 456, preallocated irqs: 16
[    0.257776] random: get_random_bytes called from start_kernel+0x384/0x52b with crng_init=0
[    0.258900] Console: colour VGA+ 80x25
[    0.262225] printk: console [tty0] enabled
[    0.262258] ACPI: Core revision 20190703
[    0.262359] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 133484882848 ns
[    0.262405] APIC: Switch to symmetric I/O mode setup
[    0.262781] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.282401] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x2b3f554673f, max_idle_ns: 440795296282 ns
[    0.282439] Calibrating delay loop (skipped), value calculated using timer frequency.. 6000.57 BogoMIPS (lpj=12001152)
[    0.282475] pid_max: default: 32768 minimum: 301
[    0.282516] LSM: Security Framework initializing
[    0.282568] AppArmor: AppArmor initialized
[    0.282687] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.282804] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.282989] *** VALIDATE proc ***
[    0.283047] *** VALIDATE cgroup1 ***
[    0.283075] *** VALIDATE cgroup2 ***
[    0.283149] mce: CPU0: Thermal monitoring enabled (TM2)
[    0.283179] process: using mwait in idle threads
[    0.283210] Last level iTLB entries: 4KB 128, 2MB 4, 4MB 4
[    0.283237] Last level dTLB entries: 4KB 256, 2MB 0, 4MB 32, 1GB 0
[    0.283267] Speculative Store Bypass: Vulnerable
[    0.283399] Freeing SMP alternatives memory: 28K
[    0.286435] smpboot: CPU0: Intel(R) Xeon(R) CPU           E5450  @ 3.00GHz (family: 0x6, model: 0x17, stepping: 0xa)
[    0.306448] Performance Events: PEBS fmt0+, Core2 events, 4-deep LBR, Intel PMU driver.
[    0.306492] ... version:                2
[    0.306521] ... bit width:              40
[    0.306556] ... generic registers:      2
[    0.306583] ... value mask:             000000ffffffffff
[    0.306611] ... max period:             000000007fffffff
[    0.306638] ... fixed-purpose events:   3
[    0.306665] ... event mask:             0000000700000003
[    0.314439] rcu: Hierarchical SRCU implementation.
[    0.330438] smp: Bringing up secondary CPUs ...
[    0.362451] x86: Booting SMP configuration:
[    0.362482] .... node  #0, CPUs:      #1 #2 #3
[    0.429312] smp: Brought up 1 node, 4 CPUs
[    0.429312] smpboot: Max logical packages: 1
[    0.429312] smpboot: Total of 4 processors activated (24002.30 BogoMIPS)
[    0.434688] devtmpfs: initialized
[    0.434688] PM: Registering ACPI NVS region [mem 0xcfee0000-0xcfee2fff] (12288 bytes)
[    0.435132] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.435132] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.435132] NET: Registered protocol family 16
[    0.435132] audit: initializing netlink subsys (disabled)
[    0.435132] audit: type=2000 audit(1564170709.172:1): state=initialized audit_enabled=0 res=1
[    0.435132] cpuidle: using governor teo
[    0.435132] ACPI: bus type PCI registered
[    0.435132] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0xd0000000-0xdfffffff] (base 0xd0000000)
[    0.435132] PCI: MMCONFIG at [mem 0xd0000000-0xdfffffff] reserved in E820
[    0.435132] PCI: Using configuration type 1 for base access
[    0.435180] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.786933] ACPI: Added _OSI(Module Device)
[    0.786933] ACPI: Added _OSI(Processor Device)
[    0.786933] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.786933] ACPI: Added _OSI(Processor Aggregator Device)
[    0.786933] ACPI: Added _OSI(Linux-Dell-Video)
[    0.786933] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    0.786933] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
[    0.788439] ACPI: 2 ACPI AML tables successfully acquired and loaded
[    0.790603] ACPI: Dynamic OEM Table Load:
[    0.790642] ACPI: SSDT 0xFFFF8881A8AB7C00 00022A (v01 PmRef  Cpu0Ist  00003000 INTL 20040311)
[    0.790930] ACPI: Dynamic OEM Table Load:
[    0.790959] ACPI: SSDT 0xFFFF8881A8B6E200 000152 (v01 PmRef  Cpu1Ist  00003000 INTL 20040311)
[    0.791208] ACPI: Dynamic OEM Table Load:
[    0.791238] ACPI: SSDT 0xFFFF8881A8B6E400 000152 (v01 PmRef  Cpu2Ist  00003000 INTL 20040311)
[    0.791486] ACPI: Dynamic OEM Table Load:
[    0.791516] ACPI: SSDT 0xFFFF8881A8B6E600 000152 (v01 PmRef  Cpu3Ist  00003000 INTL 20040311)
[    0.791898] ACPI: Interpreter enabled
[    0.791942] ACPI: (supports S0 S3 S4 S5)
[    0.791970] ACPI: Using IOAPIC for interrupt routing
[    0.792021] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.792182] ACPI: Enabled 11 GPEs in block 00 to 3F
[    0.798443] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    0.798443] acpi PNP0A03:00: _OSC: OS supports [ExtendedConfig Segments MSI HPX-Type3]
[    0.798443] PCI host bridge to bus 0000:00
[    0.798443] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
[    0.798443] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
[    0.798443] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[    0.798443] pci_bus 0000:00: root bus resource [mem 0x000c0000-0x000dffff window]
[    0.798443] pci_bus 0000:00: root bus resource [mem 0xcff00000-0xfebfffff window]
[    0.798443] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.798443] pci 0000:00:00.0: [8086:29c0] type 00 class 0x060000
[    0.798443] pci 0000:00:01.0: [8086:29c1] type 01 class 0x060400
[    0.798443] pci 0000:00:01.0: PME# supported from D0 D3hot D3cold
[    0.798443] pci 0000:00:1a.0: [8086:2937] type 00 class 0x0c0300
[    0.798443] pci 0000:00:1a.0: reg 0x20: [io  0xe100-0xe11f]
[    0.798443] pci 0000:00:1a.1: [8086:2938] type 00 class 0x0c0300
[    0.798443] pci 0000:00:1a.1: reg 0x20: [io  0xe200-0xe21f]
[    0.798443] pci 0000:00:1a.2: [8086:2939] type 00 class 0x0c0300
[    0.798443] pci 0000:00:1a.2: reg 0x20: [io  0xe000-0xe01f]
[    0.798443] pci 0000:00:1a.7: [8086:293c] type 00 class 0x0c0320
[    0.798443] pci 0000:00:1a.7: reg 0x10: [mem 0xf4205000-0xf42053ff]
[    0.798443] pci 0000:00:1b.0: [8086:293e] type 00 class 0x040300
[    0.798443] pci 0000:00:1b.0: reg 0x10: [mem 0xf4200000-0xf4203fff 64bit]
[    0.798443] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
[    0.798443] pci 0000:00:1c.0: [8086:2940] type 01 class 0x060400
[    0.798443] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[    0.798443] pci 0000:00:1c.3: [8086:2946] type 01 class 0x060400
[    0.798483] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
[    0.798588] pci 0000:00:1c.4: [8086:2948] type 01 class 0x060400
[    0.798679] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
[    0.798785] pci 0000:00:1d.0: [8086:2934] type 00 class 0x0c0300
[    0.798847] pci 0000:00:1d.0: reg 0x20: [io  0xe300-0xe31f]
[    0.798969] pci 0000:00:1d.1: [8086:2935] type 00 class 0x0c0300
[    0.799032] pci 0000:00:1d.1: reg 0x20: [io  0xe400-0xe41f]
[    0.799152] pci 0000:00:1d.2: [8086:2936] type 00 class 0x0c0300
[    0.799215] pci 0000:00:1d.2: reg 0x20: [io  0xe500-0xe51f]
[    0.799340] pci 0000:00:1d.7: [8086:293a] type 00 class 0x0c0320
[    0.799384] pci 0000:00:1d.7: reg 0x10: [mem 0xf4204000-0xf42043ff]
[    0.799535] pci 0000:00:1e.0: [8086:244e] type 01 class 0x060401
[    0.799674] pci 0000:00:1f.0: [8086:2916] type 00 class 0x060100
[    0.799770] pci 0000:00:1f.0: quirk: [io  0x0400-0x047f] claimed by ICH6 ACPI/GPIO/TCO
[    0.799805] pci 0000:00:1f.0: quirk: [io  0x0480-0x04bf] claimed by ICH6 GPIO
[    0.799835] pci 0000:00:1f.0: ICH7 LPC Generic IO decode 1 PIO at 0800 (mask 000f)
[    0.799869] pci 0000:00:1f.0: ICH7 LPC Generic IO decode 2 PIO at 0290 (mask 000f)
[    0.799987] pci 0000:00:1f.2: [8086:2922] type 00 class 0x010601
[    0.800028] pci 0000:00:1f.2: reg 0x10: [io  0xe600-0xe607]
[    0.800061] pci 0000:00:1f.2: reg 0x14: [io  0xe700-0xe703]
[    0.800094] pci 0000:00:1f.2: reg 0x18: [io  0xe800-0xe807]
[    0.800126] pci 0000:00:1f.2: reg 0x1c: [io  0xe900-0xe903]
[    0.800158] pci 0000:00:1f.2: reg 0x20: [io  0xea00-0xea1f]
[    0.800191] pci 0000:00:1f.2: reg 0x24: [mem 0xf4206000-0xf42067ff]
[    0.800250] pci 0000:00:1f.2: PME# supported from D3hot
[    0.800347] pci 0000:00:1f.3: [8086:2930] type 00 class 0x0c0500
[    0.800389] pci 0000:00:1f.3: reg 0x10: [mem 0xf4207000-0xf42070ff 64bit]
[    0.800431] pci 0000:00:1f.3: reg 0x20: [io  0x0500-0x051f]
[    0.800559] pci 0000:01:00.0: [1002:68f9] type 00 class 0x030000
[    0.800602] pci 0000:01:00.0: reg 0x10: [mem 0xe0000000-0xefffffff 64bit pref]
[    0.800640] pci 0000:01:00.0: reg 0x18: [mem 0xf1000000-0xf101ffff 64bit]
[    0.800673] pci 0000:01:00.0: reg 0x20: [io  0xb000-0xb0ff]
[    0.800710] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0001ffff pref]
[    0.800742] pci 0000:01:00.0: enabling Extended Tags
[    0.800795] pci 0000:01:00.0: supports D1 D2
[    0.800864] pci 0000:01:00.1: [1002:aa68] type 00 class 0x040300
[    0.800906] pci 0000:01:00.1: reg 0x10: [mem 0xf1020000-0xf1023fff 64bit]
[    0.800958] pci 0000:01:00.1: enabling Extended Tags
[    0.801012] pci 0000:01:00.1: supports D1 D2
[    0.801075] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.801104] pci 0000:00:01.0:   bridge window [io  0xb000-0xbfff]
[    0.801133] pci 0000:00:01.0:   bridge window [mem 0xf0000000-0xf1ffffff]
[    0.801163] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xefffffff 64bit pref]
[    0.801225] pci 0000:00:1c.0: PCI bridge to [bus 02]
[    0.801254] pci 0000:00:1c.0:   bridge window [io  0xa000-0xafff]
[    0.801329] pci 0000:03:00.0: [197b:2363] type 00 class 0x010185
[    0.801442] pci 0000:03:00.0: reg 0x24: [mem 0xf4000000-0xf4001fff]
[    0.801551] pci 0000:03:00.0: PME# supported from D3hot
[    0.801649] pci 0000:03:00.1: [197b:2363] type 00 class 0x010185
[    0.801699] pci 0000:03:00.1: reg 0x10: [io  0xc000-0xc007]
[    0.801734] pci 0000:03:00.1: reg 0x14: [io  0xc100-0xc103]
[    0.801770] pci 0000:03:00.1: reg 0x18: [io  0xc200-0xc207]
[    0.801805] pci 0000:03:00.1: reg 0x1c: [io  0xc300-0xc303]
[    0.801840] pci 0000:03:00.1: reg 0x20: [io  0xc400-0xc40f]
[    0.801965] pci 0000:00:1c.3: PCI bridge to [bus 03]
[    0.801994] pci 0000:00:1c.3:   bridge window [io  0xc000-0xcfff]
[    0.802024] pci 0000:00:1c.3:   bridge window [mem 0xf4000000-0xf40fffff]
[    0.802101] pci 0000:04:00.0: [10ec:8168] type 00 class 0x020000
[    0.802157] pci 0000:04:00.0: reg 0x10: [io  0xd000-0xd0ff]
[    0.802210] pci 0000:04:00.0: reg 0x18: [mem 0xf3000000-0xf3000fff 64bit]
[    0.802269] pci 0000:04:00.0: reg 0x30: [mem 0x00000000-0x0001ffff pref]
[    0.802305] pci 0000:04:00.0: enabling Extended Tags
[    0.802416] pci 0000:04:00.0: supports D1 D2
[    0.802438] pci 0000:04:00.0: PME# supported from D1 D2 D3hot D3cold
[    0.802526] pci 0000:00:1c.4: PCI bridge to [bus 04]
[    0.802556] pci 0000:00:1c.4:   bridge window [io  0xd000-0xdfff]
[    0.802586] pci 0000:00:1c.4:   bridge window [mem 0xf2000000-0xf3ffffff]
[    0.802629] pci_bus 0000:05: extended config space not accessible
[    0.802677] pci 0000:05:01.0: [104c:8020] type 00 class 0x0c0010
[    0.802719] pci 0000:05:01.0: reg 0x10: [mem 0xf4104000-0xf41047ff]
[    0.802754] pci 0000:05:01.0: reg 0x14: [mem 0xf4100000-0xf4103fff]
[    0.802842] pci 0000:05:01.0: supports D2
[    0.802870] pci 0000:05:01.0: PME# supported from D2 D3hot
[    0.802959] pci 0000:00:1e.0: PCI bridge to [bus 05] (subtractive decode)
[    0.802991] pci 0000:00:1e.0:   bridge window [mem 0xf4100000-0xf41fffff]
[    0.803022] pci 0000:00:1e.0:   bridge window [io  0x0000-0x0cf7 window] (subtractive decode)
[    0.803055] pci 0000:00:1e.0:   bridge window [io  0x0d00-0xffff window] (subtractive decode)
[    0.803088] pci 0000:00:1e.0:   bridge window [mem 0x000a0000-0x000bffff window] (subtractive decode)
[    0.803122] pci 0000:00:1e.0:   bridge window [mem 0x000c0000-0x000dffff window] (subtractive decode)
[    0.803155] pci 0000:00:1e.0:   bridge window [mem 0xcff00000-0xfebfffff window] (subtractive decode)
[    0.803204] pci_bus 0000:00: on NUMA node 0
[    0.803625] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
[    0.803702] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 9 *10 11 12 14 15)
[    0.803776] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 *7 9 10 11 12 14 15)
[    0.803851] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 9 10 11 12 14 *15)
[    0.803926] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.
[    0.804001] ACPI: PCI Interrupt Link [LNKF] (IRQs *3 4 5 6 7 9 10 11 12 14 15)
[    0.804076] ACPI: PCI Interrupt Link [LNK0] (IRQs 3 4 5 6 7 9 10 11 12 *14 15)
[    0.804151] ACPI: PCI Interrupt Link [LNK1] (IRQs 3 4 *5 6 7 9 10 11 12 14 15)
[    0.806453] pci 0000:01:00.0: vgaarb: setting as boot VGA device
[    0.806476] pci 0000:01:00.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[    0.806509] pci 0000:01:00.0: vgaarb: bridge control possible
[    0.807068] vgaarb: loaded
[    0.807156] SCSI subsystem initialized
[    0.807206] libata version 3.00 loaded.
[    0.807206] ACPI: bus type USB registered
[    0.807206] usbcore: registered new interface driver usbfs
[    0.807206] usbcore: registered new interface driver hub
[    0.807206] usbcore: registered new device driver usb
[    0.807206] PCI: Using ACPI for IRQ routing
[    0.810200] PCI: pci_cache_line_size set to 64 bytes
[    0.810245] e820: reserve RAM buffer [mem 0x0000e4fd-0x0000ffff]
[    0.810247] e820: reserve RAM buffer [mem 0x0009dc00-0x0009ffff]
[    0.810248] e820: reserve RAM buffer [mem 0xcfee0000-0xcfffffff]
[    0.810524] hpet: 4 channels of 0 reserved for per-cpu timers
[    0.810554] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0
[    0.810584] hpet0: 4 comparators, 64-bit 14.318180 MHz counter
[    0.815461] clocksource: Switched to clocksource tsc-early
[    0.821564] *** VALIDATE hugetlbfs ***
[    0.821676] AppArmor: AppArmor Filesystem Enabled
[    0.821719] pnp: PnP ACPI init
[    0.821888] system 00:00: [io  0x04d0-0x04d1] has been reserved
[    0.821918] system 00:00: [io  0x0290-0x029f] has been reserved
[    0.821946] system 00:00: [io  0x0800-0x087f] has been reserved
[    0.821975] system 00:00: [io  0x0290-0x0294] has been reserved
[    0.822003] system 00:00: [io  0x0880-0x088f] has been reserved
[    0.822035] system 00:00: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.822090] pnp 00:01: Plug and Play ACPI device, IDs PNP0b00 (active)
[    0.822302] pnp 00:02: Plug and Play ACPI device, IDs PNP0501 (active)
[    0.822438] pnp 00:03: Plug and Play ACPI device, IDs PNP0f13 (active)
[    0.822468] pnp 00:04: Plug and Play ACPI device, IDs PNP0303 (active)
[    0.822517] system 00:05: [io  0x0400-0x04bf] could not be reserved
[    0.822549] system 00:05: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.822703] system 00:06: [mem 0xd0000000-0xdfffffff] has been reserved
[    0.822735] system 00:06: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.822864] system 00:07: [mem 0x000d2a00-0x000d3fff] has been reserved
[    0.822894] system 00:07: [mem 0x000f0000-0x000f7fff] could not be reserved
[    0.822923] system 00:07: [mem 0x000f8000-0x000fbfff] could not be reserved
[    0.822952] system 00:07: [mem 0x000fc000-0x000fffff] could not be reserved
[    0.822981] system 00:07: [mem 0xcfee0000-0xcfefffff] could not be reserved
[    0.823010] system 00:07: [mem 0x00000000-0x0009ffff] could not be reserved
[    0.823039] system 00:07: [mem 0x00100000-0xcfedffff] could not be reserved
[    0.823068] system 00:07: [mem 0xfec00000-0xfec00fff] could not be reserved
[    0.823097] system 00:07: [mem 0xfed10000-0xfed1dfff] has been reserved
[    0.823126] system 00:07: [mem 0xfed20000-0xfed8ffff] has been reserved
[    0.823155] system 00:07: [mem 0xfee00000-0xfee00fff] has been reserved
[    0.823184] system 00:07: [mem 0xffb00000-0xffb7ffff] has been reserved
[    0.823213] system 00:07: [mem 0xfff00000-0xffffffff] has been reserved
[    0.823241] system 00:07: [mem 0x000e0000-0x000effff] has been reserved
[    0.823273] system 00:07: Plug and Play ACPI device, IDs PNP0c01 (active)
[    0.823277] pnp: PnP ACPI: found 8 devices
[    0.824612] thermal_sys: Registered thermal governor 'step_wise'
[    0.824613] thermal_sys: Registered thermal governor 'user_space'
[    0.829136] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[    0.829204] pci 0000:00:1c.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 02] add_size 200000 add_align 100000
[    0.829239] pci 0000:00:1c.0: bridge window [mem 0x00100000-0x000fffff] to [bus 02] add_size 200000 add_align 100000
[    0.829274] pci 0000:00:1c.3: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 03] add_size 200000 add_align 100000
[    0.829309] pci 0000:00:1c.4: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 04] add_size 200000 add_align 100000
[    0.829351] pci 0000:00:1c.0: BAR 8: assigned [mem 0xf4300000-0xf44fffff]
[    0.829382] pci 0000:00:1c.0: BAR 9: assigned [mem 0xf4500000-0xf46fffff 64bit pref]
[    0.829421] pci 0000:00:1c.3: BAR 9: assigned [mem 0xf4700000-0xf48fffff 64bit pref]
[    0.829456] pci 0000:00:1c.4: BAR 9: assigned [mem 0xf4900000-0xf4afffff 64bit pref]
[    0.829491] pci 0000:01:00.0: BAR 6: assigned [mem 0xf0000000-0xf001ffff pref]
[    0.829524] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.829552] pci 0000:00:01.0:   bridge window [io  0xb000-0xbfff]
[    0.829582] pci 0000:00:01.0:   bridge window [mem 0xf0000000-0xf1ffffff]
[    0.829611] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xefffffff 64bit pref]
[    0.829645] pci 0000:00:1c.0: PCI bridge to [bus 02]
[    0.829673] pci 0000:00:1c.0:   bridge window [io  0xa000-0xafff]
[    0.829704] pci 0000:00:1c.0:   bridge window [mem 0xf4300000-0xf44fffff]
[    0.829734] pci 0000:00:1c.0:   bridge window [mem 0xf4500000-0xf46fffff 64bit pref]
[    0.829769] pci 0000:00:1c.3: PCI bridge to [bus 03]
[    0.829797] pci 0000:00:1c.3:   bridge window [io  0xc000-0xcfff]
[    0.829828] pci 0000:00:1c.3:   bridge window [mem 0xf4000000-0xf40fffff]
[    0.829858] pci 0000:00:1c.3:   bridge window [mem 0xf4700000-0xf48fffff 64bit pref]
[    0.829893] pci 0000:04:00.0: BAR 6: assigned [mem 0xf2000000-0xf201ffff pref]
[    0.829926] pci 0000:00:1c.4: PCI bridge to [bus 04]
[    0.829954] pci 0000:00:1c.4:   bridge window [io  0xd000-0xdfff]
[    0.829984] pci 0000:00:1c.4:   bridge window [mem 0xf2000000-0xf3ffffff]
[    0.830014] pci 0000:00:1c.4:   bridge window [mem 0xf4900000-0xf4afffff 64bit pref]
[    0.830050] pci 0000:00:1e.0: PCI bridge to [bus 05]
[    0.830079] pci 0000:00:1e.0:   bridge window [mem 0xf4100000-0xf41fffff]
[    0.830113] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7 window]
[    0.830141] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff window]
[    0.830169] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
[    0.830198] pci_bus 0000:00: resource 7 [mem 0x000c0000-0x000dffff window]
[    0.830227] pci_bus 0000:00: resource 8 [mem 0xcff00000-0xfebfffff window]
[    0.830256] pci_bus 0000:01: resource 0 [io  0xb000-0xbfff]
[    0.830284] pci_bus 0000:01: resource 1 [mem 0xf0000000-0xf1ffffff]
[    0.830312] pci_bus 0000:01: resource 2 [mem 0xe0000000-0xefffffff 64bit pref]
[    0.830345] pci_bus 0000:02: resource 0 [io  0xa000-0xafff]
[    0.830373] pci_bus 0000:02: resource 1 [mem 0xf4300000-0xf44fffff]
[    0.830401] pci_bus 0000:02: resource 2 [mem 0xf4500000-0xf46fffff 64bit pref]
[    0.830433] pci_bus 0000:03: resource 0 [io  0xc000-0xcfff]
[    0.830461] pci_bus 0000:03: resource 1 [mem 0xf4000000-0xf40fffff]
[    0.830490] pci_bus 0000:03: resource 2 [mem 0xf4700000-0xf48fffff 64bit pref]
[    0.830522] pci_bus 0000:04: resource 0 [io  0xd000-0xdfff]
[    0.830550] pci_bus 0000:04: resource 1 [mem 0xf2000000-0xf3ffffff]
[    0.830579] pci_bus 0000:04: resource 2 [mem 0xf4900000-0xf4afffff 64bit pref]
[    0.830611] pci_bus 0000:05: resource 1 [mem 0xf4100000-0xf41fffff]
[    0.830639] pci_bus 0000:05: resource 4 [io  0x0000-0x0cf7 window]
[    0.830668] pci_bus 0000:05: resource 5 [io  0x0d00-0xffff window]
[    0.830696] pci_bus 0000:05: resource 6 [mem 0x000a0000-0x000bffff window]
[    0.830725] pci_bus 0000:05: resource 7 [mem 0x000c0000-0x000dffff window]
[    0.830754] pci_bus 0000:05: resource 8 [mem 0xcff00000-0xfebfffff window]
[    0.830842] NET: Registered protocol family 2
[    0.830970] tcp_listen_portaddr_hash hash table entries: 4096 (order: 4, 65536 bytes, linear)
[    0.831027] TCP established hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.831241] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes, linear)
[    0.831725] TCP: Hash tables configured (established 65536 bind 65536)
[    0.831812] UDP hash table entries: 4096 (order: 5, 131072 bytes, linear)
[    0.831903] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes, linear)
[    0.832025] NET: Registered protocol family 1
[    0.832983] pci 0000:01:00.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[    0.833024] pci 0000:01:00.1: D0 power state depends on 0000:01:00.0
[    0.833081] pci 0000:03:00.0: async suspend disabled to avoid multi-function power-on ordering issue
[    0.833117] pci 0000:03:00.1: async suspend disabled to avoid multi-function power-on ordering issue
[    0.833157] PCI: CLS 32 bytes, default 64
[    0.833219] Unpacking initramfs...
[    1.807433] Freeing initrd memory: 10384K
[    1.807471] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    1.807500] software IO TLB: mapped [mem 0xcbee0000-0xcfee0000] (64MB)
[    1.808533] Initialise system trusted keyrings
[    1.808625] workingset: timestamp_bits=62 max_order=21 bucket_order=0
[    1.809897] fuse: init (API version 7.31)
[    1.815051] Key type asymmetric registered
[    1.815080] Asymmetric key parser 'x509' registered
[    1.815114] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    1.815146] io scheduler mq-deadline registered
[    1.815203] io scheduler bfq registered
[    1.815924] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
[    1.815967] ACPI: Power Button [PWRB]
[    1.816060] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
[    1.818461] ACPI: Power Button [PWRF]
[    1.818825] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    1.839182] 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    1.839390] Linux agpgart interface v0.103
[    1.839504] [drm] radeon kernel modesetting enabled.
[    1.839571] radeon 0000:01:00.0: remove_conflicting_pci_framebuffers: bar 0: 0xe0000000 -> 0xefffffff
[    1.839605] radeon 0000:01:00.0: remove_conflicting_pci_framebuffers: bar 2: 0xf1000000 -> 0xf101ffff
[    1.839639] radeon 0000:01:00.0: vgaarb: deactivate vga console
[    1.840068] Console: switching to colour dummy device 80x25
[    1.840236] [drm] initializing kernel modesetting (CEDAR 0x1002:0x68F9 0x174B:0xE153 0x00).
[    1.840262] resource sanity check: requesting [mem 0x000c0000-0x000dffff], which spans more than pnp 00:07 [mem 0x000d2a00-0x000d3fff]
[    1.840272] caller pci_map_rom+0x65/0x178 mapping multiple BARs
[    1.840408] ATOM BIOS: BASS
[    1.840455] radeon 0000:01:00.0: VRAM: 512M 0x0000000000000000 - 0x000000001FFFFFFF (512M used)
[    1.840459] radeon 0000:01:00.0: GTT: 1024M 0x0000000020000000 - 0x000000005FFFFFFF
[    1.840464] [drm] Detected VRAM RAM=512M, BAR=256M
[    1.840466] [drm] RAM width 64bits DDR
[    1.840524] [TTM] Zone  kernel: Available graphics memory: 3044672 KiB
[    1.840527] [TTM] Zone   dma32: Available graphics memory: 2097152 KiB
[    1.840529] [TTM] Initializing pool allocator
[    1.840533] [TTM] Initializing DMA pool allocator
[    1.840559] [drm] radeon: 512M of VRAM memory ready
[    1.840562] [drm] radeon: 1024M of GTT memory ready.
[    1.840570] [drm] Loading CEDAR Microcode
[    1.840575] [drm] Internal thermal controller with fan control
[    1.840614] == power state 0 ==
[    1.840616] 	ui class: none
[    1.840618] 	internal class: boot
[    1.840620] 	caps: video
[    1.840622] 	uvd    vclk: 0 dclk: 0
[    1.840625] 		power level 0    sclk: 65000 mclk: 80000 vddc: 1000 vddci: 0
[    1.840628] 		power level 1    sclk: 65000 mclk: 80000 vddc: 1000 vddci: 0
[    1.840631] 		power level 2    sclk: 65000 mclk: 80000 vddc: 1000 vddci: 0
[    1.840633] 	status: c r b
[    1.840636] == power state 1 ==
[    1.840637] 	ui class: performance
[    1.840639] 	internal class: none
[    1.840641] 	caps: single_disp video
[    1.840643] 	uvd    vclk: 0 dclk: 0
[    1.840646] 		power level 0    sclk: 15700 mclk: 20000 vddc: 900 vddci: 0
[    1.840648] 		power level 1    sclk: 40000 mclk: 50000 vddc: 950 vddci: 0
[    1.840651] 		power level 2    sclk: 65000 mclk: 80000 vddc: 1000 vddci: 0
[    1.840653] 	status:
[    1.840655] == power state 2 ==
[    1.840657] 	ui class: none
[    1.840658] 	internal class: uvd
[    1.840660] 	caps: video
[    1.840662] 	uvd    vclk: 54000 dclk: 40000
[    1.840665] 		power level 0    sclk: 65000 mclk: 80000 vddc: 1000 vddci: 0
[    1.840668] 		power level 1    sclk: 65000 mclk: 80000 vddc: 1000 vddci: 0
[    1.840670] 		power level 2    sclk: 65000 mclk: 80000 vddc: 1000 vddci: 0
[    1.840673] 	status:
[    1.840674] == power state 3 ==
[    1.840676] 	ui class: performance
[    1.840677] 	internal class: none
[    1.840680] 	caps: video
[    1.840682] 	uvd    vclk: 0 dclk: 0
[    1.840684] 		power level 0    sclk: 15700 mclk: 80000 vddc: 1000 vddci: 0
[    1.840687] 		power level 1    sclk: 40000 mclk: 80000 vddc: 1000 vddci: 0
[    1.840689] 		power level 2    sclk: 65000 mclk: 80000 vddc: 1000 vddci: 0
[    1.840692] 	status:
[    1.855368] [drm] radeon: dpm initialized
[    1.855384] [drm] GART: num cpu pages 262144, num gpu pages 262144
[    1.869667] [drm] PCIE GART of 1024M enabled (table at 0x000000000014C000).
[    1.869756] radeon 0000:01:00.0: WB enabled
[    1.869760] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000020000c00 and cpu addr 0x(____ptrval____)
[    1.869765] radeon 0000:01:00.0: fence driver on ring 3 use gpu addr 0x0000000020000c0c and cpu addr 0x(____ptrval____)
[    1.870169] radeon 0000:01:00.0: fence driver on ring 5 use gpu addr 0x000000000005c418 and cpu addr 0x(____ptrval____)
[    1.870173] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.870176] [drm] Driver supports precise vblank timestamp query.
[    1.870179] radeon 0000:01:00.0: radeon: MSI limited to 32-bit
[    1.870216] radeon 0000:01:00.0: radeon: using MSI.
[    1.870238] [drm] radeon: irq initialized.
[    1.886379] [drm] ring test on 0 succeeded in 1 usecs
[    1.886386] [drm] ring test on 3 succeeded in 2 usecs
[    2.071965] [drm] ring test on 5 succeeded in 1 usecs
[    2.071971] [drm] UVD initialized successfully.
[    2.072087] [drm] ib test on ring 0 succeeded in 0 usecs
[    2.072130] [drm] ib test on ring 3 succeeded in 0 usecs
[    2.758459] [drm] ib test on ring 5 succeeded
[    2.758804] [drm] Radeon Display Connectors
[    2.758807] [drm] Connector 0:
[    2.758808] [drm]   HDMI-A-1
[    2.758810] [drm]   HPD2
[    2.758812] [drm]   DDC: 0x6460 0x6460 0x6464 0x6464 0x6468 0x6468 0x646c 0x646c
[    2.758815] [drm]   Encoders:
[    2.758817] [drm]     DFP1: INTERNAL_UNIPHY1
[    2.758819] [drm] Connector 1:
[    2.758821] [drm]   DVI-I-1
[    2.758822] [drm]   HPD4
[    2.758824] [drm]   DDC: 0x6450 0x6450 0x6454 0x6454 0x6458 0x6458 0x645c 0x645c
[    2.758827] [drm]   Encoders:
[    2.758829] [drm]     DFP2: INTERNAL_UNIPHY
[    2.758831] [drm]     CRT1: INTERNAL_KLDSCP_DAC1
[    2.758832] [drm] Connector 2:
[    2.758834] [drm]   VGA-1
[    2.758836] [drm]   DDC: 0x6430 0x6430 0x6434 0x6434 0x6438 0x6438 0x643c 0x643c
[    2.758839] [drm]   Encoders:
[    2.758841] [drm]     CRT2: INTERNAL_KLDSCP_DAC2
[    2.758901] switching from power state:
[    2.758903] 	ui class: none
[    2.758905] 	internal class: boot
[    2.758907] 	caps: video
[    2.758910] 	uvd    vclk: 0 dclk: 0
[    2.758912] 		power level 0    sclk: 65000 mclk: 80000 vddc: 1000 vddci: 0
[    2.758915] 		power level 1    sclk: 65000 mclk: 80000 vddc: 1000 vddci: 0
[    2.758918] 		power level 2    sclk: 65000 mclk: 80000 vddc: 1000 vddci: 0
[    2.758920] 	status: c b
[    2.758922] switching to power state:
[    2.758924] 	ui class: performance
[    2.758926] 	internal class: none
[    2.758928] 	caps: single_disp video
[    2.758930] 	uvd    vclk: 0 dclk: 0
[    2.758933] 		power level 0    sclk: 15700 mclk: 20000 vddc: 900 vddci: 0
[    2.758935] 		power level 1    sclk: 40000 mclk: 50000 vddc: 950 vddci: 0
[    2.758938] 		power level 2    sclk: 65000 mclk: 80000 vddc: 1000 vddci: 0
[    2.758940] 	status: r
[    2.820677] [drm] fb mappable at 0xE034D000
[    2.820680] [drm] vram apper at 0xE0000000
[    2.820682] [drm] size 14745600
[    2.820683] [drm] fb depth is 24
[    2.820685] [drm]    pitch is 10240
[    2.820731] fbcon: radeondrmfb (fb0) is primary device
[    2.822443] tsc: Refined TSC clocksource calibration: 2999.999 MHz
[    2.822454] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2b3e44b2357, max_idle_ns: 440795324996 ns
[    2.822483] clocksource: Switched to clocksource tsc
[    2.905886] Console: switching to colour frame buffer device 320x90
[    2.913438] radeon 0000:01:00.0: fb0: radeondrmfb frame buffer device
[    2.918515] [drm] Initialized radeon 2.50.0 20080528 for 0000:01:00.0 on minor 0
[    2.918840] ahci 0000:00:1f.2: version 3.0
[    2.919000] ahci 0000:00:1f.2: SSS flag set, parallel bus scan disabled
[    2.919054] ahci 0000:00:1f.2: AHCI 0001.0200 32 slots 6 ports 3 Gbps 0x3f impl SATA mode
[    2.919083] ahci 0000:00:1f.2: flags: 64bit ncq sntf stag pm led clo pmp pio slum part ccc ems 
[    2.978906] scsi host0: ahci
[    2.979070] scsi host1: ahci
[    2.979223] scsi host2: ahci
[    2.979388] scsi host3: ahci
[    2.979537] scsi host4: ahci
[    2.979696] scsi host5: ahci
[    2.979759] ata1: SATA max UDMA/133 abar m2048@0xf4206000 port 0xf4206100 irq 29
[    2.979786] ata2: SATA max UDMA/133 abar m2048@0xf4206000 port 0xf4206180 irq 29
[    2.979813] ata3: SATA max UDMA/133 abar m2048@0xf4206000 port 0xf4206200 irq 29
[    2.979839] ata4: SATA max UDMA/133 abar m2048@0xf4206000 port 0xf4206280 irq 29
[    2.979865] ata5: SATA max UDMA/133 abar m2048@0xf4206000 port 0xf4206300 irq 29
[    2.979892] ata6: SATA max UDMA/133 abar m2048@0xf4206000 port 0xf4206380 irq 29
[    2.990093] ahci 0000:03:00.0: AHCI 0001.0000 32 slots 2 ports 3 Gbps 0x3 impl SATA mode
[    2.990137] ahci 0000:03:00.0: flags: 64bit ncq pm led clo pmp pio slum part 
[    2.990485] scsi host6: ahci
[    2.990644] scsi host7: ahci
[    2.990706] ata7: SATA max UDMA/133 abar m8192@0xf4000000 port 0xf4000100 irq 19
[    2.990734] ata8: SATA max UDMA/133 abar m8192@0xf4000000 port 0xf4000180 irq 19
[    2.990827] pata_jmicron 0000:03:00.1: enabling device (0000 -> 0001)
[    2.991433] scsi host8: pata_jmicron
[    2.991577] scsi host9: pata_jmicron
[    2.991625] ata9: PATA max UDMA/100 cmd 0xc000 ctl 0xc100 bmdma 0xc400 irq 16
[    2.991651] ata10: PATA max UDMA/100 cmd 0xc200 ctl 0xc300 bmdma 0xc408 irq 16
[    2.991717] usbcore: registered new interface driver usblp
[    2.991787] usbcore: registered new interface driver usb-storage
[    2.991852] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
[    2.992245] serio: i8042 KBD port at 0x60,0x64 irq 1
[    2.992302] serio: i8042 AUX port at 0x60,0x64 irq 12
[    2.992402] mousedev: PS/2 mouse device common for all mice
[    2.992477] input: PC Speaker as /devices/platform/pcspkr/input/input3
[    2.992525] rtc_cmos 00:01: RTC can wake from S4
[    2.992651] rtc_cmos 00:01: registered as rtc0
[    2.992683] rtc_cmos 00:01: alarms up to one month, 242 bytes nvram, hpet irqs
[    2.992870] device-mapper: uevent: version 1.0.3
[    2.992933] device-mapper: ioctl: 4.40.0-ioctl (2019-01-18) initialised: dm-devel@redhat.com
[    2.992964] intel_pstate: CPU model not supported
[    2.992990] hidraw: raw HID events driver (C) Jiri Kosina
[    2.993021] usbcore: registered new interface driver usbhid
[    2.993041] usbhid: USB HID core driver
[    2.993220] NET: Registered protocol family 10
[    2.993463] Segment Routing with IPv6
[    2.993493] NET: Registered protocol family 17
[    2.993761] microcode: sig=0x1067a, pf=0x40, revision=0xa0b
[    2.993829] microcode: Microcode Update Driver: v2.2.
[    2.993839] sched_clock: Marking stable (2989127799, 4697229)->(3102433889, -108608861)
[    2.994023] registered taskstats version 1
[    2.994040] Loading compiled-in X.509 certificates
[    3.018422] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input2
[    3.042542] Loaded X.509 cert 'Build time autogenerated kernel key: f849ae0907d8be617aa00a74df3051a2885a5811'
[    3.046060] Key type encrypted registered
[    3.046242] rtc_cmos 00:01: setting system clock to 2019-07-26T19:51:52 UTC (1564170712)
[    3.292478] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    3.292712] ata1.00: supports DRM functions and may not be fully accessible
[    3.293468] ata1.00: ATA-10: Crucial_CT525MX300SSD1,  M0CR070, max UDMA/133
[    3.293506] ata1.00: 1025610768 sectors, multi 16: LBA48 NCQ (depth 32), AA
[    3.295600] ata1.00: supports DRM functions and may not be fully accessible
[    3.299777] ata1.00: configured for UDMA/133
[    3.301460] scsi 0:0:0:0: Direct-Access     ATA      Crucial_CT525MX3 R070 PQ: 0 ANSI: 5
[    3.303213] ata1.00: Enabling discard_zeroes_data
[    3.303215] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    3.304476] ata7: SATA link down (SStatus 0 SControl 300)
[    3.304855] ata8: SATA link down (SStatus 0 SControl 300)
[    3.306550] sd 0:0:0:0: [sda] 1025610768 512-byte logical blocks: (525 GB/489 GiB)
[    3.311314] sd 0:0:0:0: [sda] Write Protect is off
[    3.312929] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    3.312943] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.314704] ata1.00: Enabling discard_zeroes_data
[    3.316635]  sda: sda1 sda2 sda3
[    3.318529] ata1.00: Enabling discard_zeroes_data
[    3.320294] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.620470] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    3.623111] ata2.00: ATA-8: Hitachi HUA722050CLA330, JP2OA39C, max UDMA/133
[    3.624808] ata2.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 32), AA
[    3.627544] ata2.00: configured for UDMA/133
[    3.629333] scsi 1:0:0:0: Direct-Access     ATA      Hitachi HUA72205 A39C PQ: 0 ANSI: 5
[    3.631158] sd 1:0:0:0: Attached scsi generic sg1 type 0
[    3.631169] sd 1:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[    3.634633] sd 1:0:0:0: [sdb] Write Protect is off
[    3.636405] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    3.636416] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.649286]  sdb: sdb1 sdb2 sdb3 sdb4
[    3.651327] sd 1:0:0:0: [sdb] Attached SCSI disk
[    3.944474] ata3: SATA link down (SStatus 0 SControl 300)
[    4.260471] ata4: SATA link down (SStatus 0 SControl 300)
[    4.576476] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    4.578451] ata5.00: ATAPI: PLEXTOR DVDR   PX-880SA, 1.12, max UDMA/100
[    4.580737] ata5.00: configured for UDMA/100
[    4.583976] scsi 4:0:0:0: CD-ROM            PLEXTOR  DVDR   PX-880SA  1.12 PQ: 0 ANSI: 5
[    4.641017] sr 4:0:0:0: [sr0] scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
[    4.642785] cdrom: Uniform CD-ROM driver Revision: 3.20
[    4.644607] sr 4:0:0:0: Attached scsi CD-ROM sr0
[    4.644675] sr 4:0:0:0: Attached scsi generic sg2 type 5
[    4.960464] ata6: SATA link down (SStatus 0 SControl 300)
[    5.130067] PM: Image not found (code -22)
[    5.130430] Freeing unused kernel image memory: 1016K
[    5.142443] Write protecting the kernel read-only data: 16384k
[    5.144878] Freeing unused kernel image memory: 2008K
[    5.146894] Freeing unused kernel image memory: 788K
[    5.148660] Run /init as init process
[    5.156620] systemd[1]: Inserted module 'autofs4'
[    5.162614] systemd[1]: systemd +suse.135.g0f9271c133 running in system mode. (+PAM -AUDIT +SELINUX -IMA +APPARMOR -SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
[    5.182498] systemd[1]: Detected architecture x86-64.
[    5.184407] systemd[1]: Running in initial RAM disk.
[    5.192684] systemd[1]: Set hostname to <quad>.
[    5.246034] random: systemd: uninitialized urandom read (16 bytes read)
[    5.248076] systemd[1]: Listening on udev Control Socket.
[    5.252088] random: systemd: uninitialized urandom read (16 bytes read)
[    5.254196] systemd[1]: Created slice system-systemd\x2dhibernate\x2dresume.slice.
[    5.258245] random: systemd: uninitialized urandom read (16 bytes read)
[    5.260290] systemd[1]: Listening on udev Kernel Socket.
[    5.264389] systemd[1]: Listening on Journal Socket (/dev/log).
[    5.268527] systemd[1]: Listening on Journal Socket.
[    5.273061] systemd[1]: Starting Create list of required static device nodes for the current kernel...
[    5.452995] systemd[273]: systemd-udevd.service: ProtectHostname=yes is configured, but the kernel does not support UTS namespaces, ignoring namespace setup.
[    5.557564] random: crng init done
[    5.559608] random: 7 urandom warning(s) missed due to ratelimiting
[    5.910837] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.914026] ehci-pci: EHCI PCI platform driver
[    5.916486] ehci-pci 0000:00:1a.7: EHCI Host Controller
[    5.918988] ehci-pci 0000:00:1a.7: new USB bus registered, assigned bus number 1
[    5.925048] ehci-pci 0000:00:1a.7: cache line size of 32 is not supported
[    5.927346] ehci-pci 0000:00:1a.7: irq 18, io mem 0xf4205000
[    5.942782] ehci-pci 0000:00:1a.7: USB 2.0 started, EHCI 1.00
[    5.945819] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.03
[    5.948633] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.951223] usb usb1: Product: EHCI Host Controller
[    5.954094] usb usb1: Manufacturer: Linux 5.3.0-rc1-linus+ ehci_hcd
[    5.962649] usb usb1: SerialNumber: 0000:00:1a.7
[    5.965012] hub 1-0:1.0: USB hub found
[    5.968137] hub 1-0:1.0: 6 ports detected
[    5.970729] ehci-pci 0000:00:1d.7: EHCI Host Controller
[    5.970736] ehci-pci 0000:00:1d.7: new USB bus registered, assigned bus number 2
[    5.974672] ehci-pci 0000:00:1d.7: cache line size of 32 is not supported
[    5.974688] ehci-pci 0000:00:1d.7: irq 23, io mem 0xf4204000
[    5.990463] ehci-pci 0000:00:1d.7: USB 2.0 started, EHCI 1.00
[    5.990614] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.03
[    5.990616] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.990617] usb usb2: Product: EHCI Host Controller
[    5.990618] usb usb2: Manufacturer: Linux 5.3.0-rc1-linus+ ehci_hcd
[    5.990619] usb usb2: SerialNumber: 0000:00:1d.7
[    5.991160] hub 2-0:1.0: USB hub found
[    5.991229] hub 2-0:1.0: 6 ports detected
[    5.994964] firewire_ohci 0000:05:01.0: added OHCI v1.0 device as card 0, 4 IR + 8 IT contexts, quirks 0x2
[    6.054122] PM: Image not found (code -22)
[    6.302460] usb 1-3: new high-speed USB device number 2 using ehci-pci
[    6.462842] usb 1-3: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= 0.00
[    6.464668] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    6.467431] hub 1-3:1.0: USB hub found
[    6.469516] hub 1-3:1.0: 3 ports detected
[    6.502536] firewire_core 0000:05:01.0: created device fw0: GUID 00309526b0132229, S400
[    6.543005] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
[    6.762452] usb 1-3.1: new high-speed USB device number 3 using ehci-pci
[    6.836199] systemd-journald[171]: Received SIGTERM from PID 1 (systemd).
[    6.850738] printk: systemd: 28 output lines suppressed due to ratelimiting
[    6.870826] usb 1-3.1: New USB device found, idVendor=0424, idProduct=2640, bcdDevice= 0.00
[    6.872417] usb 1-3.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    6.874222] hub 1-3.1:1.0: USB hub found
[    6.875951] hub 1-3.1:1.0: 3 ports detected
[    6.994770] systemd[1]: systemd +suse.135.g0f9271c133 running in system mode. (+PAM -AUDIT +SELINUX -IMA +APPARMOR -SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
[    7.014496] systemd[1]: Detected architecture x86-64.
[    7.022500] systemd[1]: Set hostname to <quad>.
[    7.061130] systemd-fstab-generator[470]: Checking was requested for "/home/bernyBulk/Bilder", but it is not a device.
[    7.062991] systemd-fstab-generator[470]: Checking was requested for "/home/bernyBulk/Downloads", but it is not a device.
[    7.064767] systemd-fstab-generator[470]: Checking was requested for "/home/bernyBulk/Musik", but it is not a device.
[    7.066551] systemd-fstab-generator[470]: Checking was requested for "/home/bernyBulk/Videos", but it is not a device.
[    7.136567] systemd[1]: /usr/lib/systemd/system/auditd.service:12: PIDFile= references a path below legacy directory /var/run/, updating /var/run/auditd.pid → /run/auditd.pid; please update the unit file accordingly.
[    7.166448] usb 1-3.1.1: new high-speed USB device number 4 using ehci-pci
[    7.178334] systemd[1]: /usr/lib/systemd/system/display-manager.service:12: PIDFile= references a path below legacy directory /var/run/, updating /var/run/displaymanager.pid → /run/displaymanager.pid; please update the unit file accordingly.
[    7.212180] systemd[1]: /usr/lib/systemd/system/virtlockd.socket:6: ListenStream= references a path below legacy directory /var/run/, updating /var/run/libvirt/virtlockd-sock → /run/libvirt/virtlockd-sock; please update the unit file accordingly.
[    7.214662] systemd[1]: /usr/lib/systemd/system/virtlockd-admin.socket:6: ListenStream= references a path below legacy directory /var/run/, updating /var/run/libvirt/virtlockd-admin-sock → /run/libvirt/virtlockd-admin-sock; please update the unit file accordingly.
[    7.217045] systemd[1]: /usr/lib/systemd/system/virtlogd.socket:6: ListenStream= references a path below legacy directory /var/run/, updating /var/run/libvirt/virtlogd-sock → /run/libvirt/virtlogd-sock; please update the unit file accordingly.
[    7.219669] systemd[1]: /usr/lib/systemd/system/virtlogd-admin.socket:6: ListenStream= references a path below legacy directory /var/run/, updating /var/run/libvirt/virtlogd-admin-sock → /run/libvirt/virtlogd-admin-sock; please update the unit file accordingly.
[    7.272507] systemd[1]: /usr/lib/systemd/system/pcscd.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/pcscd/pcscd.comm → /run/pcscd/pcscd.comm; please update the unit file accordingly.
[    7.297822] usb 1-3.1.1: New USB device found, idVendor=0424, idProduct=4063, bcdDevice= 1.91
[    7.299937] usb 1-3.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    7.302000] usb 1-3.1.1: Product: Ultra Fast Media Reader
[    7.304060] usb 1-3.1.1: Manufacturer: Generic
[    7.306125] usb 1-3.1.1: SerialNumber: 1004261000FE
[    7.308470] usb-storage 1-3.1.1:1.0: USB Mass Storage device detected
[    7.314623] scsi host10: usb-storage 1-3.1.1:1.0
[    7.358460] Adding 15624188k swap on /dev/sda2.  Priority:-2 extents:1 across:15624188k SSFS
[    7.384198] EXT4-fs (dm-0): re-mounted. Opts: acl,user_xattr
[    7.398451] usb 1-3.1.3: new full-speed USB device number 5 using ehci-pci
[    7.407613] audit: type=1400 audit(1564170716.859:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="ping" pid=510 comm="apparmor_parser"
[    7.449779] audit: type=1400 audit(1564170716.899:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="ghostscript" pid=529 comm="apparmor_parser"
[    7.449781] audit: type=1400 audit(1564170716.899:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="ghostscript///usr/bin/basename" pid=529 comm="apparmor_parser"
[    7.449783] audit: type=1400 audit(1564170716.899:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="ghostscript///usr/bin/dirname" pid=529 comm="apparmor_parser"
[    7.449784] audit: type=1400 audit(1564170716.899:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="ghostscript///usr/bin/hpijs" pid=529 comm="apparmor_parser"
[    7.449785] audit: type=1400 audit(1564170716.899:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="ghostscript//tempdir" pid=529 comm="apparmor_parser"
[    7.475911] audit: type=1400 audit(1564170716.927:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="lsb_release" pid=545 comm="apparmor_parser"
[    7.504768] audit: type=1400 audit(1564170716.955:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=555 comm="apparmor_parser"
[    7.507445] audit: type=1400 audit(1564170716.955:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=555 comm="apparmor_parser"
[    7.519307] systemd[560]: systemd-udevd.service: ProtectHostname=yes is configured, but the kernel does not support UTS namespaces, ignoring namespace setup.
[    7.521820] usb 1-3.1.3: New USB device found, idVendor=046d, idProduct=c52b, bcdDevice=12.08
[    7.526020] usb 1-3.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    7.526021] usb 1-3.1.3: Product: USB Receiver
[    7.526022] usb 1-3.1.3: Manufacturer: Logitech
[    7.533657] audit: type=1400 audit(1564170716.983:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="klogd" pid=563 comm="apparmor_parser"
[    7.793928] systemd-journald[509]: Received request to flush runtime journal from PID 1
[    8.076704] ACPI Warning: SystemIO range 0x0000000000000428-0x000000000000042F conflicts with OpRegion 0x000000000000042C-0x000000000000042D (\GP2C) (20190703/utaddress-204)
[    8.097217] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    8.098574] i801_smbus 0000:00:1f.3: SMBus using PCI interrupt
[    8.100772] lpc_ich: Resource conflict(s) found affecting gpio_ich
[    8.117734] libphy: r8169: probed
[    8.121617] r8169 0000:04:00.0 eth0: RTL8168b/8111b, 00:1a:4d:57:e3:87, XID 380, IRQ 31
[    8.124620] r8169 0000:04:00.0 eth0: jumbo features [frames: 4080 bytes, tx checksumming: ko]
[    8.130197] input: HDA ATI HDMI HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input6
[    8.144663] snd_hda_codec_realtek hdaudioC0D2: autoconfig for ALC889A: line_outs=4 (0x14/0x15/0x16/0x17/0x0) type:line
[    8.152541] snd_hda_codec_realtek hdaudioC0D2:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    8.168507] snd_hda_codec_realtek hdaudioC0D2:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[    8.172900] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11
[    8.174463] snd_hda_codec_realtek hdaudioC0D2:    mono: mono_out=0x0
[    8.175905] iTCO_wdt: Found a ICH9R TCO device (Version=2, TCOBASE=0x0460)
[    8.178892] snd_hda_codec_realtek hdaudioC0D2:    dig-out=0x1e/0x0
[    8.185019] snd_hda_codec_realtek hdaudioC0D2:    inputs:
[    8.186622] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
[    8.193212] snd_hda_codec_realtek hdaudioC0D2:      Rear Mic=0x18
[    8.196391] snd_hda_codec_realtek hdaudioC0D2:      Front Mic=0x19
[    8.201192] snd_hda_codec_realtek hdaudioC0D2:      Line=0x1a
[    8.210771] snd_hda_codec_realtek hdaudioC0D2:      CD=0x1c
[    8.217122] snd_hda_codec_realtek hdaudioC0D2:    dig-in=0x1f
[    8.251235] input: HDA Intel Rear Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input7
[    8.251316] input: HDA Intel Front Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input8
[    8.251365] input: HDA Intel Line as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9
[    8.251410] input: HDA Intel Line Out Front as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10
[    8.251454] input: HDA Intel Line Out Surround as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11
[    8.251500] input: HDA Intel Line Out CLFE as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
[    8.251545] input: HDA Intel Line Out Side as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
[    8.277690] psmouse serio1: logips2pp: Detected unknown Logitech mouse model 57
[    8.328149] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1a.7/usb1/1-3/1-3.1/1-3.1.3/1-3.1.3:1.0/0003:046D:C52B.0001/input/input14
[    8.334731] usbcore: registered new interface driver uas
[    8.338068] scsi 10:0:0:0: Direct-Access     Generic  Ultra HS-SD/MMC  1.91 PQ: 0 ANSI: 0
[    8.341577] sd 10:0:0:0: Attached scsi generic sg3 type 0
[    8.353497] sd 10:0:0:0: [sdc] Attached SCSI removable disk
[    8.386594] hid-generic 0003:046D:C52B.0001: input,hidraw0: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-0000:00:1a.7-3.1.3/input0
[    8.393011] input: Logitech USB Receiver Mouse as /devices/pci0000:00/0000:00:1a.7/usb1/1-3/1-3.1/1-3.1.3/1-3.1.3:1.1/0003:046D:C52B.0002/input/input15
[    8.397348] input: Logitech USB Receiver Consumer Control as /devices/pci0000:00/0000:00:1a.7/usb1/1-3/1-3.1/1-3.1.3/1-3.1.3:1.1/0003:046D:C52B.0002/input/input16
[    8.462568] input: Logitech USB Receiver System Control as /devices/pci0000:00/0000:00:1a.7/usb1/1-3/1-3.1/1-3.1.3/1-3.1.3:1.1/0003:046D:C52B.0002/input/input17
[    8.467176] hid-generic 0003:046D:C52B.0002: input,hidraw1: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:00:1a.7-3.1.3/input1
[    8.469940] hid-generic 0003:046D:C52B.0003: hidraw2: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:1a.7-3.1.3/input2
[    8.671663] logitech-djreceiver 0003:046D:C52B.0003: hidraw0: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:1a.7-3.1.3/input2
[    8.722640] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[    8.749863] input: ImExPS/2 Logitech Explorer Mouse as /devices/platform/i8042/serio1/input/input5
[    8.797545] input: Logitech Unifying Device. Wireless PID:4055 Mouse as /devices/pci0000:00/0000:00:1a.7/usb1/1-3/1-3.1/1-3.1.3/1-3.1.3:1.2/0003:046D:C52B.0003/0003:046D:4055.0004/input/input19
[    8.801331] hid-generic 0003:046D:4055.0004: input,hidraw1: USB HID v1.11 Mouse [Logitech Unifying Device. Wireless PID:4055] on usb-0000:00:1a.7-3.1.3/input2:1
[    8.815764] input: Logitech Unifying Device. Wireless PID:2011 Keyboard as /devices/pci0000:00/0000:00:1a.7/usb1/1-3/1-3.1/1-3.1.3/1-3.1.3:1.2/0003:046D:C52B.0003/0003:046D:2011.0005/input/input23
[    8.818468] input: Logitech Unifying Device. Wireless PID:2011 Consumer Control as /devices/pci0000:00/0000:00:1a.7/usb1/1-3/1-3.1/1-3.1.3/1-3.1.3:1.2/0003:046D:C52B.0003/0003:046D:2011.0005/input/input24
[    8.822114] input: Logitech Unifying Device. Wireless PID:2011 System Control as /devices/pci0000:00/0000:00:1a.7/usb1/1-3/1-3.1/1-3.1.3/1-3.1.3:1.2/0003:046D:C52B.0003/0003:046D:2011.0005/input/input25
[    8.824860] hid-generic 0003:046D:2011.0005: input,hidraw2: USB HID v1.11 Keyboard [Logitech Unifying Device. Wireless PID:2011] on usb-0000:00:1a.7-3.1.3/input2:2
[    8.932878] input: Logitech Unifying Device. Wireless PID:4055 as /devices/pci0000:00/0000:00:1a.7/usb1/1-3/1-3.1/1-3.1.3/1-3.1.3:1.2/0003:046D:C52B.0003/0003:046D:4055.0004/input/input29
[    8.939069] logitech-hidpp-device 0003:046D:4055.0004: input,hidraw1: USB HID v1.11 Mouse [Logitech Unifying Device. Wireless PID:4055] on usb-0000:00:1a.7-3.1.3/input2:1
[    9.124998] input: Logitech K520 as /devices/pci0000:00/0000:00:1a.7/usb1/1-3/1-3.1/1-3.1.3/1-3.1.3:1.2/0003:046D:C52B.0003/0003:046D:2011.0005/input/input30
[    9.128751] logitech-hidpp-device 0003:046D:2011.0005: input,hidraw2: USB HID v1.11 Keyboard [Logitech K520] on usb-0000:00:1a.7-3.1.3/input2:2
[    9.343920] br0: port 1(eth0) entered blocking state
[    9.343922] br0: port 1(eth0) entered disabled state
[    9.343982] device eth0 entered promiscuous mode
[    9.344894] RTL8211B Gigabit Ethernet r8169-400:00: attached PHY driver [RTL8211B Gigabit Ethernet] (mii_bus:phy_addr=r8169-400:00, irq=IGNORE)
[    9.462800] br0: port 1(eth0) entered blocking state
[    9.463507] r8169 0000:04:00.0 eth0: Link is Down
[    9.466414] br0: port 1(eth0) entered forwarding state
[    9.474981] IPv6: ADDRCONF(NETDEV_CHANGE): br0: link becomes ready
[    9.974193] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: acl,user_xattr
[   10.342477] br0: port 1(eth0) entered disabled state
[   10.425184] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: acl,user_xattr
[   11.550380] r8169 0000:04:00.0 eth0: Link is Up - 1Gbps/Full - flow control off
[   11.550390] br0: port 1(eth0) entered blocking state
[   11.550392] br0: port 1(eth0) entered forwarding state
[   16.452855] logitech-hidpp-device 0003:046D:2011.0005: HID++ 1.0 device connected.
[   22.342835] logitech-hidpp-device 0003:046D:4055.0004: HID++ 4.5 device connected.

[-- Attachment #3: ethtool.bad --]
[-- Type: text/plain, Size: 1135 bytes --]

Settings for eth0:
	Supported ports: [ TP MII ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Advertised pause frame use: Symmetric Receive-only
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  10baseT/Half 10baseT/Full 
	                                     100baseT/Half 100baseT/Full 
	                                     1000baseT/Full 
	Link partner advertised pause frame use: No
	Link partner advertised auto-negotiation: Yes
	Link partner advertised FEC modes: Not reported
	Speed: 1000Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 0
	Transceiver: internal
	Auto-negotiation: on
	Supports Wake-on: pumbg
	Wake-on: d
	Current message level: 0x00000033 (51)
			       drv probe ifdown ifup
	Link detected: yes

[-- Attachment #4: ethtool.good --]
[-- Type: text/plain, Size: 838 bytes --]

Settings for eth0:
	Supported ports: [ TP MII ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Half 1000baseT/Full 
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Half 1000baseT/Full 
	Advertised pause frame use: Symmetric Receive-only
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Speed: 100Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 0
	Transceiver: internal
	Auto-negotiation: off
	Supports Wake-on: pumbg
	Wake-on: d
	Current message level: 0x00000033 (51)
			       drv probe ifdown ifup
	Link detected: yes

[-- Attachment #5: mii-tool.bad --]
[-- Type: text/plain, Size: 382 bytes --]

eth0: negotiated 100baseTx-FD, link ok
  product info: vendor 00:07:32, model 17 rev 2
  basic mode:   autonegotiation enabled
  basic status: autonegotiation complete, link ok
  capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
  link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD

[-- Attachment #6: mii-tool.good --]
[-- Type: text/plain, Size: 317 bytes --]

eth0: 100 Mbit, full duplex, link ok
  product info: vendor 00:07:32, model 17 rev 2
  basic mode:   100 Mbit, full duplex
  basic status: link ok
  capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
  link partner: 100baseTx-HD

^ permalink raw reply

* Re: [PATCH v2 bpf] libbpf: fix missing __WORDSIZE definition
From: Arnaldo Carvalho de Melo @ 2019-07-26 20:49 UTC (permalink / raw)
  To: Daniel Borkmann, Andrii Nakryiko
  Cc: bpf, netdev, ast, daniel, acme, andrii.nakryiko, kernel-team
In-Reply-To: <20190718173021.2418606-1-andriin@fb.com>

Em Thu, Jul 18, 2019 at 10:30:21AM -0700, Andrii Nakryiko escreveu:
> hashmap.h depends on __WORDSIZE being defined. It is defined by
> glibc/musl in different headers. It's an explicit goal for musl to be
> "non-detectable" at compilation time, so instead include glibc header if
> glibc is explicitly detected and fall back to musl header otherwise.
> 
> Fixes: e3b924224028 ("libbpf: add resizable non-thread safe internal hashmap")
> Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>

Couldn't find ths in the bpf tree, please consider applying it:

Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>


- Arnaldo

> ---
>  tools/lib/bpf/hashmap.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tools/lib/bpf/hashmap.h b/tools/lib/bpf/hashmap.h
> index 03748a742146..bae8879cdf58 100644
> --- a/tools/lib/bpf/hashmap.h
> +++ b/tools/lib/bpf/hashmap.h
> @@ -10,6 +10,11 @@
>  
>  #include <stdbool.h>
>  #include <stddef.h>
> +#ifdef __GLIBC__
> +#include <bits/wordsize.h>
> +#else
> +#include <bits/reg.h>
> +#endif
>  #include "libbpf_internal.h"
>  
>  static inline size_t hash_bits(size_t h, int bits)
> -- 
> 2.17.1

-- 

- Arnaldo

^ permalink raw reply

* Re: [PATCH net-next v4 6/6] net: mscc: PTP Hardware Clock (PHC) support
From: Saeed Mahameed @ 2019-07-26 20:52 UTC (permalink / raw)
  To: antoine.tenart@bootlin.com, richardcochran@gmail.com,
	davem@davemloft.net, UNGLinuxDriver@microchip.com,
	alexandre.belloni@bootlin.com
  Cc: netdev@vger.kernel.org, thomas.petazzoni@bootlin.com,
	allan.nielsen@microchip.com
In-Reply-To: <20190725142707.9313-7-antoine.tenart@bootlin.com>

On Thu, 2019-07-25 at 16:27 +0200, Antoine Tenart wrote:
> This patch adds support for PTP Hardware Clock (PHC) to the Ocelot
> switch for both PTP 1-step and 2-step modes.
> 
> Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
> ---
>  drivers/net/ethernet/mscc/ocelot.c       | 394
> ++++++++++++++++++++++-
>  drivers/net/ethernet/mscc/ocelot.h       |  39 +++
>  drivers/net/ethernet/mscc/ocelot_board.c | 111 ++++++-
>  3 files changed, 536 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mscc/ocelot.c
> b/drivers/net/ethernet/mscc/ocelot.c
> index b71e4ecbe469..b08fcec73a30 100644
> --- a/drivers/net/ethernet/mscc/ocelot.c
> +++ b/drivers/net/ethernet/mscc/ocelot.c
> @@ -14,6 +14,7 @@
>  #include <linux/module.h>
>  #include <linux/netdevice.h>
>  #include <linux/phy.h>
> +#include <linux/ptp_clock_kernel.h>
>  #include <linux/skbuff.h>
>  #include <linux/iopoll.h>
>  #include <net/arp.h>
> @@ -538,7 +539,7 @@ static int ocelot_port_stop(struct net_device
> *dev)
>   */
>  static int ocelot_gen_ifh(u32 *ifh, struct frame_info *info)
>  {
> -	ifh[0] = IFH_INJ_BYPASS;
> +	ifh[0] = IFH_INJ_BYPASS | ((0x1ff & info->rew_op) << 21);
>  	ifh[1] = (0xf00 & info->port) >> 8;
>  	ifh[2] = (0xff & info->port) << 24;
>  	ifh[3] = (info->tag_type << 16) | info->vid;
> @@ -548,6 +549,7 @@ static int ocelot_gen_ifh(u32 *ifh, struct
> frame_info *info)
>  
>  static int ocelot_port_xmit(struct sk_buff *skb, struct net_device
> *dev)
>  {
> +	struct skb_shared_info *shinfo = skb_shinfo(skb);
>  	struct ocelot_port *port = netdev_priv(dev);
>  	struct ocelot *ocelot = port->ocelot;
>  	u32 val, ifh[IFH_LEN];
> @@ -566,6 +568,14 @@ static int ocelot_port_xmit(struct sk_buff *skb,
> struct net_device *dev)
>  	info.port = BIT(port->chip_port);
>  	info.tag_type = IFH_TAG_TYPE_C;
>  	info.vid = skb_vlan_tag_get(skb);
> +
> +	/* Check if timestamping is needed */
> +	if (ocelot->ptp && shinfo->tx_flags & SKBTX_HW_TSTAMP) {
> +		info.rew_op = port->ptp_cmd;
> +		if (port->ptp_cmd == IFH_REW_OP_TWO_STEP_PTP)
> +			info.rew_op |= (port->ts_id  % 4) << 3;
> +	}
> +
>  	ocelot_gen_ifh(ifh, &info);
>  
>  	for (i = 0; i < IFH_LEN; i++)
> @@ -596,11 +606,51 @@ static int ocelot_port_xmit(struct sk_buff
> *skb, struct net_device *dev)
>  
>  	dev->stats.tx_packets++;
>  	dev->stats.tx_bytes += skb->len;
> -	dev_kfree_skb_any(skb);
> +
> +	if (ocelot->ptp && shinfo->tx_flags & SKBTX_HW_TSTAMP &&
> +	    port->ptp_cmd == IFH_REW_OP_TWO_STEP_PTP) {
> +		struct ocelot_skb *oskb =
> +			kzalloc(sizeof(struct ocelot_skb), GFP_ATOMIC);
> +

Device drivers normally pre allocate descriptor info ring array to
avoid dynamic atomic allocations of private data on data path.

> +		oskb->skb = skb;
> +		oskb->id = port->ts_id % 4;
> +		port->ts_id++;

missing skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS; ?
see 3.1 Hardware Timestamping Implementation: Device Drivers
https://www.kernel.org/doc/Documentation/networking/timestamping.txt

> +
> +		list_add_tail(&oskb->head, &port->skbs);
> +	} else {
> +		dev_kfree_skb_any(skb);
> +	}
>  
>  	return NETDEV_TX_OK;
>  }
>  
> +void ocelot_get_hwtimestamp(struct ocelot *ocelot, struct timespec64
> *ts)
> +{
> +	unsigned long flags;
> +	u32 val;
> +
> +	spin_lock_irqsave(&ocelot->ptp_clock_lock, flags);
> +
> +	/* Read current PTP time to get seconds */
> +	val = ocelot_read_rix(ocelot, PTP_PIN_CFG, TOD_ACC_PIN);
> +
> +	val &= ~(PTP_PIN_CFG_SYNC | PTP_PIN_CFG_ACTION_MASK |
> PTP_PIN_CFG_DOM);
> +	val |= PTP_PIN_CFG_ACTION(PTP_PIN_ACTION_SAVE);
> +	ocelot_write_rix(ocelot, val, PTP_PIN_CFG, TOD_ACC_PIN);
> +	ts->tv_sec = ocelot_read_rix(ocelot, PTP_PIN_TOD_SEC_LSB,
> TOD_ACC_PIN);
> +
> +	/* Read packet HW timestamp from FIFO */
> +	val = ocelot_read(ocelot, SYS_PTP_TXSTAMP);
> +	ts->tv_nsec = SYS_PTP_TXSTAMP_PTP_TXSTAMP(val);
> +
> +	/* Sec has incremented since the ts was registered */
> +	if ((ts->tv_sec & 0x1) != !!(val &
> SYS_PTP_TXSTAMP_PTP_TXSTAMP_SEC))
> +		ts->tv_sec--;
> +
> +	spin_unlock_irqrestore(&ocelot->ptp_clock_lock, flags);
> +}
> +EXPORT_SYMBOL(ocelot_get_hwtimestamp);
> +

Why EXPORT_SYMBOL? this is the last patch and it is touching one
driver.

>  static int ocelot_mc_unsync(struct net_device *dev, const unsigned
> char *addr)
>  {
>  	struct ocelot_port *port = netdev_priv(dev);
> @@ -917,6 +967,97 @@ static int ocelot_get_port_parent_id(struct
> net_device *dev,
>  	return 0;
>  }
>  
> +static int ocelot_hwstamp_get(struct ocelot_port *port, struct ifreq
> *ifr)
> +{
> +	struct ocelot *ocelot = port->ocelot;
> +
> +	return copy_to_user(ifr->ifr_data, &ocelot->hwtstamp_config,
> +			    sizeof(ocelot->hwtstamp_config)) ? -EFAULT
> : 0;
> +}
> +
> +static int ocelot_hwstamp_set(struct ocelot_port *port, struct ifreq
> *ifr)
> +{
> +	struct ocelot *ocelot = port->ocelot;
> +	struct hwtstamp_config cfg;
> +
> +	if (copy_from_user(&cfg, ifr->ifr_data, sizeof(cfg)))
> +		return -EFAULT;
> +
> +	/* reserved for future extensions */
> +	if (cfg.flags)
> +		return -EINVAL;
> +
> +	/* Tx type sanity check */
> +	switch (cfg.tx_type) {
> +	case HWTSTAMP_TX_ON:
> +		port->ptp_cmd = IFH_REW_OP_TWO_STEP_PTP;
> +		break;
> +	case HWTSTAMP_TX_ONESTEP_SYNC:
> +		/* IFH_REW_OP_ONE_STEP_PTP updates the correctional
> field, we
> +		 * need to update the origin time.
> +		 */
> +		port->ptp_cmd = IFH_REW_OP_ORIGIN_PTP;
> +		break;
> +	case HWTSTAMP_TX_OFF:
> +		port->ptp_cmd = 0;
> +		break;
> +	default:
> +		return -ERANGE;
> +	}
> +
> +	mutex_lock(&ocelot->ptp_lock);
> +
> +	switch (cfg.rx_filter) {
> +	case HWTSTAMP_FILTER_NONE:
> +		break;
> +	case HWTSTAMP_FILTER_ALL:
> +	case HWTSTAMP_FILTER_SOME:
> +	case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
> +	case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
> +	case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
> +	case HWTSTAMP_FILTER_NTP_ALL:
> +	case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
> +	case HWTSTAMP_FILTER_PTP_V2_L4_SYNC:
> +	case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:
> +	case HWTSTAMP_FILTER_PTP_V2_L2_EVENT:
> +	case HWTSTAMP_FILTER_PTP_V2_L2_SYNC:
> +	case HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ:
> +	case HWTSTAMP_FILTER_PTP_V2_EVENT:
> +	case HWTSTAMP_FILTER_PTP_V2_SYNC:
> +	case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
> +		cfg.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
> +		break;
> +	default:
> +		mutex_unlock(&ocelot->ptp_lock);
> +		return -ERANGE;
> +	}
> +
> +	/* Commit back the result & save it */
> +	memcpy(&ocelot->hwtstamp_config, &cfg, sizeof(cfg));
> +	mutex_unlock(&ocelot->ptp_lock);
> +
> +	return copy_to_user(ifr->ifr_data, &cfg, sizeof(cfg)) ? -EFAULT
> : 0;
> +}
> +
> +static int ocelot_ioctl(struct net_device *dev, struct ifreq *ifr,
> int cmd)
> +{
> +	struct ocelot_port *port = netdev_priv(dev);
> +	struct ocelot *ocelot = port->ocelot;
> +
> +	/* The function is only used for PTP operations for now */
> +	if (!ocelot->ptp)
> +		return -EOPNOTSUPP;
> +
> +	switch (cmd) {
> +	case SIOCSHWTSTAMP:
> +		return ocelot_hwstamp_set(port, ifr);
> +	case SIOCGHWTSTAMP:
> +		return ocelot_hwstamp_get(port, ifr);
> +	default:
> +		return -EOPNOTSUPP;
> +	}
> +}
> +
>  static const struct net_device_ops ocelot_port_netdev_ops = {
>  	.ndo_open			= ocelot_port_open,
>  	.ndo_stop			= ocelot_port_stop,
> @@ -933,6 +1074,7 @@ static const struct net_device_ops
> ocelot_port_netdev_ops = {
>  	.ndo_set_features		= ocelot_set_features,
>  	.ndo_get_port_parent_id		= ocelot_get_port_parent_id,
>  	.ndo_setup_tc			= ocelot_setup_tc,
> +	.ndo_do_ioctl			= ocelot_ioctl,
>  };
>  
>  static void ocelot_get_strings(struct net_device *netdev, u32 sset,
> u8 *data)
> @@ -1014,12 +1156,37 @@ static int ocelot_get_sset_count(struct
> net_device *dev, int sset)
>  	return ocelot->num_stats;
>  }
>  
> +static int ocelot_get_ts_info(struct net_device *dev,
> +			      struct ethtool_ts_info *info)
> +{
> +	struct ocelot_port *ocelot_port = netdev_priv(dev);
> +	struct ocelot *ocelot = ocelot_port->ocelot;
> +
> +	if (!ocelot->ptp)
> +		return ethtool_op_get_ts_info(dev, info);
> +
> +	info->phc_index = ocelot->ptp_clock ?
> +			  ptp_clock_index(ocelot->ptp_clock) : -1;
> +	info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE |
> +				 SOF_TIMESTAMPING_RX_SOFTWARE |
> +				 SOF_TIMESTAMPING_SOFTWARE |
> +				 SOF_TIMESTAMPING_TX_HARDWARE |
> +				 SOF_TIMESTAMPING_RX_HARDWARE |
> +				 SOF_TIMESTAMPING_RAW_HARDWARE;
> +	info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON) |
> +			 BIT(HWTSTAMP_TX_ONESTEP_SYNC);
> +	info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) |
> BIT(HWTSTAMP_FILTER_ALL);
> +
> +	return 0;
> +}
> +
>  static const struct ethtool_ops ocelot_ethtool_ops = {
>  	.get_strings		= ocelot_get_strings,
>  	.get_ethtool_stats	= ocelot_get_ethtool_stats,
>  	.get_sset_count		= ocelot_get_sset_count,
>  	.get_link_ksettings	= phy_ethtool_get_link_ksettings,
>  	.set_link_ksettings	= phy_ethtool_set_link_ksettings,
> +	.get_ts_info		= ocelot_get_ts_info,
>  };
>  
>  static int ocelot_port_attr_stp_state_set(struct ocelot_port
> *ocelot_port,
> @@ -1629,6 +1796,196 @@ struct notifier_block
> ocelot_switchdev_blocking_nb __read_mostly = {
>  };
>  EXPORT_SYMBOL(ocelot_switchdev_blocking_nb);
>  
> +int ocelot_ptp_gettime64(struct ptp_clock_info *ptp, struct
> timespec64 *ts)
> +{
> +	struct ocelot *ocelot = container_of(ptp, struct ocelot,
> ptp_info);
> +	unsigned long flags;
> +	time64_t s;
> +	u32 val;
> +	s64 ns;
> +
> +	spin_lock_irqsave(&ocelot->ptp_clock_lock, flags);
> +
> +	val = ocelot_read_rix(ocelot, PTP_PIN_CFG, TOD_ACC_PIN);
> +	val &= ~(PTP_PIN_CFG_SYNC | PTP_PIN_CFG_ACTION_MASK |
> PTP_PIN_CFG_DOM);
> +	val |= PTP_PIN_CFG_ACTION(PTP_PIN_ACTION_SAVE);
> +	ocelot_write_rix(ocelot, val, PTP_PIN_CFG, TOD_ACC_PIN);
> +
> +	s = ocelot_read_rix(ocelot, PTP_PIN_TOD_SEC_MSB, TOD_ACC_PIN) &
> 0xffff;
> +	s <<= 32;
> +	s += ocelot_read_rix(ocelot, PTP_PIN_TOD_SEC_LSB, TOD_ACC_PIN);
> +	ns = ocelot_read_rix(ocelot, PTP_PIN_TOD_NSEC, TOD_ACC_PIN);
> +
> +	spin_unlock_irqrestore(&ocelot->ptp_clock_lock, flags);
> +
> +	/* Deal with negative values */
> +	if (ns >= 0x3ffffff0 && ns <= 0x3fffffff) {
> +		s--;
> +		ns &= 0xf;
> +		ns += 999999984;
> +	}
> +
> +	set_normalized_timespec64(ts, s, ns);
> +	return 0;
> +}
> +EXPORT_SYMBOL(ocelot_ptp_gettime64);
> +
> +static int ocelot_ptp_settime64(struct ptp_clock_info *ptp,
> +				const struct timespec64 *ts)
> +{
> +	struct ocelot *ocelot = container_of(ptp, struct ocelot,
> ptp_info);
> +	unsigned long flags;
> +	u32 val;
> +
> +	spin_lock_irqsave(&ocelot->ptp_clock_lock, flags);
> +
> +	val = ocelot_read_rix(ocelot, PTP_PIN_CFG, TOD_ACC_PIN);
> +	val &= ~(PTP_PIN_CFG_SYNC | PTP_PIN_CFG_ACTION_MASK |
> PTP_PIN_CFG_DOM);
> +	val |= PTP_PIN_CFG_ACTION(PTP_PIN_ACTION_IDLE);
> +
> +	ocelot_write_rix(ocelot, val, PTP_PIN_CFG, TOD_ACC_PIN);
> +
> +	ocelot_write_rix(ocelot, lower_32_bits(ts->tv_sec),
> PTP_PIN_TOD_SEC_LSB,
> +			 TOD_ACC_PIN);
> +	ocelot_write_rix(ocelot, upper_32_bits(ts->tv_sec),
> PTP_PIN_TOD_SEC_MSB,
> +			 TOD_ACC_PIN);
> +	ocelot_write_rix(ocelot, ts->tv_nsec, PTP_PIN_TOD_NSEC,
> TOD_ACC_PIN);
> +
> +	val = ocelot_read_rix(ocelot, PTP_PIN_CFG, TOD_ACC_PIN);
> +	val &= ~(PTP_PIN_CFG_SYNC | PTP_PIN_CFG_ACTION_MASK |
> PTP_PIN_CFG_DOM);
> +	val |= PTP_PIN_CFG_ACTION(PTP_PIN_ACTION_LOAD);
> +
> +	ocelot_write_rix(ocelot, val, PTP_PIN_CFG, TOD_ACC_PIN);
> +
> +	spin_unlock_irqrestore(&ocelot->ptp_clock_lock, flags);
> +	return 0;
> +}
> +
> +static int ocelot_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
> +{
> +	if (delta > -(NSEC_PER_SEC / 2) && delta < (NSEC_PER_SEC / 2))
> {
> +		struct ocelot *ocelot = container_of(ptp, struct
> ocelot, ptp_info);
> +		unsigned long flags;
> +		u32 val;
> +
> +		spin_lock_irqsave(&ocelot->ptp_clock_lock, flags);
> +
> +		val = ocelot_read_rix(ocelot, PTP_PIN_CFG,
> TOD_ACC_PIN);
> +		val &= ~(PTP_PIN_CFG_SYNC | PTP_PIN_CFG_ACTION_MASK |
> PTP_PIN_CFG_DOM);
> +		val |= PTP_PIN_CFG_ACTION(PTP_PIN_ACTION_IDLE);
> +
> +		ocelot_write_rix(ocelot, val, PTP_PIN_CFG,
> TOD_ACC_PIN);
> +
> +		ocelot_write_rix(ocelot, 0, PTP_PIN_TOD_SEC_LSB,
> TOD_ACC_PIN);
> +		ocelot_write_rix(ocelot, 0, PTP_PIN_TOD_SEC_MSB,
> TOD_ACC_PIN);
> +		ocelot_write_rix(ocelot, delta, PTP_PIN_TOD_NSEC,
> TOD_ACC_PIN);
> +
> +		val = ocelot_read_rix(ocelot, PTP_PIN_CFG,
> TOD_ACC_PIN);
> +		val &= ~(PTP_PIN_CFG_SYNC | PTP_PIN_CFG_ACTION_MASK |
> PTP_PIN_CFG_DOM);
> +		val |= PTP_PIN_CFG_ACTION(PTP_PIN_ACTION_DELTA);
> +
> +		ocelot_write_rix(ocelot, val, PTP_PIN_CFG,
> TOD_ACC_PIN);
> +
> +		spin_unlock_irqrestore(&ocelot->ptp_clock_lock, flags);
> +	} else {
> +		/* Fall back using ocelot_ptp_settime64 which is not
> exact. */
> +		struct timespec64 ts;
> +		u64 now;
> +
> +		ocelot_ptp_gettime64(ptp, &ts);
> +
> +		now = ktime_to_ns(timespec64_to_ktime(ts));
> +		ts = ns_to_timespec64(now + delta);
> +
> +		ocelot_ptp_settime64(ptp, &ts);
> +	}
> +	return 0;
> +}
> +
> +static int ocelot_ptp_adjfine(struct ptp_clock_info *ptp, long
> scaled_ppm)
> +{
> +	struct ocelot *ocelot = container_of(ptp, struct ocelot,
> ptp_info);
> +	u32 unit = 0, direction = 0;
> +	unsigned long flags;
> +	u64 adj = 0;
> +
> +	spin_lock_irqsave(&ocelot->ptp_clock_lock, flags);
> +
> +	if (!scaled_ppm)
> +		goto disable_adj;
> +
> +	if (scaled_ppm < 0) {
> +		direction = PTP_CFG_CLK_ADJ_CFG_DIR;
> +		scaled_ppm = -scaled_ppm;
> +	}
> +
> +	adj = PSEC_PER_SEC << 16;
> +	do_div(adj, scaled_ppm);
> +	do_div(adj, 1000);
> +
> +	/* If the adjustment value is too large, use ns instead */
> +	if (adj >= (1L << 30)) {
> +		unit = PTP_CFG_CLK_ADJ_FREQ_NS;
> +		do_div(adj, 1000);
> +	}
> +
> +	/* Still too big */
> +	if (adj >= (1L << 30))
> +		goto disable_adj;
> +
> +	ocelot_write(ocelot, unit | adj, PTP_CLK_CFG_ADJ_FREQ);
> +	ocelot_write(ocelot, PTP_CFG_CLK_ADJ_CFG_ENA | direction,
> +		     PTP_CLK_CFG_ADJ_CFG);
> +
> +	spin_unlock_irqrestore(&ocelot->ptp_clock_lock, flags);
> +	return 0;
> +
> +disable_adj:
> +	ocelot_write(ocelot, 0, PTP_CLK_CFG_ADJ_CFG);
> +
> +	spin_unlock_irqrestore(&ocelot->ptp_clock_lock, flags);
> +	return 0;
> +}
> +
> +static struct ptp_clock_info ocelot_ptp_clock_info = {
> +	.owner		= THIS_MODULE,
> +	.name		= "ocelot ptp",
> +	.max_adj	= 0x7fffffff,
> +	.n_alarm	= 0,
> +	.n_ext_ts	= 0,
> +	.n_per_out	= 0,
> +	.n_pins		= 0,
> +	.pps		= 0,
> +	.gettime64	= ocelot_ptp_gettime64,
> +	.settime64	= ocelot_ptp_settime64,
> +	.adjtime	= ocelot_ptp_adjtime,
> +	.adjfine	= ocelot_ptp_adjfine,
> +};
> +
> +static int ocelot_init_timestamp(struct ocelot *ocelot)
> +{
> +	ocelot->ptp_info = ocelot_ptp_clock_info;
> +	ocelot->ptp_clock = ptp_clock_register(&ocelot->ptp_info,
> ocelot->dev);
> +	if (IS_ERR(ocelot->ptp_clock))
> +		return PTR_ERR(ocelot->ptp_clock);
> +	/* Check if PHC support is missing at the configuration level
> */
> +	if (!ocelot->ptp_clock)
> +		return 0;
> +
> +	ocelot_write(ocelot, SYS_PTP_CFG_PTP_STAMP_WID(30),
> SYS_PTP_CFG);
> +	ocelot_write(ocelot, 0xffffffff, ANA_TABLES_PTP_ID_LOW);
> +	ocelot_write(ocelot, 0xffffffff, ANA_TABLES_PTP_ID_HIGH);
> +
> +	ocelot_write(ocelot, PTP_CFG_MISC_PTP_EN, PTP_CFG_MISC);
> +
> +	/* There is no device reconfiguration, PTP Rx stamping is
> always
> +	 * enabled.
> +	 */
> +	ocelot->hwtstamp_config.rx_filter =
> HWTSTAMP_FILTER_PTP_V2_EVENT;
> +
> +	return 0;
> +}
> +
>  int ocelot_probe_port(struct ocelot *ocelot, u8 port,
>  		      void __iomem *regs,
>  		      struct phy_device *phy)
> @@ -1661,6 +2018,8 @@ int ocelot_probe_port(struct ocelot *ocelot, u8
> port,
>  	ocelot_mact_learn(ocelot, PGID_CPU, dev->dev_addr, ocelot_port-
> >pvid,
>  			  ENTRYTYPE_LOCKED);
>  
> +	INIT_LIST_HEAD(&ocelot_port->skbs);
> +
>  	err = register_netdev(dev);
>  	if (err) {
>  		dev_err(ocelot->dev, "register_netdev failed\n");
> @@ -1684,7 +2043,7 @@ EXPORT_SYMBOL(ocelot_probe_port);
>  int ocelot_init(struct ocelot *ocelot)
>  {
>  	u32 port;
> -	int i, cpu = ocelot->num_phys_ports;
> +	int i, ret, cpu = ocelot->num_phys_ports;
>  	char queue_name[32];
>  
>  	ocelot->lags = devm_kcalloc(ocelot->dev, ocelot-
> >num_phys_ports,
> @@ -1699,6 +2058,8 @@ int ocelot_init(struct ocelot *ocelot)
>  		return -ENOMEM;
>  
>  	mutex_init(&ocelot->stats_lock);
> +	mutex_init(&ocelot->ptp_lock);
> +	spin_lock_init(&ocelot->ptp_clock_lock);
>  	snprintf(queue_name, sizeof(queue_name), "%s-stats",
>  		 dev_name(ocelot->dev));
>  	ocelot->stats_queue =
> create_singlethread_workqueue(queue_name);
> @@ -1812,15 +2173,42 @@ int ocelot_init(struct ocelot *ocelot)
>  	INIT_DELAYED_WORK(&ocelot->stats_work,
> ocelot_check_stats_work);
>  	queue_delayed_work(ocelot->stats_queue, &ocelot->stats_work,
>  			   OCELOT_STATS_CHECK_DELAY);
> +
> +	if (ocelot->ptp) {
> +		ret = ocelot_init_timestamp(ocelot);
> +		if (ret) {
> +			dev_err(ocelot->dev,
> +				"Timestamp initialization failed\n");
> +			return ret;
> +		}
> +	}
> +
>  	return 0;
>  }
>  EXPORT_SYMBOL(ocelot_init);
>  
>  void ocelot_deinit(struct ocelot *ocelot)
>  {
> +	struct list_head *pos, *tmp;
> +	struct ocelot_port *port;
> +	struct ocelot_skb *entry;
> +	int i;
> +
>  	destroy_workqueue(ocelot->stats_queue);
>  	mutex_destroy(&ocelot->stats_lock);
>  	ocelot_ace_deinit();
> +
> +	for (i = 0; i < ocelot->num_phys_ports; i++) {
> +		port = ocelot->ports[i];
> +
> +		list_for_each_safe(pos, tmp, &port->skbs) {
> +			entry = list_entry(pos, struct ocelot_skb,
> head);
> +
> +			list_del(pos);
> +			dev_kfree_skb_any(entry->skb);
> +			kfree(entry);
> +		}
> +	}
>  }
>  EXPORT_SYMBOL(ocelot_deinit);
>  
> diff --git a/drivers/net/ethernet/mscc/ocelot.h
> b/drivers/net/ethernet/mscc/ocelot.h
> index 515dee6fa8a6..e40773c01a44 100644
> --- a/drivers/net/ethernet/mscc/ocelot.h
> +++ b/drivers/net/ethernet/mscc/ocelot.h
> @@ -11,9 +11,11 @@
>  #include <linux/bitops.h>
>  #include <linux/etherdevice.h>
>  #include <linux/if_vlan.h>
> +#include <linux/net_tstamp.h>
>  #include <linux/phy.h>
>  #include <linux/phy/phy.h>
>  #include <linux/platform_device.h>
> +#include <linux/ptp_clock_kernel.h>
>  #include <linux/regmap.h>
>  
>  #include "ocelot_ana.h"
> @@ -39,6 +41,8 @@
>  
>  #define OCELOT_STATS_CHECK_DELAY (2 * HZ)
>  
> +#define OCELOT_PTP_QUEUE_SZ	128
> +
>  #define IFH_LEN 4
>  
>  struct frame_info {
> @@ -46,6 +50,8 @@ struct frame_info {
>  	u16 port;
>  	u16 vid;
>  	u8 tag_type;
> +	u16 rew_op;
> +	u32 timestamp;	/* rew_val */
>  };
>  
>  #define IFH_INJ_BYPASS	BIT(31)
> @@ -54,6 +60,12 @@ struct frame_info {
>  #define IFH_TAG_TYPE_C 0
>  #define IFH_TAG_TYPE_S 1
>  
> +#define IFH_REW_OP_NOOP			0x0
> +#define IFH_REW_OP_DSCP			0x1
> +#define IFH_REW_OP_ONE_STEP_PTP		0x2
> +#define IFH_REW_OP_TWO_STEP_PTP		0x3
> +#define IFH_REW_OP_ORIGIN_PTP		0x5
> +
>  #define OCELOT_SPEED_2500 0
>  #define OCELOT_SPEED_1000 1
>  #define OCELOT_SPEED_100  2
> @@ -401,6 +413,13 @@ enum ocelot_regfield {
>  	REGFIELD_MAX
>  };
>  
> +enum ocelot_clk_pins {
> +	ALT_PPS_PIN	= 1,
> +	EXT_CLK_PIN,
> +	ALT_LDST_PIN,
> +	TOD_ACC_PIN
> +};
> +
>  struct ocelot_multicast {
>  	struct list_head list;
>  	unsigned char addr[ETH_ALEN];
> @@ -450,6 +469,13 @@ struct ocelot {
>  	u64 *stats;
>  	struct delayed_work stats_work;
>  	struct workqueue_struct *stats_queue;
> +
> +	u8 ptp:1;
> +	struct ptp_clock *ptp_clock;
> +	struct ptp_clock_info ptp_info;
> +	struct hwtstamp_config hwtstamp_config;
> +	struct mutex ptp_lock; /* Protects the PTP interface state */
> +	spinlock_t ptp_clock_lock; /* Protects the PTP clock */
>  };
>  
>  struct ocelot_port {
> @@ -473,6 +499,16 @@ struct ocelot_port {
>  	struct phy *serdes;
>  
>  	struct ocelot_port_tc tc;
> +
> +	u8 ptp_cmd;
> +	struct list_head skbs;
> +	u8 ts_id;
> +};
> +
> +struct ocelot_skb {
> +	struct list_head head;
> +	struct sk_buff *skb;
> +	u8 id;
>  };
>  
>  u32 __ocelot_read_ix(struct ocelot *ocelot, u32 reg, u32 offset);
> @@ -517,4 +553,7 @@ extern struct notifier_block ocelot_netdevice_nb;
>  extern struct notifier_block ocelot_switchdev_nb;
>  extern struct notifier_block ocelot_switchdev_blocking_nb;
>  
> +int ocelot_ptp_gettime64(struct ptp_clock_info *ptp, struct
> timespec64 *ts);
> +void ocelot_get_hwtimestamp(struct ocelot *ocelot, struct timespec64
> *ts);
> +
>  #endif
> diff --git a/drivers/net/ethernet/mscc/ocelot_board.c
> b/drivers/net/ethernet/mscc/ocelot_board.c
> index df8d15994a89..0b14e7110e7f 100644
> --- a/drivers/net/ethernet/mscc/ocelot_board.c
> +++ b/drivers/net/ethernet/mscc/ocelot_board.c
> @@ -31,6 +31,8 @@ static int ocelot_parse_ifh(u32 *_ifh, struct
> frame_info *info)
>  
>  	info->len = OCELOT_BUFFER_CELL_SZ * wlen + llen - 80;
>  
> +	info->timestamp = IFH_EXTRACT_BITFIELD64(ifh[0], 21, 32);
> +
>  	info->port = IFH_EXTRACT_BITFIELD64(ifh[1], 43, 4);
>  
>  	info->tag_type = IFH_EXTRACT_BITFIELD64(ifh[1], 16,  1);
> @@ -98,7 +100,11 @@ static irqreturn_t ocelot_xtr_irq_handler(int
> irq, void *arg)
>  		int sz, len, buf_len;
>  		u32 ifh[4];
>  		u32 val;
> -		struct frame_info info;
> +		struct frame_info info = {};
> +		struct timespec64 ts;
> +		struct skb_shared_hwtstamps *shhwtstamps;
> +		u64 tod_in_ns;
> +		u64 full_ts_in_ns;

reverse xmas tree.

>  
>  		for (i = 0; i < IFH_LEN; i++) {
>  			err = ocelot_rx_frame_word(ocelot, grp, true,
> &ifh[i]);
> @@ -145,6 +151,22 @@ static irqreturn_t ocelot_xtr_irq_handler(int
> irq, void *arg)
>  			break;
>  		}
>  
> +		if (ocelot->ptp) {
> +			ocelot_ptp_gettime64(&ocelot->ptp_info, &ts);
> +
> +			tod_in_ns = ktime_set(ts.tv_sec, ts.tv_nsec);
> +			if ((tod_in_ns & 0xffffffff) < info.timestamp)
> +				full_ts_in_ns = (((tod_in_ns >> 32) -
> 1) << 32) |
> +						info.timestamp;
> +			else
> +				full_ts_in_ns = (tod_in_ns &
> GENMASK_ULL(63, 32)) |
> +						info.timestamp;
> +
> +			shhwtstamps = skb_hwtstamps(skb);
> +			memset(shhwtstamps, 0, sizeof(struct
> skb_shared_hwtstamps));
> +			shhwtstamps->hwtstamp = full_ts_in_ns;

the right way to set the timestamp is by calling: 
skb_tstamp_tx(skb, &tstamp);

> +		}
> +
>  		/* Everything we see on an interface that is in the HW
> bridge
>  		 * has already been forwarded.
>  		 */
> @@ -164,6 +186,70 @@ static irqreturn_t ocelot_xtr_irq_handler(int
> irq, void *arg)
>  	return IRQ_HANDLED;
>  }
>  
> +static irqreturn_t ocelot_ptp_rdy_irq_handler(int irq, void *arg)
> +{
> +	int budget = OCELOT_PTP_QUEUE_SZ;
> +	struct ocelot *ocelot = arg;
> +
> +	do {
> +		struct skb_shared_hwtstamps shhwtstamps;
> +		struct list_head *pos, *tmp;
> +		struct sk_buff *skb = NULL;
> +		struct ocelot_skb *entry;
> +		struct ocelot_port *port;
> +		struct timespec64 ts;
> +		u32 val, id, txport;
> +
> +		/* Prevent from infinite loop */
> +		if (unlikely(!--budget))
> +			break;

when budget gets to 1 you break, while you still have 1 to go :)

I assume OCELOT_PTP_QUEUE_SZ > 0, just make this the loop condition and
avoid infinite loops by design.

> +
> +		val = ocelot_read(ocelot, SYS_PTP_STATUS);
> +
> +		/* Check if a timestamp can be retrieved */
> +		if (!(val & SYS_PTP_STATUS_PTP_MESS_VLD))
> +			break;
> +
> +		WARN_ON(val & SYS_PTP_STATUS_PTP_OVFL);
> +
> +		/* Retrieve the ts ID and Tx port */
> +		id = SYS_PTP_STATUS_PTP_MESS_ID_X(val);
> +		txport = SYS_PTP_STATUS_PTP_MESS_TXPORT_X(val);
> +
> +		/* Retrieve its associated skb */
> +		port = ocelot->ports[txport];
> +
> +		list_for_each_safe(pos, tmp, &port->skbs) {
> +			entry = list_entry(pos, struct ocelot_skb,
> head);
> +			if (entry->id != id)
> +				continue;
> +
> +			skb = entry->skb;
> +
> +			list_del(pos);
> +			kfree(entry);
> +		}
> +
> +		/* Next ts */
> +		ocelot_write(ocelot, SYS_PTP_NXT_PTP_NXT, SYS_PTP_NXT);
> +
> +		if (unlikely(!skb))
> +			continue;
> +
> +		/* Get the h/w timestamp */
> +		ocelot_get_hwtimestamp(ocelot, &ts);
> +
> +		/* Set the timestamp into the skb */
> +		memset(&shhwtstamps, 0, sizeof(shhwtstamps));
> +		shhwtstamps.hwtstamp = ktime_set(ts.tv_sec,
> ts.tv_nsec);
> +		skb_tstamp_tx(skb, &shhwtstamps);
> +
> +		dev_kfree_skb_any(skb);
> +	} while (true);
> +
> +	return IRQ_HANDLED;
> +}
> +
>  static const struct of_device_id mscc_ocelot_match[] = {
>  	{ .compatible = "mscc,vsc7514-switch" },
>  	{ }
> @@ -172,8 +258,8 @@ MODULE_DEVICE_TABLE(of, mscc_ocelot_match);
>  
>  static int mscc_ocelot_probe(struct platform_device *pdev)
>  {
> -	int err, irq;
>  	unsigned int i;
> +	int err, irq_xtr, irq_ptp_rdy;
>  	struct device_node *np = pdev->dev.of_node;
>  	struct device_node *ports, *portnp;
>  	struct ocelot *ocelot;

reverse xmas tree

> @@ -232,16 +318,31 @@ static int mscc_ocelot_probe(struct
> platform_device *pdev)
>  	if (err)
>  		return err;
>  
> -	irq = platform_get_irq_byname(pdev, "xtr");
> -	if (irq < 0)
> +	irq_xtr = platform_get_irq_byname(pdev, "xtr");
> +	if (irq_xtr < 0)
>  		return -ENODEV;
>  
> -	err = devm_request_threaded_irq(&pdev->dev, irq, NULL,
> +	err = devm_request_threaded_irq(&pdev->dev, irq_xtr, NULL,
>  					ocelot_xtr_irq_handler,
> IRQF_ONESHOT,
>  					"frame extraction", ocelot);
>  	if (err)
>  		return err;
>  
> +
> +	irq_ptp_rdy = platform_get_irq_byname(pdev, "ptp_rdy");
> +	if (irq_ptp_rdy > 0) {
> +		err = devm_request_threaded_irq(&pdev->dev,
> irq_ptp_rdy, NULL,
> +						ocelot_ptp_rdy_irq_hand
> ler,
> +						IRQF_ONESHOT, "ptp
> ready",
> +						ocelot);
> +		if (err)
> +			return err;
> +
> +		/* Check if we can support PTP */
> +		if (ocelot->targets[PTP])
> +			ocelot->ptp = 1;
> +	}
> +
>  	regmap_field_write(ocelot->regfields[SYS_RESET_CFG_MEM_INIT],
> 1);
>  	regmap_field_write(ocelot->regfields[SYS_RESET_CFG_MEM_ENA],
> 1);
>  

^ permalink raw reply

* Re: [PATCH 2/2] net: usb: qmi_wwan: Add the BroadMobi BM818 card
From: David Miller @ 2019-07-26 21:00 UTC (permalink / raw)
  To: angus
  Cc: kernel, bjorn, johan, gregkh, netdev, linux-usb, linux-kernel,
	bob.ham
In-Reply-To: <20190724145227.27169-3-angus@akkea.ca>

From: "Angus Ainslie (Purism)" <angus@akkea.ca>
Date: Wed, 24 Jul 2019 07:52:27 -0700

> From: Bob Ham <bob.ham@puri.sm>
> 
> The BroadMobi BM818 M.2 card uses the QMI protocol
> 
> Signed-off-by: Bob Ham <bob.ham@puri.sm>
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>

Applied, thanks.

^ permalink raw reply

* [PATCH v2] iproute2: devlink: port from sys/queue.h to list.h
From: Sergei Trofimovich @ 2019-07-26 21:01 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Sergei Trofimovich, netdev
In-Reply-To: <20190726112956.3b54f906@hermes.lan>

sys/queue.h does not exist on linux-musl targets and fails build as:

    devlink.c:28:10: fatal error: sys/queue.h: No such file or directory
       28 | #include <sys/queue.h>
          |          ^~~~~~~~~~~~~

The change ports to list.h API and drops dependency of 'sys/queue.h'.
The API maps one-to-one.

Build-tested on linux-musl and linux-glibc.

Bug: https://bugs.gentoo.org/690486
CC: Stephen Hemminger <stephen@networkplumber.org>
CC: netdev@vger.kernel.org
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
 devlink/devlink.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/devlink/devlink.c b/devlink/devlink.c
index bb023c0c..0ea401ae 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -25,7 +25,6 @@
 #include <linux/devlink.h>
 #include <libmnl/libmnl.h>
 #include <netinet/ether.h>
-#include <sys/queue.h>
 
 #include "SNAPSHOT.h"
 #include "list.h"
@@ -5981,13 +5980,13 @@ static int fmsg_value_show(struct dl *dl, int type, struct nlattr *nl_data)
 
 struct nest_qentry {
 	int attr_type;
-	TAILQ_ENTRY(nest_qentry) nest_entries;
+	struct list_head nest_entries;
 };
 
 struct fmsg_cb_data {
 	struct dl *dl;
 	uint8_t value_type;
-	TAILQ_HEAD(, nest_qentry) qhead;
+	struct list_head qhead;
 };
 
 static int cmd_fmsg_nest_queue(struct fmsg_cb_data *fmsg_data,
@@ -6001,13 +6000,13 @@ static int cmd_fmsg_nest_queue(struct fmsg_cb_data *fmsg_data,
 			return -ENOMEM;
 
 		entry->attr_type = *attr_value;
-		TAILQ_INSERT_HEAD(&fmsg_data->qhead, entry, nest_entries);
+		list_add(&fmsg_data->qhead, &entry->nest_entries);
 	} else {
-		if (TAILQ_EMPTY(&fmsg_data->qhead))
+		if (list_empty(&fmsg_data->qhead))
 			return MNL_CB_ERROR;
-		entry = TAILQ_FIRST(&fmsg_data->qhead);
+		entry = list_first_entry(&fmsg_data->qhead, struct nest_qentry, nest_entries);
 		*attr_value = entry->attr_type;
-		TAILQ_REMOVE(&fmsg_data->qhead, entry, nest_entries);
+		list_del(&entry->nest_entries);
 		free(entry);
 	}
 	return MNL_CB_OK;
@@ -6116,7 +6115,7 @@ static int cmd_health_object_common(struct dl *dl, uint8_t cmd, uint16_t flags)
 		return err;
 
 	data.dl = dl;
-	TAILQ_INIT(&data.qhead);
+	INIT_LIST_HEAD(&data.qhead);
 	err = _mnlg_socket_sndrcv(dl->nlg, nlh, cmd_fmsg_object_cb, &data);
 	return err;
 }
-- 
2.22.0


^ permalink raw reply related

* Re: [PATCH net-next 1/3] net: ethernet: mediatek: Add basic PHYLINK support
From: David Miller @ 2019-07-26 21:02 UTC (permalink / raw)
  To: opensource
  Cc: netdev, frank-w, sean.wang, f.fainelli, linux, matthias.bgg,
	andrew, vivien.didelot, john, linux-mediatek, linux-mips, robh+dt,
	devicetree
In-Reply-To: <20190724192340.18978-1-opensource@vdorst.com>

From: René van Dorst <opensource@vdorst.com>
Date: Wed, 24 Jul 2019 21:23:40 +0200

> @@ -186,165 +187,219 @@ static void mtk_gmac0_rgmii_adjust(struct mtk_eth *eth, int speed)
>  	mtk_w32(eth, val, TRGMII_TCK_CTRL);
>  }
>  
> -static void mtk_phy_link_adjust(struct net_device *dev)
> +static void mtk_mac_config(struct phylink_config *config, unsigned int mode,
> +			   const struct phylink_link_state *state)
>  {
> -	struct mtk_mac *mac = netdev_priv(dev);
> -	u16 lcl_adv = 0, rmt_adv = 0;
> -	u8 flowctrl;
> -	u32 mcr = MAC_MCR_MAX_RX_1536 | MAC_MCR_IPG_CFG |
> -		  MAC_MCR_FORCE_MODE | MAC_MCR_TX_EN |
> -		  MAC_MCR_RX_EN | MAC_MCR_BACKOFF_EN |
> -		  MAC_MCR_BACKPR_EN;
> +	struct mtk_mac *mac = container_of(config, struct mtk_mac,
> +					   phylink_config);
> +	struct mtk_eth *eth = mac->hw;
>  
> -	if (unlikely(test_bit(MTK_RESETTING, &mac->hw->state)))
> -		return;
> +	u32 ge_mode = 0, val, mcr_cur, mcr_new;

Please elminiate the empty line in the middle of the local variabel
declarations and adhere to reverse christmas tree ordering.
> @@ -1798,6 +1853,13 @@ static int mtk_open(struct net_device *dev)
>  {
>  	struct mtk_mac *mac = netdev_priv(dev);
>  	struct mtk_eth *eth = mac->hw;
> +	int err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);

Reverse christmas tree please.

> @@ -2375,9 +2407,10 @@ static const struct net_device_ops mtk_netdev_ops = {
>  
>  static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
>  {
> +	struct phylink *phylink;
>  	struct mtk_mac *mac;
>  	const __be32 *_id = of_get_property(np, "reg", NULL);
> -	int id, err;
> +	int phy_mode, id, err;

While you are here please fix up the reverse christmas tree ordering, and
definitely don't make it worse :)

^ permalink raw reply

* Re: next-20190723: bpf/seccomp - systemd/journald issue?
From: Sedat Dilek @ 2019-07-26 21:02 UTC (permalink / raw)
  To: Yonghong Song
  Cc: Alexei Starovoitov, Daniel Borkmann, Martin Lau, Song Liu,
	netdev@vger.kernel.org, bpf@vger.kernel.org, Clang-Built-Linux ML,
	Kees Cook, Nick Desaulniers, Nathan Chancellor
In-Reply-To: <CA+icZUXYp=Jx+8aGrZmkCbSFp-cSPcoRzRdRJsPj4yYNs_mJQw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 11716 bytes --]

On Fri, Jul 26, 2019 at 10:38 PM Sedat Dilek <sedat.dilek@gmail.com> wrote:
>
> Hi Yonghong Song,
>
> On Fri, Jul 26, 2019 at 5:45 PM Yonghong Song <yhs@fb.com> wrote:
> >
> >
> >
> > On 7/26/19 1:26 AM, Sedat Dilek wrote:
> > > Hi,
> > >
> > > I have opened a new issue in the ClangBuiltLinux issue tracker.
> >
> > Glad to know clang 9 has asm goto support and now It can compile
> > kernel again.
> >
>
> Yupp.
>
> > >
> > > I am seeing a problem in the area bpf/seccomp causing
> > > systemd/journald/udevd services to fail.
> > >
> > > [Fri Jul 26 08:08:43 2019] systemd[453]: systemd-udevd.service: Failed
> > > to connect stdout to the journal socket, ignoring: Connection refused
> > >
> > > This happens when I use the (LLVM) LLD ld.lld-9 linker but not with
> > > BFD linker ld.bfd on Debian/buster AMD64.
> > > In both cases I use clang-9 (prerelease).
> >
> > Looks like it is a lld bug.
> >
> > I see the stack trace has __bpf_prog_run32() which is used by
> > kernel bpf interpreter. Could you try to enable bpf jit
> >    sysctl net.core.bpf_jit_enable = 1
> > If this passed, it will prove it is interpreter related.
> >
>
> After...
>
> sysctl -w net.core.bpf_jit_enable=1
>
> I can start all failed systemd services.
>
> systemd-journald.service
> systemd-udevd.service
> haveged.service
>
> This is in maintenance mode.
>
> What is next: Do set a permanent sysctl setting for net.core.bpf_jit_enable?
>

This is what I did:

Jul 26 22:43:06 iniza kernel: BUG: unable to handle page fault for
address: ffffffffa8203370
Jul 26 22:43:06 iniza kernel: #PF: supervisor read access in kernel mode
Jul 26 22:43:06 iniza kernel: #PF: error_code(0x0000) - not-present page
Jul 26 22:43:06 iniza kernel: PGD 2cfa0e067 P4D 2cfa0e067 PUD
2cfa0f063 PMD 450829063 PTE 800ffffd30bfc062
Jul 26 22:43:06 iniza kernel: Oops: 0000 [#3] SMP PTI
Jul 26 22:43:06 iniza kernel: CPU: 3 PID: 436 Comm: systemd-udevd
Tainted: G      D           5.3.0-rc1-7-amd64-cbl-asmgoto
#7~buster+dileks1
Jul 26 22:43:06 iniza kernel: Hardware name: LENOVO
20HDCTO1WW/20HDCTO1WW, BIOS N1QET83W (1.58 ) 04/18/2019
Jul 26 22:43:06 iniza kernel: RIP: 0010:___bpf_prog_run+0x40/0x14f0
Jul 26 22:43:06 iniza kernel: Code: f3 eb 24 48 83 f8 38 0f 84 a9 0c
00 00 48 83 f8 39 0f 85 8a 14 00 00 0f 1f 00 48 0f bf 43 02 48 8d 1c
c3 48 83 c3 08 0f b6
 33 <48> 8b 04 f5 10 2e 20 a8 48 83 f8 3b 7f 62 48 83 f8 1e 0f 8f c8 00
Jul 26 22:43:06 iniza kernel: RSP: 0018:ffffb3cec0327a88 EFLAGS: 00010246
Jul 26 22:43:06 iniza kernel: RAX: ffffb3cec0327b30 RBX:
ffffb3cec00d1038 RCX: 0000000000000000
Jul 26 22:43:06 iniza kernel: RDX: ffffb3cec0327b10 RSI:
00000000000000ac RDI: ffffb3cec0327ab0
Jul 26 22:43:06 iniza kernel: RBP: ffffb3cec0327aa0 R08:
ffff9b33c94c0a00 R09: 0000000000000000
Jul 26 22:43:06 iniza kernel: R10: ffff9b33cfe14e00 R11:
ffffffffa77b8210 R12: 0000000000000000
Jul 26 22:43:06 iniza kernel: R13: ffffb3cec00d1000 R14:
0000000000000000 R15: ffffb3cec0327ab0
Jul 26 22:43:06 iniza kernel: FS:  00007f7ac2d28d40(0000)
GS:ffff9b33d2580000(0000) knlGS:0000000000000000
Jul 26 22:43:06 iniza kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jul 26 22:43:06 iniza kernel: CR2: ffffffffa8203370 CR3:
000000044f3ea006 CR4: 00000000003606e0
Jul 26 22:43:06 iniza kernel: Call Trace:
Jul 26 22:43:06 iniza kernel:  __bpf_prog_run32+0x44/0x70
Jul 26 22:43:06 iniza kernel:  ? security_sock_rcv_skb+0x3f/0x60
Jul 26 22:43:06 iniza kernel:  sk_filter_trim_cap+0xe4/0x220
Jul 26 22:43:06 iniza kernel:  ? __skb_clone+0x2e/0x100
Jul 26 22:43:06 iniza kernel:  netlink_broadcast_filtered+0x2df/0x4f0
Jul 26 22:43:06 iniza kernel:  netlink_sendmsg+0x34f/0x3c0
Jul 26 22:43:06 iniza kernel:  ___sys_sendmsg+0x315/0x330
Jul 26 22:43:06 iniza kernel:  ? seccomp_run_filters+0x54/0x110
Jul 26 22:43:06 iniza kernel:  ? filename_parentat+0x210/0x490
Jul 26 22:43:06 iniza kernel:  ? __seccomp_filter+0xf7/0x6e0
Jul 26 22:43:06 iniza kernel:  ? __d_alloc+0x159/0x1c0
Jul 26 22:43:06 iniza kernel:  ? kmem_cache_free+0x1e/0x5c0
Jul 26 22:43:06 iniza kernel:  ? fast_dput+0x73/0xb0
Jul 26 22:43:06 iniza kernel:  __x64_sys_sendmsg+0x97/0xe0
Jul 26 22:43:06 iniza kernel:  do_syscall_64+0x59/0x90
Jul 26 22:43:06 iniza kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Jul 26 22:43:06 iniza kernel: RIP: 0033:0x7f7ac3519914
Jul 26 22:43:06 iniza kernel: Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff
ff ff eb b5 0f 1f 80 00 00 00 00 48 8d 05 e9 5d 0c 00 8b 00 85 c0 75
13 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 41
89 d4 55 48 89 f5 53
Jul 26 22:43:06 iniza kernel: RSP: 002b:00007ffcfb66a478 EFLAGS:
00000246 ORIG_RAX: 000000000000002e
Jul 26 22:43:06 iniza kernel: RAX: ffffffffffffffda RBX:
0000561e28ac9390 RCX: 00007f7ac3519914
Jul 26 22:43:06 iniza kernel: RDX: 0000000000000000 RSI:
00007ffcfb66a4a0 RDI: 000000000000000d
Jul 26 22:43:06 iniza kernel: RBP: 0000561e28acd210 R08:
0000561e28990140 R09: 0000000000000002
Jul 26 22:43:06 iniza kernel: R10: 0000000000000000 R11:
0000000000000246 R12: 0000000000000000
Jul 26 22:43:06 iniza kernel: R13: 0000000000000000 R14:
000000000000005e R15: 00007ffcfb66a490
Jul 26 22:43:06 iniza kernel: Modules linked in: nfsd auth_rpcgss
nfs_acl lockd grace i2c_dev parport_pc ppdev lp parport sunrpc
efivarfs ip_tables x_tables autofs4 ext4 crc32c_generic mbcache crc16
jbd2 btrfs zstd_decompress zstd_compress algif_skcipher af_alg sd_mod
uas usb_storage scsi_mod hid_generic usbhid hid dm_crypt dm_mod raid10
raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor
raid6_pq libcrc32c raid1 raid0 multipath linear md_mod
crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel
aesni_intel i915 intel_lpss_pci nvme aes_x86_64 glue_helper
i2c_algo_bit crypto_simd cryptd xhci_pci psmouse e1000e drm_kms_helper
xhci_hcd i2c_i801 nvme_core intel_lpss drm usbcore thermal wmi video
button
Jul 26 22:43:06 iniza kernel: CR2: ffffffffa8203370
Jul 26 22:43:06 iniza kernel: ---[ end trace 312670b063bd0391 ]---
Jul 26 22:43:06 iniza kernel: RIP: 0010:___bpf_prog_run+0x40/0x14f0
Jul 26 22:43:06 iniza kernel: Code: f3 eb 24 48 83 f8 38 0f 84 a9 0c
00 00 48 83 f8 39 0f 85 8a 14 00 00 0f 1f 00 48 0f bf 43 02 48 8d 1c
c3 48 83 c3 08 0f b6 33 <48> 8b 04 f5 10 2e 20 a8 48 83 f8 3b 7f 62 48
83 f8 1e 0f 8f c8 00
Jul 26 22:43:06 iniza kernel: RSP: 0018:ffffb3cec0253cb8 EFLAGS: 00010246
Jul 26 22:43:06 iniza kernel: RAX: ffffb3cec0253d60 RBX:
ffffb3cec00e9038 RCX: 0000000000000002
Jul 26 22:43:06 iniza kernel: RDX: ffffb3cec0253d40 RSI:
00000000000000ac RDI: ffffb3cec0253ce0
Jul 26 22:43:06 iniza kernel: RBP: ffffb3cec0253cd0 R08:
0000000000000000 R09: ffffb3cec0253f58
Jul 26 22:43:06 iniza kernel: R10: 0000000000000000 R11:
ffffffffa77b8210 R12: 000000007fff0000
Jul 26 22:43:06 iniza kernel: R13: ffffb3cec0253eb8 R14:
0000000000000000 R15: ffffb3cec0253ce0
Jul 26 22:43:06 iniza kernel: FS:  00007f7ac2d28d40(0000)
GS:ffff9b33d2580000(0000) knlGS:0000000000000000
Jul 26 22:43:06 iniza kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jul 26 22:43:06 iniza kernel: CR2: ffffffffa8203370 CR3:
000000044f3ea006 CR4: 00000000003606e0
Jul 26 22:43:06 iniza kernel: BUG: unable to handle page fault for
address: ffffffffa8203370
Jul 26 22:43:06 iniza kernel: #PF: supervisor read access in kernel mode
Jul 26 22:43:06 iniza kernel: #PF: error_code(0x0000) - not-present page
Jul 26 22:43:06 iniza kernel: PGD 2cfa0e067 P4D 2cfa0e067 PUD
2cfa0f063 PMD 450829063 PTE 800ffffd30bfc062
Jul 26 22:43:06 iniza kernel: Oops: 0000 [#4] SMP PTI
Jul 26 22:43:06 iniza kernel: CPU: 0 PID: 437 Comm: systemd-udevd
Tainted: G      D           5.3.0-rc1-7-amd64-cbl-asmgoto
#7~buster+dileks1
Jul 26 22:43:06 iniza kernel: Hardware name: LENOVO
20HDCTO1WW/20HDCTO1WW, BIOS N1QET83W (1.58 ) 04/18/2019
Jul 26 22:43:06 iniza kernel: RIP: 0010:___bpf_prog_run+0x40/0x14f0
Jul 26 22:43:06 iniza kernel: Code: f3 eb 24 48 83 f8 38 0f 84 a9 0c
00 00 48 83 f8 39 0f 85 8a 14 00 00 0f 1f 00 48 0f bf 43 02 48 8d 1c
c3 48 83 c3 08 0f b6 33 <48> 8b 04 f5 10 2e 20 a8 48 83 f8 3b 7f 62 48
83 f8 1e 0f 8f c8 00
Jul 26 22:43:06 iniza kernel: RSP: 0018:ffffb3cec032fa88 EFLAGS: 00010246
Jul 26 22:43:06 iniza kernel: RAX: ffffb3cec032fb30 RBX:
ffffb3cec00d1038 RCX: 0000000000000000
Jul 26 22:43:06 iniza kernel: RDX: ffffb3cec032fb10 RSI:
00000000000000ac RDI: ffffb3cec032fab0
Jul 26 22:43:06 iniza kernel: RBP: ffffb3cec032faa0 R08:
ffff9b33cf34b000 R09: 0000000000000000
Jul 26 22:43:06 iniza kernel: R10: ffff9b33cf3a3400 R11:
ffffffffa77b8210 R12: 0000000000000000
Jul 26 22:43:06 iniza kernel: R13: ffffb3cec00d1000 R14:
0000000000000000 R15: ffffb3cec032fab0
Jul 26 22:43:06 iniza kernel: FS:  00007f7ac2d28d40(0000)
GS:ffff9b33d2400000(0000) knlGS:0000000000000000
Jul 26 22:43:06 iniza kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jul 26 22:43:06 iniza kernel: CR2: ffffffffa8203370 CR3:
000000044724a001 CR4: 00000000003606f0
Jul 26 22:43:06 iniza kernel: Call Trace:
Jul 26 22:43:06 iniza kernel:  __bpf_prog_run32+0x44/0x70
Jul 26 22:43:06 iniza kernel:  ? prep_new_page+0x47/0x1a0
Jul 26 22:43:06 iniza kernel:  ? security_sock_rcv_skb+0x3f/0x60
Jul 26 22:43:06 iniza kernel:  sk_filter_trim_cap+0xe4/0x220
Jul 26 22:43:06 iniza kernel:  ? __skb_clone+0x2e/0x100
Jul 26 22:43:06 iniza kernel:  netlink_broadcast_filtered+0x2df/0x4f0
Jul 26 22:43:06 iniza kernel:  netlink_sendmsg+0x34f/0x3c0
Jul 26 22:43:06 iniza kernel:  ___sys_sendmsg+0x315/0x330
Jul 26 22:43:06 iniza kernel:  ? seccomp_run_filters+0x54/0x110
Jul 26 22:43:06 iniza kernel:  ? filename_parentat+0x210/0x490
Jul 26 22:43:06 iniza kernel:  ? __seccomp_filter+0xf7/0x6e0
Jul 26 22:43:06 iniza kernel:  ? __d_alloc+0x159/0x1c0
Jul 26 22:43:06 iniza kernel:  ? kmem_cache_free+0x1e/0x5c0
Jul 26 22:43:06 iniza kernel:  ? fast_dput+0x73/0xb0
Jul 26 22:43:06 iniza kernel:  __x64_sys_sendmsg+0x97/0xe0
Jul 26 22:43:06 iniza kernel:  do_syscall_64+0x59/0x90
Jul 26 22:43:06 iniza kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Jul 26 22:43:06 iniza kernel: RIP: 0033:0x7f7ac3519914
Jul 26 22:43:06 iniza kernel: Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff
ff ff eb b5 0f 1f 80 00 00 00 00 48 8d 05 e9 5d 0c 00 8b 00 85 c0 75
13 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 41
89 d4 55 48 89 f5 53
Jul 26 22:43:06 iniza kernel: RSP: 002b:00007ffcfb66a478 EFLAGS:
00000246 ORIG_RAX: 000000000000002e
Jul 26 22:43:06 iniza kernel: RAX: ffffffffffffffda RBX:
0000561e28aaa600 RCX: 00007f7ac3519914
Jul 26 22:43:06 iniza kernel: RDX: 0000000000000000 RSI:
00007ffcfb66a4a0 RDI: 000000000000000e
Jul 26 22:43:06 iniza kernel: RBP: 0000561e28aaaac0 R08:
0000561e28990140 R09: 0000000000000002
Jul 26 22:43:06 iniza kernel: R10: 0000000000000000 R11:
0000000000000246 R12: 0000000000000000
Jul 26 22:43:06 iniza kernel: R13: 0000000000000000 R14:
000000000000005d R15: 00007ffcfb66a490
Jul 26 22:43:06 iniza kernel: Modules linked in: nfsd auth_rpcgss
nfs_acl lockd grace i2c_dev parport_pc ppdev lp parport sunrpc
efivarfs ip_tables x_tables autofs4 ext4 crc32c_generic mbcache crc16
jbd2 btrfs zstd_decompress zstd_compress algif_skcipher af_alg sd_mod
uas usb_storage scsi_mod hid_generic usbhid hid dm_crypt dm_mod raid10
raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor
raid6_pq libcrc32c raid1 raid0 multipath linear md_mod
crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel
aesni_intel i915 intel_lpss_pci nvme aes_x86_64 glue_helper
i2c_algo_bit crypto_simd cryptd xhci_pci psmouse e1000e drm_kms_helper
xhci_hcd i2c_i801 nvme_core intel_lpss drm usbcore thermal wmi video
button
Jul 26 22:43:06 iniza kernel: CR2: ffffffffa8203370
Jul 26 22:43:06 iniza kernel: ---[ end trace 312670b063bd0392 ]---

Full `journalctl -xb` attached.

- Sedat -

[-- Attachment #2: journalctl-xb.txt.gz --]
[-- Type: application/gzip, Size: 26676 bytes --]

^ permalink raw reply

* Re: [PATCH net-next 3/3] net: dsa: mt7530: Add support for port 5
From: David Miller @ 2019-07-26 21:04 UTC (permalink / raw)
  To: opensource
  Cc: netdev, frank-w, sean.wang, f.fainelli, linux, matthias.bgg,
	andrew, vivien.didelot, john, linux-mediatek, linux-mips, robh+dt,
	devicetree
In-Reply-To: <20190724192549.24615-4-opensource@vdorst.com>

From: René van Dorst <opensource@vdorst.com>
Date: Wed, 24 Jul 2019 21:25:49 +0200

> @@ -1167,6 +1236,10 @@ mt7530_setup(struct dsa_switch *ds)
>  	u32 id, val;
>  	struct device_node *dn;
>  	struct mt7530_dummy_poll p;
> +	phy_interface_t interface;
> +	struct device_node *mac_np;
> +	struct device_node *phy_node;
> +	const __be32 *_id;

Reverse christmas tree here please.

Thank you.

^ permalink raw reply

* Re: [PATCH] net: tipc: Fix a possible null-pointer dereference in tipc_publ_purge()
From: David Miller @ 2019-07-26 21:05 UTC (permalink / raw)
  To: baijiaju1990; +Cc: jon.maloy, ying.xue, netdev, tipc-discussion, linux-kernel
In-Reply-To: <20190725092021.15855-1-baijiaju1990@gmail.com>

From: Jia-Ju Bai <baijiaju1990@gmail.com>
Date: Thu, 25 Jul 2019 17:20:21 +0800

> @@ -223,7 +223,8 @@ static void tipc_publ_purge(struct net *net, struct publication *publ, u32 addr)
>  		       publ->key);
>  	}
>  
> -	kfree_rcu(p, rcu);
> +	if (p)
> +		kfree_rcu(p, rcu);

Please fix your automated tools if that is what found this, because as
others have nodes kfree_rcu() can take a NULL pointer argument just
fine.

Thank you.

^ permalink raw reply

* Re: [PATCH] qed: RDMA - Fix the hw_ver returned in device attributes
From: David Miller @ 2019-07-26 21:05 UTC (permalink / raw)
  To: michal.kalderon; +Cc: ariel.elior, netdev
In-Reply-To: <20190725105955.12492-1-michal.kalderon@marvell.com>

From: Michal Kalderon <michal.kalderon@marvell.com>
Date: Thu, 25 Jul 2019 13:59:55 +0300

> The hw_ver field was initialized to zero. Return the chip revision.
> This is relevant for rdma driver.
> 
> Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>

Applied.

^ permalink raw reply

* Re: next-20190723: bpf/seccomp - systemd/journald issue?
From: Yonghong Song @ 2019-07-26 21:05 UTC (permalink / raw)
  To: sedat.dilek@gmail.com
  Cc: Alexei Starovoitov, Daniel Borkmann, Martin Lau, Song Liu,
	netdev@vger.kernel.org, bpf@vger.kernel.org, Clang-Built-Linux ML,
	Kees Cook, Nick Desaulniers, Nathan Chancellor
In-Reply-To: <CA+icZUXYp=Jx+8aGrZmkCbSFp-cSPcoRzRdRJsPj4yYNs_mJQw@mail.gmail.com>



On 7/26/19 1:38 PM, Sedat Dilek wrote:
> Hi Yonghong Song,
> 
> On Fri, Jul 26, 2019 at 5:45 PM Yonghong Song <yhs@fb.com> wrote:
>>
>>
>>
>> On 7/26/19 1:26 AM, Sedat Dilek wrote:
>>> Hi,
>>>
>>> I have opened a new issue in the ClangBuiltLinux issue tracker.
>>
>> Glad to know clang 9 has asm goto support and now It can compile
>> kernel again.
>>
> 
> Yupp.
> 
>>>
>>> I am seeing a problem in the area bpf/seccomp causing
>>> systemd/journald/udevd services to fail.
>>>
>>> [Fri Jul 26 08:08:43 2019] systemd[453]: systemd-udevd.service: Failed
>>> to connect stdout to the journal socket, ignoring: Connection refused
>>>
>>> This happens when I use the (LLVM) LLD ld.lld-9 linker but not with
>>> BFD linker ld.bfd on Debian/buster AMD64.
>>> In both cases I use clang-9 (prerelease).
>>
>> Looks like it is a lld bug.
>>
>> I see the stack trace has __bpf_prog_run32() which is used by
>> kernel bpf interpreter. Could you try to enable bpf jit
>>     sysctl net.core.bpf_jit_enable = 1
>> If this passed, it will prove it is interpreter related.
>>
> 
> After...
> 
> sysctl -w net.core.bpf_jit_enable=1
> 
> I can start all failed systemd services.
> 
> systemd-journald.service
> systemd-udevd.service
> haveged.service
> 
> This is in maintenance mode.
> 
> What is next: Do set a permanent sysctl setting for net.core.bpf_jit_enable?

I do think you should set net.core.bpf_jit_enable by default. This is 
more tested in production and you get better performance as well.

> 
> Regards,
> - Sedat -
> 
>>>
>>> Base for testing: next-20190723.
>>>
>>> The call-trace looks like this:
>>>
>>> [Fri Jul 26 08:08:42 2019] BUG: unable to handle page fault for
>>> address: ffffffff85403370
>>> [Fri Jul 26 08:08:42 2019] #PF: supervisor read access in kernel mode
>>> [Fri Jul 26 08:08:42 2019] #PF: error_code(0x0000) - not-present page
>>> [Fri Jul 26 08:08:42 2019] PGD 7620e067 P4D 7620e067 PUD 7620f063 PMD
>>> 44fe85063 PTE 800fffff8a3fc062
>>> [Fri Jul 26 08:08:42 2019] Oops: 0000 [#1] SMP PTI
>>> [Fri Jul 26 08:08:42 2019] CPU: 2 PID: 417 Comm: (journald) Not
>>> tainted 5.3.0-rc1-5-amd64-cbl-asmgoto #5~buster+dileks1
>>> [Fri Jul 26 08:08:42 2019] Hardware name: LENOVO
>>> 20HDCTO1WW/20HDCTO1WW, BIOS N1QET83W (1.58 ) 04/18/2019
>>> [Fri Jul 26 08:08:42 2019] RIP: 0010:___bpf_prog_run+0x40/0x14f0
>>> [Fri Jul 26 08:08:42 2019] Code: f3 eb 24 48 83 f8 38 0f 84 a9 0c 00
>>> 00 48 83 f8 39 0f 85 8a 14 00 00 0f 1f 00 48 0f bf 43 02 48 8d 1c c3
>>> 48 83 c3 08 0f b6 33 <48> 8b 04 f5 10 2e 40 85 48 83 f8 3b 7f 62 48 83
>>> f8 1e 0f 8f c8 00
>>> [Fri Jul 26 08:08:42 2019] RSP: 0018:ffff992ec028fcb8 EFLAGS: 00010246
>>> [Fri Jul 26 08:08:42 2019] RAX: ffff992ec028fd60 RBX: ffff992ec00e9038
>>> RCX: 0000000000000002
>>> [Fri Jul 26 08:08:42 2019] RDX: ffff992ec028fd40 RSI: 00000000000000ac
>>> RDI: ffff992ec028fce0
>>> [Fri Jul 26 08:08:42 2019] RBP: ffff992ec028fcd0 R08: 0000000000000000
>>> R09: ffff992ec028ff58
>>> [Fri Jul 26 08:08:42 2019] R10: 0000000000000000 R11: ffffffff849b8210
>>> R12: 000000007fff0000
>>> [Fri Jul 26 08:08:42 2019] R13: ffff992ec028feb8 R14: 0000000000000000
>>> R15: ffff992ec028fce0
>>> [Fri Jul 26 08:08:42 2019] FS:  00007f5d20f1d940(0000)
>>> GS:ffff8ba3d2500000(0000) knlGS:0000000000000000
>>> [Fri Jul 26 08:08:42 2019] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>>> [Fri Jul 26 08:08:42 2019] CR2: ffffffff85403370 CR3: 0000000445b3e001
>>> CR4: 00000000003606e0
>>> [Fri Jul 26 08:08:42 2019] Call Trace:
>>> [Fri Jul 26 08:08:42 2019]  __bpf_prog_run32+0x44/0x70
>>> [Fri Jul 26 08:08:42 2019]  ? flush_tlb_func_common+0xd8/0x230
>>> [Fri Jul 26 08:08:42 2019]  ? mem_cgroup_commit_charge+0x8c/0x120
>>> [Fri Jul 26 08:08:42 2019]  ? wp_page_copy+0x464/0x7a0
>>> [Fri Jul 26 08:08:42 2019]  seccomp_run_filters+0x54/0x110
>>> [Fri Jul 26 08:08:42 2019]  __seccomp_filter+0xf7/0x6e0
>>> [Fri Jul 26 08:08:42 2019]  ? do_wp_page+0x32b/0x5d0
>>> [Fri Jul 26 08:08:42 2019]  ? handle_mm_fault+0x90d/0xbf0
>>> [Fri Jul 26 08:08:42 2019]  syscall_trace_enter+0x182/0x290
>>> [Fri Jul 26 08:08:42 2019]  do_syscall_64+0x30/0x90
>>> [Fri Jul 26 08:08:42 2019]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
>>> [Fri Jul 26 08:08:42 2019] RIP: 0033:0x7f5d220d7f59
>>> [Fri Jul 26 08:08:42 2019] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00
>>> 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8
>>> 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00
>>> f7 d8 64 89 01 48
>>> [Fri Jul 26 08:08:42 2019] RSP: 002b:00007ffd11332b48 EFLAGS: 00000246
>>> ORIG_RAX: 000000000000013d
>>> [Fri Jul 26 08:08:42 2019] RAX: ffffffffffffffda RBX: 000055bf8ab34010
>>> RCX: 00007f5d220d7f59
>>> [Fri Jul 26 08:08:42 2019] RDX: 000055bf8ab34010 RSI: 0000000000000000
>>> RDI: 0000000000000001
>>> [Fri Jul 26 08:08:42 2019] RBP: 000055bf8ab97fb0 R08: 000055bf8abbe180
>>> R09: 00000000c000003e
>>> [Fri Jul 26 08:08:42 2019] R10: 000055bf8abbe1e0 R11: 0000000000000246
>>> R12: 00007ffd11332ba0
>>> [Fri Jul 26 08:08:42 2019] R13: 00007ffd11332b98 R14: 00007f5d21f087f8
>>> R15: 000000000000002c
>>> [Fri Jul 26 08:08:42 2019] Modules linked in: i2c_dev parport_pc
>>> sunrpc ppdev lp parport efivarfs ip_tables x_tables autofs4 ext4
>>> crc32c_generic mbcache crc16 jbd2 btrfs zstd_decompress zstd_compress
>>> algif_skcipher af_alg sd_mod dm_crypt dm_mod raid10 raid456
>>> async_raid6_recov async_memcpy async_pq async_xor async_tx xor
>>> raid6_pq libcrc32c raid1 uas raid0 usb_storage multipath linear
>>> scsi_mod md_mod hid_cherry hid_generic usbhid hid crct10dif_pclmul
>>> crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64
>>> i915 glue_helper crypto_simd nvme i2c_algo_bit cryptd psmouse xhci_pci
>>> drm_kms_helper e1000e i2c_i801 xhci_hcd intel_lpss_pci nvme_core
>>> intel_lpss drm usbcore thermal wmi video button
>>> [Fri Jul 26 08:08:42 2019] CR2: ffffffff85403370
>>> [Fri Jul 26 08:08:42 2019] ---[ end trace 867b35c7d6c6705a ]---
>>> [Fri Jul 26 08:08:42 2019] RIP: 0010:___bpf_prog_run+0x40/0x14f0
>>> [Fri Jul 26 08:08:42 2019] Code: f3 eb 24 48 83 f8 38 0f 84 a9 0c 00
>>> 00 48 83 f8 39 0f 85 8a 14 00 00 0f 1f 00 48 0f bf 43 02 48 8d 1c c3
>>> 48 83 c3 08 0f b6 33 <48> 8b 04 f5 10 2e 40 85 48 83 f8 3b 7f 62 48 83
>>> f8 1e 0f 8f c8 00
>>> [Fri Jul 26 08:08:42 2019] RSP: 0018:ffff992ec028fcb8 EFLAGS: 00010246
>>> [Fri Jul 26 08:08:42 2019] RAX: ffff992ec028fd60 RBX: ffff992ec00e9038
>>> RCX: 0000000000000002
>>> [Fri Jul 26 08:08:42 2019] RDX: ffff992ec028fd40 RSI: 00000000000000ac
>>> RDI: ffff992ec028fce0
>>> [Fri Jul 26 08:08:42 2019] RBP: ffff992ec028fcd0 R08: 0000000000000000
>>> R09: ffff992ec028ff58
>>> [Fri Jul 26 08:08:42 2019] R10: 0000000000000000 R11: ffffffff849b8210
>>> R12: 000000007fff0000
>>> [Fri Jul 26 08:08:42 2019] R13: ffff992ec028feb8 R14: 0000000000000000
>>> R15: ffff992ec028fce0
>>> [Fri Jul 26 08:08:42 2019] FS:  00007f5d20f1d940(0000)
>>> GS:ffff8ba3d2500000(0000) knlGS:0000000000000000
>>> [Fri Jul 26 08:08:42 2019] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>>> [Fri Jul 26 08:08:42 2019] CR2: ffffffff85403370 CR3: 0000000445b3e001
>>> CR4: 00000000003606e0
>>>
>>> More details in [1] and what I tried (for example CONFIG_SECCOMP=n)
>>>
>>> I have no clue about BPF or SECCOMP.
>>>
>>> Can you comment on this?
>>>
>>> If this touches BPF: Can you give me some hints and instructions in debugging?
>>>
>>> My kernel-config and dmesg-log are attached.
>>>
>>> Thanks.
>>>
>>> Regards,
>>> - Sedat -
>>>
>>> [1] https://github.com/ClangBuiltLinux/linux/issues/619
>>>

^ permalink raw reply

* Re: [PATCH net-next 2/2] mlx4/en_netdev: call notifiers when hw_enc_features change
From: Saeed Mahameed @ 2019-07-26 21:10 UTC (permalink / raw)
  To: dcaratti@redhat.com, davem@davemloft.net, Tariq Toukan,
	netdev@vger.kernel.org
  Cc: Eran Ben Elisha
In-Reply-To: <7ec40c37b843ebd3fd2ff5998bb382e13e45d816.camel@redhat.com>

On Fri, 2019-07-26 at 12:39 +0200, Davide Caratti wrote:
> On Thu, 2019-07-25 at 21:27 +0000, Saeed Mahameed wrote:
> > On Thu, 2019-07-25 at 14:25 +0200, Davide Caratti wrote:
> > > On Wed, 2019-07-24 at 20:47 +0000, Saeed Mahameed wrote:
> > > > On Wed, 2019-07-24 at 16:02 +0200, Davide Caratti wrote:
> > > > > ensure to call netdev_features_change() when the driver flips
> > > > > its
> > > > > hw_enc_features bits.
> > > > > 
> > > > > Signed-off-by: Davide Caratti <dcaratti@redhat.com>
> > > > 
> > > > The patch is correct, 
> > > 
> > > hello Saeed, and thanks for looking at this!
> > > 
> > > > but can you explain how did you come to this ? 
> > > > did you encounter any issue with the current code ?
> > > > 
> > > > I am asking just because i think the whole dynamic changing of
> > > > dev-
> > > > > hw_enc_features is redundant since mlx4 has the
> > > > > featutres_check
> > > > callback.
> > > 
> > > we need it to ensure that vlan_transfer_features() updates
> > > the (new) value of hw_enc_features in the overlying vlan:
> > > otherwise,
> > > segmentation will happen anyway when skb passes from vxlan to
> > > vlan,
> > > if the
> > > vxlan is added after the vlan device has been created (see:
> > > 7dad9937e064
> > > ("net: vlan: add support for tunnel offload") ).
> > > 
> > 
> > but in previous patch you made sure that the vlan always sees the
> > correct hw_enc_features on driver load, we don't need to have this
> > dynamic update mechanism,
> 
> ok, but the mlx4 driver flips the value of hw_enc_features when VXLAN
> tunnels are added or removed. So, assume eth0 is a Cx3-pro, and I do:
>  
>  # ip link add name vlan5 link eth0 type vlan id 5
>  # ip link add dev vxlan6 type vxlan id 6  [...]  dev vlan5
>  
> the value of dev->hw_enc_features is 0 for vlan5, and as a
> consequence
> VXLAN over VLAN traffic becomes segmented by the VLAN, even if eth0,
> at
> the end of this sequence, has the "right" features bits.
> 

your patch handled this issue already, no need for flipping and
updating features if features check ndo will cover the cases we don't
support.

> > features_check ndo should take care of
> > protocols we don't support.
> 
> I just had a look at mlx4_en_features_check(), I see it checks if the
> packet is tunneled in VXLAN and the destination port matches the
> configured value of priv->vxlan_port (when that value is not zero).
> Now:
> 
> On Wed, 2019-07-24 at 20:47 +0000, Saeed Mahameed wrote:
> > I am asking just because i think the whole dynamic changing of 
> > dev-> hw_enc_features is redundant since mlx4 has the
> > featutres_check
> > callback.
> 
> I read your initial proposal again. Would it be correct if I just use
> patch 1/2, where I add an assignment of
> 
> dev->hw_enc_features = NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | \
>                        NETIF_F_RXCSUM | \
>                        NETIF_F_TSO | NETIF_F_TSO6 | \
>                        NETIF_F_GSO_UDP_TUNNEL | \
>                        NETIF_F_GSO_UDP_TUNNEL_CSUM | \
>                        NETIF_F_GSO_PARTIAL;
> 
> in mlx4_en_init_netdev(), and then remove the code that flips
> dev->hw_enc_features in mlx4_en_add_vxlan_offloads() and
> mlx4_en_del_vxlan_offloads() ?
> 

yes, this is exactly what I meant.

Thanks,
Saeed.

^ permalink raw reply

* Re: [PATCH] Build fixes for skb_frag_size conversion
From: David Miller @ 2019-07-26 21:10 UTC (permalink / raw)
  To: arnd; +Cc: willy, netdev
In-Reply-To: <CAK8P3a1Ae3r=dOa-LSWxUEWH5qY4c8HfnGuT0y5BEL51tUCDOQ@mail.gmail.com>

From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 25 Jul 2019 13:08:18 +0200

> On Wed, Jul 24, 2019 at 1:37 PM Matthew Wilcox <willy@infradead.org> wrote:
>>
>> From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
>>
>> I missed a few places.  One is in some ifdeffed code which will probably
>> never be re-enabled; the others are in drivers which can't currently be
>> compiled on x86.
>>
>> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> 
>> diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
>> index cc12c78f73f1..46a6fcf1414d 100644
>> --- a/drivers/staging/octeon/ethernet-tx.c
>> +++ b/drivers/staging/octeon/ethernet-tx.c
>> @@ -284,7 +284,7 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
>>
>>                         hw_buffer.s.addr =
>>                                 XKPHYS_TO_PHYS((u64)skb_frag_address(fs));
>> -                       hw_buffer.s.size = fs->size;
>> +                       hw_buffer.s.size = skb_drag_size(fs);
>>                         CVM_OCT_SKB_CB(skb)[i + 1] = hw_buffer.u64;
>>                 }
>>                 hw_buffer.s.addr = XKPHYS_TO_PHYS((u64)CVM_OCT_SKB_CB(skb));
> 
> Kernelci noticed a build failure from a typo here:
> https://kernelci.org/build/id/5d3943f859b514103f688918/logs/

I just checked this into net-next:

====================
From 1fbf400b58fa70c35bf671ff640b83799e45388d Mon Sep 17 00:00:00 2001
From: "David S. Miller" <davem@davemloft.net>
Date: Fri, 26 Jul 2019 14:10:30 -0700
Subject: [PATCH] staging: octeon: Fix build failure due to typo.

drivers/staging/octeon/ethernet-tx.c:287:23: error: implicit declaration of function 'skb_drag_size'; did you mean 'skb_frag_size'? [-Werror=implicit-function-declaration]

From kernelci report:

	https://kernelci.org/build/id/5d3943f859b514103f688918/logs/

Fixes: 92493a2f8a8d ("Build fixes for skb_frag_size conversion")
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/staging/octeon/ethernet-tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
index 46a6fcf1414d..44f79cd32750 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -284,7 +284,7 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
 
 			hw_buffer.s.addr =
 				XKPHYS_TO_PHYS((u64)skb_frag_address(fs));
-			hw_buffer.s.size = skb_drag_size(fs);
+			hw_buffer.s.size = skb_frag_size(fs);
 			CVM_OCT_SKB_CB(skb)[i + 1] = hw_buffer.u64;
 		}
 		hw_buffer.s.addr = XKPHYS_TO_PHYS((u64)CVM_OCT_SKB_CB(skb));
-- 
2.20.1


^ permalink raw reply related

* Re: next-20190723: bpf/seccomp - systemd/journald issue?
From: Yonghong Song @ 2019-07-26 21:10 UTC (permalink / raw)
  To: sedat.dilek@gmail.com
  Cc: Alexei Starovoitov, Daniel Borkmann, Martin Lau, Song Liu,
	netdev@vger.kernel.org, bpf@vger.kernel.org, Clang-Built-Linux ML,
	Kees Cook, Nick Desaulniers, Nathan Chancellor
In-Reply-To: <CA+icZUXsPRWmH3i-9=TK-=2HviubRqpAeDJGriWHgK1fkFhgUg@mail.gmail.com>



On 7/26/19 2:02 PM, Sedat Dilek wrote:
> On Fri, Jul 26, 2019 at 10:38 PM Sedat Dilek <sedat.dilek@gmail.com> wrote:
>>
>> Hi Yonghong Song,
>>
>> On Fri, Jul 26, 2019 at 5:45 PM Yonghong Song <yhs@fb.com> wrote:
>>>
>>>
>>>
>>> On 7/26/19 1:26 AM, Sedat Dilek wrote:
>>>> Hi,
>>>>
>>>> I have opened a new issue in the ClangBuiltLinux issue tracker.
>>>
>>> Glad to know clang 9 has asm goto support and now It can compile
>>> kernel again.
>>>
>>
>> Yupp.
>>
>>>>
>>>> I am seeing a problem in the area bpf/seccomp causing
>>>> systemd/journald/udevd services to fail.
>>>>
>>>> [Fri Jul 26 08:08:43 2019] systemd[453]: systemd-udevd.service: Failed
>>>> to connect stdout to the journal socket, ignoring: Connection refused
>>>>
>>>> This happens when I use the (LLVM) LLD ld.lld-9 linker but not with
>>>> BFD linker ld.bfd on Debian/buster AMD64.
>>>> In both cases I use clang-9 (prerelease).
>>>
>>> Looks like it is a lld bug.
>>>
>>> I see the stack trace has __bpf_prog_run32() which is used by
>>> kernel bpf interpreter. Could you try to enable bpf jit
>>>     sysctl net.core.bpf_jit_enable = 1
>>> If this passed, it will prove it is interpreter related.
>>>
>>
>> After...
>>
>> sysctl -w net.core.bpf_jit_enable=1
>>
>> I can start all failed systemd services.
>>
>> systemd-journald.service
>> systemd-udevd.service
>> haveged.service
>>
>> This is in maintenance mode.
>>
>> What is next: Do set a permanent sysctl setting for net.core.bpf_jit_enable?
>>
> 
> This is what I did:

I probably won't have cycles to debug this potential lld issue.
Maybe you already did, I suggest you put enough reproducible
details in the bug you filed against lld so they can take a look.

> 
> Jul 26 22:43:06 iniza kernel: BUG: unable to handle page fault for
> address: ffffffffa8203370
> Jul 26 22:43:06 iniza kernel: #PF: supervisor read access in kernel mode
> Jul 26 22:43:06 iniza kernel: #PF: error_code(0x0000) - not-present page
> Jul 26 22:43:06 iniza kernel: PGD 2cfa0e067 P4D 2cfa0e067 PUD
> 2cfa0f063 PMD 450829063 PTE 800ffffd30bfc062
> Jul 26 22:43:06 iniza kernel: Oops: 0000 [#3] SMP PTI
> Jul 26 22:43:06 iniza kernel: CPU: 3 PID: 436 Comm: systemd-udevd
> Tainted: G      D           5.3.0-rc1-7-amd64-cbl-asmgoto
> #7~buster+dileks1
> Jul 26 22:43:06 iniza kernel: Hardware name: LENOVO
> 20HDCTO1WW/20HDCTO1WW, BIOS N1QET83W (1.58 ) 04/18/2019
> Jul 26 22:43:06 iniza kernel: RIP: 0010:___bpf_prog_run+0x40/0x14f0
> Jul 26 22:43:06 iniza kernel: Code: f3 eb 24 48 83 f8 38 0f 84 a9 0c
> 00 00 48 83 f8 39 0f 85 8a 14 00 00 0f 1f 00 48 0f bf 43 02 48 8d 1c
> c3 48 83 c3 08 0f b6
>   33 <48> 8b 04 f5 10 2e 20 a8 48 83 f8 3b 7f 62 48 83 f8 1e 0f 8f c8 00
> Jul 26 22:43:06 iniza kernel: RSP: 0018:ffffb3cec0327a88 EFLAGS: 00010246
> Jul 26 22:43:06 iniza kernel: RAX: ffffb3cec0327b30 RBX:
> ffffb3cec00d1038 RCX: 0000000000000000
> Jul 26 22:43:06 iniza kernel: RDX: ffffb3cec0327b10 RSI:
> 00000000000000ac RDI: ffffb3cec0327ab0
> Jul 26 22:43:06 iniza kernel: RBP: ffffb3cec0327aa0 R08:
> ffff9b33c94c0a00 R09: 0000000000000000
> Jul 26 22:43:06 iniza kernel: R10: ffff9b33cfe14e00 R11:
> ffffffffa77b8210 R12: 0000000000000000
> Jul 26 22:43:06 iniza kernel: R13: ffffb3cec00d1000 R14:
> 0000000000000000 R15: ffffb3cec0327ab0
> Jul 26 22:43:06 iniza kernel: FS:  00007f7ac2d28d40(0000)
> GS:ffff9b33d2580000(0000) knlGS:0000000000000000
> Jul 26 22:43:06 iniza kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> Jul 26 22:43:06 iniza kernel: CR2: ffffffffa8203370 CR3:
> 000000044f3ea006 CR4: 00000000003606e0
> Jul 26 22:43:06 iniza kernel: Call Trace:
> Jul 26 22:43:06 iniza kernel:  __bpf_prog_run32+0x44/0x70
> Jul 26 22:43:06 iniza kernel:  ? security_sock_rcv_skb+0x3f/0x60
> Jul 26 22:43:06 iniza kernel:  sk_filter_trim_cap+0xe4/0x220
> Jul 26 22:43:06 iniza kernel:  ? __skb_clone+0x2e/0x100
> Jul 26 22:43:06 iniza kernel:  netlink_broadcast_filtered+0x2df/0x4f0
> Jul 26 22:43:06 iniza kernel:  netlink_sendmsg+0x34f/0x3c0
> Jul 26 22:43:06 iniza kernel:  ___sys_sendmsg+0x315/0x330
> Jul 26 22:43:06 iniza kernel:  ? seccomp_run_filters+0x54/0x110
> Jul 26 22:43:06 iniza kernel:  ? filename_parentat+0x210/0x490
> Jul 26 22:43:06 iniza kernel:  ? __seccomp_filter+0xf7/0x6e0
> Jul 26 22:43:06 iniza kernel:  ? __d_alloc+0x159/0x1c0
> Jul 26 22:43:06 iniza kernel:  ? kmem_cache_free+0x1e/0x5c0
> Jul 26 22:43:06 iniza kernel:  ? fast_dput+0x73/0xb0
> Jul 26 22:43:06 iniza kernel:  __x64_sys_sendmsg+0x97/0xe0
> Jul 26 22:43:06 iniza kernel:  do_syscall_64+0x59/0x90
> Jul 26 22:43:06 iniza kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
> Jul 26 22:43:06 iniza kernel: RIP: 0033:0x7f7ac3519914
> Jul 26 22:43:06 iniza kernel: Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff
> ff ff eb b5 0f 1f 80 00 00 00 00 48 8d 05 e9 5d 0c 00 8b 00 85 c0 75
> 13 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 41
> 89 d4 55 48 89 f5 53
> Jul 26 22:43:06 iniza kernel: RSP: 002b:00007ffcfb66a478 EFLAGS:
> 00000246 ORIG_RAX: 000000000000002e
> Jul 26 22:43:06 iniza kernel: RAX: ffffffffffffffda RBX:
> 0000561e28ac9390 RCX: 00007f7ac3519914
> Jul 26 22:43:06 iniza kernel: RDX: 0000000000000000 RSI:
> 00007ffcfb66a4a0 RDI: 000000000000000d
> Jul 26 22:43:06 iniza kernel: RBP: 0000561e28acd210 R08:
> 0000561e28990140 R09: 0000000000000002
> Jul 26 22:43:06 iniza kernel: R10: 0000000000000000 R11:
> 0000000000000246 R12: 0000000000000000
> Jul 26 22:43:06 iniza kernel: R13: 0000000000000000 R14:
> 000000000000005e R15: 00007ffcfb66a490
> Jul 26 22:43:06 iniza kernel: Modules linked in: nfsd auth_rpcgss
> nfs_acl lockd grace i2c_dev parport_pc ppdev lp parport sunrpc
> efivarfs ip_tables x_tables autofs4 ext4 crc32c_generic mbcache crc16
> jbd2 btrfs zstd_decompress zstd_compress algif_skcipher af_alg sd_mod
> uas usb_storage scsi_mod hid_generic usbhid hid dm_crypt dm_mod raid10
> raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor
> raid6_pq libcrc32c raid1 raid0 multipath linear md_mod
> crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel
> aesni_intel i915 intel_lpss_pci nvme aes_x86_64 glue_helper
> i2c_algo_bit crypto_simd cryptd xhci_pci psmouse e1000e drm_kms_helper
> xhci_hcd i2c_i801 nvme_core intel_lpss drm usbcore thermal wmi video
> button
> Jul 26 22:43:06 iniza kernel: CR2: ffffffffa8203370
> Jul 26 22:43:06 iniza kernel: ---[ end trace 312670b063bd0391 ]---
> Jul 26 22:43:06 iniza kernel: RIP: 0010:___bpf_prog_run+0x40/0x14f0
> Jul 26 22:43:06 iniza kernel: Code: f3 eb 24 48 83 f8 38 0f 84 a9 0c
> 00 00 48 83 f8 39 0f 85 8a 14 00 00 0f 1f 00 48 0f bf 43 02 48 8d 1c
> c3 48 83 c3 08 0f b6 33 <48> 8b 04 f5 10 2e 20 a8 48 83 f8 3b 7f 62 48
> 83 f8 1e 0f 8f c8 00
> Jul 26 22:43:06 iniza kernel: RSP: 0018:ffffb3cec0253cb8 EFLAGS: 00010246
> Jul 26 22:43:06 iniza kernel: RAX: ffffb3cec0253d60 RBX:
> ffffb3cec00e9038 RCX: 0000000000000002
> Jul 26 22:43:06 iniza kernel: RDX: ffffb3cec0253d40 RSI:
> 00000000000000ac RDI: ffffb3cec0253ce0
> Jul 26 22:43:06 iniza kernel: RBP: ffffb3cec0253cd0 R08:
> 0000000000000000 R09: ffffb3cec0253f58
> Jul 26 22:43:06 iniza kernel: R10: 0000000000000000 R11:
> ffffffffa77b8210 R12: 000000007fff0000
> Jul 26 22:43:06 iniza kernel: R13: ffffb3cec0253eb8 R14:
> 0000000000000000 R15: ffffb3cec0253ce0
> Jul 26 22:43:06 iniza kernel: FS:  00007f7ac2d28d40(0000)
> GS:ffff9b33d2580000(0000) knlGS:0000000000000000
> Jul 26 22:43:06 iniza kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> Jul 26 22:43:06 iniza kernel: CR2: ffffffffa8203370 CR3:
> 000000044f3ea006 CR4: 00000000003606e0
> Jul 26 22:43:06 iniza kernel: BUG: unable to handle page fault for
> address: ffffffffa8203370
> Jul 26 22:43:06 iniza kernel: #PF: supervisor read access in kernel mode
> Jul 26 22:43:06 iniza kernel: #PF: error_code(0x0000) - not-present page
> Jul 26 22:43:06 iniza kernel: PGD 2cfa0e067 P4D 2cfa0e067 PUD
> 2cfa0f063 PMD 450829063 PTE 800ffffd30bfc062
> Jul 26 22:43:06 iniza kernel: Oops: 0000 [#4] SMP PTI
> Jul 26 22:43:06 iniza kernel: CPU: 0 PID: 437 Comm: systemd-udevd
> Tainted: G      D           5.3.0-rc1-7-amd64-cbl-asmgoto
> #7~buster+dileks1
> Jul 26 22:43:06 iniza kernel: Hardware name: LENOVO
> 20HDCTO1WW/20HDCTO1WW, BIOS N1QET83W (1.58 ) 04/18/2019
> Jul 26 22:43:06 iniza kernel: RIP: 0010:___bpf_prog_run+0x40/0x14f0
> Jul 26 22:43:06 iniza kernel: Code: f3 eb 24 48 83 f8 38 0f 84 a9 0c
> 00 00 48 83 f8 39 0f 85 8a 14 00 00 0f 1f 00 48 0f bf 43 02 48 8d 1c
> c3 48 83 c3 08 0f b6 33 <48> 8b 04 f5 10 2e 20 a8 48 83 f8 3b 7f 62 48
> 83 f8 1e 0f 8f c8 00
> Jul 26 22:43:06 iniza kernel: RSP: 0018:ffffb3cec032fa88 EFLAGS: 00010246
> Jul 26 22:43:06 iniza kernel: RAX: ffffb3cec032fb30 RBX:
> ffffb3cec00d1038 RCX: 0000000000000000
> Jul 26 22:43:06 iniza kernel: RDX: ffffb3cec032fb10 RSI:
> 00000000000000ac RDI: ffffb3cec032fab0
> Jul 26 22:43:06 iniza kernel: RBP: ffffb3cec032faa0 R08:
> ffff9b33cf34b000 R09: 0000000000000000
> Jul 26 22:43:06 iniza kernel: R10: ffff9b33cf3a3400 R11:
> ffffffffa77b8210 R12: 0000000000000000
> Jul 26 22:43:06 iniza kernel: R13: ffffb3cec00d1000 R14:
> 0000000000000000 R15: ffffb3cec032fab0
> Jul 26 22:43:06 iniza kernel: FS:  00007f7ac2d28d40(0000)
> GS:ffff9b33d2400000(0000) knlGS:0000000000000000
> Jul 26 22:43:06 iniza kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> Jul 26 22:43:06 iniza kernel: CR2: ffffffffa8203370 CR3:
> 000000044724a001 CR4: 00000000003606f0
> Jul 26 22:43:06 iniza kernel: Call Trace:
> Jul 26 22:43:06 iniza kernel:  __bpf_prog_run32+0x44/0x70
> Jul 26 22:43:06 iniza kernel:  ? prep_new_page+0x47/0x1a0
> Jul 26 22:43:06 iniza kernel:  ? security_sock_rcv_skb+0x3f/0x60
> Jul 26 22:43:06 iniza kernel:  sk_filter_trim_cap+0xe4/0x220
> Jul 26 22:43:06 iniza kernel:  ? __skb_clone+0x2e/0x100
> Jul 26 22:43:06 iniza kernel:  netlink_broadcast_filtered+0x2df/0x4f0
> Jul 26 22:43:06 iniza kernel:  netlink_sendmsg+0x34f/0x3c0
> Jul 26 22:43:06 iniza kernel:  ___sys_sendmsg+0x315/0x330
> Jul 26 22:43:06 iniza kernel:  ? seccomp_run_filters+0x54/0x110
> Jul 26 22:43:06 iniza kernel:  ? filename_parentat+0x210/0x490
> Jul 26 22:43:06 iniza kernel:  ? __seccomp_filter+0xf7/0x6e0
> Jul 26 22:43:06 iniza kernel:  ? __d_alloc+0x159/0x1c0
> Jul 26 22:43:06 iniza kernel:  ? kmem_cache_free+0x1e/0x5c0
> Jul 26 22:43:06 iniza kernel:  ? fast_dput+0x73/0xb0
> Jul 26 22:43:06 iniza kernel:  __x64_sys_sendmsg+0x97/0xe0
> Jul 26 22:43:06 iniza kernel:  do_syscall_64+0x59/0x90
> Jul 26 22:43:06 iniza kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
> Jul 26 22:43:06 iniza kernel: RIP: 0033:0x7f7ac3519914
> Jul 26 22:43:06 iniza kernel: Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff
> ff ff eb b5 0f 1f 80 00 00 00 00 48 8d 05 e9 5d 0c 00 8b 00 85 c0 75
> 13 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 41
> 89 d4 55 48 89 f5 53
> Jul 26 22:43:06 iniza kernel: RSP: 002b:00007ffcfb66a478 EFLAGS:
> 00000246 ORIG_RAX: 000000000000002e
> Jul 26 22:43:06 iniza kernel: RAX: ffffffffffffffda RBX:
> 0000561e28aaa600 RCX: 00007f7ac3519914
> Jul 26 22:43:06 iniza kernel: RDX: 0000000000000000 RSI:
> 00007ffcfb66a4a0 RDI: 000000000000000e
> Jul 26 22:43:06 iniza kernel: RBP: 0000561e28aaaac0 R08:
> 0000561e28990140 R09: 0000000000000002
> Jul 26 22:43:06 iniza kernel: R10: 0000000000000000 R11:
> 0000000000000246 R12: 0000000000000000
> Jul 26 22:43:06 iniza kernel: R13: 0000000000000000 R14:
> 000000000000005d R15: 00007ffcfb66a490
> Jul 26 22:43:06 iniza kernel: Modules linked in: nfsd auth_rpcgss
> nfs_acl lockd grace i2c_dev parport_pc ppdev lp parport sunrpc
> efivarfs ip_tables x_tables autofs4 ext4 crc32c_generic mbcache crc16
> jbd2 btrfs zstd_decompress zstd_compress algif_skcipher af_alg sd_mod
> uas usb_storage scsi_mod hid_generic usbhid hid dm_crypt dm_mod raid10
> raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor
> raid6_pq libcrc32c raid1 raid0 multipath linear md_mod
> crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel
> aesni_intel i915 intel_lpss_pci nvme aes_x86_64 glue_helper
> i2c_algo_bit crypto_simd cryptd xhci_pci psmouse e1000e drm_kms_helper
> xhci_hcd i2c_i801 nvme_core intel_lpss drm usbcore thermal wmi video
> button
> Jul 26 22:43:06 iniza kernel: CR2: ffffffffa8203370
> Jul 26 22:43:06 iniza kernel: ---[ end trace 312670b063bd0392 ]---
> 
> Full `journalctl -xb` attached.
> 
> - Sedat -
> 

^ permalink raw reply

* Re: [PATCH net] ocelot: Cancel delayed work before wq destruction
From: David Miller @ 2019-07-26 21:11 UTC (permalink / raw)
  To: claudiu.manoil; +Cc: alexandre.belloni, netdev, UNGLinuxDriver
In-Reply-To: <1564061598-4440-1-git-send-email-claudiu.manoil@nxp.com>

From: Claudiu Manoil <claudiu.manoil@nxp.com>
Date: Thu, 25 Jul 2019 16:33:18 +0300

> Make sure the delayed work for stats update is not pending before
> wq destruction.
> This fixes the module unload path.
> The issue is there since day 1.
> 
> Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support")
> 
> Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] ip6_tunnel: fix possible use-after-free on xmit
From: David Miller @ 2019-07-26 21:18 UTC (permalink / raw)
  To: yanhaishuang; +Cc: kuznet, netdev, linux-kernel
In-Reply-To: <1564072817-13240-1-git-send-email-yanhaishuang@cmss.chinamobile.com>

From: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Date: Fri, 26 Jul 2019 00:40:17 +0800

> ip4ip6/ip6ip6 tunnels run iptunnel_handle_offloads on xmit which
> can cause a possible use-after-free accessing iph/ipv6h pointer
> since the packet will be 'uncloned' running pskb_expand_head if
> it is a cloned gso skb.
> 
> Fixes: 0e9a709560db ("ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets")
> Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: next-20190723: bpf/seccomp - systemd/journald issue?
From: Sedat Dilek @ 2019-07-26 21:19 UTC (permalink / raw)
  To: Yonghong Song
  Cc: Alexei Starovoitov, Daniel Borkmann, Martin Lau, Song Liu,
	netdev@vger.kernel.org, bpf@vger.kernel.org, Clang-Built-Linux ML,
	Kees Cook, Nick Desaulniers, Nathan Chancellor
In-Reply-To: <295d2acd-0844-9a40-3f94-5bcbb13871d2@fb.com>

On Fri, Jul 26, 2019 at 11:10 PM Yonghong Song <yhs@fb.com> wrote:
>
>
>
> On 7/26/19 2:02 PM, Sedat Dilek wrote:
> > On Fri, Jul 26, 2019 at 10:38 PM Sedat Dilek <sedat.dilek@gmail.com> wrote:
> >>
> >> Hi Yonghong Song,
> >>
> >> On Fri, Jul 26, 2019 at 5:45 PM Yonghong Song <yhs@fb.com> wrote:
> >>>
> >>>
> >>>
> >>> On 7/26/19 1:26 AM, Sedat Dilek wrote:
> >>>> Hi,
> >>>>
> >>>> I have opened a new issue in the ClangBuiltLinux issue tracker.
> >>>
> >>> Glad to know clang 9 has asm goto support and now It can compile
> >>> kernel again.
> >>>
> >>
> >> Yupp.
> >>
> >>>>
> >>>> I am seeing a problem in the area bpf/seccomp causing
> >>>> systemd/journald/udevd services to fail.
> >>>>
> >>>> [Fri Jul 26 08:08:43 2019] systemd[453]: systemd-udevd.service: Failed
> >>>> to connect stdout to the journal socket, ignoring: Connection refused
> >>>>
> >>>> This happens when I use the (LLVM) LLD ld.lld-9 linker but not with
> >>>> BFD linker ld.bfd on Debian/buster AMD64.
> >>>> In both cases I use clang-9 (prerelease).
> >>>
> >>> Looks like it is a lld bug.
> >>>
> >>> I see the stack trace has __bpf_prog_run32() which is used by
> >>> kernel bpf interpreter. Could you try to enable bpf jit
> >>>     sysctl net.core.bpf_jit_enable = 1
> >>> If this passed, it will prove it is interpreter related.
> >>>
> >>
> >> After...
> >>
> >> sysctl -w net.core.bpf_jit_enable=1
> >>
> >> I can start all failed systemd services.
> >>
> >> systemd-journald.service
> >> systemd-udevd.service
> >> haveged.service
> >>
> >> This is in maintenance mode.
> >>
> >> What is next: Do set a permanent sysctl setting for net.core.bpf_jit_enable?
> >>
> >
> > This is what I did:
>
> I probably won't have cycles to debug this potential lld issue.
> Maybe you already did, I suggest you put enough reproducible
> details in the bug you filed against lld so they can take a look.
>

I understand and will put the journalctl-log into the CBL issue
tracker and update informations.

Thanks for your help understanding the BPF correlations.

Is setting 'net.core.bpf_jit_enable = 2' helpful here?

Values :
0 - disable the JIT (default value)
1 - enable the JIT
2 - enable the JIT and ask the compiler to emit traces on kernel log.

Which files should LLD folks look at?

cd linux
 find ./ -name '*bpf*.o' | grep jit
./arch/x86/net/bpf_jit_comp.o

Compare the objdumps?

I have archived the full build-dirs of clang9+ld.bfd and clang9+ld.lld-9.

Thanks for your help!

- sed@ -

[1] https://sysctl-explorer.net/net/core/bpf_jit_enable/

> >
> > Jul 26 22:43:06 iniza kernel: BUG: unable to handle page fault for
> > address: ffffffffa8203370
> > Jul 26 22:43:06 iniza kernel: #PF: supervisor read access in kernel mode
> > Jul 26 22:43:06 iniza kernel: #PF: error_code(0x0000) - not-present page
> > Jul 26 22:43:06 iniza kernel: PGD 2cfa0e067 P4D 2cfa0e067 PUD
> > 2cfa0f063 PMD 450829063 PTE 800ffffd30bfc062
> > Jul 26 22:43:06 iniza kernel: Oops: 0000 [#3] SMP PTI
> > Jul 26 22:43:06 iniza kernel: CPU: 3 PID: 436 Comm: systemd-udevd
> > Tainted: G      D           5.3.0-rc1-7-amd64-cbl-asmgoto
> > #7~buster+dileks1
> > Jul 26 22:43:06 iniza kernel: Hardware name: LENOVO
> > 20HDCTO1WW/20HDCTO1WW, BIOS N1QET83W (1.58 ) 04/18/2019
> > Jul 26 22:43:06 iniza kernel: RIP: 0010:___bpf_prog_run+0x40/0x14f0
> > Jul 26 22:43:06 iniza kernel: Code: f3 eb 24 48 83 f8 38 0f 84 a9 0c
> > 00 00 48 83 f8 39 0f 85 8a 14 00 00 0f 1f 00 48 0f bf 43 02 48 8d 1c
> > c3 48 83 c3 08 0f b6
> >   33 <48> 8b 04 f5 10 2e 20 a8 48 83 f8 3b 7f 62 48 83 f8 1e 0f 8f c8 00
> > Jul 26 22:43:06 iniza kernel: RSP: 0018:ffffb3cec0327a88 EFLAGS: 00010246
> > Jul 26 22:43:06 iniza kernel: RAX: ffffb3cec0327b30 RBX:
> > ffffb3cec00d1038 RCX: 0000000000000000
> > Jul 26 22:43:06 iniza kernel: RDX: ffffb3cec0327b10 RSI:
> > 00000000000000ac RDI: ffffb3cec0327ab0
> > Jul 26 22:43:06 iniza kernel: RBP: ffffb3cec0327aa0 R08:
> > ffff9b33c94c0a00 R09: 0000000000000000
> > Jul 26 22:43:06 iniza kernel: R10: ffff9b33cfe14e00 R11:
> > ffffffffa77b8210 R12: 0000000000000000
> > Jul 26 22:43:06 iniza kernel: R13: ffffb3cec00d1000 R14:
> > 0000000000000000 R15: ffffb3cec0327ab0
> > Jul 26 22:43:06 iniza kernel: FS:  00007f7ac2d28d40(0000)
> > GS:ffff9b33d2580000(0000) knlGS:0000000000000000
> > Jul 26 22:43:06 iniza kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > Jul 26 22:43:06 iniza kernel: CR2: ffffffffa8203370 CR3:
> > 000000044f3ea006 CR4: 00000000003606e0
> > Jul 26 22:43:06 iniza kernel: Call Trace:
> > Jul 26 22:43:06 iniza kernel:  __bpf_prog_run32+0x44/0x70
> > Jul 26 22:43:06 iniza kernel:  ? security_sock_rcv_skb+0x3f/0x60
> > Jul 26 22:43:06 iniza kernel:  sk_filter_trim_cap+0xe4/0x220
> > Jul 26 22:43:06 iniza kernel:  ? __skb_clone+0x2e/0x100
> > Jul 26 22:43:06 iniza kernel:  netlink_broadcast_filtered+0x2df/0x4f0
> > Jul 26 22:43:06 iniza kernel:  netlink_sendmsg+0x34f/0x3c0
> > Jul 26 22:43:06 iniza kernel:  ___sys_sendmsg+0x315/0x330
> > Jul 26 22:43:06 iniza kernel:  ? seccomp_run_filters+0x54/0x110
> > Jul 26 22:43:06 iniza kernel:  ? filename_parentat+0x210/0x490
> > Jul 26 22:43:06 iniza kernel:  ? __seccomp_filter+0xf7/0x6e0
> > Jul 26 22:43:06 iniza kernel:  ? __d_alloc+0x159/0x1c0
> > Jul 26 22:43:06 iniza kernel:  ? kmem_cache_free+0x1e/0x5c0
> > Jul 26 22:43:06 iniza kernel:  ? fast_dput+0x73/0xb0
> > Jul 26 22:43:06 iniza kernel:  __x64_sys_sendmsg+0x97/0xe0
> > Jul 26 22:43:06 iniza kernel:  do_syscall_64+0x59/0x90
> > Jul 26 22:43:06 iniza kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
> > Jul 26 22:43:06 iniza kernel: RIP: 0033:0x7f7ac3519914
> > Jul 26 22:43:06 iniza kernel: Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff
> > ff ff eb b5 0f 1f 80 00 00 00 00 48 8d 05 e9 5d 0c 00 8b 00 85 c0 75
> > 13 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 41
> > 89 d4 55 48 89 f5 53
> > Jul 26 22:43:06 iniza kernel: RSP: 002b:00007ffcfb66a478 EFLAGS:
> > 00000246 ORIG_RAX: 000000000000002e
> > Jul 26 22:43:06 iniza kernel: RAX: ffffffffffffffda RBX:
> > 0000561e28ac9390 RCX: 00007f7ac3519914
> > Jul 26 22:43:06 iniza kernel: RDX: 0000000000000000 RSI:
> > 00007ffcfb66a4a0 RDI: 000000000000000d
> > Jul 26 22:43:06 iniza kernel: RBP: 0000561e28acd210 R08:
> > 0000561e28990140 R09: 0000000000000002
> > Jul 26 22:43:06 iniza kernel: R10: 0000000000000000 R11:
> > 0000000000000246 R12: 0000000000000000
> > Jul 26 22:43:06 iniza kernel: R13: 0000000000000000 R14:
> > 000000000000005e R15: 00007ffcfb66a490
> > Jul 26 22:43:06 iniza kernel: Modules linked in: nfsd auth_rpcgss
> > nfs_acl lockd grace i2c_dev parport_pc ppdev lp parport sunrpc
> > efivarfs ip_tables x_tables autofs4 ext4 crc32c_generic mbcache crc16
> > jbd2 btrfs zstd_decompress zstd_compress algif_skcipher af_alg sd_mod
> > uas usb_storage scsi_mod hid_generic usbhid hid dm_crypt dm_mod raid10
> > raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor
> > raid6_pq libcrc32c raid1 raid0 multipath linear md_mod
> > crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel
> > aesni_intel i915 intel_lpss_pci nvme aes_x86_64 glue_helper
> > i2c_algo_bit crypto_simd cryptd xhci_pci psmouse e1000e drm_kms_helper
> > xhci_hcd i2c_i801 nvme_core intel_lpss drm usbcore thermal wmi video
> > button
> > Jul 26 22:43:06 iniza kernel: CR2: ffffffffa8203370
> > Jul 26 22:43:06 iniza kernel: ---[ end trace 312670b063bd0391 ]---
> > Jul 26 22:43:06 iniza kernel: RIP: 0010:___bpf_prog_run+0x40/0x14f0
> > Jul 26 22:43:06 iniza kernel: Code: f3 eb 24 48 83 f8 38 0f 84 a9 0c
> > 00 00 48 83 f8 39 0f 85 8a 14 00 00 0f 1f 00 48 0f bf 43 02 48 8d 1c
> > c3 48 83 c3 08 0f b6 33 <48> 8b 04 f5 10 2e 20 a8 48 83 f8 3b 7f 62 48
> > 83 f8 1e 0f 8f c8 00
> > Jul 26 22:43:06 iniza kernel: RSP: 0018:ffffb3cec0253cb8 EFLAGS: 00010246
> > Jul 26 22:43:06 iniza kernel: RAX: ffffb3cec0253d60 RBX:
> > ffffb3cec00e9038 RCX: 0000000000000002
> > Jul 26 22:43:06 iniza kernel: RDX: ffffb3cec0253d40 RSI:
> > 00000000000000ac RDI: ffffb3cec0253ce0
> > Jul 26 22:43:06 iniza kernel: RBP: ffffb3cec0253cd0 R08:
> > 0000000000000000 R09: ffffb3cec0253f58
> > Jul 26 22:43:06 iniza kernel: R10: 0000000000000000 R11:
> > ffffffffa77b8210 R12: 000000007fff0000
> > Jul 26 22:43:06 iniza kernel: R13: ffffb3cec0253eb8 R14:
> > 0000000000000000 R15: ffffb3cec0253ce0
> > Jul 26 22:43:06 iniza kernel: FS:  00007f7ac2d28d40(0000)
> > GS:ffff9b33d2580000(0000) knlGS:0000000000000000
> > Jul 26 22:43:06 iniza kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > Jul 26 22:43:06 iniza kernel: CR2: ffffffffa8203370 CR3:
> > 000000044f3ea006 CR4: 00000000003606e0
> > Jul 26 22:43:06 iniza kernel: BUG: unable to handle page fault for
> > address: ffffffffa8203370
> > Jul 26 22:43:06 iniza kernel: #PF: supervisor read access in kernel mode
> > Jul 26 22:43:06 iniza kernel: #PF: error_code(0x0000) - not-present page
> > Jul 26 22:43:06 iniza kernel: PGD 2cfa0e067 P4D 2cfa0e067 PUD
> > 2cfa0f063 PMD 450829063 PTE 800ffffd30bfc062
> > Jul 26 22:43:06 iniza kernel: Oops: 0000 [#4] SMP PTI
> > Jul 26 22:43:06 iniza kernel: CPU: 0 PID: 437 Comm: systemd-udevd
> > Tainted: G      D           5.3.0-rc1-7-amd64-cbl-asmgoto
> > #7~buster+dileks1
> > Jul 26 22:43:06 iniza kernel: Hardware name: LENOVO
> > 20HDCTO1WW/20HDCTO1WW, BIOS N1QET83W (1.58 ) 04/18/2019
> > Jul 26 22:43:06 iniza kernel: RIP: 0010:___bpf_prog_run+0x40/0x14f0
> > Jul 26 22:43:06 iniza kernel: Code: f3 eb 24 48 83 f8 38 0f 84 a9 0c
> > 00 00 48 83 f8 39 0f 85 8a 14 00 00 0f 1f 00 48 0f bf 43 02 48 8d 1c
> > c3 48 83 c3 08 0f b6 33 <48> 8b 04 f5 10 2e 20 a8 48 83 f8 3b 7f 62 48
> > 83 f8 1e 0f 8f c8 00
> > Jul 26 22:43:06 iniza kernel: RSP: 0018:ffffb3cec032fa88 EFLAGS: 00010246
> > Jul 26 22:43:06 iniza kernel: RAX: ffffb3cec032fb30 RBX:
> > ffffb3cec00d1038 RCX: 0000000000000000
> > Jul 26 22:43:06 iniza kernel: RDX: ffffb3cec032fb10 RSI:
> > 00000000000000ac RDI: ffffb3cec032fab0
> > Jul 26 22:43:06 iniza kernel: RBP: ffffb3cec032faa0 R08:
> > ffff9b33cf34b000 R09: 0000000000000000
> > Jul 26 22:43:06 iniza kernel: R10: ffff9b33cf3a3400 R11:
> > ffffffffa77b8210 R12: 0000000000000000
> > Jul 26 22:43:06 iniza kernel: R13: ffffb3cec00d1000 R14:
> > 0000000000000000 R15: ffffb3cec032fab0
> > Jul 26 22:43:06 iniza kernel: FS:  00007f7ac2d28d40(0000)
> > GS:ffff9b33d2400000(0000) knlGS:0000000000000000
> > Jul 26 22:43:06 iniza kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > Jul 26 22:43:06 iniza kernel: CR2: ffffffffa8203370 CR3:
> > 000000044724a001 CR4: 00000000003606f0
> > Jul 26 22:43:06 iniza kernel: Call Trace:
> > Jul 26 22:43:06 iniza kernel:  __bpf_prog_run32+0x44/0x70
> > Jul 26 22:43:06 iniza kernel:  ? prep_new_page+0x47/0x1a0
> > Jul 26 22:43:06 iniza kernel:  ? security_sock_rcv_skb+0x3f/0x60
> > Jul 26 22:43:06 iniza kernel:  sk_filter_trim_cap+0xe4/0x220
> > Jul 26 22:43:06 iniza kernel:  ? __skb_clone+0x2e/0x100
> > Jul 26 22:43:06 iniza kernel:  netlink_broadcast_filtered+0x2df/0x4f0
> > Jul 26 22:43:06 iniza kernel:  netlink_sendmsg+0x34f/0x3c0
> > Jul 26 22:43:06 iniza kernel:  ___sys_sendmsg+0x315/0x330
> > Jul 26 22:43:06 iniza kernel:  ? seccomp_run_filters+0x54/0x110
> > Jul 26 22:43:06 iniza kernel:  ? filename_parentat+0x210/0x490
> > Jul 26 22:43:06 iniza kernel:  ? __seccomp_filter+0xf7/0x6e0
> > Jul 26 22:43:06 iniza kernel:  ? __d_alloc+0x159/0x1c0
> > Jul 26 22:43:06 iniza kernel:  ? kmem_cache_free+0x1e/0x5c0
> > Jul 26 22:43:06 iniza kernel:  ? fast_dput+0x73/0xb0
> > Jul 26 22:43:06 iniza kernel:  __x64_sys_sendmsg+0x97/0xe0
> > Jul 26 22:43:06 iniza kernel:  do_syscall_64+0x59/0x90
> > Jul 26 22:43:06 iniza kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
> > Jul 26 22:43:06 iniza kernel: RIP: 0033:0x7f7ac3519914
> > Jul 26 22:43:06 iniza kernel: Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff
> > ff ff eb b5 0f 1f 80 00 00 00 00 48 8d 05 e9 5d 0c 00 8b 00 85 c0 75
> > 13 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 41
> > 89 d4 55 48 89 f5 53
> > Jul 26 22:43:06 iniza kernel: RSP: 002b:00007ffcfb66a478 EFLAGS:
> > 00000246 ORIG_RAX: 000000000000002e
> > Jul 26 22:43:06 iniza kernel: RAX: ffffffffffffffda RBX:
> > 0000561e28aaa600 RCX: 00007f7ac3519914
> > Jul 26 22:43:06 iniza kernel: RDX: 0000000000000000 RSI:
> > 00007ffcfb66a4a0 RDI: 000000000000000e
> > Jul 26 22:43:06 iniza kernel: RBP: 0000561e28aaaac0 R08:
> > 0000561e28990140 R09: 0000000000000002
> > Jul 26 22:43:06 iniza kernel: R10: 0000000000000000 R11:
> > 0000000000000246 R12: 0000000000000000
> > Jul 26 22:43:06 iniza kernel: R13: 0000000000000000 R14:
> > 000000000000005d R15: 00007ffcfb66a490
> > Jul 26 22:43:06 iniza kernel: Modules linked in: nfsd auth_rpcgss
> > nfs_acl lockd grace i2c_dev parport_pc ppdev lp parport sunrpc
> > efivarfs ip_tables x_tables autofs4 ext4 crc32c_generic mbcache crc16
> > jbd2 btrfs zstd_decompress zstd_compress algif_skcipher af_alg sd_mod
> > uas usb_storage scsi_mod hid_generic usbhid hid dm_crypt dm_mod raid10
> > raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor
> > raid6_pq libcrc32c raid1 raid0 multipath linear md_mod
> > crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel
> > aesni_intel i915 intel_lpss_pci nvme aes_x86_64 glue_helper
> > i2c_algo_bit crypto_simd cryptd xhci_pci psmouse e1000e drm_kms_helper
> > xhci_hcd i2c_i801 nvme_core intel_lpss drm usbcore thermal wmi video
> > button
> > Jul 26 22:43:06 iniza kernel: CR2: ffffffffa8203370
> > Jul 26 22:43:06 iniza kernel: ---[ end trace 312670b063bd0392 ]---
> >
> > Full `journalctl -xb` attached.
> >
> > - Sedat -
> >

^ permalink raw reply

* Re: [PATCH net] net: qualcomm: rmnet: Fix incorrect UL checksum offload logic
From: David Miller @ 2019-07-26 21:20 UTC (permalink / raw)
  To: subashab; +Cc: netdev, stranche
In-Reply-To: <1564078032-8754-1-git-send-email-subashab@codeaurora.org>

From: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Date: Thu, 25 Jul 2019 12:07:12 -0600

> The udp_ip4_ind bit is set only for IPv4 UDP non-fragmented packets
> so that the hardware can flip the checksum to 0xFFFF if the computed
> checksum is 0 per RFC768.
> 
> However, this bit had to be set for IPv6 UDP non fragmented packets
> as well per hardware requirements. Otherwise, IPv6 UDP packets
> with computed checksum as 0 were transmitted by hardware and were
> dropped in the network.
> 
> In addition to setting this bit for IPv6 UDP, the field is also
> appropriately renamed to udp_ind as part of this change.
> 
> Fixes: 5eb5f8608ef1 ("net: qualcomm: rmnet: Add support for TX checksum offload")
> Cc: Sean Tranchetti <stranche@codeaurora.org>
> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>

Applied and queued up for -stable.

^ permalink raw reply

* Re: [PATCH bpf-next 1/9] selftests/bpf: prevent headers to be compiled as C code
From: Stanislav Fomichev @ 2019-07-26 21:21 UTC (permalink / raw)
  To: Andrii Nakryiko; +Cc: bpf, netdev, ast, daniel, andrii.nakryiko, kernel-team
In-Reply-To: <20190726203747.1124677-2-andriin@fb.com>

On 07/26, Andrii Nakryiko wrote:
> Apprently listing header as a normal dependency for a binary output
> makes it go through compilation as if it was C code. This currently
> works without a problem, but in subsequent commits causes problems for
> differently generated test.h for test_progs. Marking those headers as
> order-only dependency solves the issue.
Are you sure it will not result in a situation where
test_progs/test_maps is not regenerated if tests.h is updated.

If I read the following doc correctly, order deps make sense for
directories only:
https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html

Can you maybe double check it with:
* make
* add new prog_tests/test_something.c
* make
to see if the binary is regenerated with test_something.c?

Maybe fix the problem of header compilation by having '#ifndef
DECLARE_TEST #define DECLARE_TEST() #endif' in tests.h instead?

> Signed-off-by: Andrii Nakryiko <andriin@fb.com>
> ---
>  tools/testing/selftests/bpf/Makefile | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index 11c9c62c3362..bb66cc4a7f34 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -235,7 +235,7 @@ PROG_TESTS_H := $(PROG_TESTS_DIR)/tests.h
>  PROG_TESTS_FILES := $(wildcard prog_tests/*.c)
>  test_progs.c: $(PROG_TESTS_H)
>  $(OUTPUT)/test_progs: CFLAGS += $(TEST_PROGS_CFLAGS)
> -$(OUTPUT)/test_progs: test_progs.c $(PROG_TESTS_H) $(PROG_TESTS_FILES)
> +$(OUTPUT)/test_progs: test_progs.c $(PROG_TESTS_FILES) | $(PROG_TESTS_H)
>  $(PROG_TESTS_H): $(PROG_TESTS_FILES) | $(PROG_TESTS_DIR)
>  	$(shell ( cd prog_tests/; \
>  		  echo '/* Generated header, do not edit */'; \
> @@ -256,7 +256,7 @@ MAP_TESTS_H := $(MAP_TESTS_DIR)/tests.h
>  MAP_TESTS_FILES := $(wildcard map_tests/*.c)
>  test_maps.c: $(MAP_TESTS_H)
>  $(OUTPUT)/test_maps: CFLAGS += $(TEST_MAPS_CFLAGS)
> -$(OUTPUT)/test_maps: test_maps.c $(MAP_TESTS_H) $(MAP_TESTS_FILES)
> +$(OUTPUT)/test_maps: test_maps.c $(MAP_TESTS_FILES) | $(MAP_TESTS_H)
>  $(MAP_TESTS_H): $(MAP_TESTS_FILES) | $(MAP_TESTS_DIR)
>  	$(shell ( cd map_tests/; \
>  		  echo '/* Generated header, do not edit */'; \
> @@ -277,7 +277,7 @@ VERIFIER_TESTS_H := $(VERIFIER_TESTS_DIR)/tests.h
>  VERIFIER_TEST_FILES := $(wildcard verifier/*.c)
>  test_verifier.c: $(VERIFIER_TESTS_H)
>  $(OUTPUT)/test_verifier: CFLAGS += $(TEST_VERIFIER_CFLAGS)
> -$(OUTPUT)/test_verifier: test_verifier.c $(VERIFIER_TESTS_H)
> +$(OUTPUT)/test_verifier: test_verifier.c | $(VERIFIER_TEST_FILES) $(VERIFIER_TESTS_H)
>  $(VERIFIER_TESTS_H): $(VERIFIER_TEST_FILES) | $(VERIFIER_TESTS_DIR)
>  	$(shell ( cd verifier/; \
>  		  echo '/* Generated header, do not edit */'; \
> -- 
> 2.17.1
> 

^ permalink raw reply

* Re: [PATCH v3 11/14] NFC: nxp-nci: Remove unused macro pr_fmt()
From: David Miller @ 2019-07-26 21:23 UTC (permalink / raw)
  To: andriy.shevchenko
  Cc: clement.perrochaud, charles.gorand, netdev, sedat.dilek,
	sedat.dilek
In-Reply-To: <20190725193511.64274-11-andriy.shevchenko@linux.intel.com>

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Thu, 25 Jul 2019 22:35:08 +0300

> The macro had never been used.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
 ...
> @@ -12,8 +12,6 @@
>   * Copyright (C) 2012  Intel Corporation. All rights reserved.
>   */
>  
> -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

If there are any kernel log messages generated, which is the case in
this file, this is used.

Also, please resubmit this series with a proper header posting containing
a high level description of what this patch series does, how it is doing it,
and why it is doing it that way.  Also include a changelog.

Thank you.

^ permalink raw reply

* [PATCH bpf] libbpf: fix erroneous multi-closing of BTF FD
From: Andrii Nakryiko @ 2019-07-26 21:24 UTC (permalink / raw)
  To: bpf, netdev, ast, daniel, rdna, yhs
  Cc: andrii.nakryiko, kernel-team, Andrii Nakryiko

Libbpf stores associated BTF FD per each instance of bpf_program. When
program is unloaded, that FD is closed. This is wrong, because leads to
a race and possibly closing of unrelated files, if application
simultaneously opens new files while bpf_programs are unloaded.

It's also unnecessary, because struct btf "owns" that FD, and
btf__free(), called from bpf_object__close() will close it. Thus the fix
is to never have per-program BTF FD and fetch it from obj->btf, when
necessary.

Fixes: 2993e0515bb4 ("tools/bpf: add support to read .BTF.ext sections")
Reported-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
---
 tools/lib/bpf/libbpf.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 8741c39adb1c..44a428378d48 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -181,7 +181,6 @@ struct bpf_program {
 	bpf_program_clear_priv_t clear_priv;
 
 	enum bpf_attach_type expected_attach_type;
-	int btf_fd;
 	void *func_info;
 	__u32 func_info_rec_size;
 	__u32 func_info_cnt;
@@ -312,7 +311,6 @@ void bpf_program__unload(struct bpf_program *prog)
 	prog->instances.nr = -1;
 	zfree(&prog->instances.fds);
 
-	zclose(prog->btf_fd);
 	zfree(&prog->func_info);
 	zfree(&prog->line_info);
 }
@@ -391,7 +389,6 @@ bpf_program__init(void *data, size_t size, char *section_name, int idx,
 	prog->instances.fds = NULL;
 	prog->instances.nr = -1;
 	prog->type = BPF_PROG_TYPE_UNSPEC;
-	prog->btf_fd = -1;
 
 	return 0;
 errout:
@@ -2283,9 +2280,6 @@ bpf_program_reloc_btf_ext(struct bpf_program *prog, struct bpf_object *obj,
 		prog->line_info_rec_size = btf_ext__line_info_rec_size(obj->btf_ext);
 	}
 
-	if (!insn_offset)
-		prog->btf_fd = btf__fd(obj->btf);
-
 	return 0;
 }
 
@@ -2458,7 +2452,7 @@ load_program(struct bpf_program *prog, struct bpf_insn *insns, int insns_cnt,
 	char *cp, errmsg[STRERR_BUFSIZE];
 	int log_buf_size = BPF_LOG_BUF_SIZE;
 	char *log_buf;
-	int ret;
+	int btf_fd, ret;
 
 	if (!insns || !insns_cnt)
 		return -EINVAL;
@@ -2473,7 +2467,8 @@ load_program(struct bpf_program *prog, struct bpf_insn *insns, int insns_cnt,
 	load_attr.license = license;
 	load_attr.kern_version = kern_version;
 	load_attr.prog_ifindex = prog->prog_ifindex;
-	load_attr.prog_btf_fd = prog->btf_fd >= 0 ? prog->btf_fd : 0;
+	btf_fd = bpf_object__btf_fd(prog->obj);
+	load_attr.prog_btf_fd = btf_fd >= 0 ? btf_fd : 0;
 	load_attr.func_info = prog->func_info;
 	load_attr.func_info_rec_size = prog->func_info_rec_size;
 	load_attr.func_info_cnt = prog->func_info_cnt;
-- 
2.17.1


^ permalink raw reply related

* Re: [PATCH bpf-next 3/9] selftests/bpf: add test selectors by number and name to test_progs
From: Stanislav Fomichev @ 2019-07-26 21:25 UTC (permalink / raw)
  To: Andrii Nakryiko; +Cc: bpf, netdev, ast, daniel, andrii.nakryiko, kernel-team
In-Reply-To: <20190726203747.1124677-4-andriin@fb.com>

On 07/26, Andrii Nakryiko wrote:
> Add ability to specify either test number or test name substring to
> narrow down a set of test to run.
> 
> Usage:
> sudo ./test_progs -n 1
> sudo ./test_progs -t attach_probe
> 
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>
> ---
>  tools/testing/selftests/bpf/test_progs.c | 43 +++++++++++++++++++++---
>  1 file changed, 39 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c
> index eea88ba59225..6e04b9f83777 100644
> --- a/tools/testing/selftests/bpf/test_progs.c
> +++ b/tools/testing/selftests/bpf/test_progs.c
> @@ -4,6 +4,7 @@
>  #include "test_progs.h"
>  #include "bpf_rlimit.h"
>  #include <argp.h>
> +#include <string.h>
>  
>  int error_cnt, pass_cnt;
>  bool jit_enabled;
> @@ -164,6 +165,7 @@ void *spin_lock_thread(void *arg)
>  
>  struct prog_test_def {
>  	const char *test_name;
> +	int test_num;
>  	void (*run_test)(void);
>  };
>  
> @@ -181,26 +183,49 @@ const char *argp_program_bug_address = "<bpf@vger.kernel.org>";
>  const char argp_program_doc[] = "BPF selftests test runner";
>  
>  enum ARG_KEYS {
> +	ARG_TEST_NUM = 'n',
> +	ARG_TEST_NAME = 't',
>  	ARG_VERIFIER_STATS = 's',
>  };
>  	
>  static const struct argp_option opts[] = {
> +	{ "num", ARG_TEST_NUM, "NUM", 0,
> +	  "Run test number NUM only " },
> +	{ "name", ARG_TEST_NAME, "NAME", 0,
> +	  "Run tests with names containing NAME" },
>  	{ "verifier-stats", ARG_VERIFIER_STATS, NULL, 0,
>  	  "Output verifier statistics", },
>  	{},
>  };
>  
>  struct test_env {
> +	int test_num_selector;
> +	const char *test_name_selector;
>  	bool verifier_stats;
>  };
>  
> -static struct test_env env = {};
> +static struct test_env env = {
> +	.test_num_selector = -1,
> +};
>  
>  static error_t parse_arg(int key, char *arg, struct argp_state *state)
>  {
>  	struct test_env *env = state->input;
>  
>  	switch (key) {
[..]
> +	case ARG_TEST_NUM: {
> +		int test_num;
> +
> +		errno = 0;
> +		test_num = strtol(arg, NULL, 10);
> +		if (errno)
> +			return -errno;
> +		env->test_num_selector = test_num;
> +		break;
> +	}
Do you think it's really useful? I agree about running by name (I
usually used grep -v in the Makefile :-), but I'm not sure about running
by number.

Or is the idea is that you can just copy-paste this number from the
test_progs output to rerun the tests? In this case, why not copy-paste
the name instead?

> +	case ARG_TEST_NAME:
> +		env->test_name_selector = arg;
> +		break;
>  	case ARG_VERIFIER_STATS:
>  		env->verifier_stats = true;
>  		break;
> @@ -223,7 +248,7 @@ int main(int argc, char **argv)
>  		.parser = parse_arg,
>  		.doc = argp_program_doc,
>  	};
> -	const struct prog_test_def *def;
> +	struct prog_test_def *test;
>  	int err, i;
>  
>  	err = argp_parse(&argp, argc, argv, 0, NULL, &env);
> @@ -237,8 +262,18 @@ int main(int argc, char **argv)
>  	verifier_stats = env.verifier_stats;
>  
>  	for (i = 0; i < ARRAY_SIZE(prog_test_defs); i++) {
> -		def = &prog_test_defs[i];
> -		def->run_test();
> +		test = &prog_test_defs[i];
> +
> +		test->test_num = i + 1;
> +
> +		if (env.test_num_selector >= 0 &&
> +		    test->test_num != env.test_num_selector)
> +			continue;
> +		if (env.test_name_selector &&
> +		    !strstr(test->test_name, env.test_name_selector))
> +			continue;
> +
> +		test->run_test();
>  	}
>  
>  	printf("Summary: %d PASSED, %d FAILED\n", pass_cnt, error_cnt);
> -- 
> 2.17.1
> 

^ permalink raw reply

* Re: [PATCH] sis900: add support for ethtool's EEPROM dump
From: David Miller @ 2019-07-26 21:27 UTC (permalink / raw)
  To: sergej.benilov; +Cc: venza, netdev, andrew
In-Reply-To: <20190725194806.17964-1-sergej.benilov@googlemail.com>

From: Sergej Benilov <sergej.benilov@googlemail.com>
Date: Thu, 25 Jul 2019 21:48:06 +0200

> Implement ethtool's EEPROM dump command (ethtool -e|--eeprom-dump).
> 
> Thx to Andrew Lunn for comments.
> 
> Signed-off-by: Sergej Benilov <sergej.benilov@googlemail.com>

Applied to net-next.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox