Re: [PATCH] selftests/bpf: Convert comma to semicolon

2025-03-11 Thread Anton Protopopov
tended. This is a typo, of course. Thanks! > Found by inspection. > No functional change intended. > Compile tested only. > > Signed-off-by: Chen Ni Acked-by: Anton Protopopov > --- > tools/testing/selftests/bpf/prog_tests/fd_array.c | 4 ++-- > 1 file changed

[PATCH bpf 4/5] bpf: fix map permissions check

2020-05-27 Thread Anton Protopopov
The map_lookup_and_delete_elem() function should check for both FMODE_CAN_WRITE and FMODE_CAN_READ permissions because it returns a map element to user space. Fixes: bd513cd08f10 ("bpf: add MAP_LOOKUP_AND_DELETE_ELEM syscall") Signed-off-by: Anton Protopopov --- kernel/bpf/syscall.c

[PATCH bpf 2/5] selftests/bpf: cleanup some file descriptors in test_maps

2020-05-27 Thread Anton Protopopov
The test_map_rdonly and test_map_wronly tests should close file descriptors which they open. Signed-off-by: Anton Protopopov --- tools/testing/selftests/bpf/test_maps.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools/testing/selftests/bpf

[PATCH bpf 5/5] selftests/bpf: add tests for write-only stacks/queues

2020-05-27 Thread Anton Protopopov
For write-only stacks and queues bpf_map_update_elem should be allowed, but bpf_map_lookup_elem and bpf_map_lookup_and_delete_elem should fail with EPERM. Signed-off-by: Anton Protopopov --- tools/testing/selftests/bpf/test_maps.c | 40 - 1 file changed, 39 insertions

[PATCH bpf 0/5] bpf: fix map permissions check and cleanup code around

2020-05-27 Thread Anton Protopopov
BPF_MAP_TYPE_STACK and BPF_MAP_TYPE_QUEUE map types. Anton Protopopov (5): selftests/bpf: fix a typo in test_maps selftests/bpf: cleanup some file descriptors in test_maps selftests/bpf: cleanup comments in test_maps bpf: fix map permissions check selftests/bpf: add tests for write-only stacks/queues

[PATCH bpf 3/5] selftests/bpf: cleanup comments in test_maps

2020-05-27 Thread Anton Protopopov
Make comments inside the test_map_rdonly and test_map_wronly tests consistent with logic. Signed-off-by: Anton Protopopov --- tools/testing/selftests/bpf/test_maps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools

[PATCH bpf 1/5] selftests/bpf: fix a typo in test_maps

2020-05-27 Thread Anton Protopopov
Trivial fix to a typo in the test_map_wronly test: "read" -> "write" Signed-off-by: Anton Protopopov --- tools/testing/selftests/bpf/test_maps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools/testing/se

Re: [PATCH bpf-next] tools: libbpf: update extended attributes version of bpf_object__open()

2019-08-30 Thread Anton Protopopov
чт, 29 авг. 2019 г. в 16:02, Song Liu : > > > > > On Aug 14, 2019, at 5:03 PM, Anton Protopopov > > wrote: > > > > [...] > > > > > > > int bpf_object__unload(struct bpf_object *obj) > > diff --git a/tools/lib/bpf/libbpf.h b/tools/

[PATCH bpf-next] tools: libbpf: update extended attributes version of bpf_object__open()

2019-08-14 Thread Anton Protopopov
nctions is to clear this flag and this patch changes bpf_object__open_buffer to clears this flag. It can be enabled, if needed, by opening an object from buffer using __bpf_object__open_xattr. Signed-off-by: Anton Protopopov --- tools/lib/bpf/libbpf.c | 45 ++

Re: [PATCH bpf-next 1/2] bpf, libbpf: add a new API bpf_object__reuse_maps()

2019-07-16 Thread Anton Protopopov
вт, 9 июл. 2019 г. в 13:40, Andrii Nakryiko : > > On Mon, Jul 8, 2019 at 1:37 PM Anton Protopopov > wrote: > > > > пн, 8 июл. 2019 г. в 13:54, Andrii Nakryiko : > > > > > > On Fri, Jul 5, 2019 at 2:53 PM Daniel Borkmann > > > wrote: > > >

Re: [PATCH bpf-next 1/2] bpf, libbpf: add a new API bpf_object__reuse_maps()

2019-07-08 Thread Anton Protopopov
пн, 8 июл. 2019 г. в 13:54, Andrii Nakryiko : > > On Fri, Jul 5, 2019 at 2:53 PM Daniel Borkmann wrote: > > > > On 07/05/2019 10:44 PM, Anton Protopopov wrote: > > > Add a new API bpf_object__reuse_maps() which can be used to replace all > > > maps in

Re: [PATCH bpf-next 1/2] bpf, libbpf: add a new API bpf_object__reuse_maps()

2019-07-08 Thread Anton Protopopov
пт, 5 июл. 2019 г. в 17:44, Daniel Borkmann : > > On 07/05/2019 10:44 PM, Anton Protopopov wrote: > > Add a new API bpf_object__reuse_maps() which can be used to replace all > > maps in > > an object by maps pinned to a directory provided in the path argument. > >

[PATCH bpf-next 1/2] bpf, libbpf: add a new API bpf_object__reuse_maps()

2019-07-05 Thread Anton Protopopov
Add a new API bpf_object__reuse_maps() which can be used to replace all maps in an object by maps pinned to a directory provided in the path argument. Namely, each map M in the object will be replaced by a map pinned to path/M.name. Signed-off-by: Anton Protopopov --- tools/lib/bpf/libbpf.c

[PATCH bpf-next 2/2] bpf, libbpf: add an option to reuse existing maps in bpf_prog_load_xattr

2019-07-05 Thread Anton Protopopov
-by: Anton Protopopov --- tools/lib/bpf/libbpf.c | 8 tools/lib/bpf/libbpf.h | 1 + 2 files changed, 9 insertions(+) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 84c9e8f7bfd3..9daa09c9fe1a 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -3953,6

[PATCH bpf-next 0/2] libbpf: add an option to reuse maps when loading a program

2019-07-05 Thread Anton Protopopov
(bpf_map__reuse_fd) all maps defined in the object with file descriptors obtained from corresponding entries from the specified directory. Anton Protopopov (2): bpf, libbpf: add a new API bpf_object__reuse_maps() bpf, libbpf: add an option to reuse existing maps in bpf_prog_load_xattr tools/lib

[PATCH bpf] bpf: fix the check that forwarding is enabled in bpf_ipv6_fib_lookup

2019-06-15 Thread Anton Protopopov
pected. Signed-off-by: Anton Protopopov --- net/core/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/filter.c b/net/core/filter.c index f615e42cf4ef..3fdf1b21be36 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -4737,7 +4737,7 @@ stat

[PATCH] mISDN: prevent possible NULL pointer dereference

2016-02-17 Thread Anton Protopopov
nce. Signed-off-by: Anton Protopopov --- drivers/isdn/hardware/mISDN/netjet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c index 8e29447..afde4ed 100644 --- a/drivers/isdn/hardware/mISDN/netje

[PATCH] net: caif: fix erroneous return value

2016-02-17 Thread Anton Protopopov
The cfrfml_receive() function might return positive value EPROTO Signed-off-by: Anton Protopopov --- net/caif/cfrfml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/caif/cfrfml.c b/net/caif/cfrfml.c index 61d7617..b82440e 100644 --- a/net/caif/cfrfml.c +++ b/net/caif

[PATCH] appletalk: fix erroneous return value

2016-02-17 Thread Anton Protopopov
The atalk_sendmsg() function might return wrong value ENETUNREACH instead of -ENETUNREACH. Signed-off-by: Anton Protopopov --- net/appletalk/ddp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index d5871ac..f066781 100644 --- a

[PATCH] rtnl: RTM_GETNETCONF: fix wrong return value

2016-02-16 Thread Anton Protopopov
An error response from a RTM_GETNETCONF request can return the positive error value EINVAL in the struct nlmsgerr that can mislead userspace. Signed-off-by: Anton Protopopov --- net/ipv4/devinet.c | 2 +- net/ipv6/addrconf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] ext4: ioctl: fix erroneous return value

2016-02-11 Thread Anton Protopopov
RM (Operation not permitted) test: ioctl: FS_IOC_SETFLAGS: Operation not permitted +++ exited with 1 +++ Signed-off-by: Anton Protopopov --- fs/ext4/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index 0f6c369..a9

Re: [PATCH] cifs: fix erroneous return value

2016-02-10 Thread Anton Protopopov
2016-02-10 12:59 GMT-05:00 Joe Perches : > On Wed, 2016-02-10 at 12:50 -0500, Anton Protopopov wrote: >> The setup_ntlmv2_rsp() function may return positive value ENOMEM instead >> of -ENOMEM in case of kmalloc failure. > > How have you verified this change is correct? Yes,

