From modulus@h24-82-193-81.wp.shawcable.net  Tue Dec 31 12:29:44 2002
Return-Path: <modulus@h24-82-193-81.wp.shawcable.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 94A4837B401
	for <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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" <maneo@bsdpro.com>
Reply-To: "Christian S.J. Peron" <maneo@bsdpro.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] compat linux error message for obsolete or unimplemented syscall lacks process name	
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>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:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 31 12:30:01 PST 2002
>Closed-Date:    Thu May 15 18:59:06 PDT 2003
>Last-Modified:  Thu May 15 18:59:06 PDT 2003
>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:
State-Changed-From-To: open->closed 
State-Changed-By: hmp 
State-Changed-When: Thu May 15 18:55:55 PDT 2003 
State-Changed-Why:  
This is already available in 5.x; and the change doesn't 
seem important enough for RELENG_4. 

Check rev. 1.20 of sys/compat/linux/linux_util.c. 
Thanks. 

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