Date: Tue, 31 Dec 2002 14:30:35 -0600 (CST) From: "Christian S.J. Peron" <maneo@bsdpro.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/46661: [patch] compat linux error message for obsolete or unimplemented syscall lacks process name Message-ID: <200212312030.gBVKUZ9V098034@h24-82-193-81.wp.shawcable.net>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212312030.gBVKUZ9V098034>
