linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] Segfault of UML-TT on FC1
@ 2004-02-16  7:25 Pete Zaitcev
  2004-02-16  7:47 ` Steven Pritchard
  2004-02-16  7:50 ` [uml-devel] " Ingo Molnar
  0 siblings, 2 replies; 6+ messages in thread
From: Pete Zaitcev @ 2004-02-16  7:25 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: zaitcev, mingo, jdike

Hi:

I'm trying to run uml-patch-2.6.3-rc2-1 under Fedora Core 1, kernel
2.4.22-1.2149.nptl, glibc 2.3.2-101.1. The uml runs in TT mode (FC1 doesn't
have SKAS) and segfaults while trying to do
 remap_data(UML_ROUND_DOWN(&__bss_start), UML_ROUND_UP(brk_start), 1);

The reason is the hole between BSS and heap on my system. If I run
with gdb and break at main(), an instance of uml looks like this:

[zaitcev@niphredil linux-2.6.3-rc2-uml-1-t1]$ cat /proc/22415/maps
a0000000-a01c6000 rwxp 00000000 03:04 442599     /q/zaitcev/uml/linux-2.6.3-rc2-uml-1-t1
a01c6000-a0294000 rw-p 00000000 00:00 0
a1f12000-a1f33000 rw-p 00000000 00:00 0
bff58000-c0000000 rwxp fff9f000 00:00 0
[zaitcev@niphredil linux-2.6.3-rc2-uml-1-t1]$

The &__bss_start at this point is a01c6000, abd brk_start is a1f33000,
and so memcpy segfaults when it steps on the hole.

Does anyone have a suggestion what to do about this?

-- Pete


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [uml-devel] Segfault of UML-TT on FC1
  2004-02-16  7:25 [uml-devel] Segfault of UML-TT on FC1 Pete Zaitcev
@ 2004-02-16  7:47 ` Steven Pritchard
  2004-02-16  7:50 ` [uml-devel] " Ingo Molnar
  1 sibling, 0 replies; 6+ messages in thread
From: Steven Pritchard @ 2004-02-16  7:47 UTC (permalink / raw)
  To: Pete Zaitcev; +Cc: user-mode-linux-devel, mingo, jdike

On Sun, Feb 15, 2004 at 11:25:25PM -0800, Pete Zaitcev wrote:
> I'm trying to run uml-patch-2.6.3-rc2-1 under Fedora Core 1, kernel
> 2.4.22-1.2149.nptl, glibc 2.3.2-101.1. The uml runs in TT mode (FC1 doesn't
> have SKAS) and segfaults while trying to do
>  remap_data(UML_ROUND_DOWN(&__bss_start), UML_ROUND_UP(brk_start), 1);

Isn't this the exec-shield bug?

  http://toast.debian.net/~may/umlproject/bugs.html

It runs fine just using "i386".

Steve
-- 
Steven Pritchard - K&S Pritchard Enterprises, Inc.
Email: steve@kspei.com             http://www.kspei.com/
Phone: (618)398-7360               Mobile: (618)567-7320


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [uml-devel] Re: Segfault of UML-TT on FC1
  2004-02-16  7:25 [uml-devel] Segfault of UML-TT on FC1 Pete Zaitcev
  2004-02-16  7:47 ` Steven Pritchard
@ 2004-02-16  7:50 ` Ingo Molnar
  2004-02-16 19:32   ` M A Young
  2004-02-16 20:27   ` Jeff Dike
  1 sibling, 2 replies; 6+ messages in thread
From: Ingo Molnar @ 2004-02-16  7:50 UTC (permalink / raw)
  To: Pete Zaitcev; +Cc: user-mode-linux-devel, jdike


On Sun, 15 Feb 2004, Pete Zaitcev wrote:

> The &__bss_start at this point is a01c6000, abd brk_start is a1f33000,
> and so memcpy segfaults when it steps on the hole.
> 
> Does anyone have a suggestion what to do about this?

the workaround is to install the setarch rpm, and then do:

	i386 ./linux <args>

(but it would be nice to find the brk assumption in UML and change it to
work with the FC1 brk changes.)

	Ingo


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [uml-devel] Re: Segfault of UML-TT on FC1
  2004-02-16  7:50 ` [uml-devel] " Ingo Molnar
@ 2004-02-16 19:32   ` M A Young
  2004-02-17 17:10     ` Jeff Dike
  2004-02-16 20:27   ` Jeff Dike
  1 sibling, 1 reply; 6+ messages in thread
From: M A Young @ 2004-02-16 19:32 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Pete Zaitcev, user-mode-linux-devel, jdike

On Mon, 16 Feb 2004, Ingo Molnar wrote:

> On Sun, 15 Feb 2004, Pete Zaitcev wrote:
>
> > The &__bss_start at this point is a01c6000, abd brk_start is a1f33000,
> > and so memcpy segfaults when it steps on the hole.
> >
> > Does anyone have a suggestion what to do about this?
>
> the workaround is to install the setarch rpm, and then do:
>
> 	i386 ./linux <args>
>
> (but it would be nice to find the brk assumption in UML and change it to
> work with the FC1 brk changes.)

See
http://marc.theaimsgroup.com/?l=user-mode-linux-devel&m=107564046216529&w=2
The first two segments of the patch there are in the latest 2.4 uml kernel
patch. The problem is that for exec-shield the program area and data
segment aren't adjacent. The remaining issue which the final part
addresses is that a later routine that reserves area to act as physical
memory still assumes the areas are adjacent, and you get a random amount
less memory reserved than you expect (something like 16M), and this might
not leave you with enough memory to use.

	Michael Young


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [uml-devel] Re: Segfault of UML-TT on FC1
  2004-02-16  7:50 ` [uml-devel] " Ingo Molnar
  2004-02-16 19:32   ` M A Young
@ 2004-02-16 20:27   ` Jeff Dike
  1 sibling, 0 replies; 6+ messages in thread
From: Jeff Dike @ 2004-02-16 20:27 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Pete Zaitcev, user-mode-linux-devel

mingo@redhat.com said:
> (but it would be nice to find the brk assumption in UML and change it
> to work with the FC1 brk changes.) 

I believe it has, and I believe it's fixed in the 2.4 release I made yesterday.

				Jeff



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [uml-devel] Re: Segfault of UML-TT on FC1
  2004-02-16 19:32   ` M A Young
@ 2004-02-17 17:10     ` Jeff Dike
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Dike @ 2004-02-17 17:10 UTC (permalink / raw)
  To: M A Young; +Cc: Ingo Molnar, Pete Zaitcev, user-mode-linux-devel

m.a.young@durham.ac.uk said:
> The remaining issue which the final part addresses is that a later
> routine that reserves area to act as physical memory still assumes the
> areas are adjacent, and you get a random amount less memory reserved
> than you expect (something like 16M), and this might not leave you
> with enough memory to use.

The space is non-zero even on a non-exec-shield system, probably because some
mallocing has pushed the brk across a page boundary.  So I changed it to add
memory only if it's > 1M, and also added a printf saying what's happening.

				Jeff



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-02-17 16:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-16  7:25 [uml-devel] Segfault of UML-TT on FC1 Pete Zaitcev
2004-02-16  7:47 ` Steven Pritchard
2004-02-16  7:50 ` [uml-devel] " Ingo Molnar
2004-02-16 19:32   ` M A Young
2004-02-17 17:10     ` Jeff Dike
2004-02-16 20:27   ` Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox