* [PATCH] ip/xfrm: Fix deleteall when having many policies installed
From: Alexander Heinlein @ 2017-01-16 14:09 UTC (permalink / raw)
To: netdev; +Cc: shemminger
Fix "Policy buffer overflow" error when trying to use deleteall with
many policies installed.
Signed-off-by: Alexander Heinlein <alexander.heinlein@secunet.com>
---
ip/xfrm_policy.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/ip/xfrm_policy.c b/ip/xfrm_policy.c
index cc9c0f1..451b982 100644
--- a/ip/xfrm_policy.c
+++ b/ip/xfrm_policy.c
@@ -732,10 +732,8 @@ static int xfrm_policy_keep(const struct
sockaddr_nl *who,
if (!xfrm_policy_filter_match(xpinfo, ptype))
return 0;
- if (xb->offset > xb->size) {
- fprintf(stderr, "Policy buffer overflow\n");
- return -1;
- }
+ if (xb->offset + NLMSG_LENGTH(sizeof(*xpid)) > xb->size)
+ return 0;
new_n = (struct nlmsghdr *)(xb->buf + xb->offset);
new_n->nlmsg_len = NLMSG_LENGTH(sizeof(*xpid));
--
2.1.4
^ permalink raw reply related
* Re: sctp: kernel memory overwrite attempt detected in sctp_getsockopt_assoc_stats
From: Dmitry Vyukov @ 2017-01-16 14:03 UTC (permalink / raw)
To: Neil Horman
Cc: Vladislav Yasevich, David Miller, linux-sctp, netdev, LKML,
Kees Cook, syzkaller
In-Reply-To: <20170116135743.GC30105@hmswarspite.think-freely.org>
On Mon, Jan 16, 2017 at 2:57 PM, Neil Horman <nhorman@tuxdriver.com> wrote:
> On Mon, Jan 16, 2017 at 08:11:40AM +0100, Dmitry Vyukov wrote:
>> On Sun, Jan 15, 2017 at 9:35 PM, Neil Horman <nhorman@tuxdriver.com> wrote:
>> > On Sun, Jan 15, 2017 at 06:29:59PM +0100, Dmitry Vyukov wrote:
>> >> Hello,
>> >>
>> >> I've enabled CONFIG_HARDENED_USERCOPY_PAGESPAN on syzkaller fuzzer and
>> >> now I am seeing lots of:
>> >>
>> > If I'm not mistaken, its because thats specifically what that option does. From
>> > the Kconfig:
>> > onfig HARDENED_USERCOPY_PAGESPAN
>> > bool "Refuse to copy allocations that span multiple pages"
>> > depends on HARDENED_USERCOPY
>> > depends on EXPERT
>> > help
>> > When a multi-page allocation is done without __GFP_COMP,
>> > hardened usercopy will reject attempts to copy it. There are,
>> > however, several cases of this in the kernel that have not all
>> > been removed. This config is intended to be used only while
>> > trying to find such users.
>> >
>> > So, if the fuzzer does a setsockopt and the data it passes crosses a page
>> > boundary, it seems like this will get triggered. Based on the fact that its
>> > only used to find users that do this, it seems like not the sort of thing that
>> > you want enabled while running a fuzzer that might do it arbitrarily.
>>
>>
>> The code also takes into account compound pages. As far as I
>> understand the intention of the check is to effectively find
>> out-of-bounds copies (e.g. goes beyond the current heap allocation). I
>> would expect that stacks are allocated as compound pages and don't
>> trigger this check. I don't see it is firing in other similar places.
>>
> Honestly, I'm not overly familiar with stack page allocation, at least not so
> far as compound vs. single page allocation is concerned. I suppose the question
> your really asking here is: Have you found a case in which the syscall fuzzer
> has forced the allocation of an insecure non-compound page on the stack, or is
> this a false positive warning. I can't provide the answer to that.
Yes. I added Kees, author of CONFIG_HARDENED_USERCOPY_PAGESPAN, to To line.
Kees, is this a false positive?
^ permalink raw reply
* Re: sctp: kernel memory overwrite attempt detected in sctp_getsockopt_assoc_stats
From: Neil Horman @ 2017-01-16 13:57 UTC (permalink / raw)
To: Dmitry Vyukov
Cc: Vladislav Yasevich, David Miller, linux-sctp, netdev, LKML,
Kees Cook, syzkaller
In-Reply-To: <CACT4Y+Zp4cruuKtf7fkSeLFbYLzTOD79Y2c+cCrHx-pbEXC_6A@mail.gmail.com>
On Mon, Jan 16, 2017 at 08:11:40AM +0100, Dmitry Vyukov wrote:
> On Sun, Jan 15, 2017 at 9:35 PM, Neil Horman <nhorman@tuxdriver.com> wrote:
> > On Sun, Jan 15, 2017 at 06:29:59PM +0100, Dmitry Vyukov wrote:
> >> Hello,
> >>
> >> I've enabled CONFIG_HARDENED_USERCOPY_PAGESPAN on syzkaller fuzzer and
> >> now I am seeing lots of:
> >>
> > If I'm not mistaken, its because thats specifically what that option does. From
> > the Kconfig:
> > onfig HARDENED_USERCOPY_PAGESPAN
> > bool "Refuse to copy allocations that span multiple pages"
> > depends on HARDENED_USERCOPY
> > depends on EXPERT
> > help
> > When a multi-page allocation is done without __GFP_COMP,
> > hardened usercopy will reject attempts to copy it. There are,
> > however, several cases of this in the kernel that have not all
> > been removed. This config is intended to be used only while
> > trying to find such users.
> >
> > So, if the fuzzer does a setsockopt and the data it passes crosses a page
> > boundary, it seems like this will get triggered. Based on the fact that its
> > only used to find users that do this, it seems like not the sort of thing that
> > you want enabled while running a fuzzer that might do it arbitrarily.
>
>
> The code also takes into account compound pages. As far as I
> understand the intention of the check is to effectively find
> out-of-bounds copies (e.g. goes beyond the current heap allocation). I
> would expect that stacks are allocated as compound pages and don't
> trigger this check. I don't see it is firing in other similar places.
>
Honestly, I'm not overly familiar with stack page allocation, at least not so
far as compound vs. single page allocation is concerned. I suppose the question
your really asking here is: Have you found a case in which the syscall fuzzer
has forced the allocation of an insecure non-compound page on the stack, or is
this a false positive warning. I can't provide the answer to that.
Neil
>
>
> >> usercopy: kernel memory overwrite attempt detected to ffff8801a74f6f10
> >> (<spans multiple pages>) (256 bytes)
> >>
> >> kernel BUG at mm/usercopy.c:75!
> >> invalid opcode: 0000 [#1] SMP KASAN
> >> Dumping ftrace buffer:
> >> (ftrace buffer empty)
> >> Modules linked in:
> >> CPU: 1 PID: 15686 Comm: syz-executor3 Not tainted 4.9.0 #1
> >> Hardware name: Google Google Compute Engine/Google Compute Engine,
> >> BIOS Google 01/01/2011
> >> task: ffff8801c89b2500 task.stack: ffff8801a74f0000
> >> RIP: 0010:[<ffffffff81a1b041>] [<ffffffff81a1b041>] report_usercopy
> >> mm/usercopy.c:67 [inline]
> >> RIP: 0010:[<ffffffff81a1b041>] [<ffffffff81a1b041>]
> >> __check_object_size+0x2d1/0x9ec mm/usercopy.c:278
> >> RSP: 0018:ffff8801a74f6cd0 EFLAGS: 00010286
> >> RAX: 000000000000006b RBX: ffffffff84500120 RCX: 0000000000000000
> >> RDX: 000000000000006b RSI: ffffffff815a7791 RDI: ffffed0034e9ed8c
> >> RBP: ffff8801a74f6e48 R08: 0000000000000001 R09: 0000000000000000
> >> R10: 0000000000000000 R11: 0000000000000001 R12: ffff8801a74f6f10
> >> R13: 0000000000000100 R14: ffffffff845000e0 R15: ffff8801a74f700f
> >> FS: 00007f80918de700(0000) GS:ffff8801dc100000(0000) knlGS:0000000000000000
> >> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> >> CR2: 0000000020058ffc CR3: 00000001cc1cc000 CR4: 00000000001406e0
> >> Stack:
> >> ffffffff8598fcc8 0000000000000000 000077ff80000000 ffffea0005c99608
> >> ffffffff844fff40 ffffffff844fff40 0000000041b58ab3 ffffffff84ae0fa0
> >> ffffffff81a1ad70 ffff8801c89b2500 dead000000000100 ffffffff814d4425
> >> Call Trace:
> >> [<ffffffff83e4ece9>] check_object_size include/linux/thread_info.h:129 [inline]
> >> [<ffffffff83e4ece9>] copy_from_user arch/x86/include/asm/uaccess.h:692 [inline]
> >> [<ffffffff83e4ece9>] sctp_getsockopt_assoc_stats+0x169/0xa10
> >> net/sctp/socket.c:6182
> >> [<ffffffff83e5cc52>] sctp_getsockopt+0x1af2/0x66a0 net/sctp/socket.c:6556
> >> [<ffffffff834f92c5>] sock_common_getsockopt+0x95/0xd0 net/core/sock.c:2649
> >> [<ffffffff834f4910>] SYSC_getsockopt net/socket.c:1788 [inline]
> >> [<ffffffff834f4910>] SyS_getsockopt+0x240/0x380 net/socket.c:1770
> >> [<ffffffff81009798>] do_syscall_64+0x2e8/0x930 arch/x86/entry/common.c:280
> >> [<ffffffff84370a49>] entry_SYSCALL64_slow_path+0x25/0x25
> >> Code: b0 fe ff ff e8 e1 25 ce ff 48 8b 85 b0 fe ff ff 4d 89 e9 4c 89
> >> e1 4c 89 f2 48 89 de 48 c7 c7 a0 01 50 84 49 89 c0 e8 51 d9 e0 ff <0f>
> >> 0b e8 b8 25 ce ff 4c 89 f2 4c 89 ee 4c 89 e7 e8 6a 1b fc ff
> >> RIP [<ffffffff81a1b041>] report_usercopy mm/usercopy.c:67 [inline]
> >> RIP [<ffffffff81a1b041>] __check_object_size+0x2d1/0x9ec mm/usercopy.c:278
> >> RSP <ffff8801a74f6cd0>
> >> ---[ end trace 5e438996b2c0b35d ]---
> >>
> >>
> >> I am not sure why check_object_size flags this an a bug,
> >> copy_from_user copies into a stack object:
> >>
> >> static int sctp_getsockopt_assoc_stats(struct sock *sk, int len,
> >> char __user *optval,
> >> int __user *optlen)
> >> {
> >> struct sctp_assoc_stats sas;
> >> len = min_t(size_t, len, sizeof(sas));
> >> if (copy_from_user(&sas, optval, len))
> >> return -EFAULT;
> >>
> >> Kees, can this be a false positive?
> >>
> >> On commit f4d3935e4f4884ba80561db5549394afb8eef8f7.
> >>
>
^ permalink raw reply
* Re: [PATCH ipsec-next v3 0/2] IPsec: do not ignore crypto err in ah input
From: Steffen Klassert @ 2017-01-16 13:27 UTC (permalink / raw)
To: Gilad Ben-Yossef
Cc: herbert, davem, netdev, ofir.drang, gilad.benyossef,
Alexander Alemayhu
In-Reply-To: <1484565476-19371-1-git-send-email-gilad@benyossef.com>
On Mon, Jan 16, 2017 at 01:17:54PM +0200, Gilad Ben-Yossef wrote:
> ah input processing uses the asynchronous hash crypto API which
> supplies an error code as part of the operation completion but
> the error code was being ignored.
>
> Treat a crypto API error indication as a verification failure.
>
> While a crypto API reported error would almost certainly result
> in a memcpy of the digest failing anyway and thus the security
> risk seems minor, performing a memory compare on what might be
> uninitialized memory is wrong.
>
> Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
> CC: Alexander Alemayhu <alexander@alemayhu.com>
Both applied to ipsec-next, thanks a lot!
^ permalink raw reply
* Re: [PATCH] netfilter: Fix typo in NF_CONNTRACK Kconfig option description
From: Pablo Neira Ayuso @ 2017-01-16 13:27 UTC (permalink / raw)
To: William Breathitt Gray
Cc: Patrick McHardy, Jozsef Kadlecsik, David S. Miller,
netfilter-devel, coreteam, netdev, linux-kernel
In-Reply-To: <20170109222417.GA18253@sophia>
On Mon, Jan 09, 2017 at 05:24:18PM -0500, William Breathitt Gray wrote:
> The NF_CONNTRACK Kconfig option description makes an incorrect reference
> to the "meta" expression where the "ct" expression would be correct.This
> patch fixes the respective typographical error.
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] xfrm: state: fix potential null pointer dereference on afinfo
From: Steffen Klassert @ 2017-01-16 13:27 UTC (permalink / raw)
To: Colin King; +Cc: Herbert Xu, David S . Miller, netdev, linux-kernel
In-Reply-To: <20170113140703.20961-1-colin.king@canonical.com>
On Fri, Jan 13, 2017 at 02:07:03PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> afinfo is being null checked before a call afinfo->init_tempsel
> so afinfo may be potentially null. ifinfo may still be null in
> the case were it is not updated when family == tmpl->encap_family,
> hence we may hit a null pointer dereference in the call to
> afinfo->init_temprop.
>
> Fix this by adding a null ptr check before calling init_temprop.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
I've applied already a fix for this from Florian Westphal.
Thanks a lot anyway!
^ permalink raw reply
* [PATCH] stmicro: rename it to dwc to improve future development
From: Joao Pinto @ 2017-01-16 13:26 UTC (permalink / raw)
To: davem; +Cc: peppe.cavallaro, alexandre.torgue, netdev, Joao Pinto
The goal of this patch is to create an oficial Designware Ethernet place
to deploy new drivers based on this family of IPs. stmmac was left
untouched since it is a designware based driver. New ethernet designware
IP based drivers should be placed in this place, improving code organization
and it becomes clear to the kernel user the purpose and scope of each driver.
Signed-off-by: Joao Pinto <jpinto@synopsys.com>
---
drivers/net/ethernet/Kconfig | 2 +-
drivers/net/ethernet/Makefile | 2 +-
drivers/net/ethernet/{stmicro => dwc}/Kconfig | 7 ++++---
drivers/net/ethernet/dwc/Makefile | 5 +++++
drivers/net/ethernet/{stmicro => dwc}/stmmac/Kconfig | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/Makefile | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/altr_tse_pcs.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/altr_tse_pcs.h | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/chain_mode.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/common.h | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/descs.h | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/descs_com.h | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-dwc-qos-eth.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-generic.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-ipq806x.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-lpc18xx.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-meson.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-meson8b.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-oxnas.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-rk.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-socfpga.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-sti.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-stm32.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-sunxi.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac100.h | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac1000.h | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac1000_core.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac1000_dma.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac100_core.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac100_dma.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac4.h | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac4_core.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac4_descs.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac4_descs.h | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac4_dma.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac4_dma.h | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac4_lib.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac_dma.h | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac_lib.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/enh_desc.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/mmc.h | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/mmc_core.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/norm_desc.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/ring_mode.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac.h | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_ethtool.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_hwtstamp.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_main.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_mdio.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_pci.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_pcs.h | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_platform.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_platform.h | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_ptp.c | 0
drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_ptp.h | 0
drivers/net/ethernet/stmicro/Makefile | 5 -----
56 files changed, 11 insertions(+), 10 deletions(-)
rename drivers/net/ethernet/{stmicro => dwc}/Kconfig (68%)
create mode 100644 drivers/net/ethernet/dwc/Makefile
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/Kconfig (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/Makefile (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/altr_tse_pcs.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/altr_tse_pcs.h (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/chain_mode.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/common.h (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/descs.h (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/descs_com.h (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-dwc-qos-eth.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-generic.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-ipq806x.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-lpc18xx.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-meson.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-meson8b.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-oxnas.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-rk.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-socfpga.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-sti.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-stm32.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac-sunxi.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac100.h (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac1000.h (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac1000_core.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac1000_dma.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac100_core.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac100_dma.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac4.h (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac4_core.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac4_descs.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac4_descs.h (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac4_dma.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac4_dma.h (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac4_lib.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac_dma.h (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/dwmac_lib.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/enh_desc.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/mmc.h (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/mmc_core.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/norm_desc.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/ring_mode.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac.h (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_ethtool.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_hwtstamp.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_main.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_mdio.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_pci.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_pcs.h (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_platform.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_platform.h (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_ptp.c (100%)
rename drivers/net/ethernet/{stmicro => dwc}/stmmac/stmmac_ptp.h (100%)
delete mode 100644 drivers/net/ethernet/stmicro/Makefile
diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
index afc07d4..33fa603 100644
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
@@ -168,7 +168,7 @@ source "drivers/net/ethernet/sis/Kconfig"
source "drivers/net/ethernet/sfc/Kconfig"
source "drivers/net/ethernet/sgi/Kconfig"
source "drivers/net/ethernet/smsc/Kconfig"
-source "drivers/net/ethernet/stmicro/Kconfig"
+source "drivers/net/ethernet/dwc/Kconfig"
source "drivers/net/ethernet/sun/Kconfig"
source "drivers/net/ethernet/tehuti/Kconfig"
source "drivers/net/ethernet/ti/Kconfig"
diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
index e7861a8..fc81d9a 100644
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
@@ -79,7 +79,7 @@ obj-$(CONFIG_SFC) += sfc/
obj-$(CONFIG_SFC_FALCON) += sfc/falcon/
obj-$(CONFIG_NET_VENDOR_SGI) += sgi/
obj-$(CONFIG_NET_VENDOR_SMSC) += smsc/
-obj-$(CONFIG_NET_VENDOR_STMICRO) += stmicro/
+obj-$(CONFIG_NET_VENDOR_STMICRO) += dwc/
obj-$(CONFIG_NET_VENDOR_SUN) += sun/
obj-$(CONFIG_NET_VENDOR_TEHUTI) += tehuti/
obj-$(CONFIG_NET_VENDOR_TI) += ti/
diff --git a/drivers/net/ethernet/stmicro/Kconfig b/drivers/net/ethernet/dwc/Kconfig
similarity index 68%
rename from drivers/net/ethernet/stmicro/Kconfig
rename to drivers/net/ethernet/dwc/Kconfig
index 1c1157d..fe3e630 100644
--- a/drivers/net/ethernet/stmicro/Kconfig
+++ b/drivers/net/ethernet/dwc/Kconfig
@@ -1,5 +1,5 @@
#
-# STMicroelectronics device configuration
+# Designware based device drivers configuration
#
config NET_VENDOR_STMICRO
@@ -7,7 +7,8 @@ config NET_VENDOR_STMICRO
default y
depends on HAS_IOMEM
---help---
- If you have a network (Ethernet) card belonging to this class, say Y.
+ If you have a network (Ethernet) card based on Designware
+ Ethernet 10/100/1G/QoS IPs, say Y.
Note that the answer to this question doesn't directly affect the
kernel: saying N will just cause the configurator to skip all
@@ -16,6 +17,6 @@ config NET_VENDOR_STMICRO
if NET_VENDOR_STMICRO
-source "drivers/net/ethernet/stmicro/stmmac/Kconfig"
+source "drivers/net/ethernet/dwc/stmmac/Kconfig"
endif # NET_VENDOR_STMICRO
diff --git a/drivers/net/ethernet/dwc/Makefile b/drivers/net/ethernet/dwc/Makefile
new file mode 100644
index 0000000..788b1ba
--- /dev/null
+++ b/drivers/net/ethernet/dwc/Makefile
@@ -0,0 +1,5 @@
+#
+# Makefile for the Designware based device drivers.
+#
+
+obj-$(CONFIG_STMMAC_ETH) += stmmac/
diff --git a/drivers/net/ethernet/stmicro/stmmac/Kconfig b/drivers/net/ethernet/dwc/stmmac/Kconfig
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/Kconfig
rename to drivers/net/ethernet/dwc/stmmac/Kconfig
diff --git a/drivers/net/ethernet/stmicro/stmmac/Makefile b/drivers/net/ethernet/dwc/stmmac/Makefile
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/Makefile
rename to drivers/net/ethernet/dwc/stmmac/Makefile
diff --git a/drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c b/drivers/net/ethernet/dwc/stmmac/altr_tse_pcs.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c
rename to drivers/net/ethernet/dwc/stmmac/altr_tse_pcs.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.h b/drivers/net/ethernet/dwc/stmmac/altr_tse_pcs.h
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.h
rename to drivers/net/ethernet/dwc/stmmac/altr_tse_pcs.h
diff --git a/drivers/net/ethernet/stmicro/stmmac/chain_mode.c b/drivers/net/ethernet/dwc/stmmac/chain_mode.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/chain_mode.c
rename to drivers/net/ethernet/dwc/stmmac/chain_mode.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/dwc/stmmac/common.h
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/common.h
rename to drivers/net/ethernet/dwc/stmmac/common.h
diff --git a/drivers/net/ethernet/stmicro/stmmac/descs.h b/drivers/net/ethernet/dwc/stmmac/descs.h
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/descs.h
rename to drivers/net/ethernet/dwc/stmmac/descs.h
diff --git a/drivers/net/ethernet/stmicro/stmmac/descs_com.h b/drivers/net/ethernet/dwc/stmmac/descs_com.h
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/descs_com.h
rename to drivers/net/ethernet/dwc/stmmac/descs_com.h
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c b/drivers/net/ethernet/dwc/stmmac/dwmac-dwc-qos-eth.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac-dwc-qos-eth.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c b/drivers/net/ethernet/dwc/stmmac/dwmac-generic.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac-generic.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c b/drivers/net/ethernet/dwc/stmmac/dwmac-ipq806x.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac-ipq806x.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c b/drivers/net/ethernet/dwc/stmmac/dwmac-lpc18xx.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac-lpc18xx.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c b/drivers/net/ethernet/dwc/stmmac/dwmac-meson.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac-meson.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/dwc/stmmac/dwmac-meson8b.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac-meson8b.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c b/drivers/net/ethernet/dwc/stmmac/dwmac-oxnas.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac-oxnas.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/dwc/stmmac/dwmac-rk.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac-rk.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/dwc/stmmac/dwmac-socfpga.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac-socfpga.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/dwc/stmmac/dwmac-sti.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac-sti.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/dwc/stmmac/dwmac-stm32.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac-stm32.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c b/drivers/net/ethernet/dwc/stmmac/dwmac-sunxi.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac-sunxi.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac100.h b/drivers/net/ethernet/dwc/stmmac/dwmac100.h
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac100.h
rename to drivers/net/ethernet/dwc/stmmac/dwmac100.h
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h b/drivers/net/ethernet/dwc/stmmac/dwmac1000.h
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
rename to drivers/net/ethernet/dwc/stmmac/dwmac1000.h
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c b/drivers/net/ethernet/dwc/stmmac/dwmac1000_core.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac1000_core.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c b/drivers/net/ethernet/dwc/stmmac/dwmac1000_dma.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac1000_dma.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c b/drivers/net/ethernet/dwc/stmmac/dwmac100_core.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac100_core.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c b/drivers/net/ethernet/dwc/stmmac/dwmac100_dma.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac100_dma.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h b/drivers/net/ethernet/dwc/stmmac/dwmac4.h
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac4.h
rename to drivers/net/ethernet/dwc/stmmac/dwmac4.h
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/dwc/stmmac/dwmac4_core.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac4_core.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c b/drivers/net/ethernet/dwc/stmmac/dwmac4_descs.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac4_descs.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.h b/drivers/net/ethernet/dwc/stmmac/dwmac4_descs.h
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.h
rename to drivers/net/ethernet/dwc/stmmac/dwmac4_descs.h
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c b/drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac4_dma.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h b/drivers/net/ethernet/dwc/stmmac/dwmac4_dma.h
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h
rename to drivers/net/ethernet/dwc/stmmac/dwmac4_dma.h
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c b/drivers/net/ethernet/dwc/stmmac/dwmac4_lib.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac4_lib.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h b/drivers/net/ethernet/dwc/stmmac/dwmac_dma.h
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h
rename to drivers/net/ethernet/dwc/stmmac/dwmac_dma.h
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c b/drivers/net/ethernet/dwc/stmmac/dwmac_lib.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c
rename to drivers/net/ethernet/dwc/stmmac/dwmac_lib.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/enh_desc.c b/drivers/net/ethernet/dwc/stmmac/enh_desc.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/enh_desc.c
rename to drivers/net/ethernet/dwc/stmmac/enh_desc.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc.h b/drivers/net/ethernet/dwc/stmmac/mmc.h
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/mmc.h
rename to drivers/net/ethernet/dwc/stmmac/mmc.h
diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/dwc/stmmac/mmc_core.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/mmc_core.c
rename to drivers/net/ethernet/dwc/stmmac/mmc_core.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/norm_desc.c b/drivers/net/ethernet/dwc/stmmac/norm_desc.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/norm_desc.c
rename to drivers/net/ethernet/dwc/stmmac/norm_desc.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/ring_mode.c b/drivers/net/ethernet/dwc/stmmac/ring_mode.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/ring_mode.c
rename to drivers/net/ethernet/dwc/stmmac/ring_mode.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/dwc/stmmac/stmmac.h
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/stmmac.h
rename to drivers/net/ethernet/dwc/stmmac/stmmac.h
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/dwc/stmmac/stmmac_ethtool.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
rename to drivers/net/ethernet/dwc/stmmac/stmmac_ethtool.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c b/drivers/net/ethernet/dwc/stmmac/stmmac_hwtstamp.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
rename to drivers/net/ethernet/dwc/stmmac/stmmac_hwtstamp.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/dwc/stmmac/stmmac_main.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
rename to drivers/net/ethernet/dwc/stmmac/stmmac_main.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/dwc/stmmac/stmmac_mdio.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
rename to drivers/net/ethernet/dwc/stmmac/stmmac_mdio.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/dwc/stmmac/stmmac_pci.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
rename to drivers/net/ethernet/dwc/stmmac/stmmac_pci.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.h b/drivers/net/ethernet/dwc/stmmac/stmmac_pcs.h
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.h
rename to drivers/net/ethernet/dwc/stmmac/stmmac_pcs.h
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/dwc/stmmac/stmmac_platform.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
rename to drivers/net/ethernet/dwc/stmmac/stmmac_platform.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h b/drivers/net/ethernet/dwc/stmmac/stmmac_platform.h
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
rename to drivers/net/ethernet/dwc/stmmac/stmmac_platform.h
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c b/drivers/net/ethernet/dwc/stmmac/stmmac_ptp.c
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
rename to drivers/net/ethernet/dwc/stmmac/stmmac_ptp.c
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h b/drivers/net/ethernet/dwc/stmmac/stmmac_ptp.h
similarity index 100%
rename from drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h
rename to drivers/net/ethernet/dwc/stmmac/stmmac_ptp.h
diff --git a/drivers/net/ethernet/stmicro/Makefile b/drivers/net/ethernet/stmicro/Makefile
deleted file mode 100644
index 9b3bfdd..0000000
--- a/drivers/net/ethernet/stmicro/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# Makefile for the STMicroelectronics device drivers.
-#
-
-obj-$(CONFIG_STMMAC_ETH) += stmmac/
--
2.9.3
^ permalink raw reply related
* Re: [PATCH ipsec-next] xfrm: fix possible null deref in xfrm_init_tempstate
From: Steffen Klassert @ 2017-01-16 13:24 UTC (permalink / raw)
To: Florian Westphal; +Cc: netdev, dan.carpenter
In-Reply-To: <1484315714-4840-1-git-send-email-fw@strlen.de>
On Fri, Jan 13, 2017 at 02:55:14PM +0100, Florian Westphal wrote:
> Dan reports following smatch warning:
> net/xfrm/xfrm_state.c:659
> error: we previously assumed 'afinfo' could be null (see line 651)
>
> 649 struct xfrm_state_afinfo *afinfo = xfrm_state_afinfo_get_rcu(family);
> 651 if (afinfo)
> ...
> 658 }
> 659 afinfo->init_temprop(x, tmpl, daddr, saddr);
>
> I am resonably sure afinfo cannot be NULL here.
>
> xfrm_state4.c and state6.c are both part of ipv4/ipv6 (depends on
> CONFIG_XFRM, a boolean) but even if ipv6 is a module state6.c can't
> be removed (ipv6 lacks module_exit so it cannot be removed).
>
> The only callers for xfrm6_fini that leads to state backend unregister
> are error unwinding paths that can be called during ipv6 init function.
>
> So after ipv6 module is loaded successfully the state backend cannot go
> away anymore.
>
> The family value from policy lookup path is taken from dst_entry, so
> that should always be AF_INET(6).
>
> However, since this silences the warning and avoids readers of this
> code wondering about possible null deref it seems preferrable to
> be defensive and just add the old check back.
>
> Fixes: 711059b9752ad0 ("xfrm: add and use xfrm_state_afinfo_get_rcu")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Florian Westphal <fw@strlen.de>
Applied to ipsec-next, thanks!
^ permalink raw reply
* Re: [PATCH net-next] sctp: remove useless code from sctp_apply_peer_addr_params
From: Neil Horman @ 2017-01-16 13:23 UTC (permalink / raw)
To: Marcelo Ricardo Leitner; +Cc: netdev, linux-sctp, Vlad Yasevich
In-Reply-To: <99bc9f227c4c857d2bb258391231231d46c1899d.1484336556.git.marcelo.leitner@gmail.com>
On Fri, Jan 13, 2017 at 06:31:15PM -0200, Marcelo Ricardo Leitner wrote:
> sctp_frag_point() doesn't store anything, and thus just calling it
> cannot do anything useful.
>
> sctp_apply_peer_addr_params is only called by
> sctp_setsockopt_peer_addr_params. When operating on an asoc,
> sctp_setsockopt_peer_addr_params will call sctp_apply_peer_addr_params
> once for the asoc, and then once for each transport this asoc has,
> meaning that the frag_point will be recomputed when updating the
> transports and calling it when updating the asoc is not necessary.
> IOW, no action is needed here and we can remove this call.
>
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> ---
> net/sctp/socket.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index 318c6786d6539a301ac7b76d82a49a1af3818d10..635e0341269330187c78ba93a35689f5c5d6be02 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -2430,7 +2430,6 @@ static int sctp_apply_peer_addr_params(struct sctp_paddrparams *params,
> sctp_assoc_sync_pmtu(sctp_opt2sk(sp), asoc);
> } else if (asoc) {
> asoc->pathmtu = params->spp_pathmtu;
> - sctp_frag_point(asoc, params->spp_pathmtu);
> } else {
> sp->pathmtu = params->spp_pathmtu;
> }
> --
> 2.9.3
>
>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply
* [PATCH] cpmac: remove hopeless #warning
From: Arnd Bergmann @ 2017-01-16 13:20 UTC (permalink / raw)
To: Florian Fainelli
Cc: Arnd Bergmann, David S. Miller, Philippe Reynes, netdev,
linux-kernel
The #warning was present 10 years ago when the driver first got merged.
As the platform is rather obsolete by now, it seems very unlikely that
the warning will cause anyone to fix the code properly.
kernelci.org reports the warning for every build in the meantime, so
I think it's better to just turn it into a code comment to reduce
noise.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/ethernet/ti/cpmac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c
index 77c88fcf2b86..9b8a30bf939b 100644
--- a/drivers/net/ethernet/ti/cpmac.c
+++ b/drivers/net/ethernet/ti/cpmac.c
@@ -1210,7 +1210,7 @@ int cpmac_init(void)
goto fail_alloc;
}
-#warning FIXME: unhardcode gpio&reset bits
+ /* FIXME: unhardcode gpio&reset bits */
ar7_gpio_disable(26);
ar7_gpio_disable(27);
ar7_device_reset(AR7_RESET_BIT_CPMAC_LO);
--
2.9.0
^ permalink raw reply related
* Re: [PATCH net-next] sctp: remove unused var from sctp_process_asconf
From: Neil Horman @ 2017-01-16 13:13 UTC (permalink / raw)
To: Marcelo Ricardo Leitner; +Cc: netdev, linux-sctp, Vlad Yasevich
In-Reply-To: <5da2cda90a7489b22ae98703d7543c5316bae375.1484336552.git.marcelo.leitner@gmail.com>
On Fri, Jan 13, 2017 at 06:27:33PM -0200, Marcelo Ricardo Leitner wrote:
> Assigned but not used.
>
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> ---
> net/sctp/sm_make_chunk.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
> index a15d824a313d310ed03ba77055d22b1c7c9d0662..80a9088084ac0d1116bf983fad9a0cdfddeefe44 100644
> --- a/net/sctp/sm_make_chunk.c
> +++ b/net/sctp/sm_make_chunk.c
> @@ -3210,7 +3210,6 @@ struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc,
> union sctp_params param;
> sctp_addiphdr_t *hdr;
> union sctp_addr_param *addr_param;
> - sctp_addip_param_t *asconf_param;
> struct sctp_chunk *asconf_ack;
> __be16 err_code;
> int length = 0;
> @@ -3230,7 +3229,6 @@ struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc,
> * asconf parameter.
> */
> length = ntohs(addr_param->p.length);
> - asconf_param = (void *)addr_param + length;
> chunk_len -= length;
>
> /* create an ASCONF_ACK chunk.
> --
> 2.9.3
>
>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply
* Re: [PATCH net v3] ravb: do not use zero-length alignment DMA descriptor
From: Sergei Shtylyov @ 2017-01-16 13:01 UTC (permalink / raw)
To: Simon Horman, David Miller
Cc: Magnus Damm, netdev, linux-renesas-soc, Masaru Nagai
In-Reply-To: <1484563521-12009-1-git-send-email-horms+renesas@verge.net.au>
On 01/16/2017 01:45 PM, Simon Horman wrote:
> From: Masaru Nagai <masaru.nagai.vx@renesas.com>
>
> Due to alignment requirements of the hardware transmissions are split into
> two DMA descriptors, a small padding descriptor of 0 - 3 bytes in length
> followed by a descriptor for rest of the packet.
>
> In the case of IP packets the first descriptor will never be zero due to
> the way that the stack aligns buffers for IP packets. However, for non-IP
> packets it may be zero.
>
> In that case it has been reported that timeouts occur, presumably because
> transmission stops at the first zero-length DMA descriptor and thus the
> packet is not transmitted. However, in my environment a BUG is triggered as
> follows:
[...]
> Fixes: 2f45d1902acf ("ravb: minimize TX data copying")
> Signed-off-by: Masaru Nagai <masaru.nagai.vx@renesas.com
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
MBR, Sergei
^ permalink raw reply
* Re: [PATCH] net: add regs attribute to phy device for user diagnose
From: yuan linyu @ 2017-01-16 12:59 UTC (permalink / raw)
To: Andrew Lunn; +Cc: Florian Fainelli, David S . Miller, netdev, yuan linyu
In-Reply-To: <20170115172150.GC5643@lunn.ch>
On 日, 2017-01-15 at 18:21 +0100, Andrew Lunn wrote:
> On Sun, Jan 15, 2017 at 09:51:03AM +0800, yuan linyu wrote:
> >
> > I hope user/developer can read this attribute file "regs" to do
> > a full check of all registers value, and they can write any register
> > inside PHY through this file.
> Since this is intended for debug, it should not be sysfs, but debugfs.
agree,
> However, in general, Linux does not allow user space to peek and poke
> device registers. Can you point me at examples where i can do the same
> to my GPU? SATA controller? Ethernet controller, I2C temperature
> sensor? Any device?
we can read registers of ethernet controller(memory register accessed) through devmem or ethtool
>
> Andrew
>
^ permalink raw reply
* [PATCH ipsec-next v3 2/2] IPsec: do not ignore crypto err in ah6 input
From: Gilad Ben-Yossef @ 2017-01-16 11:17 UTC (permalink / raw)
To: steffen.klassert, herbert, davem, netdev; +Cc: ofir.drang, gilad.benyossef
In-Reply-To: <1484565476-19371-1-git-send-email-gilad@benyossef.com>
ah6 input processing uses the asynchronous hash crypto API which
supplies an error code as part of the operation completion but
the error code was being ignored.
Treat a crypto API error indication as a verification failure.
While a crypto API reported error would almost certainly result
in a memcpy of the digest failing anyway and thus the security
risk seems minor, performing a memory compare on what might be
uninitialized memory is wrong.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
---
net/ipv6/ah6.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index 189eb10..dda6035 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -474,6 +474,9 @@ static void ah6_input_done(struct crypto_async_request *base, int err)
int hdr_len = skb_network_header_len(skb);
int ah_hlen = (ah->hdrlen + 2) << 2;
+ if (err)
+ goto out;
+
work_iph = AH_SKB_CB(skb)->tmp;
auth_data = ah_tmp_auth(work_iph, hdr_len);
icv = ah_tmp_icv(ahp->ahash, auth_data, ahp->icv_trunc_len);
--
2.1.4
^ permalink raw reply related
* [PATCH ipsec-next v3 1/2] IPsec: do not ignore crypto err in ah4 input
From: Gilad Ben-Yossef @ 2017-01-16 11:17 UTC (permalink / raw)
To: steffen.klassert, herbert, davem, netdev; +Cc: ofir.drang, gilad.benyossef
In-Reply-To: <1484565476-19371-1-git-send-email-gilad@benyossef.com>
ah4 input processing uses the asynchronous hash crypto API which
supplies an error code as part of the operation completion but
the error code was being ignored.
Treat a crypto API error indication as a verification failure.
While a crypto API reported error would almost certainly result
in a memcpy of the digest failing anyway and thus the security
risk seems minor, performing a memory compare on what might be
uninitialized memory is wrong.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
---
net/ipv4/ah4.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c
index f2a7102..22377c8 100644
--- a/net/ipv4/ah4.c
+++ b/net/ipv4/ah4.c
@@ -270,6 +270,9 @@ static void ah_input_done(struct crypto_async_request *base, int err)
int ihl = ip_hdrlen(skb);
int ah_hlen = (ah->hdrlen + 2) << 2;
+ if (err)
+ goto out;
+
work_iph = AH_SKB_CB(skb)->tmp;
auth_data = ah_tmp_auth(work_iph, ihl);
icv = ah_tmp_icv(ahp->ahash, auth_data, ahp->icv_trunc_len);
--
2.1.4
^ permalink raw reply related
* [PATCH ipsec-next v3 0/2] IPsec: do not ignore crypto err in ah input
From: Gilad Ben-Yossef @ 2017-01-16 11:17 UTC (permalink / raw)
To: steffen.klassert, herbert, davem, netdev
Cc: ofir.drang, gilad.benyossef, Alexander Alemayhu
ah input processing uses the asynchronous hash crypto API which
supplies an error code as part of the operation completion but
the error code was being ignored.
Treat a crypto API error indication as a verification failure.
While a crypto API reported error would almost certainly result
in a memcpy of the digest failing anyway and thus the security
risk seems minor, performing a memory compare on what might be
uninitialized memory is wrong.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
CC: Alexander Alemayhu <alexander@alemayhu.com>
---
The change was boot tested on Arm64 but I did not exercise
the specific error code path in question.
Changes from v2:
- Added fix for same problem in IPv6 pointed out by Steffen Klassert
Changes from v1:
- Fixed typo in patch description pointed out by Alexander
Gilad Ben-Yossef (2):
IPsec: do not ignore crypto err in ah4 input
IPsec: do not ignore crypto err in ah6 input
net/ipv4/ah4.c | 3 +++
net/ipv6/ah6.c | 3 +++
2 files changed, 6 insertions(+)
--
2.1.4
^ permalink raw reply
* [PATCH net v3] ravb: do not use zero-length alignment DMA descriptor
From: Simon Horman @ 2017-01-16 10:45 UTC (permalink / raw)
To: David Miller, Sergei Shtylyov
Cc: Magnus Damm, netdev, linux-renesas-soc, Masaru Nagai,
Simon Horman
From: Masaru Nagai <masaru.nagai.vx@renesas.com>
Due to alignment requirements of the hardware transmissions are split into
two DMA descriptors, a small padding descriptor of 0 - 3 bytes in length
followed by a descriptor for rest of the packet.
In the case of IP packets the first descriptor will never be zero due to
the way that the stack aligns buffers for IP packets. However, for non-IP
packets it may be zero.
In that case it has been reported that timeouts occur, presumably because
transmission stops at the first zero-length DMA descriptor and thus the
packet is not transmitted. However, in my environment a BUG is triggered as
follows:
[ 20.381417] ------------[ cut here ]------------
[ 20.386054] kernel BUG at lib/swiotlb.c:495!
[ 20.390324] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[ 20.395805] Modules linked in:
[ 20.398862] CPU: 0 PID: 2089 Comm: mz Not tainted 4.10.0-rc3-00001-gf13ad2db193f #162
[ 20.406689] Hardware name: Renesas Salvator-X board based on r8a7796 (DT)
[ 20.413474] task: ffff80063b1f1900 task.stack: ffff80063a71c000
[ 20.419404] PC is at swiotlb_tbl_map_single+0x178/0x2ec
[ 20.424625] LR is at map_single+0x4c/0x98
[ 20.428629] pc : [<ffff00000839c4c0>] lr : [<ffff00000839c680>] pstate: 800001c5
[ 20.436019] sp : ffff80063a71f9b0
[ 20.439327] x29: ffff80063a71f9b0 x28: ffff80063a20d500
[ 20.444636] x27: ffff000008ed5000 x26: 0000000000000000
[ 20.449944] x25: 000000067abe2adc x24: 0000000000000000
[ 20.455252] x23: 0000000000200000 x22: 0000000000000001
[ 20.460559] x21: 0000000000175ffe x20: ffff80063b2a0010
[ 20.465866] x19: 0000000000000000 x18: 0000ffffcae6fb20
[ 20.471173] x17: 0000ffffa09ba018 x16: ffff0000087c8b70
[ 20.476480] x15: 0000ffffa084f588 x14: 0000ffffa09cfa14
[ 20.481787] x13: 0000ffffcae87ff0 x12: 000000000063abe2
[ 20.487098] x11: ffff000008096360 x10: ffff80063abe2adc
[ 20.492407] x9 : 0000000000000000 x8 : 0000000000000000
[ 20.497718] x7 : 0000000000000000 x6 : ffff000008ed50d0
[ 20.503028] x5 : 0000000000000000 x4 : 0000000000000001
[ 20.508338] x3 : 0000000000000000 x2 : 000000067abe2adc
[ 20.513648] x1 : 00000000bafff000 x0 : 0000000000000000
[ 20.518958]
[ 20.520446] Process mz (pid: 2089, stack limit = 0xffff80063a71c000)
[ 20.526798] Stack: (0xffff80063a71f9b0 to 0xffff80063a720000)
[ 20.532543] f9a0: ffff80063a71fa30 ffff00000839c680
[ 20.540374] f9c0: ffff80063b2a0010 ffff80063b2a0010 0000000000000001 0000000000000000
[ 20.548204] f9e0: 000000000000006e ffff80063b23c000 ffff80063b23c000 0000000000000000
[ 20.556034] fa00: ffff80063b23c000 ffff80063a20d500 000000013b1f1900 0000000000000000
[ 20.563864] fa20: ffff80063ffd18e0 ffff80063b2a0010 ffff80063a71fa60 ffff00000839cd10
[ 20.571694] fa40: ffff80063b2a0010 0000000000000000 ffff80063ffd18e0 000000067abe2adc
[ 20.579524] fa60: ffff80063a71fa90 ffff000008096380 ffff80063b2a0010 0000000000000000
[ 20.587353] fa80: 0000000000000000 0000000000000001 ffff80063a71fac0 ffff00000864f770
[ 20.595184] faa0: ffff80063b23caf0 0000000000000000 0000000000000000 0000000000000140
[ 20.603014] fac0: ffff80063a71fb60 ffff0000087e6498 ffff80063a20d500 ffff80063b23c000
[ 20.610843] fae0: 0000000000000000 ffff000008daeaf0 0000000000000000 ffff000008daeb00
[ 20.618673] fb00: ffff80063a71fc0c ffff000008da7000 ffff80063b23c090 ffff80063a44f000
[ 20.626503] fb20: 0000000000000000 ffff000008daeb00 ffff80063a71fc0c ffff000008da7000
[ 20.634333] fb40: ffff80063b23c090 0000000000000000 ffff800600000037 ffff0000087e63d8
[ 20.642163] fb60: ffff80063a71fbc0 ffff000008807510 ffff80063a692400 ffff80063a20d500
[ 20.649993] fb80: ffff80063a44f000 ffff80063b23c000 ffff80063a69249c 0000000000000000
[ 20.657823] fba0: 0000000000000000 ffff80063a087800 ffff80063b23c000 ffff80063a20d500
[ 20.665653] fbc0: ffff80063a71fc10 ffff0000087e67dc ffff80063a20d500 ffff80063a692400
[ 20.673483] fbe0: ffff80063b23c000 0000000000000000 ffff80063a44f000 ffff80063a69249c
[ 20.681312] fc00: ffff80063a5f1a10 000000103a087800 ffff80063a71fc70 ffff0000087e6b24
[ 20.689142] fc20: ffff80063a5f1a80 ffff80063a71fde8 000000000000000f 00000000000005ea
[ 20.696972] fc40: ffff80063a5f1a10 0000000000000000 000000000000000f ffff00000887fbd0
[ 20.704802] fc60: fffffff43a5f1a80 0000000000000000 ffff80063a71fc80 ffff000008880240
[ 20.712632] fc80: ffff80063a71fd90 ffff0000087c7a34 ffff80063afc7180 0000000000000000
[ 20.720462] fca0: 0000ffffcae6fe18 0000000000000014 0000000060000000 0000000000000015
[ 20.728292] fcc0: 0000000000000123 00000000000000ce ffff0000088d2000 ffff80063b1f1900
[ 20.736122] fce0: 0000000000008933 ffff000008e7cb80 ffff80063a71fd80 ffff0000087c50a4
[ 20.743951] fd00: 0000000000008933 ffff000008e7cb80 ffff000008e7cb80 000000100000000e
[ 20.751781] fd20: ffff80063a71fe4c 0000ffff00000300 0000000000000123 0000000000000000
[ 20.759611] fd40: 0000000000000000 ffff80063b1f0000 000000000000000e 0000000000000300
[ 20.767441] fd60: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 20.775271] fd80: 0000000000000000 0000000000000000 ffff80063a71fda0 ffff0000087c8c20
[ 20.783100] fda0: 0000000000000000 ffff000008082f30 0000000000000000 0000800637260000
[ 20.790930] fdc0: ffffffffffffffff 0000ffffa0903078 0000000000000000 000000001ea87232
[ 20.798760] fde0: 000000000000000f ffff80063a71fe40 ffff800600000014 ffff000000000001
[ 20.806590] fe00: 0000000000000000 0000000000000000 ffff80063a71fde8 0000000000000000
[ 20.814420] fe20: 0000000000000000 0000000000000000 0000000000000000 0000000000000001
[ 20.822249] fe40: 0000000203000011 0000000000000000 0000000000000000 ffff80063a68aa00
[ 20.830079] fe60: ffff80063a68aa00 0000000000000003 0000000000008933 ffff0000081f1b9c
[ 20.837909] fe80: 0000000000000000 ffff000008082f30 0000000000000000 0000800637260000
[ 20.845739] fea0: ffffffffffffffff 0000ffffa07ca81c 0000000060000000 0000000000000015
[ 20.853569] fec0: 0000000000000003 000000001ea87232 000000000000000f 0000000000000000
[ 20.861399] fee0: 0000ffffcae6fe18 0000000000000014 0000000000000300 0000000000000000
[ 20.869228] ff00: 00000000000000ce 0000000000000000 00000000ffffffff 0000000000000000
[ 20.877059] ff20: 0000000000000002 0000ffffcae87ff0 0000ffffa09cfa14 0000ffffa084f588
[ 20.884888] ff40: 0000000000000000 0000ffffa09ba018 0000ffffcae6fb20 000000001ea87010
[ 20.892718] ff60: 0000ffffa09b9000 0000ffffcae6fe30 0000ffffcae6fe18 000000000000000f
[ 20.900548] ff80: 0000000000000003 000000001ea87232 0000000000000000 0000000000000000
[ 20.908378] ffa0: 0000000000000000 0000ffffcae6fdc0 0000ffffa09a7824 0000ffffcae6fdc0
[ 20.916208] ffc0: 0000ffffa0903078 0000000060000000 0000000000000003 00000000000000ce
[ 20.924038] ffe0: 0000000000000000 0000000000000000 ffffffffffffffff ffffffffffffffff
[ 20.931867] Call trace:
[ 20.934312] Exception stack(0xffff80063a71f7e0 to 0xffff80063a71f910)
[ 20.940750] f7e0: 0000000000000000 0001000000000000 ffff80063a71f9b0 ffff00000839c4c0
[ 20.948580] f800: ffff80063a71f840 ffff00000888a6e4 ffff80063a24c418 ffff80063a24c448
[ 20.956410] f820: 0000000000000000 ffff00000811cd54 ffff80063a71f860 ffff80063a24c458
[ 20.964240] f840: ffff80063a71f870 ffff00000888b258 ffff80063a24c418 0000000000000001
[ 20.972070] f860: ffff80063a71f910 ffff80063a7b7028 ffff80063a71f890 ffff0000088825e4
[ 20.979899] f880: 0000000000000000 00000000bafff000 000000067abe2adc 0000000000000000
[ 20.987729] f8a0: 0000000000000001 0000000000000000 ffff000008ed50d0 0000000000000000
[ 20.995560] f8c0: 0000000000000000 0000000000000000 ffff80063abe2adc ffff000008096360
[ 21.003390] f8e0: 000000000063abe2 0000ffffcae87ff0 0000ffffa09cfa14 0000ffffa084f588
[ 21.011219] f900: ffff0000087c8b70 0000ffffa09ba018
[ 21.016097] [<ffff00000839c4c0>] swiotlb_tbl_map_single+0x178/0x2ec
[ 21.022362] [<ffff00000839c680>] map_single+0x4c/0x98
[ 21.027411] [<ffff00000839cd10>] swiotlb_map_page+0xa4/0x138
[ 21.033072] [<ffff000008096380>] __swiotlb_map_page+0x20/0x7c
[ 21.038821] [<ffff00000864f770>] ravb_start_xmit+0x174/0x668
[ 21.044484] [<ffff0000087e6498>] dev_hard_start_xmit+0x8c/0x120
[ 21.050407] [<ffff000008807510>] sch_direct_xmit+0x108/0x1a0
[ 21.056064] [<ffff0000087e67dc>] __dev_queue_xmit+0x194/0x4cc
[ 21.061807] [<ffff0000087e6b24>] dev_queue_xmit+0x10/0x18
[ 21.067214] [<ffff000008880240>] packet_sendmsg+0xf40/0x1220
[ 21.072873] [<ffff0000087c7a34>] sock_sendmsg+0x18/0x2c
[ 21.078097] [<ffff0000087c8c20>] SyS_sendto+0xb0/0xf0
[ 21.083150] [<ffff000008082f30>] el0_svc_naked+0x24/0x28
[ 21.088462] Code: d34bfef7 2a1803f3 1a9f86d6 35fff878 (d4210000)
[ 21.094611] ---[ end trace 5bc544ad491f3814 ]---
[ 21.099234] Kernel panic - not syncing: Fatal exception in interrupt
[ 21.105587] Kernel Offset: disabled
[ 21.109073] Memory Limit: none
[ 21.112126] ---[ end Kernel panic - not syncing: Fatal exception in interrupt
Fixes: 2f45d1902acf ("ravb: minimize TX data copying")
Signed-off-by: Masaru Nagai <masaru.nagai.vx@renesas.com
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
v3 [Simon Horman]
* changelog and comment enhancements
v2 [Simon Horman]
* don't handle skb->len < 4; it is always at least 60
* add comment
* dropped RFC designation
v1 [Simon Horman]
* rewrote changelog
* handle skb->len < 4
v0 [Masaru Nagai]
---
drivers/net/ethernet/renesas/ravb_main.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index 5e5ad978eab9..89ac1e3f6175 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -1504,6 +1504,19 @@ static netdev_tx_t ravb_start_xmit(struct sk_buff *skb, struct net_device *ndev)
buffer = PTR_ALIGN(priv->tx_align[q], DPTR_ALIGN) +
entry / NUM_TX_DESC * DPTR_ALIGN;
len = PTR_ALIGN(skb->data, DPTR_ALIGN) - skb->data;
+ /* Zero length DMA descriptors are problematic as they seem to
+ * terminate DMA transfers. Avoid them by simply using a length of
+ * DPTR_ALIGN (4) when skb data is aligned to DPTR_ALIGN.
+ *
+ * As skb is guaranteed to have at least ETH_ZLEN (60) bytes of
+ * data by the call to skb_put_padto() above this is safe with
+ * respect to both the length of the first DMA descriptor (len)
+ * overflowing the available data and the length of the second DMA
+ * descriptor (skb->len - len) being negative.
+ */
+ if (len == 0)
+ len = DPTR_ALIGN;
+
memcpy(buffer, skb->data, len);
dma_addr = dma_map_single(ndev->dev.parent, buffer, len, DMA_TO_DEVICE);
if (dma_mapping_error(ndev->dev.parent, dma_addr))
--
2.7.0.rc3.207.g0ac5344
^ permalink raw reply related
* Re: [PATCH net-next 2/2] mpls: Packet stats
From: Robert Shearman @ 2017-01-16 10:30 UTC (permalink / raw)
To: kbuild test robot; +Cc: kbuild-all, davem, netdev, roopa, David Ahern, ebiederm
In-Reply-To: <201701141417.rz8yuy5o%fengguang.wu@intel.com>
On 14/01/17 06:41, kbuild test robot wrote:
> Hi Robert,
>
> [auto build test ERROR on net-next/master]
>
> url: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_0day-2Dci_linux_commits_Robert-2DShearman_net-2DAF-2Dspecific-2DRTM-5FGETSTATS-2Dattributes_20170114-2D095819&d=DwIBAg&c=IL_XqQWOjubgfqINi2jTzg&r=HbzsGgI7IidV3zRVGbZOYKAd0w1ch0IRBV2pqme4k9w&m=-FIZAjvyj_cLBHBTW14fNKp5IiJpkr1laQrxgxKnZ3g&s=_d4vequnI_QXJkUb0X3X8AUHdi6qD4R86g-mTBsEJ7g&e=
> config: x86_64-randconfig-u0-01141334 (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> All error/warnings (new ones prefixed by >>):
>
> In file included from include/net/netns/mib.h:4:0,
> from include/net/net_namespace.h:14,
> from include/linux/netdevice.h:43,
> from include/uapi/linux/if_arp.h:26,
> from include/linux/if_arp.h:27,
> from net/mpls/af_mpls.c:7:
> net/mpls/af_mpls.c: In function 'mpls_stats_inc_outucastpkts':
>>> include/net/ipv6.h:163:35: error: 'struct netns_mib' has no member named 'ipv6_statistics'; did you mean 'ip_statistics'?
> mod##SNMP_UPD_PO_STATS((net)->mib.statname##_statistics, field, (val));\
Good catch kbuild test robot.
Expect to see a v2 shortly with this CONFIG_IPV6=n build failure fixed.
Thanks,
Rob
^ permalink raw reply
* [PATCH] net/irda: fix lockdep annotation
From: Dmitry Vyukov @ 2017-01-16 10:25 UTC (permalink / raw)
To: davej, samuel, davem; +Cc: glider, andreyknvl, Dmitry Vyukov, netdev
The current annotation uses a global variable as recursion counter.
The variable is not atomic nor protected with a mutex, but mutated
by multiple threads. This causes lockdep bug reports episodically:
BUG: looking up invalid subclass: 4294967295
...
_raw_spin_lock_irqsave_nested+0x120/0x180
hashbin_delete+0x4fe/0x750
__irias_delete_object+0xab/0x170
irias_delete_object+0x5f/0xc0
ircomm_tty_detach_cable+0x1d5/0x3f0
...
Make the hashbin_lock_depth variable atomic to prevent bug reports.
Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Dave Jones <davej@redhat.com>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Fixes: c7630a4b932af ("[IrDA]: irda lockdep annotation")
---
net/irda/irqueue.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/net/irda/irqueue.c b/net/irda/irqueue.c
index acbe61c7e683..b9fd74e6ca99 100644
--- a/net/irda/irqueue.c
+++ b/net/irda/irqueue.c
@@ -384,21 +384,23 @@ EXPORT_SYMBOL(hashbin_new);
* just supply kfree, which should take care of the job.
*/
#ifdef CONFIG_LOCKDEP
-static int hashbin_lock_depth = 0;
+static atomic_t hashbin_lock_depth = ATOMIC_INIT(0);
#endif
int hashbin_delete( hashbin_t* hashbin, FREE_FUNC free_func)
{
irda_queue_t* queue;
unsigned long flags = 0;
- int i;
+ int i, depth = 0;
IRDA_ASSERT(hashbin != NULL, return -1;);
IRDA_ASSERT(hashbin->magic == HB_MAGIC, return -1;);
/* Synchronize */
if ( hashbin->hb_type & HB_LOCK ) {
- spin_lock_irqsave_nested(&hashbin->hb_spinlock, flags,
- hashbin_lock_depth++);
+#ifdef CONFIG_LOCKDEP
+ depth = atomic_inc_return(&hashbin_lock_depth) - 1;
+#endif
+ spin_lock_irqsave_nested(&hashbin->hb_spinlock, flags, depth);
}
/*
@@ -423,7 +425,7 @@ int hashbin_delete( hashbin_t* hashbin, FREE_FUNC free_func)
if ( hashbin->hb_type & HB_LOCK) {
spin_unlock_irqrestore(&hashbin->hb_spinlock, flags);
#ifdef CONFIG_LOCKDEP
- hashbin_lock_depth--;
+ atomic_dec(&hashbin_lock_depth);
#endif
}
--
2.11.0.483.g087da7b7c-goog
^ permalink raw reply related
* Re: [PATCH net-next] net/sched: cls_flower: Add user specified data
From: Jiri Pirko @ 2017-01-16 9:51 UTC (permalink / raw)
To: Paul Blakey
Cc: John Fastabend, Jamal Hadi Salim, David S. Miller, netdev,
Jiri Pirko, Hadar Hen Zion, Or Gerlitz, Roi Dayan, Roman Mashak
In-Reply-To: <11bcf09a-0144-fd7f-369b-771962475c5e@mellanox.com>
Mon, Jan 16, 2017 at 08:54:18AM CET, paulb@mellanox.com wrote:
>
>
>On 15/01/2017 21:08, John Fastabend wrote:
>> On 17-01-15 09:36 AM, Paul Blakey wrote:
>> >
>> >
>> > On 08/01/2017 19:12, Jiri Pirko wrote:
>> > > Mon, Jan 02, 2017 at 03:59:49PM CET, jhs@mojatatu.com wrote:
>> > > >
>> > > > We have been using a cookie as well for actions (which we have been
>> > > > using but have been too lazy to submit so far). I am going to port
>> > > > it over to the newer kernels and post it.
>> > >
>> > > Hard to deal with something we can't look at :)
>> > >
>> > >
>> > > > In our case that is intended to be opaque to the kernel i.e kernel
>> > > > never inteprets it; in that case it is similar to the kernel
>> > > > FIB protocol field.
>> > >
>> > > In case of this patch, kernel also never interprets it. What makes you
>> > > think otherwise. Bot kernel, it is always a binary blob.
>> > >
>> > >
>> > > >
>> > > > In your case - could this cookie have been a class/flowid
>> > > > (a 32 bit)?
>> > > > And would it not make more sense for it the cookie to be
>> > > > generic to all classifiers? i.e why is it specific to flower?
>> > >
>> > > Correct, makes sense to have it generic for all cls and perhaps also
>> > > acts.
>> > >
>> > >
>> >
>> > Hi all,
>> > I've started implementing a general cookie for all classifiers,
>> > I added the cookie on tcf_proto struct but then I realized that it won't work as
>> > I want. What I want is cookie per internal element (those that are identified by
>> > handles), which we can have many per one tcf_proto:
>> >
>> > tc filter add dev <DEV> parent ffff: prio 1 cookie 0x123 basic action drop
>> > tc filter add dev <DEV> parent ffff: prio 1 cookie 0x456 "port6" basic action drop
>> > tc filter add dev <DEV> parent ffff: prio 1 cookie 0x777 basic action drop
>> >
>> > So there is three options to do that:
>> > 1) Implement it in each classifier, using some generic function. (kinda like
>> > stats, where classifiler_dump() calls tcf_exts_dump_stats())
>> > 2) Have a global hash table for cookies [prio,handle]->[cookie]
>> > 3) Have it on flower only for now :)
>> >
>> > With the first one we will have to change each classifier (or leave it
>> > unsupported as default).
>> > Second is less code to change (instead of changing each classifier), but might
>> > be slower. I'm afraid how it will affect dumping several filters.
>> > Third is this patch.
>> >
>> > Thanks,
>> > Paul.
>>
>> Avoid (2) it creates way more problems than its worth like is it locked/not
>> locked, how is it synced, collisions, etc. Seems way overkill.
+1
>>
>> I like the generic functionality of (1) but unless we see this pop up in
>> different filters I wouldn't require it for now. If you just do it in flower
>> (option 3) when its added to another classifier we can generalize it. As a
>> middle ground creating nice helper routines as needed goes a long way.
>>
>> .John
>>
>
>Hi all,
>So is everyone ok with leaving the commit as is, only adding user data
>to flower for now?
I think we should do it in a generic way, for every classifier, right
away. Same as Jamal is doing for actions. I think that first we should
get Jamal's patch merged and then do the same for classifiers.
^ permalink raw reply
* Re: [patch net-next] stmmac: indent an if statement
From: Dan Carpenter @ 2017-01-16 9:39 UTC (permalink / raw)
To: David Miller
Cc: peppe.cavallaro, Joao.Pinto, alexandre.torgue, netdev,
linux-kernel, kernel-janitors
In-Reply-To: <20170116091924.GA4104@mwanda>
On Mon, Jan 16, 2017 at 12:19:24PM +0300, Dan Carpenter wrote:
> On Sun, Jan 15, 2017 at 10:14:38PM -0500, David Miller wrote:
> > From: Dan Carpenter <dan.carpenter@oracle.com>
> > Date: Thu, 12 Jan 2017 21:46:32 +0300
> >
> > > The break statement should be indented one more tab.
> > >
> > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > Applied, but like Julia I think we might have a missing of_node_put()
> > here.
>
> Of course, sorry for dropping the ball on this. I'll send a patch for
> that.
>
Actually, I've looked at it some more and I think this function is OK.
We're supposed to do an of_node_put() later... I can't find where that
happens, but presumably that's because I don't know stmmac well. This
code here, though, is fine.
regards,
dan carpenter
^ permalink raw reply
* Re: [PATCH] sfc: Replace memset with eth_zero_addr
From: Edward Cree @ 2017-01-16 9:35 UTC (permalink / raw)
To: Shyam Saini; +Cc: bkenward, netdev, linux-net-drivers
In-Reply-To: <1484538981-24591-1-git-send-email-mayhs11saini@gmail.com>
On 16/01/17 03:56, Shyam Saini wrote:
> Use eth_zero_addr to assign zero address to the given address array
> instead of memset when the second argument in memset is address
> of zero which makes the code clearer and also add header
> file linux/etherdevice.h
>
> Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
> ---
Acked-by: Edward Cree <ecree@solarflare.com>
> drivers/net/ethernet/sfc/ef10_sriov.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/sfc/ef10_sriov.c b/drivers/net/ethernet/sfc/ef10_sriov.c
> index a949b9d..228806c 100644
> --- a/drivers/net/ethernet/sfc/ef10_sriov.c
> +++ b/drivers/net/ethernet/sfc/ef10_sriov.c
> @@ -6,6 +6,7 @@
> * under the terms of the GNU General Public License version 2 as published
> * by the Free Software Foundation, incorporated herein by reference.
> */
> +#include <linux/etherdevice.h>
> #include <linux/pci.h>
> #include <linux/module.h>
> #include "net_driver.h"
> @@ -554,7 +555,7 @@ int efx_ef10_sriov_set_vf_mac(struct efx_nic *efx, int vf_i, u8 *mac)
> return 0;
>
> fail:
> - memset(vf->mac, 0, ETH_ALEN);
> + eth_zero_addr(vf->mac);
> return rc;
> }
>
^ permalink raw reply
* Re: fs, net: deadlock between bind/splice on af_unix
From: Dmitry Vyukov @ 2017-01-16 9:32 UTC (permalink / raw)
To: Al Viro
Cc: Cong Wang, linux-fsdevel@vger.kernel.org, LKML, David Miller,
Rainer Weikusat, Hannes Frederic Sowa, netdev, Eric Dumazet,
syzkaller
In-Reply-To: <20161209064144.GZ1555@ZenIV.linux.org.uk>
On Fri, Dec 9, 2016 at 7:41 AM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> On Thu, Dec 08, 2016 at 10:32:00PM -0800, Cong Wang wrote:
>
>> > Why do we do autobind there, anyway, and why is it conditional on
>> > SOCK_PASSCRED? Note that e.g. for SOCK_STREAM we can bloody well get
>> > to sending stuff without autobind ever done - just use socketpair()
>> > to create that sucker and we won't be going through the connect()
>> > at all.
>>
>> In the case Dmitry reported, unix_dgram_sendmsg() calls unix_autobind(),
>> not SOCK_STREAM.
>
> Yes, I've noticed. What I'm asking is what in there needs autobind triggered
> on sendmsg and why doesn't the same need affect the SOCK_STREAM case?
>
>> I guess some lock, perhaps the u->bindlock could be dropped before
>> acquiring the next one (sb_writer), but I need to double check.
>
> Bad idea, IMO - do you *want* autobind being able to come through while
> bind(2) is busy with mknod?
Ping. This is still happening on HEAD.
[ INFO: possible circular locking dependency detected ]
4.9.0 #1 Not tainted
-------------------------------------------------------
syz-executor6/25491 is trying to acquire lock:
(&u->bindlock){+.+.+.}, at: [<ffffffff83962315>]
unix_autobind.isra.28+0xc5/0x880 net/unix/af_unix.c:852
but task is already holding lock:
(&pipe->mutex/1){+.+.+.}, at: [<ffffffff81a45ac6>] pipe_lock_nested
fs/pipe.c:66 [inline]
(&pipe->mutex/1){+.+.+.}, at: [<ffffffff81a45ac6>]
pipe_lock+0x56/0x70 fs/pipe.c:74
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
[ 836.500536] [<ffffffff8156f989>] validate_chain
kernel/locking/lockdep.c:2265 [inline]
[ 836.500536] [<ffffffff8156f989>]
__lock_acquire+0x2149/0x3430 kernel/locking/lockdep.c:3338
[ 836.508456] [<ffffffff81571b11>] lock_acquire+0x2a1/0x630
kernel/locking/lockdep.c:3753
[ 836.516117] [<ffffffff8435f9be>] __mutex_lock_common
kernel/locking/mutex.c:521 [inline]
[ 836.516117] [<ffffffff8435f9be>]
mutex_lock_nested+0x24e/0xff0 kernel/locking/mutex.c:621
[ 836.524139] [<ffffffff81a45ac6>] pipe_lock_nested
fs/pipe.c:66 [inline]
[ 836.524139] [<ffffffff81a45ac6>] pipe_lock+0x56/0x70 fs/pipe.c:74
[ 836.531287] [<ffffffff81af63d2>]
iter_file_splice_write+0x262/0xf80 fs/splice.c:717
[ 836.539720] [<ffffffff81af84e0>] do_splice_from
fs/splice.c:869 [inline]
[ 836.539720] [<ffffffff81af84e0>] do_splice fs/splice.c:1160 [inline]
[ 836.539720] [<ffffffff81af84e0>] SYSC_splice fs/splice.c:1410 [inline]
[ 836.539720] [<ffffffff81af84e0>] SyS_splice+0x7c0/0x1690
fs/splice.c:1393
[ 836.547273] [<ffffffff84370981>] entry_SYSCALL_64_fastpath+0x1f/0xc2
[ 836.560730] [<ffffffff8156f989>] validate_chain
kernel/locking/lockdep.c:2265 [inline]
[ 836.560730] [<ffffffff8156f989>]
__lock_acquire+0x2149/0x3430 kernel/locking/lockdep.c:3338
[ 836.568655] [<ffffffff81571b11>] lock_acquire+0x2a1/0x630
kernel/locking/lockdep.c:3753
[ 836.576230] [<ffffffff81a326ca>]
percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:35
[inline]
[ 836.576230] [<ffffffff81a326ca>] percpu_down_read
include/linux/percpu-rwsem.h:58 [inline]
[ 836.576230] [<ffffffff81a326ca>]
__sb_start_write+0x19a/0x2b0 fs/super.c:1252
[ 836.584168] [<ffffffff81ab1edf>] sb_start_write
include/linux/fs.h:1554 [inline]
[ 836.584168] [<ffffffff81ab1edf>] mnt_want_write+0x3f/0xb0
fs/namespace.c:389
[ 836.591744] [<ffffffff81a67581>] filename_create+0x151/0x610
fs/namei.c:3598
[ 836.599574] [<ffffffff81a67a73>] kern_path_create+0x33/0x40
fs/namei.c:3644
[ 836.607328] [<ffffffff83966683>] unix_mknod
net/unix/af_unix.c:967 [inline]
[ 836.607328] [<ffffffff83966683>] unix_bind+0x4c3/0xe00
net/unix/af_unix.c:1035
[ 836.614634] [<ffffffff834f047e>] SYSC_bind+0x20e/0x4a0
net/socket.c:1382
[ 836.621950] [<ffffffff834f3d84>] SyS_bind+0x24/0x30 net/socket.c:1368
[ 836.629015] [<ffffffff84370981>] entry_SYSCALL_64_fastpath+0x1f/0xc2
[ 836.642405] [<ffffffff815694cd>] check_prev_add
kernel/locking/lockdep.c:1828 [inline]
[ 836.642405] [<ffffffff815694cd>]
check_prevs_add+0xa8d/0x1c00 kernel/locking/lockdep.c:1938
[ 836.650348] [<ffffffff8156f989>] validate_chain
kernel/locking/lockdep.c:2265 [inline]
[ 836.650348] [<ffffffff8156f989>]
__lock_acquire+0x2149/0x3430 kernel/locking/lockdep.c:3338
[ 836.658315] [<ffffffff81571b11>] lock_acquire+0x2a1/0x630
kernel/locking/lockdep.c:3753
[ 836.665928] [<ffffffff84361ce1>] __mutex_lock_common
kernel/locking/mutex.c:521 [inline]
[ 836.665928] [<ffffffff84361ce1>]
mutex_lock_interruptible_nested+0x2e1/0x12a0
kernel/locking/mutex.c:650
[ 836.675287] [<ffffffff83962315>]
unix_autobind.isra.28+0xc5/0x880 net/unix/af_unix.c:852
[ 836.683571] [<ffffffff8396cdfc>]
unix_dgram_sendmsg+0x104c/0x1720 net/unix/af_unix.c:1667
[ 836.691870] [<ffffffff8396d5c3>]
unix_seqpacket_sendmsg+0xf3/0x160 net/unix/af_unix.c:2071
[ 836.700261] [<ffffffff834efaaa>] sock_sendmsg_nosec
net/socket.c:621 [inline]
[ 836.700261] [<ffffffff834efaaa>] sock_sendmsg+0xca/0x110
net/socket.c:631
[ 836.707758] [<ffffffff834f0137>] kernel_sendmsg+0x47/0x60
net/socket.c:639
[ 836.715327] [<ffffffff834faca6>]
sock_no_sendpage+0x216/0x300 net/core/sock.c:2321
[ 836.723278] [<ffffffff834ee5e0>] kernel_sendpage+0x90/0xe0
net/socket.c:3289
[ 836.730944] [<ffffffff834ee6bc>] sock_sendpage+0x8c/0xc0
net/socket.c:775
[ 836.738421] [<ffffffff81af011d>]
pipe_to_sendpage+0x29d/0x3e0 fs/splice.c:469
[ 836.746374] [<ffffffff81af4168>] splice_from_pipe_feed
fs/splice.c:520 [inline]
[ 836.746374] [<ffffffff81af4168>]
__splice_from_pipe+0x328/0x760 fs/splice.c:644
[ 836.754487] [<ffffffff81af77a7>]
splice_from_pipe+0x1d7/0x2f0 fs/splice.c:679
[ 836.762451] [<ffffffff81af7900>]
generic_splice_sendpage+0x40/0x50 fs/splice.c:850
[ 836.770826] [<ffffffff81af84e0>] do_splice_from
fs/splice.c:869 [inline]
[ 836.770826] [<ffffffff81af84e0>] do_splice fs/splice.c:1160 [inline]
[ 836.770826] [<ffffffff81af84e0>] SYSC_splice fs/splice.c:1410 [inline]
[ 836.770826] [<ffffffff81af84e0>] SyS_splice+0x7c0/0x1690
fs/splice.c:1393
[ 836.778307] [<ffffffff84370981>] entry_SYSCALL_64_fastpath+0x1f/0xc2
other info that might help us debug this:
Chain exists of:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&pipe->mutex/1);
lock(sb_writers#5);
lock(&pipe->mutex/1);
lock(&u->bindlock);
*** DEADLOCK ***
1 lock held by syz-executor6/25491:
#0: (&pipe->mutex/1){+.+.+.}, at: [<ffffffff81a45ac6>]
pipe_lock_nested fs/pipe.c:66 [inline]
#0: (&pipe->mutex/1){+.+.+.}, at: [<ffffffff81a45ac6>]
pipe_lock+0x56/0x70 fs/pipe.c:74
stack backtrace:
CPU: 0 PID: 25491 Comm: syz-executor6 Not tainted 4.9.0 #1
Hardware name: Google Google Compute Engine/Google Compute Engine,
BIOS Google 01/01/2011
ffff8801cacc6248 ffffffff8234654f ffffffff00000000 1ffff10039598bdc
ffffed0039598bd4 0000000041b58ab3 ffffffff84b37a60 ffffffff82346261
0000000000000000 0000000000000000 0000000000000000 0000000000000000
Call Trace:
[<ffffffff8234654f>] __dump_stack lib/dump_stack.c:15 [inline]
[<ffffffff8234654f>] dump_stack+0x2ee/0x3ef lib/dump_stack.c:51
[<ffffffff81567147>] print_circular_bug+0x307/0x3b0
kernel/locking/lockdep.c:1202
[<ffffffff815694cd>] check_prev_add kernel/locking/lockdep.c:1828 [inline]
[<ffffffff815694cd>] check_prevs_add+0xa8d/0x1c00 kernel/locking/lockdep.c:1938
[<ffffffff8156f989>] validate_chain kernel/locking/lockdep.c:2265 [inline]
[<ffffffff8156f989>] __lock_acquire+0x2149/0x3430 kernel/locking/lockdep.c:3338
[<ffffffff81571b11>] lock_acquire+0x2a1/0x630 kernel/locking/lockdep.c:3753
[<ffffffff84361ce1>] __mutex_lock_common kernel/locking/mutex.c:521 [inline]
[<ffffffff84361ce1>] mutex_lock_interruptible_nested+0x2e1/0x12a0
kernel/locking/mutex.c:650
[<ffffffff83962315>] unix_autobind.isra.28+0xc5/0x880 net/unix/af_unix.c:852
[<ffffffff8396cdfc>] unix_dgram_sendmsg+0x104c/0x1720 net/unix/af_unix.c:1667
[<ffffffff8396d5c3>] unix_seqpacket_sendmsg+0xf3/0x160 net/unix/af_unix.c:2071
[<ffffffff834efaaa>] sock_sendmsg_nosec net/socket.c:621 [inline]
[<ffffffff834efaaa>] sock_sendmsg+0xca/0x110 net/socket.c:631
[<ffffffff834f0137>] kernel_sendmsg+0x47/0x60 net/socket.c:639
[<ffffffff834faca6>] sock_no_sendpage+0x216/0x300 net/core/sock.c:2321
[<ffffffff834ee5e0>] kernel_sendpage+0x90/0xe0 net/socket.c:3289
[<ffffffff834ee6bc>] sock_sendpage+0x8c/0xc0 net/socket.c:775
[<ffffffff81af011d>] pipe_to_sendpage+0x29d/0x3e0 fs/splice.c:469
[<ffffffff81af4168>] splice_from_pipe_feed fs/splice.c:520 [inline]
[<ffffffff81af4168>] __splice_from_pipe+0x328/0x760 fs/splice.c:644
[<ffffffff81af77a7>] splice_from_pipe+0x1d7/0x2f0 fs/splice.c:679
[<ffffffff81af7900>] generic_splice_sendpage+0x40/0x50 fs/splice.c:850
[<ffffffff81af84e0>] do_splice_from fs/splice.c:869 [inline]
[<ffffffff81af84e0>] do_splice fs/splice.c:1160 [inline]
[<ffffffff81af84e0>] SYSC_splice fs/splice.c:1410 [inline]
[<ffffffff81af84e0>] SyS_splice+0x7c0/0x1690 fs/splice.c:1393
[<ffffffff84370981>] entry_SYSCALL_64_fastpath+0x1f/0xc2
QAT: Invalid ioctl
QAT: Invalid ioctl
QAT: Invalid ioctl
QAT: Invalid ioctl
FAULT_FLAG_ALLOW_RETRY missing 30
CPU: 1 PID: 25716 Comm: syz-executor3 Not tainted 4.9.0 #1
Hardware name: Google Google Compute Engine/Google Compute Engine,
BIOS Google 01/01/2011
ffff8801b6a274a8 ffffffff8234654f ffffffff00000001 1ffff10036d44e28
ffffed0036d44e20 0000000041b58ab3 ffffffff84b37a60 ffffffff82346261
0000000000000000 ffff8801dc122980 ffff8801a36c2800 1ffff10036d44e2a
Call Trace:
[<ffffffff8234654f>] __dump_stack lib/dump_stack.c:15 [inline]
[<ffffffff8234654f>] dump_stack+0x2ee/0x3ef lib/dump_stack.c:51
[<ffffffff81b6325d>] handle_userfault+0x115d/0x1fc0 fs/userfaultfd.c:381
[<ffffffff8192f792>] do_anonymous_page mm/memory.c:2800 [inline]
[<ffffffff8192f792>] handle_pte_fault mm/memory.c:3560 [inline]
[<ffffffff8192f792>] __handle_mm_fault mm/memory.c:3652 [inline]
[<ffffffff8192f792>] handle_mm_fault+0x24f2/0x2890 mm/memory.c:3689
[<ffffffff81323df6>] __do_page_fault+0x4f6/0xb60 arch/x86/mm/fault.c:1397
[<ffffffff813244b4>] do_page_fault+0x54/0x70 arch/x86/mm/fault.c:1460
[<ffffffff84371d38>] page_fault+0x28/0x30 arch/x86/entry/entry_64.S:1012
[<ffffffff81a65dfe>] getname_flags+0x10e/0x580 fs/namei.c:148
[<ffffffff81a66f1d>] user_path_at_empty+0x2d/0x50 fs/namei.c:2556
[<ffffffff81a385e1>] user_path_at include/linux/namei.h:55 [inline]
[<ffffffff81a385e1>] vfs_fstatat+0xf1/0x1a0 fs/stat.c:106
[<ffffffff81a3a12b>] vfs_lstat fs/stat.c:129 [inline]
[<ffffffff81a3a12b>] SYSC_newlstat+0xab/0x140 fs/stat.c:283
[<ffffffff81a3a51d>] SyS_newlstat+0x1d/0x30 fs/stat.c:277
[<ffffffff84370981>] entry_SYSCALL_64_fastpath+0x1f/0xc2
FAULT_FLAG_ALLOW_RETRY missing 30
QAT: Invalid ioctl
QAT: Invalid ioctl
QAT: Invalid ioctl
CPU: 1 PID: 25716 Comm: syz-executor3 Not tainted 4.9.0 #1
Hardware name: Google Google Compute Engine/Google Compute Engine,
BIOS Google 01/01/2011
ffff8801b6a27360 ffffffff8234654f ffffffff00000001 1ffff10036d44dff
ffffed0036d44df7 0000000041b58ab3 ffffffff84b37a60 ffffffff82346261
0000000000000082 ffff8801dc122980 ffff8801da622540 1ffff10036d44e01
Call Trace:
[<ffffffff8234654f>] __dump_stack lib/dump_stack.c:15 [inline]
[<ffffffff8234654f>] dump_stack+0x2ee/0x3ef lib/dump_stack.c:51
[<ffffffff81b6325d>] handle_userfault+0x115d/0x1fc0 fs/userfaultfd.c:381
[<ffffffff8192f792>] do_anonymous_page mm/memory.c:2800 [inline]
[<ffffffff8192f792>] handle_pte_fault mm/memory.c:3560 [inline]
[<ffffffff8192f792>] __handle_mm_fault mm/memory.c:3652 [inline]
[<ffffffff8192f792>] handle_mm_fault+0x24f2/0x2890 mm/memory.c:3689
[<ffffffff81323df6>] __do_page_fault+0x4f6/0xb60 arch/x86/mm/fault.c:1397
[<ffffffff81324611>] trace_do_page_fault+0x141/0x6c0 arch/x86/mm/fault.c:1490
[<ffffffff84371d08>] trace_page_fault+0x28/0x30 arch/x86/entry/entry_64.S:1012
[<ffffffff81a65dfe>] getname_flags+0x10e/0x580 fs/namei.c:148
[<ffffffff81a66f1d>] user_path_at_empty+0x2d/0x50 fs/namei.c:2556
[<ffffffff81a385e1>] user_path_at include/linux/namei.h:55 [inline]
[<ffffffff81a385e1>] vfs_fstatat+0xf1/0x1a0 fs/stat.c:106
[<ffffffff81a3a12b>] vfs_lstat fs/stat.c:129 [inline]
[<ffffffff81a3a12b>] SYSC_newlstat+0xab/0x140 fs/stat.c:283
[<ffffffff81a3a51d>] SyS_newlstat+0x1d/0x30 fs/stat.c:277
[<ffffffff84370981>] entry_SYSCALL_64_fastpath+0x1f/0xc2
^ permalink raw reply
* Re: [PATCH 1/2] qed: Replace memset with eth_zero_addr
From: Shyam Saini @ 2017-01-16 9:24 UTC (permalink / raw)
To: David Miller; +Cc: Yuval.Mintz, Ariel.Elior, everest-linux-l2, netdev
In-Reply-To: <20170115.233830.123911280062970298.davem@davemloft.net>
On Sun, Jan 15, 2017 at 11:38:30PM -0500, David Miller wrote:
>
> Please do not ever submit two patches which have the same exact commit
> header line, as these two patches do.
>
> When someone looks into the shortlog of GIT history all they will see
> is "qed: Replace memset with eth_zero_addr" twice.
>
> This gives the reader no idea what might be different between those
> two changes.
>
> Therefore you must give unique a commit header text for each change,
> which communicates sufficiently what is different in each change.
Thanks a lot for correcting me. I'll take care of this thing.
I'm resending these two patches as
1). qed: Replace memset with eth_zero_addr
2). qed: Use eth_zero_addr
I hope it resolves same commit header line conflict.
Regards,
Shyam
^ permalink raw reply
* Re: [patch net-next] stmmac: indent an if statement
From: Dan Carpenter @ 2017-01-16 9:19 UTC (permalink / raw)
To: David Miller
Cc: peppe.cavallaro, Joao.Pinto, alexandre.torgue, netdev,
linux-kernel, kernel-janitors
In-Reply-To: <20170115.221438.1956356112755181222.davem@davemloft.net>
On Sun, Jan 15, 2017 at 10:14:38PM -0500, David Miller wrote:
> From: Dan Carpenter <dan.carpenter@oracle.com>
> Date: Thu, 12 Jan 2017 21:46:32 +0300
>
> > The break statement should be indented one more tab.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> Applied, but like Julia I think we might have a missing of_node_put()
> here.
Of course, sorry for dropping the ball on this. I'll send a patch for
that.
regards,
dan carpenter
^ 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