* [Patch net 1/2] net: hns3: fix page_offset overflow when CONFIG_ARM64_64K_PAGES
From: Huazhong Tan @ 2018-08-23 3:37 UTC (permalink / raw)
To: davem; +Cc: netdev, linuxarm, salil.mehta, yisen.zhuang, lipeng321,
tanhuazhong
In-Reply-To: <1534995436-25259-1-git-send-email-tanhuazhong@huawei.com>
When enable the config item "CONFIG_ARM64_64K_PAGES", the size of
PAGE_SIZE is 65536(64K). But the type of page_offset is u16, it will
overflow. So change it to u32, when "CONFIG_ARM64_64K_PAGES" enabled.
Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
index a02a96a..cb450d7 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
@@ -284,11 +284,11 @@ struct hns3_desc_cb {
/* priv data for the desc, e.g. skb when use with ip stack*/
void *priv;
- u16 page_offset;
- u16 reuse_flag;
-
+ u32 page_offset;
u32 length; /* length of the buffer */
+ u16 reuse_flag;
+
/* desc type, used by the ring user to mark the type of the priv data */
u16 type;
};
--
1.9.1
^ permalink raw reply related
* [Patch net 0/2] net: hns3: bug fix & optimization for HNS3 driver
From: Huazhong Tan @ 2018-08-23 3:37 UTC (permalink / raw)
To: davem; +Cc: netdev, linuxarm, salil.mehta, yisen.zhuang, lipeng321,
tanhuazhong
This patchset presents a bug fix found out when CONFIG_ARM64_64K_PAGES
enable and an optimization for HNS3 driver.
Huazhong Tan (2):
net: hns3: fix page_offset overflow when CONFIG_ARM64_64K_PAGES
net: hns3: modify variable type in hns3_nic_reuse_page
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 3 ++-
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
--
1.9.1
^ permalink raw reply
* Re: [PATCH] net/ipv6: init ip6 anycast rt->dst.input as ip6_input
From: David Ahern @ 2018-08-23 3:39 UTC (permalink / raw)
To: Hangbin Liu, netdev; +Cc: David S. Miller
In-Reply-To: <1534995097-6189-1-git-send-email-liuhangbin@gmail.com>
On 8/22/18 9:31 PM, Hangbin Liu wrote:
> Commit 6edb3c96a5f02 ("net/ipv6: Defer initialization of dst to data path")
> forgot to handle anycast route and init anycast rt->dst.input to ip6_forward.
> Fix it by setting anycast rt->dst.input back to ip6_input.
>
> Fixes: 6edb3c96a5f02 ("net/ipv6: Defer initialization of dst to data path")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> ---
> net/ipv6/route.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Good catch.
Reviewed-by: David Ahern <dsahern@gmail.com>
^ permalink raw reply
* Re: WARNING in refcount_inc (3)
From: Eric Biggers @ 2018-08-23 7:24 UTC (permalink / raw)
To: syzbot; +Cc: davem, kuznet, linux-kernel, netdev, syzkaller-bugs, yoshfuji
In-Reply-To: <20180419224509.GB13221@gmail.com>
On Thu, Apr 19, 2018 at 03:45:09PM -0700, Eric Biggers wrote:
> On Sat, Mar 31, 2018 at 04:01:02PM -0700, syzbot wrote:
> > Hello,
> >
> > syzbot hit the following crash on bpf-next commit
> > 1379ef828a18d8f81c526b25e4d5685caa2cfd65 (Thu Mar 29 22:09:44 2018 +0000)
> > Merge branch 'bpf-sockmap-ingress'
> > syzbot dashboard link:
> > https://syzkaller.appspot.com/bug?extid=6eaf536fd743f5e119c5
> >
> > So far this crash happened 6 times on bpf-next.
> > C reproducer: https://syzkaller.appspot.com/x/repro.c?id=6614614900998144
> > syzkaller reproducer:
> > https://syzkaller.appspot.com/x/repro.syz?id=5035340528091136
> > Raw console output:
> > https://syzkaller.appspot.com/x/log.txt?id=5063394046509056
> > Kernel config:
> > https://syzkaller.appspot.com/x/.config?id=-1280663959502969741
> > compiler: gcc (GCC) 7.1.1 20170620
> >
> > IMPORTANT: if you fix the bug, please add the following tag to the commit:
> > Reported-by: syzbot+6eaf536fd743f5e119c5@syzkaller.appspotmail.com
> > It will help syzbot understand when the bug is fixed. See footer for
> > details.
> > If you forward the report, please keep this part and the footer.
> >
> > R13: 0000000000000005 R14: 0000000000001380 R15: 00007ffd314c8768
> > ------------[ cut here ]------------
> > ------------[ cut here ]------------
> > refcount_t: increment on 0; use-after-free.
> > refcount_t: underflow; use-after-free.
> > WARNING: CPU: 1 PID: 4434 at lib/refcount.c:153 refcount_inc+0x47/0x50
> > lib/refcount.c:153
> > WARNING: CPU: 0 PID: 4437 at lib/refcount.c:187
> > refcount_sub_and_test+0x167/0x1b0 lib/refcount.c:187
> > Kernel panic - not syncing: panic_on_warn set ...
> >
> > Modules linked in:
> > CPU: 1 PID: 4434 Comm: syzkaller349430 Not tainted 4.16.0-rc6+ #41
> > CPU: 0 PID: 4437 Comm: syzkaller349430 Not tainted 4.16.0-rc6+ #41
> > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
> > Google 01/01/2011
> > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
> > Google 01/01/2011
> > RIP: 0010:refcount_sub_and_test+0x167/0x1b0 lib/refcount.c:187
> > Call Trace:
> > RSP: 0018:ffff8801b061f728 EFLAGS: 00010286
> > __dump_stack lib/dump_stack.c:17 [inline]
> > dump_stack+0x194/0x24d lib/dump_stack.c:53
> > RAX: dffffc0000000008 RBX: 0000000000000000 RCX: ffffffff815ba4be
> > RDX: 0000000000000000 RSI: 1ffff100360c3e95 RDI: 1ffff100360c3e6a
> > RBP: ffff8801b061f7b8 R08: 0000000000000000 R09: 0000000000000000
> > R10: ffff8801b061f850 R11: 0000000000000000 R12: 1ffff100360c3ee6
> > panic+0x1e4/0x41c kernel/panic.c:183
> > R13: 00000000ffffffff R14: 0000000000000001 R15: ffff8801b1be4184
> > FS: 0000000001817880(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000
> > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > CR2: 00007ffd314c9000 CR3: 00000001b04a1006 CR4: 00000000001606f0
> > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> > Call Trace:
> > __warn+0x1dc/0x200 kernel/panic.c:547
> > report_bug+0x1f4/0x2b0 lib/bug.c:186
> > fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:178
> > fixup_bug arch/x86/kernel/traps.c:247 [inline]
> > do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:296
> > refcount_dec_and_test+0x1a/0x20 lib/refcount.c:212
> > put_net include/net/net_namespace.h:222 [inline]
> > __sk_destruct+0x560/0x920 net/core/sock.c:1592
> > do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315
> > invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:986
> > RIP: 0010:refcount_inc+0x47/0x50 lib/refcount.c:153
> > RSP: 0018:ffff8801b058f860 EFLAGS: 00010286
> > RAX: dffffc0000000008 RBX: ffff8801ab55a1c4 RCX: ffffffff815ba4be
> > RDX: 0000000000000000 RSI: 1ffff100360b1ebc RDI: 1ffff100360b1e91
> > RBP: ffff8801b058f868 R08: 0000000000000000 R09: 0000000000000000
> > sk_destruct+0x47/0x80 net/core/sock.c:1601
> > R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801b058faf8
> > __sk_free+0xf1/0x2b0 net/core/sock.c:1612
> > R13: ffff8801af87b513 R14: ffff8801ab55a1c0 R15: ffff8801af87b501
> > sk_free+0x2a/0x40 net/core/sock.c:1623
> > sock_put include/net/sock.h:1661 [inline]
> > tcp_close+0x967/0x1190 net/ipv4/tcp.c:2329
> > get_net include/net/net_namespace.h:204 [inline]
> > sk_alloc+0x3f9/0x1440 net/core/sock.c:1540
> > inet_release+0xed/0x1c0 net/ipv4/af_inet.c:427
> > sock_release+0x8d/0x1e0 net/socket.c:594
> > sock_close+0x16/0x20 net/socket.c:1149
> > __fput+0x327/0x7e0 fs/file_table.c:209
> > ____fput+0x15/0x20 fs/file_table.c:243
> > task_work_run+0x199/0x270 kernel/task_work.c:113
> > inet_create+0x47c/0xf50 net/ipv4/af_inet.c:320
> > tracehook_notify_resume include/linux/tracehook.h:191 [inline]
> > exit_to_usermode_loop+0x275/0x2f0 arch/x86/entry/common.c:166
> > __sock_create+0x4d4/0x850 net/socket.c:1285
> > prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
> > syscall_return_slowpath arch/x86/entry/common.c:265 [inline]
> > do_syscall_64+0x6ec/0x940 arch/x86/entry/common.c:292
> > sock_create net/socket.c:1325 [inline]
> > SYSC_socket net/socket.c:1355 [inline]
> > SyS_socket+0xeb/0x1d0 net/socket.c:1335
> > do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
> > entry_SYSCALL_64_after_hwframe+0x42/0xb7
> > RIP: 0033:0x402950
> > RSP: 002b:00007ffd314c8628 EFLAGS: 00000246
> > ORIG_RAX: 0000000000000003
> > RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000402950
> > RDX: 00000000000000e0 RSI: 00007ffd314c8f00 RDI: 0000000000000003
> > RBP: 00007ffd314c8740 R08: 00007ffd314c864c R09: 0000000000000001
> > R10: 00007ffd314c8740 R11: 0000000000000246 R12: 00000000006cf4c0
> > R13: 00000000006cee40 R14: 0000000000001380 R15: 00007ffd314c8768
> > Code:
> > entry_SYSCALL_64_after_hwframe+0x42/0xb7
> > 5e
> > RIP: 0033:0x4456a7
> > 41
> > RSP: 002b:00007ffd314c8628 EFLAGS: 00000202 ORIG_RAX: 0000000000000029
> > 5f
> > RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00000000004456a7
> > 5d
> > RDX: 0000000000000006 RSI: 0000000000000001 RDI: 0000000000000002
> > RBP: 00007ffd314c8740 R08: 0000000000000000 R09: 0000000000000001
> > c3
> > R10: 0000000000000006 R11: 0000000000000202 R12: 0000000000000003
> > e8
> > R13: 0000000000000003 R14: 0000000000006cc2 R15: 00007ffd314c8768
> > 0a 0b be fe 80 3d 20 c9 84 05 00 75 1a e8 fc 0a be fe 48 c7 c7 e0 78 e5 86
> > c6 05 0b c9 84 05 01 e8 a9 16 8e fe <0f> 0b 31 db eb a3 e8 de 0a be fe 83 fb
> > ff 0f 85 63 ff ff ff 31
> > ---[ end trace dd327356f543ce46 ]---
> > Dumping ftrace buffer:
> > (ftrace buffer empty)
> > Kernel Offset: disabled
> > Rebooting in 86400 seconds..
> >
> >
> > ---
> > This bug is generated by a dumb bot. It may contain errors.
> > See https://goo.gl/tpsmEJ for details.
> > Direct all questions to syzkaller@googlegroups.com.
> >
> > syzbot will keep track of this bug report.
> > If you forgot to add the Reported-by tag, once the fix for this bug is
> > merged
> > into any tree, please reply to this email with:
> > #syz fix: exact-commit-title
>
> Broken error handling when mounting rpc_pipefs is messing things up.
> Fixed by patch in vfs/for-linus:
>
> #syz fix: rpc_pipefs: deal with early sget() failures
>
Correction: the patch I mentioned above was dropped, and the fix for this that
actually went upstream was commit 8e04944f0ea8b83:
#syz fix: mm,vmscan: Allow preallocating memory for register_shrinker().
- Eric
^ permalink raw reply
* [PATCH 4.4 60/79] net/ethernet/freescale/fman: fix cross-build error
From: Greg Kroah-Hartman @ 2018-08-23 7:53 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Randy Dunlap, Madalin Bucur, netdev,
linuxppc-dev, David S. Miller, Sasha Levin
In-Reply-To: <20180823074918.641878835@linuxfoundation.org>
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Randy Dunlap <rdunlap@infradead.org>
[ Upstream commit c133459765fae249ba482f62e12f987aec4376f0 ]
CC [M] drivers/net/ethernet/freescale/fman/fman.o
In file included from ../drivers/net/ethernet/freescale/fman/fman.c:35:
../include/linux/fsl/guts.h: In function 'guts_set_dmacr':
../include/linux/fsl/guts.h:165:2: error: implicit declaration of function 'clrsetbits_be32' [-Werror=implicit-function-declaration]
clrsetbits_be32(&guts->dmacr, 3 << shift, device << shift);
^~~~~~~~~~~~~~~
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Madalin Bucur <madalin.bucur@nxp.com>
Cc: netdev@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/fsl/guts.h | 1 +
1 file changed, 1 insertion(+)
--- a/include/linux/fsl/guts.h
+++ b/include/linux/fsl/guts.h
@@ -16,6 +16,7 @@
#define __FSL_GUTS_H__
#include <linux/types.h>
+#include <linux/io.h>
/**
* Global Utility Registers.
^ permalink raw reply
* [PATCH 4.9 110/130] net/ethernet/freescale/fman: fix cross-build error
From: Greg Kroah-Hartman @ 2018-08-23 7:53 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Randy Dunlap, Madalin Bucur, netdev,
linuxppc-dev, David S. Miller, Sasha Levin
In-Reply-To: <20180823074927.161454870@linuxfoundation.org>
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Randy Dunlap <rdunlap@infradead.org>
[ Upstream commit c133459765fae249ba482f62e12f987aec4376f0 ]
CC [M] drivers/net/ethernet/freescale/fman/fman.o
In file included from ../drivers/net/ethernet/freescale/fman/fman.c:35:
../include/linux/fsl/guts.h: In function 'guts_set_dmacr':
../include/linux/fsl/guts.h:165:2: error: implicit declaration of function 'clrsetbits_be32' [-Werror=implicit-function-declaration]
clrsetbits_be32(&guts->dmacr, 3 << shift, device << shift);
^~~~~~~~~~~~~~~
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Madalin Bucur <madalin.bucur@nxp.com>
Cc: netdev@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/fsl/guts.h | 1 +
1 file changed, 1 insertion(+)
--- a/include/linux/fsl/guts.h
+++ b/include/linux/fsl/guts.h
@@ -16,6 +16,7 @@
#define __FSL_GUTS_H__
#include <linux/types.h>
+#include <linux/io.h>
/**
* Global Utility Registers.
^ permalink raw reply
* [PATCH 4.14 186/217] net/ethernet/freescale/fman: fix cross-build error
From: Greg Kroah-Hartman @ 2018-08-23 7:54 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Randy Dunlap, Madalin Bucur, netdev,
linuxppc-dev, David S. Miller, Sasha Levin
In-Reply-To: <20180823075505.090246914@linuxfoundation.org>
4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Randy Dunlap <rdunlap@infradead.org>
[ Upstream commit c133459765fae249ba482f62e12f987aec4376f0 ]
CC [M] drivers/net/ethernet/freescale/fman/fman.o
In file included from ../drivers/net/ethernet/freescale/fman/fman.c:35:
../include/linux/fsl/guts.h: In function 'guts_set_dmacr':
../include/linux/fsl/guts.h:165:2: error: implicit declaration of function 'clrsetbits_be32' [-Werror=implicit-function-declaration]
clrsetbits_be32(&guts->dmacr, 3 << shift, device << shift);
^~~~~~~~~~~~~~~
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Madalin Bucur <madalin.bucur@nxp.com>
Cc: netdev@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/fsl/guts.h | 1 +
1 file changed, 1 insertion(+)
--- a/include/linux/fsl/guts.h
+++ b/include/linux/fsl/guts.h
@@ -16,6 +16,7 @@
#define __FSL_GUTS_H__
#include <linux/types.h>
+#include <linux/io.h>
/**
* Global Utility Registers.
^ permalink raw reply
* [PATCH 4.17 271/324] net/ethernet/freescale/fman: fix cross-build error
From: Greg Kroah-Hartman @ 2018-08-23 7:55 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Randy Dunlap, Madalin Bucur, netdev,
linuxppc-dev, David S. Miller, Sasha Levin
In-Reply-To: <20180823074955.885811006@linuxfoundation.org>
4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Randy Dunlap <rdunlap@infradead.org>
[ Upstream commit c133459765fae249ba482f62e12f987aec4376f0 ]
CC [M] drivers/net/ethernet/freescale/fman/fman.o
In file included from ../drivers/net/ethernet/freescale/fman/fman.c:35:
../include/linux/fsl/guts.h: In function 'guts_set_dmacr':
../include/linux/fsl/guts.h:165:2: error: implicit declaration of function 'clrsetbits_be32' [-Werror=implicit-function-declaration]
clrsetbits_be32(&guts->dmacr, 3 << shift, device << shift);
^~~~~~~~~~~~~~~
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Madalin Bucur <madalin.bucur@nxp.com>
Cc: netdev@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/fsl/guts.h | 1 +
1 file changed, 1 insertion(+)
--- a/include/linux/fsl/guts.h
+++ b/include/linux/fsl/guts.h
@@ -16,6 +16,7 @@
#define __FSL_GUTS_H__
#include <linux/types.h>
+#include <linux/io.h>
/**
* Global Utility Registers.
^ permalink raw reply
* Re: [PATCH] sch_cake: Fix TC filter flow override and expand it to hosts as well
From: David Miller @ 2018-08-23 4:40 UTC (permalink / raw)
To: toke; +Cc: netdev, cake
In-Reply-To: <153493378299.2819.2335994387383507473.stgit@alrua-kau>
From: Toke Høiland-Jørgensen <toke@toke.dk>
Date: Wed, 22 Aug 2018 12:29:43 +0200
> The TC filter flow mapping override completely skipped the call to
> cake_hash(); however that meant that the internal state was not being
> updated, which ultimately leads to deadlocks in some configurations. Fix
> that by passing the overridden flow ID into cake_hash() instead so it can
> react appropriately.
>
> In addition, the major number of the class ID can now be set to override
> the host mapping in host isolation mode. If both host and flow are
> overridden (or if the respective modes are disabled), flow dissection and
> hashing will be skipped entirely; otherwise, the hashing will be kept for
> the portions that are not set by the filter.
>
> Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Applied.
^ permalink raw reply
* Re: [PATCH] net_sched: fix unused variable warning in stmmac
From: David Miller @ 2018-08-23 4:40 UTC (permalink / raw)
To: arnd
Cc: jhs, xiyou.wangcong, jiri, jakub.kicinski, simon.horman, nogahf,
aring, john.hurley, netdev, linux-kernel
In-Reply-To: <20180822152608.4173947-1-arnd@arndb.de>
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 22 Aug 2018 17:25:44 +0200
> The new tcf_exts_for_each_action() macro doesn't reference its
> arguments when CONFIG_NET_CLS_ACT is disabled, which leads to
> a harmless warning in at least one driver:
>
> drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c: In function 'tc_fill_actions':
> drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c:64:6: error: unused variable 'i' [-Werror=unused-variable]
>
> Adding a cast to void lets us avoid this kind of warning.
> To be on the safe side, do it for all three arguments, not
> just the one that caused the warning.
>
> Fixes: 244cd96adb5f ("net_sched: remove list_head from tc_action")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied, thanks Arnd.
^ permalink raw reply
* Re: [Patch net] addrconf: reduce unnecessary atomic allocations
From: David Miller @ 2018-08-23 4:42 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: netdev, dsahern
In-Reply-To: <20180822195834.7217-1-xiyou.wangcong@gmail.com>
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Wed, 22 Aug 2018 12:58:34 -0700
> All the 3 callers of addrconf_add_mroute() assert RTNL
> lock, they don't take any additional lock either, so
> it is safe to convert it to GFP_KERNEL.
>
> Same for sit_add_v4_addrs().
>
> Cc: David Ahern <dsahern@gmail.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH net] ipv4: tcp: send zero IPID for RST and ACK sent in SYN-RECV and TIME-WAIT state
From: David Miller @ 2018-08-23 4:43 UTC (permalink / raw)
To: edumazet; +Cc: netdev, alexandg, eric.dumazet
In-Reply-To: <20180822203045.76928-1-edumazet@google.com>
From: Eric Dumazet <edumazet@google.com>
Date: Wed, 22 Aug 2018 13:30:45 -0700
> tcp uses per-cpu (and per namespace) sockets (net->ipv4.tcp_sk) internally
> to send some control packets.
>
> 1) RST packets, through tcp_v4_send_reset()
> 2) ACK packets in SYN-RECV and TIME-WAIT state, through tcp_v4_send_ack()
>
> These packets assert IP_DF, and also use the hashed IP ident generator
> to provide an IPv4 ID number.
>
> Geoff Alexander reported this could be used to build off-path attacks.
>
> These packets should not be fragmented, since their size is smaller than
> IPV4_MIN_MTU. Only some tunneled paths could eventually have to fragment,
> regardless of inner IPID.
>
> We really can use zero IPID, to address the flaw, and as a bonus,
> avoid a couple of atomic operations in ip_idents_reserve()
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reported-by: Geoff Alexander <alexandg@cs.unm.edu>
> Tested-by: Geoff Alexander <alexandg@cs.unm.edu>
Applied and queued up for -stable.
^ permalink raw reply
* Re: [PATCH net 0/3] tcp_bbr: PROBE_RTT minor bug fixes
From: David Miller @ 2018-08-23 4:45 UTC (permalink / raw)
To: yyd; +Cc: netdev
In-Reply-To: <20180822214316.174161-1-yyd@google.com>
From: Kevin Yang <yyd@google.com>
Date: Wed, 22 Aug 2018 17:43:13 -0400
> From: "Kevin(Yudong) Yang" <yyd@google.com>
>
> This series includes two minor bug fixes for the TCP BBR PROBE_RTT
> mechanism, and one preparatory patch:
>
> (1) A preparatory patch to reorganize the PROBE_RTT logic by refactoring
> (into its own function) the code to exit PROBE_RTT, since the next
> patch will be using that code in a new context.
>
> (2) Fix: When BBR restarts from idle and if BBR is in PROBE_RTT mode,
> BBR should check if it's time to exit PROBE_RTT. If yes, then BBR
> should exit PROBE_RTT mode and restore the cwnd to its full value.
>
> (3) Fix: Apply the PROBE_RTT cwnd cap even if the count of fully-ACKed
> packets is 0.
Series applied, thank you.
^ permalink raw reply
* Re: [Patch net 0/4] net: hns: bug fixes & optimization for HNS driver
From: David Miller @ 2018-08-23 4:48 UTC (permalink / raw)
To: tanhuazhong; +Cc: netdev, linuxarm, salil.mehta, yisen.zhuang, lipeng321
In-Reply-To: <1534993813-236850-1-git-send-email-tanhuazhong@huawei.com>
From: Huazhong Tan <tanhuazhong@huawei.com>
Date: Thu, 23 Aug 2018 11:10:09 +0800
> This patchset presents some bug fixes found out when
> CONFIG_ARM64_64K_PAGES enable and an optimization for HNS driver.
Series applied, thank you.
^ permalink raw reply
* Re: [PATCH] net/ipv6: init ip6 anycast rt->dst.input as ip6_input
From: David Miller @ 2018-08-23 4:53 UTC (permalink / raw)
To: liuhangbin; +Cc: netdev, dsahern
In-Reply-To: <1534995097-6189-1-git-send-email-liuhangbin@gmail.com>
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Thu, 23 Aug 2018 11:31:37 +0800
> Commit 6edb3c96a5f02 ("net/ipv6: Defer initialization of dst to data path")
> forgot to handle anycast route and init anycast rt->dst.input to ip6_forward.
> Fix it by setting anycast rt->dst.input back to ip6_input.
>
> Fixes: 6edb3c96a5f02 ("net/ipv6: Defer initialization of dst to data path")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH net-next] ieee802154: Use kmemdup instead of duplicating it in ca8210_test_int_driver_write
From: Stefan Schmidt @ 2018-08-23 8:31 UTC (permalink / raw)
To: YueHaibing, davem, h.morris, alex.aring; +Cc: linux-kernel, netdev, linux-wpan
In-Reply-To: <20180809064429.13348-1-yuehaibing@huawei.com>
Hello.
On 08/09/2018 08:44 AM, YueHaibing wrote:
> Replace calls to kmalloc followed by a memcpy with a direct call to
> kmemdup.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/net/ieee802154/ca8210.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
> index 58299fb..e21279d 100644
> --- a/drivers/net/ieee802154/ca8210.c
> +++ b/drivers/net/ieee802154/ca8210.c
> @@ -634,10 +634,9 @@ static int ca8210_test_int_driver_write(
> for (i = 0; i < len; i++)
> dev_dbg(&priv->spi->dev, "%#03x\n", buf[i]);
>
> - fifo_buffer = kmalloc(len, GFP_KERNEL);
> + fifo_buffer = kmemdup(buf, len, GFP_KERNEL);
> if (!fifo_buffer)
> return -ENOMEM;
> - memcpy(fifo_buffer, buf, len);
> kfifo_in(&test->up_fifo, &fifo_buffer, 4);
> wake_up_interruptible(&priv->test.readq);
>
This patch has been applied to the wpan tree and will be
part of the next pull request to net. Thanks!
regards
Stefan Schmidt
^ permalink raw reply
* Re: [PATCH bpf] bpf: use per htab salt for bucket hash
From: Song Liu @ 2018-08-23 5:06 UTC (permalink / raw)
To: Daniel Borkmann; +Cc: Alexei Starovoitov, Networking
In-Reply-To: <3d91bc248da2fb1d2a88bcaa75d1b2d2da936986.1534974407.git.daniel@iogearbox.net>
On Wed, Aug 22, 2018 at 2:49 PM, Daniel Borkmann <daniel@iogearbox.net> wrote:
> All BPF hash and LRU maps currently have a known and global seed
> we feed into jhash() which is 0. This is suboptimal, thus fix it
> by generating a random seed upon hashtab setup time which we can
> later on feed into jhash() on lookup, update and deletions.
>
> Fixes: 0f8e4bd8a1fc8 ("bpf: add hashtable type of eBPF maps")
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
> ---
> kernel/bpf/hashtab.c | 23 +++++++++++++----------
> 1 file changed, 13 insertions(+), 10 deletions(-)
>
> diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c
> index 04b8eda..03cc59e 100644
> --- a/kernel/bpf/hashtab.c
> +++ b/kernel/bpf/hashtab.c
> @@ -15,6 +15,7 @@
> #include <linux/jhash.h>
> #include <linux/filter.h>
> #include <linux/rculist_nulls.h>
> +#include <linux/random.h>
> #include <uapi/linux/btf.h>
> #include "percpu_freelist.h"
> #include "bpf_lru_list.h"
> @@ -41,6 +42,7 @@ struct bpf_htab {
> atomic_t count; /* number of elements in this hashtable */
> u32 n_buckets; /* number of hash buckets */
> u32 elem_size; /* size of each element in bytes */
> + u32 hashrnd;
> };
>
> /* each htab element is struct htab_elem + key + value */
> @@ -371,6 +373,7 @@ static struct bpf_map *htab_map_alloc(union bpf_attr *attr)
> if (!htab->buckets)
> goto free_htab;
>
> + htab->hashrnd = get_random_int();
> for (i = 0; i < htab->n_buckets; i++) {
> INIT_HLIST_NULLS_HEAD(&htab->buckets[i].head, i);
> raw_spin_lock_init(&htab->buckets[i].lock);
> @@ -402,9 +405,9 @@ static struct bpf_map *htab_map_alloc(union bpf_attr *attr)
> return ERR_PTR(err);
> }
>
> -static inline u32 htab_map_hash(const void *key, u32 key_len)
> +static inline u32 htab_map_hash(const void *key, u32 key_len, u32 hashrnd)
> {
> - return jhash(key, key_len, 0);
> + return jhash(key, key_len, hashrnd);
> }
>
> static inline struct bucket *__select_bucket(struct bpf_htab *htab, u32 hash)
> @@ -470,7 +473,7 @@ static void *__htab_map_lookup_elem(struct bpf_map *map, void *key)
>
> key_size = map->key_size;
>
> - hash = htab_map_hash(key, key_size);
> + hash = htab_map_hash(key, key_size, htab->hashrnd);
>
> head = select_bucket(htab, hash);
>
> @@ -597,7 +600,7 @@ static int htab_map_get_next_key(struct bpf_map *map, void *key, void *next_key)
> if (!key)
> goto find_first_elem;
>
> - hash = htab_map_hash(key, key_size);
> + hash = htab_map_hash(key, key_size, htab->hashrnd);
>
> head = select_bucket(htab, hash);
>
> @@ -824,7 +827,7 @@ static int htab_map_update_elem(struct bpf_map *map, void *key, void *value,
>
> key_size = map->key_size;
>
> - hash = htab_map_hash(key, key_size);
> + hash = htab_map_hash(key, key_size, htab->hashrnd);
>
> b = __select_bucket(htab, hash);
> head = &b->head;
> @@ -880,7 +883,7 @@ static int htab_lru_map_update_elem(struct bpf_map *map, void *key, void *value,
>
> key_size = map->key_size;
>
> - hash = htab_map_hash(key, key_size);
> + hash = htab_map_hash(key, key_size, htab->hashrnd);
>
> b = __select_bucket(htab, hash);
> head = &b->head;
> @@ -945,7 +948,7 @@ static int __htab_percpu_map_update_elem(struct bpf_map *map, void *key,
>
> key_size = map->key_size;
>
> - hash = htab_map_hash(key, key_size);
> + hash = htab_map_hash(key, key_size, htab->hashrnd);
>
> b = __select_bucket(htab, hash);
> head = &b->head;
> @@ -998,7 +1001,7 @@ static int __htab_lru_percpu_map_update_elem(struct bpf_map *map, void *key,
>
> key_size = map->key_size;
>
> - hash = htab_map_hash(key, key_size);
> + hash = htab_map_hash(key, key_size, htab->hashrnd);
>
> b = __select_bucket(htab, hash);
> head = &b->head;
> @@ -1071,7 +1074,7 @@ static int htab_map_delete_elem(struct bpf_map *map, void *key)
>
> key_size = map->key_size;
>
> - hash = htab_map_hash(key, key_size);
> + hash = htab_map_hash(key, key_size, htab->hashrnd);
> b = __select_bucket(htab, hash);
> head = &b->head;
>
> @@ -1103,7 +1106,7 @@ static int htab_lru_map_delete_elem(struct bpf_map *map, void *key)
>
> key_size = map->key_size;
>
> - hash = htab_map_hash(key, key_size);
> + hash = htab_map_hash(key, key_size, htab->hashrnd);
> b = __select_bucket(htab, hash);
> head = &b->head;
>
> --
> 2.9.5
>
^ permalink raw reply
* Re: [Patch net 0/2] net: hns3: bug fix & optimization for HNS3 driver
From: David Miller @ 2018-08-23 5:13 UTC (permalink / raw)
To: tanhuazhong; +Cc: netdev, linuxarm, salil.mehta, yisen.zhuang, lipeng321
In-Reply-To: <1534995436-25259-1-git-send-email-tanhuazhong@huawei.com>
From: Huazhong Tan <tanhuazhong@huawei.com>
Date: Thu, 23 Aug 2018 11:37:14 +0800
> This patchset presents a bug fix found out when CONFIG_ARM64_64K_PAGES
> enable and an optimization for HNS3 driver.
Series applied, thank you.
^ permalink raw reply
* Re: [PATCH 1/2] net: netsec: enable tx-irq during open callback
From: Jassi Brar @ 2018-08-23 5:15 UTC (permalink / raw)
To: <netdev@vger.kernel.org>
Cc: David S . Miller, Masahisa Kojima, Ard Biesheuvel, Jassi Brar
In-Reply-To: <1523863336-12653-1-git-send-email-jassisinghbrar@gmail.com>
Hi Dave,
This patch (1/2) seems to have fallen through the cracks. The other
one (2/2), you already picked.
Thanks
On Mon, Apr 16, 2018 at 1:08 PM <jassisinghbrar@gmail.com> wrote:
>
> From: Jassi Brar <jaswinder.singh@linaro.org>
>
> Enable TX-irq as well during ndo_open() as we can not count upon
> RX to arrive early enough to trigger the napi. This patch is critical
> for installation over network.
>
> Fixes: 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver")
> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
> ---
> drivers/net/ethernet/socionext/netsec.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c
> index f4c0b02..f6fe70e 100644
> --- a/drivers/net/ethernet/socionext/netsec.c
> +++ b/drivers/net/ethernet/socionext/netsec.c
> @@ -1313,8 +1313,8 @@ static int netsec_netdev_open(struct net_device *ndev)
> napi_enable(&priv->napi);
> netif_start_queue(ndev);
>
> - /* Enable RX intr. */
> - netsec_write(priv, NETSEC_REG_INTEN_SET, NETSEC_IRQ_RX);
> + /* Enable TX+RX intr. */
> + netsec_write(priv, NETSEC_REG_INTEN_SET, NETSEC_IRQ_RX | NETSEC_IRQ_TX);
>
> return 0;
> err3:
> --
> 2.7.4
>
^ permalink raw reply
* [PATCH] netlink: add nl_set_extack_cookie_u64()
From: Johannes Berg @ 2018-08-23 8:48 UTC (permalink / raw)
To: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
Cc: Johannes Berg
From: Johannes Berg <johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Add a helper function nl_set_extack_cookie_u64() to use a u64 as
the netlink extended ACK cookie, to avoid having to open-code it
in any users of the cookie.
A u64 should be sufficient for most subsystems though we allow
for up to 20 bytes right now. This also matches the cookies in
nl80211 where I intend to use this.
Signed-off-by: Johannes Berg <johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
include/linux/netlink.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 71f121b66ca8..dc3c21dc4ba2 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -110,6 +110,15 @@ struct netlink_ext_ack {
} \
} while (0)
+static inline void nl_set_extack_cookie_u64(struct netlink_ext_ack *extack,
+ u64 cookie)
+{
+ u64 __cookie = cookie;
+
+ memcpy(extack->cookie, &__cookie, sizeof(__cookie));
+ extack->cookie_len = sizeof(__cookie);
+}
+
extern void netlink_kernel_release(struct sock *sk);
extern int __netlink_change_ngroups(struct sock *sk, unsigned int groups);
extern int netlink_change_ngroups(struct sock *sk, unsigned int groups);
--
2.14.4
^ permalink raw reply related
* [PATCH net] tipc: fix the big/little endian issue in tipc_dest
From: Haiqing Bai @ 2018-08-23 8:49 UTC (permalink / raw)
To: netdev, jon.maloy, ying.xue, davem; +Cc: zhenbo.gao, haiqing.bai, linux-kernel
In function tipc_dest_push, the 32bit variables 'node' and 'port'
are stored separately in uppper and lower part of 64bit 'value'.
Then this value is assigned to dst->value which is a union like:
union
{
struct {
u32 port;
u32 node;
};
u64 value;
}
This works on little-endian machines like x86 but fails on big-endian
machines.
The fix remove the 'value' stack parameter and even the 'value'
member of the union in tipc_dest, assign the 'node' and 'port' member
directly with the input parameter to avoid the endian issue.
Fixes: d06b2fa34f18 ("tipc: improve destination linked list")
Signed-off-by: Zhenbo Gao <zhenbo.gao@windriver.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
---
net/tipc/name_table.c | 10 ++++------
net/tipc/name_table.h | 9 ++-------
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c
index 88f027b..66d5b2c 100644
--- a/net/tipc/name_table.c
+++ b/net/tipc/name_table.c
@@ -980,20 +980,17 @@ int tipc_nl_name_table_dump(struct sk_buff *skb, struct netlink_callback *cb)
struct tipc_dest *tipc_dest_find(struct list_head *l, u32 node, u32 port)
{
- u64 value = (u64)node << 32 | port;
struct tipc_dest *dst;
list_for_each_entry(dst, l, list) {
- if (dst->value != value)
- continue;
- return dst;
+ if (dst->node == node && dst->port == port)
+ return dst;
}
return NULL;
}
bool tipc_dest_push(struct list_head *l, u32 node, u32 port)
{
- u64 value = (u64)node << 32 | port;
struct tipc_dest *dst;
if (tipc_dest_find(l, node, port))
@@ -1002,7 +999,8 @@ bool tipc_dest_push(struct list_head *l, u32 node, u32 port)
dst = kmalloc(sizeof(*dst), GFP_ATOMIC);
if (unlikely(!dst))
return false;
- dst->value = value;
+ dst->node = node;
+ dst->port = port;
list_add(&dst->list, l);
return true;
}
diff --git a/net/tipc/name_table.h b/net/tipc/name_table.h
index 0febba4..892bd75 100644
--- a/net/tipc/name_table.h
+++ b/net/tipc/name_table.h
@@ -133,13 +133,8 @@ struct publication *tipc_nametbl_remove_publ(struct net *net, u32 type,
struct tipc_dest {
struct list_head list;
- union {
- struct {
- u32 port;
- u32 node;
- };
- u64 value;
- };
+ u32 port;
+ u32 node;
};
struct tipc_dest *tipc_dest_find(struct list_head *l, u32 node, u32 port);
--
1.9.1
^ permalink raw reply related
* pull request: bluetooth 2018-08-23
From: Johan Hedberg @ 2018-08-23 5:34 UTC (permalink / raw)
To: davem; +Cc: linux-bluetooth, netdev
[-- Attachment #1: Type: text/plain, Size: 956 bytes --]
Hi Dave,
Here are two important Bluetooth fixes for the MediaTek and RealTek HCI
drivers.
Please let me know if there are any issues pulling, thanks.
Johan
---
The following changes since commit ab08dcd724543896303eae7de6288242bbaff458:
rhashtable: remove duplicated include from rhashtable.c (2018-08-20 19:18:50 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git for-upstream
for you to fetch changes up to addb3ffbca66954fb1d1791d2db2153c403f81af:
Bluetooth: mediatek: Fix memory leak (2018-08-21 16:56:20 +0200)
----------------------------------------------------------------
Gustavo A. R. Silva (1):
Bluetooth: mediatek: Fix memory leak
Hans de Goede (1):
Bluetooth: Make BT_HCIUART_RTL configuration option depend on ACPI
drivers/bluetooth/Kconfig | 1 +
drivers/bluetooth/btmtkuart.c | 8 +++++---
2 files changed, 6 insertions(+), 3 deletions(-)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: pull request: bluetooth 2018-08-23
From: David Miller @ 2018-08-23 5:43 UTC (permalink / raw)
To: johan.hedberg; +Cc: linux-bluetooth, netdev
In-Reply-To: <20180823053440.GA12312@x1c.home>
From: Johan Hedberg <johan.hedberg@gmail.com>
Date: Thu, 23 Aug 2018 08:34:40 +0300
> Here are two important Bluetooth fixes for the MediaTek and RealTek HCI
> drivers.
>
> Please let me know if there are any issues pulling, thanks.
Pulled, thank you.
^ permalink raw reply
* Failed to call bpf_l3_csum_replace() twice for IPIP tunnel
From: IMBRIUS AGER @ 2018-08-23 6:39 UTC (permalink / raw)
To: netdev
hello, I am trying to modify the src addr (both inner and outer) of IPIP tunnel.
this is the testing code:
=======================================
void *data = (void *)(long)skb->data;
void *data_end = (void *)(long)skb->data_end;
struct ethhdr *eth = data;
struct iphdr *ip_outer = (void *)(eth + 1);
if (ip_outer->ihl != 5 || ip_outer + 1 > data_end)
return;
struct iphdr *ip_inner = (void *)(ip4_outer + 1);
if (ip_inner->ihl != 5 || ip_inner + 1 > data_end)
return;
src = 0x11111111;
/* First I modify the inner ip */
bpf_l3_csum_replace(skb, IP4_CSUM_OFF + sizeof(struct iphdr),
ip_inner->saddr, src, sizeof(src));
bpf_skb_store_bytes(skb, IP4_SRC_OFF + sizeof(struct iphdr), &src,
sizeof(src), 0);
/* Second I modify the outer ip */
bpf_l3_csum_replace(skb, IP4_CSUM_OFF, ip_outer->saddr, src, sizeof(src));
bpf_skb_store_bytes(skb, IP4_SRC_OFF, &src, sizeof(src), 0);
========================================
I found that I could only modify one of the src addr (inner or outer).
If both, the kernel always rejected the code at the first
bpf_l3_csum_replace():
========================================
Prog section '__xxxxx' rejected: Permission denied (13)!
- Type: 3
- Instructions: 171 (0 over limit)
- License: GPL
.....
96: (85) call bpf_l3_csum_replace#10
97: (61) r4 = *(u32 *)(r7 +0)
R0=inv(id=0) R6=ctx(id=0,off=0,imm=0)
R7=map_value(id=0,off=0,ks=4,vs=4,imm=0) R8=inv(id=0) R9=inv(id=0)
R10=fp0
98: (61) r3 = *(u32 *)(r9 +26)
R9 invalid mem access 'inv'
Error fetching program/map!
Unable to load program
========================================
I tried to validate the pointer again before the second modification.
But nothing good has happened.
if (ip_outer->ihl != 5 || ip_outer + 1 > data_end)
return;
/* Second I modify the outer ip */
bpf_l3_csum_replace(skb, IP4_CSUM_OFF, ip_outer->saddr, src, sizeof(src));
bpf_skb_store_bytes(skb, IP4_SRC_OFF, &src, sizeof(src), 0);
Any idea?
Thanks very much
^ permalink raw reply
* Re: [PATCH iproute2 1/3] testsuite: remove all temp files and implement make clean
From: Stefan Bader @ 2018-08-23 7:07 UTC (permalink / raw)
To: Luca Boccassi, netdev; +Cc: stephen
In-Reply-To: <20180822180903.26443-1-bluca@debian.org>
[-- Attachment #1.1: Type: text/plain, Size: 1987 bytes --]
On 22.08.2018 20:09, Luca Boccassi wrote:
> Some generated test files were not removed, including one executable in
> the testsuite/tools directory.
> Ensure make clean from the top level directory works for the testsuite
> subdirs too, and that all the files are removed.
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
Patch 1+2 look good to me and I would ack if that would count in any way.
For patch 3 I only wonder whether that might re-use $PREFIX (which is
defined as "sudo -E unshare -n"). Ok, the unshare part might be slight
overkill, but maybe a little better in style. Not sure though, and it
is high level whining...
-Stefan
> Makefile | 2 +-
> testsuite/Makefile | 3 +++
> testsuite/tools/Makefile | 3 +++
> 3 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 651d2a50..ea2f797c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -96,7 +96,7 @@ snapshot:
> > include/SNAPSHOT.h
>
> clean:
> - @for i in $(SUBDIRS); \
> + @for i in $(SUBDIRS) testsuite; \
> do $(MAKE) $(MFLAGS) -C $$i clean; done
>
> clobber:
> diff --git a/testsuite/Makefile b/testsuite/Makefile
> index 8fcbc557..2acd0427 100644
> --- a/testsuite/Makefile
> +++ b/testsuite/Makefile
> @@ -43,6 +43,9 @@ alltests: $(TESTS)
> clean:
> @echo "Removing $(RESULTS_DIR) dir ..."
> @rm -rf $(RESULTS_DIR)
> + @rm -f iproute2/iproute2-this
> + @rm -f tests/ip/link/dev_wo_vf_rate.nl
> + $(MAKE) -C tools clean
>
> distclean: clean
> echo "Entering iproute2" && cd iproute2 && $(MAKE) distclean && cd ..;
> diff --git a/testsuite/tools/Makefile b/testsuite/tools/Makefile
> index f2cdc980..f0ce4ee2 100644
> --- a/testsuite/tools/Makefile
> +++ b/testsuite/tools/Makefile
> @@ -1,3 +1,6 @@
> # SPDX-License-Identifier: GPL-2.0
> generate_nlmsg: generate_nlmsg.c ../../lib/libnetlink.c
> $(CC) -o $@ $^
> +
> +clean:
> + rm -f generate_nlmsg
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ 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