[PATCH] cifs: fix erroneous return value

2016-02-10 Thread Anton Protopopov
The setup_ntlmv2_rsp() function may return positive value ENOMEM instead of -ENOMEM in case of kmalloc failure. Signed-off-by: Anton Protopopov --- fs/cifs/cifsencrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index

[PATCH] ceph: fix a wrong comparison

2016-02-10 Thread Anton Protopopov
A negative value rc compared to the positive value ENOENT in the finish_read() function. Signed-off-by: Anton Protopopov --- fs/ceph/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index c222137..1b809c9 100644 --- a/fs/ceph/addr.c

[PATCH] Bluetooth: hci_intel: Fix a wrong comparison

2016-02-10 Thread Anton Protopopov
A return value of the intel_wait_booting() function compared with a constant ETIMEDOUT instead of -ETIMEDOUT. Signed-off-by: Anton Protopopov --- drivers/bluetooth/hci_intel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/bluetooth/hci_intel.c b/drivers

[PATCH] iwlwifi: fix erroneous return value

2016-02-10 Thread Anton Protopopov
The iwl_trans_pcie_start_fw() function may return the positive value EIO instead of -EIO in case of error. Signed-off-by: Anton Protopopov --- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi

[PATCH] ath10k: fix erroneous return value

2016-02-10 Thread Anton Protopopov
The ath10k_pci_hif_exchange_bmi_msg() function may return the positive value EIO instead of -EIO in case of error. Signed-off-by: Anton Protopopov --- drivers/net/wireless/ath/ath10k/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/pci.c

[PATCH] netfilter: nft_counter: fix erroneous return values

2016-02-06 Thread Anton Protopopov
The nft_counter_init() and nft_counter_clone() functions should return negative error value -ENOMEM instead of positive ENOMEM. Signed-off-by: Anton Protopopov --- net/netfilter/nft_counter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netfilter/nft_counter.c b

[PATCH] media: i2c/adp1653: probe: fix erroneous return value

2016-02-06 Thread Anton Protopopov
The adp1653_probe() function may return positive value EINVAL which is obviously wrong. Signed-off-by: Anton Protopopov --- drivers/media/i2c/adp1653.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c index 7e9cbf7

[PATCH] drm/qxl: fix erroneous return value

2016-02-06 Thread Anton Protopopov
The qxl_gem_prime_mmap() function returns ENOSYS instead of -ENOSYS Signed-off-by: Anton Protopopov --- drivers/gpu/drm/qxl/qxl_prime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_prime.c b/drivers/gpu/drm/qxl/qxl_prime.c index 3d031b5..9f029dd

[PATCH] Staging: comedi: check the return value of kobject_set_name

2014-07-08 Thread Anton Protopopov
Added a check of the return value of the kobject_set_name function. Signed-off-by: Anton Protopopov --- drivers/staging/comedi/comedi_fops.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c

Re: [PATCH] Staging: comedi: check the return value of kobject_set_name

2014-07-08 Thread Anton Protopopov
09.07.2014 08:28, gregkh пишет: > On Wed, Jul 09, 2014 at 08:24:06AM +0400, Anton Protopopov wrote: >> 2014-06-09 14:01 GMT+04:00 Ian Abbott : >>> On 2014-06-07 14:56, Anton Protopopov wrote: >>>> >>>> Added a check of the return value of the kobject_

Re: [PATCH] Staging: comedi: check the return value of kobject_set_name

2014-07-08 Thread Anton Protopopov
2014-06-09 14:01 GMT+04:00 Ian Abbott : > On 2014-06-07 14:56, Anton Protopopov wrote: >> >> Added a check of the return value of the kobject_set_name function. >> >> Signed-off-by: Anton Protopopov >> --- >> drivers/staging/comedi/comedi_fops.c | 9

[PATCH] staging: vt6655: fixed sparse warnings

2014-07-01 Thread Anton Protopopov
B_Opt0' was not declared. Should it be static? drivers/staging//vt6655/rxtx.c:90:22: warning: symbol 'wFB_Opt1' was not declared. Should it be static? Signed-off-by: Anton Protopopov --- drivers/staging/vt6655/rxtx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH] Staging: comedi: check the return value of kobject_set_name

2014-06-07 Thread Anton Protopopov
Added a check of the return value of the kobject_set_name function. Signed-off-by: Anton Protopopov --- drivers/staging/comedi/comedi_fops.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c