In D29274#682376, @kp wrote:The locking Tom cites does still need to be fixed, but I think it's mostly okay. The only missing part is the protection of schedlist and aqmlist, and those will probably be better served by NET_EPOCH than by a separate lock. (Because taking the lock in find_sched_type() doesn't protect the struct dn_alg we return from being removed after we release the lock. Being inside NET_EPOCH and waiting to complete the unload until after NET_EPOCH_WAIT should be fine.)
I'll try to post a patch for that later today.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Feed Advanced Search
Advanced Search
Advanced Search
May 21 2021
May 21 2021
May 17 2021
May 17 2021
Just want to note, I'm sorry for long delay, I moved temporary to another project and dummynet overhaul is not done yet. But I plan to publish the code somewhere on guthub.
May 11 2021
May 11 2021
I meant the case fwd tableargs.home.lan:8000.
May 10 2021
May 10 2021
Replacing _substrcmp() with strncmp(,,8) breaks the case, when "tablearg" is part of hostname:port syntax.
May 2 2021
May 2 2021
Apr 30 2021
Apr 30 2021
Apr 28 2021
Apr 28 2021
ae committed rG5ebfa80f7543: ipfw: do not use sleepable malloc in callout context. (authored by ae).
ipfw: do not use sleepable malloc in callout context.
ae committed rG29246f2cb0c5: ipfw: do not use sleepable malloc in callout context. (authored by ae).
ipfw: do not use sleepable malloc in callout context.
Apr 20 2021
Apr 20 2021
Apr 19 2021
Apr 19 2021
In D29378#657837, @markj wrote:I see a call in ipfw, I guess that needs to be updated too. Seems time to introduce a new subroutine to handle this.
Apr 16 2021
Apr 16 2021
ae committed rG9bacbf1ae243: ipfw: do not use sleepable malloc in callout context. (authored by ae).
ipfw: do not use sleepable malloc in callout context.
Apr 15 2021
Apr 15 2021
- Fix copy/paste bug.
Apr 6 2021
Apr 6 2021
ae committed rG38c299fe8562: ipdivert: check that PCB is still valid after taking INPCB_RLOCK. (authored by ae).
ipdivert: check that PCB is still valid after taking INPCB_RLOCK.
ae committed rG6b8c65318e81: ipdivert: check that PCB is still valid after taking INPCB_RLOCK. (authored by ae).
ipdivert: check that PCB is still valid after taking INPCB_RLOCK.
Apr 5 2021
Apr 5 2021
In D29576#663193, @glebius wrote:In D29576#663187, @ae wrote:Imagine, you have two or more identical SYNs, now you use INP_RLOCK(), this means they all can be handled in parallel "in the same time". This means, syncache_add() in some cases can determine that there are no corresponding entries yet - syncache_lookup() returns NULL, we still hold SCH_LOCK(), then we allocate syncache entry, populate all its fields and do SCH_UNLOCK(). Imagine, now the same things will be done by the another thread, and another. In the end we will have several the same entries added by the syncache_insert().
Is this impossible?In this case the second thread will wait in SCH_LOCK and then, once it acquires the lock, syncache_lookup will return entry created by the first thread.
In D29576#663175, @glebius wrote:In D29576#663155, @ae wrote:I doubt that it is enough to just do s/wlock/rlock/ in the syncache code. Usually we need to add the extra check that an entry was not already linked by another thread in such cases.
Nothing changes in the syncache hash locking with this patch. The patch changes to rlock of the listening socket PCB.
I doubt that it is enough to just do s/wlock/rlock/ in the syncache code. Usually we need to add the extra check that an entry was not already linked by another thread in such cases.
Apr 1 2021
Apr 1 2021
Mar 30 2021
Mar 30 2021
ae committed rGc80a4b76ceac: ipdivert: check that PCB is still valid after taking INPCB_RLOCK. (authored by ae).
ipdivert: check that PCB is still valid after taking INPCB_RLOCK.
Mar 25 2021
Mar 25 2021
Mar 19 2021
Mar 19 2021
ae added a reviewer for D29320: Add log() style versions of device_printf() and if_printf(): network.
Mar 16 2021
Mar 16 2021
I think when my work will be ready, I will commit it as separate implementation. Thus you can commit your changes to go forward with your work.
Mar 9 2021
Mar 9 2021
ipfw: add IPv6 support for sockarg opcode.
ipfw: add IPv6 support for sockarg opcode.
Mar 4 2021
Mar 4 2021
LGTM.
ae committed rG952ad2822359: ipfw: make algo name argument optional for some table types (authored by ae).
ipfw: make algo name argument optional for some table types
ae committed rGf8317f3a4c7d: ipfw: make algo name argument optional for some table types (authored by ae).
ipfw: make algo name argument optional for some table types
ae committed rG8d0f1438b0d7: ipfw: make algo name argument optional for some table types (authored by ae).
ipfw: make algo name argument optional for some table types
Mar 3 2021
Mar 3 2021
Hi John,
Mar 2 2021
Mar 2 2021
ae added a comment to D28967: Trim leading/trailing white space in dummynet
Tidy up the leading and trailing white space issues highlighted by vim.
Avoid touching whitespace that is used for layout and the functions which are
entirely space aligned..
I'm working on this code and I think all this changes will be lost in the future, or they will take away my desire to merge changes.
ipfw: add IPv6 support for sockarg opcode.
Feb 26 2021
Feb 26 2021
Feb 25 2021
Feb 25 2021
ae committed rG13ad237a19b7: ipfw: make algo name argument optional for some table types (authored by ae).
ipfw: make algo name argument optional for some table types
Feb 18 2021
Feb 18 2021
Feb 16 2021
Feb 16 2021
[udp6] fix possible panic due to lack of locking.
Feb 15 2021
Feb 15 2021
[udp6] fix possible panic due to lack of locking.
ae committed rG9f46322cad47: [udp] fix possible mbuf and lock leak in udp_input(). (authored by ae).
[udp] fix possible mbuf and lock leak in udp_input().
Feb 11 2021
Feb 11 2021
ae committed rGc6ded47d0bae: [udp] fix possible mbuf and lock leak in udp_input(). (authored by ae).
[udp] fix possible mbuf and lock leak in udp_input().
[udp6] fix possible panic due to lack of locking.
Feb 9 2021
Feb 9 2021
Make locking similar to what we heave for IPv4.
Fix mbuf leaks and lock leaks for error case.
Feb 8 2021
Feb 8 2021
In D27500#638775, @rew wrote:The only a thing a resize operation can do is ensure that the new size is a multiple of the requested alignment and that the new size won't extend into the next partition or past the last sector of the geom.
The last patch seems to have fixed the panic for us. But I have doubts, probably we should take INP_RLOCK just before checking in6p_moptions. Any thoughts?
Let me remind what panic it is targeted to fix:
In D27500#638475, @rew wrote:ae@, thanks for the reply - I looked at g_part_bsd_resize and there’s no reference to using the offset field. The only field it uses is the start field. Let me know if you have any other concerns.
Maybe trasz@ will weigh in - is there anything glaring I’ve overlooked?
Feb 1 2021
Feb 1 2021
Hi, sorry for my silence. I was busy with other tasks, and it seems forget GEOM a bit.
I think you need to test your code with BSD scheme, AFAIR, it uses stripeoffset field.
Jan 27 2021
Jan 27 2021
Missed one case when PCB could be unlocked before check - when PCB is
already dying and imo is NULL. Also remove extra IN6_IS_ADDR_MULTICAST(),
we already checked it few lines before.
Jan 21 2021
Jan 21 2021
ae added reviewers for D28232: Fix possible panic in udp6_input() due to lack of locking.: mjg, kib.
Jan 19 2021
Jan 19 2021
In D28232#631463, @gnn wrote:Yup, I understand that we do not currently have that function. I think you ought to add that as part of this fix.
Before epochification we had an integer variable that was used to track locking.
#define UH_WLOCKED 2 #define UH_RLOCKED 1 #define UH_UNLOCKED 0
And currently rwlock doesn't provide public function or macro similar to rw_wowned() for shared lock.
I have some doubts, that this change is safe. But probably we will see the result quickly.
If you tested the change and it works for you, I have no objection.
ae retitled D28232: Fix possible panic in udp6_input() due to lack of locking. from Fix pissible panic in udp6_input() due to lack of locking. to Fix possible panic in udp6_input() due to lack of locking..
Jan 18 2021
Jan 18 2021
ae added reviewers for D28200: Set MAC to broadcast when pinging 255.255.255.255 as noted in RFC919: tuexen, bz.
We already have IP_SENDONES flag for ip_output, that should serve for this purpose. Maybe is it not safe enough to allow this feature for all protocols?
Jan 16 2021
Jan 16 2021
I think the patch in D28187 is better. You need to release reference to SP when error occurs before ipsec4_process_packet().
It seems part of this is already in D28160
Dec 13 2020
Dec 13 2020
- Add myself to authors.ent
- Add myself to developers.sgml
Nov 18 2020
Nov 18 2020
Nov 16 2020
Nov 16 2020
It seems I found how to reproduce it on test system:
- Load systemt without any unneeded modules
- kldload dtraceall
- Run
# dtrace -n 'fbt::ip_input:entry { printf("%s", stringof(args[0]->m_pkthdr.rcvif->if_xname)); }' dtrace: description 'fbt::ip_input:entry ' matched 1 probe CPU ID FUNCTION:NAME 2 49220 ip_input:entry ix0 2 49220 ip_input:entry ix0 6 49220 ip_input:entry ix0 ^C # kldunload dtraceall # kldload ipfw # kldload dtraceall # dtrace -n 'fbt::ip_input:entry { printf("%s", stringof(args[0]->m_pkthdr.rcvif->if_xname)); }' dtrace: invalid probe specifier fbt::ip_input:entry { printf("%s", stringof(args[0]->m_pkthdr.rcvif->if_xname)); }: in action list: m_pkthdr is not a member of struct mbuf
Recently I faced with this problem on some machines:
# dtrace -n 'fbt::ip_input:entry { printf("%s", stringof(args[0]->m_pkthdr.rcvif->if_xname)); }' dtrace: invalid probe specifier fbt::ip_input:entry { printf("%s", stringof(args[0]->m_pkthdr.rcvif->if_xname)); }: in action list: m_pkthdr is not a member of struct mbuf
Nov 13 2020
Nov 13 2020
Nov 12 2020
Nov 12 2020
Nov 11 2020
Nov 11 2020
Fix possible NULL pointer dereference.
Nov 10 2020
Nov 10 2020
MFC r366908 (modified for stable/12 KBI):
Oct 29 2020
Oct 29 2020
Oct 21 2020
Oct 21 2020
Add dtrace SDT probe ipfw:::rule-matched.
In D26879#599390, @gnn wrote:I like the idea of this change but I believe that a new file should be created in netpfil/ipfw to contain the code that's been put into in_kdtrace.[ch] in this review.
Move provider and probe definitions into ipfw2.c
Oct 20 2020
Oct 20 2020
In D26879#599390, @gnn wrote:I like the idea of this change but I believe that a new file should be created in netpfil/ipfw to contain the code that's been put into in_kdtrace.[ch] in this review.
Oct 17 2020
Oct 17 2020
LGTM. However it would be nice, if you consider my comments :)
It seems the only solution here is taking ifnet reference. I'm not sure about PCB, probably it can not disappear here.
Oct 16 2020
Oct 16 2020
Oct 14 2020
Oct 14 2020
Oct 13 2020
Oct 13 2020
ae committed rS366682: Join to AllHosts multicast group again when adding an existing IPv4 address..
Join to AllHosts multicast group again when adding an existing IPv4 address.