* [PATCH net-next] bpf: Preserve const register type on const OR alu ops
From: Alexei Starovoitov @ 2016-12-03 20:31 UTC (permalink / raw)
To: David S . Miller; +Cc: Daniel Borkmann, Gianluca Borello, netdev
From: Gianluca Borello <g.borello@gmail.com>
Occasionally, clang (e.g. version 3.8.1) translates a sum between two
constant operands using a BPF_OR instead of a BPF_ADD. The verifier is
currently not handling this scenario, and the destination register type
becomes UNKNOWN_VALUE even if it's still storing a constant. As a result,
the destination register cannot be used as argument to a helper function
expecting a ARG_CONST_STACK_*, limiting some use cases.
Modify the verifier to handle this case, and add a few tests to make sure
all combinations are supported, and stack boundaries are still verified
even with BPF_OR.
Signed-off-by: Gianluca Borello <g.borello@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
---
kernel/bpf/verifier.c | 9 ++++-
tools/testing/selftests/bpf/.gitignore | 1 +
tools/testing/selftests/bpf/test_verifier.c | 60 +++++++++++++++++++++++++++++
3 files changed, 68 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 0e742210750e..38d05da84a49 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -1481,14 +1481,19 @@ static int evaluate_reg_imm_alu(struct bpf_verifier_env *env,
struct bpf_reg_state *src_reg = ®s[insn->src_reg];
u8 opcode = BPF_OP(insn->code);
- /* dst_reg->type == CONST_IMM here, simulate execution of 'add' insn.
- * Don't care about overflow or negative values, just add them
+ /* dst_reg->type == CONST_IMM here, simulate execution of 'add'/'or'
+ * insn. Don't care about overflow or negative values, just add them
*/
if (opcode == BPF_ADD && BPF_SRC(insn->code) == BPF_K)
dst_reg->imm += insn->imm;
else if (opcode == BPF_ADD && BPF_SRC(insn->code) == BPF_X &&
src_reg->type == CONST_IMM)
dst_reg->imm += src_reg->imm;
+ else if (opcode == BPF_OR && BPF_SRC(insn->code) == BPF_K)
+ dst_reg->imm |= insn->imm;
+ else if (opcode == BPF_OR && BPF_SRC(insn->code) == BPF_X &&
+ src_reg->type == CONST_IMM)
+ dst_reg->imm |= src_reg->imm;
else
mark_reg_unknown_value(regs, insn->dst_reg);
return 0;
diff --git a/tools/testing/selftests/bpf/.gitignore b/tools/testing/selftests/bpf/.gitignore
index 3c59f96e3ed8..071431bedde8 100644
--- a/tools/testing/selftests/bpf/.gitignore
+++ b/tools/testing/selftests/bpf/.gitignore
@@ -1,2 +1,3 @@
test_verifier
test_maps
+test_lru_map
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
index 5da2e9d7689c..8d71e44b319d 100644
--- a/tools/testing/selftests/bpf/test_verifier.c
+++ b/tools/testing/selftests/bpf/test_verifier.c
@@ -2683,6 +2683,66 @@ static struct bpf_test tests[] = {
.errstr_unpriv = "R0 pointer arithmetic prohibited",
.result_unpriv = REJECT,
},
+ {
+ "constant register |= constant should keep constant type",
+ .insns = {
+ BPF_MOV64_REG(BPF_REG_1, BPF_REG_10),
+ BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -48),
+ BPF_MOV64_IMM(BPF_REG_2, 34),
+ BPF_ALU64_IMM(BPF_OR, BPF_REG_2, 13),
+ BPF_MOV64_IMM(BPF_REG_3, 0),
+ BPF_EMIT_CALL(BPF_FUNC_probe_read),
+ BPF_EXIT_INSN(),
+ },
+ .result = ACCEPT,
+ .prog_type = BPF_PROG_TYPE_TRACEPOINT,
+ },
+ {
+ "constant register |= constant should not bypass stack boundary checks",
+ .insns = {
+ BPF_MOV64_REG(BPF_REG_1, BPF_REG_10),
+ BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -48),
+ BPF_MOV64_IMM(BPF_REG_2, 34),
+ BPF_ALU64_IMM(BPF_OR, BPF_REG_2, 24),
+ BPF_MOV64_IMM(BPF_REG_3, 0),
+ BPF_EMIT_CALL(BPF_FUNC_probe_read),
+ BPF_EXIT_INSN(),
+ },
+ .errstr = "invalid stack type R1 off=-48 access_size=58",
+ .result = REJECT,
+ .prog_type = BPF_PROG_TYPE_TRACEPOINT,
+ },
+ {
+ "constant register |= constant register should keep constant type",
+ .insns = {
+ BPF_MOV64_REG(BPF_REG_1, BPF_REG_10),
+ BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -48),
+ BPF_MOV64_IMM(BPF_REG_2, 34),
+ BPF_MOV64_IMM(BPF_REG_4, 13),
+ BPF_ALU64_REG(BPF_OR, BPF_REG_2, BPF_REG_4),
+ BPF_MOV64_IMM(BPF_REG_3, 0),
+ BPF_EMIT_CALL(BPF_FUNC_probe_read),
+ BPF_EXIT_INSN(),
+ },
+ .result = ACCEPT,
+ .prog_type = BPF_PROG_TYPE_TRACEPOINT,
+ },
+ {
+ "constant register |= constant register should not bypass stack boundary checks",
+ .insns = {
+ BPF_MOV64_REG(BPF_REG_1, BPF_REG_10),
+ BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, -48),
+ BPF_MOV64_IMM(BPF_REG_2, 34),
+ BPF_MOV64_IMM(BPF_REG_4, 24),
+ BPF_ALU64_REG(BPF_OR, BPF_REG_2, BPF_REG_4),
+ BPF_MOV64_IMM(BPF_REG_3, 0),
+ BPF_EMIT_CALL(BPF_FUNC_probe_read),
+ BPF_EXIT_INSN(),
+ },
+ .errstr = "invalid stack type R1 off=-48 access_size=58",
+ .result = REJECT,
+ .prog_type = BPF_PROG_TYPE_TRACEPOINT,
+ },
};
static int probe_filter_length(const struct bpf_insn *fp)
--
2.8.0
^ permalink raw reply related
* Re: [PATCH 1/7] net: ethernet: ti: cpdma: am437x: allow descs to be plased in ddr
From: David Miller @ 2016-12-03 20:34 UTC (permalink / raw)
To: grygorii.strashko
Cc: netdev, mugunthanvnm, nsekhar, linux-kernel, linux-omap,
ivan.khoronzhuk
In-Reply-To: <20161201233432.6182-2-grygorii.strashko@ti.com>
From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Thu, 1 Dec 2016 17:34:26 -0600
> @@ -167,10 +167,10 @@ static struct cpdma_control_info controls[] = {
>
> /* various accessors */
> #define dma_reg_read(ctlr, ofs) __raw_readl((ctlr)->dmaregs + (ofs))
> -#define chan_read(chan, fld) __raw_readl((chan)->fld)
> +#define chan_read(chan, fld) readl((chan)->fld)
> #define desc_read(desc, fld) __raw_readl(&(desc)->fld)
> #define dma_reg_write(ctlr, ofs, v) __raw_writel(v, (ctlr)->dmaregs + (ofs))
> -#define chan_write(chan, fld, v) __raw_writel(v, (chan)->fld)
> +#define chan_write(chan, fld, v) writel(v, (chan)->fld)
> #define desc_write(desc, fld, v) __raw_writel((u32)(v), &(desc)->fld)
Unless you want to keep running into subtle errors all over the
place wrt. register vs. memory write ordering, I strong suggest
you use strongly ordered readl/writel for all register accesses.
I see no tangible, worthwhile, advantage to using these relaxed
ordering primitives. The only result is potential bugs.
People who use the relaxed ordering primitives properly are only
doing so in extremely carefully coded sequences where a series
of writes has no dependency on main memory operations and is
explicitly completed with a barrier operation such as a read
back of a register in the same device.
That's not at all what is going on here, instead the driver is wildly
using relaxed ordered register accesses for basically everything.
This is extremely unwise and it's why you ran into this bug in the
first place.
Therefore, I absolutely require that you fix this by eliminating
any and all usese of relaxed ordering I/O accessors in this driver.
Thank you.
^ permalink raw reply
* Re: [PATCH 1/2] net: stmmac: avoid Camelcase naming
From: David Miller @ 2016-12-03 20:24 UTC (permalink / raw)
To: clabbe.montjoie; +Cc: peppe.cavallaro, alexandre.torgue, netdev, linux-kernel
In-Reply-To: <1480605581-13350-1-git-send-email-clabbe.montjoie@gmail.com>
From: Corentin Labbe <clabbe.montjoie@gmail.com>
Date: Thu, 1 Dec 2016 16:19:40 +0100
> This patch simply rename regValue to value, like it was named in other
> mdio functions.
>
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 0/8] drivers: net: xgene: Add Jumbo and Pause frame support
From: David Miller @ 2016-12-03 20:47 UTC (permalink / raw)
To: isubramanian; +Cc: netdev, linux-arm-kernel, patches
In-Reply-To: <1480639304-18757-1-git-send-email-isubramanian@apm.com>
From: Iyappan Subramanian <isubramanian@apm.com>
Date: Thu, 1 Dec 2016 16:41:36 -0800
> This patch set adds,
>
> 1. Jumbo frame support
> 2. Pause frame based flow control
>
> and fixes RSS for non-TCP/UDP packets.
>
> Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Series applied, thanks.
^ permalink raw reply
* Re: [net-next 0/5] use reset to set headers
From: David Miller @ 2016-12-03 20:49 UTC (permalink / raw)
To: zhangshengju; +Cc: netdev
In-Reply-To: <1480643467-4420-1-git-send-email-zhangshengju@cmss.chinamobile.com>
From: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Date: Fri, 2 Dec 2016 09:51:02 +0800
> This patch serial replace 'set' function to 'reset', since the
> offset is zero. It's not necessary to use set, reset function is
> straightforward, and will remove the unnecessary add operation in
> set function.
Series applied, thanks.
^ permalink raw reply
* Re: [PATCH] netlink: 2-clause nla_ok()
From: David Miller @ 2016-12-03 20:54 UTC (permalink / raw)
To: adobriyan; +Cc: netdev
In-Reply-To: <20161202005906.GA31170@avx2>
From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Fri, 2 Dec 2016 03:59:06 +0300
> nla_ok() consists of 3 clauses:
>
> 1) int rem >= (int)sizeof(struct nlattr)
>
> 2) u16 nla_len >= sizeof(struct nlattr)
>
> 3) u16 nla_len <= int rem
>
> The statement is that clause (1) is redundant.
>
> What it does is ensuring that "rem" is a positive number,
> so that in clause (3) positive number will be compared to positive number
> with no problems.
>
> However, "u16" fully fits into "int" and integers do not change value
> when upcasting even to signed type. Negative integers will be rejected
> by clause (3) just fine. Small positive integers will be rejected
> by transitivity of comparison operator.
>
> NOTE: all of the above DOES NOT apply to nlmsg_ok() where ->nlmsg_len is
> u32(!), so 3 clauses AND A CAST TO INT are necessary.
>
> Obligatory space savings report: -1.6 KB
...
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Looks fine, applied to net-next, thanks.
^ permalink raw reply
* Re: [PATCH 1/3] netns: publish net_generic correctly
From: David Miller @ 2016-12-03 21:00 UTC (permalink / raw)
To: adobriyan; +Cc: netdev, xemul
In-Reply-To: <20161202011134.GB31170@avx2>
All 3 patches applied to net-next, thanks.
^ permalink raw reply
* Re: [PATCH net-next] samples/bpf: silence compiler warnings
From: David Miller @ 2016-12-03 21:01 UTC (permalink / raw)
To: ast; +Cc: daniel, netdev
In-Reply-To: <1480645872-999847-1-git-send-email-ast@fb.com>
From: Alexei Starovoitov <ast@fb.com>
Date: Thu, 1 Dec 2016 18:31:12 -0800
> silence some of the clang compiler warnings like:
> include/linux/fs.h:2693:9: warning: comparison of unsigned enum expression < 0 is always false
> arch/x86/include/asm/processor.h:491:30: warning: taking address of packed member 'sp0' of class or structure 'x86_hw_tss' may result in an unaligned pointer value
> include/linux/cgroup-defs.h:326:16: warning: field 'cgrp' with variable sized type 'struct cgroup' not at the end of a struct or class is a GNU extension
> since they add too much noise to samples/bpf/ build.
>
> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Applied.
^ permalink raw reply
* Re: [PATCH 1/1] net: caif: fix ineffective error check
From: Sergei Shtylyov @ 2016-12-03 21:05 UTC (permalink / raw)
To: PanBian, Dmitry Tarnyagin, David S. Miller; +Cc: netdev, linux-kernel
In-Reply-To: <20161203153535.GA7976@bp>
On 12/03/2016 06:38 PM, Pan Bian wrote:
>>> In function caif_sktinit_module(), the check of the return value of
>>> sock_register() seems ineffective. This patch fixes it.
>>>
>>> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188751
>>>
>>> Signed-off-by: Pan Bian <bianpan2016@163.com>
>>> ---
>>> net/caif/caif_socket.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
>>> index aa209b1..2a689a3 100644
>>> --- a/net/caif/caif_socket.c
>>> +++ b/net/caif/caif_socket.c
>>> @@ -1108,7 +1108,7 @@ static int caif_create(struct net *net, struct socket *sock, int protocol,
>>> static int __init caif_sktinit_module(void)
>>> {
>>> int err = sock_register(&caif_family_ops);
>>> - if (!err)
>>> + if (err)
>>> return err;
>>
>> Why not just:
>>
>> return sock_register(&caif_family_ops);
>>
> Your solution looks much cleaner.
>
> But I am not really sure whether it is the author's intention to
> return 0 anyway. Do you have any idea?
I don't think so, the error check seems to have a typo.
[...]
> Best regards,
> Pan
MBR, Sergei
^ permalink raw reply
* Re: [PATCH net-next 0/2] samples, bpf: Refactor; Add automated tests for cgroups
From: David Miller @ 2016-12-03 21:08 UTC (permalink / raw)
To: sargun; +Cc: netdev, daniel, ast
In-Reply-To: <20161202104201.GA9217@ircssh.c.rugged-nimbus-611.internal>
From: Sargun Dhillon <sargun@sargun.me>
Date: Fri, 2 Dec 2016 02:42:03 -0800
> These two patches are around refactoring out some old, reusable code from the
> existing test_current_task_under_cgroup_user test, and adding a new, automated
> test.
>
> There is some generic cgroupsv2 setup & cleanup code, given that most
> environment still don't have it setup by default. With this code, we're able
> to pretty easily add an automated test for future cgroupsv2 functionality.
Series applied, thanks.
^ permalink raw reply
* Re: [PATCH 1/6] net: stmmac: return error if no DMA configuration is found
From: David Miller @ 2016-12-03 21:10 UTC (permalink / raw)
To: niklas.cassel
Cc: peppe.cavallaro, alexandre.torgue, niklass, netdev, linux-kernel
In-Reply-To: <1480687910-9690-1-git-send-email-niklass@axis.com>
When you post a series of related changes as a patch set, you must
provide a proper "[PATCH 0/N] ..." posting which explains what
the series is doing at a high level, how it is doing it, and why
it is doing it that way.
Please repost this entire series with a proper header posting
included.
Thank you.
^ permalink raw reply
* Re: [PATCH] pull request for net: batman-adv 2016-12-02
From: David Miller @ 2016-12-03 21:14 UTC (permalink / raw)
To: sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
In-Reply-To: <20161202161323.5990-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
From: Simon Wunderlich <sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
Date: Fri, 2 Dec 2016 17:13:22 +0100
> here is another bugfix which we would like to see integrated into net,
> if this is possible now.
>
> Please pull or let me know of any problem!
Pulled, thanks.
^ permalink raw reply
* Re: [PATCH net-next] udp: be less conservative with sock rmem accounting
From: David Miller @ 2016-12-03 21:15 UTC (permalink / raw)
To: pabeni; +Cc: netdev, brouer
In-Reply-To: <d13b9808dad5f6e3fe3808bae3b4f64dfcee07fe.1480696423.git.pabeni@redhat.com>
From: Paolo Abeni <pabeni@redhat.com>
Date: Fri, 2 Dec 2016 17:35:49 +0100
> Before commit 850cbaddb52d ("udp: use it's own memory accounting
> schema"), the udp protocol allowed sk_rmem_alloc to grow beyond
> the rcvbuf by the whole current packet's truesize. After said commit
> we allow sk_rmem_alloc to exceed the rcvbuf only if the receive queue
> is empty. As reported by Jesper this cause a performance regression
> for some (small) values of rcvbuf.
>
> This commit is intended to fix the regression restoring the old
> handling of the rcvbuf limit.
>
> Reported-by: Jesper Dangaard Brouer <brouer@redhat.com>
> Fixes: 850cbaddb52d ("udp: use it's own memory accounting schema")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] sfc: remove EFX_BUG_ON_PARANOID, use EFX_WARN_ON_[ONCE_]PARANOID instead
From: David Miller @ 2016-12-03 21:11 UTC (permalink / raw)
To: ecree; +Cc: linux-net-drivers, bkenward, netdev
In-Reply-To: <9435baa4-b9b5-955e-eac2-3106feb87136@solarflare.com>
From: Edward Cree <ecree@solarflare.com>
Date: Fri, 2 Dec 2016 15:51:33 +0000
> Logically, EFX_BUG_ON_PARANOID can never be correct. For, BUG_ON should
> only be used if it is not possible to continue without potential harm;
> and since the non-DEBUG driver will continue regardless (as the BUG_ON is
> compiled out), clearly the BUG_ON cannot be needed in the DEBUG driver.
> So, replace every EFX_BUG_ON_PARANOID with either an EFX_WARN_ON_PARANOID
> or the newly defined EFX_WARN_ON_ONCE_PARANOID.
>
> Signed-off-by: Edward Cree <ecree@solarflare.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] net_sched: gen_estimator: account for timer drifts
From: David Miller @ 2016-12-03 21:12 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
In-Reply-To: <1480695060.18162.363.camel@edumazet-glaptop3.roam.corp.google.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 02 Dec 2016 08:11:00 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> Under heavy stress, timer used in estimators tend to slowly be delayed
> by a few jiffies, leading to inaccuracies.
>
> Lets remember what was the last scheduled jiffies so that we get more
> precise estimations, without having to add a multiply/divide in the loop
> to account for the drifts.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [RFC PATCH 2/2] Documentation: devictree: Add macb mdio bindings
From: Rob Herring @ 2016-12-03 21:35 UTC (permalink / raw)
To: Harini Katakam
Cc: nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w,
davem-fT/PcQaiUtIeIZ0/mPfg9Q, pawel.moll-5wv7dgnIgG8,
mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
galak-sgV2jX0FEOL9JmXXK+q4OQ,
boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
harinikatakamlinux-Re5JQEeQqe8AvxtiuMwx3w,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA, harinik-gjFFaj9aHVfQT0dZR+AlfA,
michals-gjFFaj9aHVfQT0dZR+AlfA
In-Reply-To: <1480326567-6132-1-git-send-email-harinik-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
On Mon, Nov 28, 2016 at 03:19:27PM +0530, Harini Katakam wrote:
> Add documentations for macb mdio driver.
Bindings document h/w, not drivers.
>
> Signed-off-by: Harini Katakam <harinik-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
> ---
> .../devicetree/bindings/net/macb-mdio.txt | 31 ++++++++++++++++++++++
> 1 file changed, 31 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/macb-mdio.txt
>
> diff --git a/Documentation/devicetree/bindings/net/macb-mdio.txt b/Documentation/devicetree/bindings/net/macb-mdio.txt
> new file mode 100644
> index 0000000..014cedf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/macb-mdio.txt
> @@ -0,0 +1,31 @@
> +* Cadence MACB MDIO controller
> +
> +Required properties:
> +- compatible: Should be "cdns,macb-mdio"
Only one version ever? This needs more specific compatible strings.
> +- reg: Address and length of the register set of MAC to be used
> +- clock-names: Tuple listing input clock names.
> + Required elements: 'pclk', 'hclk'
> + Optional elements: 'tx_clk'
> +- clocks: Phandles to input clocks.
> +
> +Examples:
> +
> + mdio {
> + compatible = "cdns,macb-mdio";
> + reg = <0x0 0xff0b0000 0x0 0x1000>;
> + clocks = <&clk125>, <&clk125>, <&clk125>;
> + clock-names = "pclk", "hclk", "tx_clk";
> + ethernet_phyC: ethernet-phy@C {
lowercase hex for unit addresses please
> + reg = <0xC>;
> + };
> + ethernet_phy7: ethernet-phy@7 {
> + reg = <0x7>;
> + };
> + ethernet_phy3: ethernet-phy@3 {
> + reg = <0x3>;
> + };
> + ethernet_phy8: ethernet-phy@8 {
> + reg = <0x8>;
> + };
> + };
> +
> --
> 2.7.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH net-next] net_sched: gen_estimator: account for timer drifts
From: Eric Dumazet @ 2016-12-03 21:54 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20161203.161234.605773166761239343.davem@davemloft.net>
On Sat, 2016-12-03 at 16:12 -0500, David Miller wrote:
> Applied.
Thanks David.
I also have to get rid of the WRITE_ONCE() done in est_timer(), since it
does not work properly on 32bit kernels.
It will target net-next, since it is not a very serious problem.
^ permalink raw reply
* Re: [RFC PATCH 2/2] Documentation: devictree: Add macb mdio bindings
From: Florian Fainelli @ 2016-12-03 22:40 UTC (permalink / raw)
To: Rob Herring, Harini Katakam
Cc: nicolas.ferre, davem, pawel.moll, mark.rutland, ijc+devicetree,
galak, boris.brezillon, alexandre.belloni, harinikatakamlinux,
netdev, linux-kernel, devicetree, harinik, michals
In-Reply-To: <20161203213553.f3agwvaseufglnq6@rob-hp-laptop>
Le 12/03/16 à 13:35, Rob Herring a écrit :
> On Mon, Nov 28, 2016 at 03:19:27PM +0530, Harini Katakam wrote:
>> Add documentations for macb mdio driver.
>
> Bindings document h/w, not drivers.
>
>>
>> Signed-off-by: Harini Katakam <harinik@xilinx.com>
>> ---
>> .../devicetree/bindings/net/macb-mdio.txt | 31 ++++++++++++++++++++++
>> 1 file changed, 31 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/net/macb-mdio.txt
>>
>> diff --git a/Documentation/devicetree/bindings/net/macb-mdio.txt b/Documentation/devicetree/bindings/net/macb-mdio.txt
>> new file mode 100644
>> index 0000000..014cedf
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/net/macb-mdio.txt
>> @@ -0,0 +1,31 @@
>> +* Cadence MACB MDIO controller
>> +
>> +Required properties:
>> +- compatible: Should be "cdns,macb-mdio"
>
> Only one version ever? This needs more specific compatible strings.
>
>> +- reg: Address and length of the register set of MAC to be used
>> +- clock-names: Tuple listing input clock names.
>> + Required elements: 'pclk', 'hclk'
>> + Optional elements: 'tx_clk'
>> +- clocks: Phandles to input clocks.
You are also missing mandatory properties:
#address-cells = <1> and #size-cells = <0>
Where is patch 1? Can you make sure you have the same recipient list for
both patches in this series so we can review both the binding and driver?
Thanks!
--
Florian
^ permalink raw reply
* [PATCH net-next] tcp: fix the missing avr32 SOF_TIMESTAMPING_OPT_STATS
From: Yuchung Cheng @ 2016-12-03 22:46 UTC (permalink / raw)
To: davem; +Cc: paul.gortmaker, netdev, Yuchung Cheng
The commit of SOF_TIMESTAMPING_OPT_STATS didn't include the
new header for avr32, causing build to break. The patch fixes it.
Fixes: 1c885808e456 ("tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING")
Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
---
arch/avr32/include/uapi/asm/socket.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/avr32/include/uapi/asm/socket.h b/arch/avr32/include/uapi/asm/socket.h
index 1fd147f..5a65042 100644
--- a/arch/avr32/include/uapi/asm/socket.h
+++ b/arch/avr32/include/uapi/asm/socket.h
@@ -90,4 +90,6 @@
#define SO_CNX_ADVICE 53
+#define SCM_TIMESTAMPING_OPT_STATS 54
+
#endif /* _UAPI__ASM_AVR32_SOCKET_H */
--
2.8.0.rc3.226.g39d4020
^ permalink raw reply related
* Re: [PATCH 3/6] net: ethernet: ti: cpts: add support of cpts HW_TS_PUSH
From: Richard Cochran @ 2016-12-03 23:21 UTC (permalink / raw)
To: Grygorii Strashko
Cc: David S. Miller, netdev, Mugunthan V N, Sekhar Nori, linux-kernel,
linux-omap, Rob Herring, devicetree, Murali Karicheri,
Wingman Kwok
In-Reply-To: <20161128230428.6872-4-grygorii.strashko@ti.com>
On Mon, Nov 28, 2016 at 05:04:25PM -0600, Grygorii Strashko wrote:
> This also change overflow polling period when HW_TS_PUSH feature is
> enabled - overflow check work will be scheduled more often (every
> 200ms) for proper HW_TS_PUSH events reporting.
For proper reporting, you should make use of the interrupt. The small
fifo (16 iirc) could very well overflow in 200 ms. The interrupt
handler should read out the entire fifo at each interrupt.
Thanks,
Richard
^ permalink raw reply
* Re: [ovs-dev] [PATCH net-next] net: remove abuse of VLAN DEI/CFI bit
From: Ben Pfaff @ 2016-12-03 23:27 UTC (permalink / raw)
To: Michał Mirosław
Cc: netdev, open list:OPENVSWITCH, moderated list:ETHERNET BRIDGE
In-Reply-To: <cfa1f2efae2217b50cbefccbf9ba7f0d24a23c63.1480755768.git.mirq-linux@rere.qmqm.pl>
On Sat, Dec 03, 2016 at 10:22:28AM +0100, Michał Mirosław wrote:
> This All-in-one patch removes abuse of VLAN CFI bit, so it can be passed
> intact through linux networking stack.
>
> Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
> ---
>
> Dear NetDevs
>
> I guess this needs to be split to the prep..convert[]..finish sequence,
> but if you like it as is, then it's ready.
>
> The biggest question is if the modified interface and vlan_present
> is the way to go. This can be changed to use vlan_proto != 0 instead
> of an extra flag bit.
>
> As I can't test most of the driver changes, please look at them carefully.
> OVS and bridge eyes are especially welcome.
This appears to change the established Open vSwitch userspace API. You
can see that simply from the way that it changes the documentation for
the userspace API. If I'm right about that, then this change will break
all userspace programs that use the Open vSwitch kernel module,
including Open vSwitch itself.
^ permalink raw reply
* Re: [PATCH net-next] bpf: Preserve const register type on const OR alu ops
From: Daniel Borkmann @ 2016-12-03 23:41 UTC (permalink / raw)
To: Alexei Starovoitov, David S . Miller; +Cc: Gianluca Borello, netdev
In-Reply-To: <1480797093-1050393-1-git-send-email-ast@fb.com>
On 12/03/2016 09:31 PM, Alexei Starovoitov wrote:
> From: Gianluca Borello <g.borello@gmail.com>
>
> Occasionally, clang (e.g. version 3.8.1) translates a sum between two
> constant operands using a BPF_OR instead of a BPF_ADD. The verifier is
> currently not handling this scenario, and the destination register type
> becomes UNKNOWN_VALUE even if it's still storing a constant. As a result,
> the destination register cannot be used as argument to a helper function
> expecting a ARG_CONST_STACK_*, limiting some use cases.
>
> Modify the verifier to handle this case, and add a few tests to make sure
> all combinations are supported, and stack boundaries are still verified
> even with BPF_OR.
>
> Signed-off-by: Gianluca Borello <g.borello@gmail.com>
> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
^ permalink raw reply
* Re: [PATCH net-next] tcp: fix the missing avr32 SOF_TIMESTAMPING_OPT_STATS
From: David Miller @ 2016-12-04 0:06 UTC (permalink / raw)
To: ycheng; +Cc: paul.gortmaker, netdev
In-Reply-To: <1480805182-7150-1-git-send-email-ycheng@google.com>
From: Yuchung Cheng <ycheng@google.com>
Date: Sat, 3 Dec 2016 14:46:22 -0800
> The commit of SOF_TIMESTAMPING_OPT_STATS didn't include the
> new header for avr32, causing build to break. The patch fixes it.
>
> Fixes: 1c885808e456 ("tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING")
> Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
Applied, thanks.
^ permalink raw reply
* Re: [net-next 00/18][pull request] 40GbE Intel Wired LAN Driver Updates 2016-12-02
From: David Miller @ 2016-12-04 0:11 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, nhorman, sassmann, jogreene, guru.anbalagane
In-Reply-To: <20161203091930.14268-1-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Sat, 3 Dec 2016 01:19:12 -0800
> This series contains updates to i40e and i40evf only.
Pulled, thanks Jeff.
^ permalink raw reply
* Re: [PATCH v2 net-next 8/8] tcp: tsq: move tsq_flags close to sk_wmem_alloc
From: David Miller @ 2016-12-04 0:16 UTC (permalink / raw)
To: edumazet; +Cc: netdev, ycheng, eric.dumazet
In-Reply-To: <1480792497-16607-9-git-send-email-edumazet@google.com>
From: Eric Dumazet <edumazet@google.com>
Date: Sat, 3 Dec 2016 11:14:57 -0800
> diff --git a/include/linux/tcp.h b/include/linux/tcp.h
> index d8be083ab0b0..fc5848dad7a4 100644
> --- a/include/linux/tcp.h
> +++ b/include/linux/tcp.h
> @@ -186,7 +186,6 @@ struct tcp_sock {
> u32 tsoffset; /* timestamp offset */
>
> struct list_head tsq_node; /* anchor in tsq_tasklet.head list */
> - unsigned long tsq_flags;
>
> /* Data for direct copy to user */
> struct {
Hmmm, did you forget to "git add include/net/sock.h" before making
this commit?
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox