From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 2 23:47:30 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B19A216A407 for ; Tue, 2 Jan 2007 23:47:30 +0000 (UTC) (envelope-from admin@intron.ac) Received: from intron.ac (unknown [210.51.165.237]) by mx1.freebsd.org (Postfix) with ESMTP id 4928713C441 for ; Tue, 2 Jan 2007 23:47:30 +0000 (UTC) (envelope-from admin@intron.ac) Received: from localhost (localhost [127.0.0.1]) (uid 1003) by intron.ac with local; Wed, 03 Jan 2007 07:47:28 +0800 id 0011F803.459AEF10.00006EA6 From: "Intron is my alias on the Internet" To: freebsd-hackers@freebsd.org Date: Wed, 03 Jan 2007 07:47:28 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312"; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Mailman-Approved-At: Wed, 03 Jan 2007 00:41:04 +0000 Subject: Partially Unbreak Adobe Reader 7.0.8 for the New Linux Emulator X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 23:47:30 -0000 My patch for /sys/compat/linux/linux_file.c (7.0-CURRENT) can partially unbreak Adobe Reader 7.0.8 for Linux when the sysctl compat.linux.osrelease is set to "2.6.16". You may download the patch at: http://ftp.intron.ac/tmp/linux_file.c.diff But probably to your disappointment, the problem hasn't been completely solved yet. Even after you have applied my patch (Don't forget to set compat.linux.osrelease to "2.6.16"), you must remove the directory ~/.adobe before you start Adobe Reader 7.0.8 every time, otherwise the PDF file cannot be properly browsed. I have noticed that the calling behavior against the Linux system call mmap2(2) is strange: 1658: linux_mmap2(0x0,0x8974,0x1,0x1,0x0,0x6) = 790032384 (0x2f16f000) 1658: linux_mmap2(0x0,0x8fd8,0x1,0x1,0x0,0x6) = 790032384 (0x2f16f000) 1658: linux_mmap2(0x0,0x8974,0x1,0x1,0x0,0x6) = 790032384 (0x2f16f000) 1658: linux_mmap2(0x0,0x1000,0x3,0x22,0xffffffff,0x6) = 790069248 (0x2f178000) 1658: linux_mmap2(0x0,0x1000,0x3,0x22,0xffffffff,0x6) = 790069248 (0x2f178000) 1658: linux_mmap2(0x0,0x8fd8,0x1,0x1,0x0,0x6) = 790032384 (0x2f16f000) 1658: linux_mmap2(0x0,0x8974,0x1,0x1,0x0,0x6) = 790032384 (0x2f16f000) 1658: linux_mmap2(0x0,0x8a78,0x1,0x1,0x0,0x6) = 790032384 (0x2f16f000) 1658: linux_mmap2(0x0,0x8974,0x1,0x1,0x0,0x6) = 790032384 (0x2f16f000) The last calling argument is always stupid 6, which doesn't agree with the calling behavior against mmap(2) when compat.linux.osrelease is set to 2.4.2. This probably means that all files mapped by mmap2(2) cannot be properly read from memory space. Screenshots: Normal cases: 1. FreeBSD Handbook, Chinese version: (This PDF file is much more complicated than the English one) http://ftp.intron.ac/tmp/adobereader-20070103-1.png 2. The manual page ls(1), produced by groff(1) + GhostScript: http://ftp.intron.ac/tmp/adobereader-20070103-2.png Abnormal case: Failed to remove ~/.adobe http://ftp.intron.ac/tmp/adobereader-20070103-3.png ------------------------------------------------------------------------ From Beijing, China