Subject: kern/7684: linux_signal.c: too verbose DEBUG kernel warning message
To: None <gnats-bugs@gnats.netbsd.org>
From: Jaromir Dolecek <dolecek@ics.muni.cz>
List: netbsd-bugs
Date: 06/01/1999 06:36:50
>Number:         7684
>Category:       kern
>Synopsis:       linux_signal.c: too verbose DEBUG kernel warning message
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jun  1 06:35:01 1999
>Last-Modified:
>Originator:     Jaromir Dolecek
>Organization:
	ICS MU Brno, Czech Republic
>Release:        NetBSD-1.4C
>Environment:
	
System: NetBSD jdolecek.per4mance.cz 1.4C NetBSD 1.4C (JDOLECEK) #1: Tue Jun 1 15:13:47 MEST 1999 dolecek@jdolecek.per4mance.cz:/usr/src/sys/arch/i386/compile/JDOLECEK i386


>Description:
	When kernel is compiled with DEBUG and any linux binary
	uses unsupported bits for sigaction, kernel writes info about it
	upon each such call. This is far too verbose and I really don't care
	about it when not DEBUG_LINUX.
	While looking at the code, I discovered LINUX_DEBUG is used
	once in linux_signal.c; I assume there should be DEBUG_LINUX
	as in every other place.
>How-To-Repeat:
	run linux rc5des as daemon on system startup and watch
	messages kernel writes to console.
>Fix:
	IMHO the right thing to do is use DEBUG_LINUX instead of
	DEBUG or LINUX_DEBUG for those two bits.

--- sys/compat/linux/common/linux_signal.c.orig	Tue Jun  1 16:18:01 1999
+++ sys/compat/linux/common/linux_signal.c	Tue Jun  1 16:18:45 1999
@@ -219,7 +219,7 @@ linux_old_to_native_sigaction(lsa, bsa)
 		bsa->sa_flags |= SA_NODEFER;
 	if ((lsa->sa_flags & LINUX_SA_SIGINFO) != 0)
 		bsa->sa_flags |= SA_SIGINFO;
-#ifdef DEBUG
+#ifdef DEBUG_LINUX
 	if ((lsa->sa_flags & ~LINUX_SA_ALLBITS) != 0)
 /*XXX*/		printf("linux_old_to_native_sigaction: extra bits ignored\n");
 	if (lsa->sa_restorer != 0)
@@ -415,7 +415,7 @@ linux_sys_rt_sigprocmask(p, v, retval)
 	/* Use non-rt function: sigsetsize is ignored. */
 	/* Assume sizeof(linux_sigset_t) == sizeof(linux_old_sigset_t) */
 	if (SCARG(uap, sigsetsize) != sizeof(linux_old_sigset_t)) {
-#ifdef LINUX_DEBUG
+#ifdef DEBUG_LINUX
 	    printf("linux_sys_rt_sigprocmask: sigsetsize != sizeof(old_sigset_t)");
 #endif
 	    return(ENOSYS);
>Audit-Trail:
>Unformatted: