Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] strparser: Use delayed work instead of timer for msg timeout
From: Tom Herbert @ 2017-10-20 23:40 UTC (permalink / raw)
  To: davem; +Cc: netdev, eric.dumazet, john.fastabend, Tom Herbert

Sock lock may be taken in the message timer function which is a
problem since timers run in BH. Instead of timers use delayed_work.

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Fixes: bbb03029a899 ("strparser: Generalize strparser")
Signed-off-by: Tom Herbert <tom@quantonium.net>
---
 include/net/strparser.h   |  3 +--
 net/strparser/strparser.c | 17 ++++++++---------
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/include/net/strparser.h b/include/net/strparser.h
index 7dc131d62ad5..d96b59f45eba 100644
--- a/include/net/strparser.h
+++ b/include/net/strparser.h
@@ -74,10 +74,9 @@ struct strparser {
 	u32 unrecov_intr : 1;
 
 	struct sk_buff **skb_nextp;
-	struct timer_list msg_timer;
 	struct sk_buff *skb_head;
 	unsigned int need_bytes;
-	struct delayed_work delayed_work;
+	struct delayed_work msg_timer_work;
 	struct work_struct work;
 	struct strp_stats stats;
 	struct strp_callbacks cb;
diff --git a/net/strparser/strparser.c b/net/strparser/strparser.c
index d4ea46a5f233..c5fda15ba319 100644
--- a/net/strparser/strparser.c
+++ b/net/strparser/strparser.c
@@ -49,7 +49,7 @@ static void strp_abort_strp(struct strparser *strp, int err)
 {
 	/* Unrecoverable error in receive */
 
-	del_timer(&strp->msg_timer);
+	cancel_delayed_work(&strp->msg_timer_work);
 
 	if (strp->stopped)
 		return;
@@ -68,7 +68,7 @@ static void strp_abort_strp(struct strparser *strp, int err)
 static void strp_start_timer(struct strparser *strp, long timeo)
 {
 	if (timeo)
-		mod_timer(&strp->msg_timer, timeo);
+		mod_delayed_work(strp_wq, &strp->msg_timer_work, timeo);
 }
 
 /* Lower lock held */
@@ -319,7 +319,7 @@ static int __strp_recv(read_descriptor_t *desc, struct sk_buff *orig_skb,
 		eaten += (cand_len - extra);
 
 		/* Hurray, we have a new message! */
-		del_timer(&strp->msg_timer);
+		cancel_delayed_work(&strp->msg_timer_work);
 		strp->skb_head = NULL;
 		STRP_STATS_INCR(strp->stats.msgs);
 
@@ -450,9 +450,10 @@ static void strp_work(struct work_struct *w)
 	do_strp_work(container_of(w, struct strparser, work));
 }
 
-static void strp_msg_timeout(unsigned long arg)
+static void strp_msg_timeout(struct work_struct *w)
 {
-	struct strparser *strp = (struct strparser *)arg;
+	struct strparser *strp = container_of(w, struct strparser,
+					      msg_timer_work.work);
 
 	/* Message assembly timed out */
 	STRP_STATS_INCR(strp->stats.msg_timeouts);
@@ -505,9 +506,7 @@ int strp_init(struct strparser *strp, struct sock *sk,
 	strp->cb.read_sock_done = cb->read_sock_done ? : default_read_sock_done;
 	strp->cb.abort_parser = cb->abort_parser ? : strp_abort_strp;
 
-	setup_timer(&strp->msg_timer, strp_msg_timeout,
-		    (unsigned long)strp);
-
+	INIT_DELAYED_WORK(&strp->msg_timer_work, strp_msg_timeout);
 	INIT_WORK(&strp->work, strp_work);
 
 	return 0;
@@ -532,7 +531,7 @@ void strp_done(struct strparser *strp)
 {
 	WARN_ON(!strp->stopped);
 
-	del_timer_sync(&strp->msg_timer);
+	cancel_delayed_work_sync(&strp->msg_timer_work);
 	cancel_work_sync(&strp->work);
 
 	if (strp->skb_head) {
-- 
2.11.0

^ permalink raw reply related

* RE: [Intel-wired-lan] Instability of i40e driver on 4.9 kernel
From: Fujinaka, Todd @ 2017-10-21  0:07 UTC (permalink / raw)
  To: Pavlos Parissis, netdev@vger.kernel.org,
	intel-wired-lan@lists.osuosl.org
In-Reply-To: <92118fc4-8a20-f129-193b-9c8fdf81aa24@gmail.com>

You picked a bunch of places to post this, and you really should've used a different place: e1000-devel@lists.sourceforge.net

Also, since you flagged the "communities" post as "answered", you're not likely to get any follow-up. The Intel communities are also not monitored as much by the wired networking people at Intel.

Please let us know if you have any specific issues, and please provide exact reproduction steps so we can investigate your issues, and please use e1000-devel.

Todd Fujinaka
Software Application Engineer
Datacenter Engineering Group
Intel Corporation
todd.fujinaka@intel.com


-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On Behalf Of Pavlos Parissis
Sent: Thursday, October 19, 2017 4:03 PM
To: netdev@vger.kernel.org; intel-wired-lan@lists.osuosl.org
Subject: [Intel-wired-lan] Instability of i40e driver on 4.9 kernel

Hi all,

We have been running 4.9 kernels for several months on CentOS 7.3 and for few weeks on CentOS 7.4, and, after we replaced 10GbE cobber cards(X540-AT2 with ixgbe driver) with X710 10GbE SFP cards using i40e driver, we noticed sever instabilities on our servers.

On several servers the links were marked down and up again, without any obvious reasons expect a lot of errors on kernel.log. We run Bird Internet daemon on our servers in order to establish BGP peerings with routers and we have observed flapping on BGP peerings. At the same time we had BGP peering stabilities issues we had kernel errors. We decided to go back to 3.10 kernel from CentOS, but that process wasn't smooth as latest firmware gave us problems with speed detection. We rolled back to two version old and speed detection issue was resolved. We have been running 3.10 several weeks without any problems. Even we want certain functionality from kernel 4.9, we decided to switch back to 3.10 as stability of our systems has higher priority.

I need to mention that in all occurrences of the issue we didn't see any anomalies, such DDOS attacks and etc.

I have opened https://communities.intel.com/message/501682#501682 and there you can find all the error messages and other information.

Since we noticed the issues, I have been following netdev ML and I know that there are a lot of improvements/patched queued up for 4.14 and I am hoping those patches fix our issue and most importantly are sent to linux-stable for inclusion in 4.9 kernel.

Cheers,
Pavlos



^ permalink raw reply

* [PATCH net 1/3] bpf: fix off by one for range markings with L{T,E} patterns
From: Daniel Borkmann @ 2017-10-21  0:34 UTC (permalink / raw)
  To: davem; +Cc: alexei.starovoitov, john.r.fastabend, netdev, Daniel Borkmann
In-Reply-To: <cover.1508545543.git.daniel@iogearbox.net>

During review I noticed that the current logic for direct packet
access marking in check_cond_jmp_op() has an off by one for the
upper right range border when marking in find_good_pkt_pointers()
with BPF_JLT and BPF_JLE. It's not really harmful given access
up to pkt_end is always safe, but we should nevertheless correct
the range marking before it becomes ABI. If pkt_data' denotes a
pkt_data derived pointer (pkt_data + X), then for pkt_data' < pkt_end
in the true branch as well as for pkt_end <= pkt_data' in the false
branch we mark the range with X although it should really be X - 1
in these cases. For example, X could be pkt_end - pkt_data, then
when testing for pkt_data' < pkt_end the verifier simulation cannot
deduce that a byte load of pkt_data' - 1 would succeed in this
branch.

Fixes: b4e432f1000a ("bpf: enable BPF_J{LT, LE, SLT, SLE} opcodes in verifier")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
---
 kernel/bpf/verifier.c | 33 +++++++++++++++++++++------------
 1 file changed, 21 insertions(+), 12 deletions(-)

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 20f3889..49cb5ad 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -2430,12 +2430,15 @@ static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn)
 }
 
 static void find_good_pkt_pointers(struct bpf_verifier_state *state,
-				   struct bpf_reg_state *dst_reg)
+				   struct bpf_reg_state *dst_reg,
+				   bool range_right_open)
 {
 	struct bpf_reg_state *regs = state->regs, *reg;
+	u16 new_range;
 	int i;
 
-	if (dst_reg->off < 0)
+	if (dst_reg->off < 0 ||
+	    (dst_reg->off == 0 && range_right_open))
 		/* This doesn't give us any range */
 		return;
 
@@ -2446,9 +2449,13 @@ static void find_good_pkt_pointers(struct bpf_verifier_state *state,
 		 */
 		return;
 
-	/* LLVM can generate four kind of checks:
+	new_range = dst_reg->off;
+	if (range_right_open)
+		new_range--;
+
+	/* Examples for register markings:
 	 *
-	 * Type 1/2:
+	 * pkt_data in dst register:
 	 *
 	 *   r2 = r3;
 	 *   r2 += 8;
@@ -2465,7 +2472,7 @@ static void find_good_pkt_pointers(struct bpf_verifier_state *state,
 	 *     r2=pkt(id=n,off=8,r=0)
 	 *     r3=pkt(id=n,off=0,r=0)
 	 *
-	 * Type 3/4:
+	 * pkt_data in src register:
 	 *
 	 *   r2 = r3;
 	 *   r2 += 8;
@@ -2483,7 +2490,9 @@ static void find_good_pkt_pointers(struct bpf_verifier_state *state,
 	 *     r3=pkt(id=n,off=0,r=0)
 	 *
 	 * Find register r3 and mark its range as r3=pkt(id=n,off=0,r=8)
-	 * so that range of bytes [r3, r3 + 8) is safe to access.
+	 * or r3=pkt(id=n,off=0,r=8-1), so that range of bytes [r3, r3 + 8)
+	 * and [r3, r3 + 8-1) respectively is safe to access depending on
+	 * the check.
 	 */
 
 	/* If our ids match, then we must have the same max_value.  And we
@@ -2494,14 +2503,14 @@ static void find_good_pkt_pointers(struct bpf_verifier_state *state,
 	for (i = 0; i < MAX_BPF_REG; i++)
 		if (regs[i].type == PTR_TO_PACKET && regs[i].id == dst_reg->id)
 			/* keep the maximum range already checked */
-			regs[i].range = max_t(u16, regs[i].range, dst_reg->off);
+			regs[i].range = max(regs[i].range, new_range);
 
 	for (i = 0; i < MAX_BPF_STACK; i += BPF_REG_SIZE) {
 		if (state->stack_slot_type[i] != STACK_SPILL)
 			continue;
 		reg = &state->spilled_regs[i / BPF_REG_SIZE];
 		if (reg->type == PTR_TO_PACKET && reg->id == dst_reg->id)
-			reg->range = max_t(u16, reg->range, dst_reg->off);
+			reg->range = max(reg->range, new_range);
 	}
 }
 
@@ -2865,19 +2874,19 @@ static int check_cond_jmp_op(struct bpf_verifier_env *env,
 	} else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JGT &&
 		   dst_reg->type == PTR_TO_PACKET &&
 		   regs[insn->src_reg].type == PTR_TO_PACKET_END) {
-		find_good_pkt_pointers(this_branch, dst_reg);
+		find_good_pkt_pointers(this_branch, dst_reg, false);
 	} else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JLT &&
 		   dst_reg->type == PTR_TO_PACKET &&
 		   regs[insn->src_reg].type == PTR_TO_PACKET_END) {
-		find_good_pkt_pointers(other_branch, dst_reg);
+		find_good_pkt_pointers(other_branch, dst_reg, true);
 	} else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JGE &&
 		   dst_reg->type == PTR_TO_PACKET_END &&
 		   regs[insn->src_reg].type == PTR_TO_PACKET) {
-		find_good_pkt_pointers(other_branch, &regs[insn->src_reg]);
+		find_good_pkt_pointers(other_branch, &regs[insn->src_reg], false);
 	} else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JLE &&
 		   dst_reg->type == PTR_TO_PACKET_END &&
 		   regs[insn->src_reg].type == PTR_TO_PACKET) {
-		find_good_pkt_pointers(this_branch, &regs[insn->src_reg]);
+		find_good_pkt_pointers(this_branch, &regs[insn->src_reg], true);
 	} else if (is_pointer_value(env, insn->dst_reg)) {
 		verbose("R%d pointer comparison prohibited\n", insn->dst_reg);
 		return -EACCES;
-- 
1.9.3

^ permalink raw reply related

* [PATCH net 0/3] Two BPF fixes for range marking
From: Daniel Borkmann @ 2017-10-21  0:34 UTC (permalink / raw)
  To: davem; +Cc: alexei.starovoitov, john.r.fastabend, netdev, Daniel Borkmann

The set contains two fixes for direct packet access range
markings and test cases for all direct packet access patterns
that the verifier matches on.

They are targeted for net tree, note that once net gets merged
into net-next, there will be a minor merge conflict due to
signature change of the function find_good_pkt_pointers() as
well as data_meta patterns present in net-next tree. You can
just add bool false to the data_meta patterns and I will
follow-up with properly converting the patterns for data_meta
in a similar way.

Thanks a lot!

Daniel Borkmann (3):
  bpf: fix off by one for range markings with L{T,E} patterns
  bpf: fix pattern matches for direct packet access
  bpf: add test cases to bpf selftests to cover all access tests

 kernel/bpf/verifier.c                       |  57 +++-
 tools/testing/selftests/bpf/test_verifier.c | 480 ++++++++++++++++++++++++++++
 2 files changed, 525 insertions(+), 12 deletions(-)

-- 
1.9.3

^ permalink raw reply

* [PATCH net 2/3] bpf: fix pattern matches for direct packet access
From: Daniel Borkmann @ 2017-10-21  0:34 UTC (permalink / raw)
  To: davem; +Cc: alexei.starovoitov, john.r.fastabend, netdev, Daniel Borkmann
In-Reply-To: <cover.1508545543.git.daniel@iogearbox.net>

Alexander had a test program with direct packet access, where
the access test was in the form of data + X > data_end. In an
unrelated change to the program LLVM decided to swap the branches
and emitted code for the test in form of data + X <= data_end.
We hadn't seen these being generated previously, thus verifier
would reject the program. Therefore, fix up the verifier to
detect all test cases, so we don't run into such issues in the
future.

Fixes: b4e432f1000a ("bpf: enable BPF_J{LT, LE, SLT, SLE} opcodes in verifier")
Reported-by: Alexander Alemayhu <alexander@alemayhu.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
---
 kernel/bpf/verifier.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 49cb5ad..c48ca2a 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -2874,18 +2874,42 @@ static int check_cond_jmp_op(struct bpf_verifier_env *env,
 	} else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JGT &&
 		   dst_reg->type == PTR_TO_PACKET &&
 		   regs[insn->src_reg].type == PTR_TO_PACKET_END) {
+		/* pkt_data' > pkt_end */
 		find_good_pkt_pointers(this_branch, dst_reg, false);
+	} else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JGT &&
+		   dst_reg->type == PTR_TO_PACKET_END &&
+		   regs[insn->src_reg].type == PTR_TO_PACKET) {
+		/* pkt_end > pkt_data' */
+		find_good_pkt_pointers(other_branch, &regs[insn->src_reg], true);
 	} else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JLT &&
 		   dst_reg->type == PTR_TO_PACKET &&
 		   regs[insn->src_reg].type == PTR_TO_PACKET_END) {
+		/* pkt_data' < pkt_end */
 		find_good_pkt_pointers(other_branch, dst_reg, true);
+	} else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JLT &&
+		   dst_reg->type == PTR_TO_PACKET_END &&
+		   regs[insn->src_reg].type == PTR_TO_PACKET) {
+		/* pkt_end < pkt_data' */
+		find_good_pkt_pointers(this_branch, &regs[insn->src_reg], false);
+	} else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JGE &&
+		   dst_reg->type == PTR_TO_PACKET &&
+		   regs[insn->src_reg].type == PTR_TO_PACKET_END) {
+		/* pkt_data' >= pkt_end */
+		find_good_pkt_pointers(this_branch, dst_reg, true);
 	} else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JGE &&
 		   dst_reg->type == PTR_TO_PACKET_END &&
 		   regs[insn->src_reg].type == PTR_TO_PACKET) {
+		/* pkt_end >= pkt_data' */
 		find_good_pkt_pointers(other_branch, &regs[insn->src_reg], false);
 	} else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JLE &&
+		   dst_reg->type == PTR_TO_PACKET &&
+		   regs[insn->src_reg].type == PTR_TO_PACKET_END) {
+		/* pkt_data' <= pkt_end */
+		find_good_pkt_pointers(other_branch, dst_reg, false);
+	} else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JLE &&
 		   dst_reg->type == PTR_TO_PACKET_END &&
 		   regs[insn->src_reg].type == PTR_TO_PACKET) {
+		/* pkt_end <= pkt_data' */
 		find_good_pkt_pointers(this_branch, &regs[insn->src_reg], true);
 	} else if (is_pointer_value(env, insn->dst_reg)) {
 		verbose("R%d pointer comparison prohibited\n", insn->dst_reg);
-- 
1.9.3

^ permalink raw reply related

* [PATCH net 3/3] bpf: add test cases to bpf selftests to cover all access tests
From: Daniel Borkmann @ 2017-10-21  0:34 UTC (permalink / raw)
  To: davem; +Cc: alexei.starovoitov, john.r.fastabend, netdev, Daniel Borkmann
In-Reply-To: <cover.1508545543.git.daniel@iogearbox.net>

Lets add test cases to cover really all possible direct packet
access tests for good/bad access cases so we keep tracking them.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
---
 tools/testing/selftests/bpf/test_verifier.c | 480 ++++++++++++++++++++++++++++
 1 file changed, 480 insertions(+)

diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
index 3c7d3a4..2911868 100644
--- a/tools/testing/selftests/bpf/test_verifier.c
+++ b/tools/testing/selftests/bpf/test_verifier.c
@@ -6659,6 +6659,486 @@ struct test_val {
 		.result = REJECT,
 		.prog_type = BPF_PROG_TYPE_SCHED_CLS,
 	},
+	{
+		"XDP pkt read, pkt_end mangling, bad access 1",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_3, 8),
+			BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_3, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+	},
+	{
+		"XDP pkt read, pkt_end mangling, bad access 2",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_ALU64_IMM(BPF_SUB, BPF_REG_3, 8),
+			BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_3, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+	},
+	{
+		"XDP pkt read, pkt_data' > pkt_end, good access",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_3, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.result = ACCEPT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+	},
+	{
+		"XDP pkt read, pkt_data' > pkt_end, bad access 1",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_3, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -4),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+		.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+	},
+	{
+		"XDP pkt read, pkt_data' > pkt_end, bad access 2",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_3, 0),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+	},
+	{
+		"XDP pkt read, pkt_end > pkt_data', good access",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JGT, BPF_REG_3, BPF_REG_1, 1),
+			BPF_JMP_IMM(BPF_JA, 0, 0, 1),
+			BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.result = ACCEPT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+		.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+	},
+	{
+		"XDP pkt read, pkt_end > pkt_data', bad access 1",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JGT, BPF_REG_3, BPF_REG_1, 1),
+			BPF_JMP_IMM(BPF_JA, 0, 0, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+	},
+	{
+		"XDP pkt read, pkt_end > pkt_data', bad access 2",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JGT, BPF_REG_3, BPF_REG_1, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+	},
+	{
+		"XDP pkt read, pkt_data' < pkt_end, good access",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JLT, BPF_REG_1, BPF_REG_3, 1),
+			BPF_JMP_IMM(BPF_JA, 0, 0, 1),
+			BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.result = ACCEPT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+		.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+	},
+	{
+		"XDP pkt read, pkt_data' < pkt_end, bad access 1",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JLT, BPF_REG_1, BPF_REG_3, 1),
+			BPF_JMP_IMM(BPF_JA, 0, 0, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+	},
+	{
+		"XDP pkt read, pkt_data' < pkt_end, bad access 2",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JLT, BPF_REG_1, BPF_REG_3, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+	},
+	{
+		"XDP pkt read, pkt_end < pkt_data', good access",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JLT, BPF_REG_3, BPF_REG_1, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.result = ACCEPT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+	},
+	{
+		"XDP pkt read, pkt_end < pkt_data', bad access 1",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JLT, BPF_REG_3, BPF_REG_1, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -4),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+		.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+	},
+	{
+		"XDP pkt read, pkt_end < pkt_data', bad access 2",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JLT, BPF_REG_3, BPF_REG_1, 0),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+	},
+	{
+		"XDP pkt read, pkt_data' >= pkt_end, good access",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JGE, BPF_REG_1, BPF_REG_3, 1),
+			BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.result = ACCEPT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+		.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+	},
+	{
+		"XDP pkt read, pkt_data' >= pkt_end, bad access 1",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JGE, BPF_REG_1, BPF_REG_3, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+	},
+	{
+		"XDP pkt read, pkt_data' >= pkt_end, bad access 2",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JGE, BPF_REG_1, BPF_REG_3, 0),
+			BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+		.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+	},
+	{
+		"XDP pkt read, pkt_end >= pkt_data', good access",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JGE, BPF_REG_3, BPF_REG_1, 1),
+			BPF_JMP_IMM(BPF_JA, 0, 0, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.result = ACCEPT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+	},
+	{
+		"XDP pkt read, pkt_end >= pkt_data', bad access 1",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JGE, BPF_REG_3, BPF_REG_1, 1),
+			BPF_JMP_IMM(BPF_JA, 0, 0, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -4),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+		.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+	},
+	{
+		"XDP pkt read, pkt_end >= pkt_data', bad access 2",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JGE, BPF_REG_3, BPF_REG_1, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+	},
+	{
+		"XDP pkt read, pkt_data' <= pkt_end, good access",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JLE, BPF_REG_1, BPF_REG_3, 1),
+			BPF_JMP_IMM(BPF_JA, 0, 0, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.result = ACCEPT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+	},
+	{
+		"XDP pkt read, pkt_data' <= pkt_end, bad access 1",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JLE, BPF_REG_1, BPF_REG_3, 1),
+			BPF_JMP_IMM(BPF_JA, 0, 0, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -4),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+		.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+	},
+	{
+		"XDP pkt read, pkt_data' <= pkt_end, bad access 2",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JLE, BPF_REG_1, BPF_REG_3, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+	},
+	{
+		"XDP pkt read, pkt_end <= pkt_data', good access",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JLE, BPF_REG_3, BPF_REG_1, 1),
+			BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.result = ACCEPT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+		.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+	},
+	{
+		"XDP pkt read, pkt_end <= pkt_data', bad access 1",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JLE, BPF_REG_3, BPF_REG_1, 1),
+			BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+	},
+	{
+		"XDP pkt read, pkt_end <= pkt_data', bad access 2",
+		.insns = {
+			BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+				    offsetof(struct xdp_md, data)),
+			BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+				    offsetof(struct xdp_md, data_end)),
+			BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+			BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+			BPF_JMP_REG(BPF_JLE, BPF_REG_3, BPF_REG_1, 0),
+			BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
+			BPF_MOV64_IMM(BPF_REG_0, 0),
+			BPF_EXIT_INSN(),
+		},
+		.errstr = "R1 offset is outside of the packet",
+		.result = REJECT,
+		.prog_type = BPF_PROG_TYPE_XDP,
+		.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+	},
 };
 
 static int probe_filter_length(const struct bpf_insn *fp)
-- 
1.9.3

^ permalink raw reply related

* Re: [PATCH v3 net] dccp/tcp: fix ireq->opt races
From: kbuild test robot @ 2017-10-21  0:36 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: kbuild-all, David Miller, netdev
In-Reply-To: <1508451889.30291.4.camel@edumazet-glaptop3.roam.corp.google.com>

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

Hi Eric,

[auto build test WARNING on net/master]

url:    https://github.com/0day-ci/linux/commits/Eric-Dumazet/dccp-tcp-fix-ireq-opt-races/20171021-034024
config: powerpc-ppc6xx_defconfig (attached as .config)
compiler: powerpc-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

All warnings (new ones prefixed by >>):

   In file included from arch/powerpc/include/asm/atomic.h:10:0,
                    from include/linux/atomic.h:4,
                    from include/linux/rcupdate.h:38,
                    from net/ipv4/cipso_ipv4.c:40:
   net/ipv4/cipso_ipv4.c: In function 'cipso_v4_req_setattr':
   net/ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:203:15: note: in definition of macro 'xchg_relaxed'
     __typeof__(*(ptr)) _x_ = (x);     \
                  ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
>> arch/powerpc/include/asm/cmpxchg.h:203:27: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
     __typeof__(*(ptr)) _x_ = (x);     \
                              ^
