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
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
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
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
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
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
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
чт, 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/
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 ++
вт, 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:
> > >
пн, 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
пт, 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.
> >
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
-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
(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
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
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
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
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
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
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
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,
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
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
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
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
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
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
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
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
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
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_
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
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
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
35 matches
Mail list logo