mbox series

[ipsec-next,v14,0/4] xfrm: Introduce direction attribute for SA

Message ID cover.1714460330.git.antony.antony@secunet.com (mailing list archive)
Headers show
Series xfrm: Introduce direction attribute for SA | expand

Message

Antony Antony April 30, 2024, 7:08 a.m. UTC
Hi,

Inspired by the upcoming IP-TFS patch set, and confusions experienced in
the past due to lack of direction attribute on SAs, add a new direction
"dir" attribute. It aims to streamline the SA configuration process and
enhance the clarity of existing SA attributes.

This patch set introduces the 'dir' attribute to SA, aka xfrm_state,
('in' for input or 'out' for output). Alsp add validations of existing
direction-specific SA attributes during configuration and in the data
path lookup.

This change would not affect any existing use case or way of configuring
SA. You will notice improvements when the new 'dir' attribute is set.

v14: add more SA flag checks.
v13: has one fix, minor documenation updates, and function renaming.

Antony Antony (4):
  xfrm: Add Direction to the SA in or out
  xfrm: Add dir validation to "out" data path lookup
  xfrm: Add dir validation to "in" data path lookup
  xfrm: Restrict SA direction attribute to specific netlink message
    types

 Documentation/networking/xfrm_proc.rst |   6 +
 include/net/xfrm.h                     |   1 +
 include/uapi/linux/snmp.h              |   2 +
 include/uapi/linux/xfrm.h              |   6 +
 net/ipv6/xfrm6_input.c                 |   7 ++
 net/xfrm/xfrm_compat.c                 |   7 +-
 net/xfrm/xfrm_device.c                 |   6 +
 net/xfrm/xfrm_input.c                  |  11 ++
 net/xfrm/xfrm_policy.c                 |   6 +
 net/xfrm/xfrm_proc.c                   |   2 +
 net/xfrm/xfrm_replay.c                 |   3 +-
 net/xfrm/xfrm_state.c                  |   8 ++
 net/xfrm/xfrm_user.c                   | 162 ++++++++++++++++++++++++-
 13 files changed, 218 insertions(+), 9 deletions(-)

--
2.30.2

Comments

Sabrina Dubroca April 30, 2024, 9:33 a.m. UTC | #1
2024-04-30, 09:08:06 +0200, Antony Antony wrote:
> Hi,
> 
> Inspired by the upcoming IP-TFS patch set, and confusions experienced in
> the past due to lack of direction attribute on SAs, add a new direction
> "dir" attribute. It aims to streamline the SA configuration process and
> enhance the clarity of existing SA attributes.
> 
> This patch set introduces the 'dir' attribute to SA, aka xfrm_state,
> ('in' for input or 'out' for output). Alsp add validations of existing
> direction-specific SA attributes during configuration and in the data
> path lookup.
> 
> This change would not affect any existing use case or way of configuring
> SA. You will notice improvements when the new 'dir' attribute is set.
> 
> v14: add more SA flag checks.
> v13: has one fix, minor documenation updates, and function renaming.
> 
> Antony Antony (4):
>   xfrm: Add Direction to the SA in or out
>   xfrm: Add dir validation to "out" data path lookup
>   xfrm: Add dir validation to "in" data path lookup
>   xfrm: Restrict SA direction attribute to specific netlink message
>     types

Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>

Thanks Antony.

Patches 2 and 3 are identical to v13 so you could have kept Nicolas's
Reviewed-by tags. Steffen, I guess you can copy them in case Nicolas
doesn't look at v14 by the time you apply it?
Nicolas Dichtel May 2, 2024, 7:58 a.m. UTC | #2
Le 30/04/2024 à 11:33, Sabrina Dubroca a écrit :
> 2024-04-30, 09:08:06 +0200, Antony Antony wrote:
>> Hi,
>>
>> Inspired by the upcoming IP-TFS patch set, and confusions experienced in
>> the past due to lack of direction attribute on SAs, add a new direction
>> "dir" attribute. It aims to streamline the SA configuration process and
>> enhance the clarity of existing SA attributes.
>>
>> This patch set introduces the 'dir' attribute to SA, aka xfrm_state,
>> ('in' for input or 'out' for output). Alsp add validations of existing
>> direction-specific SA attributes during configuration and in the data
>> path lookup.
>>
>> This change would not affect any existing use case or way of configuring
>> SA. You will notice improvements when the new 'dir' attribute is set.
>>
>> v14: add more SA flag checks.
>> v13: has one fix, minor documenation updates, and function renaming.
>>
>> Antony Antony (4):
>>   xfrm: Add Direction to the SA in or out
>>   xfrm: Add dir validation to "out" data path lookup
>>   xfrm: Add dir validation to "in" data path lookup
>>   xfrm: Restrict SA direction attribute to specific netlink message
>>     types
> 
> Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
> 
> Thanks Antony.
> 
> Patches 2 and 3 are identical to v13 so you could have kept Nicolas's
> Reviewed-by tags. Steffen, I guess you can copy them in case Nicolas
I agree, thanks Sabrina.

> doesn't look at v14 by the time you apply it?
> 
I was off the last days ;-)
Steffen Klassert May 2, 2024, 8:11 a.m. UTC | #3
On Tue, Apr 30, 2024 at 09:08:06AM +0200, Antony Antony wrote:
> Hi,
> 
> Inspired by the upcoming IP-TFS patch set, and confusions experienced in
> the past due to lack of direction attribute on SAs, add a new direction
> "dir" attribute. It aims to streamline the SA configuration process and
> enhance the clarity of existing SA attributes.
> 
> This patch set introduces the 'dir' attribute to SA, aka xfrm_state,
> ('in' for input or 'out' for output). Alsp add validations of existing
> direction-specific SA attributes during configuration and in the data
> path lookup.
> 
> This change would not affect any existing use case or way of configuring
> SA. You will notice improvements when the new 'dir' attribute is set.
> 
> v14: add more SA flag checks.
> v13: has one fix, minor documenation updates, and function renaming.
> 
> Antony Antony (4):
>   xfrm: Add Direction to the SA in or out
>   xfrm: Add dir validation to "out" data path lookup
>   xfrm: Add dir validation to "in" data path lookup
>   xfrm: Restrict SA direction attribute to specific netlink message
>     types

Series applied, thanks a lot Antony!