lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 10 Sep 2007 15:46:28 -0400 From: Vlad Yasevich <vladislav.yasevich@...com> To: netdev@...r.kernel.org Cc: lksctp-developers@...ts.sourceforge.net Subject: [RFC PATH 0/2] Add RCU locking to SCTP address management Hi All This is my first attempt to add RCU synchronization to pieces of SCTP and I want to make sure I do this right. The RCU docs a somewhat outdated, and the calling conventions differ between subsystems, so I am using what I've been able to find. A bit of a background... The whole problem started with a panic that led me to NULL deref while walking a global list of addresses that SCTP maitains. That list is modified curing the NETDEV_UP and NETDEV_DOWN notifier processing and all readers are run in user context. It looks like the list was modified while a user app was walking it and we crashed. Easy enough to fix by adding locking. However, some notifiers (ipv6 addrconf) run in atomic context and it says that they can't sleep. (Q1. Why are ipv6 notifiers atomic, while IPv4 notifires are blocking?) So, I decided to add RCU locking around that list. These events are already synchronized, so no additional locking on the writer side are need, so should be make for a nice RCU conversion. While doing this conversion, I saw that the same structures are used to maintain a list of bound addresses. This seemed like another opportunity to use RCU. In this case, the readers are wide spread, but there are only 2 wirters: BH processing of specific chunks, and bind() calls. Again the writers are already synchronized on the socket lock, so they will keep out of each others way. Readers are widespread, but rcu takes care of that nicely. So, can folks please take a look and make sure I didn't mess up the rcu conventions. Thanks a lot -vlad - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists