Date: Wed, 26 Feb 2003 08:01:01 -0300 From: "Daniel C. Sobral" <dcs@tcoip.com.br> To: Robert Watson <rwatson@freebsd.org> Cc: current@freebsd.org Subject: Re: mac_mls still panics Message-ID: <3E5C9E6D.5040309@tcoip.com.br> In-Reply-To: <Pine.NEB.3.96L.1030225140317.88812B-100000@fledge.watson.org> References: <Pine.NEB.3.96L.1030225140317.88812B-100000@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Robert Watson wrote: > Question on both of these: could you inspect the struct ifnet pointer o= n > the mbuf and see what interface they originated from? Also, the dumps = are > still showing NULL local variables where it should not be possible -- = does > manual inspection of the variables in the debugger reveal different=20 values > (ifnetlabel, mbuflabel, etc). You might want to see if compiling=20 with -O0 Doesn't make much sense to me. Mmmmm. Well, have a peek: (kgdb) up 10 #10 0xc0278d16 in mac_mls_check_ifnet_transmit (ifnet=3D0xc25ebc00,=20 ifnetlabel=3D0x0, m=3D0xc0ee1800, mbuflabel=3D0x0) at /usr/src/sys/security/mac_mls/mac_mls.c:1462 1462 return (mac_mls_single_in_range(p, i) ? 0 : EACCES); (kgdb) p/x *ifnet $1 =3D {if_softc =3D 0xc25ebc00, if_name =3D 0xc031d9bb, if_link =3D {tqe= _next =3D=20 0xc25cde00, tqe_prev =3D 0xc0362f94}, if_addrhead =3D {tqh_first =3D 0xc2608400, tqh_last =3D 0xc2608e60},=20 if_klist =3D {slh_first =3D 0x0}, if_pcount =3D 0x0, if_bpf =3D 0x0, if_index =3D 0x1, if_unit =3D 0x0, = if_timer =3D 0x0, if_nvlans =3D 0x0, if_flags =3D 0x8843, if_capabilities =3D 0x8, if_capenable =3D 0x0,=20 if_ipending =3D 0x0, if_linkmib =3D 0x0, if_linkmiblen =3D 0x0, if_data =3D {ifi_type =3D 0x6, ifi_physical =3D= 0x0,=20 ifi_addrlen =3D 0x6, ifi_hdrlen =3D 0x12, ifi_recvquota =3D 0x0, ifi_xmitquota =3D 0x0, ifi_mtu =3D 0x5dc,=20 ifi_metric =3D 0x0, ifi_baudrate =3D 0x5f5e100, ifi_ipackets =3D 0x10b22, ifi_ierrors =3D 0x0, ifi_opackets =3D 0x66= 3,=20 ifi_oerrors =3D 0x0, ifi_collisions =3D 0x0, ifi_ibytes =3D 0x9ef12c, ifi_obytes =3D 0x1be94, ifi_imcasts =3D 0x1= 0201,=20 ifi_omcasts =3D 0x0, ifi_iqdrops =3D 0x0, ifi_noproto =3D 0x0, ifi_hwassist =3D 0x0, ifi_unused =3D 0x0,=20 ifi_lastchange =3D {tv_sec =3D 0x0, tv_usec =3D 0x0}}, if_multiaddrs =3D {tqh_first =3D 0xc25c8640, tqh_last =3D 0xc25c8620},= =20 if_amcount =3D 0x0, if_output =3D 0xc02527e0, if_input =3D 0xc0252fb0, if_start =3D 0xc014b430, if_done =3D 0x0, if_= ioctl=20 =3D 0xc014d570, if_watchdog =3D 0xc014c140, if_poll_recv =3D 0x0, if_poll_xmit =3D 0x0= ,=20 if_poll_intren =3D 0x0, if_poll_slowinput =3D 0x0, if_init =3D 0xc014c180, if_resolvemulti =3D= =20 0xc02537e0, if_snd =3D {ifq_head =3D 0x0, ifq_tail =3D 0x0, ifq_len =3D 0x0, ifq_maxlen =3D 0x7f, ifq_drops =3D= 0x0,=20 ifq_mtx =3D {mtx_object =3D { lo_class =3D 0xc035ab00, lo_name =3D 0xc031d9bb, lo_type =3D=20 0xc03339a6, lo_flags =3D 0x30000, lo_list =3D { tqe_next =3D 0xc260847c, tqe_prev =3D 0xc25d7274}, lo_witness = =3D=20 0xc038c700}, mtx_lock =3D 0x4, mtx_recurse =3D 0x0, mtx_blocked =3D {tqh_first =3D 0x0, tqh_last = =3D=20 0xc25ebd08}, mtx_contested =3D { le_next =3D 0x0, le_prev =3D 0x0}}}, if_poll_slowq =3D 0x0,=20 if_prefixhead =3D {tqh_first =3D 0x0, tqh_last =3D 0xc25ebd1c}, if_broadcastaddr =3D 0xc0362fc0, if_label = =3D=20 {l_flags =3D 0x1, l_perpolicy =3D {{ l_ptr =3D 0xc218b120, l_long =3D 0xc218b120}, {l_ptr =3D 0xc2605= e80,=20 l_long =3D 0xc2605e80}, { l_ptr =3D 0xc2605f00, l_long =3D 0xc2605f00}, {l_ptr =3D 0x0, l_= long=20 =3D 0x0}}}} (kgdb) p ifnetlabel $2 =3D (struct label *) 0x0 (kgdb) p mbuflabel $3 =3D (struct label *) 0x0 (kgdb) up #11 0xc01dad8a in mac_check_ifnet_transmit (ifnet=3D0xc25ebc00,=20 mbuf=3D0xc0ee1800) at /usr/src/sys/kern/kern_mac.c:2269 2269 &mbuf->m_pkthdr.label); (kgdb) p/x *ifnet $4 =3D {if_softc =3D 0xc25ebc00, if_name =3D 0xc031d9bb, if_link =3D {tqe= _next =3D=20 0xc25cde00, tqe_prev =3D 0xc0362f94}, if_addrhead =3D {tqh_first =3D 0xc2608400, tqh_last =3D 0xc2608e60},=20 if_klist =3D {slh_first =3D 0x0}, if_pcount =3D 0x0, if_bpf =3D 0x0, if_index =3D 0x1, if_unit =3D 0x0, = if_timer =3D 0x0, if_nvlans =3D 0x0, if_flags =3D 0x8843, if_capabilities =3D 0x8, if_capenable =3D 0x0,=20 if_ipending =3D 0x0, if_linkmib =3D 0x0, if_linkmiblen =3D 0x0, if_data =3D {ifi_type =3D 0x6, ifi_physical =3D= 0x0,=20 ifi_addrlen =3D 0x6, ifi_hdrlen =3D 0x12, ifi_recvquota =3D 0x0, ifi_xmitquota =3D 0x0, ifi_mtu =3D 0x5dc,=20 ifi_metric =3D 0x0, ifi_baudrate =3D 0x5f5e100, ifi_ipackets =3D 0x10b22, ifi_ierrors =3D 0x0, ifi_opackets =3D 0x66= 3,=20 ifi_oerrors =3D 0x0, ifi_collisions =3D 0x0, ifi_ibytes =3D 0x9ef12c, ifi_obytes =3D 0x1be94, ifi_imcasts =3D 0x1= 0201,=20 ifi_omcasts =3D 0x0, ifi_iqdrops =3D 0x0, ifi_noproto =3D 0x0, ifi_hwassist =3D 0x0, ifi_unused =3D 0x0,=20 ifi_lastchange =3D {tv_sec =3D 0x0, tv_usec =3D 0x0}}, if_multiaddrs =3D {tqh_first =3D 0xc25c8640, tqh_last =3D 0xc25c8620},= =20 if_amcount =3D 0x0, if_output =3D 0xc02527e0, if_input =3D 0xc0252fb0, if_start =3D 0xc014b430, if_done =3D 0x0, if_= ioctl=20 =3D 0xc014d570, if_watchdog =3D 0xc014c140, if_poll_recv =3D 0x0, if_poll_xmit =3D 0x0= ,=20 if_poll_intren =3D 0x0, if_poll_slowinput =3D 0x0, if_init =3D 0xc014c180, if_resolvemulti =3D= =20 0xc02537e0, if_snd =3D {ifq_head =3D 0x0, ifq_tail =3D 0x0, ifq_len =3D 0x0, ifq_maxlen =3D 0x7f, ifq_drops =3D= 0x0,=20 ifq_mtx =3D {mtx_object =3D { lo_class =3D 0xc035ab00, lo_name =3D 0xc031d9bb, lo_type =3D=20 0xc03339a6, lo_flags =3D 0x30000, lo_list =3D { tqe_next =3D 0xc260847c, tqe_prev =3D 0xc25d7274}, lo_witness = =3D=20 0xc038c700}, mtx_lock =3D 0x4, mtx_recurse =3D 0x0, mtx_blocked =3D {tqh_first =3D 0x0, tqh_last = =3D=20 0xc25ebd08}, mtx_contested =3D { le_next =3D 0x0, le_prev =3D 0x0}}}, if_poll_slowq =3D 0x0,=20 if_prefixhead =3D {tqh_first =3D 0x0, tqh_last =3D 0xc25ebd1c}, if_broadcastaddr =3D 0xc0362fc0, if_label = =3D=20 {l_flags =3D 0x1, l_perpolicy =3D {{ l_ptr =3D 0xc218b120, l_long =3D 0xc218b120}, {l_ptr =3D 0xc2605= e80,=20 l_long =3D 0xc2605e80}, { l_ptr =3D 0xc2605f00, l_long =3D 0xc2605f00}, {l_ptr =3D 0x0, l_= long=20 =3D 0x0}}}} (kgdb) p/x *mbuf $5 =3D {m_hdr =3D {mh_next =3D 0x0, mh_nextpkt =3D 0x0, mh_data =3D 0xc0e= e1854,=20 mh_len =3D 0x34, mh_flags =3D 0x2, mh_type =3D 0x2}, M_dat =3D {MH =3D {MH_pkthdr =3D {rcvif =3D 0x0, l= en =3D=20 0x34, header =3D 0x0, csum_flags =3D 0x0, csum_data =3D 0x10, tags =3D {slh_first =3D 0x0}, label =3D {l_f= lags =3D=20 0x1, l_perpolicy =3D {{ l_ptr =3D 0xbbefa5bb, l_long =3D 0xbbefa5bb}, {l_ptr =3D=20 0xc2e5c000, l_long =3D 0xc2e5c000}, { l_ptr =3D 0xc3410580, l_long =3D 0xc3410580}, {l_ptr =3D 0= x0,=20 l_long =3D 0x0}}}}, MH_dat =3D {MH_ext =3D { ext_buf =3D 0xc138c000, ext_free =3D 0x0, ext_args =3D 0x0,=20 ext_size =3D 0x800, ref_cnt =3D 0x34001045, ext_type =3D 0x6606}, MH_databuf =3D {0x0, 0xc0, 0x38, 0xc1, 0= x0,=20 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x45, 0x10, 0x0, 0x34, 0x6, 0x66, 0x0,=20 0x0, 0x40, 0x6, 0xa1, 0x93, 0xa, 0x0, 0x2, 0x6, 0xc0, 0xa8, 0x6, 0xd, 0xc0, 0x3, 0x0, 0x16, 0xd1,=20 0x2b, 0x3, 0xdc, 0xa0, 0x42, 0xca, 0xfe, 0x80, 0x10, 0x82, 0x17, 0x20, 0x46, 0x0, 0x0, 0x1, 0x1, 0x8,=20 0xa, 0x0, 0x36, 0xf9, 0x6f, 0x0, 0x95, 0x7, 0x7, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x3c, 0x83, = 0xe, 0x29, 0xc, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x48, 0xf2, 0xbf, 0xbf, 0xa1, 0x92, 0xd, 0x29, = 0x4, 0x0, 0xe0, 0x1, 0x62, 0x1, 0x0, 0x0, 0x3c, 0x32, 0x39, 0x3e, 0x46, 0x65, 0x62, 0x20, 0x32,=20 0x35, 0x20, 0x31, 0x34, 0x3a, 0x31, 0x31, 0x3a, 0x33, 0x37, 0x20, 0x72, 0x6f, 0x6f, 0x74, 0x3a, 0x20,=20 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x61, 0x64, 0x30, 0x73, 0x32, 0x67, 0x3a, 0x20, 0x55, 0x4e, 0x52,=20 0x45, 0x46, 0x20, 0x46, 0x49, 0x4c, 0x45, 0x20, 0x49, 0x3d, 0x31, 0x36, 0x35, 0x35, 0x34, 0x36,=20 0x20, 0x20, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x3d, 0x64, 0x63, 0x73, 0x20, 0x4d, 0x4f, 0x44, 0x45,=20 0x3d, 0x31, 0x30, 0x30, 0x36, 0x30, 0x30, 0xa, 0x0, 0x0}}}, M_databuf =3D {0x0, 0x0, 0x0, 0x0,=20 0x34, 0x0 <repeats 11 times>, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xbb, 0xa5,=20 0xef, 0xbb, 0x0, 0xc0, 0xe5, 0xc2, 0x80, 0x5, 0x41, 0xc3, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0, 0x38, 0xc1, 0x0,=20 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x45, 0x10, 0x0, 0x34,obol. Please modify your programs accordingly. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E5C9E6D.5040309>