Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Apr 2019 14:05:05 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r346833 - stable/11/sys/compat/linux
Message-ID:  <201904281405.x3SE55Xv039009@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dchagin
Date: Sun Apr 28 14:05:05 2019
New Revision: 346833
URL: https://svnweb.freebsd.org/changeset/base/346833

Log:
  MFC r335327 (by emaste@):
  
  linuxulator: add debugging for invalid capget/capset version.

Modified:
  stable/11/sys/compat/linux/linux_misc.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linux/linux_misc.c
==============================================================================
--- stable/11/sys/compat/linux/linux_misc.c	Sun Apr 28 14:03:32 2019	(r346832)
+++ stable/11/sys/compat/linux/linux_misc.c	Sun Apr 28 14:05:05 2019	(r346833)
@@ -1892,6 +1892,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)
@@ -1931,6 +1936,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?201904281405.x3SE55Xv039009>