linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] v2 ipv4/ipv6 refcount conversions
@ 2017-07-04  6:34 Elena Reshetova
  2017-07-04  6:34 ` [PATCH 1/9] net, ipv6: convert ipv6_txoptions.refcnt from atomic_t to refcount_t Elena Reshetova
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Elena Reshetova @ 2017-07-04  6:34 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, davem, jmorris, kaber, yoshfuji, steffen.klassert,
	kuznet, peterz, keescook, Elena Reshetova

Changes in v2:
 * rebase on top of net-next
 * currently by default refcount_t = atomic_t (*) and uses all 
   atomic standard operations unless CONFIG_REFCOUNT_FULL is enabled.
   This is a compromise for the systems that are critical on
   performance (such as net) and cannot accept even slight delay
   on the refcounter operations.

This series, for ipv4/ipv6 network components, replaces atomic_t reference
counters with the new refcount_t type and API (see include/linux/refcount.h).
By doing this we prevent intentional or accidental
underflows or overflows that can led to use-after-free vulnerabilities.

The patches are fully independent and can be cherry-picked separately.
In order to try with refcount functionality enabled in run-time,
CONFIG_REFCOUNT_FULL must be enabled.

NOTE: automatic kernel builder for some reason doesn't like all my
network branches and regularly times out the builds on these branches.
Suggestion for "waiting a day for a good coverage" doesn't work, as
we have seen with generic network conversions. So please wait for the
full report from kernel test rebot before merging further up.
This has been compile-tested in 116 configs, but 71 timed out (including
all s390-related configs again). I am trying to see if they can fix
build coverage for me in meanwhile.

* The respective change is currently merged into -next as
  "locking/refcount: Create unchecked atomic_t implementation".

Elena Reshetova (9):
  net, ipv6: convert ipv6_txoptions.refcnt from atomic_t to refcount_t
  net, ipv6: convert inet6_dev.refcnt from atomic_t to refcount_t
  net, ipv6: convert inet6_ifaddr.refcnt from atomic_t to refcount_t
  net, ipv6: convert ifmcaddr6.mca_refcnt from atomic_t to refcount_t
  net, ipv6: convert ifacaddr6.aca_refcnt from atomic_t to refcount_t
  net, ipv6: convert xfrm6_tunnel_spi.refcnt from atomic_t to refcount_t
  net, ipv6: convert ip6addrlbl_entry.refcnt from atomic_t to refcount_t
  net, ipv4: convert cipso_v4_doi.refcount from atomic_t to refcount_t
  net, ipv4: convert fib_info.fib_clntref from atomic_t to refcount_t

 include/net/addrconf.h   | 14 +++++++-------
 include/net/cipso_ipv4.h |  3 ++-
 include/net/if_inet6.h   |  9 +++++----
 include/net/ip_fib.h     |  7 ++++---
 include/net/ipv6.h       |  7 ++++---
 net/ipv4/cipso_ipv4.c    | 12 ++++++------
 net/ipv4/fib_semantics.c |  2 +-
 net/ipv4/fib_trie.c      |  2 +-
 net/ipv6/addrconf.c      |  4 ++--
 net/ipv6/addrlabel.c     |  9 +++++----
 net/ipv6/anycast.c       |  6 +++---
 net/ipv6/exthdrs.c       |  4 ++--
 net/ipv6/ipv6_sockglue.c |  2 +-
 net/ipv6/mcast.c         | 18 +++++++++---------
 net/ipv6/xfrm6_tunnel.c  |  8 ++++----
 15 files changed, 56 insertions(+), 51 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH 0/9] net, ipv4, ipv6 refcounter conversions
@ 2017-03-16 18:23 Elena Reshetova
  2017-03-16 18:23 ` [PATCH 8/9] net, ipv4: convert cipso_v4_doi.refcount from atomic_t to refcount_t Elena Reshetova
  0 siblings, 1 reply; 12+ messages in thread
From: Elena Reshetova @ 2017-03-16 18:23 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, davem, jmorris, kaber, yoshfuji, steffen.klassert,
	kuznet, peterz, keescook, Elena Reshetova

This series, for ipv4/ipv6 components, replaces atomic_t reference
counters with the new refcount_t type and API (see include/linux/refcount.h).
By doing this we prevent intentional or accidental
underflows or overflows that can led to use-after-free vulnerabilities.

The patches are fully independent and can be cherry-picked separately.
If there are no objections to the patches, please merge them via respective trees.

Elena Reshetova (9):
  net, ipv6: convert ipv6_txoptions.refcnt from atomic_t to refcount_t
  net, ipv6: convert inet6_dev.refcnt from atomic_t to refcount_t
  net, ipv6: convert inet6_ifaddr.refcnt from atomic_t to refcount_t
  net, ipv6: convert ifmcaddr6.mca_refcnt from atomic_t to refcount_t
  net, ipv6: convert ifacaddr6.aca_refcnt from atomic_t to refcount_t
  net, ipv6: convert xfrm6_tunnel_spi.refcnt from atomic_t to refcount_t
  net, ipv6: convert ip6addrlbl_entry.refcnt from atomic_t to refcount_t
  net, ipv4: convert cipso_v4_doi.refcount from atomic_t to refcount_t
  net, ipv4: convert fib_info.fib_clntref from atomic_t to refcount_t

 include/net/addrconf.h   | 14 +++++++-------
 include/net/cipso_ipv4.h |  3 ++-
 include/net/if_inet6.h   |  9 +++++----
 include/net/ip_fib.h     |  7 ++++---
 include/net/ipv6.h       |  7 ++++---
 net/ipv4/cipso_ipv4.c    | 12 ++++++------
 net/ipv4/fib_semantics.c |  2 +-
 net/ipv4/fib_trie.c      |  2 +-
 net/ipv6/addrconf.c      |  4 ++--
 net/ipv6/addrlabel.c     |  9 +++++----
 net/ipv6/anycast.c       |  6 +++---
 net/ipv6/exthdrs.c       |  4 ++--
 net/ipv6/ipv6_sockglue.c |  2 +-
 net/ipv6/mcast.c         | 18 +++++++++---------
 net/ipv6/xfrm6_tunnel.c  |  8 ++++----
 15 files changed, 56 insertions(+), 51 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-07-04  8:39 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-04  6:34 [PATCH 0/9] v2 ipv4/ipv6 refcount conversions Elena Reshetova
2017-07-04  6:34 ` [PATCH 1/9] net, ipv6: convert ipv6_txoptions.refcnt from atomic_t to refcount_t Elena Reshetova
2017-07-04  6:34 ` [PATCH 2/9] net, ipv6: convert inet6_dev.refcnt " Elena Reshetova
2017-07-04  6:34 ` [PATCH 3/9] net, ipv6: convert inet6_ifaddr.refcnt " Elena Reshetova
2017-07-04  6:34 ` [PATCH 4/9] net, ipv6: convert ifmcaddr6.mca_refcnt " Elena Reshetova
2017-07-04  6:34 ` [PATCH 5/9] net, ipv6: convert ifacaddr6.aca_refcnt " Elena Reshetova
2017-07-04  6:34 ` [PATCH 6/9] net, ipv6: convert xfrm6_tunnel_spi.refcnt " Elena Reshetova
2017-07-04  6:35 ` [PATCH 7/9] net, ipv6: convert ip6addrlbl_entry.refcnt " Elena Reshetova
2017-07-04  6:35 ` [PATCH 8/9] net, ipv4: convert cipso_v4_doi.refcount " Elena Reshetova
2017-07-04  6:35 ` [PATCH 9/9] net, ipv4: convert fib_info.fib_clntref " Elena Reshetova
2017-07-04  8:39 ` [PATCH 0/9] v2 ipv4/ipv6 refcount conversions David Miller
  -- strict thread matches above, loose matches on Subject: below --
2017-03-16 18:23 [PATCH 0/9] net, ipv4, ipv6 refcounter conversions Elena Reshetova
2017-03-16 18:23 ` [PATCH 8/9] net, ipv4: convert cipso_v4_doi.refcount from atomic_t to refcount_t Elena Reshetova

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).