Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jun 2018 18:43:45 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r335327 - head/sys/compat/linux
Message-ID:  <201806181843.w5IIhjnB006088@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Mon Jun 18 18:43:45 2018
New Revision: 335327
URL: https://svnweb.freebsd.org/changeset/base/335327

Log:
  linuxulator: add debugging for invalid capget/capset version
  
  Sponsored by:	Turing Robotic Industries Inc.

Modified:
  head/sys/compat/linux/linux_misc.c

Modified: head/sys/compat/linux/linux_misc.c
==============================================================================
--- head/sys/compat/linux/linux_misc.c	Mon Jun 18 18:38:58 2018	(r335326)
+++ head/sys/compat/linux/linux_misc.c	Mon Jun 18 18:43:45 2018	(r335327)
@@ -1895,6 +1895,11 @@ linux_capget(struct thread *td, struct linux_capget_ar
 		return (error);
 
 	if (luch.version != _LINUX_CAPABILITY_VERSION) {
+#ifdef DEBUG
+		if (ldebug(capget))
+			printf(LMSG("invalid capget capability version 0x%x"),
+			    luch.version);
+#endif
 		luch.version = _LINUX_CAPABILITY_VERSION;
 		error = copyout(&luch, args->hdrp, sizeof(luch));
 		if (error)
@@ -1934,6 +1939,11 @@ linux_capset(struct thread *td, struct linux_capset_ar
 		return (error);
 
 	if (luch.version != _LINUX_CAPABILITY_VERSION) {
+#ifdef DEBUG
+		if (ldebug(capset))
+			printf(LMSG("invalid capset capability version 0x%x"),
+			    luch.version);
+#endif
 		luch.version = _LINUX_CAPABILITY_VERSION;
 		error = copyout(&luch, args->hdrp, sizeof(luch));
 		if (error)



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