Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Apr 1999 00:08:17 +0900
From:      Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
To:        gallatin@cs.duke.edu
Cc:        simokawa@FreeBSD.ORG, freebsd-alpha@FreeBSD.ORG
Subject:   Re: new sigbus sysctls
Message-ID:  <14099.24033.444968.89342C@ett.sat.t.u-tokyo.ac.jp>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
At Tue, 13 Apr 1999 10:49:36 -0400 (EDT),
Andrew Gallatin <gallatin@cs.duke.edu> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14099.24033.444968.89342C>