Re: [XNU792.1.5] udp_lock x86 bug?
Re: [XNU792.1.5] udp_lock x86 bug?
- Subject: Re: [XNU792.1.5] udp_lock x86 bug?
- From: Laurent Dumont <email@hidden>
- Date: Fri, 24 Jun 2005 07:48:52 -0700
Stéphane,
Please file a bug about this.
You may have noticed that support for debugging the socket locking
)available on PPC to keep the link register) is not available in xnu-792.1.5
for x86. The content of those "so_reserved" fields are floating on that
architecture in that kernel.
I'd like to take the opportunity to remind you guys to please do not rely on
these internal structures in any of your kexts, as they WILL change and are
not part of the supported KPIs.
Thanks
Laurent
on 6/24/05 04:35, Stephane Sudre at email@hidden wrote:
> Is there not a bug in udp_lock when it comes to x86 architecture:
>
> int
> udp_lock(so, refcount, debug)
> struct socket *so;
> int refcount, debug;
> {
> int lr_saved;
> #ifdef __ppc__
> if (debug == 0) {
> __asm__ volatile("mflr %0" : "=r" (lr_saved));
> }
> else lr_saved = debug;
> #endif
>
> if (so->so_pcb) {
> lck_mtx_assert(((struct inpcb *)so->so_pcb)->inpcb_mtx,
> LCK_MTX_ASSERT_NOTOWNED);
> lck_mtx_lock(((struct inpcb *)so->so_pcb)->inpcb_mtx);
> }
> else {
> panic("udp_lock: so=%x NO PCB! lr=%x\n", so, lr_saved);
> lck_mtx_assert(so->so_proto->pr_domain->dom_mtx,
> LCK_MTX_ASSERT_NOTOWNED);
> lck_mtx_lock(so->so_proto->pr_domain->dom_mtx);
> }
>
> if (refcount)
> so->so_usecount++;
>
> so->reserved3= lr_saved;
> return (0);
> }
>
> lr_saved is not initialized as far as I can see if __ppc__ is not
> defined.
>
> There's no warning in gcc when building on a x86?
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-kernel mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden