Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jan 1997 18:46:32 -0800
From:      Steven Wallace <swallace@ece.uci.edu>
To:        bugs@freebsd.org
Subject:   exec panic in 2.2 RELENG
Message-ID:  <199701210246.SAA23170@newport.ece.uci.edu>

next in thread | raw e-mail | index | archive | help

I have discovered a problem with 2.2 execing a binary image when
the first page has bad blocks on the media.

For example, I have a CDROM where a file has all its blocks are bad,
so when it execs, the header is mapped, then exec_aout_imgact()
is called and accesses this page, then the system panics because
it faults while in kernel mode.

The problem as I see it is that in execve() we have:

	/*
	 * Map the image header (first page) of the file into
	 *	kernel address space
	 */
	error = vm_mmap(exech_map,			/* map */
			...

I don't know if this call reads that page in from the filesystem.
Apparently it does not.  It should read this page into memory.
If there are any problems, then an error is returned immediately.
We will be accessing this page the next function call anyways,
so we might as well bring it in now.  Also, this allows us to
detect any errors right away.

Please let me know the results of your investigation.  I can test
it out on my bad media for you.

Steven




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