Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Aug 2011 11:27:47 +0700 (NOVST)
From:      Eugene Grosbein <eugen@eg.sd.rdtc.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/159780: make sys/vfs_subr.c more jail-friendly (userland calling deprecated sysctl)
Message-ID:  <201108150427.p7F4Rlc4022499@eg.sd.rdtc.ru>
Resent-Message-ID: <201108150430.p7F4UA86009507@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         159780
>Category:       kern
>Synopsis:       make sys/vfs_subr.c more jail-friendly (userland calling deprecated sysctl)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 15 04:30:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Eugene Grosbein
>Release:        FreeBSD 8.2-STABLE i386
>Organization:
RDTC JSC
>Environment:
System: FreeBSD eg.sd.rdtc.ru 8.2-STABLE FreeBSD 8.2-STABLE #30: Thu Aug 4 20:02:17 NOVST 2011 root@eg.sd.rdtc.ru:/usr/local/obj/usr/local/src/sys/EG i386

>Description:
	
	I run legacy setup of FreeBSD 4.11 inside jail under 7.4-STABLE,
	it runs just fine but kernel spams dmesg buffer with prints:

WARNING: userland calling deprecated sysctl, please rebuild world

	It should use log() and not printf() so the message may be filtered out.
	Perhaps, this message may be skipped altogether if options COMPAT_4X is used.

>How-To-Repeat:

	I do not know what 4.11 binary calls old sysctl.

>Fix:

--- sys/kern/vfs_subr.c.orig	2011-08-15 11:13:00.000000000 +0700
+++ sys/kern/vfs_subr.c	2011-08-15 11:14:21.000000000 +0700
@@ -3021,7 +3021,7 @@
 	struct vfsconf *vfsp;
 	struct xvfsconf xvfsp;
 
-	printf("WARNING: userland calling deprecated sysctl, "
+	log(LOG_WARNING, "userland calling deprecated sysctl, "
 	    "please rebuild world\n");
 
 #if 1 || defined(COMPAT_PRELITE2)


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108150427.p7F4Rlc4022499>