Re: sys/types.h rev. 1.33 breaks ps etc. on alpha
In message xfmail.990516133947@polstra.com, John Polstra writes: Revision 1.33 of src/sys/types.h, which changed dev_t to a void * in the kernel, breaks ps and a bunch of other things on the alpha. Since dev_t now has a different size in the kernel than in userland, ps and friends get a proc size mismatch. Uhm... Ahh... change #define udev_t dev_t to typedef void*dev_t; and tell me how much that breaks... -- Poul-Henning Kamp FreeBSD coreteam member p...@freebsd.org Real hackers run -current on their laptop. FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: sys/types.h rev. 1.33 breaks ps etc. on alpha
On Mon, 17 May 1999, Poul-Henning Kamp wrote: In message xfmail.990516133947@polstra.com, John Polstra writes: Revision 1.33 of src/sys/types.h, which changed dev_t to a void * in the kernel, breaks ps and a bunch of other things on the alpha. Since dev_t now has a different size in the kernel than in userland, ps and friends get a proc size mismatch. Uhm... Ahh... change #define udev_t dev_t to typedef void*dev_t; and tell me how much that breaks... If we define udev_t as a uintptr_t then they will both be the same size. -- Doug Rabson Mail: d...@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: sys/types.h rev. 1.33 breaks ps etc. on alpha
Try it and tell me if it works... In message pine.bsf.4.05.9905170950150.509-100...@herring.nlsystems.com, Doug Rabson writes: On Mon, 17 May 1999, Poul-Henning Kamp wrote: In message xfmail.990516133947@polstra.com, John Polstra writes: Revision 1.33 of src/sys/types.h, which changed dev_t to a void * in the kernel, breaks ps and a bunch of other things on the alpha. Since dev_t now has a different size in the kernel than in userland, ps and friends get a proc size mismatch. Uhm... Ahh... change #define udev_t dev_t to typedef void*dev_t; and tell me how much that breaks... If we define udev_t as a uintptr_t then they will both be the same size. -- Doug RabsonMail: d...@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 -- Poul-Henning Kamp FreeBSD coreteam member p...@freebsd.org Real hackers run -current on their laptop. FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: sys/types.h rev. 1.33 breaks ps etc. on alpha
On Mon, 17 May 1999, Poul-Henning Kamp wrote: Try it and tell me if it works... Not good so far. In my test kernel which defines udev_t as uintptr_t, sh faults when init tries to go multiuser. -- Doug Rabson Mail: d...@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: sys/types.h rev. 1.33 breaks ps etc. on alpha
In message pine.bsf.4.05.9905171113530.509-100...@herring.nlsystems.com, Doug Rabson writes: On Mon, 17 May 1999, Poul-Henning Kamp wrote: Try it and tell me if it works... Not good so far. In my test kernel which defines udev_t as uintptr_t, sh faults when init tries to go multiuser. I'm worried about the sign extension from 32 to 64 bits... -- Poul-Henning Kamp FreeBSD coreteam member p...@freebsd.org Real hackers run -current on their laptop. FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: sys/types.h rev. 1.33 breaks ps etc. on alpha
On Mon, 17 May 1999, Poul-Henning Kamp wrote: In message pine.bsf.4.05.9905171113530.509-100...@herring.nlsystems.com, Doug Rabson writes: On Mon, 17 May 1999, Poul-Henning Kamp wrote: Try it and tell me if it works... Not good so far. In my test kernel which defines udev_t as uintptr_t, sh faults when init tries to go multiuser. I'm worried about the sign extension from 32 to 64 bits... I haven't been able to diagnose the problem yet but I don't think its sign extension since uintptr_t is an unsigned type. -- Doug Rabson Mail: d...@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: sys/types.h rev. 1.33 breaks ps etc. on alpha
In message pine.bsf.4.05.9905171142070.509-100...@herring.nlsystems.com, Doug Rabson writes: On Mon, 17 May 1999, Poul-Henning Kamp wrote: In message pine.bsf.4.05.9905171113530.509-100...@herring.nlsystems.com, Doug Rabson writes: On Mon, 17 May 1999, Poul-Henning Kamp wrote: Try it and tell me if it works... Not good so far. In my test kernel which defines udev_t as uintptr_t, sh faults when init tries to go multiuser. I'm worried about the sign extension from 32 to 64 bits... I haven't been able to diagnose the problem yet but I don't think its sign extension since uintptr_t is an unsigned type. Lots of places fiddle minor/major in ints... -- Poul-Henning Kamp FreeBSD coreteam member p...@freebsd.org Real hackers run -current on their laptop. FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: sys/types.h rev. 1.33 breaks ps etc. on alpha
On Mon, 17 May 1999, Poul-Henning Kamp wrote: In message pine.bsf.4.05.9905171142070.509-100...@herring.nlsystems.com, Doug Rabson writes: On Mon, 17 May 1999, Poul-Henning Kamp wrote: In message pine.bsf.4.05.9905171113530.509-100...@herring.nlsystems.com, Doug Rabson writes: On Mon, 17 May 1999, Poul-Henning Kamp wrote: Try it and tell me if it works... Not good so far. In my test kernel which defines udev_t as uintptr_t, sh faults when init tries to go multiuser. I'm worried about the sign extension from 32 to 64 bits... I haven't been able to diagnose the problem yet but I don't think its sign extension since uintptr_t is an unsigned type. Lots of places fiddle minor/major in ints... This alternative patch seems to fix things (and its probably more correct). Index: sys/user.h === RCS file: /home/ncvs/src/sys/sys/user.h,v retrieving revision 1.20 diff -u -r1.20 user.h --- user.h 1999/01/26 02:38:11 1.20 +++ user.h 1999/05/17 10:55:26 @@ -74,7 +74,7 @@ pid_t e_ppid; /* parent process id */ pid_t e_pgid; /* process group id */ short e_jobc; /* job control counter */ - dev_t e_tdev; /* controlling tty dev */ + udev_t e_tdev; /* controlling tty dev */ pid_t e_tpgid;/* tty process group id */ struct session *e_tsess; /* tty session pointer */ #defineWMESGLEN7 Index: kern/kern_proc.c === RCS file: /home/ncvs/src/sys/kern/kern_proc.c,v retrieving revision 1.50 diff -u -r1.50 kern_proc.c --- kern_proc.c 1999/05/11 19:54:29 1.50 +++ kern_proc.c 1999/05/17 10:55:17 @@ -443,7 +443,7 @@ if ((p-p_flag P_CONTROLT) (ep-e_sess != NULL) ((tp = ep-e_sess-s_ttyp) != NULL)) { - ep-e_tdev = tp-t_dev; + ep-e_tdev = dev2udev(tp-t_dev); ep-e_tpgid = tp-t_pgrp ? tp-t_pgrp-pg_id : NO_PID; ep-e_tsess = tp-t_session; } else -- Doug Rabson Mail: d...@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: sys/types.h rev. 1.33 breaks ps etc. on alpha
So this is in addition to the uintptr_t definition of udev_t or without it ? Either way, I'll be in Rome for the rest of the week (in all likelyhood that is, the usual last-second gottchas have not been resolved yet :-) so I will not be able to test it myself. So if it works commit it. (If anybody in Rome wants to arrange a FreeBSD pow-wow one of the evenings this week let me know, I'll read email until tomorrow morning) Poul-Henning In message pine.bsf.4.05.9905171207160.509-100...@herring.nlsystems.com, Doug Rabson writes: This alternative patch seems to fix things (and its probably more correct). Index: sys/user.h === RCS file: /home/ncvs/src/sys/sys/user.h,v retrieving revision 1.20 diff -u -r1.20 user.h --- user.h 1999/01/26 02:38:11 1.20 +++ user.h 1999/05/17 10:55:26 @@ -74,7 +74,7 @@ pid_t e_ppid; /* parent process id */ pid_t e_pgid; /* process group id */ short e_jobc; /* job control counter */ - dev_t e_tdev; /* controlling tty dev */ + udev_t e_tdev; /* controlling tty dev */ pid_t e_tpgid;/* tty process group id */ struct session *e_tsess; /* tty session pointer */ #define WMESGLEN7 Index: kern/kern_proc.c === RCS file: /home/ncvs/src/sys/kern/kern_proc.c,v retrieving revision 1.50 diff -u -r1.50 kern_proc.c --- kern_proc.c1999/05/11 19:54:29 1.50 +++ kern_proc.c1999/05/17 10:55:17 @@ -443,7 +443,7 @@ if ((p-p_flag P_CONTROLT) (ep-e_sess != NULL) ((tp = ep-e_sess-s_ttyp) != NULL)) { - ep-e_tdev = tp-t_dev; + ep-e_tdev = dev2udev(tp-t_dev); ep-e_tpgid = tp-t_pgrp ? tp-t_pgrp-pg_id : NO_PID; ep-e_tsess = tp-t_session; } else -- Poul-Henning Kamp FreeBSD coreteam member p...@freebsd.org Real hackers run -current on their laptop. FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: sys/types.h rev. 1.33 breaks ps etc. on alpha
On Mon, 17 May 1999, Poul-Henning Kamp wrote: So this is in addition to the uintptr_t definition of udev_t or without it ? Its instead of it. The e_tdev field seems to be the only dev_t in the structure and since this code is exporting values to userland, it ought to be converting to udev_t I think. -- Doug Rabson Mail: d...@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: sys/types.h rev. 1.33 breaks ps etc. on alpha
In message pine.bsf.4.05.9905171415350.509-100...@herring.nlsystems.com, Doug Rabson writes: On Mon, 17 May 1999, Poul-Henning Kamp wrote: So this is in addition to the uintptr_t definition of udev_t or without it ? Its instead of it. Ok, just wanted to be clear. The e_tdev field seems to be the only dev_t in the structure and since this code is exporting values to userland, it ought to be converting to udev_t I think. Yes, indead it should be udev_t. -- Poul-Henning Kamp FreeBSD coreteam member p...@freebsd.org Real hackers run -current on their laptop. FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message
Re: sys/types.h rev. 1.33 breaks ps etc. on alpha
On Mon, 17 May 1999, Poul-Henning Kamp wrote: In message pine.bsf.4.05.9905171415350.509-100...@herring.nlsystems.com, Doug Rabson writes: On Mon, 17 May 1999, Poul-Henning Kamp wrote: So this is in addition to the uintptr_t definition of udev_t or without it ? Its instead of it. Ok, just wanted to be clear. The e_tdev field seems to be the only dev_t in the structure and since this code is exporting values to userland, it ought to be converting to udev_t I think. Yes, indead it should be udev_t. I'll commit the patch then. -- Doug Rabson Mail: d...@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-current in the body of the message