Netdev List
 help / color / mirror / Atom feed
* [PATCH net 2/2] net: mediatek: remove superfluous pin setup for MT7622 SoC
From: sean.wang @ 2017-12-20  9:47 UTC (permalink / raw)
  To: robh+dt, davem, mark.rutland
  Cc: matthias.bgg, john, nbd, nelson.chang, devicetree,
	linux-arm-kernel, netdev, linux-kernel, linux-mediatek, Sean Wang
In-Reply-To: <e366efc29985d3292c8a1afb1389b5eac57c9037.1513762066.git.sean.wang@mediatek.com>

From: Sean Wang <sean.wang@mediatek.com>

Remove superfluous pin setup to get out of accessing invalid I/O pin
registers because the way for pin configuring tends to be different from
various SoCs and thus it should be better being managed and controlled by
the pinctrl driver which MT7622 already can support.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 35 +++++++++++++++++------------
 drivers/net/ethernet/mediatek/mtk_eth_soc.h |  3 +++
 2 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index fc67e35..29826dd 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1952,14 +1952,16 @@ static int mtk_hw_init(struct mtk_eth *eth)
 	}
 	regmap_write(eth->ethsys, ETHSYS_SYSCFG0, val);
 
-	/* Set GE2 driving and slew rate */
-	regmap_write(eth->pctl, GPIO_DRV_SEL10, 0xa00);
+	if (eth->pctl) {
+		/* Set GE2 driving and slew rate */
+		regmap_write(eth->pctl, GPIO_DRV_SEL10, 0xa00);
 
-	/* set GE2 TDSEL */
-	regmap_write(eth->pctl, GPIO_OD33_CTRL8, 0x5);
+		/* set GE2 TDSEL */
+		regmap_write(eth->pctl, GPIO_OD33_CTRL8, 0x5);
 
-	/* set GE2 TUNE */
-	regmap_write(eth->pctl, GPIO_BIAS_CTRL, 0x0);
+		/* set GE2 TUNE */
+		regmap_write(eth->pctl, GPIO_BIAS_CTRL, 0x0);
+	}
 
 	/* Set linkdown as the default for each GMAC. Its own MCR would be set
 	 * up with the more appropriate value when mtk_phy_link_adjust call is
@@ -2538,11 +2540,13 @@ static int mtk_probe(struct platform_device *pdev)
 		}
 	}
 
-	eth->pctl = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
-						    "mediatek,pctl");
-	if (IS_ERR(eth->pctl)) {
-		dev_err(&pdev->dev, "no pctl regmap found\n");
-		return PTR_ERR(eth->pctl);
+	if (eth->soc->required_pctl) {
+		eth->pctl = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
+							    "mediatek,pctl");
+		if (IS_ERR(eth->pctl)) {
+			dev_err(&pdev->dev, "no pctl regmap found\n");
+			return PTR_ERR(eth->pctl);
+		}
 	}
 
 	for (i = 0; i < 3; i++) {
@@ -2668,17 +2672,20 @@ static int mtk_remove(struct platform_device *pdev)
 
 static const struct mtk_soc_data mt2701_data = {
 	.caps = MTK_GMAC1_TRGMII,
-	.required_clks = MT7623_CLKS_BITMAP
+	.required_clks = MT7623_CLKS_BITMAP,
+	.required_pctl = true,
 };
 
 static const struct mtk_soc_data mt7622_data = {
 	.caps = MTK_DUAL_GMAC_SHARED_SGMII | MTK_GMAC1_ESW,
-	.required_clks = MT7622_CLKS_BITMAP
+	.required_clks = MT7622_CLKS_BITMAP,
+	.required_pctl = false,
 };
 
 static const struct mtk_soc_data mt7623_data = {
 	.caps = MTK_GMAC1_TRGMII,
-	.required_clks = MT7623_CLKS_BITMAP
+	.required_clks = MT7623_CLKS_BITMAP,
+	.required_pctl = true,
 };
 
 const struct of_device_id of_mtk_match[] = {
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
index a3af466..672b8c3 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -573,10 +573,13 @@ struct mtk_rx_ring {
  * @caps			Flags shown the extra capability for the SoC
  * @required_clks		Flags shown the bitmap for required clocks on
  *				the target SoC
+ * @required_pctl		A bool value to show whether the SoC requires
+ *				the extra setup for those pins used by GMAC.
  */
 struct mtk_soc_data {
 	u32		caps;
 	u32		required_clks;
+	bool		required_pctl;
 };
 
 /* currently no SoC has more than 2 macs */
-- 
2.7.4

^ permalink raw reply related

* Re: [PATCH v4 33/36] net: faraday add nds32 support.
From: kbuild test robot @ 2017-12-20  9:54 UTC (permalink / raw)
  To: Greentime Hu
  Cc: kbuild-all, greentime, linux-kernel, arnd, linux-arch, tglx,
	jason, marc.zyngier, robh+dt, netdev, deanbo422, devicetree, viro,
	dhowells, will.deacon, daniel.lezcano, linux-serial,
	geert.uytterhoeven, linus.walleij, mark.rutland, greg, ren_guo,
	pombredanne, green.hu
In-Reply-To: <95be78502aa406f106ecbe87e751a45333883b1f.1513577007.git.green.hu@gmail.com>

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

Hi Greentime,

I love your patch! Perhaps something to improve:

[auto build test WARNING on tip/timers/core]
[cannot apply to linus/master v4.15-rc4 next-20171220]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Greentime-Hu/Andes-nds32-Linux-Kernel/20171220-155937
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/faraday/ftmac100.c: In function 'ftmac100_rxdes_set_page':
>> drivers/net/ethernet/faraday/ftmac100.c:288:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     rxdes->rxdes3 = (unsigned int)page;
                     ^
   drivers/net/ethernet/faraday/ftmac100.c: In function 'ftmac100_rxdes_get_page':
>> drivers/net/ethernet/faraday/ftmac100.c:293:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     return (struct page *)rxdes->rxdes3;
            ^
   drivers/net/ethernet/faraday/ftmac100.c: In function 'ftmac100_txdes_set_skb':
   drivers/net/ethernet/faraday/ftmac100.c:548:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     txdes->txdes3 = (unsigned int)skb;
                     ^
   drivers/net/ethernet/faraday/ftmac100.c: In function 'ftmac100_txdes_get_skb':
   drivers/net/ethernet/faraday/ftmac100.c:553:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     return (struct sk_buff *)txdes->txdes3;
            ^

vim +288 drivers/net/ethernet/faraday/ftmac100.c

8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28  281  
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28  282  /*
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28  283   * rxdes3 is not used by hardware. We use it to keep track of page.
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28  284   * Since hardware does not touch it, we can skip cpu_to_le32()/le32_to_cpu().
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28  285   */
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28  286  static void ftmac100_rxdes_set_page(struct ftmac100_rxdes *rxdes, struct page *page)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28  287  {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 @288  	rxdes->rxdes3 = (unsigned int)page;
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28  289  }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28  290  
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28  291  static struct page *ftmac100_rxdes_get_page(struct ftmac100_rxdes *rxdes)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28  292  {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 @293  	return (struct page *)rxdes->rxdes3;
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28  294  }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28  295  

:::::: The code at line 288 was first introduced by commit
:::::: 8d77c036b57cf813d838f859e11b6a188acdb1fb net: add Faraday FTMAC100 10/100 Ethernet driver

:::::: TO: Po-Yu Chuang <ratbert@faraday-tech.com>
:::::: CC: David S. Miller <davem@davemloft.net>

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

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

^ permalink raw reply

* Re: [PATCH v4 33/36] net: faraday add nds32 support.
From: Geert Uytterhoeven @ 2017-12-20  9:58 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Greentime Hu, kbuild-all-JC7UmRfGjtg, Greentime,
	Linux Kernel Mailing List, Arnd Bergmann, Linux-Arch,
	Thomas Gleixner, Jason Cooper, Marc Zyngier, Rob Herring,
	netdev-u79uwXL29TY76Z2rM5mHXA, Vincent Chen,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Al Viro, David Howells,
	Will Deacon, Daniel Lezcano, linux-serial-u79uwXL29TY76Z2rM5mHXA,
	Linus Walleij, Mark Rutland, Greg KH,
	ren_guo-Y+KPrCd2zL4AvxtiuMwx3w
In-Reply-To: <201712201744.gsBDa4yK%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

On Wed, Dec 20, 2017 at 10:54 AM, kbuild test robot <lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
> I love your patch! Perhaps something to improve:
>
> [auto build test WARNING on tip/timers/core]
> [cannot apply to linus/master v4.15-rc4 next-20171220]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url:    https://github.com/0day-ci/linux/commits/Greentime-Hu/Andes-nds32-Linux-Kernel/20171220-155937
> config: sparc64-allyesconfig (attached as .config)
> compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=sparc64
>
> All warnings (new ones prefixed by >>):
>
>    drivers/net/ethernet/faraday/ftmac100.c: In function 'ftmac100_rxdes_set_page':
>>> drivers/net/ethernet/faraday/ftmac100.c:288:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>      rxdes->rxdes3 = (unsigned int)page;
>                      ^

The proper way to casts pointer to integers is to cast to "uintptr_t".

However, the address is stored in a 32-bit descriptor, which means it can
not work on 64-bit platforms.

Please make the driver depend on "!64BIT || BROKEN"

Cfr. commit 15bfe05c8d6386f1 ("net: ethernet: xilinx: Mark XILINX_LL_TEMAC
broken on 64-bit")

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH v5 3/6] perf: implement pmu perf_kprobe
From: Peter Zijlstra @ 2017-12-20 10:03 UTC (permalink / raw)
  To: Song Liu; +Cc: rostedt, mingo, davem, netdev, linux-kernel, daniel, kernel-team
In-Reply-To: <20171206224518.3598254-6-songliubraving@fb.com>

On Wed, Dec 06, 2017 at 02:45:15PM -0800, Song Liu wrote:
> @@ -8537,7 +8620,7 @@ static int perf_event_set_filter(struct perf_event *event, void __user *arg)
>  	char *filter_str;
>  	int ret = -EINVAL;
>  
> -	if ((event->attr.type != PERF_TYPE_TRACEPOINT ||
> +	if ((!perf_event_is_tracing(event) ||
>  	     !IS_ENABLED(CONFIG_EVENT_TRACING)) &&
>  	    !has_addr_filter(event))
>  		return -EINVAL;

You actually missed an instance later in this same function... fixing
that.

^ permalink raw reply

* [net  1/1] tipc: remove joining group member from congested list
From: Jon Maloy @ 2017-12-20 10:03 UTC (permalink / raw)
  To: davem, netdev
  Cc: mohan.krishna.ghanta.krishnamurthy, tung.q.nguyen, hoang.h.le,
	jon.maloy, canh.d.luu, ying.xue, tipc-discussion

When we receive a JOIN message from a peer member, the message may
contain an advertised window value ADV_IDLE that permits removing the
member in question from the tipc_group::congested list. However, since
the removal has been made conditional on that the advertised window is
*not* ADV_IDLE, we miss this case. This has the effect that a sender
sometimes may enter a state of permanent, false, broadcast congestion.

We fix this by unconditinally removing the member from the congested
list before calling tipc_member_update(), which might potentially sort
it into the list again.

Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
---
 net/tipc/group.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/tipc/group.c b/net/tipc/group.c
index bbc004e..7ebbdeb 100644
--- a/net/tipc/group.c
+++ b/net/tipc/group.c
@@ -689,10 +689,8 @@ void tipc_group_proto_rcv(struct tipc_group *grp, bool *usr_wakeup,
 			msg_set_grp_bc_seqno(ehdr, m->bc_syncpt);
 			__skb_queue_tail(inputq, m->event_msg);
 		}
-		if (m->window < ADV_IDLE)
-			tipc_group_update_member(m, 0);
-		else
-			list_del_init(&m->congested);
+		list_del_init(&m->congested);
+		tipc_group_update_member(m, 0);
 		return;
 	case GRP_LEAVE_MSG:
 		if (!m)
-- 
2.1.4

^ permalink raw reply related

* Re: [PATCH v3 net-next 0/6] tls: Add generic NIC offload infrastructure
From: Jiri Pirko @ 2017-12-20 10:08 UTC (permalink / raw)
  To: Boris Pismenny
  Cc: Ilya Lesokhin, netdev@vger.kernel.org, davem@davemloft.net,
	davejwatson@fb.com, tom@herbertland.com,
	hannes@stressinduktion.org, Aviad Yehezkel, Liran Liss
In-Reply-To: <HE1PR0501MB223554DC2840A95B594ED0D1B00C0@HE1PR0501MB2235.eurprd05.prod.outlook.com>

Wed, Dec 20, 2017 at 09:28:03AM CET, borisp@mellanox.com wrote:
>
>> Tue, Dec 19, 2017 at 01:10:10AM CET, jiri@resnulli.us wrote:
>> 
>> Mon, Dec 18, 2017 at 06:10:10PM CET, jiri@resnulli.us wrote:
>> >Mon, Dec 18, 2017 at 12:10:27PM CET, ilyal@mellanox.com wrote:
>> >>Changes from v2:
>> >>- Fix sk use after free and possible netdev use after free
>> >>- tls device now keeps a refernce on the offloading netdev
>> >>- tls device registers to the netdev notifer.
>> >>  Upon a NETDEV_DOWN event, offload is stopped and
>> >>  the reference on the netdev is dropped.
>> >>- SW fallback support for skb->ip_summed != CHECKSUM_PARTIAL
>> >>- Merged TLS patches are no longer part of this series.
>> >>
>> >>Changes from v1:
>> >>- Remove the binding of the socket to a specific netdev
>> >>  through sk->sk_bound_dev_if.
>> >>  Add a check in validate_xmit_skb to detect route changes
>> >>  and call SW fallback code to do the crypto in software.
>> >>- tls_get_record now returns the tls record sequence number.
>> >>  This is required to support connections with rcd_sn != iv.
>> >>- Bug fixes to the TLS code.
>> >>
>> >>This patchset adds a generic infrastructure to offload TLS crypto to a
>> >>network devices.
>> >>
>> >>patches 1-2 Export functions that we need patch 3 adds infrastructue
>> >>for offloaded socket fallback patches 4-5 add new NDOs and
>> >>capabilities.
>> >>patch 6 adds the TLS NIC offload infrastructure.
>> >>
>> >>Github with mlx5e TLS offload support:
>> >>https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2F
>> git
>> >>hub.com%2FMellanox%2Ftls-
>> offload%2Ftree%2Ftls_device_v3&data=02%7C01%7
>> >>Cborisp%40mellanox.com%7C5aebe81262554f40221908d546cb7c37%7Ca6
>> 52971c7d
>> >>2e4d9ba6a4d149256f461b%7C0%7C0%7C636492762141202894&sdata=gYY
>> DEmspNfBs
>> >>aQhefcEojl456L9eWqZnEEI7iPCT0NA%3D&reserved=0
>> >
>> >I don't get it. You are pushing infra but not the actual driver part
>> >who is consuming the infra? Why?
>> 
>> Okay. Since the driver that uses the API introduced by this patchset is
>> missing, this patchset should be marked as RFC.
>> 
>> Dave, I see that you were about to apply v2. I'm sure you missed this.
>> Thanks.
>
>Isn't this a chicken and egg problem, where something must come first,
>driver or infra. Unless we combine the infra patches with mlx5 driver
>code and submit both in a single pull request.

Yes, you should submit that in a single patchset. That is the usual way.
Thanks.


>Here, we assumed that the infra goes first, and we will submit the
>driver soon after. We could submit the driver first instead.

No. You cannot do that like this.


>
>Dave, would you prefer to get the driver patches that use this infra before
>the infra?
>
>

^ permalink raw reply

* Re: [PATCH v10 1/5] add infrastructure for tagging functions as error injectable
From: Daniel Borkmann @ 2017-12-20 10:09 UTC (permalink / raw)
  To: Masami Hiramatsu, Alexei Starovoitov
  Cc: Josef Bacik, rostedt, mingo, davem, netdev, linux-kernel, ast,
	kernel-team, linux-btrfs, darrick.wong, Josef Bacik
In-Reply-To: <20171220161342.44443047f186b7a62efdfe1a@kernel.org>

On 12/20/2017 08:13 AM, Masami Hiramatsu wrote:
> On Tue, 19 Dec 2017 18:14:17 -0800
> Alexei Starovoitov <ast@fb.com> wrote:
[...]
>> Please make your suggestion as patches based on top of bpf-next.
> 
> bpf-next seems already pick this series. Would you mean I revert it and
> write new patch?

No, please submit as follow-ups instead, thanks Masami!

^ permalink raw reply

* Re: [PATCH v4 01/36] asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU
From: kbuild test robot @ 2017-12-20 10:09 UTC (permalink / raw)
  To: Greentime Hu
  Cc: kbuild-all, greentime, linux-kernel, arnd, linux-arch, tglx,
	jason, marc.zyngier, robh+dt, netdev, deanbo422, devicetree, viro,
	dhowells, will.deacon, daniel.lezcano, linux-serial,
	geert.uytterhoeven, linus.walleij, mark.rutland, greg, ren_guo,
	pombredanne, green.hu, Vincent Chen
In-Reply-To: <d25ea659bc370a6bb24c4d42416f890a34051df1.1513577007.git.green.hu@gmail.com>

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

Hi Greentime,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/timers/core]
[also build test ERROR on v4.15-rc4 next-20171220]
[cannot apply to linus/master]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Greentime-Hu/Andes-nds32-Linux-Kernel/20171220-155937
config: sparc-defconfig (attached as .config)
compiler: sparc-linux-gcc (GCC) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sparc 

All error/warnings (new ones prefixed by >>):

   In file included from arch/sparc/include/asm/io.h:6:0,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from arch/sparc/kernel/kernel.h:4,
                    from arch/sparc/kernel/traps_32.c:30:
>> arch/sparc/include/asm/io_32.h:129:15: error: conflicting types for 'ioremap'
    void __iomem *ioremap(unsigned long offset, unsigned long size);
                  ^~~~~~~
   In file included from arch/sparc/include/asm/io_32.h:13:0,
                    from arch/sparc/include/asm/io.h:6,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from arch/sparc/kernel/kernel.h:4,
                    from arch/sparc/kernel/traps_32.c:30:
   include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
    void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
                  ^~~~~~~
   In file included from arch/sparc/include/asm/io.h:6:0,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from arch/sparc/kernel/kernel.h:4,
                    from arch/sparc/kernel/traps_32.c:30:
   arch/sparc/include/asm/io_32.h:130:0: error: "ioremap_nocache" redefined [-Werror]
    #define ioremap_nocache(X,Y) ioremap((X),(Y))
    
   In file included from arch/sparc/include/asm/io_32.h:13:0,
                    from arch/sparc/include/asm/io.h:6,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from arch/sparc/kernel/kernel.h:4,
                    from arch/sparc/kernel/traps_32.c:30:
   include/asm-generic/io.h:865:0: note: this is the location of the previous definition
    #define ioremap_nocache ioremap_nocache
    
   In file included from arch/sparc/include/asm/io.h:6:0,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from arch/sparc/kernel/kernel.h:4,
                    from arch/sparc/kernel/traps_32.c:30:
   arch/sparc/include/asm/io_32.h:131:0: error: "ioremap_wc" redefined [-Werror]
    #define ioremap_wc(X,Y)  ioremap((X),(Y))
    
   In file included from arch/sparc/include/asm/io_32.h:13:0,
                    from arch/sparc/include/asm/io.h:6,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from arch/sparc/kernel/kernel.h:4,
                    from arch/sparc/kernel/traps_32.c:30:
   include/asm-generic/io.h:881:0: note: this is the location of the previous definition
    #define ioremap_wc ioremap_wc
    
   In file included from arch/sparc/include/asm/io.h:6:0,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from arch/sparc/kernel/kernel.h:4,
                    from arch/sparc/kernel/traps_32.c:30:
   arch/sparc/include/asm/io_32.h:132:0: error: "ioremap_wt" redefined [-Werror]
    #define ioremap_wt(X,Y)  ioremap((X),(Y))
    
   In file included from arch/sparc/include/asm/io_32.h:13:0,
                    from arch/sparc/include/asm/io.h:6,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from arch/sparc/kernel/kernel.h:4,
                    from arch/sparc/kernel/traps_32.c:30:
   include/asm-generic/io.h:889:0: note: this is the location of the previous definition
    #define ioremap_wt ioremap_wt
    
   cc1: all warnings being treated as errors
--
   In file included from arch/sparc/include/asm/io.h:6:0,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc/kernel/ioport.c:36:
>> arch/sparc/include/asm/io_32.h:129:15: error: conflicting types for 'ioremap'
    void __iomem *ioremap(unsigned long offset, unsigned long size);
                  ^~~~~~~
   In file included from arch/sparc/include/asm/io_32.h:13:0,
                    from arch/sparc/include/asm/io.h:6,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc/kernel/ioport.c:36:
   include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
    void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
                  ^~~~~~~
   In file included from arch/sparc/include/asm/io.h:6:0,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc/kernel/ioport.c:36:
   arch/sparc/include/asm/io_32.h:130:0: error: "ioremap_nocache" redefined [-Werror]
    #define ioremap_nocache(X,Y) ioremap((X),(Y))
    
   In file included from arch/sparc/include/asm/io_32.h:13:0,
                    from arch/sparc/include/asm/io.h:6,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc/kernel/ioport.c:36:
   include/asm-generic/io.h:865:0: note: this is the location of the previous definition
    #define ioremap_nocache ioremap_nocache
    
   In file included from arch/sparc/include/asm/io.h:6:0,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc/kernel/ioport.c:36:
   arch/sparc/include/asm/io_32.h:131:0: error: "ioremap_wc" redefined [-Werror]
    #define ioremap_wc(X,Y)  ioremap((X),(Y))
    
   In file included from arch/sparc/include/asm/io_32.h:13:0,
                    from arch/sparc/include/asm/io.h:6,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc/kernel/ioport.c:36:
   include/asm-generic/io.h:881:0: note: this is the location of the previous definition
    #define ioremap_wc ioremap_wc
    
   In file included from arch/sparc/include/asm/io.h:6:0,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc/kernel/ioport.c:36:
   arch/sparc/include/asm/io_32.h:132:0: error: "ioremap_wt" redefined [-Werror]
    #define ioremap_wt(X,Y)  ioremap((X),(Y))
    
   In file included from arch/sparc/include/asm/io_32.h:13:0,
                    from arch/sparc/include/asm/io.h:6,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc/kernel/ioport.c:36:
   include/asm-generic/io.h:889:0: note: this is the location of the previous definition
    #define ioremap_wt ioremap_wt
    
>> arch/sparc/kernel/ioport.c:124:15: error: conflicting types for 'ioremap'
    void __iomem *ioremap(unsigned long offset, unsigned long size)
                  ^~~~~~~
   In file included from arch/sparc/include/asm/io_32.h:13:0,
                    from arch/sparc/include/asm/io.h:6,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc/kernel/ioport.c:36:
   include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
    void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
                  ^~~~~~~
   In file included from include/linux/linkage.h:6:0,
                    from include/linux/kernel.h:6,
                    from include/linux/list.h:8,
                    from include/linux/module.h:9,
                    from arch/sparc/kernel/ioport.c:28:
   arch/sparc/kernel/ioport.c:131:15: error: conflicting types for 'ioremap'
    EXPORT_SYMBOL(ioremap);
                  ^
   include/linux/export.h:65:21: note: in definition of macro '___EXPORT_SYMBOL'
     extern typeof(sym) sym;      \
                        ^~~
>> arch/sparc/kernel/ioport.c:131:1: note: in expansion of macro 'EXPORT_SYMBOL'
    EXPORT_SYMBOL(ioremap);
    ^~~~~~~~~~~~~
   In file included from arch/sparc/include/asm/io_32.h:13:0,
                    from arch/sparc/include/asm/io.h:6,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc/kernel/ioport.c:36:
   include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
    void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
                  ^~~~~~~
   cc1: all warnings being treated as errors
--
   In file included from arch/sparc/include/asm/io.h:6:0,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc//kernel/ioport.c:36:
>> arch/sparc/include/asm/io_32.h:129:15: error: conflicting types for 'ioremap'
    void __iomem *ioremap(unsigned long offset, unsigned long size);
                  ^~~~~~~
   In file included from arch/sparc/include/asm/io_32.h:13:0,
                    from arch/sparc/include/asm/io.h:6,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc//kernel/ioport.c:36:
   include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
    void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
                  ^~~~~~~
   In file included from arch/sparc/include/asm/io.h:6:0,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc//kernel/ioport.c:36:
   arch/sparc/include/asm/io_32.h:130:0: error: "ioremap_nocache" redefined [-Werror]
    #define ioremap_nocache(X,Y) ioremap((X),(Y))
    
   In file included from arch/sparc/include/asm/io_32.h:13:0,
                    from arch/sparc/include/asm/io.h:6,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc//kernel/ioport.c:36:
   include/asm-generic/io.h:865:0: note: this is the location of the previous definition
    #define ioremap_nocache ioremap_nocache
    
   In file included from arch/sparc/include/asm/io.h:6:0,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc//kernel/ioport.c:36:
   arch/sparc/include/asm/io_32.h:131:0: error: "ioremap_wc" redefined [-Werror]
    #define ioremap_wc(X,Y)  ioremap((X),(Y))
    
   In file included from arch/sparc/include/asm/io_32.h:13:0,
                    from arch/sparc/include/asm/io.h:6,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc//kernel/ioport.c:36:
   include/asm-generic/io.h:881:0: note: this is the location of the previous definition
    #define ioremap_wc ioremap_wc
    
   In file included from arch/sparc/include/asm/io.h:6:0,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc//kernel/ioport.c:36:
   arch/sparc/include/asm/io_32.h:132:0: error: "ioremap_wt" redefined [-Werror]
    #define ioremap_wt(X,Y)  ioremap((X),(Y))
    
   In file included from arch/sparc/include/asm/io_32.h:13:0,
                    from arch/sparc/include/asm/io.h:6,
                    from include/linux/io.h:25,
                    from include/linux/irq.h:24,
                    from include/asm-generic/hardirq.h:12,
                    from arch/sparc/include/asm/hardirq_32.h:10,
                    from arch/sparc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:8,
                    from include/linux/interrupt.h:12,
                    from include/linux/pci.h:31,
                    from arch/sparc//kernel/ioport.c:36:
   include/asm-generic/io.h:889:0: note: this is the location of the previous definition
    #define ioremap_wt ioremap_wt
    
   arch/sparc//kernel/ioport.c:124:15: error: conflicting types for 'ioremap'
    void __iomem *ioremap(unsigned long offset, unsigned long size)
                  ^~~~~~~

vim +/ioremap +129 arch/sparc/include/asm/io_32.h

f5e706ad include/asm-sparc/io_32.h      Sam Ravnborg    2008-07-17  124  
f5e706ad include/asm-sparc/io_32.h      Sam Ravnborg    2008-07-17  125  /*
f5e706ad include/asm-sparc/io_32.h      Sam Ravnborg    2008-07-17  126   * Bus number may be embedded in the higher bits of the physical address.
f5e706ad include/asm-sparc/io_32.h      Sam Ravnborg    2008-07-17  127   * This is why we have no bus number argument to ioremap().
f5e706ad include/asm-sparc/io_32.h      Sam Ravnborg    2008-07-17  128   */
f05a6865 arch/sparc/include/asm/io_32.h Sam Ravnborg    2014-05-16 @129  void __iomem *ioremap(unsigned long offset, unsigned long size);
f5e706ad include/asm-sparc/io_32.h      Sam Ravnborg    2008-07-17  130  #define ioremap_nocache(X,Y)	ioremap((X),(Y))
428695b8 include/asm-sparc/io_32.h      David S. Miller 2008-07-22  131  #define ioremap_wc(X,Y)		ioremap((X),(Y))
556269c1 arch/sparc/include/asm/io_32.h Toshi Kani      2015-06-04  132  #define ioremap_wt(X,Y)		ioremap((X),(Y))
f05a6865 arch/sparc/include/asm/io_32.h Sam Ravnborg    2014-05-16  133  void iounmap(volatile void __iomem *addr);
f5e706ad include/asm-sparc/io_32.h      Sam Ravnborg    2008-07-17  134  

:::::: The code at line 129 was first introduced by commit
:::::: f05a68653e56ca2f23bccf7e50be69486886f052 sparc: drop use of extern for prototypes in arch/sparc/include/asm

:::::: TO: Sam Ravnborg <sam@ravnborg.org>
:::::: CC: David S. Miller <davem@davemloft.net>

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

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

^ permalink raw reply

* Re: [PATCH v4 01/36] asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU
From: kbuild test robot @ 2017-12-20 10:10 UTC (permalink / raw)
  To: Greentime Hu
  Cc: kbuild-all, greentime, linux-kernel, arnd, linux-arch, tglx,
	jason, marc.zyngier, robh+dt, netdev, deanbo422, devicetree, viro,
	dhowells, will.deacon, daniel.lezcano, linux-serial,
	geert.uytterhoeven, linus.walleij, mark.rutland, greg, ren_guo,
	pombredanne, green.hu, Vincent Chen
In-Reply-To: <d25ea659bc370a6bb24c4d42416f890a34051df1.1513577007.git.green.hu@gmail.com>

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

Hi Greentime,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/timers/core]
[also build test ERROR on v4.15-rc4 next-20171220]
[cannot apply to linus/master]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Greentime-Hu/Andes-nds32-Linux-Kernel/20171220-155937
config: openrisc-or1ksim_defconfig (attached as .config)
compiler: or1k-linux-gcc (GCC) 6.0.0 20160327 (experimental)
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=openrisc 

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/io.h:25:0,
                    from arch/openrisc/kernel/asm-offsets.c:35:
>> arch/openrisc/include/asm/io.h:38:29: error: conflicting types for 'ioremap'
    static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
                                ^~~~~~~
   In file included from arch/openrisc/include/asm/io.h:32:0,
                    from include/linux/io.h:25,
                    from arch/openrisc/kernel/asm-offsets.c:35:
   include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
    void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
                  ^~~~~~~
   include/asm-generic/io.h:865:25: error: conflicting types for 'ioremap_nocache'
    #define ioremap_nocache ioremap_nocache
                            ^
>> arch/openrisc/include/asm/io.h:44:29: note: in expansion of macro 'ioremap_nocache'
    static inline void __iomem *ioremap_nocache(phys_addr_t offset,
                                ^~~~~~~~~~~~~~~
   include/asm-generic/io.h:865:25: note: previous definition of 'ioremap_nocache' was here
    #define ioremap_nocache ioremap_nocache
                            ^
   include/asm-generic/io.h:866:29: note: in expansion of macro 'ioremap_nocache'
    static inline void __iomem *ioremap_nocache(phys_addr_t offset, size_t size)
                                ^~~~~~~~~~~~~~~
   make[2]: *** [arch/openrisc/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [sub-make] Error 2

vim +/ioremap +38 arch/openrisc/include/asm/io.h

58e0166a Jonas Bonn  2011-06-04  31  
58e0166a Jonas Bonn  2011-06-04 @32  #include <asm-generic/io.h>
9b04ebd1 James Hogan 2012-10-23  33  #include <asm/pgtable.h>
58e0166a Jonas Bonn  2011-06-04  34  
58e0166a Jonas Bonn  2011-06-04  35  extern void __iomem *__ioremap(phys_addr_t offset, unsigned long size,
58e0166a Jonas Bonn  2011-06-04  36  				pgprot_t prot);
58e0166a Jonas Bonn  2011-06-04  37  
58e0166a Jonas Bonn  2011-06-04 @38  static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
58e0166a Jonas Bonn  2011-06-04  39  {
58e0166a Jonas Bonn  2011-06-04  40  	return __ioremap(offset, size, PAGE_KERNEL);
58e0166a Jonas Bonn  2011-06-04  41  }
58e0166a Jonas Bonn  2011-06-04  42  
58e0166a Jonas Bonn  2011-06-04  43  /* #define _PAGE_CI       0x002 */
58e0166a Jonas Bonn  2011-06-04 @44  static inline void __iomem *ioremap_nocache(phys_addr_t offset,
58e0166a Jonas Bonn  2011-06-04  45  					     unsigned long size)
58e0166a Jonas Bonn  2011-06-04  46  {
58e0166a Jonas Bonn  2011-06-04  47  	return __ioremap(offset, size,
58e0166a Jonas Bonn  2011-06-04  48  			 __pgprot(pgprot_val(PAGE_KERNEL) | _PAGE_CI));
58e0166a Jonas Bonn  2011-06-04  49  }
58e0166a Jonas Bonn  2011-06-04  50  

:::::: The code at line 38 was first introduced by commit
:::::: 58e0166a4772aaeb10c9b0f6d59f19099d2047df OpenRISC: Headers

:::::: TO: Jonas Bonn <jonas@southpole.se>
:::::: CC: Jonas Bonn <jonas@southpole.se>

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

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

^ permalink raw reply

* Re: [PATCH v5 3/6] perf: implement pmu perf_kprobe
From: Peter Zijlstra @ 2017-12-20 10:14 UTC (permalink / raw)
  To: Song Liu; +Cc: rostedt, mingo, davem, netdev, linux-kernel, daniel, kernel-team
In-Reply-To: <20171220100301.bvacqfua4hj2onzq@hirez.programming.kicks-ass.net>

On Wed, Dec 20, 2017 at 11:03:01AM +0100, Peter Zijlstra wrote:
> On Wed, Dec 06, 2017 at 02:45:15PM -0800, Song Liu wrote:
> > @@ -8537,7 +8620,7 @@ static int perf_event_set_filter(struct perf_event *event, void __user *arg)
> >  	char *filter_str;
> >  	int ret = -EINVAL;
> >  
> > -	if ((event->attr.type != PERF_TYPE_TRACEPOINT ||
> > +	if ((!perf_event_is_tracing(event) ||
> >  	     !IS_ENABLED(CONFIG_EVENT_TRACING)) &&
> >  	    !has_addr_filter(event))
> >  		return -EINVAL;
> 
> You actually missed an instance later in this same function... fixing
> that.


@@ -8518,23 +8601,19 @@ perf_event_set_addr_filter(struct perf_e
 
 static int perf_event_set_filter(struct perf_event *event, void __user *arg)
 {
-	char *filter_str;
 	int ret = -EINVAL;
-
-	if ((event->attr.type != PERF_TYPE_TRACEPOINT ||
-	    !IS_ENABLED(CONFIG_EVENT_TRACING)) &&
-	    !has_addr_filter(event))
-		return -EINVAL;
+	char *filter_str;
 
 	filter_str = strndup_user(arg, PAGE_SIZE);
 	if (IS_ERR(filter_str))
 		return PTR_ERR(filter_str);
 
-	if (IS_ENABLED(CONFIG_EVENT_TRACING) &&
-	    event->attr.type == PERF_TYPE_TRACEPOINT)
-		ret = ftrace_profile_set_filter(event, event->attr.config,
-						filter_str);
-	else if (has_addr_filter(event))
+#ifdef CONFIG_EVENT_TRACING
+	if (perf_event_is_tracing(event))
+		ret = ftrace_profile_set_filter(event, event->attr.config, filter_str);
+	else
+#endif
+	if (has_addr_filter(event))
 		ret = perf_event_set_addr_filter(event, filter_str);
 
 	kfree(filter_str);



Is that right?

^ permalink raw reply

* Re: [PATCH v3 net-next 0/6] tls: Add generic NIC offload infrastructure
From: Or Gerlitz @ 2017-12-20 10:15 UTC (permalink / raw)
  To: Boris Pismenny
  Cc: Jiri Pirko, Ilya Lesokhin, netdev@vger.kernel.org,
	davem@davemloft.net, davejwatson@fb.com, tom@herbertland.com,
	hannes@stressinduktion.org, Aviad Yehezkel, Liran Liss
In-Reply-To: <HE1PR0501MB223554DC2840A95B594ED0D1B00C0@HE1PR0501MB2235.eurprd05.prod.outlook.com>

On Wed, Dec 20, 2017 at 10:28 AM, Boris Pismenny <borisp@mellanox.com> wrote:

> Isn't this a chicken and egg problem, where something must come first,
> driver or infra. Unless we combine the infra patches with mlx5 driver
> code and submit both in a single pull request.

why chicken and egg? you do the infra changes and apply them on the driver.

> Here, we assumed that the infra goes first, and we will submit the
> driver soon after. We could submit the driver first instead.

NOo Boris,

It is fundamental requirement to show a use-case along with infra-structure.

Or.

^ permalink raw reply

* Re: [PATCH bpf-next 6/8] bpf: offload: report device information for offloaded programs
From: Daniel Borkmann @ 2017-12-20 10:19 UTC (permalink / raw)
  To: Jakub Kicinski, netdev, alexei.starovoitov
  Cc: ktkhai, oss-drivers, Eric W . Biederman
In-Reply-To: <20171220041006.25629-7-jakub.kicinski@netronome.com>

On 12/20/2017 05:10 AM, Jakub Kicinski wrote:
> Report to the user ifindex and namespace information of offloaded
> programs.  If device has disappeared return -ENODEV.  Specify the
> namespace using dev/inode combination.
> 
> CC: Eric W. Biederman <ebiederm@xmission.com>
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>

Eric, would be great if you have a chance to review the nsfs bits, thanks a lot!

> ---
>  fs/nsfs.c                      |  2 +-
>  include/linux/bpf.h            |  2 ++
>  include/linux/proc_ns.h        |  1 +
>  include/uapi/linux/bpf.h       |  3 +++
>  kernel/bpf/offload.c           | 39 +++++++++++++++++++++++++++++++++++++++
>  kernel/bpf/syscall.c           |  6 ++++++
>  tools/include/uapi/linux/bpf.h |  3 +++
>  7 files changed, 55 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/nsfs.c b/fs/nsfs.c
> index 7c6f76d29f56..e50628675935 100644
> --- a/fs/nsfs.c
> +++ b/fs/nsfs.c
> @@ -51,7 +51,7 @@ static void nsfs_evict(struct inode *inode)
>  	ns->ops->put(ns);
>  }
>  
> -static void *__ns_get_path(struct path *path, struct ns_common *ns)
> +void *__ns_get_path(struct path *path, struct ns_common *ns)
>  {
>  	struct vfsmount *mnt = nsfs_mnt;
>  	struct dentry *dentry;
> diff --git a/include/linux/bpf.h b/include/linux/bpf.h
> index 9a916ab34299..7810ae57b357 100644
> --- a/include/linux/bpf.h
> +++ b/include/linux/bpf.h
> @@ -531,6 +531,8 @@ static inline struct bpf_prog *bpf_prog_get_type(u32 ufd,
>  
>  int bpf_prog_offload_compile(struct bpf_prog *prog);
>  void bpf_prog_offload_destroy(struct bpf_prog *prog);
> +int bpf_prog_offload_info_fill(struct bpf_prog_info *info,
> +			       struct bpf_prog *prog);
>  
>  #if defined(CONFIG_NET) && defined(CONFIG_BPF_SYSCALL)
>  int bpf_prog_offload_init(struct bpf_prog *prog, union bpf_attr *attr);
> diff --git a/include/linux/proc_ns.h b/include/linux/proc_ns.h
> index 2ff18c9840a7..1733359cf713 100644
> --- a/include/linux/proc_ns.h
> +++ b/include/linux/proc_ns.h
> @@ -76,6 +76,7 @@ static inline int ns_alloc_inum(struct ns_common *ns)
>  
>  extern struct file *proc_ns_fget(int fd);
>  #define get_proc_ns(inode) ((struct ns_common *)(inode)->i_private)
> +extern void *__ns_get_path(struct path *path, struct ns_common *ns);
>  extern void *ns_get_path(struct path *path, struct task_struct *task,
>  			const struct proc_ns_operations *ns_ops);
>  
> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
> index d01f1cb3cfc0..72b37fc3bc0c 100644
> --- a/include/uapi/linux/bpf.h
> +++ b/include/uapi/linux/bpf.h
> @@ -921,6 +921,9 @@ struct bpf_prog_info {
>  	__u32 nr_map_ids;
>  	__aligned_u64 map_ids;
>  	char name[BPF_OBJ_NAME_LEN];
> +	__u32 ifindex;
> +	__u64 netns_dev;
> +	__u64 netns_ino;
>  } __attribute__((aligned(8)));
>  
>  struct bpf_map_info {
> diff --git a/kernel/bpf/offload.c b/kernel/bpf/offload.c
> index 1af94cb4f815..0543f24542ae 100644
> --- a/kernel/bpf/offload.c
> +++ b/kernel/bpf/offload.c
> @@ -16,9 +16,11 @@
>  #include <linux/bpf.h>
>  #include <linux/bpf_verifier.h>
>  #include <linux/bug.h>
> +#include <linux/kdev_t.h>
>  #include <linux/list.h>
>  #include <linux/netdevice.h>
>  #include <linux/printk.h>
> +#include <linux/proc_ns.h>
>  #include <linux/rtnetlink.h>
>  #include <linux/rwsem.h>
>  
> @@ -174,6 +176,43 @@ int bpf_prog_offload_compile(struct bpf_prog *prog)
>  	return bpf_prog_offload_translate(prog);
>  }
>  
> +int bpf_prog_offload_info_fill(struct bpf_prog_info *info,
> +			       struct bpf_prog *prog)
> +{
> +	struct bpf_dev_offload *offload;
> +	struct inode *ns_inode;
> +	struct path ns_path;
> +	struct net *net;
> +	void *ptr;
> +
> +again:
> +	down_read(&bpf_devs_lock);
> +	offload = prog->aux->offload;
> +	if (!offload) {
> +		up_read(&bpf_devs_lock);
> +		return -ENODEV;
> +	}
> +
> +	net = dev_net(offload->netdev);
> +	get_net(net); /* __ns_get_path() drops the reference */
> +
> +	ptr = __ns_get_path(&ns_path, &net->ns);
> +	if (IS_ERR(ptr)) {
> +		up_read(&bpf_devs_lock);
> +		if (PTR_ERR(ptr) == -EAGAIN)
> +			goto again;
> +		return PTR_ERR(ptr);
> +	}
> +	ns_inode = ns_path.dentry->d_inode;
> +
> +	info->ifindex = offload->netdev->ifindex;
> +	info->netns_dev = new_encode_dev(ns_inode->i_sb->s_dev);
> +	info->netns_ino = ns_inode->i_ino;
> +	up_read(&bpf_devs_lock);
> +
> +	return 0;
> +}
> +
>  const struct bpf_prog_ops bpf_offload_prog_ops = {
>  };
>  
> diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
> index 7d9f5b0f0e49..20444fd678d0 100644
> --- a/kernel/bpf/syscall.c
> +++ b/kernel/bpf/syscall.c
> @@ -1624,6 +1624,12 @@ static int bpf_prog_get_info_by_fd(struct bpf_prog *prog,
>  			return -EFAULT;
>  	}
>  
> +	if (bpf_prog_is_dev_bound(prog->aux)) {
> +		err = bpf_prog_offload_info_fill(&info, prog);
> +		if (err)
> +			return err;
> +	}
> +
>  done:
>  	if (copy_to_user(uinfo, &info, info_len) ||
>  	    put_user(info_len, &uattr->info.info_len))
> diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
> index db1b0923a308..4e8c60acfa32 100644
> --- a/tools/include/uapi/linux/bpf.h
> +++ b/tools/include/uapi/linux/bpf.h
> @@ -921,6 +921,9 @@ struct bpf_prog_info {
>  	__u32 nr_map_ids;
>  	__aligned_u64 map_ids;
>  	char name[BPF_OBJ_NAME_LEN];
> +	__u32 ifindex;
> +	__u64 netns_dev;
> +	__u64 netns_ino;
>  } __attribute__((aligned(8)));
>  
>  struct bpf_map_info {
> 

^ permalink raw reply

* [PATCH net] ipv6: Honor specified parameters in fibmatch lookup
From: Ido Schimmel @ 2017-12-20 10:28 UTC (permalink / raw)
  To: netdev; +Cc: davem, roopa, dsahern, mlxsw, Ido Schimmel

Currently, parameters such as oif and source address are not taken into
account during fibmatch lookup. Example (IPv4 for reference) before
patch:

$ ip -4 route show
192.0.2.0/24 dev dummy0 proto kernel scope link src 192.0.2.1
198.51.100.0/24 dev dummy1 proto kernel scope link src 198.51.100.1

$ ip -6 route show
2001:db8:1::/64 dev dummy0 proto kernel metric 256 pref medium
2001:db8:2::/64 dev dummy1 proto kernel metric 256 pref medium
fe80::/64 dev dummy0 proto kernel metric 256 pref medium
fe80::/64 dev dummy1 proto kernel metric 256 pref medium

$ ip -4 route get fibmatch 192.0.2.2 oif dummy0
192.0.2.0/24 dev dummy0 proto kernel scope link src 192.0.2.1
$ ip -4 route get fibmatch 192.0.2.2 oif dummy1
RTNETLINK answers: No route to host

$ ip -6 route get fibmatch 2001:db8:1::2 oif dummy0
2001:db8:1::/64 dev dummy0 proto kernel metric 256 pref medium
$ ip -6 route get fibmatch 2001:db8:1::2 oif dummy1
2001:db8:1::/64 dev dummy0 proto kernel metric 256 pref medium

After:

$ ip -6 route get fibmatch 2001:db8:1::2 oif dummy0
2001:db8:1::/64 dev dummy0 proto kernel metric 256 pref medium
$ ip -6 route get fibmatch 2001:db8:1::2 oif dummy1
RTNETLINK answers: Network is unreachable

The problem stems from the fact that the necessary route lookup flags
are not set based on these parameters.

Instead of duplicating the same logic for fibmatch, we can simply
resolve the original route from its copy and dump it instead.

Fixes: 18c3a61c4264 ("net: ipv6: RTM_GETROUTE: return matched fib result when requested")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
---
 net/ipv6/route.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 2bc91c349273..0458b761f3c5 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -4298,19 +4298,13 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh,
 		if (!ipv6_addr_any(&fl6.saddr))
 			flags |= RT6_LOOKUP_F_HAS_SADDR;
 
-		if (!fibmatch)
-			dst = ip6_route_input_lookup(net, dev, &fl6, flags);
-		else
-			dst = ip6_route_lookup(net, &fl6, 0);
+		dst = ip6_route_input_lookup(net, dev, &fl6, flags);
 
 		rcu_read_unlock();
 	} else {
 		fl6.flowi6_oif = oif;
 
-		if (!fibmatch)
-			dst = ip6_route_output(net, NULL, &fl6);
-		else
-			dst = ip6_route_lookup(net, &fl6, 0);
+		dst = ip6_route_output(net, NULL, &fl6);
 	}
 
 
@@ -4327,6 +4321,15 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh,
 		goto errout;
 	}
 
+	if (fibmatch && rt->dst.from) {
+		struct rt6_info *ort = container_of(rt->dst.from,
+						    struct rt6_info, dst);
+
+		dst_hold(&ort->dst);
+		ip6_rt_put(rt);
+		rt = ort;
+	}
+
 	skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
 	if (!skb) {
 		ip6_rt_put(rt);
-- 
2.14.3

^ permalink raw reply related

* Re: [PATCH v3 net-next 0/6] tls: Add generic NIC offload infrastructure
From: Or Gerlitz @ 2017-12-20 10:31 UTC (permalink / raw)
  To: Boris Pismenny
  Cc: Jiri Pirko, Ilya Lesokhin, netdev@vger.kernel.org,
	davem@davemloft.net, davejwatson@fb.com, tom@herbertland.com,
	hannes@stressinduktion.org, Aviad Yehezkel, Liran Liss
In-Reply-To: <CAJ3xEMhFm_AXmU=j30J8BRViTCUTau0hRDRjRPYW9nyYuQ0=Mg@mail.gmail.com>

> It is fundamental requirement to show a use-case along with infra-structure.

To make it clear, sometimes you don't have yet the full HW/FW/FPGA solution
when you come to upstream the infra code. In that case you do the driver code
and submit it based on HW emulator run, this is common the netdev community
and done by few vendors among them us.

Or.

^ permalink raw reply

* Re: [PATCH v4 33/36] net: faraday add nds32 support.
From: Greentime Hu @ 2017-12-20 10:34 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: kbuild test robot, kbuild-all, Greentime,
	Linux Kernel Mailing List, Arnd Bergmann, Linux-Arch,
	Thomas Gleixner, Jason Cooper, Marc Zyngier, Rob Herring, netdev,
	Vincent Chen, DTML, Al Viro, David Howells, Will Deacon,
	Daniel Lezcano, linux-serial, Linus Walleij, Mark Rutland,
	Greg KH
In-Reply-To: <CAMuHMdXp5b-Y79kaKgmDRshnpN2=VEd-f3v-6QW+6mUqv6YW-A@mail.gmail.com>

2017-12-20 17:58 GMT+08:00 Geert Uytterhoeven <geert@linux-m68k.org>:
> On Wed, Dec 20, 2017 at 10:54 AM, kbuild test robot <lkp@intel.com> wrote:
>> I love your patch! Perhaps something to improve:
>>
>> [auto build test WARNING on tip/timers/core]
>> [cannot apply to linus/master v4.15-rc4 next-20171220]
>> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>>
>> url:    https://github.com/0day-ci/linux/commits/Greentime-Hu/Andes-nds32-Linux-Kernel/20171220-155937
>> config: sparc64-allyesconfig (attached as .config)
>> compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
>> reproduce:
>>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>         chmod +x ~/bin/make.cross
>>         # save the attached .config to linux build tree
>>         make.cross ARCH=sparc64
>>
>> All warnings (new ones prefixed by >>):
>>
>>    drivers/net/ethernet/faraday/ftmac100.c: In function 'ftmac100_rxdes_set_page':
>>>> drivers/net/ethernet/faraday/ftmac100.c:288:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>>      rxdes->rxdes3 = (unsigned int)page;
>>                      ^
>
> The proper way to casts pointer to integers is to cast to "uintptr_t".
>
> However, the address is stored in a 32-bit descriptor, which means it can
> not work on 64-bit platforms.
>
> Please make the driver depend on "!64BIT || BROKEN"
>
> Cfr. commit 15bfe05c8d6386f1 ("net: ethernet: xilinx: Mark XILINX_LL_TEMAC
> broken on 64-bit")
>
Thanks Geert.

I will apply it like this.

+++ b/drivers/net/ethernet/faraday/Kconfig
@@ -5,7 +5,7 @@
 config NET_VENDOR_FARADAY
        bool "Faraday devices"
        default y
-       depends on ARM
+       depends on ARM || NDS32 || COMPILE_TEST
        ---help---
          If you have a network (Ethernet) card belonging to this class, say Y.

@@ -18,7 +18,8 @@ if NET_VENDOR_FARADAY

 config FTMAC100
        tristate "Faraday FTMAC100 10/100 Ethernet support"
-       depends on ARM
+       depends on ARM || NDS32 || COMPILE_TEST
+       depends on !64BIT || BROKEN
        select MII
        ---help---
          This driver supports the FTMAC100 10/100 Ethernet controller
@@ -27,7 +28,8 @@ config FTMAC100

 config FTGMAC100
        tristate "Faraday FTGMAC100 Gigabit Ethernet support"
-       depends on ARM
+       depends on ARM || NDS32 || COMPILE_TEST
+       depends on !64BIT || BROKEN
        select PHYLIB
        ---help---
          This driver supports the FTGMAC100 Gigabit Ethernet controller

^ permalink raw reply

* Re: [RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
From: Vitaly Kuznetsov @ 2017-12-20 10:51 UTC (permalink / raw)
  To: David Miller
  Cc: sridhar.samudrala, mst, netdev, alexander.duyck, virtualization,
	Stephen Hemminger
In-Reply-To: <20171219.132017.1652469595167726292.davem@davemloft.net>

David Miller <davem@davemloft.net> writes:

> From: "Samudrala, Sridhar" <sridhar.samudrala@intel.com>
> Date: Tue, 19 Dec 2017 09:41:39 -0800
>
>> This is based on netvsc implementation and here is the commit that
>> added this delay.  Not sure if this needs to be 100ms.
>> 
>> commit 6123c66854c174e4982f98195100c1d990f9e5e6
>> Author: stephen hemminger <stephen@networkplumber.org>
>> Date:   Wed Aug 9 17:46:03 2017 -0700
>> 
>>     netvsc: delay setup of VF device
>> 
>>     When VF device is discovered, delay bring it automatically up in
>>     order to allow userspace to some simple changes (like renaming).
>
> This is kind of bogus, I should have called this out when the patch
> was posted.
>
> Any delay is wrong, there needs to be tight synchronization if a
> userspace operation must occur before proceeding.  If something
> happens and userspace is delayed, this whole thing doesn't work.

Hyper-V's netvsc does exactly the same and when this was first discussed
I suggested to allow renaming of IFF_UP interfaces:
https://patchwork.kernel.org/patch/9890299/

but as far as I understand it was decided that it's too risky and not
worth it. Maybe we need to reconsider this, at least for slave
interfaces (as scripts are not supposed to operate on them).

-- 
  Vitaly

^ permalink raw reply

* Re: [PATCH v10 1/5] add infrastructure for tagging functions as error injectable
From: Masami Hiramatsu @ 2017-12-20 11:00 UTC (permalink / raw)
  To: Josef Bacik
  Cc: rostedt, mingo, davem, netdev, linux-kernel, ast, kernel-team,
	daniel, linux-btrfs, darrick.wong, Josef Bacik
In-Reply-To: <1513365176-6744-2-git-send-email-josef@toxicpanda.com>

On Fri, 15 Dec 2017 14:12:52 -0500
Josef Bacik <josef@toxicpanda.com> wrote:

> From: Josef Bacik <jbacik@fb.com>
> 
> Using BPF we can override kprob'ed functions and return arbitrary
> values.  Obviously this can be a bit unsafe, so make this feature opt-in
> for functions.  Simply tag a function with KPROBE_ERROR_INJECT_SYMBOL in
> order to give BPF access to that function for error injection purposes.
> 
> Signed-off-by: Josef Bacik <jbacik@fb.com>
> Acked-by: Ingo Molnar <mingo@kernel.org>
> ---
>  include/asm-generic/vmlinux.lds.h |  10 +++
>  include/linux/bpf.h               |  11 +++
>  include/linux/kprobes.h           |   1 +
>  include/linux/module.h            |   5 ++
>  kernel/kprobes.c                  | 163 ++++++++++++++++++++++++++++++++++++++
>  kernel/module.c                   |   6 +-
>  6 files changed, 195 insertions(+), 1 deletion(-)
> 
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index ee8b707d9fa9..a2e8582d094a 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -136,6 +136,15 @@
>  #define KPROBE_BLACKLIST()
>  #endif
>  
> +#ifdef CONFIG_BPF_KPROBE_OVERRIDE
> +#define ERROR_INJECT_LIST()	. = ALIGN(8);						\
> +				VMLINUX_SYMBOL(__start_kprobe_error_inject_list) = .;	\
> +				KEEP(*(_kprobe_error_inject_list))			\
> +				VMLINUX_SYMBOL(__stop_kprobe_error_inject_list) = .;
> +#else
> +#define ERROR_INJECT_LIST()
> +#endif
> +
>  #ifdef CONFIG_EVENT_TRACING
>  #define FTRACE_EVENTS()	. = ALIGN(8);					\
>  			VMLINUX_SYMBOL(__start_ftrace_events) = .;	\
> @@ -564,6 +573,7 @@
>  	FTRACE_EVENTS()							\
>  	TRACE_SYSCALLS()						\
>  	KPROBE_BLACKLIST()						\
> +	ERROR_INJECT_LIST()						\
>  	MEM_DISCARD(init.rodata)					\
>  	CLK_OF_TABLES()							\
>  	RESERVEDMEM_OF_TABLES()						\
> diff --git a/include/linux/bpf.h b/include/linux/bpf.h
> index e55e4255a210..7f4d2a953173 100644
> --- a/include/linux/bpf.h
> +++ b/include/linux/bpf.h
> @@ -576,4 +576,15 @@ extern const struct bpf_func_proto bpf_sock_map_update_proto;
>  void bpf_user_rnd_init_once(void);
>  u64 bpf_user_rnd_u32(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5);
>  
> +#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
> +#ifdef CONFIG_BPF_KPROBE_OVERRIDE
> +#define BPF_ALLOW_ERROR_INJECTION(fname)				\
> +static unsigned long __used						\
> +	__attribute__((__section__("_kprobe_error_inject_list")))	\
> +	_eil_addr_##fname = (unsigned long)fname;
> +#else
> +#define BPF_ALLOW_ERROR_INJECTION(fname)
> +#endif
> +#endif

This part shows this feature belongs to bpf, if it is a part of kprobes,
it should be defined in include/asm-generic/kprobes.h as NOKPROBE_SYMBOL
does.

Why this is defined in BPF, but list is under kprobes?



> +
>  #endif /* _LINUX_BPF_H */
> diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
> index 9440a2fc8893..963fd364f3d6 100644
> --- a/include/linux/kprobes.h
> +++ b/include/linux/kprobes.h
> @@ -271,6 +271,7 @@ extern bool arch_kprobe_on_func_entry(unsigned long offset);
>  extern bool kprobe_on_func_entry(kprobe_opcode_t *addr, const char *sym, unsigned long offset);
>  
>  extern bool within_kprobe_blacklist(unsigned long addr);
> +extern bool within_kprobe_error_injection_list(unsigned long addr);
>  
>  struct kprobe_insn_cache {
>  	struct mutex mutex;
> diff --git a/include/linux/module.h b/include/linux/module.h
> index c69b49abe877..548fa09fa806 100644
> --- a/include/linux/module.h
> +++ b/include/linux/module.h
> @@ -475,6 +475,11 @@ struct module {
>  	ctor_fn_t *ctors;
>  	unsigned int num_ctors;
>  #endif
> +
> +#ifdef CONFIG_BPF_KPROBE_OVERRIDE
> +	unsigned int num_kprobe_ei_funcs;
> +	unsigned long *kprobe_ei_funcs;
> +#endif
>  } ____cacheline_aligned __randomize_layout;
>  #ifndef MODULE_ARCH_INIT
>  #define MODULE_ARCH_INIT {}
> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index da2ccf142358..b4aab48ad258 100644
> --- a/kernel/kprobes.c
> +++ b/kernel/kprobes.c
> @@ -83,6 +83,16 @@ static raw_spinlock_t *kretprobe_table_lock_ptr(unsigned long hash)
>  	return &(kretprobe_table_locks[hash].lock);
>  }
>  
> +/* List of symbols that can be overriden for error injection. */
> +static LIST_HEAD(kprobe_error_injection_list);
> +static DEFINE_MUTEX(kprobe_ei_mutex);
> +struct kprobe_ei_entry {
> +	struct list_head list;
> +	unsigned long start_addr;
> +	unsigned long end_addr;
> +	void *priv;
> +};

Again, no kprobe user except for bpf, which is actually trace_kprobe user,
only refer this.

I mean 

"bpf uses trace_kprobe, trace_kprobe uses kprobe."

So there is no direct relationship with kprobe.
For example, kprobe user modules can OVERRIDE any functions.
And there is no generic error injection code in the kernel
except for the bpf currently.

Of course, I can accept this code if you accept that I make a
generic error injection code on ftrace without BPF.

Ingo, that is what you intended?

Thank you,

> +
>  /* Blacklist -- list of struct kprobe_blacklist_entry */
>  static LIST_HEAD(kprobe_blacklist);
>  
> @@ -1394,6 +1404,17 @@ bool within_kprobe_blacklist(unsigned long addr)
>  	return false;
>  }
>  
> +bool within_kprobe_error_injection_list(unsigned long addr)
> +{
> +	struct kprobe_ei_entry *ent;
> +
> +	list_for_each_entry(ent, &kprobe_error_injection_list, list) {
> +		if (addr >= ent->start_addr && addr < ent->end_addr)
> +			return true;
> +	}
> +	return false;
> +}
> +
>  /*
>   * If we have a symbol_name argument, look it up and add the offset field
>   * to it. This way, we can specify a relative address to a symbol.
> @@ -2168,6 +2189,86 @@ static int __init populate_kprobe_blacklist(unsigned long *start,
>  	return 0;
>  }
>  
> +#ifdef CONFIG_BPF_KPROBE_OVERRIDE
> +/* Markers of the _kprobe_error_inject_list section */
> +extern unsigned long __start_kprobe_error_inject_list[];
> +extern unsigned long __stop_kprobe_error_inject_list[];
> +
> +/*
> + * Lookup and populate the kprobe_error_injection_list.
> + *
> + * For safety reasons we only allow certain functions to be overriden with
> + * bpf_error_injection, so we need to populate the list of the symbols that have
> + * been marked as safe for overriding.
> + */
> +static void populate_kprobe_error_injection_list(unsigned long *start,
> +						 unsigned long *end,
> +						 void *priv)
> +{
> +	unsigned long *iter;
> +	struct kprobe_ei_entry *ent;
> +	unsigned long entry, offset = 0, size = 0;
> +
> +	mutex_lock(&kprobe_ei_mutex);
> +	for (iter = start; iter < end; iter++) {
> +		entry = arch_deref_entry_point((void *)*iter);
> +
> +		if (!kernel_text_address(entry) ||
> +		    !kallsyms_lookup_size_offset(entry, &size, &offset)) {
> +			pr_err("Failed to find error inject entry at %p\n",
> +				(void *)entry);
> +			continue;
> +		}
> +
> +		ent = kmalloc(sizeof(*ent), GFP_KERNEL);
> +		if (!ent)
> +			break;
> +		ent->start_addr = entry;
> +		ent->end_addr = entry + size;
> +		ent->priv = priv;
> +		INIT_LIST_HEAD(&ent->list);
> +		list_add_tail(&ent->list, &kprobe_error_injection_list);
> +	}
> +	mutex_unlock(&kprobe_ei_mutex);
> +}
> +
> +static void __init populate_kernel_kprobe_ei_list(void)
> +{
> +	populate_kprobe_error_injection_list(__start_kprobe_error_inject_list,
> +					     __stop_kprobe_error_inject_list,
> +					     NULL);
> +}
> +
> +static void module_load_kprobe_ei_list(struct module *mod)
> +{
> +	if (!mod->num_kprobe_ei_funcs)
> +		return;
> +	populate_kprobe_error_injection_list(mod->kprobe_ei_funcs,
> +					     mod->kprobe_ei_funcs +
> +					     mod->num_kprobe_ei_funcs, mod);
> +}
> +
> +static void module_unload_kprobe_ei_list(struct module *mod)
> +{
> +	struct kprobe_ei_entry *ent, *n;
> +	if (!mod->num_kprobe_ei_funcs)
> +		return;
> +
> +	mutex_lock(&kprobe_ei_mutex);
> +	list_for_each_entry_safe(ent, n, &kprobe_error_injection_list, list) {
> +		if (ent->priv == mod) {
> +			list_del_init(&ent->list);
> +			kfree(ent);
> +		}
> +	}
> +	mutex_unlock(&kprobe_ei_mutex);
> +}
> +#else
> +static inline void __init populate_kernel_kprobe_ei_list(void) {}
> +static inline void module_load_kprobe_ei_list(struct module *m) {}
> +static inline void module_unload_kprobe_ei_list(struct module *m) {}
> +#endif
> +
>  /* Module notifier call back, checking kprobes on the module */
>  static int kprobes_module_callback(struct notifier_block *nb,
>  				   unsigned long val, void *data)
> @@ -2178,6 +2279,11 @@ static int kprobes_module_callback(struct notifier_block *nb,
>  	unsigned int i;
>  	int checkcore = (val == MODULE_STATE_GOING);
>  
> +	if (val == MODULE_STATE_COMING)
> +		module_load_kprobe_ei_list(mod);
> +	else if (val == MODULE_STATE_GOING)
> +		module_unload_kprobe_ei_list(mod);
> +
>  	if (val != MODULE_STATE_GOING && val != MODULE_STATE_LIVE)
>  		return NOTIFY_DONE;
>  
> @@ -2240,6 +2346,8 @@ static int __init init_kprobes(void)
>  		pr_err("Please take care of using kprobes.\n");
>  	}
>  
> +	populate_kernel_kprobe_ei_list();
> +
>  	if (kretprobe_blacklist_size) {
>  		/* lookup the function address from its name */
>  		for (i = 0; kretprobe_blacklist[i].name != NULL; i++) {
> @@ -2407,6 +2515,56 @@ static const struct file_operations debugfs_kprobe_blacklist_ops = {
>  	.release        = seq_release,
>  };
>  
> +/*
> + * kprobes/error_injection_list -- shows which functions can be overriden for
> + * error injection.
> + * */
> +static void *kprobe_ei_seq_start(struct seq_file *m, loff_t *pos)
> +{
> +	mutex_lock(&kprobe_ei_mutex);
> +	return seq_list_start(&kprobe_error_injection_list, *pos);
> +}
> +
> +static void kprobe_ei_seq_stop(struct seq_file *m, void *v)
> +{
> +	mutex_unlock(&kprobe_ei_mutex);
> +}
> +
> +static void *kprobe_ei_seq_next(struct seq_file *m, void *v, loff_t *pos)
> +{
> +	return seq_list_next(v, &kprobe_error_injection_list, pos);
> +}
> +
> +static int kprobe_ei_seq_show(struct seq_file *m, void *v)
> +{
> +	char buffer[KSYM_SYMBOL_LEN];
> +	struct kprobe_ei_entry *ent =
> +		list_entry(v, struct kprobe_ei_entry, list);
> +
> +	sprint_symbol(buffer, ent->start_addr);
> +	seq_printf(m, "%s\n", buffer);
> +	return 0;
> +}
> +
> +static const struct seq_operations kprobe_ei_seq_ops = {
> +	.start = kprobe_ei_seq_start,
> +	.next  = kprobe_ei_seq_next,
> +	.stop  = kprobe_ei_seq_stop,
> +	.show  = kprobe_ei_seq_show,
> +};
> +
> +static int kprobe_ei_open(struct inode *inode, struct file *filp)
> +{
> +	return seq_open(filp, &kprobe_ei_seq_ops);
> +}
> +
> +static const struct file_operations debugfs_kprobe_ei_ops = {
> +	.open           = kprobe_ei_open,
> +	.read           = seq_read,
> +	.llseek         = seq_lseek,
> +	.release        = seq_release,
> +};
> +
>  static void arm_all_kprobes(void)
>  {
>  	struct hlist_head *head;
> @@ -2548,6 +2706,11 @@ static int __init debugfs_kprobe_init(void)
>  	if (!file)
>  		goto error;
>  
> +	file = debugfs_create_file("error_injection_list", 0444, dir, NULL,
> +				  &debugfs_kprobe_ei_ops);
> +	if (!file)
> +		goto error;
> +
>  	return 0;
>  
>  error:
> diff --git a/kernel/module.c b/kernel/module.c
> index dea01ac9cb74..bd695bfdc5c4 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -3118,7 +3118,11 @@ static int find_module_sections(struct module *mod, struct load_info *info)
>  					     sizeof(*mod->ftrace_callsites),
>  					     &mod->num_ftrace_callsites);
>  #endif
> -
> +#ifdef CONFIG_BPF_KPROBE_OVERRIDE
> +	mod->kprobe_ei_funcs = section_objs(info, "_kprobe_error_inject_list",
> +					    sizeof(*mod->kprobe_ei_funcs),
> +					    &mod->num_kprobe_ei_funcs);
> +#endif
>  	mod->extable = section_objs(info, "__ex_table",
>  				    sizeof(*mod->extable), &mod->num_exentries);
>  
> -- 
> 2.7.5
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

^ permalink raw reply

* [PATCH 05/19] batman-adv: Add license header to Kconfig
From: Simon Wunderlich @ 2017-12-20 11:01 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
In-Reply-To: <20171220110124.13117-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>

From: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>

The last remaining file without license notice and/or SPDX license
identifier under net/batman-adv/ is the Kconfig. It should have been
licensed under the same conditions as the rest of batman-adv and the
Makefile which uses the CONFIG_* variables from Kconfig.

Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
Signed-off-by: Simon Wunderlich <sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
---
 net/batman-adv/Kconfig | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/net/batman-adv/Kconfig b/net/batman-adv/Kconfig
index b73b96a2854b..c44f6515be5e 100644
--- a/net/batman-adv/Kconfig
+++ b/net/batman-adv/Kconfig
@@ -1,3 +1,20 @@
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (C) 2007-2017  B.A.T.M.A.N. contributors:
+#
+# Marek Lindner, Simon Wunderlich
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of version 2 of the GNU General Public
+# License as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+
 #
 # B.A.T.M.A.N meshing protocol
 #
-- 
2.11.0

^ permalink raw reply related

* [PATCH 06/19] batman-adv: Change batman_adv.h license to MIT
From: Simon Wunderlich @ 2017-12-20 11:01 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
In-Reply-To: <20171220110124.13117-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>

From: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>

The ISC license is considered as not recommended in "Linux kernel licensing
rules". It should only be used for existing code or for importing code from
a different project with that license.

But the kernel still has the similar sounding MIT/Expat license under the
preferred licenses. Switching to this license for this relatively new file
should therefore allow batman-adv to better follow the new licensing rules.

Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
Acked-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Matthias Schiffer <mschiffer-Nyw9WiXk/RKXhJHkyCwd5uTW4wlIGRCZ@public.gmane.org>
Acked-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
Signed-off-by: Simon Wunderlich <sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
---
 include/uapi/linux/batman_adv.h | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/include/uapi/linux/batman_adv.h b/include/uapi/linux/batman_adv.h
index fb4533826163..ae00c99cbed0 100644
--- a/include/uapi/linux/batman_adv.h
+++ b/include/uapi/linux/batman_adv.h
@@ -1,19 +1,25 @@
-/* SPDX-License-Identifier: ISC */
+/* SPDX-License-Identifier: MIT */
 /* Copyright (C) 2016-2017  B.A.T.M.A.N. contributors:
  *
  * Matthias Schiffer
  *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
  *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
  */
 
 #ifndef _UAPI_LINUX_BATMAN_ADV_H_
-- 
2.11.0

^ permalink raw reply related

* [PATCH 07/19] batman-adv: include gfp.h for GFP_* defines
From: Simon Wunderlich @ 2017-12-20 11:01 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
In-Reply-To: <20171220110124.13117-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>

From: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>

The linux/gfp.h provides the GFP_ATOMIC and GFP_KERNEL define. It should
therefore be included instead of linux/fs.h.

Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
Signed-off-by: Simon Wunderlich <sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
---
 net/batman-adv/bat_iv_ogm.c            | 2 +-
 net/batman-adv/bat_v_elp.c             | 2 +-
 net/batman-adv/bat_v_ogm.c             | 2 +-
 net/batman-adv/bridge_loop_avoidance.c | 2 +-
 net/batman-adv/distributed-arp-table.c | 2 +-
 net/batman-adv/fragmentation.c         | 2 +-
 net/batman-adv/gateway_client.c        | 2 +-
 net/batman-adv/hard-interface.c        | 2 +-
 net/batman-adv/hash.c                  | 2 +-
 net/batman-adv/icmp_socket.c           | 1 +
 net/batman-adv/log.c                   | 1 +
 net/batman-adv/main.c                  | 2 +-
 net/batman-adv/multicast.c             | 2 +-
 net/batman-adv/netlink.c               | 2 +-
 net/batman-adv/network-coding.c        | 2 +-
 net/batman-adv/originator.c            | 2 +-
 net/batman-adv/send.c                  | 2 +-
 net/batman-adv/soft-interface.c        | 2 +-
 net/batman-adv/sysfs.c                 | 2 +-
 net/batman-adv/tp_meter.c              | 2 +-
 net/batman-adv/translation-table.c     | 2 +-
 net/batman-adv/tvlv.c                  | 2 +-
 22 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index bff5ec66a2e1..27d9c8adf2ca 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -27,7 +27,7 @@
 #include <linux/cache.h>
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/if_ether.h>
 #include <linux/init.h>
 #include <linux/jiffies.h>
diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c
index 8375fd679db3..92b56bb5686d 100644
--- a/net/batman-adv/bat_v_elp.c
+++ b/net/batman-adv/bat_v_elp.c
@@ -25,7 +25,7 @@
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
 #include <linux/ethtool.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/if_ether.h>
 #include <linux/jiffies.h>
 #include <linux/kernel.h>
diff --git a/net/batman-adv/bat_v_ogm.c b/net/batman-adv/bat_v_ogm.c
index 22d2bafa814a..7055a9483788 100644
--- a/net/batman-adv/bat_v_ogm.c
+++ b/net/batman-adv/bat_v_ogm.c
@@ -23,7 +23,7 @@
 #include <linux/byteorder/generic.h>
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/if_ether.h>
 #include <linux/jiffies.h>
 #include <linux/kernel.h>
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index 007147f3ed9e..ce124a21fce5 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -25,7 +25,7 @@
 #include <linux/crc16.h>
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/if_arp.h>
 #include <linux/if_ether.h>
 #include <linux/if_vlan.h>
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c
index 3c2faf773335..f704bbc76e2a 100644
--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -24,7 +24,7 @@
 #include <linux/byteorder/generic.h>
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/if_arp.h>
 #include <linux/if_ether.h>
 #include <linux/if_vlan.h>
diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c
index 22ce4c0c86c3..741c6b91664e 100644
--- a/net/batman-adv/fragmentation.c
+++ b/net/batman-adv/fragmentation.c
@@ -23,7 +23,7 @@
 #include <linux/byteorder/generic.h>
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/if_ether.h>
 #include <linux/jiffies.h>
 #include <linux/kernel.h>
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c
index e8db19940ab8..21db0165175b 100644
--- a/net/batman-adv/gateway_client.c
+++ b/net/batman-adv/gateway_client.c
@@ -23,7 +23,7 @@
 #include <linux/byteorder/generic.h>
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/if_ether.h>
 #include <linux/if_vlan.h>
 #include <linux/in.h>
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index 2f067a507fd5..394e69b77535 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -23,7 +23,7 @@
 #include <linux/bug.h>
 #include <linux/byteorder/generic.h>
 #include <linux/errno.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/if.h>
 #include <linux/if_arp.h>
 #include <linux/if_ether.h>
diff --git a/net/batman-adv/hash.c b/net/batman-adv/hash.c
index a6dbaf2e9fc9..2ce0d5673f40 100644
--- a/net/batman-adv/hash.c
+++ b/net/batman-adv/hash.c
@@ -19,7 +19,7 @@
 #include "hash.h"
 #include "main.h"
 
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/lockdep.h>
 #include <linux/slab.h>
 
diff --git a/net/batman-adv/icmp_socket.c b/net/batman-adv/icmp_socket.c
index cc76f1365300..71ba58cc51fa 100644
--- a/net/batman-adv/icmp_socket.c
+++ b/net/batman-adv/icmp_socket.c
@@ -27,6 +27,7 @@
 #include <linux/export.h>
 #include <linux/fcntl.h>
 #include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/if_ether.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
diff --git a/net/batman-adv/log.c b/net/batman-adv/log.c
index 148e64e846d2..6fbcdd40a332 100644
--- a/net/batman-adv/log.c
+++ b/net/batman-adv/log.c
@@ -25,6 +25,7 @@
 #include <linux/export.h>
 #include <linux/fcntl.h>
 #include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/jiffies.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 5ce2007ea11b..0c3664aa6a58 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -23,8 +23,8 @@
 #include <linux/byteorder/generic.h>
 #include <linux/crc32c.h>
 #include <linux/errno.h>
-#include <linux/fs.h>
 #include <linux/genetlink.h>
+#include <linux/gfp.h>
 #include <linux/if_ether.h>
 #include <linux/if_vlan.h>
 #include <linux/init.h>
diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
index 01546a42b7ad..d8617c2794db 100644
--- a/net/batman-adv/multicast.c
+++ b/net/batman-adv/multicast.c
@@ -25,7 +25,7 @@
 #include <linux/byteorder/generic.h>
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/icmpv6.h>
 #include <linux/if_bridge.h>
 #include <linux/if_ether.h>
diff --git a/net/batman-adv/netlink.c b/net/batman-adv/netlink.c
index ce424fe2f24e..f7281685633c 100644
--- a/net/batman-adv/netlink.c
+++ b/net/batman-adv/netlink.c
@@ -24,8 +24,8 @@
 #include <linux/cache.h>
 #include <linux/errno.h>
 #include <linux/export.h>
-#include <linux/fs.h>
 #include <linux/genetlink.h>
+#include <linux/gfp.h>
 #include <linux/if_ether.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
diff --git a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c
index 5cfac6e56610..d37fe5ed6117 100644
--- a/net/batman-adv/network-coding.c
+++ b/net/batman-adv/network-coding.c
@@ -26,7 +26,7 @@
 #include <linux/debugfs.h>
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/if_ether.h>
 #include <linux/if_packet.h>
 #include <linux/init.h>
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index 0716daf5b9a7..007b6bd8df95 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -22,7 +22,7 @@
 #include <linux/atomic.h>
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/jiffies.h>
 #include <linux/kernel.h>
 #include <linux/kref.h>
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index a6c53684ba70..c53b11d41d8b 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -24,7 +24,7 @@
 #include <linux/byteorder/generic.h>
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/if.h>
 #include <linux/if_ether.h>
 #include <linux/jiffies.h>
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index e543024f98ef..ba8fd06eee7e 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -27,7 +27,7 @@
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
 #include <linux/ethtool.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/if_ether.h>
 #include <linux/if_vlan.h>
 #include <linux/jiffies.h>
diff --git a/net/batman-adv/sysfs.c b/net/batman-adv/sysfs.c
index ab0b95f15b36..374ff46feb8e 100644
--- a/net/batman-adv/sysfs.c
+++ b/net/batman-adv/sysfs.c
@@ -23,7 +23,7 @@
 #include <linux/compiler.h>
 #include <linux/device.h>
 #include <linux/errno.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/if.h>
 #include <linux/if_vlan.h>
 #include <linux/kernel.h>
diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c
index 601feb2c4ecf..e33f64f0fcb8 100644
--- a/net/batman-adv/tp_meter.c
+++ b/net/batman-adv/tp_meter.c
@@ -26,7 +26,7 @@
 #include <linux/compiler.h>
 #include <linux/err.h>
 #include <linux/etherdevice.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/if_ether.h>
 #include <linux/init.h>
 #include <linux/jiffies.h>
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index 281bd4cf7f90..db40ca6243b3 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -28,7 +28,7 @@
 #include <linux/crc32c.h>
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/if_ether.h>
 #include <linux/init.h>
 #include <linux/jhash.h>
diff --git a/net/batman-adv/tvlv.c b/net/batman-adv/tvlv.c
index 67b2ba4b824b..d956c2a0e9cb 100644
--- a/net/batman-adv/tvlv.c
+++ b/net/batman-adv/tvlv.c
@@ -20,7 +20,7 @@
 
 #include <linux/byteorder/generic.h>
 #include <linux/etherdevice.h>
-#include <linux/fs.h>
+#include <linux/gfp.h>
 #include <linux/if_ether.h>
 #include <linux/kernel.h>
 #include <linux/kref.h>
-- 
2.11.0

^ permalink raw reply related

* [PATCH 08/19] batman-adv: include build_bug.h for BUILD_BUG_ON define
From: Simon Wunderlich @ 2017-12-20 11:01 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
In-Reply-To: <20171220110124.13117-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>

From: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>

commit bc6245e5efd7 ("bug: split BUILD_BUG stuff out into
<linux/build_bug.h>") added a new header for BUILD_BUG_ON. It should
therefore be included instead of linux/bug.h

Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
Signed-off-by: Simon Wunderlich <sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
---
 net/batman-adv/main.c              | 2 +-
 net/batman-adv/tp_meter.c          | 2 +-
 net/batman-adv/translation-table.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 0c3664aa6a58..6f6c500e8aa8 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -19,7 +19,7 @@
 #include "main.h"
 
 #include <linux/atomic.h>
-#include <linux/bug.h>
+#include <linux/build_bug.h>
 #include <linux/byteorder/generic.h>
 #include <linux/crc32c.h>
 #include <linux/errno.h>
diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c
index e33f64f0fcb8..fe9eb2970ec9 100644
--- a/net/batman-adv/tp_meter.c
+++ b/net/batman-adv/tp_meter.c
@@ -20,7 +20,7 @@
 #include "main.h"
 
 #include <linux/atomic.h>
-#include <linux/bug.h>
+#include <linux/build_bug.h>
 #include <linux/byteorder/generic.h>
 #include <linux/cache.h>
 #include <linux/compiler.h>
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index db40ca6243b3..27a0c34a5ad0 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -21,7 +21,7 @@
 
 #include <linux/atomic.h>
 #include <linux/bitops.h>
-#include <linux/bug.h>
+#include <linux/build_bug.h>
 #include <linux/byteorder/generic.h>
 #include <linux/cache.h>
 #include <linux/compiler.h>
-- 
2.11.0

^ permalink raw reply related

* [PATCH 10/19] batman-adv: include kobject.h for kobject_* functions
From: Simon Wunderlich @ 2017-12-20 11:01 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
In-Reply-To: <20171220110124.13117-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>

From: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>

The linux/kobject.h provides the kobject_* function declarations and should
therefore be included directly before they are used.

Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
Signed-off-by: Simon Wunderlich <sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org>
---
 net/batman-adv/sysfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/batman-adv/sysfs.c b/net/batman-adv/sysfs.c
index 374ff46feb8e..227a072dc1d3 100644
--- a/net/batman-adv/sysfs.c
+++ b/net/batman-adv/sysfs.c
@@ -27,6 +27,7 @@
 #include <linux/if.h>
 #include <linux/if_vlan.h>
 #include <linux/kernel.h>
+#include <linux/kobject.h>
 #include <linux/kref.h>
 #include <linux/netdevice.h>
 #include <linux/printk.h>
-- 
2.11.0

^ permalink raw reply related

* [PATCH 01/19] batman-adv: Start new development cycle
From: Simon Wunderlich @ 2017-12-20 11:01 UTC (permalink / raw)
  To: davem; +Cc: netdev, b.a.t.m.a.n, Simon Wunderlich
In-Reply-To: <20171220110124.13117-1-sw@simonwunderlich.de>

Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
---
 net/batman-adv/main.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
index edb2f239d04d..bb8003cf2296 100644
--- a/net/batman-adv/main.h
+++ b/net/batman-adv/main.h
@@ -24,7 +24,7 @@
 #define BATADV_DRIVER_DEVICE "batman-adv"
 
 #ifndef BATADV_SOURCE_VERSION
-#define BATADV_SOURCE_VERSION "2017.4"
+#define BATADV_SOURCE_VERSION "2018.0"
 #endif
 
 /* B.A.T.M.A.N. parameters */
-- 
2.11.0

^ permalink raw reply related

* [PATCH 02/19] batman-adv: Deinline batadv_orig_hash_find, save 7339 bytes
From: Simon Wunderlich @ 2017-12-20 11:01 UTC (permalink / raw)
  To: davem; +Cc: netdev, b.a.t.m.a.n, Denys Vlasenko, Sven Eckelmann,
	Simon Wunderlich
In-Reply-To: <20171220110124.13117-1-sw@simonwunderlich.de>

From: Denys Vlasenko <dvlasenk@redhat.com>

This function compiles to 288 bytes of machine code for Linux 4.14 on
Debian Stretch amd64 and (6.3.0-18) with the default configuration. 27
callsites (25 used in default config).

   text    data     bss     dec     hex filename
 179291   10317    4416  194024   2f5e8 batman-adv.ko.pre
 171952   10317    4416  186685   2d93d batman-adv.ko.post

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
[sven@narfation.org: Fix includes, correct sizes+counts in commit message]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
---
 net/batman-adv/originator.c | 32 ++++++++++++++++++++++++++++++++
 net/batman-adv/originator.h | 37 ++-----------------------------------
 2 files changed, 34 insertions(+), 35 deletions(-)

diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index 2967b86c13da..0a565d0422bb 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -30,10 +30,12 @@
 #include <linux/netdevice.h>
 #include <linux/netlink.h>
 #include <linux/rculist.h>
+#include <linux/rcupdate.h>
 #include <linux/seq_file.h>
 #include <linux/skbuff.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
+#include <linux/stddef.h>
 #include <linux/workqueue.h>
 #include <net/sock.h>
 #include <uapi/linux/batman_adv.h>
@@ -55,6 +57,36 @@
 /* hash class keys */
 static struct lock_class_key batadv_orig_hash_lock_class_key;
 
+struct batadv_orig_node *
+batadv_orig_hash_find(struct batadv_priv *bat_priv, const void *data)
+{
+	struct batadv_hashtable *hash = bat_priv->orig_hash;
+	struct hlist_head *head;
+	struct batadv_orig_node *orig_node, *orig_node_tmp = NULL;
+	int index;
+
+	if (!hash)
+		return NULL;
+
+	index = batadv_choose_orig(data, hash->size);
+	head = &hash->table[index];
+
+	rcu_read_lock();
+	hlist_for_each_entry_rcu(orig_node, head, hash_entry) {
+		if (!batadv_compare_eth(orig_node, data))
+			continue;
+
+		if (!kref_get_unless_zero(&orig_node->refcount))
+			continue;
+
+		orig_node_tmp = orig_node;
+		break;
+	}
+	rcu_read_unlock();
+
+	return orig_node_tmp;
+}
+
 static void batadv_purge_orig(struct work_struct *work);
 
 /**
diff --git a/net/batman-adv/originator.h b/net/batman-adv/originator.h
index d94220a6d21a..40c7f039d5d7 100644
--- a/net/batman-adv/originator.h
+++ b/net/batman-adv/originator.h
@@ -23,14 +23,8 @@
 #include <linux/compiler.h>
 #include <linux/if_ether.h>
 #include <linux/jhash.h>
-#include <linux/kref.h>
-#include <linux/rculist.h>
-#include <linux/rcupdate.h>
-#include <linux/stddef.h>
 #include <linux/types.h>
 
-#include "hash.h"
-
 struct netlink_callback;
 struct seq_file;
 struct sk_buff;
@@ -100,34 +94,7 @@ static inline u32 batadv_choose_orig(const void *data, u32 size)
 	return hash % size;
 }
 
-static inline struct batadv_orig_node *
-batadv_orig_hash_find(struct batadv_priv *bat_priv, const void *data)
-{
-	struct batadv_hashtable *hash = bat_priv->orig_hash;
-	struct hlist_head *head;
-	struct batadv_orig_node *orig_node, *orig_node_tmp = NULL;
-	int index;
-
-	if (!hash)
-		return NULL;
-
-	index = batadv_choose_orig(data, hash->size);
-	head = &hash->table[index];
-
-	rcu_read_lock();
-	hlist_for_each_entry_rcu(orig_node, head, hash_entry) {
-		if (!batadv_compare_eth(orig_node, data))
-			continue;
-
-		if (!kref_get_unless_zero(&orig_node->refcount))
-			continue;
-
-		orig_node_tmp = orig_node;
-		break;
-	}
-	rcu_read_unlock();
-
-	return orig_node_tmp;
-}
+struct batadv_orig_node *
+batadv_orig_hash_find(struct batadv_priv *bat_priv, const void *data);
 
 #endif /* _NET_BATMAN_ADV_ORIGINATOR_H_ */
-- 
2.11.0

^ permalink raw reply related

* [PATCH 00/19] pull request for net-next: batman-adv 2017-12-20
From: Simon Wunderlich @ 2017-12-20 11:01 UTC (permalink / raw)
  To: davem; +Cc: netdev, b.a.t.m.a.n, Simon Wunderlich

Hi David,

here is the updated feature/cleanup pull request of batman-adv to go
into net-next. Compared to batman-adv 2017-12-15 pull request, we have 
dropped the 'batman-adv: Add License-Filename to GPL-2.0 files' as per
your suggestion.

Please pull or let me know of any problem!

Thank you,
      Simon

The following changes since commit 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323:

  Linux 4.15-rc1 (2017-11-26 16:01:47 -0800)

are available in the git repository at:

  git://git.open-mesh.org/linux-merge.git tags/batadv-next-for-davem-20171220

for you to fetch changes up to ff15c27c97303fbe5abc49c25c73ea299ab72d31:

  batman-adv: Add kernel-doc to externally visible functions (2017-12-15 17:29:24 +0100)

----------------------------------------------------------------
This feature/cleanup patchset includes the following patches:

 - bump version strings, by Simon Wunderlich

 - de-inline hash functions to save memory footprint, by Denys Vlasenko

 - Add License information to various files, by Sven Eckelmann (3 patches)

 - Change batman_adv.h from ISC to MIT, by Sven Eckelmann

 - Improve various includes, by Sven Eckelmann (5 patches)

 - Lots of kernel-doc work by Sven Eckelmann (8 patches)

----------------------------------------------------------------
Denys Vlasenko (1):
      batman-adv: Deinline batadv_orig_hash_find, save 7339 bytes

Simon Wunderlich (1):
      batman-adv: Start new development cycle

Sven Eckelmann (17):
      batman-adv: Add SPDX license identifier above copyright header
      batman-adv: Add SPDX license identifier to batman-adv.rst
      batman-adv: Add license header to Kconfig
      batman-adv: Change batman_adv.h license to MIT
      batman-adv: include gfp.h for GFP_* defines
      batman-adv: include build_bug.h for BUILD_BUG_ON define
      batman-adv: Include net.h for net_ratelimited_function
      batman-adv: include kobject.h for kobject_* functions
      batman-adv: Remove unused sched.h include
      batman-adv: Add missing kernel-doc to packet.h
      batman-adv: Use parentheses in function kernel-doc
      batman-adv: Use inline kernel-doc for enum/struct
      batman-adv: Fix kernel-doc references to struct members
      batman-adv: Add kernel-doc to structs in headers
      batman-adv: Add kernel-doc to enums in headers
      batman-adv: Add kernel-doc to functions in headers
      batman-adv: Add kernel-doc to externally visible functions

 Documentation/networking/batman-adv.rst |    2 +
 include/uapi/linux/batman_adv.h         |   27 +-
 net/batman-adv/Kconfig                  |   17 +
 net/batman-adv/Makefile                 |    2 +-
 net/batman-adv/bat_algo.c               |   35 +-
 net/batman-adv/bat_algo.h               |    1 +
 net/batman-adv/bat_iv_ogm.c             |  105 +-
 net/batman-adv/bat_iv_ogm.h             |    1 +
 net/batman-adv/bat_v.c                  |   49 +-
 net/batman-adv/bat_v.h                  |    1 +
 net/batman-adv/bat_v_elp.c              |   27 +-
 net/batman-adv/bat_v_elp.h              |    1 +
 net/batman-adv/bat_v_ogm.c              |   37 +-
 net/batman-adv/bat_v_ogm.h              |    1 +
 net/batman-adv/bitarray.c               |    3 +-
 net/batman-adv/bitarray.h               |   10 +-
 net/batman-adv/bridge_loop_avoidance.c  |  112 +-
 net/batman-adv/bridge_loop_avoidance.h  |    5 +-
 net/batman-adv/debugfs.c                |   30 +-
 net/batman-adv/debugfs.h                |    1 +
 net/batman-adv/distributed-arp-table.c  |   80 +-
 net/batman-adv/distributed-arp-table.h  |    7 +-
 net/batman-adv/fragmentation.c          |   23 +-
 net/batman-adv/fragmentation.h          |    3 +-
 net/batman-adv/gateway_client.c         |   65 +-
 net/batman-adv/gateway_client.h         |    1 +
 net/batman-adv/gateway_common.c         |   28 +-
 net/batman-adv/gateway_common.h         |    6 +-
 net/batman-adv/hard-interface.c         |   65 +-
 net/batman-adv/hard-interface.h         |   59 +-
 net/batman-adv/hash.c                   |   20 +-
 net/batman-adv/hash.h                   |   28 +-
 net/batman-adv/icmp_socket.c            |   15 +-
 net/batman-adv/icmp_socket.h            |    1 +
 net/batman-adv/log.c                    |   19 +
 net/batman-adv/log.h                    |   62 +-
 net/batman-adv/main.c                   |   52 +-
 net/batman-adv/main.h                   |  123 +-
 net/batman-adv/multicast.c              |   81 +-
 net/batman-adv/multicast.h              |   17 +-
 net/batman-adv/netlink.c                |   25 +-
 net/batman-adv/netlink.h                |    1 +
 net/batman-adv/network-coding.c         |  124 +-
 net/batman-adv/network-coding.h         |    1 +
 net/batman-adv/originator.c             |  154 ++-
 net/batman-adv/originator.h             |   47 +-
 net/batman-adv/packet.h                 |   26 +-
 net/batman-adv/routing.c                |   54 +-
 net/batman-adv/routing.h                |    1 +
 net/batman-adv/send.c                   |   66 +-
 net/batman-adv/send.h                   |    5 +-
 net/batman-adv/soft-interface.c         |   64 +-
 net/batman-adv/soft-interface.h         |    1 +
 net/batman-adv/sysfs.c                  |   56 +-
 net/batman-adv/sysfs.h                  |   14 +
 net/batman-adv/tp_meter.c               |   75 +-
 net/batman-adv/tp_meter.h               |    1 +
 net/batman-adv/translation-table.c      |  232 ++--
 net/batman-adv/translation-table.h      |    1 +
 net/batman-adv/tvlv.c                   |   41 +-
 net/batman-adv/tvlv.h                   |    1 +
 net/batman-adv/types.h                  | 1993 +++++++++++++++++++++----------
 62 files changed, 2852 insertions(+), 1353 deletions(-)

^ permalink raw reply


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