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)
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to