RE: [PATCH net-next] net/ipv4/raw Optimise ipv4 raw sends when IP_HDRINCL set.

2020-05-12 Thread David Laight
From: David Miller > Sent: 12 May 2020 00:10 > From: David Laight > Date: Mon, 11 May 2020 21:28:18 + > > > In this case the "modified in userspace meanwhile" just breaks the > > application - it isn't any kind of security issue. > > The kernel must provide correct behavior based upon the s

Re: [PATCH net-next] net/ipv4/raw Optimise ipv4 raw sends when IP_HDRINCL set.

2020-05-11 Thread David Miller
From: David Laight Date: Mon, 11 May 2020 21:28:18 + > In this case the "modified in userspace meanwhile" just breaks the > application - it isn't any kind of security issue. The kernel must provide correct behavior based upon the stable IP header that it copies into userspace. I'm not movi

RE: [PATCH net-next] net/ipv4/raw Optimise ipv4 raw sends when IP_HDRINCL set.

2020-05-11 Thread David Laight
From: David Miller > Sent: 11 May 2020 21:50 > To: David Laight > Cc: netdev@vger.kernel.org > Subject: Re: [PATCH net-next] net/ipv4/raw Optimise ipv4 raw sends when > IP_HDRINCL set. > > From: David Laight > Date: Sun, 10 May 2020 16:00:41 + > > > The f

Re: [PATCH net-next] net/ipv4/raw Optimise ipv4 raw sends when IP_HDRINCL set.

2020-05-11 Thread David Miller
From: David Laight Date: Sun, 10 May 2020 16:00:41 + > The final routing for ipv4 packets may be done with the IP address > from the message header not that from the address buffer. > If the addresses are different FLOWI_FLAG_KNOWN_NH must be set so > that a temporary 'struct rtable' entry is

[PATCH net-next] net/ipv4/raw Optimise ipv4 raw sends when IP_HDRINCL set.

2020-05-10 Thread David Laight
The final routing for ipv4 packets may be done with the IP address from the message header not that from the address buffer. If the addresses are different FLOWI_FLAG_KNOWN_NH must be set so that a temporary 'struct rtable' entry is created to send the message. However the allocate + free (under RC