From nobody@FreeBSD.org  Wed May 19 10:51:42 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A3C0F106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 May 2010 10:51:42 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 79F1F8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 May 2010 10:51:42 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o4JApfWY051440
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 May 2010 10:51:41 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o4JApfAj051437;
	Wed, 19 May 2010 10:51:41 GMT
	(envelope-from nobody)
Message-Id: <201005191051.o4JApfAj051437@www.freebsd.org>
Date: Wed, 19 May 2010 10:51:41 GMT
From: Thomas Mueller <tmueller@sysgo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Linux InstallJammer fails to execute on 8-STABLE
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         146726
>Category:       kern
>Synopsis:       [linux] Linux InstallJammer fails to execute on 8-STABLE [regression]
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-emulation
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 19 11:00:15 UTC 2010
>Closed-Date:    Fri Oct 15 15:02:39 UTC 2010
>Last-Modified:  Fri Oct 15 15:02:39 UTC 2010
>Originator:     Thomas Mueller
>Release:        8-STABLE
>Organization:
>Environment:
FreeBSD tom.ulm.sysgo.com 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #9: Wed May 19 11:58:16 CEST 2010     toor@tom.ulm.sysgo.com:/usr/obj/usr/src/sys/TOM  amd64

>Description:
The Linux executable of the InstallJammer multiplatform GUI installer
program (http://www.installjammer.com/) fails to start on a recent
8-STABLE (amd64). A second system with an 8-STABLE kernel built with 
sources from January runs the program just fine.

$ file ./InstallJammer-1.2.14-Linux-x86-Install 
./InstallJammer-1.2.14-Linux-x86-Install: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, stripped
$ sysctl compat.linux.osrelease
compat.linux.osrelease: 2.6.16
$ pkg_info -qo linux_base\*
emulators/linux_base-f10

$ ktrace ./InstallJammer-1.2.14-Linux-x86-Install 
PROT_EXEC|PROT_WRITE failed.

$ linux_kdump -f ktrace.out
 27433 ktrace   RET   linux_brk 0
 27433 ktrace   CALL  linux_olduname(0x7fffffffe8e7,0x7fffffffe630,0x7fffffffe640)
 27433 ktrace   NAMI  "./InstallJammer-1.2.14-Linux-x86-Install"
 27433 InstallJammer-1.2.1 RET   linux_olduname 0
 27433 InstallJammer-1.2.1 CALL  linux_mmap(0xffffd7ac)
 27433 InstallJammer-1.2.1 RET   linux_mmap -1 errno 22 Invalid argument
 27433 InstallJammer-1.2.1 CALL  write(0x2,0xc547d6,0x1d)
 27433 InstallJammer-1.2.1 GIO   fd 2 wrote 29 bytes
       "PROT_EXEC|PROT_WRITE failed.
       "
 27433 InstallJammer-1.2.1 RET   write 29/0x1d
 27433 InstallJammer-1.2.1 CALL  exit(0x7f)

Log messages of a debug-enabled linux.ko:
May 19 11:39:40 tom kernel: linux(24917): mmap(0x00c55000, 4096, 7, 0x00000032, -1, 12931072)
May 19 11:39:40 tom kernel: -> linux_mmap_common(0xc55000, 4096, 7, 0x00001012, -1, 0xc55000)
May 19 11:39:40 tom kernel: -> linux_mmap_common() return: 0x16 (0x00000000)

It appears that the program calls mmap() with MAP_ANON and an 
offset!=0. Reverting the changes in this MFC
   http://svn.freebsd.org/viewvc/base?view=revision&revision=206602
lets me run the program without problems.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-emulation 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri May 21 21:04:17 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=146726 

From: Thomas Mueller <tmueller@sysgo.com>
To: bug-followup@FreeBSD.org, tmueller@sysgo.com
Cc:  
Subject: Re: kern/146726: [linux] Linux InstallJammer fails to execute on
 8-STABLE [regression]
Date: Wed, 13 Oct 2010 14:03:00 +0200

 The problem is no longer visible on a recent STABLE_8.
 =46rom looking at the log message, this commit
   http://svn.freebsd.org/viewvc/base?view=3Drevision&sortby=3Ddate&revision=
 =3D209304
 seems to have solved the issue.
 
 --=20
 Thomas Mueller
State-Changed-From-To: open->closed 
State-Changed-By: bsam 
State-Changed-When: Fri Oct 15 15:01:42 UTC 2010 
State-Changed-Why:  
The problem was solved. Thanks for the report! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=146726 
>Unformatted:
