Linux-Next Archive on lore.kernel.org
 help / color / Atom feed
* linux-next: manual merge of the bpf-next tree with the net-next tree
@ 2019-11-24 23:58 Stephen Rothwell
  2019-11-25  1:19 ` Alexei Starovoitov
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2019-11-24 23:58 UTC (permalink / raw)
  To: Daniel Borkmann, Alexei Starovoitov, Networking, David Miller
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Jakub Kicinski

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

Hi all,

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

  kernel/bpf/syscall.c

between commit:

  84bb46cd6228 ("Revert "bpf: Emit audit messages upon successful prog load and unload"")

from the net-next tree and commit:

  8793e6b23b1e ("bpf: Move bpf_free_used_maps into sleepable section")

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 kernel/bpf/syscall.c
index 4ae52eb05f41,bb002f15b32a..000000000000
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@@ -23,14 -23,16 +23,15 @@@
  #include <linux/timekeeping.h>
  #include <linux/ctype.h>
  #include <linux/nospec.h>
 -#include <linux/audit.h>
  #include <uapi/linux/btf.h>
  
- #define IS_FD_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PROG_ARRAY || \
- 			   (map)->map_type == BPF_MAP_TYPE_PERF_EVENT_ARRAY || \
- 			   (map)->map_type == BPF_MAP_TYPE_CGROUP_ARRAY || \
- 			   (map)->map_type == BPF_MAP_TYPE_ARRAY_OF_MAPS)
+ #define IS_FD_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PERF_EVENT_ARRAY || \
+ 			  (map)->map_type == BPF_MAP_TYPE_CGROUP_ARRAY || \
+ 			  (map)->map_type == BPF_MAP_TYPE_ARRAY_OF_MAPS)
+ #define IS_FD_PROG_ARRAY(map) ((map)->map_type == BPF_MAP_TYPE_PROG_ARRAY)
  #define IS_FD_HASH(map) ((map)->map_type == BPF_MAP_TYPE_HASH_OF_MAPS)
- #define IS_FD_MAP(map) (IS_FD_ARRAY(map) || IS_FD_HASH(map))
+ #define IS_FD_MAP(map) (IS_FD_ARRAY(map) || IS_FD_PROG_ARRAY(map) || \
+ 			IS_FD_HASH(map))
  
  #define BPF_OBJ_FLAG_MASK   (BPF_F_RDONLY | BPF_F_WRONLY)
  
@@@ -1302,25 -1307,34 +1306,6 @@@ static int find_prog_type(enum bpf_prog
  	return 0;
  }
  
- /* drop refcnt on maps used by eBPF program and free auxilary data */
- static void free_used_maps(struct bpf_prog_aux *aux)
- {
- 	enum bpf_cgroup_storage_type stype;
- 	int i;
 -enum bpf_event {
 -	BPF_EVENT_LOAD,
 -	BPF_EVENT_UNLOAD,
 -};
--
- 	for_each_cgroup_storage_type(stype) {
- 		if (!aux->cgroup_storage[stype])
- 			continue;
- 		bpf_cgroup_storage_release(aux->prog,
- 					   aux->cgroup_storage[stype]);
- 	}
 -static const char * const bpf_event_audit_str[] = {
 -	[BPF_EVENT_LOAD]   = "LOAD",
 -	[BPF_EVENT_UNLOAD] = "UNLOAD",
 -};
--
- 	for (i = 0; i < aux->used_map_cnt; i++)
- 		bpf_map_put(aux->used_maps[i]);
 -static void bpf_audit_prog(const struct bpf_prog *prog, enum bpf_event event)
 -{
 -	bool has_task_context = event == BPF_EVENT_LOAD;
 -	struct audit_buffer *ab;
--
- 	kfree(aux->used_maps);
 -	if (audit_enabled == AUDIT_OFF)
 -		return;
 -	ab = audit_log_start(audit_context(), GFP_ATOMIC, AUDIT_BPF);
 -	if (unlikely(!ab))
 -		return;
 -	if (has_task_context)
 -		audit_log_task(ab);
 -	audit_log_format(ab, "%sprog-id=%u event=%s",
 -			 has_task_context ? " " : "",
 -			 prog->aux->id, bpf_event_audit_str[event]);
 -	audit_log_end(ab);
--}
--
  int __bpf_prog_charge(struct user_struct *user, u32 pages)
  {
  	unsigned long memlock_limit = rlimit(RLIMIT_MEMLOCK) >> PAGE_SHIFT;

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the bpf-next tree with the net-next tree
  2019-11-24 23:58 linux-next: manual merge of the bpf-next tree with the net-next tree Stephen Rothwell
@ 2019-11-25  1:19 ` Alexei Starovoitov
  0 siblings, 0 replies; 6+ messages in thread
From: Alexei Starovoitov @ 2019-11-25  1:19 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Daniel Borkmann, Alexei Starovoitov, Networking, David Miller,
	Linux Next Mailing List, Linux Kernel Mailing List,
	Jakub Kicinski

On Sun, Nov 24, 2019 at 3:58 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> Today's linux-next merge of the bpf-next tree got a conflict in:
>
>   kernel/bpf/syscall.c
>
> between commit:
>
>   84bb46cd6228 ("Revert "bpf: Emit audit messages upon successful prog load and unload"")
>
> from the net-next tree and commit:
>
>   8793e6b23b1e ("bpf: Move bpf_free_used_maps into sleepable section")
>
> from the bpf-next tree.

argh. I wonder whether individual reverts would have
helped git to avoid such conflict.
Anyhow I've rebased bpf-next on top of net-next to avoid this mess.
There was only one Fixes tag that I adjusted manually.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* linux-next: manual merge of the bpf-next tree with the net-next tree
@ 2019-07-01  4:47 Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2019-07-01  4:47 UTC (permalink / raw)
  To: Daniel Borkmann, Alexei Starovoitov, Networking, David Miller
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Maxim Mikityanskiy, Tariq Toukan, Tal Gilboa, Saeed Mahameed

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

Hi all,

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

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

between commit:

  8960b38932be ("linux/dim: Rename externally used net_dim members")

from the net-next tree and commits:

  db05815b36cb ("net/mlx5e: Add XSK zero-copy support")
  0a06382fa406 ("net/mlx5e: Encapsulate open/close queues into a function")

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 drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 1085040675ae,67b562c7f8a1..000000000000
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@@ -1567,10 -1602,8 +1602,8 @@@ static void mlx5e_destroy_cq(struct mlx
  	mlx5_core_destroy_cq(cq->mdev, &cq->mcq);
  }
  
- static int mlx5e_open_cq(struct mlx5e_channel *c,
- 			 struct dim_cq_moder moder,
- 			 struct mlx5e_cq_param *param,
- 			 struct mlx5e_cq *cq)
 -int mlx5e_open_cq(struct mlx5e_channel *c, struct net_dim_cq_moder moder,
++int mlx5e_open_cq(struct mlx5e_channel *c, struct dim_cq_moder moder,
+ 		  struct mlx5e_cq_param *param, struct mlx5e_cq *cq)
  {
  	struct mlx5_core_dev *mdev = c->mdev;
  	int err;
@@@ -1767,45 -1800,12 +1800,12 @@@ static void mlx5e_free_xps_cpumask(stru
  	free_cpumask_var(c->xps_cpumask);
  }
  
- static int mlx5e_open_channel(struct mlx5e_priv *priv, int ix,
- 			      struct mlx5e_params *params,
- 			      struct mlx5e_channel_param *cparam,
- 			      struct mlx5e_channel **cp)
+ static int mlx5e_open_queues(struct mlx5e_channel *c,
+ 			     struct mlx5e_params *params,
+ 			     struct mlx5e_channel_param *cparam)
  {
- 	int cpu = cpumask_first(mlx5_comp_irq_get_affinity_mask(priv->mdev, ix));
 -	struct net_dim_cq_moder icocq_moder = {0, 0};
 +	struct dim_cq_moder icocq_moder = {0, 0};
- 	struct net_device *netdev = priv->netdev;
- 	struct mlx5e_channel *c;
- 	unsigned int irq;
  	int err;
- 	int eqn;
- 
- 	err = mlx5_vector2eqn(priv->mdev, ix, &eqn, &irq);
- 	if (err)
- 		return err;
- 
- 	c = kvzalloc_node(sizeof(*c), GFP_KERNEL, cpu_to_node(cpu));
- 	if (!c)
- 		return -ENOMEM;
- 
- 	c->priv     = priv;
- 	c->mdev     = priv->mdev;
- 	c->tstamp   = &priv->tstamp;
- 	c->ix       = ix;
- 	c->cpu      = cpu;
- 	c->pdev     = priv->mdev->device;
- 	c->netdev   = priv->netdev;
- 	c->mkey_be  = cpu_to_be32(priv->mdev->mlx5e_res.mkey.key);
- 	c->num_tc   = params->num_tc;
- 	c->xdp      = !!params->xdp_prog;
- 	c->stats    = &priv->channel_stats[ix].ch;
- 	c->irq_desc = irq_to_desc(irq);
- 
- 	err = mlx5e_alloc_xps_cpumask(c, params);
- 	if (err)
- 		goto err_free_channel;
- 
- 	netif_napi_add(netdev, &c->napi, mlx5e_napi_poll, 64);
  
  	err = mlx5e_open_cq(c, icocq_moder, &cparam->icosq_cq, &c->icosq.cq);
  	if (err)
@@@ -2150,12 -2230,12 +2230,12 @@@ void mlx5e_build_ico_cq_param(struct ml
  
  	mlx5e_build_common_cq_param(priv, param);
  
 -	param->cq_period_mode = NET_DIM_CQ_PERIOD_MODE_START_FROM_EQE;
 +	param->cq_period_mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
  }
  
- static void mlx5e_build_icosq_param(struct mlx5e_priv *priv,
- 				    u8 log_wq_size,
- 				    struct mlx5e_sq_param *param)
+ void mlx5e_build_icosq_param(struct mlx5e_priv *priv,
+ 			     u8 log_wq_size,
+ 			     struct mlx5e_sq_param *param)
  {
  	void *sqc = param->sqc;
  	void *wq = MLX5_ADDR_OF(sqc, sqc, wq);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* linux-next: manual merge of the bpf-next tree with the net-next tree
@ 2018-11-21 23:36 Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2018-11-21 23:36 UTC (permalink / raw)
  To: Daniel Borkmann, Alexei Starovoitov, Networking, David Miller
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Paolo Abeni,
	Nikita V. Shirokov

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

Hi all,

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

  tools/testing/selftests/bpf/Makefile

between commit:

  bd8e1afe6436 ("selftests: add dummy xdp test helper")

from the net-next tree and commit:

  b1957c92eba5 ("bpf: adding tests for map_in_map helpber in libbpf")

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/Makefile
index 4a54236475ae,43157bd89165..000000000000
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@@ -38,7 -39,7 +39,7 @@@ TEST_GEN_FILES = test_pkt_access.o test
  	get_cgroup_id_kern.o socket_cookie_prog.o test_select_reuseport_kern.o \
  	test_skb_cgroup_id_kern.o bpf_flow.o netcnt_prog.o \
  	test_sk_lookup_kern.o test_xdp_vlan.o test_queue_map.o test_stack_map.o \
- 	xdp_dummy.o
 -	test_map_in_map.o
++	xdp_dummy.o test_map_in_map.o
  
  # Order correspond to 'make run_tests' order
  TEST_PROGS := test_kmod.sh \

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the bpf-next tree with the net-next tree
  2018-04-26  0:49 Stephen Rothwell
@ 2018-04-26  7:56 ` Daniel Borkmann
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Borkmann @ 2018-04-26  7:56 UTC (permalink / raw)
  To: Stephen Rothwell, Alexei Starovoitov, Networking, David Miller
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Anders Roxell

On 04/26/2018 02:49 AM, Stephen Rothwell wrote:
> 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.

Looks good, thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* linux-next: manual merge of the bpf-next tree with the net-next tree
@ 2018-04-26  0:49 Stephen Rothwell
  2018-04-26  7:56 ` Daniel Borkmann
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2018-04-26  0:49 UTC (permalink / raw)
  To: Daniel Borkmann, Alexei Starovoitov, Networking, David Miller
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Anders Roxell

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

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..000000000000
--- 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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-24 23:58 linux-next: manual merge of the bpf-next tree with the net-next tree Stephen Rothwell
2019-11-25  1:19 ` Alexei Starovoitov
  -- strict thread matches above, loose matches on Subject: below --
2019-07-01  4:47 Stephen Rothwell
2018-11-21 23:36 Stephen Rothwell
2018-04-26  0:49 Stephen Rothwell
2018-04-26  7:56 ` Daniel Borkmann

Linux-Next Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-next/0 linux-next/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-next linux-next/ https://lore.kernel.org/linux-next \
		linux-next@vger.kernel.org
	public-inbox-index linux-next

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-next


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git