Re: i386: Why putting __USER_DS in kernel threads stack initialization?

2007-03-21 Thread Ahmed S. Darwish
On Mon, Mar 19, 2007 at 07:23:25AM -0400, linux-os (Dick Johnson) wrote: > > On Sun, 18 Mar 2007, Ahmed S. Darwish wrote: > > > Hi list, > > > > Reading the kernel threads initialization code I see: > > > > int kernel_thread(...) { > > > > struct pt_regs regs; > > memset(, 0,

Re: i386: Why putting __USER_DS in kernel threads stack initialization?

2007-03-21 Thread Ahmed S. Darwish
On Mon, Mar 19, 2007 at 07:23:25AM -0400, linux-os (Dick Johnson) wrote: On Sun, 18 Mar 2007, Ahmed S. Darwish wrote: Hi list, Reading the kernel threads initialization code I see: int kernel_thread(...) { struct pt_regs regs; memset(regs, 0, sizeof(regs)); [...]

Re: i386: Why putting __USER_DS in kernel threads stack initialization?

2007-03-19 Thread linux-os \(Dick Johnson\)
On Sun, 18 Mar 2007, Ahmed S. Darwish wrote: > Hi list, > > Reading the kernel threads initialization code I see: > > int kernel_thread(...) { > > struct pt_regs regs; > memset(, 0, sizeof(regs)); > [...] > **regs.xds = __USER_DS; > **regs.xes = __USER_DS; > [...]

Re: i386: Why putting __USER_DS in kernel threads stack initialization?

2007-03-19 Thread linux-os \(Dick Johnson\)
On Sun, 18 Mar 2007, Ahmed S. Darwish wrote: Hi list, Reading the kernel threads initialization code I see: int kernel_thread(...) { struct pt_regs regs; memset(regs, 0, sizeof(regs)); [...] **regs.xds = __USER_DS; **regs.xes = __USER_DS; [...]

Re: i386: Why putting __USER_DS in kernel threads stack initialization?

2007-03-18 Thread Ahmed S. Darwish
On Mon, Mar 19, 2007 at 12:58:31AM +0200, ahmed wrote: > > P.S. I've tried commenting out both lines which led to a non functional init, > Also setting them to __USER_DS made init start but stopped issuing the error: > `Panic: Segment violation at 0x8049798 - Sleeping for 30 seconds' > Sorry, I

i386: Why putting __USER_DS in kernel threads stack initialization?

2007-03-18 Thread Ahmed S. Darwish
Hi list, Reading the kernel threads initialization code I see: int kernel_thread(...) { struct pt_regs regs; memset(, 0, sizeof(regs)); [...] ** regs.xds = __USER_DS; ** regs.xes = __USER_DS; [...] /* Ok, create the new process.. */

i386: Why putting __USER_DS in kernel threads stack initialization?

2007-03-18 Thread Ahmed S. Darwish
Hi list, Reading the kernel threads initialization code I see: int kernel_thread(...) { struct pt_regs regs; memset(regs, 0, sizeof(regs)); [...] ** regs.xds = __USER_DS; ** regs.xes = __USER_DS; [...] /* Ok, create the new process.. */

Re: i386: Why putting __USER_DS in kernel threads stack initialization?

2007-03-18 Thread Ahmed S. Darwish
On Mon, Mar 19, 2007 at 12:58:31AM +0200, ahmed wrote: P.S. I've tried commenting out both lines which led to a non functional init, Also setting them to __USER_DS made init start but stopped issuing the error: `Panic: Segment violation at 0x8049798 - Sleeping for 30 seconds' Sorry, I