>> include/linux/atomic.h:65:9: note: in expansion of macro 'xchg_relaxed'
     typeof(op##_relaxed(args)) __ret;    \
            ^~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net/ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:204:16: note: in definition of macro 'xchg_relaxed'
     (__typeof__(*(ptr))) __xchg_relaxed((ptr),   \
                   ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net/ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:204:39: note: in definition of macro 'xchg_relaxed'
     (__typeof__(*(ptr))) __xchg_relaxed((ptr),   \
                                          ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net/ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:205:33: note: in definition of macro 'xchg_relaxed'
       (unsigned long)_x_, sizeof(*(ptr)));  \
                                    ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net/ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:203:15: note: in definition of macro 'xchg_relaxed'
     __typeof__(*(ptr)) _x_ = (x);     \
                  ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
>> arch/powerpc/include/asm/cmpxchg.h:203:27: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
     __typeof__(*(ptr)) _x_ = (x);     \
                              ^
   include/linux/atomic.h:67:10: note: in expansion of macro 'xchg_relaxed'
     __ret = op##_relaxed(args);     \
             ^~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net/ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:204:16: note: in definition of macro 'xchg_relaxed'
     (__typeof__(*(ptr))) __xchg_relaxed((ptr),   \
                   ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net/ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:204:39: note: in definition of macro 'xchg_relaxed'
     (__typeof__(*(ptr))) __xchg_relaxed((ptr),   \
                                          ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net/ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:205:33: note: in definition of macro 'xchg_relaxed'
       (unsigned long)_x_, sizeof(*(ptr)));  \
                                    ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net/ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net/ipv4/cipso_ipv4.c:1954:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     opt = xchg(&req_inet->opt, opt);
         ^
   net/ipv4/cipso_ipv4.c: In function 'cipso_v4_req_delattr':
   net/ipv4/cipso_ipv4.c:2073:16: error: 'struct inet_request_sock' has no member named 'opt'
     opt = req_inet->opt;
                   ^~
   net/ipv4/cipso_ipv4.c:2077:27: error: 'struct inet_request_sock' has no member named 'opt'
     cipso_v4_delopt(&req_inet->opt);
                              ^~
--
   In file included from arch/powerpc/include/asm/atomic.h:10:0,
                    from include/linux/atomic.h:4,
                    from include/linux/rcupdate.h:38,
                    from net//ipv4/cipso_ipv4.c:40:
   net//ipv4/cipso_ipv4.c: In function 'cipso_v4_req_setattr':
   net//ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:203:15: note: in definition of macro 'xchg_relaxed'
     __typeof__(*(ptr)) _x_ = (x);     \
                  ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
>> arch/powerpc/include/asm/cmpxchg.h:203:27: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
     __typeof__(*(ptr)) _x_ = (x);     \
                              ^
>> include/linux/atomic.h:65:9: note: in expansion of macro 'xchg_relaxed'
     typeof(op##_relaxed(args)) __ret;    \
            ^~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net//ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:204:16: note: in definition of macro 'xchg_relaxed'
     (__typeof__(*(ptr))) __xchg_relaxed((ptr),   \
                   ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net//ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:204:39: note: in definition of macro 'xchg_relaxed'
     (__typeof__(*(ptr))) __xchg_relaxed((ptr),   \
                                          ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net//ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:205:33: note: in definition of macro 'xchg_relaxed'
       (unsigned long)_x_, sizeof(*(ptr)));  \
                                    ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net//ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:203:15: note: in definition of macro 'xchg_relaxed'
     __typeof__(*(ptr)) _x_ = (x);     \
                  ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
>> arch/powerpc/include/asm/cmpxchg.h:203:27: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
     __typeof__(*(ptr)) _x_ = (x);     \
                              ^
   include/linux/atomic.h:67:10: note: in expansion of macro 'xchg_relaxed'
     __ret = op##_relaxed(args);     \
             ^~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net//ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:204:16: note: in definition of macro 'xchg_relaxed'
     (__typeof__(*(ptr))) __xchg_relaxed((ptr),   \
                   ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net//ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:204:39: note: in definition of macro 'xchg_relaxed'
     (__typeof__(*(ptr))) __xchg_relaxed((ptr),   \
                                          ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net//ipv4/cipso_ipv4.c:1954:22: error: 'struct inet_request_sock' has no member named 'opt'
     opt = xchg(&req_inet->opt, opt);
                         ^
   arch/powerpc/include/asm/cmpxchg.h:205:33: note: in definition of macro 'xchg_relaxed'
       (unsigned long)_x_, sizeof(*(ptr)));  \
                                    ^~~
   include/linux/atomic.h:517:22: note: in expansion of macro '__atomic_op_fence'
    #define  xchg(...)   __atomic_op_fence(xchg, __VA_ARGS__)
                         ^~~~~~~~~~~~~~~~~
   net//ipv4/cipso_ipv4.c:1954:8: note: in expansion of macro 'xchg'
     opt = xchg(&req_inet->opt, opt);
           ^~~~
   net//ipv4/cipso_ipv4.c:1954:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     opt = xchg(&req_inet->opt, opt);
         ^
   net//ipv4/cipso_ipv4.c: In function 'cipso_v4_req_delattr':
   net//ipv4/cipso_ipv4.c:2073:16: error: 'struct inet_request_sock' has no member named 'opt'
     opt = req_inet->opt;
                   ^~
   net//ipv4/cipso_ipv4.c:2077:27: error: 'struct inet_request_sock' has no member named 'opt'
     cipso_v4_delopt(&req_inet->opt);
                              ^~

vim +203 arch/powerpc/include/asm/cmpxchg.h

ae3a197e David Howells 2012-03-28  175  
ae3a197e David Howells 2012-03-28  176  static __always_inline unsigned long
26760fc1 Boqun Feng    2015-12-15  177  __xchg_relaxed(void *ptr, unsigned long x, unsigned int size)
ae3a197e David Howells 2012-03-28  178  {
ae3a197e David Howells 2012-03-28  179  	switch (size) {
d0563a12 Pan Xinhui    2016-04-27  180  	case 1:
d0563a12 Pan Xinhui    2016-04-27  181  		return __xchg_u8_relaxed(ptr, x);
d0563a12 Pan Xinhui    2016-04-27  182  	case 2:
d0563a12 Pan Xinhui    2016-04-27  183  		return __xchg_u16_relaxed(ptr, x);
ae3a197e David Howells 2012-03-28  184  	case 4:
26760fc1 Boqun Feng    2015-12-15  185  		return __xchg_u32_relaxed(ptr, x);
ae3a197e David Howells 2012-03-28  186  #ifdef CONFIG_PPC64
ae3a197e David Howells 2012-03-28  187  	case 8:
26760fc1 Boqun Feng    2015-12-15  188  		return __xchg_u64_relaxed(ptr, x);
ae3a197e David Howells 2012-03-28  189  #endif
ae3a197e David Howells 2012-03-28  190  	}
10d8b148 pan xinhui    2016-02-23  191  	BUILD_BUG_ON_MSG(1, "Unsupported size for __xchg_local");
ae3a197e David Howells 2012-03-28  192  	return x;
ae3a197e David Howells 2012-03-28  193  }
26760fc1 Boqun Feng    2015-12-15  194  #define xchg_local(ptr,x)						     \
ae3a197e David Howells 2012-03-28  195    ({									     \
ae3a197e David Howells 2012-03-28  196       __typeof__(*(ptr)) _x_ = (x);					     \
26760fc1 Boqun Feng    2015-12-15  197       (__typeof__(*(ptr))) __xchg_local((ptr),				     \
26760fc1 Boqun Feng    2015-12-15  198       		(unsigned long)_x_, sizeof(*(ptr))); 			     \
ae3a197e David Howells 2012-03-28  199    })
ae3a197e David Howells 2012-03-28  200  
26760fc1 Boqun Feng    2015-12-15  201  #define xchg_relaxed(ptr, x)						\
ae3a197e David Howells 2012-03-28  202  ({									\
ae3a197e David Howells 2012-03-28 @203  	__typeof__(*(ptr)) _x_ = (x);					\
26760fc1 Boqun Feng    2015-12-15  204  	(__typeof__(*(ptr))) __xchg_relaxed((ptr),			\
ae3a197e David Howells 2012-03-28  205  			(unsigned long)_x_, sizeof(*(ptr)));		\
ae3a197e David Howells 2012-03-28  206  })
ae3a197e David Howells 2012-03-28  207  /*
ae3a197e David Howells 2012-03-28  208   * Compare and exchange - if *p == old, set it to new,
ae3a197e David Howells 2012-03-28  209   * and return the old value of *p.
ae3a197e David Howells 2012-03-28  210   */
ae3a197e David Howells 2012-03-28  211  

:::::: The code at line 203 was first introduced by commit
:::::: ae3a197e3d0bfe3f4bf1693723e82dc018c096f3 Disintegrate asm/system.h for PowerPC

:::::: TO: David Howells <dhowells@redhat.com>
:::::: CC: David Howells <dhowells@redhat.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29168 bytes --]

^ permalink raw reply

* Re: [PATCH net-next v3 0/2] ipv6: fixes for RTF_CACHE entries
From: David Miller @ 2017-10-21  0:40 UTC (permalink / raw)
  To: pabeni; +Cc: netdev, weiwan, edumazet, hannes, kafai
In-Reply-To: <cover.1508421311.git.pabeni@redhat.com>

From: Paolo Abeni <pabeni@redhat.com>
Date: Thu, 19 Oct 2017 16:07:09 +0200

> This series addresses 2 different but related issues with RTF_CACHE introduced
> by the recent refactory.
> 
> patch 1 restore the gc timer for such routes
> patch 2 removes the aged out dst from the fib tree, properly coping with pMTU
> routes
> 
> v1 -> v2:
>  - dropped the  for ip route show cache
>  - avoid touching dst.obsolete when the dst is aged out
> 
> v2 -> v3:
>  - take care of pMTU exceptions

Series applied, thank you.

^ permalink raw reply

* [PATCH] net: core: rtnetlink: use BUG_ON instead of if condition followed by BUG
From: Gustavo A. R. Silva @ 2017-10-21  0:43 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, linux-kernel, Gustavo A. R. Silva

Use BUG_ON instead of if condition followed by BUG in do_setlink.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
This code was tested by compilation only.

 net/core/rtnetlink.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 04680a5..df8dba9 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2274,8 +2274,7 @@ static int do_setlink(const struct sk_buff *skb,
 
 			rcu_read_lock();
 
-			if (!(af_ops = rtnl_af_lookup(nla_type(af))))
-				BUG();
+			BUG_ON(!(af_ops = rtnl_af_lookup(nla_type(af))));
 
 			err = af_ops->set_link_af(dev, af);
 			if (err < 0) {
-- 
2.7.4

^ permalink raw reply related

* Re: [PATCH net-next] tcp: fix tcp_send_syn_data()
From: David Miller @ 2017-10-21  0:44 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, ycheng, edumazet
In-Reply-To: <1508361630.31614.142.camel@edumazet-glaptop3.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 18 Oct 2017 14:20:30 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> syn_data was allocated by sk_stream_alloc_skb(), meaning
> its destructor and _skb_refdst fields are mangled.
> 
> We need to call tcp_skb_tsorted_anchor_cleanup() before
> calling kfree_skb() or kernel crashes.
> 
> Bug was reported by syzkaller bot.
> 
> Fixes: e2080072ed2d ("tcp: new list for sent but unacked skbs for RACK recovery")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reported-by: Dmitry Vyukov <dvyukov@google.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] spectrum: Convert fib event handlers to use container_of on info arg
From: David Miller @ 2017-10-21  0:45 UTC (permalink / raw)
  To: dsahern; +Cc: netdev, jiri, idosch
In-Reply-To: <1508364098-29621-1-git-send-email-dsahern@gmail.com>

From: David Ahern <dsahern@gmail.com>
Date: Wed, 18 Oct 2017 15:01:38 -0700

> Use container_of to convert the generic fib_notifier_info into
> the event specific data structure.
> 
> Signed-off-by: David Ahern <dsahern@gmail.com>
> Reviewed-by: Ido Schimmel <idosch@mellanox.com>

Applied.

^ permalink raw reply

* Re: [PATCH v2 net-next] tcp: Enable TFO without a cookie on a per-socket basis
From: Yuchung Cheng @ 2017-10-21  0:46 UTC (permalink / raw)
  To: Christoph Paasch; +Cc: David Miller, netdev, Eric Dumazet
In-Reply-To: <20171020211303.76466-1-cpaasch@apple.com>

On Fri, Oct 20, 2017 at 2:13 PM, Christoph Paasch <cpaasch@apple.com> wrote:
>
> We already allow to enable TFO without a cookie by using the
> fastopen-sysctl and setting it to TFO_SERVER_COOKIE_NOT_REQD (0x200).
> This is safe to do in certain environments where we know that there
> isn't a malicous host (aka., data-centers).
>
> A server however might be talking to both sides (public Internet and
> data-center). So, this server would want to enable cookie-less TFO for
> the connections that go to the data-center while enforcing cookies for
> the traffic from the Internet.
>
> This patch exposes a socket-option to enable this (protected by
> CAP_NET_ADMIN).
the protection is removed in this version?

>
> Signed-off-by: Christoph Paasch <cpaasch@apple.com>
> ---
>
> Notes:
>     v2: * Rename to fastopen_no_cookie and TCP_FASTOPEN_NO_COOKIE
>         * Add per-route attribute for fastopen_no_cookie
>         * Get rid of the capability check
>
>  include/linux/tcp.h            |  3 ++-
>  include/net/tcp.h              |  3 ++-
>  include/uapi/linux/rtnetlink.h |  2 ++
>  include/uapi/linux/tcp.h       |  1 +
>  net/ipv4/tcp.c                 | 12 ++++++++++++
>  net/ipv4/tcp_fastopen.c        | 14 +++++++++++---
>  net/ipv4/tcp_input.c           |  2 +-
>  7 files changed, 31 insertions(+), 6 deletions(-)
>
> diff --git a/include/linux/tcp.h b/include/linux/tcp.h
> index 1d2c44e09e31..173a7c2f9636 100644
> --- a/include/linux/tcp.h
> +++ b/include/linux/tcp.h
> @@ -215,7 +215,8 @@ struct tcp_sock {
>         u8      chrono_type:2,  /* current chronograph type */
>                 rate_app_limited:1,  /* rate_{delivered,interval_us} limited? */
>                 fastopen_connect:1, /* FASTOPEN_CONNECT sockopt */
> -               unused:4;
> +               fastopen_no_cookie:1, /* Allow send/recv SYN+data without a cookie */
> +               unused:3;
>         u8      nonagle     : 4,/* Disable Nagle algorithm?             */
>                 thin_lto    : 1,/* Use linear timeouts for thin streams */
>                 unused1     : 1,
> diff --git a/include/net/tcp.h b/include/net/tcp.h
> index 1efe8365cb28..020b20c3f50a 100644
> --- a/include/net/tcp.h
> +++ b/include/net/tcp.h
> @@ -1562,7 +1562,8 @@ int tcp_fastopen_reset_cipher(struct net *net, struct sock *sk,
>  void tcp_fastopen_add_skb(struct sock *sk, struct sk_buff *skb);
>  struct sock *tcp_try_fastopen(struct sock *sk, struct sk_buff *skb,
>                               struct request_sock *req,
> -                             struct tcp_fastopen_cookie *foc);
> +                             struct tcp_fastopen_cookie *foc,
> +                             const struct dst_entry *dst);
>  void tcp_fastopen_init_key_once(struct net *net);
>  bool tcp_fastopen_cookie_check(struct sock *sk, u16 *mss,
>                              struct tcp_fastopen_cookie *cookie);
> diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
> index dab7dad9e01a..fe6679268901 100644
> --- a/include/uapi/linux/rtnetlink.h
> +++ b/include/uapi/linux/rtnetlink.h
> @@ -430,6 +430,8 @@ enum {
>  #define RTAX_QUICKACK RTAX_QUICKACK
>         RTAX_CC_ALGO,
>  #define RTAX_CC_ALGO RTAX_CC_ALGO
> +       RTAX_FASTOPEN_NO_COOKIE,
> +#define RTAX_FASTOPEN_NO_COOKIE RTAX_FASTOPEN_NO_COOKIE
>         __RTAX_MAX
>  };
>
> diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
> index 69c7493e42f8..d67e1d40c6d6 100644
> --- a/include/uapi/linux/tcp.h
> +++ b/include/uapi/linux/tcp.h
> @@ -120,6 +120,7 @@ enum {
>  #define TCP_ULP                        31      /* Attach a ULP to a TCP connection */
>  #define TCP_MD5SIG_EXT         32      /* TCP MD5 Signature with extensions */
>  #define TCP_FASTOPEN_KEY       33      /* Set the key for Fast Open (cookie) */
> +#define TCP_FASTOPEN_NO_COOKIE 34      /* Enable TFO without a TFO cookie */
>
>  struct tcp_repair_opt {
>         __u32   opt_code;
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index 8b1fa4dd4538..a3d46a781abd 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -2832,6 +2832,14 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
>                         err = -EOPNOTSUPP;
>                 }
>                 break;
> +       case TCP_FASTOPEN_NO_COOKIE:
> +               if (val > 1 || val < 0)
> +                       err = -EINVAL;
> +               else if (!((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_LISTEN)))
> +                       err = -EINVAL;
> +               else
> +                       tp->fastopen_no_cookie = 1;
> +               break;
>         case TCP_TIMESTAMP:
>                 if (!tp->repair)
>                         err = -EPERM;
> @@ -3252,6 +3260,10 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
>                 val = tp->fastopen_connect;
>                 break;
>
> +       case TCP_FASTOPEN_NO_COOKIE:
> +               val = tp->fastopen_no_cookie;
> +               break;
> +
>         case TCP_TIMESTAMP:
>                 val = tcp_time_stamp_raw() + tp->tsoffset;
>                 break;
> diff --git a/net/ipv4/tcp_fastopen.c b/net/ipv4/tcp_fastopen.c
> index 21075ce19cb6..e704bd86fdf9 100644
> --- a/net/ipv4/tcp_fastopen.c
> +++ b/net/ipv4/tcp_fastopen.c
> @@ -316,7 +316,8 @@ static bool tcp_fastopen_queue_check(struct sock *sk)
>   */
>  struct sock *tcp_try_fastopen(struct sock *sk, struct sk_buff *skb,
>                               struct request_sock *req,
> -                             struct tcp_fastopen_cookie *foc)
> +                             struct tcp_fastopen_cookie *foc,
> +                             const struct dst_entry *dst)
>  {
>         bool syn_data = TCP_SKB_CB(skb)->end_seq != TCP_SKB_CB(skb)->seq + 1;
>         int tcp_fastopen = sock_net(sk)->ipv4.sysctl_tcp_fastopen;
> @@ -333,7 +334,9 @@ struct sock *tcp_try_fastopen(struct sock *sk, struct sk_buff *skb,
>                 return NULL;
>         }
>
> -       if (syn_data && (tcp_fastopen & TFO_SERVER_COOKIE_NOT_REQD))
> +       if (syn_data && ((tcp_fastopen & TFO_SERVER_COOKIE_NOT_REQD) ||
> +                        tcp_sk(sk)->fastopen_no_cookie ||
> +                        (dst && dst_metric(dst, RTAX_FASTOPEN_NO_COOKIE))))
>                 goto fastopen;
>
>         if (foc->len >= 0 &&  /* Client presents or requests a cookie */
> @@ -370,6 +373,7 @@ bool tcp_fastopen_cookie_check(struct sock *sk, u16 *mss,
>                                struct tcp_fastopen_cookie *cookie)
>  {
>         unsigned long last_syn_loss = 0;
> +       const struct dst_entry *dst;
>         int syn_loss = 0;
>
>         tcp_fastopen_cache_get(sk, mss, cookie, &syn_loss, &last_syn_loss);
> @@ -387,7 +391,11 @@ bool tcp_fastopen_cookie_check(struct sock *sk, u16 *mss,
>                 return false;
>         }
>
> -       if (sock_net(sk)->ipv4.sysctl_tcp_fastopen & TFO_CLIENT_NO_COOKIE) {
> +       dst = __sk_dst_get(sk);
> +
> +       if ((sock_net(sk)->ipv4.sysctl_tcp_fastopen & TFO_CLIENT_NO_COOKIE) ||
> +           tcp_sk(sk)->fastopen_no_cookie ||
> +           (dst && dst_metric(dst, RTAX_FASTOPEN_NO_COOKIE))) {
perhaps a helper e.g. tcp_fastopen_needs_cookie(syscl_flag) for this
function and tcp_try_fastopen() to tidy the code a bit?

>                 cookie->len = -1;
>                 return true;
>         }
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index b2390bfdc68f..a6cf6407f780 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -6329,7 +6329,7 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
>         tcp_openreq_init_rwin(req, sk, dst);
>         if (!want_cookie) {
>                 tcp_reqsk_record_syn(sk, req, skb);
> -               fastopen_sk = tcp_try_fastopen(sk, skb, req, &foc);
> +               fastopen_sk = tcp_try_fastopen(sk, skb, req, &foc, dst);
>         }
>         if (fastopen_sk) {
>                 af_ops->send_synack(fastopen_sk, dst, &fl, req,
> --
> 2.14.1
>

^ permalink raw reply

* Re: pull-request: ieee802154 2017-10-18
From: David Miller @ 2017-10-21  0:47 UTC (permalink / raw)
  To: stefan; +Cc: linux-wpan, alex.aring, marcel, netdev, stefan
In-Reply-To: <20171018220333.28378-1-stefan@datenfreihafen.org>

From: Stefan Schmidt <stefan@datenfreihafen.org>
Date: Thu, 19 Oct 2017 00:03:33 +0200

> Please find below a pull request from the ieee802154 subsystem for
> net-next.

Pulled.

^ permalink raw reply

* Re: [PATCH net] packet: avoid panic in packet_getsockopt()
From: David Miller @ 2017-10-21  0:50 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, willemb, edumazet
In-Reply-To: <1508364504.31614.150.camel@edumazet-glaptop3.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 18 Oct 2017 15:08:24 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> syzkaller got crashes in packet_getsockopt() processing
> PACKET_ROLLOVER_STATS command while another thread was managing
> to change po->rollover
> 
> Using RCU will fix this bug. We might later add proper RCU annotations
> for sparse sake.
> 
> Fixes: a9b6391814d5 ("packet: rollover statistics")
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied and queued up for -stable, but:

> Willem de Bruijn <willemb@google.com>

I didn't know what kind of tag you intended to use here for Willem
so just deleted the line.

^ permalink raw reply

* Re: [PATCH net] packet: avoid panic in packet_getsockopt()
From: David Miller @ 2017-10-21  0:53 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, willemb, edumazet
In-Reply-To: <20171021.015008.162706023967923091.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Sat, 21 Oct 2017 01:50:08 +0100 (WEST)

> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Wed, 18 Oct 2017 15:08:24 -0700
> 
>> From: Eric Dumazet <edumazet@google.com>
>> 
>> syzkaller got crashes in packet_getsockopt() processing
>> PACKET_ROLLOVER_STATS command while another thread was managing
>> to change po->rollover
>> 
>> Using RCU will fix this bug. We might later add proper RCU annotations
>> for sparse sake.
>> 
>> Fixes: a9b6391814d5 ("packet: rollover statistics")
>> Signed-off-by: Eric Dumazet <edumazet@google.com>
> 
> Applied and queued up for -stable, but:
> 
>> Willem de Bruijn <willemb@google.com>
> 
> I didn't know what kind of tag you intended to use here for Willem
> so just deleted the line.

I just noticed 'v2' of this patch and replaced it in time before I
pushed out :-)

^ permalink raw reply

* Re: [PATCH net-next] ipv4: ipv4_default_advmss() should use route mtu
From: David Miller @ 2017-10-21  0:55 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <1508371323.31614.156.camel@edumazet-glaptop3.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 18 Oct 2017 17:02:03 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> ipv4_default_advmss() incorrectly uses the device MTU instead
> of the route provided one. IPv6 has the proper behavior,
> lets harmonize the two protocols.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied.

^ permalink raw reply

* Re: [PATCH net 1/5] net/ncsi: Fix AEN HNCDSC packet length
From: David Miller @ 2017-10-21  0:56 UTC (permalink / raw)
  To: sam; +Cc: netdev, linux-kernel
In-Reply-To: <20171019024309.13628-1-sam@mendozajonas.com>

From: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Date: Thu, 19 Oct 2017 13:43:05 +1100

> Correct the value of the HNCDSC AEN packet.
> Fixes: 7a82ecf4cfb85 "net/ncsi: NCSI AEN packet handler"
> 
> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>

Applied.

^ permalink raw reply

* Re: [PATCH net 2/5] net/ncsi: Stop monitor if channel times out or is inactive
From: David Miller @ 2017-10-21  0:57 UTC (permalink / raw)
  To: sam; +Cc: netdev, linux-kernel
In-Reply-To: <20171019024309.13628-2-sam@mendozajonas.com>

From: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Date: Thu, 19 Oct 2017 13:43:06 +1100

> ncsi_channel_monitor() misses stopping the channel monitor in several
> places that it should, causing a WARN_ON_ONCE() to trigger when the
> monitor is re-started later, eg:
> 
> [  459.040000] WARNING: CPU: 0 PID: 1093 at net/ncsi/ncsi-manage.c:269 ncsi_start_channel_monitor+0x7c/0x90
> [  459.040000] CPU: 0 PID: 1093 Comm: kworker/0:3 Not tainted 4.10.17-gaca2fdd #140
> [  459.040000] Hardware name: ASpeed SoC
> [  459.040000] Workqueue: events ncsi_dev_work
> [  459.040000] [<80010094>] (unwind_backtrace) from [<8000d950>] (show_stack+0x20/0x24)
> [  459.040000] [<8000d950>] (show_stack) from [<801dbf70>] (dump_stack+0x20/0x28)
> [  459.040000] [<801dbf70>] (dump_stack) from [<80018d7c>] (__warn+0xe0/0x108)
> [  459.040000] [<80018d7c>] (__warn) from [<80018e70>] (warn_slowpath_null+0x30/0x38)
> [  459.040000] [<80018e70>] (warn_slowpath_null) from [<803f6a08>] (ncsi_start_channel_monitor+0x7c/0x90)
> [  459.040000] [<803f6a08>] (ncsi_start_channel_monitor) from [<803f7664>] (ncsi_configure_channel+0xdc/0x5fc)
> [  459.040000] [<803f7664>] (ncsi_configure_channel) from [<803f8160>] (ncsi_dev_work+0xac/0x474)
> [  459.040000] [<803f8160>] (ncsi_dev_work) from [<8002d244>] (process_one_work+0x1e0/0x450)
> [  459.040000] [<8002d244>] (process_one_work) from [<8002d510>] (worker_thread+0x5c/0x570)
> [  459.040000] [<8002d510>] (worker_thread) from [<80033614>] (kthread+0x124/0x164)
> [  459.040000] [<80033614>] (kthread) from [<8000a5e8>] (ret_from_fork+0x14/0x2c)
> 
> This also updates the monitor instead of just returning if
> ncsi_xmit_cmd() fails to send the get-link-status command so that the
> monitor properly times out.
> 
> Fixes: e6f44ed6d04d3 "net/ncsi: Package and channel management"
> 
> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>

Applied.

^ permalink raw reply

* Re: [PATCH net 3/5] net/ncsi: Disable HWA mode when no channels are found
From: David Miller @ 2017-10-21  0:57 UTC (permalink / raw)
  To: sam; +Cc: netdev, gwshan, linux-kernel
In-Reply-To: <20171019024309.13628-3-sam@mendozajonas.com>

From: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Date: Thu, 19 Oct 2017 13:43:07 +1100

> From: Gavin Shan <gwshan@linux.vnet.ibm.com>
> 
> When there are no NCSI channels probed, HWA (Hardware Arbitration)
> mode is enabled. It's not correct because HWA depends on the fact:
> NCSI channels exist and all of them support HWA mode. This disables
> HWA when no channels are probed.
> 
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>

Applied.

^ permalink raw reply

* Re: [PATCH net 4/5] net/ncsi: Enforce failover on link monitor timeout
From: David Miller @ 2017-10-21  0:57 UTC (permalink / raw)
  To: sam; +Cc: netdev, gwshan, linux-kernel
In-Reply-To: <20171019024309.13628-4-sam@mendozajonas.com>

From: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Date: Thu, 19 Oct 2017 13:43:08 +1100

> From: Gavin Shan <gwshan@linux.vnet.ibm.com>
> 
> The NCSI channel has been configured to provide service if its link
> monitor timer is enabled, regardless of its state (inactive or active).
> So the timeout event on the link monitor indicates the out-of-service
> on that channel, for which a failover is needed.
> 
> This sets NCSI_DEV_RESHUFFLE flag to enforce failover on link monitor
> timeout, regardless the channel's original state (inactive or active).
> Also, the link is put into "down" state to give the failing channel
> lowest priority when selecting for the active channel. The state of
> failing channel should be set to active in order for deinitialization
> and failover to be done.
> 
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>

Applied.

^ permalink raw reply

* Re: [PATCH net 5/5] net/ncsi: Fix length of GVI response packet
From: David Miller @ 2017-10-21  0:57 UTC (permalink / raw)
  To: sam; +Cc: netdev, gwshan, linux-kernel
In-Reply-To: <20171019024309.13628-5-sam@mendozajonas.com>

From: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Date: Thu, 19 Oct 2017 13:43:09 +1100

> From: Gavin Shan <gwshan@linux.vnet.ibm.com>
> 
> The length of GVI (GetVersionInfo) response packet should be 40 instead
> of 36. This issue was found from /sys/kernel/debug/ncsi/eth0/stats.
> 
>  # ethtool --ncsi eth0 swstats
>      :
>  RESPONSE     OK       TIMEOUT  ERROR
>  =======================================
>  GVI          0        0        2
> 
> With this applied, no error reported on GVI response packets:
> 
>  # ethtool --ncsi eth0 swstats
>      :
>  RESPONSE     OK       TIMEOUT  ERROR
>  =======================================
>  GVI          2        0        0
> 
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>

Applied.

^ permalink raw reply

* Re: [PATCH net] packet: avoid panic in packet_getsockopt()
From: Eric Dumazet @ 2017-10-21  1:11 UTC (permalink / raw)
  To: David Miller; +Cc: Eric Dumazet, netdev, Willem de Bruijn
In-Reply-To: <20171021.015320.1529021296296615087.davem@davemloft.net>

On Fri, Oct 20, 2017 at 5:53 PM, David Miller <davem@davemloft.net> wrote:
> From: David Miller <davem@davemloft.net>
> Date: Sat, 21 Oct 2017 01:50:08 +0100 (WEST)
>
>> From: Eric Dumazet <eric.dumazet@gmail.com>
>> Date: Wed, 18 Oct 2017 15:08:24 -0700
>>
>>> From: Eric Dumazet <edumazet@google.com>
>>>
>>> syzkaller got crashes in packet_getsockopt() processing
>>> PACKET_ROLLOVER_STATS command while another thread was managing
>>> to change po->rollover
>>>
>>> Using RCU will fix this bug. We might later add proper RCU annotations
>>> for sparse sake.
>>>
>>> Fixes: a9b6391814d5 ("packet: rollover statistics")
>>> Signed-off-by: Eric Dumazet <edumazet@google.com>
>>
>> Applied and queued up for -stable, but:
>>
>>> Willem de Bruijn <willemb@google.com>
>>
>> I didn't know what kind of tag you intended to use here for Willem
>> so just deleted the line.
>
> I just noticed 'v2' of this patch and replaced it in time before I
> pushed out :-)

Nice, thanks again !

^ permalink raw reply

* Re: [PATCH v4 net] tcp/dccp: fix ireq->opt races
From: David Miller @ 2017-10-21  1:18 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <1508515453.30291.12.camel@edumazet-glaptop3.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 20 Oct 2017 09:04:13 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> syzkaller found another bug in DCCP/TCP stacks [1]
> 
> For the reasons explained in commit ce1050089c96 ("tcp/dccp: fix
> ireq->pktopts race"), we need to make sure we do not access
> ireq->opt unless we own the request sock.
> 
> Note the opt field is renamed to ireq_opt to ease grep games.
> 
 ...
> Fixes: e994b2f0fb92 ("tcp: do not lock listener to process SYN packets")
> Fixes: 079096f103fa ("tcp/dccp: install syn_recv requests into ehash table")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
> v4: Added the needed changes in net/ipv4/cipso_ipv4.c (and full build)
> v3: fixed the white space mangling
> v2: removed some lines from KASAN report that confuse patchwork.

Hey it compiles! :-)

Applied and queued up for -stable.

^ permalink raw reply

* Re: [PATCH net] hv_sock: add locking in the open/close/release code paths
From: David Miller @ 2017-10-21  1:21 UTC (permalink / raw)
  To: decui
  Cc: netdev, sthemmin, kys, devel, linux-kernel, vkuznets, haiyangz,
	cavery, rolf.neugebauer, marcelo.cerri, Jork.Loeser
In-Reply-To: <KL1P15301MB0006B746A23A2FCE695D08DEBF420@KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM>

From: Dexuan Cui <decui@microsoft.com>
Date: Thu, 19 Oct 2017 03:33:14 +0000

> 
> Without the patch, when hvs_open_connection() hasn't completely established
> a connection (e.g. it has changed sk->sk_state to SS_CONNECTED, but hasn't
> inserted the sock into the connected queue), vsock_stream_connect() may see
> the sk_state change and return the connection to the userspace, and next
> when the userspace closes the connection quickly, hvs_release() may not see
> the connection in the connected queue; finally hvs_open_connection()
> inserts the connection into the queue, but we won't be able to purge the
> connection for ever.
> 
> Signed-off-by: Dexuan Cui <decui@microsoft.com>

Applied.

^ permalink raw reply

* Re: pull request: bluetooth-next 2017-10-19
From: David Miller @ 2017-10-21  1:22 UTC (permalink / raw)
  To: johan.hedberg; +Cc: linux-bluetooth, netdev
In-Reply-To: <20171019062914.GA9702@x1c.lan>

From: Johan Hedberg <johan.hedberg@gmail.com>
Date: Thu, 19 Oct 2017 09:29:14 +0300

> Here's the first bluetooth-next pull request targeting the 4.15 kernel
> release.
> 
>  - Multiple fixes & improvements to the hci_bcm driver
>  - DT improvements, e.g. new local-bd-address property
>  - Fixes & improvements to ECDH usage. Private key is now generated by
>    the crypto subsystem.
>  - gcc-4.9 warning fixes
> 
> Please let me know if there are any issues pulling. Thanks.

Pulled, thanks Johan.

^ 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