From owner-freebsd-alpha Tue Apr 13 8:10:54 1999 Delivered-To: freebsd-alpha@freebsd.org Received: from gate.keisu.t.u-tokyo.ac.jp (ns06.t.u-tokyo.ac.jp [133.11.68.1]) by hub.freebsd.org (Postfix) with SMTP id 52D1415269 for ; Tue, 13 Apr 1999 08:10:51 -0700 (PDT) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: (qmail 64674 invoked from network); 13 Apr 1999 15:08:32 -0000 Received: from sylph.sat.t.u-tokyo.ac.jp (10.6.1.20) by ns06.t.u-tokyo.ac.jp with SMTP; 13 Apr 1999 15:08:32 -0000 Received: from ett.sat.t.u-tokyo.ac.jp (ett.sat.t.u-tokyo.ac.jp [10.6.1.30]) by sylph.sat.t.u-tokyo.ac.jp (Postfix) with ESMTP id DA6ED2DAAF; Wed, 14 Apr 1999 00:08:31 +0900 (JST) Received: from ett.sat.t.u-tokyo.ac.jp by ett.sat.t.u-tokyo.ac.jp (8.9.2/sat-V0.6) id AAA70151; Wed, 14 Apr 1999 00:08:18 +0900 (JST) Date: Wed, 14 Apr 1999 00:08:17 +0900 Message-ID: <14099.24033.444968.89342C@ett.sat.t.u-tokyo.ac.jp> From: Hidetoshi Shimokawa To: gallatin@cs.duke.edu Cc: simokawa@FreeBSD.ORG, freebsd-alpha@FreeBSD.ORG Subject: Re: new sigbus sysctls In-Reply-To: In your message of "Tue, 13 Apr 1999 10:49:36 -0400 (EDT)" <14099.22168.564896.120284@grasshopper.cs.duke.edu> References: <14099.22168.564896.120284@grasshopper.cs.duke.edu> User-Agent: Wanderlust/0.9.7 (Everything She Wants) SEMI/1.13.2 (Mikawa) FLIM/1.12.5 (Hirahata) MULE XEmacs/21.2 (beta9) (Athena) (i386-unknown-freebsd3.1) X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7:#j7i14gu$ jgR\S*&C3R/pJX wrote: > > > It is good to see the new unaligned access handling sysctl's! > However, I don't think they are being initialized the way you > intended.. On a freshly booted system: > > broil# sysctl -a | grep unaligned > machdep.unaligned_print: 0 > machdep.unaligned_fix: 0 > machdep.unaligned_sigbus: 0 > > I'm not sure why unaligned_print & unaligned_fix are off (I suspect > they aren't really being initialized). Having them off causes ypbind to die > with a bus error.. For now, I've initialized them in the variable > declarations to restore the previous behaviour. Oops, sorry. In my running kernel, they are initialized, but I removed it just before I commit it because I thought SYSCTL_INT will initialize them X-<. It must be wrong. I will commit the fix to restore previous behaviour. I have ypbind patch, I should commit this too... /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: finger -l simokawa@sat.t.u-tokyo.ac.jp Index: ypbind.c =================================================================== RCS file: /pub/FreeBSD-CVS/src/usr.sbin/ypbind/ypbind.c,v retrieving revision 1.28 diff -u -r1.28 ypbind.c --- ypbind.c 1999/02/10 20:04:22 1.28 +++ ypbind.c 1999/02/11 13:08:06 @@ -230,7 +230,7 @@ res.ypbind_status = YPBIND_SUCC_VAL; res.ypbind_resp_u.ypbind_error = 0; /* Success */ - *(u_long *)&res.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_addr = + *(u_int32_t *)&res.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_addr = ypdb->dom_server_addr.sin_addr.s_addr; *(u_short *)&res.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_port = ypdb->dom_server_addr.sin_port; @@ -283,7 +283,7 @@ bzero((char *)&bindsin, sizeof bindsin); bindsin.sin_family = AF_INET; - bindsin.sin_addr.s_addr = *(u_long *)argp->ypsetdom_binding.ypbind_binding_addr; + bindsin.sin_addr.s_addr = *(u_int32_t *)argp->ypsetdom_binding.ypbind_binding_addr; bindsin.sin_port = *(u_short *)argp->ypsetdom_binding.ypbind_binding_port; rpc_received(argp->ypsetdom_domain, &bindsin, 1); @@ -946,7 +946,7 @@ bzero(&ybr, sizeof ybr); ybr.ypbind_status = YPBIND_SUCC_VAL; - *(u_long *)&ybr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_addr = raddrp->sin_addr.s_addr; + *(u_int32_t *)&ybr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_addr = raddrp->sin_addr.s_addr; *(u_short *)&ybr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_port = raddrp->sin_port; if( writev(ypdb->dom_lockfd, iov, 2) != iov[0].iov_len + iov[1].iov_len) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message