linux-next: build failure after merge of the net-next tree

2018-08-05 Thread Stephen Rothwell
Hi all,

After merging the net-next tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

drivers/ptp/ptp_qoriq.o: In function `qoriq_ptp_probe':
ptp_qoriq.c:(.text+0xd0c): undefined reference to `__aeabi_uldivmod'

Caused by commit

  91305f281262 ("ptp_qoriq: support automatic configuration for ptp timer")

I just reverted that commit for today.

-- 
Cheers,
Stephen Rothwell


pgpEk7KnNE93L.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the net tree

2018-07-08 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/sched/act_tunnel_key.c

between commit:

  38230a3e0e09 ("net/sched: act_tunnel_key: fix NULL dereference when 'goto 
chain' is used")

from the net tree and commit:

  036bb44327f5 ("net: sched: change type of reference and bind counters")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/sched/act_tunnel_key.c
index 9bc6c2ae98a5,3ec585d58762..
--- a/net/sched/act_tunnel_key.c
+++ b/net/sched/act_tunnel_key.c
@@@ -252,9 -477,8 +477,9 @@@ static int tunnel_key_dump(struct sk_bu
struct tcf_tunnel_key_params *params;
struct tc_tunnel_key opt = {
.index= t->tcf_index,
-   .refcnt   = t->tcf_refcnt - ref,
-   .bindcnt  = t->tcf_bindcnt - bind,
+   .refcnt   = refcount_read(>tcf_refcnt) - ref,
+   .bindcnt  = atomic_read(>tcf_bindcnt) - bind,
 +  .action   = t->tcf_action,
};
struct tcf_t tm;
  


pgpR8iChnbq7f.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the net tree

2018-07-08 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/sched/act_csum.c

between commit:

  11a245e2f7bf ("net/sched: act_csum: fix NULL dereference when 'goto chain' is 
used")

from the net tree and commit:

  036bb44327f5 ("net: sched: change type of reference and bind counters")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/sched/act_csum.c
index 6e7124e57918,bd232d3bd022..
--- a/net/sched/act_csum.c
+++ b/net/sched/act_csum.c
@@@ -597,9 -603,8 +603,9 @@@ static int tcf_csum_dump(struct sk_buf
struct tcf_csum_params *params;
struct tc_csum opt = {
.index   = p->tcf_index,
-   .refcnt  = p->tcf_refcnt - ref,
-   .bindcnt = p->tcf_bindcnt - bind,
+   .refcnt  = refcount_read(>tcf_refcnt) - ref,
+   .bindcnt = atomic_read(>tcf_bindcnt) - bind,
 +  .action  = p->tcf_action,
};
struct tcf_t t;
  


pgpdy6F0CUySt.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the net tree

2018-07-08 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  drivers/net/ethernet/aquantia/atlantic/aq_hw.h

between commit:

  94b3b542303f ("net: aquantia: vlan unicast address list correct handling")

from the net tree and commit:

  c1af5427954b ("net: aquantia: Ethtool based ring size configuration")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/net/ethernet/aquantia/atlantic/aq_hw.h
index 2c6ebd91a9f2,1a51152029c3..
--- a/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
@@@ -98,8 -100,9 +100,11 @@@ struct aq_stats_s 
  #define AQ_HW_MEDIA_TYPE_TP1U
  #define AQ_HW_MEDIA_TYPE_FIBRE 2U
  
 +#define AQ_HW_MULTICAST_ADDRESS_MAX 32U
 +
+ #define AQ_HW_TXD_MULTIPLE 8U
+ #define AQ_HW_RXD_MULTIPLE 8U
+ 
  struct aq_hw_s {
atomic_t flags;
u8 rbl_enabled:1;


pgp81fjIIx91I.pgp
Description: OpenPGP digital signature


Re: linux-next: build failure in Linus' tree

2018-06-17 Thread Stephen Rothwell
Hi all,

On Tue, 12 Jun 2018 12:26:40 +1000 Stephen Rothwell  
wrote:
>
> Building Linus' tree, today's linux-next build (powerpc allyesconfig)
> failed like this:
> 
> ld: net/bpfilter/bpfilter_umh.o: compiled for a little endian system and 
> target is big endian
> ld: failed to merge target specific data of file net/bpfilter/bpfilter_umh.o
> 
> This has come to light since I started using a native compiler (i.e. one
> that can build executables, not just the kernel) for my PowerPC builds
> on a powerpcle host.
> 
> I have switched back to my limited compiler.

Any progress on this?
-- 
Cheers,
Stephen Rothwell


pgp_pPnFzz38h.pgp
Description: OpenPGP digital signature


linux-next: build failure after merge of the net-next tree

2018-05-28 Thread Stephen Rothwell
Hi all,

After merging the net-next tree, today's linux-next build (x86_64
allmodconfig) failed like this:

net/xdp/xsk.c: In function 'xsk_poll':
net/xdp/xsk.c:207:22: error: implicit declaration of function 'datagram_poll'; 
did you mean 'datagram_poll_mask'? [-Werror=implicit-function-declaration]
  unsigned int mask = datagram_poll(file, sock, wait);
  ^ 
  datagram_poll_mask

Caused by commit

  c497176cb2e4 ("xsk: add Rx receive functions and poll support")

interacting with commit

  db5051ead64a ("net: convert datagram_poll users tp ->poll_mask")

from the vfs tree.

[Christoph, I noticed that the comment above datagram_poll in
net/core/datagram.c needs the function name updated]

I have added the following merge fix patch for today:

From: Stephen Rothwell 
Date: Tue, 29 May 2018 13:34:25 +1000
Subject: [PATCH] xsk: update for "net: convert datagram_poll users 
tp->poll_mask"

Signed-off-by: Stephen Rothwell 
---
 net/xdp/xsk.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index cce0e4f8a536..4ee140afbc61 100644
--- a/net/xdp/xsk.c
+++ b/net/xdp/xsk.c
@@ -201,10 +201,9 @@ static int xsk_sendmsg(struct socket *sock, struct msghdr 
*m, size_t total_len)
return xsk_generic_xmit(sk, m, total_len);
 }
 
-static unsigned int xsk_poll(struct file *file, struct socket *sock,
-struct poll_table_struct *wait)
+static __poll_t xsk_poll_mask(struct socket *sock, __poll_t events)
 {
-   unsigned int mask = datagram_poll(file, sock, wait);
+   __poll_t mask = datagram_poll_mask(sock, events);
struct sock *sk = sock->sk;
struct xdp_sock *xs = xdp_sk(sk);
 
@@ -580,7 +579,7 @@ static const struct proto_ops xsk_proto_ops = {
.socketpair = sock_no_socketpair,
.accept = sock_no_accept,
.getname= sock_no_getname,
-   .poll   = xsk_poll,
+   .poll_mask  = xsk_poll_mask,
.ioctl  = sock_no_ioctl,
.listen = sock_no_listen,
.shutdown   = sock_no_shutdown,
-- 
2.17.0

-- 
Cheers,
Stephen Rothwell


pgpluvIMz0Sq1.pgp
Description: OpenPGP digital signature


linux-next: build failure after merge of the net-next tree

2018-05-28 Thread Stephen Rothwell
Hi all,

After merging the net-next tree, today's linux-next build (x86_64
allmodconfig) failed like this:

x86_64-linux-ld: unknown architecture of input file 
`net/bpfilter/bpfilter_umh.o' is incompatible with i386:x86-64 output

Caused by commit

  d2ba09c17a06 ("net: add skeleton of bpfilter kernel module")

In my builds, the host is PowerPC 64 LE ...

I have reverted that commit along with

  61a552eb487f ("bpfilter: fix build dependency")
  13405468f49d ("bpfilter: don't pass O_CREAT when opening console for debug")

for today.

-- 
Cheers,
Stephen Rothwell


pgpYDV_uyzXtx.pgp
Description: OpenPGP digital signature


linux-next: build warning after merge of the net-next tree

2018-05-28 Thread Stephen Rothwell
Hi all,

After merging the net-next tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

net/core/filter.c: In function 'sk_msg_convert_ctx_access':
net/core/filter.c:6450:6: warning: unused variable 'off' [-Wunused-variable]
  int off;
  ^~~

Introduced by commit

  303def35f64e ("bpf: allow sk_msg programs to read sock fields")

-- 
Cheers,
Stephen Rothwell


pgplxcw5m2W8R.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the s390 tree

2018-05-28 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  arch/s390/net/Makefile

between commit:

  866f4c8e0e26 ("s390/net: add pnetid support")

from the s390 tree and commit:

  e1cf4befa297 ("bpf, s390x: remove ld_abs/ld_ind")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/s390/net/Makefile
index e2b85ffdbb0c,d4663b4bf509..
--- a/arch/s390/net/Makefile
+++ b/arch/s390/net/Makefile
@@@ -2,5 -2,4 +2,5 @@@
  #
  # Arch-specific network modules
  #
- obj-$(CONFIG_BPF_JIT) += bpf_jit.o bpf_jit_comp.o
+ obj-$(CONFIG_BPF_JIT) += bpf_jit_comp.o
 +obj-$(CONFIG_HAVE_PNETID) += pnet.o


pgpcvdqnhQwvH.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the vfs tree

2018-05-16 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/ipv4/ipconfig.c

between commits:

  3f3942aca6da ("proc: introduce proc_create_single{,_data}")
  c04d2cb2009f ("ipconfig: Write NTP server IPs to 
/proc/net/ipconfig/ntp_servers")

from the vfs tree and commit:

  4d019b3f80dc ("ipconfig: Create /proc/net/ipconfig directory")

from the net-next tree.

I fixed it up (see below - there may be more to do) and can carry the
fix as necessary. This is now fixed as far as linux-next is concerned,
but any non trivial conflicts should be mentioned to your upstream
maintainer when your tree is submitted for merging.  You may also want
to consider cooperating with the maintainer of the conflicting tree to
minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/ipv4/ipconfig.c
index bbcbcc113d19,86c9f755de3d..
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@@ -1282,6 -1317,74 +1317,61 @@@ static int pnp_seq_show(struct seq_fil
   _servaddr);
return 0;
  }
 -
 -static int pnp_seq_open(struct inode *indoe, struct file *file)
 -{
 -  return single_open(file, pnp_seq_show, NULL);
 -}
 -
 -static const struct file_operations pnp_seq_fops = {
 -  .open   = pnp_seq_open,
 -  .read   = seq_read,
 -  .llseek = seq_lseek,
 -  .release= single_release,
 -};
 -
+ /* Create the /proc/net/ipconfig directory */
+ static int __init ipconfig_proc_net_init(void)
+ {
+   ipconfig_dir = proc_net_mkdir(_net, "ipconfig", init_net.proc_net);
+   if (!ipconfig_dir)
+   return -ENOMEM;
+ 
+   return 0;
+ }
+ 
+ /* Create a new file under /proc/net/ipconfig */
+ static int ipconfig_proc_net_create(const char *name,
+   const struct file_operations *fops)
+ {
+   char *pname;
+   struct proc_dir_entry *p;
+ 
+   if (!ipconfig_dir)
+   return -ENOMEM;
+ 
+   pname = kasprintf(GFP_KERNEL, "%s%s", "ipconfig/", name);
+   if (!pname)
+   return -ENOMEM;
+ 
+   p = proc_create(pname, 0444, init_net.proc_net, fops);
+   kfree(pname);
+   if (!p)
+   return -ENOMEM;
+ 
+   return 0;
+ }
+ 
+ /* Write NTP server IP addresses to /proc/net/ipconfig/ntp_servers */
+ static int ntp_servers_seq_show(struct seq_file *seq, void *v)
+ {
+   int i;
+ 
+   for (i = 0; i < CONF_NTP_SERVERS_MAX; i++) {
+   if (ic_ntp_servers[i] != NONE)
+   seq_printf(seq, "%pI4\n", _ntp_servers[i]);
+   }
+   return 0;
+ }
+ 
+ static int ntp_servers_seq_open(struct inode *inode, struct file *file)
+ {
+   return single_open(file, ntp_servers_seq_show, NULL);
+ }
+ 
+ static const struct file_operations ntp_servers_seq_fops = {
+   .open   = ntp_servers_seq_open,
+   .read   = seq_read,
+   .llseek = seq_lseek,
+   .release= single_release,
+ };
  #endif /* CONFIG_PROC_FS */
  
  /*
@@@ -1356,8 -1459,20 +1446,20 @@@ static int __init ip_auto_config(void
int err;
unsigned int i;
  
+   /* Initialise all name servers and NTP servers to NONE (but only if the
+* "ip=" or "nfsaddrs=" kernel command line parameters weren't decoded,
+* otherwise we'll overwrite the IP addresses specified there)
+*/
+   if (ic_set_manually == 0) {
+   ic_nameservers_predef();
+   ic_ntp_servers_predef();
+   }
+ 
  #ifdef CONFIG_PROC_FS
 -  proc_create("pnp", 0444, init_net.proc_net, _seq_fops);
 +  proc_create_single("pnp", 0444, init_net.proc_net, pnp_seq_show);
+ 
+   if (ipconfig_proc_net_init() == 0)
+   ipconfig_proc_net_create("ntp_servers", _servers_seq_fops);
  #endif /* CONFIG_PROC_FS */
  
if (!ic_enable)


pgp6lRKBz8avo.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the bpf-next tree with the bpf tree

2018-05-14 Thread Stephen Rothwell
Hi Jakub,

On Mon, 14 May 2018 13:41:40 -0700 Jakub Kicinski 
<jakub.kicin...@netronome.com> wrote:
>
> On Mon, 14 May 2018 11:57:00 +1000, Stephen Rothwell wrote:
> > diff --cc tools/lib/bpf/libbpf.c
> > index 8da4eeb101a6,df54c4c9e48a..
> > --- a/tools/lib/bpf/libbpf.c
> > +++ b/tools/lib/bpf/libbpf.c
> > @@@ -2163,9 -2193,12 +2193,12 @@@ int bpf_prog_load_xattr(const struct bp
> >   
> > if (!attr)
> > return -EINVAL;
> > +   if (!attr->file)
> > +   return -EINVAL;
> >   
> > -   obj = bpf_object__open(attr->file);
> > +   obj = __bpf_object__open(attr->file, NULL, 0,
> > +bpf_prog_type__needs_kver(attr->prog_type));
> >  -  if (IS_ERR(obj))
> >  +  if (IS_ERR_OR_NULL(obj))
> > return -ENOENT;  
> 
> This is okay, thanks.  The OR_NULL is unnecessary just using the
> bpf-next code is a better merge IMO.

Thanks, I have updated my merge resolution from today.

-- 
Cheers,
Stephen Rothwell


pgpuIAy4e4Tns.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the bpf-next tree with the bpf tree

2018-05-13 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the bpf-next tree got a conflict in:

  tools/lib/bpf/libbpf.c

between commit:

  3597683c9da6 ("tools: bpf: handle NULL return in bpf_prog_load_xattr()")

from the bpf tree and commit:

  17387dd5ac2c ("tools: bpf: don't complain about no kernel version for 
networking code")

from the bpf-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc tools/lib/bpf/libbpf.c
index 8da4eeb101a6,df54c4c9e48a..
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@@ -2163,9 -2193,12 +2193,12 @@@ int bpf_prog_load_xattr(const struct bp
  
if (!attr)
return -EINVAL;
+   if (!attr->file)
+   return -EINVAL;
  
-   obj = bpf_object__open(attr->file);
+   obj = __bpf_object__open(attr->file, NULL, 0,
+bpf_prog_type__needs_kver(attr->prog_type));
 -  if (IS_ERR(obj))
 +  if (IS_ERR_OR_NULL(obj))
return -ENOENT;
  
bpf_object__for_each_program(prog, obj) {


pgpTE_MtmC8uH.pgp
Description: OpenPGP digital signature


linux-next: Signed-off-by missing for commit in the net-next tree

2018-05-13 Thread Stephen Rothwell
Hi all,

Commit

  9cd00a8aa42e ("net: phy: phylink: Poll link GPIOs")

is missing a Signed-off-by from its author.

-- 
Cheers,
Stephen Rothwell


pgpi5UnW2Prac.pgp
Description: OpenPGP digital signature


linux-next: Signed-off-by missing for commit in the net tree

2018-05-10 Thread Stephen Rothwell
Hi all,

Commit

  0e8411e426e2 ("ipv4: reset fnhe_mtu_locked after cache route flushed")

is missing a Signed-off-by from its author.

-- 
Cheers,
Stephen Rothwell


pgp2hPLk4JDiD.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the net tree

2018-05-09 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  drivers/net/ethernet/realtek/r8169.c

between commit:

  3148dedfe79e ("r8169: fix powering up RTL8168h")

from the net tree and commit:

  4f447d296982 ("r8169: drop member pll_power_ops from struct rtl8169_private")

from the net-next tree.

I fixed it up (I think - see below) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/net/ethernet/realtek/r8169.c
index c7aac1fc99e8,6d99b141a7aa..
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@@ -4980,72 -4767,13 +4767,16 @@@ static void rtl_pll_power_down(struct r
  
  static void rtl_pll_power_up(struct rtl8169_private *tp)
  {
-   rtl_generic_op(tp, tp->pll_power_ops.up);
- 
-   /* give MAC/PHY some time to resume */
-   msleep(20);
- }
- 
- static void rtl_init_pll_power_ops(struct rtl8169_private *tp)
- {
-   struct pll_power_ops *ops = >pll_power_ops;
- 
switch (tp->mac_version) {
-   case RTL_GIGA_MAC_VER_07:
-   case RTL_GIGA_MAC_VER_08:
-   case RTL_GIGA_MAC_VER_09:
-   case RTL_GIGA_MAC_VER_10:
-   case RTL_GIGA_MAC_VER_16:
-   case RTL_GIGA_MAC_VER_29:
-   case RTL_GIGA_MAC_VER_30:
-   case RTL_GIGA_MAC_VER_37:
-   case RTL_GIGA_MAC_VER_39:
-   case RTL_GIGA_MAC_VER_43:
-   case RTL_GIGA_MAC_VER_47:
-   case RTL_GIGA_MAC_VER_48:
-   ops->down   = r810x_pll_power_down;
-   ops->up = r810x_pll_power_up;
-   break;
- 
-   case RTL_GIGA_MAC_VER_11:
-   case RTL_GIGA_MAC_VER_12:
-   case RTL_GIGA_MAC_VER_17:
-   case RTL_GIGA_MAC_VER_18:
-   case RTL_GIGA_MAC_VER_19:
-   case RTL_GIGA_MAC_VER_20:
-   case RTL_GIGA_MAC_VER_21:
-   case RTL_GIGA_MAC_VER_22:
-   case RTL_GIGA_MAC_VER_23:
-   case RTL_GIGA_MAC_VER_24:
-   case RTL_GIGA_MAC_VER_25:
-   case RTL_GIGA_MAC_VER_26:
-   case RTL_GIGA_MAC_VER_27:
-   case RTL_GIGA_MAC_VER_28:
-   case RTL_GIGA_MAC_VER_31:
-   case RTL_GIGA_MAC_VER_32:
-   case RTL_GIGA_MAC_VER_33:
-   case RTL_GIGA_MAC_VER_34:
-   case RTL_GIGA_MAC_VER_35:
-   case RTL_GIGA_MAC_VER_36:
-   case RTL_GIGA_MAC_VER_38:
-   case RTL_GIGA_MAC_VER_40:
-   case RTL_GIGA_MAC_VER_41:
-   case RTL_GIGA_MAC_VER_42:
-   case RTL_GIGA_MAC_VER_44:
-   case RTL_GIGA_MAC_VER_45:
-   case RTL_GIGA_MAC_VER_46:
-   case RTL_GIGA_MAC_VER_49:
-   case RTL_GIGA_MAC_VER_50:
-   case RTL_GIGA_MAC_VER_51:
-   ops->down   = r8168_pll_power_down;
-   ops->up = r8168_pll_power_up;
+   case RTL_GIGA_MAC_VER_01 ... RTL_GIGA_MAC_VER_06:
+   case RTL_GIGA_MAC_VER_13 ... RTL_GIGA_MAC_VER_15:
break;
- 
default:
-   ops->down   = NULL;
-   ops->up = NULL;
-   break;
+   r8168_pll_power_up(tp);
}
++
++  /* give MAC/PHY some time to resume */
++  msleep(20);
  }
  
  static void rtl_init_rxcfg(struct rtl8169_private *tp)


pgpgntRAHlhxp.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the net-next tree with the net tree

2018-05-09 Thread Stephen Rothwell
Hi Anders,

On Wed, 9 May 2018 10:24:49 +0200 Anders Roxell <anders.rox...@linaro.org> 
wrote:
>
> On 9 May 2018 at 06:19, Stephen Rothwell <s...@canb.auug.org.au> wrote:
> >
> >   TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh 
> > rtnetlink.sh
> > - TEST_PROGS += fib_tests.sh fib-onlink-tests.sh pmtu.sh
> > + TEST_PROGS += fib_tests.sh fib-onlink-tests.sh in_netns.sh pmtu.sh 
> > udpgso.sh  
> 
> in_netns.sh shouldn't be in the above list, its already in the
> TEST_PROGS_EXTENDED below.

Thanks for that, I have fixed up my merge resolution for tomorrow.

-- 
Cheers,
Stephen Rothwell


pgp_5MyqFFpLy.pgp
Description: OpenPGP digital signature


linux-next: build warning after merge of the bpf-next tree

2018-05-08 Thread Stephen Rothwell
Hi all,

After merging the bpf-next tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

In file included from include/linux/dma-mapping.h:5:0,
 from include/linux/skbuff.h:34,
 from include/linux/if_ether.h:23,
 from include/uapi/linux/bpf.h:13,
 from include/linux/bpf-cgroup.h:6,
 from include/linux/cgroup-defs.h:22,
 from include/linux/cgroup.h:28,
 from include/linux/perf_event.h:57,
 from include/linux/trace_events.h:10,
 from include/trace/trace_events.h:20,
 from include/trace/define_trace.h:96,
 from drivers/android/binder_trace.h:387,
 from drivers/android/binder.c:5702:
include/linux/sizes.h:24:0: warning: "SZ_1K" redefined
 #define SZ_1K0x0400
drivers/android/binder.c:116:0: note: this is the location of the previous 
definition
 #define SZ_1K   0x400
In file included from include/linux/dma-mapping.h:5:0,
 from include/linux/skbuff.h:34,
 from include/linux/if_ether.h:23,
 from include/uapi/linux/bpf.h:13,
 from include/linux/bpf-cgroup.h:6,
 from include/linux/cgroup-defs.h:22,
 from include/linux/cgroup.h:28,
 from include/linux/perf_event.h:57,
 from include/linux/trace_events.h:10,
 from include/trace/trace_events.h:20,
 from include/trace/define_trace.h:96,
 from drivers/android/binder_trace.h:387,
 from drivers/android/binder.c:5702:
include/linux/sizes.h:37:0: warning: "SZ_4M" redefined
 #define SZ_4M0x0040
drivers/android/binder.c:120:0: note: this is the location of the previous 
definition
 #define SZ_4M   0x40
fs/ecryptfs/miscdev.c:206:0: warning: "PKT_TYPE_OFFSET" redefined
 #define PKT_TYPE_OFFSET  0
In file included from include/linux/if_ether.h:23:0,
 from include/uapi/linux/bpf.h:13,
 from include/linux/bpf-cgroup.h:6,
 from include/linux/cgroup-defs.h:22,
 from include/linux/cgroup.h:28,
 from include/linux/writeback.h:183,
 from include/linux/backing-dev.h:16,
 from fs/ecryptfs/ecryptfs_kernel.h:41,
 from fs/ecryptfs/miscdev.c:30:
include/linux/skbuff.h:753:0: note: this is the location of the previous 
definition
 #define PKT_TYPE_OFFSET() offsetof(struct sk_buff, __pkt_type_offset)

Introduced by commit

  9c38f3c8b153 ("bpf: Provide helper to do forwarding lookups in kernel FIB 
table")

-- 
Cheers,
Stephen Rothwell


pgpE2feoYbw98.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the bpf-next tree with the s390 tree

2018-05-08 Thread Stephen Rothwell
Hi all,

On Tue, 8 May 2018 10:26:38 +1000 Stephen Rothwell <s...@canb.auug.org.au> 
wrote:
>
> Today's linux-next merge of the bpf-next tree got a conflict in:
> 
>   arch/s390/net/bpf_jit.S
> 
> between commit:
> 
>   de5cb6eb514e ("s390: use expoline thunks in the BPF JIT")
> 
> from the s390 tree and commit:
> 
>   e1cf4befa297 ("bpf, s390x: remove ld_abs/ld_ind")
> 
> from the bpf-next tree.
> 
> I fixed it up (I just removed the file as the latter does) and can
> carry the fix as necessary. This is now fixed as far as linux-next is
> concerned, but any non trivial conflicts should be mentioned to your
> upstream maintainer when your tree is submitted for merging.  You may
> also want to consider cooperating with the maintainer of the conflicting
> tree to minimise any particularly complex conflicts.

This is now a conflict between the net-next and s390 trees.

-- 
Cheers,
Stephen Rothwell


pgpkx8EEf4Xz8.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the net tree

2018-05-08 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  tools/testing/selftests/net/Makefile

between commit:

  1751eb42ddb5 ("selftests: net: use TEST_PROGS_EXTENDED")

from the net tree and commits:

  a7b15ab887e5 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc tools/testing/selftests/net/Makefile
index 3ff81a478dbe,73af45773938..
--- a/tools/testing/selftests/net/Makefile
+++ b/tools/testing/selftests/net/Makefile
@@@ -5,10 -5,13 +5,13 @@@ CFLAGS =  -Wall -Wl,--no-as-needed -O2 
  CFLAGS += -I../../../../usr/include/
  
  TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh 
rtnetlink.sh
- TEST_PROGS += fib_tests.sh fib-onlink-tests.sh pmtu.sh
+ TEST_PROGS += fib_tests.sh fib-onlink-tests.sh in_netns.sh pmtu.sh udpgso.sh
+ TEST_PROGS += udpgso_bench.sh
 -TEST_GEN_PROGS_EXTENDED := in_netns.sh
 +TEST_PROGS_EXTENDED := in_netns.sh
  TEST_GEN_FILES =  socket
  TEST_GEN_FILES += psock_fanout psock_tpacket msg_zerocopy
+ TEST_GEN_FILES += tcp_mmap tcp_inq
+ TEST_GEN_FILES += udpgso udpgso_bench_tx udpgso_bench_rx
  TEST_GEN_PROGS = reuseport_bpf reuseport_bpf_cpu reuseport_bpf_numa
  TEST_GEN_PROGS += reuseport_dualstack reuseaddr_conflict
  


pgpyr9vZprMQp.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the net tree

2018-05-08 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/tls/tls_main.c

between commit:

  98f0a39529e5 ("tls: fix use after free in tls_sk_proto_close")

from the net tree and commit:

  f66de3ee2c16 ("net/tls: Split conf to rx + tx")

from the net-next tree.

I fixed it up (I think - see below) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/tls/tls_main.c
index 20cd93be6236,4b57ddd72f34..
--- a/net/tls/tls_main.c
+++ b/net/tls/tls_main.c
@@@ -254,8 -252,12 +254,9 @@@ static void tls_sk_proto_close(struct s
lock_sock(sk);
sk_proto_close = ctx->sk_proto_close;
  
-   if (ctx->conf == TLS_BASE || ctx->conf == TLS_HW_RECORD) {
 -  if (ctx->tx_conf == TLS_HW_RECORD && ctx->rx_conf == TLS_HW_RECORD)
 -  goto skip_tx_cleanup;
 -
 -  if (ctx->tx_conf == TLS_BASE && ctx->rx_conf == TLS_BASE) {
 -  kfree(ctx);
 -  ctx = NULL;
++  if ((ctx->tx_conf == TLS_BASE && ctx->rx_conf == TLS_BASE) ||
++  (ctx->tx_conf == TLS_HW_RECORD && ctx->rx_conf == TLS_HW_RECORD)) {
 +  free_ctx = true;
goto skip_tx_cleanup;
}
  


pgptX6BkbTkGf.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the bpf-next tree with the s390 tree

2018-05-07 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the bpf-next tree got a conflict in:

  arch/s390/net/bpf_jit.S

between commit:

  de5cb6eb514e ("s390: use expoline thunks in the BPF JIT")

from the s390 tree and commit:

  e1cf4befa297 ("bpf, s390x: remove ld_abs/ld_ind")

from the bpf-next tree.

I fixed it up (I just removed the file as the latter does) and can
carry the fix as necessary. This is now fixed as far as linux-next is
concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


pgpdo8OixCj1S.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the tip tree with the bpf-next tree

2018-05-06 Thread Stephen Rothwell
Hi all,

On Mon, 7 May 2018 12:09:09 +1000 Stephen Rothwell <s...@canb.auug.org.au> 
wrote:
>
> Today's linux-next merge of the tip tree got a conflict in:
> 
>   arch/x86/net/bpf_jit_comp.c
> 
> between commit:
> 
>   e782bdcf58c5 ("bpf, x64: remove ld_abs/ld_ind")
> 
> from the bpf-next tree and commit:
> 
>   5f26c50143f5 ("x86/bpf: Clean up non-standard comments, to make the code 
> more readable")
> 
> from the tip tree.
> 
> I fixed it up (the former commit removed some code modified by the latter,
> so I just removed it) and can carry the fix as necessary. This is now
> fixed as far as linux-next is concerned, but any non trivial conflicts
> should be mentioned to your upstream maintainer when your tree is
> submitted for merging.  You may also want to consider cooperating with
> the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.

Actually the tip tree commit has been added to the bpf-next tree as a
different commit, so dropping it from the tip tree will clean this up.

-- 
Cheers,
Stephen Rothwell


pgpaJldvXfoBa.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the tip tree with the bpf-next tree

2018-05-06 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the tip tree got a conflict in:

  arch/x86/net/bpf_jit_comp.c

between commit:

  e782bdcf58c5 ("bpf, x64: remove ld_abs/ld_ind")

from the bpf-next tree and commit:

  5f26c50143f5 ("x86/bpf: Clean up non-standard comments, to make the code more 
readable")

from the tip tree.

I fixed it up (the former commit removed some code modified by the latter,
so I just removed it) and can carry the fix as necessary. This is now
fixed as far as linux-next is concerned, but any non trivial conflicts
should be mentioned to your upstream maintainer when your tree is
submitted for merging.  You may also want to consider cooperating with
the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell


pgpWf_JBVj2dv.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the net tree

2018-05-06 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  kernel/bpf/syscall.c

between commit:

  9ef09e35e521 ("bpf: fix possible spectre-v1 in find_and_alloc_map()")

from the net tree and commit:

  a26ca7c982cb ("bpf: btf: Add pretty print support to the basic arraymap")

from the net-next tree.

I fixed it up (I removed the conflicting addition of an include of
linux/btf.h in the latter commit as it had already been included
earlier in the file by a previous commit) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


pgpE08pKqWM8n.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the bpf-next tree with the bpf tree

2018-05-01 Thread Stephen Rothwell
Hi Song,

On Wed, 2 May 2018 04:40:20 + Song Liu <songliubrav...@fb.com> wrote:
>
> > -   CHECK(build_id_matches < 1, "build id match",
> > - "Didn't find expected build ID from the map\n");
> > +   if (CHECK(build_id_matches < 1, "build id match",
> > - "Didn't find expected build ID from the map"))
> > ++"Didn't find expected build ID from the map\n"))  
> 
> ^^^  Is there a "+" at the beginning of this line? 

No, this is a merge resolution diff, so the ++ means that the line did
not appear in either parent commit.

-- 
Cheers,
Stephen Rothwell


pgp_CHLS6CA2o.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the bpf-next tree with the bpf tree

2018-05-01 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the bpf-next tree got a conflict in:

  tools/testing/selftests/bpf/test_progs.c

between commit:

  a4e21ff8d9a3 ("bpf: minor fix to selftest test_stacktrace_build_id()")

from the bpf tree and commit:

  79b453501310 ("tools/bpf: add a test for bpf_get_stack with tracepoint prog")

from the bpf-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc tools/testing/selftests/bpf/test_progs.c
index fac581f1c57f,aa336f0abebc..
--- a/tools/testing/selftests/bpf/test_progs.c
+++ b/tools/testing/selftests/bpf/test_progs.c
@@@ -1137,9 -1193,14 +1193,14 @@@ static void test_stacktrace_build_id(vo
  err, errno))
goto disable_pmu;
  
+   stack_amap_fd = bpf_find_map(__func__, obj, "stack_amap");
+   if (CHECK(stack_amap_fd < 0, "bpf_find_map stack_amap",
+ "err %d errno %d\n", err, errno))
+   goto disable_pmu;
+ 
assert(system("dd if=/dev/urandom of=/dev/zero count=4 2> /dev/null")
   == 0);
 -  assert(system("./urandom_read if=/dev/urandom of=/dev/zero count=4 2> 
/dev/null") == 0);
 +  assert(system("./urandom_read") == 0);
/* disable stack trace collection */
key = 0;
val = 1;
@@@ -1188,8 -1249,15 +1249,15 @@@
previous_key = key;
} while (bpf_map_get_next_key(stackmap_fd, _key, ) == 0);
  
-   CHECK(build_id_matches < 1, "build id match",
- "Didn't find expected build ID from the map\n");
+   if (CHECK(build_id_matches < 1, "build id match",
 -"Didn't find expected build ID from the map"))
++"Didn't find expected build ID from the map\n"))
+   goto disable_pmu;
+ 
+   stack_trace_len = PERF_MAX_STACK_DEPTH
+   * sizeof(struct bpf_stack_build_id);
+   err = compare_stack_ips(stackmap_fd, stack_amap_fd, stack_trace_len);
+   CHECK(err, "compare_stack_ips stackmap vs. stack_amap",
+ "err %d errno %d\n", err, errno);
  
  disable_pmu:
ioctl(pmu_fd, PERF_EVENT_IOC_DISABLE);


pgpMypjajslQf.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the net tree

2018-05-01 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  include/net/ip6_route.h

between commit:

  edd7ceb78296 ("ipv6: Allow non-gateway ECMP for IPv6")

from the net tree and commit:

  93c2fb253d17 ("net/ipv6: Rename fib6_info struct elements")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/net/ip6_route.h
index abceb5864d99,8df4ff798b04..
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@@ -66,9 -66,10 +66,9 @@@ static inline bool rt6_need_strict(cons
(IPV6_ADDR_MULTICAST | IPV6_ADDR_LINKLOCAL | 
IPV6_ADDR_LOOPBACK);
  }
  
- static inline bool rt6_qualify_for_ecmp(const struct rt6_info *rt)
+ static inline bool rt6_qualify_for_ecmp(const struct fib6_info *f6i)
  {
-   return (rt->rt6i_flags & (RTF_ADDRCONF | RTF_DYNAMIC)) == 0;
 -  return (f6i->fib6_flags & (RTF_GATEWAY|RTF_ADDRCONF|RTF_DYNAMIC)) ==
 - RTF_GATEWAY;
++  return (f6i->fib6_flags & (RTF_ADDRCONF | RTF_DYNAMIC)) == 0;
  }
  
  void ip6_route_input(struct sk_buff *skb);


pgpPAxFaint4a.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the ipsec-next tree with the net-next tree

2018-04-29 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the ipsec-next tree got a conflict in:

  net/ipv4/ip_output.c

between commit:

  bec1f6f69736 ("udp: generate gso with UDP_SEGMENT")

from the net-next tree and commit:

  cd027a5433d6 ("udp: enable UDP checksum offload for ESP")

from the ipsec-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/ipv4/ip_output.c
index f2338e40c37d,a2dfb5a9ba76..
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@@ -909,8 -906,8 +909,8 @@@ static int __ip_append_data(struct soc
if (transhdrlen &&
length + fragheaderlen <= mtu &&
rt->dst.dev->features & (NETIF_F_HW_CSUM | NETIF_F_IP_CSUM) &&
 -  !(flags & MSG_MORE) &&
 +  (!(flags & MSG_MORE) || cork->gso_size) &&
-   !exthdrlen)
+   (!exthdrlen || (rt->dst.dev->features & NETIF_F_HW_ESP_TX_CSUM)))
csummode = CHECKSUM_PARTIAL;
  
cork->length += length;


pgpo9MFWkQToP.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the net tree

2018-04-29 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  tools/testing/selftests/net/Makefile

between commit:

  9faedd643fd9 ("selftests: net: add in_netns.sh TEST_GEN_PROGS_EXTENDED")

from the net tree and commit:

  a160725780e3 ("selftests: udp gso")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc tools/testing/selftests/net/Makefile
index daf5effec3f0,df9102ec7b7a..
--- a/tools/testing/selftests/net/Makefile
+++ b/tools/testing/selftests/net/Makefile
@@@ -5,12 -5,14 +5,15 @@@ CFLAGS =  -Wall -Wl,--no-as-needed -O2 
  CFLAGS += -I../../../../usr/include/
  
  TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh 
rtnetlink.sh
- TEST_PROGS += fib_tests.sh fib-onlink-tests.sh pmtu.sh
 -TEST_PROGS += fib_tests.sh fib-onlink-tests.sh in_netns.sh pmtu.sh udpgso.sh
++TEST_PROGS += fib_tests.sh fib-onlink-tests.sh pmtu.sh udpgso.sh
+ TEST_PROGS += udpgso_bench.sh
 +TEST_GEN_PROGS_EXTENDED := in_netns.sh
  TEST_GEN_FILES =  socket
  TEST_GEN_FILES += psock_fanout psock_tpacket msg_zerocopy
+ TEST_GEN_FILES += tcp_mmap
  TEST_GEN_PROGS = reuseport_bpf reuseport_bpf_cpu reuseport_bpf_numa
  TEST_GEN_PROGS += reuseport_dualstack reuseaddr_conflict
+ TEST_GEN_PROGS += udpgso udpgso_bench_tx udpgso_bench_rx
  
  include ../lib.mk
  


pgpPVaCdeufsq.pgp
Description: OpenPGP digital signature


linux-next: Signed-off-by missing for commit in the net tree

2018-04-29 Thread Stephen Rothwell
Hi all,

Commit

  6082d9c9c94a ("net/mlx5: Fix mlx5_get_vector_affinity function")

is missing a Signed-off-by from its committer.

-- 
Cheers,
Stephen Rothwell


pgp_WA4LdP8dY.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the bpf-next tree with the bpf tree

2018-04-25 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the bpf-next tree got a conflict in:

  samples/sockmap/Makefile

between commit:

  4dfe1bb95235 ("bpf: sockmap sample use clang flag, -target bpf")

from the bpf tree and commit:

  2e04eb1dd1ca ("bpf: sockmap, remove samples program")

from the bpf-next tree.

I fixed it up (I just removed the file) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


pgplPjizH_khD.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the bpf-next tree with the net-next tree

2018-04-25 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the bpf-next tree got a conflict in:

  tools/testing/selftests/bpf/.gitignore

between commit:

  0abf854d7cbb ("selftests: bpf: update .gitignore with missing generated 
files")

from the net-next tree and commit:

  b6fd9cf796e6 ("selftests: bpf: update .gitignore with missing file")

from the bpf-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc tools/testing/selftests/bpf/.gitignore
index 5e1ab2f0eb79,da19f0562bf8..
--- a/tools/testing/selftests/bpf/.gitignore
+++ b/tools/testing/selftests/bpf/.gitignore
@@@ -12,6 -12,4 +12,7 @@@ test_tcpbpf_use
  test_verifier_log
  feature
  test_libbpf_open
+ test_btf
 +test_sock
 +test_sock_addr
 +urandom_read


pgp4u6QtghOtE.pgp
Description: OpenPGP digital signature


linux-next: build failure after merge of the bpf tree

2018-04-15 Thread Stephen Rothwell
Hi all,

After merging the bpf tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

kernel/bpf/core.o: In function `sock_map_release':
core.c:(.text+0xd04): multiple definition of `sock_map_release'
kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here
kernel/events/core.o: In function `sock_map_release':
core.c:(.text+0x85cc): multiple definition of `sock_map_release'
kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here
block/blk-core.o: In function `sock_map_release':
blk-core.c:(.text+0x58e8): multiple definition of `sock_map_release'
kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here
drivers/net/virtio_net.o: In function `sock_map_release':
virtio_net.c:(.text+0x53ec): multiple definition of `sock_map_release'
kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here
net/core/dev.o: In function `sock_map_release':
dev.c:(.text+0x6c68): multiple definition of `sock_map_release'
kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here
net/core/rtnetlink.o: In function `sock_map_release':
rtnetlink.c:(.text+0x63e0): multiple definition of `sock_map_release'
kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here
net/core/filter.o: In function `sock_map_release':
filter.c:(.text+0x8c8c): multiple definition of `sock_map_release'
kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here
net/core/sock_reuseport.o: In function `sock_map_release':
sock_reuseport.c:(.text+0x398): multiple definition of `sock_map_release'
kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here
net/bpf/test_run.o: In function `sock_map_release':
test_run.c:(.text+0x3dc): multiple definition of `sock_map_release'
kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here
net/packet/af_packet.o: In function `sock_map_release':
af_packet.c:(.text+0x6958): multiple definition of `sock_map_release'
kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here

Caused by commit

  9b2e8bbc4e7a ("bpf: sockmap, map_release does not hold refcnt for pinned 
maps")

I applied the following patch for today:

From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Mon, 16 Apr 2018 12:27:24 +1000
Subject: [PATCH] fix for "bpf: sockmap, map_release does not hold refcnt for
 pinned maps"

Signed-off-by: Stephen Rothwell <s...@canb.auug.org.au>
---
 include/linux/bpf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index f46561de5154..3b6c2b66f414 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -660,7 +660,7 @@ static inline int sock_map_prog(struct bpf_map *map,
return -EOPNOTSUPP;
 }
 
-void sock_map_release(struct bpf_map *map) {}
+static inline void sock_map_release(struct bpf_map *map) {}
 #endif
 
 /* verifier prototypes for helper functions called from eBPF programs */
-- 
2.16.3

-- 
Cheers,
Stephen Rothwell


pgpYiNKCnBgyc.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the net-next tree with the pci tree

2018-04-04 Thread Stephen Rothwell
Hi all,

On Tue, 3 Apr 2018 13:14:54 +1000 Stephen Rothwell <s...@canb.auug.org.au> 
wrote:
>
> Today's linux-next merge of the net-next tree got a conflict in:
> 
>   drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> 
> between commit:
> 
>   2907938d2375 ("net/mlx5e: Use pcie_bandwidth_available() to compute 
> bandwidth")
> 
> from the pci tree and commit:
> 
>   0608d4dbaf4e ("net/mlx5e: Unify slow PCI heuristic")
> 
> from the net-next tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> index 884337f88589,0aab3afc6885..
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> @@@ -3880,16 -4026,50 +4033,20 @@@ void mlx5e_build_default_indir_rqt(u32 
>   indirection_rqt[i] = i % num_channels;
>   }
>   
> - static bool cqe_compress_heuristic(u32 link_speed, u32 pci_bw)
>  -static int mlx5e_get_pci_bw(struct mlx5_core_dev *mdev, u32 *pci_bw)
>  -{
>  -enum pcie_link_width width;
>  -enum pci_bus_speed speed;
>  -int err = 0;
>  -
>  -err = pcie_get_minimum_link(mdev->pdev, , );
>  -if (err)
>  -return err;
>  -
>  -if (speed == PCI_SPEED_UNKNOWN || width == PCIE_LNK_WIDTH_UNKNOWN)
>  -return -EINVAL;
>  -
>  -switch (speed) {
>  -case PCIE_SPEED_2_5GT:
>  -*pci_bw = 2500 * width;
>  -break;
>  -case PCIE_SPEED_5_0GT:
>  -*pci_bw = 5000 * width;
>  -break;
>  -case PCIE_SPEED_8_0GT:
>  -*pci_bw = 8000 * width;
>  -break;
>  -default:
>  -return -EINVAL;
>  -}
>  -
>  -return 0;
>  -}
>  -
> + static bool slow_pci_heuristic(struct mlx5_core_dev *mdev)
>   {
> - return (link_speed && pci_bw &&
> - (pci_bw < 4) && (pci_bw < link_speed));
> - }
> + u32 link_speed = 0;
> + u32 pci_bw = 0;
>   
> - static bool hw_lro_heuristic(u32 link_speed, u32 pci_bw)
> - {
> - return !(link_speed && pci_bw &&
> -  (pci_bw <= 16000) && (pci_bw < link_speed));
> + mlx5e_get_max_linkspeed(mdev, _speed);
>  -mlx5e_get_pci_bw(mdev, _bw);
> ++pci_bw = pcie_bandwidth_available(mdev->pdev, NULL, NULL, NULL);
> + mlx5_core_dbg_once(mdev, "Max link speed = %d, PCI BW = %d\n",
> +        link_speed, pci_bw);
> + 
> + #define MLX5E_SLOW_PCI_RATIO (2)
> + 
> + return link_speed && pci_bw &&
> + link_speed > MLX5E_SLOW_PCI_RATIO * pci_bw;
>   }
>   
>   void mlx5e_set_tx_cq_mode_params(struct mlx5e_params *params, u8 
> cq_period_mode)

This is now a conflict between the pci tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell


pgpWGHhkC1zBc.pgp
Description: OpenPGP digital signature


linux-next: build failure after merge of the tip tree

2018-04-02 Thread Stephen Rothwell
Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

net/rxrpc/call_object.c: In function 'rxrpc_rcu_destroy_call':
net/rxrpc/call_object.c:661:3: error: implicit declaration of function 
'wake_up_atomic_t'; did you mean 'wake_up_bit'? 
[-Werror=implicit-function-declaration]
   wake_up_atomic_t(>nr_calls);
   ^~~~
   wake_up_bit
net/rxrpc/call_object.c: In function 'rxrpc_destroy_all_calls':
net/rxrpc/call_object.c:728:2: error: implicit declaration of function 
'wait_on_atomic_t'; did you mean 'wait_on_bit'? 
[-Werror=implicit-function-declaration]
  wait_on_atomic_t(>nr_calls, atomic_t_wait, TASK_UNINTERRUPTIBLE);
  ^~~~
  wait_on_bit
net/rxrpc/call_object.c:728:37: error: 'atomic_t_wait' undeclared (first use in 
this function); did you mean 'atomic_long_t'?
  wait_on_atomic_t(>nr_calls, atomic_t_wait, TASK_UNINTERRUPTIBLE);
 ^
 atomic_long_t
net/rxrpc/call_object.c:728:37: note: each undeclared identifier is reported 
only once for each function it appears in
net/rxrpc/call_accept.c: In function 'rxrpc_discard_prealloc':
net/rxrpc/call_accept.c:223:4: error: implicit declaration of function 
'wake_up_atomic_t'; did you mean 'wake_up_bit'? 
[-Werror=implicit-function-declaration]
wake_up_atomic_t(>nr_conns);
^~~~
wake_up_bit

Caused by commit

  9b8cce52c4b5 ("sched/wait: Remove the wait_on_atomic_t() API")

interacting with commits

  d3be4d244330 ("xrpc: Fix potential call vs socket/net destruction race")
  31f5f9a1691e ("rxrpc: Fix apparent leak of rxrpc_local objects")

from the net-next tree.

Haven't we figured out how to remove/change APIs yet? :-(

That tip tree commit is now in Linus' tree (merged since I started this
morning) so the net-next tree will need the below patch (or something
similar when it is merged.

I have applied the following merge fix patch (this may need more work):

From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Tue, 3 Apr 2018 15:34:48 +1000
Subject: [PATCH] sched/wait: merge fix up for wait_on_atomic() API removal

Signed-off-by: Stephen Rothwell <s...@canb.auug.org.au>
---
 net/rxrpc/call_accept.c | 2 +-
 net/rxrpc/call_object.c | 4 ++--
 net/rxrpc/conn_object.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/rxrpc/call_accept.c b/net/rxrpc/call_accept.c
index f67017dcb25e..a9a9be5519b9 100644
--- a/net/rxrpc/call_accept.c
+++ b/net/rxrpc/call_accept.c
@@ -220,7 +220,7 @@ void rxrpc_discard_prealloc(struct rxrpc_sock *rx)
write_unlock(>conn_lock);
kfree(conn);
if (atomic_dec_and_test(>nr_conns))
-   wake_up_atomic_t(>nr_conns);
+   wake_up_var(>nr_conns);
tail = (tail + 1) & (size - 1);
}
 
diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c
index f721c2b7e234..f6734d8cb01a 100644
--- a/net/rxrpc/call_object.c
+++ b/net/rxrpc/call_object.c
@@ -658,7 +658,7 @@ static void rxrpc_rcu_destroy_call(struct rcu_head *rcu)
kfree(call->rxtx_annotations);
kmem_cache_free(rxrpc_call_jar, call);
if (atomic_dec_and_test(>nr_calls))
-   wake_up_atomic_t(>nr_calls);
+   wake_up_var(>nr_calls);
 }
 
 /*
@@ -725,5 +725,5 @@ void rxrpc_destroy_all_calls(struct rxrpc_net *rxnet)
write_unlock(>call_lock);
 
atomic_dec(>nr_calls);
-   wait_on_atomic_t(>nr_calls, atomic_t_wait, TASK_UNINTERRUPTIBLE);
+   wait_var_event(>nr_calls, !atomic_read(>nr_calls));
 }
diff --git a/net/rxrpc/conn_object.c b/net/rxrpc/conn_object.c
index 0950ee3d26f5..4c77a78a252a 100644
--- a/net/rxrpc/conn_object.c
+++ b/net/rxrpc/conn_object.c
@@ -367,7 +367,7 @@ static void rxrpc_destroy_connection(struct rcu_head *rcu)
rxrpc_put_peer(conn->params.peer);
 
if (atomic_dec_and_test(>params.local->rxnet->nr_conns))
-   wake_up_atomic_t(>params.local->rxnet->nr_conns);
+   wake_up_var(>params.local->rxnet->nr_conns);
rxrpc_put_local(conn->params.local);
 
kfree(conn);
@@ -482,6 +482,6 @@ void rxrpc_destroy_all_connections(struct rxrpc_net *rxnet)
/* We need to wait for the connections to be destroyed by RCU as they
 * pin things that we still need to get rid of.
 */
-   wait_on_atomic_t(>nr_conns, atomic_t_wait, TASK_UNINTERRUPTIBLE);
+   wait_var_event(>nr_conns, !atomic_read(>nr_conns));
_leave("");
 }
-- 
2.16.1

-- 
Cheers,
Stephen Rothwell


pgpV_S8PAHTPQ.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the pci tree

2018-04-02 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  drivers/net/ethernet/mellanox/mlx5/core/en_main.c

between commit:

  2907938d2375 ("net/mlx5e: Use pcie_bandwidth_available() to compute 
bandwidth")

from the pci tree and commit:

  0608d4dbaf4e ("net/mlx5e: Unify slow PCI heuristic")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 884337f88589,0aab3afc6885..
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@@ -3880,16 -4026,50 +4033,20 @@@ void mlx5e_build_default_indir_rqt(u32 
indirection_rqt[i] = i % num_channels;
  }
  
- static bool cqe_compress_heuristic(u32 link_speed, u32 pci_bw)
 -static int mlx5e_get_pci_bw(struct mlx5_core_dev *mdev, u32 *pci_bw)
 -{
 -  enum pcie_link_width width;
 -  enum pci_bus_speed speed;
 -  int err = 0;
 -
 -  err = pcie_get_minimum_link(mdev->pdev, , );
 -  if (err)
 -  return err;
 -
 -  if (speed == PCI_SPEED_UNKNOWN || width == PCIE_LNK_WIDTH_UNKNOWN)
 -  return -EINVAL;
 -
 -  switch (speed) {
 -  case PCIE_SPEED_2_5GT:
 -  *pci_bw = 2500 * width;
 -  break;
 -  case PCIE_SPEED_5_0GT:
 -  *pci_bw = 5000 * width;
 -  break;
 -  case PCIE_SPEED_8_0GT:
 -  *pci_bw = 8000 * width;
 -  break;
 -  default:
 -  return -EINVAL;
 -  }
 -
 -  return 0;
 -}
 -
+ static bool slow_pci_heuristic(struct mlx5_core_dev *mdev)
  {
-   return (link_speed && pci_bw &&
-   (pci_bw < 4) && (pci_bw < link_speed));
- }
+   u32 link_speed = 0;
+   u32 pci_bw = 0;
  
- static bool hw_lro_heuristic(u32 link_speed, u32 pci_bw)
- {
-   return !(link_speed && pci_bw &&
-(pci_bw <= 16000) && (pci_bw < link_speed));
+   mlx5e_get_max_linkspeed(mdev, _speed);
 -  mlx5e_get_pci_bw(mdev, _bw);
++  pci_bw = pcie_bandwidth_available(mdev->pdev, NULL, NULL, NULL);
+   mlx5_core_dbg_once(mdev, "Max link speed = %d, PCI BW = %d\n",
+  link_speed, pci_bw);
+ 
+ #define MLX5E_SLOW_PCI_RATIO (2)
+ 
+   return link_speed && pci_bw &&
+   link_speed > MLX5E_SLOW_PCI_RATIO * pci_bw;
  }
  
  void mlx5e_set_tx_cq_mode_params(struct mlx5e_params *params, u8 
cq_period_mode)


pgpHbGrm02dE5.pgp
Description: OpenPGP digital signature


Re: linux-next: Signed-off-by missing for commits in the net-next tree

2018-04-02 Thread Stephen Rothwell
Hi Johan,

On Mon, 2 Apr 2018 08:38:03 +0300 Johan Hedberg <johan.hedb...@intel.com> wrote:
>
> On Mon, Apr 02, 2018, Stephen Rothwell wrote:
> >   45a42bc9cc65 ("Bluetooth: hci_bcm: Remove DMI quirk for the MINIX Z83-4")
> >   f9b95db0165a ("Bluetooth: btrsi: remove unused including 
> > ")
> >   96e58d368fa6 ("Bluetooth: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for 
> > BTUSB_QCA_ROME")
> >   9ea471320e13 ("Bluetooth: Mark expected switch fall-throughs")
> > 
> > are missing a Signed-off-by from their committer.  
> 
> I think this is because I fixed up a missing author name in "Bluetooth:
> hci_bcm: Remove DMI quirk for the MINIX Z83-4" and did a push --force,
> whereas these patches were originally committed by Marcel. Should I be
> adding my signed-off-by to all affected patches when doing such rebases?

Yep, Ideally we should have a Signed-off-by from everyone who involved
in getting the patches into the final tree.  That definitely means that
the final committer needs to add one.

-- 
Cheers,
Stephen Rothwell


pgpsVFRE3kh0r.pgp
Description: OpenPGP digital signature


linux-next: Signed-off-by missing for commits in the net-next tree

2018-04-01 Thread Stephen Rothwell
Hi all,

Commits

  45a42bc9cc65 ("Bluetooth: hci_bcm: Remove DMI quirk for the MINIX Z83-4")
  f9b95db0165a ("Bluetooth: btrsi: remove unused including ")
  96e58d368fa6 ("Bluetooth: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for 
BTUSB_QCA_ROME")
  9ea471320e13 ("Bluetooth: Mark expected switch fall-throughs")

are missing a Signed-off-by from their committer.

-- 
Cheers,
Stephen Rothwell


pgpLj3DjANAce.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the ipsec tree with the net tree

2018-03-27 Thread Stephen Rothwell
Hi Petr,

On Tue, 27 Mar 2018 17:33:43 +0300 Petr Machata <pe...@mellanox.com> wrote:
>
> Hi, this conflict needs to be resolved differently. Below I'm adding a
> patch on top of linux-next. Squash or apply as you see fit.
> 
> What's the right way to proceed from here? It looks to me like Stefano
> or Steffen should take this into the ipsec tree (possibly just squash to
> the clamping fix), as they'll hit this conflict the next time they
> rebase on top of net...? Let me know what to do, please.

I fixed up the resolution in linux-next to match your patch from
today.  Dave will need to do this when he merges the ipsec tree into
the net tree before sending it to Linus.

-- 
Cheers,
Stephen Rothwell


pgpiTRiVzDSvB.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the ipsec tree with the net tree

2018-03-25 Thread Stephen Rothwell
Hi Steffen,

Today's linux-next merge of the ipsec tree got a conflict in:

  net/ipv4/ip_tunnel.c

between commit:

  f6cc9c054e77 ("ip_tunnel: Emit events for post-register MTU changes")

from the net tree and commit:

  24fc79798b8d ("ip_tunnel: Clamp MTU to bounds on new link")

from the ipsec tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/ipv4/ip_tunnel.c
index 7b85ffad5d74,7c76dd17b6b9..
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@@ -1117,10 -1108,13 +1117,15 @@@ int ip_tunnel_newlink(struct net_devic
eth_hw_addr_random(dev);
  
mtu = ip_tunnel_bind_dev(dev);
-   if (!tb[IFLA_MTU]) {
+   if (tb[IFLA_MTU]) {
+   unsigned int max = 0xfff8 - dev->hard_header_len - nt->hlen;
+ 
+   dev->mtu = clamp(dev->mtu, (unsigned int)ETH_MIN_MTU,
+(unsigned int)(max - sizeof(struct iphdr)));
+   } else {
 -  dev->mtu = mtu;
 +  err = dev_set_mtu(dev, mtu);
 +  if (err)
 +  goto err_dev_set_mtu;
}
  
ip_tunnel_add(itn, nt);


pgpChhvgOn4lq.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the mac80211 tree

2018-03-21 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/mac80211/debugfs.c
  include/net/mac80211.h

between commit:

  7c181f4fcdc6 ("mac80211: add ieee80211_hw flag for QoS NDP support")

from the mac80211 tree and commit:

  94ba92713f83 ("mac80211: Call mgd_prep_tx before transmitting 
deauthentication")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/net/mac80211.h
index 2b581bd93812,2fd59ed3be00..
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@@ -2063,9 -2070,14 +2070,17 @@@ struct ieee80211_txq 
   * @IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA: Hardware supports buffer STA on
   *TDLS links.
   *
 + * @IEEE80211_HW_DOESNT_SUPPORT_QOS_NDP: The driver (or firmware) doesn't
 + *support QoS NDP for AP probing - that's most likely a driver bug.
 + *
+  * @IEEE80211_HW_DEAUTH_NEED_MGD_TX_PREP: The driver requires the
+  *mgd_prepare_tx() callback to be called before transmission of a
+  *deauthentication frame in case the association was completed but no
+  *beacon was heard. This is required in multi-channel scenarios, where the
+  *virtual interface might not be given air time for the transmission of
+  *the frame, as it is not synced with the AP/P2P GO yet, and thus the
+  *deauthentication frame might not be transmitted.
+  *
   * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
   */
  enum ieee80211_hw_flags {
@@@ -2109,7 -2121,7 +2124,8 @@@
IEEE80211_HW_REPORTS_LOW_ACK,
IEEE80211_HW_SUPPORTS_TX_FRAG,
IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA,
 +  IEEE80211_HW_DOESNT_SUPPORT_QOS_NDP,
+   IEEE80211_HW_DEAUTH_NEED_MGD_TX_PREP,
  
/* keep last, obviously */
NUM_IEEE80211_HW_FLAGS
diff --cc net/mac80211/debugfs.c
index 94c7ee9df33b,a75653affbf7..
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@@ -212,7 -212,7 +212,8 @@@ static const char *hw_flag_names[] = 
FLAG(REPORTS_LOW_ACK),
FLAG(SUPPORTS_TX_FRAG),
FLAG(SUPPORTS_TDLS_BUFFER_STA),
 +  FLAG(DOESNT_SUPPORT_QOS_NDP),
+   FLAG(DEAUTH_NEED_MGD_TX_PREP),
  #undef FLAG
  };
  


pgpJb0NCHNdlE.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the syscalls tree

2018-03-18 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  include/linux/socket.h

between commits:

  06947f40e3e9 ("net: socket: add __sys_recvfrom() helper; remove in-kernel 
call to syscall")
  bd4053a762c6 ("net: socket: move check for forbid_cmsg_compat to 
__sys_...msg()")

from the syscalls tree and commit:

  d8d211a2a0c3 ("net: Make extern and export get_net_ns()")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/linux/socket.h
index e2b6bd4fe977,1ce1f768a58c..
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@@ -356,30 -352,7 +356,31 @@@ extern long __sys_sendmsg(int fd, struc
  extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int 
vlen,
  unsigned int flags, struct timespec *timeout);
  extern int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg,
 -unsigned int vlen, unsigned int flags);
 +unsigned int vlen, unsigned int flags,
 +bool forbid_cmsg_compat);
 +
 +/* helpers which do the actual work for syscalls */
 +extern int __sys_recvfrom(int fd, void __user *ubuf, size_t size,
 +unsigned int flags, struct sockaddr __user *addr,
 +int __user *addr_len);
 +extern int __sys_sendto(int fd, void __user *buff, size_t len,
 +  unsigned int flags, struct sockaddr __user *addr,
 +  int addr_len);
 +extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr,
 +   int __user *upeer_addrlen, int flags);
 +extern int __sys_socket(int family, int type, int protocol);
 +extern int __sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen);
 +extern int __sys_connect(int fd, struct sockaddr __user *uservaddr,
 +   int addrlen);
 +extern int __sys_listen(int fd, int backlog);
 +extern int __sys_getsockname(int fd, struct sockaddr __user *usockaddr,
 +   int __user *usockaddr_len);
 +extern int __sys_getpeername(int fd, struct sockaddr __user *usockaddr,
 +   int __user *usockaddr_len);
 +extern int __sys_socketpair(int family, int type, int protocol,
 +  int __user *usockvec);
 +extern int __sys_shutdown(int fd, int how);
 +
  
+ extern struct ns_common *get_net_ns(struct ns_common *ns);
  #endif /* _LINUX_SOCKET_H */


pgpP0HMQOuVNT.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the rdma-fixes tree

2018-03-15 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  drivers/infiniband/hw/mlx5/main.c

between commit:

  42cea83f9524 ("IB/mlx5: Fix cleanup order on unload")

from the rdma-fixes tree and commit:

  b5ca15ad7e61 ("IB/mlx5: Add proper representors support")

from the net-next tree.

I fixed it up (see below and the merge fix patch as well) and can
carry the fix as necessary. This is now fixed as far as linux-next is
concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Fri, 16 Mar 2018 11:54:01 +1100
Subject: [PATCH] IB/mlx5: merge fix for "Fix cleanup order on unload"

Signed-off-by: Stephen Rothwell <s...@canb.auug.org.au>
---
 drivers/infiniband/hw/mlx5/ib_rep.c  | 6 +++---
 drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/ib_rep.c 
b/drivers/infiniband/hw/mlx5/ib_rep.c
index 61cc3d7db257..7fb997dadd80 100644
--- a/drivers/infiniband/hw/mlx5/ib_rep.c
+++ b/drivers/infiniband/hw/mlx5/ib_rep.c
@@ -33,9 +33,9 @@ static const struct mlx5_ib_profile rep_profile = {
STAGE_CREATE(MLX5_IB_STAGE_IB_REG,
 mlx5_ib_stage_ib_reg_init,
 mlx5_ib_stage_ib_reg_cleanup),
-   STAGE_CREATE(MLX5_IB_STAGE_UMR_RESOURCES,
-mlx5_ib_stage_umr_res_init,
-mlx5_ib_stage_umr_res_cleanup),
+   STAGE_CREATE(MLX5_IB_STAGE_POST_IB_REG_UMR,
+mlx5_ib_stage_post_ib_reg_umr_init,
+NULL),
STAGE_CREATE(MLX5_IB_STAGE_CLASS_ATTR,
 mlx5_ib_stage_class_attr_init,
 NULL),
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h 
b/drivers/infiniband/hw/mlx5/mlx5_ib.h
index 7ec753ec7962..c45a7abdbe3e 100644
--- a/drivers/infiniband/hw/mlx5/mlx5_ib.h
+++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h
@@ -1071,8 +1071,7 @@ int mlx5_ib_stage_bfrag_init(struct mlx5_ib_dev *dev);
 void mlx5_ib_stage_bfrag_cleanup(struct mlx5_ib_dev *dev);
 int mlx5_ib_stage_ib_reg_init(struct mlx5_ib_dev *dev);
 void mlx5_ib_stage_ib_reg_cleanup(struct mlx5_ib_dev *dev);
-int mlx5_ib_stage_umr_res_init(struct mlx5_ib_dev *dev);
-void mlx5_ib_stage_umr_res_cleanup(struct mlx5_ib_dev *dev);
+int mlx5_ib_stage_post_ib_reg_umr_init(struct mlx5_ib_dev *dev);
 int mlx5_ib_stage_class_attr_init(struct mlx5_ib_dev *dev);
 void __mlx5_ib_remove(struct mlx5_ib_dev *dev,
  const struct mlx5_ib_profile *profile,
-- 
2.16.1

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/infiniband/hw/mlx5/main.c
index da091de4e69d,d9474b95d8e5..
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@@ -4860,19 -4999,19 +4996,19 @@@ int mlx5_ib_stage_ib_reg_init(struct ml
return ib_register_device(>ib_dev, NULL);
  }
  
 -void mlx5_ib_stage_ib_reg_cleanup(struct mlx5_ib_dev *dev)
 +static void mlx5_ib_stage_pre_ib_reg_umr_cleanup(struct mlx5_ib_dev *dev)
  {
 -  ib_unregister_device(>ib_dev);
 +  destroy_umrc_res(dev);
  }
  
- static void mlx5_ib_stage_ib_reg_cleanup(struct mlx5_ib_dev *dev)
 -int mlx5_ib_stage_umr_res_init(struct mlx5_ib_dev *dev)
++void mlx5_ib_stage_ib_reg_cleanup(struct mlx5_ib_dev *dev)
  {
 -  return create_umr_res(dev);
 +  ib_unregister_device(>ib_dev);
  }
  
- static int mlx5_ib_stage_post_ib_reg_umr_init(struct mlx5_ib_dev *dev)
 -void mlx5_ib_stage_umr_res_cleanup(struct mlx5_ib_dev *dev)
++int mlx5_ib_stage_post_ib_reg_umr_init(struct mlx5_ib_dev *dev)
  {
 -  destroy_umrc_res(dev);
 +  return create_umr_res(dev);
  }
  
  static int mlx5_ib_stage_delay_drop_init(struct mlx5_ib_dev *dev)
@@@ -4999,6 -5144,48 +5144,48 @@@ static const struct mlx5_ib_profile pf_
 NULL),
  };
  
+ static const struct mlx5_ib_profile nic_rep_profile = {
+   STAGE_CREATE(MLX5_IB_STAGE_INIT,
+mlx5_ib_stage_init_init,
+mlx5_ib_stage_init_cleanup),
+   STAGE_CREATE(MLX5_IB_STAGE_FLOW_DB,
+mlx5_ib_stage_flow_db_init,
+mlx5_ib_stage_flow_db_cleanup),
+   STAGE_CREATE(MLX5_IB_STAGE_CAPS,
+mlx5_ib_stage_caps_init,
+NULL),
+   STAGE_CREATE(MLX5_IB_STAGE_NON_DEFAULT_CB,
+mlx5_ib_stage_rep_non_default_cb,
+NULL),
+   STAGE_CREATE(MLX5_IB_STAGE_ROCE,
+mlx5_ib_stage_rep_roce_init,
+mlx5_ib_stage_rep_roce_cleanup),
+   STAGE_CREATE(MLX5_IB_STAGE_DEVICE_RESOURCES,
+mlx5_ib_stage_dev_res_init,
+mlx5_ib_stage_dev_res_cl

linux-next: manual merge of the staging tree with the net-next tree

2018-03-15 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the staging tree got a conflict in:

  drivers/staging/irda/net/af_irda.c

between commit:

  9b2c45d479d0 ("net: make getname() functions return length rather than use 
int* parameter")

from the net-next tree and commit:

  d64c2a76123f ("staging: irda: remove the irda network stack and drivers")

from the staging tree.

I fixed it up (I just removed the file) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


pgpfElYkFZNTx.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the net tree

2018-03-14 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/ipv4/xfrm4_policy.c

between commit:

  d52e5a7e7ca4 ("ipv4: lock mtu in fnhe when received PMTU < 
net.ipv4.route.min_pmtu")

from the net tree and commit:

  68e813aa4307 ("net/ipv4: Remove fib table id from rtable")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/ipv4/xfrm4_policy.c
index fbebda67ac1b,0c752dc3f93b..
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@@ -100,10 -100,7 +100,9 @@@ static int xfrm4_fill_dst(struct xfrm_d
xdst->u.rt.rt_gateway = rt->rt_gateway;
xdst->u.rt.rt_uses_gateway = rt->rt_uses_gateway;
xdst->u.rt.rt_pmtu = rt->rt_pmtu;
 +  xdst->u.rt.rt_mtu_locked = rt->rt_mtu_locked;
-   xdst->u.rt.rt_table_id = rt->rt_table_id;
INIT_LIST_HEAD(>u.rt.rt_uncached);
 +  rt_add_uncached_list(>u.rt);
  
return 0;
  }


pgpuOLrqvfiB_.pgp
Description: OpenPGP digital signature


linux-next: build warning after merge of the net-next tree

2018-03-13 Thread Stephen Rothwell
Hi all,

After merging the net-next tree, today's linux-next build (sparc
defconfig) produced this warning:

net/core/pktgen.c: In function 'pktgen_if_write':
net/core/pktgen.c:1710:1: warning: the frame size of 1048 bytes is larger than 
1024 bytes [-Wframe-larger-than=]
 }
 ^

Introduced by commit

  35951393bbff ("pktgen: Remove VLA usage")

-- 
Cheers,
Stephen Rothwell


pgpcfIX3FndZw.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the net tree

2018-03-12 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got conflicts in:

  drivers/net/ethernet/mellanox/mlxsw/spectrum.h
  drivers/net/ethernet/mellanox/mlxsw/spectrum.c

between commit:

  663f1b26f9c1 ("mlxsw: spectrum: Prevent duplicate mirrors")

from the net tree and commit:

  a629ef210d89 ("mlxsw: spectrum: Move SPAN code to separate module")

from the net-next tree.

I fixed it up (the code changed in the former was moved in the latter -
I applied the below merge fix patch) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Tue, 13 Mar 2018 11:25:13 +1100
Subject: [PATCH] mlxsw: merge fix for move of SPAN code

Signed-off-by: Stephen Rothwell <s...@canb.auug.org.au>
---
 .../net/ethernet/mellanox/mlxsw/spectrum_span.c| 28 ++
 .../net/ethernet/mellanox/mlxsw/spectrum_span.h|  3 +++
 2 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c 
b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
index ae22a3daffbf..4d6ed207b4af 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
@@ -600,13 +600,17 @@ int mlxsw_sp_span_port_mtu_update(struct mlxsw_sp_port 
*port, u16 mtu)
 }
 
 static struct mlxsw_sp_span_inspected_port *
-mlxsw_sp_span_entry_bound_port_find(struct mlxsw_sp_port *port,
-   struct mlxsw_sp_span_entry *span_entry)
+mlxsw_sp_span_entry_bound_port_find(struct mlxsw_sp_span_entry *span_entry,
+   enum mlxsw_sp_span_type type,
+   struct mlxsw_sp_port *port,
+   bool bind)
 {
struct mlxsw_sp_span_inspected_port *p;
 
list_for_each_entry(p, _entry->bound_ports_list, list)
-   if (port->local_port == p->local_port)
+   if (type == p->type &&
+   port->local_port == p->local_port &&
+   bind == p->bound)
return p;
return NULL;
 }
@@ -636,8 +640,22 @@ mlxsw_sp_span_inspected_port_add(struct mlxsw_sp_port 
*port,
struct mlxsw_sp_span_inspected_port *inspected_port;
struct mlxsw_sp *mlxsw_sp = port->mlxsw_sp;
char sbib_pl[MLXSW_REG_SBIB_LEN];
+   int i;
int err;
 
+   /* A given (source port, direction) can only be bound to one analyzer,
+* so if a binding is requested, check for conflicts.
+*/
+   if (bind)
+   for (i = 0; i < mlxsw_sp->span.entries_count; i++) {
+   struct mlxsw_sp_span_entry *curr =
+   _sp->span.entries[i];
+
+   if (mlxsw_sp_span_entry_bound_port_find(curr, type,
+   port, bind))
+   return -EEXIST;
+   }
+
/* if it is an egress SPAN, bind a shared buffer to it */
if (type == MLXSW_SP_SPAN_EGRESS) {
u32 buffsize = mlxsw_sp_span_mtu_to_buffsize(mlxsw_sp,
@@ -665,6 +683,7 @@ mlxsw_sp_span_inspected_port_add(struct mlxsw_sp_port *port,
}
inspected_port->local_port = port->local_port;
inspected_port->type = type;
+   inspected_port->bound = bind;
list_add_tail(_port->list, _entry->bound_ports_list);
 
return 0;
@@ -691,7 +710,8 @@ mlxsw_sp_span_inspected_port_del(struct mlxsw_sp_port *port,
struct mlxsw_sp *mlxsw_sp = port->mlxsw_sp;
char sbib_pl[MLXSW_REG_SBIB_LEN];
 
-   inspected_port = mlxsw_sp_span_entry_bound_port_find(port, span_entry);
+   inspected_port = mlxsw_sp_span_entry_bound_port_find(span_entry, type,
+port, bind);
if (!inspected_port)
return;
 
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h 
b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h
index 948aceb512c5..4b87ec20e658 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h
@@ -51,6 +51,9 @@ struct mlxsw_sp_span_inspected_port {
struct list_head list;
enum mlxsw_sp_span_type type;
u8 local_port;
+
+   /* Whether this is a directly bound mirror (port-to-port) or an ACL. */
+   bool bound;
 };
 
 struct mlxsw_sp_span_parms {
-- 
2.16.1

-- 
Cheers,
Stephen Rothwell


pgp_4kle5XNC5.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the net tree

2018-03-12 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  drivers/net/phy/phy.c

between commit:

  a2c054a896b8 ("net: phy: Tell caller result of phy_change()")

from the net tree and commit:

  4fff2d33c707 ("net: phy: remove phy_error from phy_disable_interrupts")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/net/phy/phy.c
index 9aabfa1a455a,c2d9027be863..
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@@ -617,77 -617,6 +617,68 @@@ static void phy_error(struct phy_devic
phy_trigger_machine(phydev, false);
  }
  
 +/**
 + * phy_disable_interrupts - Disable the PHY interrupts from the PHY side
 + * @phydev: target phy_device struct
 + */
 +static int phy_disable_interrupts(struct phy_device *phydev)
 +{
 +  int err;
 +
 +  /* Disable PHY interrupts */
 +  err = phy_config_interrupt(phydev, PHY_INTERRUPT_DISABLED);
 +  if (err)
-   goto phy_err;
++  return err;
 +
 +  /* Clear the interrupt */
-   err = phy_clear_interrupt(phydev);
-   if (err)
-   goto phy_err;
- 
-   return 0;
- 
- phy_err:
-   phy_error(phydev);
- 
-   return err;
++  return phy_clear_interrupt(phydev);
 +}
 +
 +/**
 + * phy_change - Called by the phy_interrupt to handle PHY changes
 + * @phydev: phy_device struct that interrupted
 + */
 +static irqreturn_t phy_change(struct phy_device *phydev)
 +{
 +  if (phy_interrupt_is_valid(phydev)) {
 +  if (phydev->drv->did_interrupt &&
 +  !phydev->drv->did_interrupt(phydev))
 +  return IRQ_NONE;
 +
 +  if (phydev->state == PHY_HALTED)
 +  if (phy_disable_interrupts(phydev))
 +  goto phy_err;
 +  }
 +
 +  mutex_lock(>lock);
 +  if ((PHY_RUNNING == phydev->state) || (PHY_NOLINK == phydev->state))
 +  phydev->state = PHY_CHANGELINK;
 +  mutex_unlock(>lock);
 +
 +  /* reschedule state queue work to run as soon as possible */
 +  phy_trigger_machine(phydev, true);
 +
 +  if (phy_interrupt_is_valid(phydev) && phy_clear_interrupt(phydev))
 +  goto phy_err;
 +  return IRQ_HANDLED;
 +
 +phy_err:
 +  phy_error(phydev);
 +  return IRQ_NONE;
 +}
 +
 +/**
 + * phy_change_work - Scheduled by the phy_mac_interrupt to handle PHY changes
 + * @work: work_struct that describes the work to be done
 + */
 +void phy_change_work(struct work_struct *work)
 +{
 +  struct phy_device *phydev =
 +  container_of(work, struct phy_device, phy_queue);
 +
 +  phy_change(phydev);
 +}
 +
  /**
   * phy_interrupt - PHY interrupt handler
   * @irq: interrupt line


pgpczla4TfrtD.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the selinux tree with the net-next tree

2018-03-07 Thread Stephen Rothwell
Hi all,

On Mon, 5 Mar 2018 12:40:54 +1100 Stephen Rothwell <s...@canb.auug.org.au> 
wrote:
>
> Today's linux-next merge of the selinux tree got a conflict in:
> 
>   net/sctp/socket.c
> 
> between several refactoring commits from the net-next tree and commit:
> 
>   2277c7cd75e3 ("sctp: Add LSM hooks")
> 
> from the selinux tree.
> 
> I fixed it up (I think - see below) and can carry the fix as
> necessary. This is now fixed as far as linux-next is concerned, but any
> non trivial conflicts should be mentioned to your upstream maintainer
> when your tree is submitted for merging.  You may also want to consider
> cooperating with the maintainer of the conflicting tree to minimise any
> particularly complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell

The resolution now looks like below (there were more changes to this
file in the net-next tree).  It will keep changing every time this file
is touched :-(

-- 
Cheers,
Stephen Rothwell

diff --cc net/sctp/socket.c
index 7d3476a4860d,73b34a6b5b09..
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@@ -1606,200 -1622,308 +1622,216 @@@ static int sctp_error(struct sock *sk, 
  static int sctp_msghdr_parse(const struct msghdr *msg,
 struct sctp_cmsgs *cmsgs);
  
 -static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len)
 +static int sctp_sendmsg_parse(struct sock *sk, struct sctp_cmsgs *cmsgs,
 +struct sctp_sndrcvinfo *srinfo,
 +const struct msghdr *msg, size_t msg_len)
  {
 -  struct net *net = sock_net(sk);
 -  struct sctp_sock *sp;
 -  struct sctp_endpoint *ep;
 -  struct sctp_association *new_asoc = NULL, *asoc = NULL;
 -  struct sctp_transport *transport, *chunk_tp;
 -  struct sctp_chunk *chunk;
 -  union sctp_addr to;
 -  struct sctp_af *af;
 -  struct sockaddr *msg_name = NULL;
 -  struct sctp_sndrcvinfo default_sinfo;
 -  struct sctp_sndrcvinfo *sinfo;
 -  struct sctp_initmsg *sinit;
 -  sctp_assoc_t associd = 0;
 -  struct sctp_cmsgs cmsgs = { NULL };
 -  enum sctp_scope scope;
 -  bool fill_sinfo_ttl = false, wait_connect = false;
 -  struct sctp_datamsg *datamsg;
 -  int msg_flags = msg->msg_flags;
 -  __u16 sinfo_flags = 0;
 -  long timeo;
 +  __u16 sflags;
int err;
  
 -  err = 0;
 -  sp = sctp_sk(sk);
 -  ep = sp->ep;
 +  if (sctp_sstate(sk, LISTENING) && sctp_style(sk, TCP))
 +  return -EPIPE;
  
 -  pr_debug("%s: sk:%p, msg:%p, msg_len:%zu ep:%p\n", __func__, sk,
 -   msg, msg_len, ep);
 -
 -  /* We cannot send a message over a TCP-style listening socket. */
 -  if (sctp_style(sk, TCP) && sctp_sstate(sk, LISTENING)) {
 -  err = -EPIPE;
 -  goto out_nounlock;
 -  }
 +  if (msg_len > sk->sk_sndbuf)
 +  return -EMSGSIZE;
  
 -  /* Parse out the SCTP CMSGs.  */
 -  err = sctp_msghdr_parse(msg, );
 +  memset(cmsgs, 0, sizeof(*cmsgs));
 +  err = sctp_msghdr_parse(msg, cmsgs);
if (err) {
pr_debug("%s: msghdr parse err:%x\n", __func__, err);
 -  goto out_nounlock;
 +  return err;
}
  
 -  /* Fetch the destination address for this packet.  This
 -   * address only selects the association--it is not necessarily
 -   * the address we will send to.
 -   * For a peeled-off socket, msg_name is ignored.
 -   */
 -  if (!sctp_style(sk, UDP_HIGH_BANDWIDTH) && msg->msg_name) {
 -  int msg_namelen = msg->msg_namelen;
 +  memset(srinfo, 0, sizeof(*srinfo));
 +  if (cmsgs->srinfo) {
 +  srinfo->sinfo_stream = cmsgs->srinfo->sinfo_stream;
 +  srinfo->sinfo_flags = cmsgs->srinfo->sinfo_flags;
 +  srinfo->sinfo_ppid = cmsgs->srinfo->sinfo_ppid;
 +  srinfo->sinfo_context = cmsgs->srinfo->sinfo_context;
 +  srinfo->sinfo_assoc_id = cmsgs->srinfo->sinfo_assoc_id;
 +  srinfo->sinfo_timetolive = cmsgs->srinfo->sinfo_timetolive;
 +  }
  
 -  err = sctp_verify_addr(sk, (union sctp_addr *)msg->msg_name,
 - msg_namelen);
 -  if (err)
 -  return err;
 +  if (cmsgs->sinfo) {
 +  srinfo->sinfo_stream = cmsgs->sinfo->snd_sid;
 +  srinfo->sinfo_flags = cmsgs->sinfo->snd_flags;
 +  srinfo->sinfo_ppid = cmsgs->sinfo->snd_ppid;
 +  srinfo->sinfo_context = cmsgs->sinfo->snd_context;
 +  srinfo->sinfo_assoc_id = cmsgs->sinfo->snd_assoc_id;
 +  }
  
 -  if (msg_namelen > s

linux-next: manual merge of the selinux tree with the net-next tree

2018-03-04 Thread Stephen Rothwell
Hi Paul,

Today's linux-next merge of the selinux tree got a conflict in:

  net/sctp/socket.c

between several refactoring commits from the net-next tree and commit:

  2277c7cd75e3 ("sctp: Add LSM hooks")

from the selinux tree.

I fixed it up (I think - see below) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/sctp/socket.c
index 7fa76031bb08,73b34a6b5b09..
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@@ -1606,193 -1622,362 +1622,209 @@@ static int sctp_error(struct sock *sk, 
  static int sctp_msghdr_parse(const struct msghdr *msg,
 struct sctp_cmsgs *cmsgs);
  
 -static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len)
 +static int sctp_sendmsg_parse(struct sock *sk, struct sctp_cmsgs *cmsgs,
 +struct sctp_sndrcvinfo *srinfo,
 +const struct msghdr *msg, size_t msg_len)
  {
 -  struct net *net = sock_net(sk);
 -  struct sctp_sock *sp;
 -  struct sctp_endpoint *ep;
 -  struct sctp_association *new_asoc = NULL, *asoc = NULL;
 -  struct sctp_transport *transport, *chunk_tp;
 -  struct sctp_chunk *chunk;
 -  union sctp_addr to;
 -  struct sctp_af *af;
 -  struct sockaddr *msg_name = NULL;
 -  struct sctp_sndrcvinfo default_sinfo;
 -  struct sctp_sndrcvinfo *sinfo;
 -  struct sctp_initmsg *sinit;
 -  sctp_assoc_t associd = 0;
 -  struct sctp_cmsgs cmsgs = { NULL };
 -  enum sctp_scope scope;
 -  bool fill_sinfo_ttl = false, wait_connect = false;
 -  struct sctp_datamsg *datamsg;
 -  int msg_flags = msg->msg_flags;
 -  __u16 sinfo_flags = 0;
 -  long timeo;
 +  __u16 sflags;
int err;
  
 -  err = 0;
 -  sp = sctp_sk(sk);
 -  ep = sp->ep;
 -
 -  pr_debug("%s: sk:%p, msg:%p, msg_len:%zu ep:%p\n", __func__, sk,
 -   msg, msg_len, ep);
 +  if (sctp_sstate(sk, LISTENING) && sctp_style(sk, TCP))
 +  return -EPIPE;
  
 -  /* We cannot send a message over a TCP-style listening socket. */
 -  if (sctp_style(sk, TCP) && sctp_sstate(sk, LISTENING)) {
 -  err = -EPIPE;
 -  goto out_nounlock;
 -  }
 +  if (msg_len > sk->sk_sndbuf)
 +  return -EMSGSIZE;
  
 -  /* Parse out the SCTP CMSGs.  */
 -  err = sctp_msghdr_parse(msg, );
 +  memset(cmsgs, 0, sizeof(*cmsgs));
 +  err = sctp_msghdr_parse(msg, cmsgs);
if (err) {
pr_debug("%s: msghdr parse err:%x\n", __func__, err);
 -  goto out_nounlock;
 +  return err;
}
  
 -  /* Fetch the destination address for this packet.  This
 -   * address only selects the association--it is not necessarily
 -   * the address we will send to.
 -   * For a peeled-off socket, msg_name is ignored.
 -   */
 -  if (!sctp_style(sk, UDP_HIGH_BANDWIDTH) && msg->msg_name) {
 -  int msg_namelen = msg->msg_namelen;
 -
 -  err = sctp_verify_addr(sk, (union sctp_addr *)msg->msg_name,
 - msg_namelen);
 -  if (err)
 -  return err;
 -
 -  if (msg_namelen > sizeof(to))
 -  msg_namelen = sizeof(to);
 -  memcpy(, msg->msg_name, msg_namelen);
 -  msg_name = msg->msg_name;
 +  memset(srinfo, 0, sizeof(*srinfo));
 +  if (cmsgs->srinfo) {
 +  srinfo->sinfo_stream = cmsgs->srinfo->sinfo_stream;
 +  srinfo->sinfo_flags = cmsgs->srinfo->sinfo_flags;
 +  srinfo->sinfo_ppid = cmsgs->srinfo->sinfo_ppid;
 +  srinfo->sinfo_context = cmsgs->srinfo->sinfo_context;
 +  srinfo->sinfo_assoc_id = cmsgs->srinfo->sinfo_assoc_id;
 +  srinfo->sinfo_timetolive = cmsgs->srinfo->sinfo_timetolive;
}
  
 -  sinit = cmsgs.init;
 -  if (cmsgs.sinfo != NULL) {
 -  memset(_sinfo, 0, sizeof(default_sinfo));
 -  default_sinfo.sinfo_stream = cmsgs.sinfo->snd_sid;
 -  default_sinfo.sinfo_flags = cmsgs.sinfo->snd_flags;
 -  default_sinfo.sinfo_ppid = cmsgs.sinfo->snd_ppid;
 -  default_sinfo.sinfo_context = cmsgs.sinfo->snd_context;
 -  default_sinfo.sinfo_assoc_id = cmsgs.sinfo->snd_assoc_id;
 -
 -  sinfo = _sinfo;
 -  fill_sinfo_ttl = true;
 -  } else {
 -  sinfo = cmsgs.srinfo;
 -  }
 -  /* Did th

linux-next: manual merge of the net-next tree with the net tree

2018-03-04 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/ipv6/netfilter/nft_fib_ipv6.c

between commit:

  47b7e7f82802 ("netfilter: don't set F_IFACE on ipv6 fib lookups")

from the net tree and commit:

  b75cc8f90f07 ("net/ipv6: Pass skb to route lookup")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/ipv6/netfilter/nft_fib_ipv6.c
index 62fc84d7bdff,3230b3d7b11b..
--- a/net/ipv6/netfilter/nft_fib_ipv6.c
+++ b/net/ipv6/netfilter/nft_fib_ipv6.c
@@@ -180,7 -180,9 +180,8 @@@ void nft_fib6_eval(const struct nft_exp
}
  
*dest = 0;
-   rt = (void *)ip6_route_lookup(nft_net(pkt), , lookup_flags);
 - again:
+   rt = (void *)ip6_route_lookup(nft_net(pkt), , pkt->skb,
+ lookup_flags);
if (rt->dst.error)
goto put_rt_err;
  


pgp6Wknc9MaBN.pgp
Description: OpenPGP digital signature


linux-next: Signed-off-by missing for commits in the net-next tree

2018-03-01 Thread Stephen Rothwell
Hi all,

Commits

  568477045f80 (" phy: marvell10g: Utilize gen10g_no_soft_reset()")
  0adfdb667ab5 (" phy: cortina: Utilize generic functions")
  aebc78a40b88 (" phy: teranetics: Utilize generic functions")
  e8a714e086e4 (" phy: Export gen10g_* functions")
  6ed33d3a06e6 (" phy: aquantia: Utilize genphy_c45_aneg_done()")

are missing a Signed-off-by from their committer.

-- 
Cheers,
Stephen Rothwell


pgpUrtTenUXkr.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the net tree

2018-03-01 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/smc/smc_core.c

between commit:

  2be922f31606 ("net/smc: use link_id of server in confirm link reply")

from the net tree and commit:

  52bedf37bafe ("net/smc: process add/delete link messages")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.



-- 
Cheers,
Stephen Rothwell


pgpT6w9uNnMau.pgp
Description: OpenPGP digital signature


linux-next: build failure after merge of the net-next tree

2018-02-28 Thread Stephen Rothwell
Hi all,

After merging the net-next tree, today's linux-next build (x86_64
allmodconfig) failed like this:

net/core/devlink.c: In function 'devlink_resource_validate_size':
net/core/devlink.c:2349:34: error: invalid type argument of '->' (have 'struct 
devlink_resource_size_params')
  if (size > resource->size_params->size_max) {
  ^~
net/core/devlink.c:2354:34: error: invalid type argument of '->' (have 'struct 
devlink_resource_size_params')
  if (size < resource->size_params->size_min) {
  ^~
net/core/devlink.c:2359:43: error: invalid type argument of '->' (have 'struct 
devlink_resource_size_params')
  div64_u64_rem(size, resource->size_params->size_granularity, );
   ^~

Caused by commit

  cc944ead839a ("devlink: Move size validation to core")

interacting with commit

  77d270967c5f ("mlxsw: spectrum: Fix handling of resource_size_param")

from the net tree.

I have applied the following merge fix patch for today.

From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Thu, 1 Mar 2018 10:24:31 +1100
Subject: [PATCH] devlink: merge fix up for resource_size_param changes

Signed-off-by: Stephen Rothwell <s...@canb.auug.org.au>
---
 net/core/devlink.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/core/devlink.c b/net/core/devlink.c
index e7cb957d9efb..1b5bf0d1cee9 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -2346,17 +2346,17 @@ devlink_resource_validate_size(struct devlink_resource 
*resource, u64 size,
u64 reminder;
int err = 0;
 
-   if (size > resource->size_params->size_max) {
+   if (size > resource->size_params.size_max) {
NL_SET_ERR_MSG_MOD(extack, "Size larger than maximum");
err = -EINVAL;
}
 
-   if (size < resource->size_params->size_min) {
+   if (size < resource->size_params.size_min) {
NL_SET_ERR_MSG_MOD(extack, "Size smaller than minimum");
err = -EINVAL;
}
 
-   div64_u64_rem(size, resource->size_params->size_granularity, );
+   div64_u64_rem(size, resource->size_params.size_granularity, );
if (reminder) {
    NL_SET_ERR_MSG_MOD(extack, "Wrong granularity");
err = -EINVAL;
-- 
2.16.1

-- 
Cheers,
Stephen Rothwell


pgpw_5ASOTdyo.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the net tree

2018-02-28 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  drivers/net/ethernet/mellanox/mlxsw/spectrum.c

between commit:

  77d270967c5f ("mlxsw: spectrum: Fix handling of resource_size_param")

from the net tree and commit:

  4f4bbf7c4e3d ("devlink: Perform cleanup of resource_set cb")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index c7e941aecc2a,7c6204f701ae..
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@@ -4204,21 -3816,13 +3822,12 @@@ static struct devlink_resource_ops mlxs
.occ_get = mlxsw_sp_resource_kvd_linear_occ_get,
  };
  
- static struct devlink_resource_ops mlxsw_sp_resource_kvd_hash_single_ops = {
-   .size_validate = mlxsw_sp_resource_kvd_hash_single_size_validate,
- };
- 
- static struct devlink_resource_ops mlxsw_sp_resource_kvd_hash_double_ops = {
-   .size_validate = mlxsw_sp_resource_kvd_hash_double_size_validate,
- };
 -static struct devlink_resource_size_params mlxsw_sp_kvd_size_params;
 -static struct devlink_resource_size_params mlxsw_sp_linear_size_params;
 -static struct devlink_resource_size_params mlxsw_sp_hash_single_size_params;
 -static struct devlink_resource_size_params mlxsw_sp_hash_double_size_params;
--
  static void
 -mlxsw_sp_resource_size_params_prepare(struct mlxsw_core *mlxsw_core)
 +mlxsw_sp_resource_size_params_prepare(struct mlxsw_core *mlxsw_core,
 +struct devlink_resource_size_params 
*kvd_size_params,
 +struct devlink_resource_size_params 
*linear_size_params,
 +struct devlink_resource_size_params 
*hash_double_size_params,
 +struct devlink_resource_size_params 
*hash_single_size_params)
  {
u32 single_size_min = MLXSW_CORE_RES_GET(mlxsw_core,
 KVD_SINGLE_MIN_SIZE);
@@@ -4274,8 -3876,8 +3883,8 @@@ static int mlxsw_sp_resources_register(
true, kvd_size,
MLXSW_SP_RESOURCE_KVD,
DEVLINK_RESOURCE_ID_PARENT_TOP,
 -  _sp_kvd_size_params,
 +  _size_params,
-   _sp_resource_kvd_ops);
+   NULL);
if (err)
return err;
  
@@@ -4298,8 -3904,8 +3911,8 @@@
false, double_size,
MLXSW_SP_RESOURCE_KVD_HASH_DOUBLE,
MLXSW_SP_RESOURCE_KVD,
 -  _sp_hash_double_size_params,
 +  _double_size_params,
-   _sp_resource_kvd_hash_double_ops);
+   NULL);
if (err)
return err;
  
@@@ -4308,8 -3914,8 +3921,8 @@@
false, single_size,
MLXSW_SP_RESOURCE_KVD_HASH_SINGLE,
MLXSW_SP_RESOURCE_KVD,
 -  _sp_hash_single_size_params,
 +  _single_size_params,
-   _sp_resource_kvd_hash_single_ops);
+   NULL);
if (err)
return err;
  


pgp3MNTlOvmlo.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the net-next tree with the net tree

2018-02-27 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/ipv4/ip_tunnel.c

between commit:

  4e994776e7bd ("ip_tunnel: Do not use mark in skb by default")

from the net tree and commit:

  b0066da52ea5 ("ip_tunnel: Rename & publish init_tunnel_flow")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/ipv4/ip_tunnel.c
index 6d21068f9b55,b2117d89bc83..
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@@ -710,9 -694,16 +694,9 @@@ void ip_tunnel_xmit(struct sk_buff *skb
}
}
  
-   init_tunnel_flow(, protocol, dst, tnl_params->saddr,
-tunnel->parms.o_key, RT_TOS(tos), tunnel->parms.link,
-tunnel->fwmark);
 -  if (tunnel->fwmark) {
 -  ip_tunnel_init_flow(, protocol, dst, tnl_params->saddr,
 -  tunnel->parms.o_key, RT_TOS(tos),
 -  tunnel->parms.link, tunnel->fwmark);
 -  }
 -  else {
 -  ip_tunnel_init_flow(, protocol, dst, tnl_params->saddr,
 -  tunnel->parms.o_key, RT_TOS(tos),
 -  tunnel->parms.link, skb->mark);
 -  }
++  ip_tunnel_init_flow(, protocol, dst, tnl_params->saddr,
++  tunnel->parms.o_key, RT_TOS(tos),
++  tunnel->parms.link, tunnel->fwmark);
  
if (ip_tunnel_encap(skb, tunnel, , ) < 0)
goto tx_error;


pgpa7w5mFwJx7.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the bpf-next tree with the bpf tree

2018-02-26 Thread Stephen Rothwell
Hi Dave,

On Mon, 26 Feb 2018 11:41:47 +1100 Stephen Rothwell <s...@canb.auug.org.au> 
wrote:
>
> Today's linux-next merge of the bpf-next tree got a conflict in:
> 
>   tools/testing/selftests/bpf/test_verifier.c
> 
> between commit:
> 
>   ca36960211eb ("bpf: allow xadd only on aligned memory")
> 
> from the bpf tree and commit:
> 
>   23d191a82c13 ("bpf: add various jit test cases")
> 
> from the bpf-next tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc tools/testing/selftests/bpf/test_verifier.c
> index 437c0b1c9d21,c987d3a2426f..
> --- a/tools/testing/selftests/bpf/test_verifier.c
> +++ b/tools/testing/selftests/bpf/test_verifier.c
> @@@ -11163,64 -11140,95 +11166,153 @@@ static struct bpf_test tests[] = 
>   .result = REJECT,
>   .prog_type = BPF_PROG_TYPE_TRACEPOINT,
>   },
>  +{
>  +"xadd/w check unaligned stack",
>  +.insns = {
>  +BPF_MOV64_IMM(BPF_REG_0, 1),
>  +BPF_STX_MEM(BPF_DW, BPF_REG_10, BPF_REG_0, -8),
>  +BPF_STX_XADD(BPF_W, BPF_REG_10, BPF_REG_0, -7),
>  +BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_10, -8),
>  +BPF_EXIT_INSN(),
>  +},
>  +.result = REJECT,
>  +.errstr = "misaligned stack access off",
>  +.prog_type = BPF_PROG_TYPE_SCHED_CLS,
>  +},
>  +{
>  +"xadd/w check unaligned map",
>  +.insns = {
>  +BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0),
>  +BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
>  +BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
>  +BPF_LD_MAP_FD(BPF_REG_1, 0),
>  +BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
>  + BPF_FUNC_map_lookup_elem),
>  +BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 1),
>  +BPF_EXIT_INSN(),
>  +BPF_MOV64_IMM(BPF_REG_1, 1),
>  +BPF_STX_XADD(BPF_W, BPF_REG_0, BPF_REG_1, 3),
>  +BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_0, 3),
>  +BPF_EXIT_INSN(),
>  +},
>  +.fixup_map1 = { 3 },
>  +.result = REJECT,
>  +.errstr = "misaligned value access off",
>  +.prog_type = BPF_PROG_TYPE_SCHED_CLS,
>  +},
>  +{
>  +"xadd/w check unaligned pkt",
>  +.insns = {
>  +BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
>  +offsetof(struct xdp_md, data)),
>  +BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
>  +offsetof(struct xdp_md, data_end)),
>  +BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
>  +BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
>  +BPF_JMP_REG(BPF_JLT, BPF_REG_1, BPF_REG_3, 2),
>  +BPF_MOV64_IMM(BPF_REG_0, 99),
>  +BPF_JMP_IMM(BPF_JA, 0, 0, 6),
>  +BPF_MOV64_IMM(BPF_REG_0, 1),
>  +BPF_ST_MEM(BPF_W, BPF_REG_2, 0, 0),
>  +BPF_ST_MEM(BPF_W, BPF_REG_2, 3, 0),
>  +BPF_STX_XADD(BPF_W, BPF_REG_2, BPF_REG_0, 1),
>  +BPF_STX_XADD(BPF_W, BPF_REG_2, BPF_REG_0, 2),
>  +BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_2, 1),
>  +BPF_EXIT_INSN(),
>  +},
>  +.result = REJECT,
>  +.errstr = "BPF_XADD stores into R2 packet",
>  +.prog_type = BPF_PROG_TYPE_XDP,
>  +},
> + {
> + "jit: lsh, rsh, arsh by 1",
> + .insns = {
> + BPF_MOV64_IMM(BPF_REG_0, 1),
> + BPF_MOV64_IMM(BPF_REG_1, 0xff),
> + BPF_ALU64_IMM(BPF_LSH, BPF_REG_1, 1),
> + BPF_ALU32_IMM(BPF_LSH, BPF_REG_1, 1),
> + BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0x3fc, 1),
> + BPF_EXIT_INSN(),
> + BPF_ALU64_IMM(BPF_RSH, BPF_REG_1, 1),
> + 

linux-next: manual merge of the bpf-next tree with the bpf tree

2018-02-25 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the bpf-next tree got a conflict in:

  tools/testing/selftests/bpf/test_verifier.c

between commit:

  ca36960211eb ("bpf: allow xadd only on aligned memory")

from the bpf tree and commit:

  23d191a82c13 ("bpf: add various jit test cases")

from the bpf-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc tools/testing/selftests/bpf/test_verifier.c
index 437c0b1c9d21,c987d3a2426f..
--- a/tools/testing/selftests/bpf/test_verifier.c
+++ b/tools/testing/selftests/bpf/test_verifier.c
@@@ -11163,64 -11140,95 +11166,153 @@@ static struct bpf_test tests[] = 
.result = REJECT,
.prog_type = BPF_PROG_TYPE_TRACEPOINT,
},
 +  {
 +  "xadd/w check unaligned stack",
 +  .insns = {
 +  BPF_MOV64_IMM(BPF_REG_0, 1),
 +  BPF_STX_MEM(BPF_DW, BPF_REG_10, BPF_REG_0, -8),
 +  BPF_STX_XADD(BPF_W, BPF_REG_10, BPF_REG_0, -7),
 +  BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_10, -8),
 +  BPF_EXIT_INSN(),
 +  },
 +  .result = REJECT,
 +  .errstr = "misaligned stack access off",
 +  .prog_type = BPF_PROG_TYPE_SCHED_CLS,
 +  },
 +  {
 +  "xadd/w check unaligned map",
 +  .insns = {
 +  BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0),
 +  BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
 +  BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
 +  BPF_LD_MAP_FD(BPF_REG_1, 0),
 +  BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
 +   BPF_FUNC_map_lookup_elem),
 +  BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 1),
 +  BPF_EXIT_INSN(),
 +  BPF_MOV64_IMM(BPF_REG_1, 1),
 +  BPF_STX_XADD(BPF_W, BPF_REG_0, BPF_REG_1, 3),
 +  BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_0, 3),
 +  BPF_EXIT_INSN(),
 +  },
 +  .fixup_map1 = { 3 },
 +  .result = REJECT,
 +  .errstr = "misaligned value access off",
 +  .prog_type = BPF_PROG_TYPE_SCHED_CLS,
 +  },
 +  {
 +  "xadd/w check unaligned pkt",
 +  .insns = {
 +  BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
 +  offsetof(struct xdp_md, data)),
 +  BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
 +  offsetof(struct xdp_md, data_end)),
 +  BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
 +  BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
 +  BPF_JMP_REG(BPF_JLT, BPF_REG_1, BPF_REG_3, 2),
 +  BPF_MOV64_IMM(BPF_REG_0, 99),
 +  BPF_JMP_IMM(BPF_JA, 0, 0, 6),
 +  BPF_MOV64_IMM(BPF_REG_0, 1),
 +  BPF_ST_MEM(BPF_W, BPF_REG_2, 0, 0),
 +  BPF_ST_MEM(BPF_W, BPF_REG_2, 3, 0),
 +  BPF_STX_XADD(BPF_W, BPF_REG_2, BPF_REG_0, 1),
 +  BPF_STX_XADD(BPF_W, BPF_REG_2, BPF_REG_0, 2),
 +  BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_2, 1),
 +  BPF_EXIT_INSN(),
 +  },
 +  .result = REJECT,
 +  .errstr = "BPF_XADD stores into R2 packet",
 +  .prog_type = BPF_PROG_TYPE_XDP,
 +  },
+   {
+   "jit: lsh, rsh, arsh by 1",
+   .insns = {
+   BPF_MOV64_IMM(BPF_REG_0, 1),
+   BPF_MOV64_IMM(BPF_REG_1, 0xff),
+   BPF_ALU64_IMM(BPF_LSH, BPF_REG_1, 1),
+   BPF_ALU32_IMM(BPF_LSH, BPF_REG_1, 1),
+   BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0x3fc, 1),
+   BPF_EXIT_INSN(),
+   BPF_ALU64_IMM(BPF_RSH, BPF_REG_1, 1),
+   BPF_ALU32_IMM(BPF_RSH, BPF_REG_1, 1),
+   BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0xff, 1),
+   BPF_EXIT_INSN(),
+   BPF_ALU64_IMM(BPF_ARSH, BPF_REG_1, 1),
+   BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0x7f, 1),
+   BPF_EXIT_INSN(),
+   BPF_MOV64_IMM(BPF_REG_0, 2),
+   BPF_EXIT_INSN(),
+   },
+   .result = ACCEPT,
+   .retval = 2

linux-next: Signed-off-by missing for commit in the net tree

2018-02-08 Thread Stephen Rothwell
Hi all,

Commit

  55b3280d1e47 ("tipc: fix skb truesize/datasize ratio control")

is missing a Signed-off-by from its author.

-- 
Cheers,
Stephen Rothwell


linux-next: Signed-off-by missing for commit in the net tree

2018-02-07 Thread Stephen Rothwell
Hi all,

Commit

  043e337f555e ("sch_netem: Bug fixing in calculating Netem interval")

is missing a Signed-off-by from its author.

-- 
Cheers,
Stephen Rothwell


linux-next: build failure after merge of the net-next tree

2018-01-28 Thread Stephen Rothwell
Hi all,

After merging the net-next tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

In file included from /home/sfr/next/next/include/linux/init_task.h:17:0,
 from /home/sfr/next/next/init/init_task.c:2:
/home/sfr/next/next/include/net/net_namespace.h: In function 'check_net':
/home/sfr/next/next/include/net/net_namespace.h:228:21: error: passing argument 
1 of 'atomic_read' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
  return atomic_read(>count) != 0;
 ^
In file included from /home/sfr/next/next/include/linux/atomic.h:5:0,
 from /home/sfr/next/next/include/linux/rcupdate.h:38,
 from /home/sfr/next/next/include/linux/init_task.h:5,
 from /home/sfr/next/next/init/init_task.c:2:
/home/sfr/next/next/arch/powerpc/include/asm/atomic.h:34:23: note: expected 
'const atomic_t * {aka const struct  *}' but argument is of type 
'const refcount_t * {aka const struct refcount_struct *}'
 static __inline__ int atomic_read(const atomic_t *v)
   ^~~

and several others similar.

Caused by commit

  273c28bc57ca ("net: Convert atomic_t net::count to refcount_t")

interacting with commit

  4ee806d51176 ("net: tcp: close sock if net namespace is exiting")

from the net tree.

I have applied the following merge fix patch for today:

From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Mon, 29 Jan 2018 12:34:37 +1100
Subject: [PATCH] net: fixup for "net: tcp: close sock if net namespace is 
exiting"

Signed-off-by: Stephen Rothwell <s...@canb.auug.org.au>
---
 include/net/net_namespace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 235105afa5e1..f306b2aa15a4 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -225,7 +225,7 @@ int net_eq(const struct net *net1, const struct net *net2)
 
 static inline int check_net(const struct net *net)
 {
-   return atomic_read(>count) != 0;
+   return refcount_read(>count) != 0;
 }
 
 void net_drop_ns(void *);
-- 
2.15.1

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the crypto tree with the net-next tree

2018-01-25 Thread Stephen Rothwell
Hi Herbert,

Today's linux-next merge of the crypto tree got a conflict in:

  drivers/net/ethernet/chelsio/cxgb4/cxgb4.h

between commit:

  9d5fd927d20b ("cxgb4/cxgb4vf: add support for ndo_set_vf_vlan")

from the net-next tree and commit:

  a6ec572bfa7d ("cxgb4: Add support for Inline IPSec Tx")

from the crypto tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
index 429467364219,c48a7521d63e..
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
@@@ -1739,6 -1713,14 +1752,16 @@@ void free_rspq_fl(struct adapter *adap
  void free_tx_desc(struct adapter *adap, struct sge_txq *q,
  unsigned int n, bool unmap);
  void free_txq(struct adapter *adap, struct sge_txq *q);
 +int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf,
 +  u16 vlan);
+ void cxgb4_reclaim_completed_tx(struct adapter *adap,
+   struct sge_txq *q, bool unmap);
+ int cxgb4_map_skb(struct device *dev, const struct sk_buff *skb,
+ dma_addr_t *addr);
+ void cxgb4_inline_tx_skb(const struct sk_buff *skb, const struct sge_txq *q,
+void *pos);
+ void cxgb4_write_sgl(const struct sk_buff *skb, struct sge_txq *q,
+struct ulptx_sgl *sgl, u64 *end, unsigned int start,
+const dma_addr_t *addr);
+ void cxgb4_ring_tx_db(struct adapter *adap, struct sge_txq *q, int n);
  #endif /* __CXGB4_H__ */


linux-next: manual merge of the net-next tree with the vfs tree

2018-01-24 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/tipc/socket.c

between commit:

  ade994f4f6c8 ("net: annotate ->poll() instances")

from the vfs tree and commit:

  60c253069632 ("tipc: fix race between poll() and setsockopt()")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/tipc/socket.c
index 2aa46e8cd8fe,473a096b6fba..
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@@ -715,8 -716,7 +716,7 @@@ static __poll_t tipc_poll(struct file *
  {
struct sock *sk = sock->sk;
struct tipc_sock *tsk = tipc_sk(sk);
-   struct tipc_group *grp = tsk->group;
 -  u32 revents = 0;
 +  __poll_t revents = 0;
  
sock_poll_wait(file, sk_sleep(sk), wait);
  


linux-next: manual merge of the net-next tree with the net tree

2018-01-18 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  kernel/bpf/verifier.c

between commit:

  6f16101e6a8b ("bpf: mark dst unknown on inconsistent {s, u}bounds 
adjustments")

from the net tree and commit:

  f4d7e40a5b71 ("bpf: introduce function calls (verification)")

from the net-next tree.

I fixed it up (I just used the former version) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.



-- 
Cheers,
Stephen Rothwell


linux-next: build warning after merge of the net-next tree

2018-01-17 Thread Stephen Rothwell
Hi all,

After merging the net-next tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

net/sched/cls_api.c: In function 'tc_dump_tfilter':
net/sched/cls_api.c:1362:8: warning: 'parent' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
   if (!tcf_chain_dump(chain, q, parent, skb, cb,
^
 index_start, ))
 

Probably introduced by commit

  7960d1daf278 ("net: sched: use block index as a handle instead of qdisc when 
block is shared")

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the net-next tree with the net tree

2018-01-17 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  drivers/net/tun.c

between commit:

  4df0bfc79904 ("tun: fix a memory leak for tfile->tx_array")

from the net tree and commits:

  8bf5c4ee1889 ("tun: setup xdp_rxq_info")
  5990a30510ed ("tun/tap: use ptr_ring instead of skb_array")
  fc72d1d54dd9 ("tuntap: XDP transmission")

from the net-next tree.

I have no idea how to clean this up, so I effectively reverted the net
tree commit.

I fixed it up (see above) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the net-next tree with the net tree

2018-01-16 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got conflicts in:

  net/sched/sch_ingress.c
  net/sched/sch_api.c
  include/net/sch_generic.h

between commit:

  81d947e2b8dd ("net, sched: fix panic when updating miniq {b,q}stats")

from the net tree and commits:

  54160ef6ec64 ("net: sched: sch_api: rearrange init handling")
  8d1a77f974ca ("net: sch: api: add extack support in tcf_block_get")
  d0bd684dddab ("net: sch: api: add extack support in qdisc_alloc")

from the net-next tree.

I fixed it up (I think, see below) and can carry the fix as necessary.
This is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/net/sch_generic.h
index becf86aa4ac6,ac029d5d88e4..
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@@ -444,10 -471,11 +471,12 @@@ void qdisc_destroy(struct Qdisc *qdisc)
  void qdisc_tree_reduce_backlog(struct Qdisc *qdisc, unsigned int n,
   unsigned int len);
  struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue,
- const struct Qdisc_ops *ops);
+ const struct Qdisc_ops *ops,
+ struct netlink_ext_ack *extack);
 +void qdisc_free(struct Qdisc *qdisc);
  struct Qdisc *qdisc_create_dflt(struct netdev_queue *dev_queue,
-   const struct Qdisc_ops *ops, u32 parentid);
+   const struct Qdisc_ops *ops, u32 parentid,
+   struct netlink_ext_ack *extack);
  void __qdisc_calculate_pkt_len(struct sk_buff *skb,
   const struct qdisc_size_table *stab);
  int skb_do_redirect(struct sk_buff *);
diff --cc net/sched/sch_api.c
index 52529b7f8d96,0038a1c44ee9..
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@@ -1062,43 -1088,64 +1088,53 @@@ static struct Qdisc *qdisc_create(struc
netdev_info(dev, "Caught tx_queue_len zero misconfig\n");
}
  
-   if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS])) == 0) {
-   if (tca[TCA_STAB]) {
-   stab = qdisc_get_stab(tca[TCA_STAB]);
-   if (IS_ERR(stab)) {
-   err = PTR_ERR(stab);
-   goto err_out4;
-   }
-   rcu_assign_pointer(sch->stab, stab);
-   }
-   if (tca[TCA_RATE]) {
-   seqcount_t *running;
- 
-   err = -EOPNOTSUPP;
-   if (sch->flags & TCQ_F_MQROOT)
-   goto err_out4;
- 
-   if ((sch->parent != TC_H_ROOT) &&
-   !(sch->flags & TCQ_F_INGRESS) &&
-   (!p || !(p->flags & TCQ_F_MQROOT)))
-   running = qdisc_root_sleeping_running(sch);
-   else
-   running = >running;
- 
-   err = gen_new_estimator(>bstats,
-   sch->cpu_bstats,
-   >rate_est,
-   NULL,
-   running,
-   tca[TCA_RATE]);
-   if (err)
-   goto err_out4;
+   if (ops->init) {
+   err = ops->init(sch, tca[TCA_OPTIONS], extack);
+   if (err != 0)
+   goto err_out5;
+   }
+ 
 -  if (qdisc_is_percpu_stats(sch)) {
 -  sch->cpu_bstats =
 -  netdev_alloc_pcpu_stats(struct gnet_stats_basic_cpu);
 -  if (!sch->cpu_bstats)
 -  goto err_out4;
 -
 -  sch->cpu_qstats = alloc_percpu(struct gnet_stats_queue);
 -  if (!sch->cpu_qstats)
 -  goto err_out4;
 -  }
 -
+   if (tca[TCA_STAB]) {
+   stab = qdisc_get_stab(tca[TCA_STAB], extack);
+   if (IS_ERR(stab)) {
+   err = PTR_ERR(stab);
+   goto err_out4;
}
+   rcu_assign_pointer(sch->stab, stab);
+   }
+   if (tca[TCA_RATE]) {
+   seqcount_t *running;
  
-   qdisc_hash_add(sch, false);
+   err = -EOPNOTSUPP;
+   if (sch->flags & TCQ_F_MQROOT) {
+   NL_SET_ERR_MSG(extack, "Cannot attach rate estimator to 
a multi-queue ro

linux-next: manual merge of the akpm tree with the net-next tree

2018-01-15 Thread Stephen Rothwell
Hi Andrew,

Today's linux-next merge of the akpm-current tree got a conflict in:

  net/ipv6/route.c

between commit:

  6802f3adcb3f ("ipv6: Fix build with gcc-4.4.5")

from the net-next tree and patch:

  "net/ipv6/route.c: work around gcc-4.4.4 anon union initializer issue"

from the akpm tree.

I fixed it up (I just used the net-next tree version) and can carry the
fix as necessary. This is now fixed as far as linux-next is concerned,
but any non trivial conflicts should be mentioned to your upstream
maintainer when your tree is submitted for merging.  You may also want
to consider cooperating with the maintainer of the conflicting tree to
minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the net-next tree with the net tree

2018-01-15 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/ipv6/ip6_output.c

between commit:

  749439bfac6e ("ipv6: fix udpv6 sendmsg crash caused by too small MTU")

from the net tree and commit:

  0f6c480f23f4 ("xfrm: Move dst->path into struct xfrm_dst")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/ipv6/ip6_output.c
index 4f7d8de56611,18547a44bdaf..
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@@ -1206,18 -1215,16 +1215,18 @@@ static int ip6_setup_cork(struct sock *
v6_cork->tclass = ipc6->tclass;
if (rt->dst.flags & DST_XFRM_TUNNEL)
mtu = np->pmtudisc >= IPV6_PMTUDISC_PROBE ?
 -rt->dst.dev->mtu : dst_mtu(>dst);
 +READ_ONCE(rt->dst.dev->mtu) : dst_mtu(>dst);
else
mtu = np->pmtudisc >= IPV6_PMTUDISC_PROBE ?
- READ_ONCE(rt->dst.dev->mtu) : dst_mtu(rt->dst.path);
 -rt->dst.dev->mtu : dst_mtu(xfrm_dst_path(>dst));
++READ_ONCE(rt->dst.dev->mtu) : 
dst_mtu(xfrm_dst_path(>dst));
if (np->frag_size < mtu) {
if (np->frag_size)
mtu = np->frag_size;
}
 +  if (mtu < IPV6_MIN_MTU)
 +  return -EINVAL;
cork->base.fragsize = mtu;
-   if (dst_allfrag(rt->dst.path))
+   if (dst_allfrag(xfrm_dst_path(>dst)))
cork->base.flags |= IPCORK_ALLFRAG;
cork->base.length = 0;
  


linux-next: manual merge of the net-next tree with the net tree

2018-01-15 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/openvswitch/flow_netlink.c

between commit:

  95a332088ecb ("Revert "openvswitch: Add erspan tunnel support."")

from the net tree and commit:

  1d7e2ed22f8d ("net: erspan: refactor existing erspan code")

from the net-next tree.

I fixed it up (I removed the bits of code rmeoved by the former that
were updated in the latter) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.



-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the rdma tree with the net tree

2018-01-14 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the rdma tree got a conflict in:

  drivers/infiniband/hw/mlx5/main.c

between commits:

  8978cc921fc7 ("{net,ib}/mlx5: Don't disable local loopback multicast traffic 
when needed")
  72f36be06138 ("net/mlx5: Fix mlx5_get_uars_page to return error code")

from the net tree and commits:

  16c1975f1032 ("IB/mlx5: Create profile infrastructure to add and remove 
stages")
  c8b8992446a9 ("IB/mlx5: Move loopback initialization to the corresponding 
stage")

from the rdma tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/infiniband/hw/mlx5/main.c
index 262c1aa2e028,91e6b42798e5..
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@@ -4111,8 -4669,38 +4671,39 @@@ static int mlx5_ib_stage_caps_init(stru
(1ull << IB_USER_VERBS_EX_CMD_CREATE_FLOW) |
(1ull << IB_USER_VERBS_EX_CMD_DESTROY_FLOW);
  
-   if (mlx5_ib_port_link_layer(>ib_dev, 1) ==
-   IB_LINK_LAYER_ETHERNET) {
+   err = init_node_data(dev);
+   if (err)
+   return err;
+ 
+   if ((MLX5_CAP_GEN(dev->mdev, port_type) == MLX5_CAP_PORT_TYPE_ETH) &&
 -  MLX5_CAP_GEN(dev->mdev, disable_local_lb))
++  (MLX5_CAP_GEN(dev->mdev, disable_local_lb_uc) ||
++   MLX5_CAP_GEN(dev->mdev, disable_local_lb_mc)))
+   mutex_init(>lb_mutex);
+ 
+   return 0;
+ }
+ 
+ static int mlx5_ib_stage_roce_init(struct mlx5_ib_dev *dev)
+ {
+   struct mlx5_core_dev *mdev = dev->mdev;
+   enum rdma_link_layer ll;
+   int port_type_cap;
+   u8 port_num;
+   int err;
+   int i;
+ 
+   port_num = mlx5_core_native_port_num(dev->mdev) - 1;
+   port_type_cap = MLX5_CAP_GEN(mdev, port_type);
+   ll = mlx5_port_type_cap_to_rdma_ll(port_type_cap);
+ 
+   if (ll == IB_LINK_LAYER_ETHERNET) {
+   for (i = 0; i < dev->num_ports; i++) {
+   dev->roce[i].dev = dev;
+   dev->roce[i].native_port_num = i + 1;
+   dev->roce[i].last_port_state = IB_PORT_DOWN;
+   }
+ 
+   dev->ib_dev.get_netdev  = mlx5_ib_get_netdev;
dev->ib_dev.create_wq= mlx5_ib_create_wq;
dev->ib_dev.modify_wq= mlx5_ib_modify_wq;
dev->ib_dev.destroy_wq   = mlx5_ib_destroy_wq;
@@@ -4124,44 -4712,94 +4715,94 @@@
(1ull << IB_USER_VERBS_EX_CMD_DESTROY_WQ) |
(1ull << IB_USER_VERBS_EX_CMD_CREATE_RWQ_IND_TBL) |
(1ull << IB_USER_VERBS_EX_CMD_DESTROY_RWQ_IND_TBL);
+   err = mlx5_enable_eth(dev, port_num);
+   if (err)
+   return err;
}
-   err = init_node_data(dev);
-   if (err)
-   goto err_free_port;
  
-   mutex_init(>flow_db.lock);
-   mutex_init(>cap_mask_mutex);
-   INIT_LIST_HEAD(>qp_list);
-   spin_lock_init(>reset_flow_resource_lock);
+   return 0;
+ }
+ 
+ static void mlx5_ib_stage_roce_cleanup(struct mlx5_ib_dev *dev)
+ {
+   struct mlx5_core_dev *mdev = dev->mdev;
+   enum rdma_link_layer ll;
+   int port_type_cap;
+   u8 port_num;
+ 
+   port_num = mlx5_core_native_port_num(dev->mdev) - 1;
+   port_type_cap = MLX5_CAP_GEN(mdev, port_type);
+   ll = mlx5_port_type_cap_to_rdma_ll(port_type_cap);
  
if (ll == IB_LINK_LAYER_ETHERNET) {
-   err = mlx5_enable_eth(dev);
-   if (err)
-   goto err_free_port;
-   dev->roce.last_port_state = IB_PORT_DOWN;
+   mlx5_disable_eth(dev);
+   mlx5_remove_netdev_notifier(dev, port_num);
}
+ }
  
-   err = create_dev_resources(>devr);
-   if (err)
-   goto err_disable_eth;
+ static int mlx5_ib_stage_dev_res_init(struct mlx5_ib_dev *dev)
+ {
+   return create_dev_resources(>devr);
+ }
  
-   err = mlx5_ib_odp_init_one(dev);
-   if (err)
-   goto err_rsrc;
+ static void mlx5_ib_stage_dev_res_cleanup(struct mlx5_ib_dev *dev)
+ {
+   destroy_dev_resources(>devr);
+ }
+ 
+ static int mlx5_ib_stage_odp_init(struct mlx5_ib_dev *dev)
+ {
+   mlx5_ib_internal_fill_odp_caps(dev);
  
+   return mlx5_ib_odp_init_one(dev);
+ }
+ 
+ static int mlx5_ib_stage_counters_init(struct mlx5_ib_dev *dev)
+ {
if (MLX5_CAP_GEN(dev->mdev, max_qp_

linux-next: manual merge of the bpf-next tree with Linus' tree

2018-01-14 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the bpf-next tree got a conflict in:

  arch/x86/lib/Makefile

between commit:

  76b043848fd2 ("x86/retpoline: Add initial retpoline support")

from Linus' tree and commit:

  540adea3809f ("error-injection: Separate error-injection from kprobe")

from the bpf-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/x86/lib/Makefile
index f23934bbaf4e,171377b83be1..
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@@ -26,7 -26,7 +26,8 @@@ lib-y += memcpy_$(BITS).
  lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
  lib-$(CONFIG_INSTRUCTION_DECODER) += insn.o inat.o insn-eval.o
  lib-$(CONFIG_RANDOMIZE_BASE) += kaslr.o
 +lib-$(CONFIG_RETPOLINE) += retpoline.o
+ lib-$(CONFIG_FUNCTION_ERROR_INJECTION)+= error-inject.o
  
  obj-y += msr.o msr-reg.o msr-reg-export.o hweight.o
  


linux-next: manual merge of the net-next tree with the net tree

2018-01-14 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  include/linux/mlx5/mlx5_ifc.h

between commit:

  8978cc921fc7 ("{net,ib}/mlx5: Don't disable local loopback multicast traffic 
when needed")

from the net tree and commit:

  40817cdbb695 ("net/mlx5: Add hairpin definitions to the FW API")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/linux/mlx5/mlx5_ifc.h
index 1391a82da98e,78e36fc2609e..
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@@ -1027,9 -1035,10 +1035,10 @@@ struct mlx5_ifc_cmd_hca_cap_bits 
u8 log_max_wq_sz[0x5];
  
u8 nic_vport_change_event[0x1];
 -  u8 disable_local_lb[0x1];
 -  u8 reserved_at_3e2[0x1];
 +  u8 disable_local_lb_uc[0x1];
 +  u8 disable_local_lb_mc[0x1];
-   u8 reserved_at_3e3[0x8];
+   u8 log_min_hairpin_wq_data_sz[0x5];
+   u8 reserved_at_3e8[0x3];
u8 log_max_vlan_list[0x5];
u8 reserved_at_3f0[0x3];
u8 log_max_current_mc_list[0x5];


linux-next: manual merge of the kspp tree with the net tree

2018-01-10 Thread Stephen Rothwell
Hi Kees,

Today's linux-next merge of the kspp tree got a conflict in:

  net/sctp/socket.c

between commit:

  c76f97c99ae6 ("sctp: make use of pre-calculated len")

from the net tree and commit:

  3511d716f5a8 ("sctp: Copy struct sctp_sock.autoclose to userspace using 
put_user()")

from the kspp tree.

I fixed it up (I just used the latter version) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


linux-next: build failure after merge of the net-next tree

2018-01-10 Thread Stephen Rothwell
Hi all,

After merging the net-next tree, today's linux-next build (x86_64
allmodconfig) failed like this:

kernel/bpf/verifier.o: In function `bpf_check':
verifier.c:(.text+0xd86e): undefined reference to `bpf_patch_call_args'

Caused by commit

  1ea47e01ad6e ("bpf: add support for bpf_call to interpreter")

interacting with commit

  290af86629b2 ("bpf: introduce BPF_JIT_ALWAYS_ON config")

from the bpf and net trees.

I have just reverted commit 290af86629b2 for today.  A better solution
would be nice (lie fixing this in a merge between the net-next and net
trees).

-- 
Cheers,
Stephen Rothwell


linux-next: build failure after merge of the net-next tree

2018-01-09 Thread Stephen Rothwell
Hi all,

After merging the net-next tree, today's linux-next build (sparc64
defconfig) failed like this:

net/socket.o: In function `tun_xdp_to_ptr':
(.text+0x3180): multiple definition of `tun_xdp_to_ptr'
fs/compat_ioctl.o:compat_ioctl.c:(.text+0x0): first defined here
net/socket.o: In function `tun_ptr_to_xdp':
(.text+0x31a0): multiple definition of `tun_ptr_to_xdp'
fs/compat_ioctl.o:compat_ioctl.c:(.text+0x20): first defined here

Caused by commit

  fc72d1d54dd9 ("tuntap: XDP transmission")

I applied the following fix for today:

From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Wed, 10 Jan 2018 15:01:41 +1100
Subject: [PATCH] tuntap: fix for "tuntap: XDP transmission"

Signed-off-by: Stephen Rothwell <s...@canb.auug.org.au>
---
 include/linux/if_tun.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h
index 08e66827ad8e..c5b0a75a7812 100644
--- a/include/linux/if_tun.h
+++ b/include/linux/if_tun.h
@@ -42,11 +42,11 @@ static inline bool tun_is_xdp_buff(void *ptr)
 {
return false;
 }
-void *tun_xdp_to_ptr(void *ptr)
+static inline void *tun_xdp_to_ptr(void *ptr)
 {
return NULL;
 }
-void *tun_ptr_to_xdp(void *ptr)
+static inline void *tun_ptr_to_xdp(void *ptr)
 {
return NULL;
 }
-- 
2.15.1




-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the net-next tree with the vfs tree

2018-01-09 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/tipc/socket.c

between commit:

  ade994f4f6c8 ("net: annotate ->poll() instances")

from the vfs tree and commit:

  eb929a91b213 ("tipc: improve poll() for group member socket")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/tipc/socket.c
index 2aa46e8cd8fe,1f236271766c..
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@@ -715,8 -715,8 +715,8 @@@ static __poll_t tipc_poll(struct file *
  {
struct sock *sk = sock->sk;
struct tipc_sock *tsk = tipc_sk(sk);
-   struct tipc_group *grp = tsk->group;
+   struct tipc_group *grp;
 -  u32 revents = 0;
 +  __poll_t revents = 0;
  
sock_poll_wait(file, sk_sleep(sk), wait);
  


linux-next: manual merge of the net-next tree with the bpf tree

2018-01-08 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  tools/testing/selftests/bpf/test_align.c

between commit:

  2b36047e7889 ("selftests/bpf: fix test_align")

from the bpf tree and commit:

  6a28b446b7d2 ("selftests/bpf: adjust test_align expected output")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc tools/testing/selftests/bpf/test_align.c
index 471bbbdb94db,fe916d29e166..
--- a/tools/testing/selftests/bpf/test_align.c
+++ b/tools/testing/selftests/bpf/test_align.c
@@@ -473,8 -473,28 +473,8 @@@ static struct bpf_align_test tests[] = 
.prog_type = BPF_PROG_TYPE_SCHED_CLS,
.result = REJECT,
.matches = {
-   {4, "R5=pkt(id=0,off=0,r=0,imm=0)"},
+   {4, "R5_w=pkt(id=0,off=0,r=0,imm=0)"},
 -  /* ptr & 0x40 == either 0 or 0x40 */
 -  {5, "R5_w=inv(id=0,umax_value=64,var_off=(0x0; 0x40))"},
 -  /* ptr << 2 == unknown, (4n) */
 -  {7, 
"R5_w=inv(id=0,smax_value=9223372036854775804,umax_value=18446744073709551612,var_off=(0x0;
 0xfffc))"},
 -  /* (4n) + 14 == (4n+2).  We blow our bounds, because
 -   * the add could overflow.
 -   */
 -  {8, "R5=inv(id=0,var_off=(0x2; 0xfffc))"},
 -  /* Checked s>=0 */
 -  {10, 
"R5=inv(id=0,umin_value=2,umax_value=9223372036854775806,var_off=(0x2; 
0x7ffc))"},
 -  /* packet pointer + nonnegative (4n+2) */
 -  {12, 
"R6_w=pkt(id=1,off=0,r=0,umin_value=2,umax_value=9223372036854775806,var_off=(0x2;
 0x7ffc))"},
 -  {14, 
"R4=pkt(id=1,off=4,r=0,umin_value=2,umax_value=9223372036854775806,var_off=(0x2;
 0x7ffc))"},
 -  /* NET_IP_ALIGN + (4n+2) == (4n), alignment is fine.
 -   * We checked the bounds, but it might have been able
 -   * to overflow if the packet pointer started in the
 -   * upper half of the address space.
 -   * So we did not get a 'range' on R6, and the access
 -   * attempt will fail.
 -   */
 -  {16, 
"R6=pkt(id=1,off=0,r=0,umin_value=2,umax_value=9223372036854775806,var_off=(0x2;
 0x7ffc))"},
 +  /* R5 bitwise operator &= on pointer prohibited */
}
},
{


linux-next: build failure after merge of the net-next tree

2017-12-21 Thread Stephen Rothwell
Hi all,

After merging the net-next tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

net/ipv6/route.c: In function 'inet6_rtm_getroute':
net/ipv6/route.c:4324:25: error: 'struct dst_entry' has no member named 'from'
  if (fibmatch && rt->dst.from) {
 ^
In file included from include/linux/uio.h:12:0,
 from include/linux/socket.h:8,
 from net/ipv6/route.c:34:
net/ipv6/route.c:4325:46: error: 'struct dst_entry' has no member named 'from'
   struct rt6_info *ort = container_of(rt->dst.from,
  ^
include/linux/kernel.h:929:26: note: in definition of macro 'container_of'
  void *__mptr = (void *)(ptr); \
  ^
In file included from include/linux/kernel.h:10:0,
 from include/linux/uio.h:12,
 from include/linux/socket.h:8,
 from net/ipv6/route.c:34:
net/ipv6/route.c:4325:46: error: 'struct dst_entry' has no member named 'from'
   struct rt6_info *ort = container_of(rt->dst.from,
  ^
include/linux/compiler.h:301:19: note: in definition of macro 
'__compiletime_assert'
   bool __cond = !(condition);\
   ^
include/linux/compiler.h:324:2: note: in expansion of macro 
'_compiletime_assert'
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^
include/linux/build_bug.h:47:37: note: in expansion of macro 
'compiletime_assert'
 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
 ^
include/linux/kernel.h:930:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
  ^
include/linux/kernel.h:930:20: note: in expansion of macro '__same_type'
  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
net/ipv6/route.c:4325:26: note: in expansion of macro 'container_of'
   struct rt6_info *ort = container_of(rt->dst.from,
  ^
net/ipv6/route.c:4325:46: error: 'struct dst_entry' has no member named 'from'
   struct rt6_info *ort = container_of(rt->dst.from,
  ^
include/linux/compiler.h:301:19: note: in definition of macro 
'__compiletime_assert'
   bool __cond = !(condition);\
   ^
include/linux/compiler.h:324:2: note: in expansion of macro 
'_compiletime_assert'
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^
include/linux/build_bug.h:47:37: note: in expansion of macro 
'compiletime_assert'
 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
 ^
include/linux/kernel.h:930:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
  ^
include/linux/kernel.h:931:6: note: in expansion of macro '__same_type'
 !__same_type(*(ptr), void),   \
  ^
net/ipv6/route.c:4325:26: note: in expansion of macro 'container_of'
   struct rt6_info *ort = container_of(rt->dst.from,
  ^

Caused by commit

  3a2232e92e87 ("ipv6: Move dst->from into struct rt6_info")

interacting with commit

  58acfd714e6b ("ipv6: Honor specified parameters in fibmatch lookup"

from the net tree.

I have added the following merge fix patch for today (I am guessing
a bit here):

From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Fri, 22 Dec 2017 11:25:13 +1100
Subject: [PATCH] ipv6: fix up for "ipv6: Move dst->from into struct rt6_info"

Signed-off-by: Stephen Rothwell <s...@canb.auug.org.au>
---
 net/ipv6/route.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 4efaac956f0c..2490280b3394 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -4321,9 +4321,8 @@ 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);
+   if (fibmatch && rt->from) {
+       struct rt6_info *ort = rt->from;
 
dst_hold(>dst);
ip6_rt_put(rt);
-- 
2.15.0

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the net-next tree with the net tree

2017-12-21 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  kernel/bpf/verifier.c

between commit:

  0c17d1d2c619 ("bpf: fix incorrect tracking of register size truncation")

from the net tree and commits:

  f4d7e40a5b71 ("bpf: introduce function calls (verification)")
  1ea47e01ad6e ("bpf: add support for bpf_call to interpreter")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc kernel/bpf/verifier.c
index 04b24876cd23,48b2901cf483..
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@@ -1072,29 -1425,54 +1430,77 @@@ static int check_ptr_alignment(struct b
   strict);
  }
  
 +/* truncate register to smaller size (in bytes)
 + * must be called with size < BPF_REG_SIZE
 + */
 +static void coerce_reg_to_size(struct bpf_reg_state *reg, int size)
 +{
 +  u64 mask;
 +
 +  /* clear high bits in bit representation */
 +  reg->var_off = tnum_cast(reg->var_off, size);
 +
 +  /* fix arithmetic bounds */
 +  mask = ((u64)1 << (size * 8)) - 1;
 +  if ((reg->umin_value & ~mask) == (reg->umax_value & ~mask)) {
 +  reg->umin_value &= mask;
 +  reg->umax_value &= mask;
 +  } else {
 +  reg->umin_value = 0;
 +  reg->umax_value = mask;
 +  }
 +  reg->smin_value = reg->umin_value;
 +  reg->smax_value = reg->umax_value;
 +}
 +
+ static int update_stack_depth(struct bpf_verifier_env *env,
+ const struct bpf_func_state *func,
+ int off)
+ {
+   u16 stack = env->subprog_stack_depth[func->subprogno], total = 0;
+   struct bpf_verifier_state *cur = env->cur_state;
+   int i;
+ 
+   if (stack >= -off)
+   return 0;
+ 
+   /* update known max for given subprogram */
+   env->subprog_stack_depth[func->subprogno] = -off;
+ 
+   /* compute the total for current call chain */
+   for (i = 0; i <= cur->curframe; i++) {
+   u32 depth = env->subprog_stack_depth[cur->frame[i]->subprogno];
+ 
+   /* round up to 32-bytes, since this is granularity
+* of interpreter stack sizes
+*/
+   depth = round_up(depth, 32);
+   total += depth;
+   }
+ 
+   if (total > MAX_BPF_STACK) {
+   verbose(env, "combined stack size of %d calls is %d. Too 
large\n",
+   cur->curframe, total);
+   return -EACCES;
+   }
+   return 0;
+ }
+ 
+ static int get_callee_stack_depth(struct bpf_verifier_env *env,
+ const struct bpf_insn *insn, int idx)
+ {
+   int start = idx + insn->imm + 1, subprog;
+ 
+   subprog = find_subprog(env, start);
+   if (subprog < 0) {
+   WARN_ONCE(1, "verifier bug. No program starts at insn %d\n",
+ start);
+   return -EFAULT;
+   }
+   subprog++;
+   return env->subprog_stack_depth[subprog];
+ }
+ 
  /* check whether memory at (regno + off) is accessible for t = (read | write)
   * if t==write, value_regno is a register which value is stored into memory
   * if t==read, value_regno is a register which will receive the value from 
memory
@@@ -1302,15 -1678,14 +1704,15 @@@ static int check_stack_boundary(struct 
}
  
/* Only allow fixed-offset stack reads */
-   if (!tnum_is_const(regs[regno].var_off)) {
+   if (!tnum_is_const(reg->var_off)) {
char tn_buf[48];
  
-   tnum_strn(tn_buf, sizeof(tn_buf), regs[regno].var_off);
+   tnum_strn(tn_buf, sizeof(tn_buf), reg->var_off);
verbose(env, "invalid variable stack read R%d var_off=%s\n",
regno, tn_buf);
 +  return -EACCES;
}
-   off = regs[regno].off + regs[regno].var_off.value;
+   off = reg->off + reg->var_off.value;
if (off >= 0 || off < -MAX_BPF_STACK || off + access_size > 0 ||
access_size < 0 || (access_size == 0 && !zero_size_allowed)) {
verbose(env, "invalid stack type R%d off=%d access_size=%d\n",
@@@ -2294,9 -2758,12 +2828,11 @@@ static int adjust_scalar_min_max_vals(s
  static int adjust_reg_min_max_vals(struct bpf_verifier_env *env,
   struct bpf_insn *insn)
  {
-   struct bpf_reg_state *regs 

linux-next: build failure after merge of the net-next tree

2017-12-20 Thread Stephen Rothwell
Hi all,

After merging the net-next tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/net/netdevsim/bpf.c: In function 'nsim_bpf_setup_tc_block_cb':
drivers/net/netdevsim/bpf.c:127:7: error: 'TC_CLSBPF_REPLACE' undeclared (first 
use in this function)
  case TC_CLSBPF_REPLACE:
   ^
drivers/net/netdevsim/bpf.c:129:7: error: 'TC_CLSBPF_ADD' undeclared (first use 
in this function)
  case TC_CLSBPF_ADD:
   ^
drivers/net/netdevsim/bpf.c:131:7: error: 'TC_CLSBPF_DESTROY' undeclared (first 
use in this function)
  case TC_CLSBPF_DESTROY:
   ^

Caused by commit

  31d3ad832948 ("netdevsim: add bpf offload support")

interacting with commit

  102740bd9436 ("cls_bpf: fix offload assumptions after callback conversion")

from the net tree.

I applied the following merge fix patch:

From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Thu, 21 Dec 2017 10:18:46 +1100
Subject: [PATCH] netdevsim: fix up for "cls_bpf: fix offload assumptions after
 callback conversion"

Signed-off-by: Stephen Rothwell <s...@canb.auug.org.au>
---
 drivers/net/netdevsim/bpf.c | 12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/net/netdevsim/bpf.c b/drivers/net/netdevsim/bpf.c
index 7da814686ad9..afaf980bbbe7 100644
--- a/drivers/net/netdevsim/bpf.c
+++ b/drivers/net/netdevsim/bpf.c
@@ -123,16 +123,10 @@ int nsim_bpf_setup_tc_block_cb(enum tc_setup_type type,
if (prog && !prog->aux->offload && !ns->bpf_tc_non_bound_accept)
return -EOPNOTSUPP;
 
-   switch (cls_bpf->command) {
-   case TC_CLSBPF_REPLACE:
-   return nsim_bpf_offload(ns, prog, true);
-   case TC_CLSBPF_ADD:
-   return nsim_bpf_offload(ns, prog, false);
-   case TC_CLSBPF_DESTROY:
-   return nsim_bpf_offload(ns, NULL, true);
-   default:
+   if (cls_bpf->command != TC_CLSBPF_OFFLOAD)
return -EOPNOTSUPP;
-   }
+
+   return nsim_bpf_offload(ns, prog, cls_bpf->oldprog);
 }
 
 int nsim_bpf_disable_tc(struct netdevsim *ns)
-- 
2.15.0

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the net-next tree with the net tree

2017-12-20 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  drivers/net/ethernet/netronome/nfp/bpf/main.c

between commit:

  d3f89b98e391 ("nfp: bpf: keep track of the offloaded program")

from the net tree and commit:

  bd0b2e7fe611 ("net: xdp: make the stack take care of the tear down")

from the net-next tree.

I fixed it up (the latter seems to be a fix for the same problem as the
former, so I just reverted the former by hand) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the net-next tree with the net tree

2017-12-18 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  drivers/net/phy/marvell.c

between commit:

  c505873eaece ("net: phy: marvell: Limit 88m1101 autoneg errata to 88E1145 as 
well.")

from the net tree and commit:

  80274abafc60 ("net: phy: remove generic settings for callbacks config_aneg 
and read_status from drivers")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/net/phy/marvell.c
index 82104edca393,2fc026dc170a..
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@@ -2085,8 -2070,7 +2082,7 @@@ static struct phy_driver marvell_driver
.flags = PHY_HAS_INTERRUPT,
.probe = marvell_probe,
.config_init = _config_init,
 -  .config_aneg = _config_aneg,
 +  .config_aneg = _config_aneg,
-   .read_status = _read_status,
.ack_interrupt = _ack_interrupt,
.config_intr = _config_intr,
.resume = _resume,


linux-next: Signed-off-by missing for commits in the net-next tree

2017-12-18 Thread Stephen Rothwell
Hi all,

Commits

  d8d8ccf27741 ("sfc: update EF10 register definitions")
  0bc959a95e8c ("sfc: populate the timer reload field")

are missing a Signed-off-by from their author.

-- 
Cheers,
Stephen Rothwell


linux-next: build failure after merge of the bpf-next tree

2017-12-12 Thread Stephen Rothwell
Hi all,

After merging the bpf-next tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

kernel/events/core.o: In function `perf_ioctl':
core.c:(.text+0x98c4): undefined reference to `bpf_event_query_prog_array'

Caused by commit

  f371b304f12e ("bpf/tracing: allow user space to query prog array on the same 
tp")

CONFIG_BPF_SYSCALL is not set for this build.

I have used the bpf-next tree from next-20171212 for today.

-- 
Cheers,
Stephen Rothwell


linux-next: build failure after merge of the mac80211-next tree

2017-12-11 Thread Stephen Rothwell
Hi Johannes,

After merging the mac80211-next tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/net/wireless/mediatek/mt76/mt76x2_main.c:539:19: error: initialization 
from incompatible pointer type [-Werror=incompatible-pointer-types]
  .wake_tx_queue = mt76_wake_tx_queue,
   ^
drivers/net/wireless/mediatek/mt76/mt76x2_main.c:539:19: note: (near 
initialization for 'mt76x2_ops.wake_tx_queue')

Caused by commits

  17f1de56df05 ("mt76: add common code shared between multiple chipsets")
  7bc04215a66b ("mt76: add driver code for MT76x2e")

from the wireless-drivers-next tree interacting with commit

  e937b8da5a59 ("mac80211: Add TXQ scheduling API")

from the mac80211-next tree.

I applied the below hack merge fix ... please let me know if something
more/better is required.  Someone needs to remember to tell Dave when
these trees meet in his tree.

From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Tue, 12 Dec 2017 12:50:40 +1100
Subject: [PATCH] mt76: fix up for "mac80211: Add TXQ scheduling API"

Signed-off-by: Stephen Rothwell <s...@canb.auug.org.au>
---
 drivers/net/wireless/mediatek/mt76/mt76.h |  2 +-
 drivers/net/wireless/mediatek/mt76/tx.c   | 10 +++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h 
b/drivers/net/wireless/mediatek/mt76/mt76.h
index aa0880bbea7f..e395d3859212 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -338,7 +338,7 @@ void mt76_tx(struct mt76_dev *dev, struct ieee80211_sta 
*sta,
 struct mt76_wcid *wcid, struct sk_buff *skb);
 void mt76_txq_init(struct mt76_dev *dev, struct ieee80211_txq *txq);
 void mt76_txq_remove(struct mt76_dev *dev, struct ieee80211_txq *txq);
-void mt76_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq);
+void mt76_wake_tx_queue(struct ieee80211_hw *hw);
 void mt76_stop_tx_queues(struct mt76_dev *dev, struct ieee80211_sta *sta,
 bool send_bar);
 void mt76_txq_schedule(struct mt76_dev *dev, struct mt76_queue *hwq);
diff --git a/drivers/net/wireless/mediatek/mt76/tx.c 
b/drivers/net/wireless/mediatek/mt76/tx.c
index 4eef69bd8a9e..ad414af0750f 100644
--- a/drivers/net/wireless/mediatek/mt76/tx.c
+++ b/drivers/net/wireless/mediatek/mt76/tx.c
@@ -463,12 +463,16 @@ void mt76_stop_tx_queues(struct mt76_dev *dev, struct 
ieee80211_sta *sta,
 }
 EXPORT_SYMBOL_GPL(mt76_stop_tx_queues);
 
-void mt76_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq)
+void mt76_wake_tx_queue(struct ieee80211_hw *hw)
 {
+   struct ieee80211_txq *txq;
struct mt76_dev *dev = hw->priv;
-   struct mt76_txq *mtxq = (struct mt76_txq *) txq->drv_priv;
-   struct mt76_queue *hwq = mtxq->hwq;
+   struct mt76_txq *mtxq;
+   struct mt76_queue *hwq;
 
+   txq = ieee80211_next_txq(hw);
+   mtxq = (struct mt76_txq *) txq->drv_priv;
+   hwq = mtxq->hwq;
spin_lock_bh(>lock);
if (list_empty(>list))
    list_add_tail(>list, >swq);
-- 
2.15.0

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the net-next tree with the net tree

2017-12-11 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  drivers/net/phy/meson-gxl.c

between commit:

  f1e2400a80ff ("net: phy: meson-gxl: detect LPA corruption")

from the net tree and commit:

  80274abafc60 ("net: phy: remove generic settings for callbacks config_aneg 
and read_status from drivers")

from the net-next tree.

I fixed it up (I just used the former) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/net/phy/meson-gxl.c
index 77dd4be5,401e3234be58..
--- a/drivers/net/phy/meson-gxl.c
+++ b/drivers/net/phy/meson-gxl.c
@@@ -130,9 -58,7 +130,8 @@@ static struct phy_driver meson_gxl_phy[
.features   = PHY_BASIC_FEATURES,
.flags  = PHY_IS_INTERNAL,
.config_init= meson_gxl_config_init,
-   .config_aneg= genphy_config_aneg,
.aneg_done  = genphy_aneg_done,
 +  .read_status= meson_gxl_read_status,
.suspend= genphy_suspend,
.resume = genphy_resume,
},


linux-next: manual merge of the net-next tree with the vfs tree

2017-12-07 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/smc/smc_clc.c

between commit:

  d63d271ce2b5 ("smc: switch to sock_recvmsg()")

from the vfs tree and commit:

  e7b7a64a8493 ("smc: support variable CLC proposal messages")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/smc/smc_clc.c
index 511548085d16,abf7ceb6690b..
--- a/net/smc/smc_clc.c
+++ b/net/smc/smc_clc.c
@@@ -86,12 -129,13 +132,12 @@@ int smc_clc_wait_msg(struct smc_sock *s
}
  
/* receive the complete CLC message */
 -  vec.iov_base = buf;
 -  vec.iov_len = buflen;
memset(, 0, sizeof(struct msghdr));
 +  iov_iter_kvec(_iter, READ | ITER_KVEC, , 1, buflen);
krflags = MSG_WAITALL;
smc->clcsock->sk->sk_rcvtimeo = CLC_WAIT_TIME;
 -  len = kernel_recvmsg(smc->clcsock, , , 1, datlen, krflags);
 +  len = sock_recvmsg(smc->clcsock, , krflags);
-   if (len < datlen) {
+   if (len < datlen || !smc_clc_msg_hdr_valid(clcm)) {
smc->sk.sk_err = EPROTO;
reason_code = -EPROTO;
goto out;


linux-next: manual merge of the vfs tree with the bpf tree

2017-12-06 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got conflicts in:

  arch/alpha/include/uapi/asm/Kbuild
  arch/mn10300/include/uapi/asm/Kbuild
  arch/score/include/uapi/asm/Kbuild

between commit:

  c895f6f703ad ("bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program 
type")

from the bpf tree and commit:

  d759be8953fe ("switch wrapper poll.h instances to generic-y")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

I do wonder if those poll.h additions are necessary given that poll.h
is listed in include/uapi/asm-generic/Kbuild.asm ...

-- 
Cheers,
Stephen Rothwell

diff --cc arch/alpha/include/uapi/asm/Kbuild
index 14a2e9af97e9,574fe90c8b58..
--- a/arch/alpha/include/uapi/asm/Kbuild
+++ b/arch/alpha/include/uapi/asm/Kbuild
@@@ -1,4 -1,4 +1,5 @@@
  # UAPI Header export list
  include include/uapi/asm-generic/Kbuild.asm
  
 +generic-y += bpf_perf_event.h
+ generic-y += poll.h
diff --cc arch/mn10300/include/uapi/asm/Kbuild
index 81271d3af47c,162fbdbb5fd5..
--- a/arch/mn10300/include/uapi/asm/Kbuild
+++ b/arch/mn10300/include/uapi/asm/Kbuild
@@@ -1,5 -1,5 +1,6 @@@
  # UAPI Header export list
  include include/uapi/asm-generic/Kbuild.asm
  
 +generic-y += bpf_perf_event.h
+ generic-y += poll.h
  generic-y += siginfo.h
diff --cc arch/score/include/uapi/asm/Kbuild
index 81271d3af47c,162fbdbb5fd5..
--- a/arch/score/include/uapi/asm/Kbuild
+++ b/arch/score/include/uapi/asm/Kbuild
@@@ -1,5 -1,5 +1,6 @@@
  # UAPI Header export list
  include include/uapi/asm-generic/Kbuild.asm
  
 +generic-y += bpf_perf_event.h
+ generic-y += poll.h
  generic-y += siginfo.h


linux-next: manual merge of the net-next tree with Linus' tree

2017-12-04 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  drivers/net/can/flexcan.c

between commit:

  29c64b17a0bc ("can: flexcan: fix VF610 state transition issue")

from Linus' tree and commit:

  99b7668c04b2 ("can: flexcan: adding platform specific details for LS1021A")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/net/can/flexcan.c
index 0626dcfd1f3d,3a370d8437b0..
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@@ -184,12 -184,13 +184,13 @@@
   * Below is some version info we got:
   *SOC   Version   IP-Version  Glitch- [TR]WRN_INT IRQ Err Memory err RTR 
re-
   *Filter? connected?  Passive detection  
ception in MB
 - *   MX25  FlexCAN2  03.00.00.00 nono ?   nono
 + *   MX25  FlexCAN2  03.00.00.00 nonono   nono
   *   MX28  FlexCAN2  03.00.04.00yes   yesno   nono
 - *   MX35  FlexCAN2  03.00.00.00 nono ?   nono
 + *   MX35  FlexCAN2  03.00.00.00 nonono   nono
   *   MX53  FlexCAN2  03.00.00.00yesnono   nono
   *   MX6s  FlexCAN3  10.00.12.00yes   yesno   no   yes
 - *   VF610 FlexCAN3  ?   no   yes ?  yes   
yes?
 + *   VF610 FlexCAN3  ?   no   yesno  yes   
yes?
+  * LS1021A FlexCAN2  03.00.04.00 no   yesno   no   yes
   *
   * Some SOCs do not have the RX_WARN & TX_WARN interrupt line connected.
   */
@@@ -297,10 -302,15 +302,16 @@@ static const struct flexcan_devtype_dat
  
  static const struct flexcan_devtype_data fsl_vf610_devtype_data = {
.quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
 -  FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP,
 +  FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP |
 +  FLEXCAN_QUIRK_BROKEN_PERR_STATE,
  };
  
+ static const struct flexcan_devtype_data fsl_ls1021a_r2_devtype_data = {
+   .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
+   FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_BROKEN_PERR_STATE |
+   FLEXCAN_QUIRK_USE_OFF_TIMESTAMP,
+ };
+ 
  static const struct can_bittiming_const flexcan_bittiming_const = {
.name = DRV_NAME,
.tseg1_min = 4,


linux-next: build warning after merge of the net-next tree

2017-12-03 Thread Stephen Rothwell
Hi all,

After merging the net-next tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

drivers/net/phy/broadcom.c:391:12: warning: 'bcm5482_read_status' defined but 
not used [-Wunused-function]
 static int bcm5482_read_status(struct phy_device *phydev)
^
drivers/net/phy/broadcom.c:411:12: warning: 'bcm5481_config_aneg' defined but 
not used [-Wunused-function]
 static int bcm5481_config_aneg(struct phy_device *phydev)
^

Introduced by commit

  80274abafc60 ("net: phy: remove generic settings for callbacks config_aneg 
and read_status from drivers")

-- 
Cheers,
Stephen Rothwell


Re: bpf trees integration for linux-next

2017-11-28 Thread Stephen Rothwell
Hi Daniel,

On Tue, 28 Nov 2017 16:33:00 +0100 Daniel Borkmann <dan...@iogearbox.net> wrote:
>
> Alexei (Cc) and myself are maintaining the bpf and bpf-next tree for
> upstream:
> 
>https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/
>https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/
> 
> Is it possible that you could integrate the two into linux-next as
> well, that would help us a lot with regards to being aware of conflicts
> with any other trees. The BPF trees are usually pulled into net and
> net-next by David S. Miller.
> 
> Patches are coming in via netdev@vger.kernel.org list as well, so it
> would be great if possible if notifications could Cc netdev@vger.kernel.org
> and Alexei and myself.

Added from today.  I used the master branch in each case. You might
consider adding your trees to the MAINTAINERS file.

Thanks for adding your subsystem tree as a participant of linux-next.  As
you may know, this is not a judgement of your code.  The purpose of
linux-next is for integration testing and to lower the impact of
conflicts between subsystems in the next merge window. 

You will need to ensure that the patches/commits in your tree/series have
been:
 * submitted under GPL v2 (or later) and include the Contributor's
Signed-off-by,
 * posted to the relevant mailing list,
 * reviewed by you (or another maintainer of your subsystem tree),
 * successfully unit tested, and 
 * destined for the current or next Linux merge window.

Basically, this should be just what you would send to Linus (or ask him
to fetch).  It is allowed to be rebased if you deem it necessary.

-- 
Cheers,
Stephen Rothwell 
s...@canb.auug.org.au


linux-next: manual merge of the net tree with Linus' tree

2017-11-26 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the net tree got a conflict in:

  net/rxrpc/call_object.c

between commit:

  e99e88a9d2b0 ("treewide: setup_timer() -> timer_setup()")

from Linus' tree and commit:

  9faaff593404 ("rxrpc: Provide a different lockdep key for call->user_mutex 
for kernel calls")

from the net tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/rxrpc/call_object.c
index 994dc2df57e4,7ee3d6ce5aa2..
--- a/net/rxrpc/call_object.c
+++ b/net/rxrpc/call_object.c
@@@ -114,7 -118,16 +118,15 @@@ struct rxrpc_call *rxrpc_alloc_call(str
goto nomem_2;
  
mutex_init(>user_mutex);
+ 
+   /* Prevent lockdep reporting a deadlock false positive between the afs
+* filesystem and sys_sendmsg() via the mmap sem.
+*/
+   if (rx->sk.sk_kern_sock)
+   lockdep_set_class(>user_mutex,
+ _call_user_mutex_lock_class_key);
+ 
 -  setup_timer(>timer, rxrpc_call_timer_expired,
 -  (unsigned long)call);
 +  timer_setup(>timer, rxrpc_call_timer_expired, 0);
INIT_WORK(>processor, _process_call);
INIT_LIST_HEAD(>link);
INIT_LIST_HEAD(>chan_wait_link);


Re: linux-next: build warning after merge of the netfilter-next tree

2017-11-16 Thread Stephen Rothwell
Hi Pablo,

On Thu, 16 Nov 2017 15:18:00 +0100 Pablo Neira Ayuso <pa...@netfilter.org> 
wrote:
>
> The patch is already at davem's tree. It's flying there.

Excellent, thanks.

-- 
Cheers,
Stephen Rothwell


Re: linux-next: build warning after merge of the netfilter-next tree

2017-11-15 Thread Stephen Rothwell
Hi Pablo,

On Thu, 9 Nov 2017 00:40:14 +0100 Pablo Neira Ayuso <pa...@netfilter.org> wrote:
>
> On Wed, Nov 08, 2017 at 07:00:52PM +1100, Stephen Rothwell wrote:
> > 
> > On Tue, 7 Nov 2017 11:02:48 +1100 Stephen Rothwell <s...@canb.auug.org.au> 
> > wrote:  
> > >
> > > After merging the netfilter-next tree, today's linux-next build (powerpc
> > > ppc64_defconfig) produced this warning:
> > > 
> > > net/netfilter/nf_conntrack_netlink.c:536:15: warning: 
> > > 'ctnetlink_proto_size' defined but not used [-Wunused-function]
> > >  static size_t ctnetlink_proto_size(const struct nf_conn *ct)
> > >^
> > > 
> > > Introduced by commit
> > > 
> > >   5caaed151a68 ("netfilter: conntrack: don't cache nlattr_tuple_size 
> > > result in nla_size")  
> > 
> > I assume that this warning will now be in the net-next tree ...  
> 
> It's my fault, I'll fix this in my next batch, sorry for the inconvenience.

This has now made it into Linus' tree :-(

-- 
Cheers,
Stephen Rothwell


linux-next: build warning after merge of the net-next tree

2017-11-14 Thread Stephen Rothwell
Hi all,

After merging the net-next tree, today's linux-next build (powerpc
allyesconfig) produced this warning:

In file included from drivers/net/ethernet/ibm/ibmvnic.c:52:0:
drivers/net/ethernet/ibm/ibmvnic.c: In function 'ibmvnic_open':
include/linux/dma-mapping.h:571:2: warning: 'dma_addr' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
  debug_dma_mapping_error(dev, dma_addr);
  ^
drivers/net/ethernet/ibm/ibmvnic.c:852:13: note: 'dma_addr' was declared here
  dma_addr_t dma_addr;
 ^

Introduced by commit

  4e6759be28e4 ("ibmvnic: Feature implementation of Vital Product Data (VPD) 
for the ibmvnic driver")

-- 
Cheers,
Stephen Rothwell


Re: linux-next: manual merge of the tip tree with the net-next tree

2017-11-12 Thread Stephen Rothwell
Hi all,

On Mon, 30 Oct 2017 20:55:47 + Mark Brown <broo...@kernel.org> wrote:
>
> Today's linux-next merge of the tip tree got a conflict in:
> 
>   net/ipv4/tcp_output.c
> 
> between commit:
> 
>   6aa7de059173a ("locking/atomics: COCCINELLE/treewide: Convert trivial 
> ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE()")
> 
> in the tip tree and some change in the net-next tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> diff --cc net/ipv4/tcp_output.c
> index a69a34f57330,48531da1aba6..
> --- a/net/ipv4/tcp_output.c
> +++ b/net/ipv4/tcp_output.c
> @@@ -1978,7 -1908,7 +1978,7 @@@ static bool tcp_tso_should_defer(struc
>   if ((skb != tcp_write_queue_tail(sk)) && (limit >= skb->len))
>   goto send_now;
>   
> - win_divisor = 
> ACCESS_ONCE(sock_net(sk)->ipv4.sysctl_tcp_tso_win_divisor);
>  -win_divisor = READ_ONCE(sysctl_tcp_tso_win_divisor);
> ++win_divisor = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_tso_win_divisor);
>   if (win_divisor) {
>   u32 chunk = min(tp->snd_wnd, tp->snd_cwnd * tp->mss_cache);
>   

Just a reminder that this conflict still exists.

-- 
Cheers,
Stephen Rothwell


Re: linux-next: manual merge of the drivers-x86 tree with the net-next tree

2017-11-12 Thread Stephen Rothwell
Hi all,

On Mon, 9 Oct 2017 18:56:33 +0100 Mark Brown <broo...@kernel.org> wrote:
>
> Today's linux-next merge of the drivers-x86 tree got a conflict in:
> 
>   Documentation/admin-guide/thunderbolt.rst
> 
> between commit:
> 
>e69b6c02b4c3b ("net: Add support for networking over Thunderbolt cable")
> 
> from the net-next tree and commit:
> 
>ce6a90027c10f ("platform/x86: Add driver to force WMI Thunderbolt 
> controller power status")
> 
> from the drivers-x86 tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> diff --cc Documentation/admin-guide/thunderbolt.rst
> index 5c62d11d77e8,dadcd66ee12f..
> --- a/Documentation/admin-guide/thunderbolt.rst
> +++ b/Documentation/admin-guide/thunderbolt.rst
> @@@ -198,26 -198,17 +198,41 @@@ information is missing
>   To recover from this mode, one needs to flash a valid NVM image to the
>   host host controller in the same way it is done in the previous chapter.
>   
>  +Networking over Thunderbolt cable
>  +-
>  +Thunderbolt technology allows software communication across two hosts
>  +connected by a Thunderbolt cable.
>  +
>  +It is possible to tunnel any kind of traffic over Thunderbolt link but
>  +currently we only support Apple ThunderboltIP protocol.
>  +
>  +If the other host is running Windows or macOS only thing you need to
>  +do is to connect Thunderbolt cable between the two hosts, the
>  +``thunderbolt-net`` is loaded automatically. If the other host is also
>  +Linux you should load ``thunderbolt-net`` manually on one host (it does
>  +not matter which one)::
>  +
>  +  # modprobe thunderbolt-net
>  +
>  +This triggers module load on the other host automatically. If the driver
>  +is built-in to the kernel image, there is no need to do anything.
>  +
>  +The driver will create one virtual ethernet interface per Thunderbolt
>  +port which are named like ``thunderbolt0`` and so on. From this point
>  +you can either use standard userspace tools like ``ifconfig`` to
>  +configure the interface or let your GUI to handle it automatically.
> ++
> + Forcing power
> + -
> + Many OEMs include a method that can be used to force the power of a
> + thunderbolt controller to an "On" state even if nothing is connected.
> + If supported by your machine this will be exposed by the WMI bus with
> + a sysfs attribute called "force_power".
> + 
> + For example the intel-wmi-thunderbolt driver exposes this attribute in:
> +   
> /sys/devices/platform/PNP0C14:00/wmi_bus/wmi_bus-PNP0C14:00/86CCFD48-205E-4A77-9C48-2021CBEDE341/force_power
> + 
> +   To force the power to on, write 1 to this attribute file.
> +   To disable force power, write 0 to this attribute file.
> + 
> + Note: it's currently not possible to query the force power state of a 
> platform.

Just a reminder that this conflict still exists.

-- 
Cheers,
Stephen Rothwell


Re: linux-next: manual merge of the cgroup tree with the net-next tree

2017-11-12 Thread Stephen Rothwell
Hi Mark,

On Mon, 9 Oct 2017 19:38:36 +0100 Mark Brown <broo...@kernel.org> wrote:
>
> Hi Tejun,
> 
> Today's linux-next merge of the cgroup tree got a conflict in:
> 
>   kernel/cgroup/cgroup.c
> 
> between commit:
> 
>   324bda9e6c5ad ("bpf: multi program support for cgroup+bpf")
> 
> from the net-next tree and commit:
> 
>   041cd640b2f3c ("cgroup: Implement cgroup2 basic CPU usage accounting")
> 
> from the cgroup tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> diff --cc kernel/cgroup/cgroup.c
> index 00f5b358aeac,c3421ee0d230..
> --- a/kernel/cgroup/cgroup.c
> +++ b/kernel/cgroup/cgroup.c
> @@@ -4765,8 -4785,9 +4788,11 @@@ static struct cgroup *cgroup_create(str
>   
>   return cgrp;
>   
>  +out_idr_free:
>  +cgroup_idr_remove(>cgroup_idr, cgrp->id);
> + out_stat_exit:
> + if (cgroup_on_dfl(parent))
> + cgroup_stat_exit(cgrp);
>   out_cancel_ref:
>   percpu_ref_exit(>self.refcnt);
>   out_free_cgrp:

Just a reminder that this conflict still exists.

-- 
Cheers,
Stephen Rothwell


linux-next: Signed-off-by missing for commit in the net-next tree

2017-11-12 Thread Stephen Rothwell
Hi all,

Commit

  cbad52e92ad7 ("sfc: don't warn on successful change of MAC")

is missing a Signed-off-by from its author.

-- 
Cheers,
Stephen Rothwell


  1   2   3   4   5   >