Attach xfrm dumps to 64=>32 bit translator")
Cc: "David S. Miller"
Cc: Eric Dumazet
Cc: Herbert Xu
Cc: Jakub Kicinski
Cc: Steffen Klassert
Cc: netdev@vger.kernel.org
Cc: sta...@vger.kernel.org
Signed-off-by: Dmitry Safonov
---
net/xfrm/xfrm_compat.c | 12 +---
1 fil
On 3/29/21 9:31 PM, Eric Dumazet wrote:
>
>
> On 3/29/21 9:57 PM, Dmitry Safonov wrote:
[..]
>>> [ cut here ]
>>> unsupported nla_type 356
>>
>> This doesn't seem to be an issue.
>> Userspace sent message with nla_type 356
c?x=17ae6b7cd0
>
> The issue was bisected to:
>
> commit 5f3eea6b7e8f58cf5c8a9d4b9679dc19e9e67ba3
> Author: Dmitry Safonov
> Date: Mon Sep 21 14:36:53 2020 +
>
> xfrm/compat: Attach xfrm dumps to 64=>32 bit translator
>
> bisection log: https:
Nakao
Signed-off-by: Dmitry Safonov
---
.../net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c
b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu
. Miller"
Cc: Jakub Kicinski
Cc: Herbert Xu
Cc: Hillf Danton
Cc: netdev@vger.kernel.org
Thanks,
Dmitry
Dmitry Safonov (3):
xfrm/compat: Translate by copying XFRMA_UNSPEC attribute
xfrm/compat: memset(0) 64-bit padding at right place
xfrm/compat: Don't allocate mem
32-bit to 64-bit messages translator zerofies needed paddings in the
translation, the rest is the actual payload.
Don't allocate zero pages as they are not needed.
Fixes: 5106f4a8acff ("xfrm/compat: Add 32=>64-bit messages translator")
Signed-off-by: Dmitry Safonov
---
net/
tribute
will be added.
Fixes: 5461fc0c8d9f ("xfrm/compat: Add 64=>32-bit messages translator")
Reported-by: syzbot+a7e701c8385bd8543...@syzkaller.appspotmail.com
Signed-off-by: Dmitry Safonov
---
net/xfrm/xfrm_compat.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/x
er.appspotmail.com
Signed-off-by: Dmitry Safonov
---
net/xfrm/xfrm_compat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/xfrm/xfrm_compat.c b/net/xfrm/xfrm_compat.c
index 17edbf935e35..556e9f33b815 100644
--- a/net/xfrm/xfrm_compat.c
+++ b/net/xfrm/xfrm_compat.c
@@ -388,
ko] undefined!
>
> Other users of this symbol are 'bool' options, but changing this to
> bool would require XFRM_USER to be built in as well, which doesn't
> seem worth it. Go back to kmalloc().
>
> Fixes: 96392ee5a13b9 ("xfrm/compat: Translate 32-bit user_poli
32-bit to 64-bit messages translator zerofies needed paddings in the
translation, the rest is the actual payload.
Don't allocate zero pages as they are not needed.
Signed-off-by: Dmitry Safonov
---
net/xfrm/xfrm_compat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
ue to a typo, *pos already has 64-bit payload size, in a result next
memset(0) is called on the memory after the translated attribute, not on
the tail-padding of it.
Reported-by: syzbot+c43831072e7df506a...@syzkaller.appspotmail.com
Signed-off-by: Dmitry Safonov
---
net/xfrm/xfrm_compat.c | 2
t Xu
Cc: Hillf Danton
Cc: netdev@vger.kernel.org
Thanks,
Dmitry
Dmitry Safonov (3):
xfrm/compat: Translate by copying XFRMA_UNSPEC attribute
xfrm/compat: memset(0) 64-bit padding at right place
xfrm/compat: Don't allocate memory with __GFP_ZERO
net/xfrm/xfrm_compat.c | 5 +++-
tribute
will be added.
Reported-by: syzbot+a7e701c8385bd8543...@syzkaller.appspotmail.com
Signed-off-by: Dmitry Safonov
---
net/xfrm/xfrm_compat.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/xfrm/xfrm_compat.c b/net/xfrm/xfrm_compat.c
index e28f0c9ecd6a..17edbf935e35 100644
--- a/net/xfr
On 10/28/20 10:45 AM, Steffen Klassert wrote:
> Same here, Dmitry please look into it.
Looking on both, thanks!
> I guess we can just remove the WARN_ON() that
> triggeres here.
Thanks,
Dmitry
retrieve
all netlink dump data, but will then get an unexpected EOF.
Cc: Johannes Berg
Signed-off-by: Florian Westphal
Signed-off-by: Dmitry Safonov
Reviewed-by: Johannes Berg
---
net/netlink/af_netlink.c | 47
1 file changed, 33 insertions(+), 14 deletions
| | gr.child | |
| |
The parent sends the description of a test (xfrm parameters) to the
child, the child and grand child setup a tunnel over veth interface and
test it by sending udp packets.
Cc: Shuah Khan
Cc: linux-kselft...@vger.kernel.org
Signed-off-by: Dmitry Safonov
-
the
module will vmalloc() memory for translation.
The new API is registered with xfrm_state module, not with xfrm_user as
the former needs translator for user_policy set by setsockopt() and
xfrm_user already uses functions from xfrm_state.
Signed-off-by: Dmitry Safonov
---
include/net/xfrm.h
also an ABI difference)
Kernel sends 64-bit xfrm messages to the userspace for:
- multicast (monitor events)
- netlink dumps
Wire up the translator to xfrm_nlmsg_multicast().
Signed-off-by: Dmitry Safonov
---
include/net/xfrm.h | 5 +
net/xfrm/xfrm_compat.c
Provide compat_xfrm_userpolicy_info translation for xfrm setsocketopt().
Reallocate buffer and put the missing padding for 64-bit message.
Signed-off-by: Dmitry Safonov
---
include/net/xfrm.h | 3 +++
net/xfrm/xfrm_compat.c | 26 ++
net/xfrm/xfrm_state.c | 17
ny library and compat version can be easy
build with: make CFLAGS=-m32 net/ipsec
[1]: https://lkml.kernel.org/r/20180726023144.31066-1-d...@arista.com
Cc: "David S. Miller"
Cc: Florian Westphal
Cc: Herbert Xu
Cc: Jakub Kicinski
Cc: Johannes Berg
Cc: Steffen Klassert
Cc: Stephen Suryap
Provide the user-to-kernel translator under XFRM_USER_COMPAT, that
creates for 32-bit xfrm-user message a 64-bit translation.
The translation is afterwards reused by xfrm_user code just as if
userspace had sent 64-bit message.
Signed-off-by: Dmitry Safonov
---
include/net/xfrm.h | 6
XFRM_MSG_GETSA, XFRM_MSG_GETPOLICY.
Just as for xfrm multicast, allocate frag_list for compat skb journey
down to recvmsg() which will give user the desired skb according to
syscall bitness.
Signed-off-by: Dmitry Safonov
---
net/xfrm/xfrm_user.c | 38 ++
1 file
On 9/7/20 12:24 PM, Steffen Klassert wrote:
[..]
> One comment on this. Looks like the above is the same in all
> commit messages. Please provide that generic information
> with the patch 0/n and remove it from the other patches.
Yeah, I think I've used to that from x86/core submissions - they pre
On 9/7/20 10:43 AM, Steffen Klassert wrote:
> On Wed, Aug 26, 2020 at 02:49:43AM +0100, Dmitry Safonov wrote:
[..]
>
> Thanks for the patches, looks good!
>
> Please fix the issue reported from 'kernel test robot' and resend.
Thanks, will do!
--
Dmitry
On 8/26/20 8:19 AM, Johannes Berg wrote:
> On Wed, 2020-08-26 at 02:49 +0100, Dmitry Safonov wrote:
[..]
>> +nl_dump_check_consistent(cb, nlh);
>> +memcpy(nlmsg_data(nlh), &nlk->dump_done_errno,
>> +sizeof(nlk->dump_done_errno));
>
retrieve
all netlink dump data, but will then get an unexpected EOF.
Cc: Johannes Berg
Signed-off-by: Florian Westphal
Signed-off-by: Dmitry Safonov
---
net/netlink/af_netlink.c | 48
1 file changed, 34 insertions(+), 14 deletions(-)
diff --git a/net/netlink
these patches, his idea is reused and some of his
initial code is also present.
Provide compat_xfrm_userpolicy_info translation for xfrm setsocketopt().
Reallocate buffer and put the missing padding for 64-bit message.
[1]: https://lkml.kernel.org/r/20180726023144.31066-1-d...@arista.com
Sig
| | gr.child | |
| |
The parent sends the description of a test (xfrm parameters) to the
child, the child and grand child setup a tunnel over veth interface and
test it by sending udp packets.
Cc: Shuah Khan
Cc: linux-kselft...@vger.kernel.org
Signed-off-by: Dmitry Safonov
-
6023144.31066-1-d...@arista.com
Signed-off-by: Dmitry Safonov
---
include/net/xfrm.h | 10 ++
net/xfrm/Kconfig | 10 ++
net/xfrm/Makefile | 1 +
net/xfrm/xfrm_compat.c | 302 +
net/xfrm/xfrm_user.c | 9 +-
5 files changed, 331 insertions
r/20180726023144.31066-1-d...@arista.com
Signed-off-by: Dmitry Safonov
---
include/net/xfrm.h | 6 ++
net/xfrm/xfrm_compat.c | 10 --
net/xfrm/xfrm_user.c | 20
3 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/include/net/xfrm.h b/include/net
https://lkml.kernel.org/r/20180726023144.31066-1-d...@arista.com
Signed-off-by: Dmitry Safonov
---
include/net/xfrm.h | 11 ++
net/xfrm/Kconfig | 3 +-
net/xfrm/xfrm_compat.c | 276 +
net/xfrm/xfrm_user.c | 50 +---
4 files changed, 321 i
c: Herbert Xu
Cc: Jakub Kicinski
Cc: Steffen Klassert
Cc: Stephen Suryaputra
Cc: Dmitry Safonov <0x7f454...@gmail.com>
Cc: netdev@vger.kernel.org
Dmitry Safonov (6):
xfrm/compat: Add 64=>32-bit messages translator
xfrm/compat: Attach xfrm dumps to 64=>32 bit translator
netlink/c
On 3/26/19 5:57 PM, David Ahern wrote:
> On 3/26/19 11:15 AM, Dmitry Safonov wrote:
>> I still wonder if it's good to expose it to userspace rather than
>> shrinker, but this probably should work for me - I'll test it in near days.
>
> I did not know about the shr
On 2/25/19 11:31 PM, Eric Dumazet wrote:
> On 02/25/2019 03:21 PM, Dmitry Safonov wrote:
>> Well, sure - but it seems confusing that rtnl_unregister() will require
>> synchronize_rcu(), while rtnl_unregister_all() will not.
>
> rtnl_unregister_all() is a different beast,
On 2/25/19 11:21 PM, Dmitry Safonov wrote:
> Hi Eric,
>
> On 2/25/19 11:09 PM, Eric Dumazet wrote:
>> On 02/25/2019 01:27 PM, Dmitry Safonov wrote:
>>> While it's possible to document that rtnl_unregister() requires
>>> synchronize_net() afterwards - u
Hi Eric,
On 2/25/19 11:09 PM, Eric Dumazet wrote:
> On 02/25/2019 01:27 PM, Dmitry Safonov wrote:
>> While it's possible to document that rtnl_unregister() requires
>> synchronize_net() afterwards - unlike rtnl_unregister_all(), I believe
>> the module e
Fixes: 6853dd488119 ("rtnetlink: protect handler table with rcu")
Cc: "David S. Miller"
Cc: Florian Westphal
Cc: "Hannes Frederic Sowa"
Cc: netdev@vger.kernel.org
Signed-off-by: Dmitry Safonov
---
net/core/rtnetlink.c | 4 +++-
1 file changed, 3 insertions(+), 1 de
ink: https://lkml.kernel.org/r/<20180502020220.2027-1-d...@arista.com>
Cc: Masahide NAKAMURA
Cc: YOSHIFUJI Hideaki
Cc: Steffen Klassert
Cc: "David S. Miller"
Cc: netdev@vger.kernel.org
Suggested-by: Herbert Xu
Signed-off-by: Dmitry Safonov
---
net/xfrm/xfrm_state.c | 39 +
On Wed, 2018-05-02 at 17:11 +0800, Herbert Xu wrote:
> On Wed, May 02, 2018 at 03:02:20AM +0100, Dmitry Safonov wrote:
> > It seems to be a valid use case to add xfrm state without
> > Security Parameter Indexes (SPI) value associated:
> > ip xfrm state add src $src dst $
x27;t try looking up by hash if SPI == 0.
Cc: Steffen Klassert
Cc: Herbert Xu
Cc: "David S. Miller"
Cc: netdev@vger.kernel.org
Signed-off-by: Dmitry Safonov
---
net/xfrm/xfrm_user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/
o FLOW_SEQ now can be disabled with pgset "flag !FLOW_SEQ"
o FLOW_SEQ and FLOW_RND are antonyms, as it's shown by pktgen_if_show()
o IPSEC now may be disabled
Note, that IPV6 is enabled with dst6/src6 parameters, not with
a flag parameter.
Signed-off-by: Dmitry Safonov
---
ne
Cc: Mark Rutland
Cc: Radu Rendec
Cc: "Reshetova, Elena"
Cc: netdev@vger.kernel.org
Dmitry Safonov (5):
Documentation/pktgen: Clearify how-to use pktgen samples
pktgen: Add missing !flag parameters
pktgen: Add behaviour flags macro to generate flags/names
pktgen: Remove brute-for
to `source functions.sh`.
o Document how-to unset a behaviour flag, note about history expansion.
o Fix pgset spi parameter value.
Cc: Jonathan Corbet
Cc: linux-...@vger.kernel.org
Signed-off-by: Dmitry Safonov
---
Documentation/networking/pktgen.txt | 19 ++-
1 file changed, 14
PKT_FALGS macro will be used to add package behavior names definitions
to simplify the code that prints/reads pkg flags.
Sorted the array in order of printing the flags in pktgen_if_show()
Note: Renamed IPSEC_ON => IPSEC for simplicity.
No visible behavior change expected.
Signed-off-by: Dmi
Add macro generated pkt_flag_names array, with a little help of which
the flags can be printed by using an index.
Signed-off-by: Dmitry Safonov
---
net/core/pktgen.c | 77 ++-
1 file changed, 19 insertions(+), 58 deletions(-)
diff --git a/net
Don't use error-prone-brute-force way.
Signed-off-by: Dmitry Safonov
---
net/core/pktgen.c | 144 +++---
1 file changed, 39 insertions(+), 105 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index f9883139e311..e335daa40211 1
On Mon, 2018-01-15 at 13:09 -0500, David Miller wrote:
> From: Dmitry Safonov
> Date: Tue, 9 Jan 2018 13:55:33 +
>
> > +#define pf(flag) __stringify(flag),
> > +char *pkt_flag_names[] = {
> > + PKT_FLAGS
> > +};
> > +#undef pf
>
&
"Reshetova, Elena"
Cc: netdev@vger.kernel.org
Dmitry Safonov (5):
Documentation/pktgen: Clearify how-to use pktgen samples
pktgen: Add missing !flag parameters
pktgen: Add behavior flag names array - pkt_flag_names
pktgen: Remove brute-force printing of flags
pktgen: Clean read use
to `source functions.sh`.
o Document how-to unset a behaviour flag, note about history expansion.
o Fix pgset spi parameter value.
Cc: Jonathan Corbet
Cc: linux-...@vger.kernel.org
Signed-off-by: Dmitry Safonov
---
Documentation/networking/pktgen.txt | 19 ++-
1 file changed, 14
The array will be used to simplify the code that prints/reads pkg flags.
Sorted the array in order of printing the flags in pktgen_if_show()
Note: Renamed IPSEC_ON => IPSEC for simplicity.
No visible behavior change expected.
Signed-off-by: Dmitry Safonov
---
net/core/pktgen.c |
o FLOW_SEQ now can be disabled with pgset "flag !FLOW_SEQ"
o FLOW_SEQ and FLOW_RND are antonyms, as it's shown by pktgen_if_show()
o IPSEC now may be disabled
Note, that IPV6 is enabled with dst6/src6 parameters, not with
a flag parameter.
Signed-off-by: Dmitry Safonov
---
ne
Like, we can do it using index.
Signed-off-by: Dmitry Safonov
---
net/core/pktgen.c | 71 ++-
1 file changed, 13 insertions(+), 58 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 51f273319baf..e320f0cbfd62 100644
--- a
Don't use error-prone-brute-force way.
Signed-off-by: Dmitry Safonov
---
net/core/pktgen.c | 144 +++---
1 file changed, 39 insertions(+), 105 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index e320f0cbfd62..a3862e500643 1
Sorry, I've forgot to change the subject as the first time it fired at
xlog_cil_push(), but all reproductions fire on unix_stream_sendmsg().
On 07/13/2017 06:16 PM, Dmitry Safonov wrote:
Hello,
We run CRIU tests on linux-next tree and today we found this issue.
CRIU tests are the set of
Hello,
We run CRIU tests on linux-next tree and today we found this issue.
CRIU tests are the set of small programs to check checkpoint/restore
of different primitives (files, sockets, signals, pipes, etc).
https://github.com/xemul/criu/tree/master/test
Each test is executed three times: withou
ed.
Reported-by: Florian Westphal
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
net/netfilter/nfnetlink_log.c | 2 +-
net/netfilter/nfnetlink_queue.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.
I thought, it was decided to use 0/NULL/whatever, than uninitialized_var()?
Is right now?
http://thread.gmane.org/gmane.linux.kernel/1383415
2015-11-06 22:10 GMT+03:00 Pablo Neira Ayuso :
> On Fri, Nov 06, 2015 at 09:48:14PM +0300, Dmitry Safonov wrote:
>> With x86_64_defconfig:
>
:14: warning: ‘flags’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
inst->flags = flags;
^
Signed-off-by: Dmitry Safonov <0x7f454...@gmail.com>
---
net/netfilter/nfnetlink_log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --
58 matches
Mail list logo