From owner-freebsd-bugs Tue Dec 31 12:30:15 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E00137B401 for ; Tue, 31 Dec 2002 12:30:13 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8206F43EC5 for ; Tue, 31 Dec 2002 12:30:12 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gBVKUCNS021905 for ; Tue, 31 Dec 2002 12:30:12 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gBVKUCIl021904; Tue, 31 Dec 2002 12:30:12 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94A4837B401 for ; Tue, 31 Dec 2002 12:29:44 -0800 (PST) Received: from h24-82-193-81.wp.shawcable.net (h24-82-193-81.wp.shawcable.net [24.82.193.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6845743EC2 for ; Tue, 31 Dec 2002 12:29:43 -0800 (PST) (envelope-from modulus@h24-82-193-81.wp.shawcable.net) Received: from h24-82-193-81.wp.shawcable.net (modulus@localhost [127.0.0.1]) by h24-82-193-81.wp.shawcable.net (8.12.6/8.12.6) with ESMTP id gBVKUZE0098035 for ; Tue, 31 Dec 2002 14:30:36 -0600 (CST) (envelope-from modulus@h24-82-193-81.wp.shawcable.net) Received: (from modulus@localhost) by h24-82-193-81.wp.shawcable.net (8.12.6/8.12.6/Submit) id gBVKUZ9V098034; Tue, 31 Dec 2002 14:30:35 -0600 (CST) Message-Id: <200212312030.gBVKUZ9V098034@h24-82-193-81.wp.shawcable.net> Date: Tue, 31 Dec 2002 14:30:35 -0600 (CST) From: "Christian S.J. Peron" Reply-To: "Christian S.J. Peron" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/46661: [patch] compat linux error message for obsolete or unimplemented syscall lacks process name Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 46661 >Category: kern >Synopsis: [patch] compat linux error message for obsolete or unimplemented syscall lacks process name >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Dec 31 12:30:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Christian S.J. Peron >Release: FreeBSD 4.7-RELEASE-p2 i386 >Organization: >Environment: System: FreeBSD h24-82-193-81 4.7-RELEASE-p2 FreeBSD 4.7-RELEASE-p2 #1: Fri Dec 6 00:00:31 CST 2002 modulus@h24-82-193-81:/usr/src/sys/compile/opcode i386 >Description: When a program running under Linux compatibility attempts to execute a syscall that is obsolete or not implemented the kernel will generate an error message. This error message lacks the process name but supplies a PID. If the failed syscall causes the program to exit, a user reviewing logs at a later time will not know which process is responsible for the error. >How-To-Repeat: Build a program under Linux that uses _syscall3() or some method of calling syscalls and call something like syslog(2). Take that binary and execute it under FreeBSD. The error message will lack the process name. >Fix: --- /usr/src/sys/compat/linux/linux_util.h Thu Nov 2 17:31:28 2000 +++ /usr/src/sys/compat/linux/linux_util.new.h Tue Dec 31 12:01:58 2002 @@ -104,8 +104,9 @@ unsupported_msg(struct proc *p, const char *fname) { - printf("linux: syscall %s is obsoleted or not implemented (pid=%ld)\n", - fname, (long)p->p_pid); + printf("linux: syscall %s is obsoleted or not implemented pid %ld " + "(%s)\n", fname, (long)p->p_pid, p->p_comm); + return (ENOSYS); } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message