3 Replies
      Latest reply: Nov 4, 2016 1:22 AM by eskimo RSS
      Mr. Smith Level 1 Level 1 (10 points)

        I'm trying to load a kernel extension on 10.12.1, which used to load on 10.12.

        kextutil -t reports that _kernel_task is unresolved, and suggests I run kextlibs.

        kextlibs doesn't report any undefined symbols.

        kernel_task is declared like this:

        extern task_t kernel_task;

        in Kernel/kern/task.h

         

        It is used as a parameter to call to IOBufferMemoryDescriptor::inTaskWithPhysicalMask

         

        anybody know what might be going on here?

        • Re: _kernel_task symbol missing in 10.12.1?
          eskimo Apple Staff Apple Staff (6,675 points)

          In 10.12.1 we finished up a bunch of changes that tighten the security on task_t.  I suspect that this change is tied into that, although I haven’t looked at this in enough detail to know for sure.

          If this has broken an existing KEXT that you ship to customers, you should file a bug report about it.  Please post your bug number, just for the record.

          If you’d like advice on the best way to move forward with this, please open a DTS tech support incident so that I, or one of my colleagues, can investigate in depth.

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"

            • Re: _kernel_task symbol missing in 10.12.1?
              Mr. Smith Level 1 Level 1 (10 points)

              Replying to my own post: the plist required another entry in the OSBundleLibraries dictionary, for com.apple.kpi.mach. This wasn't required on 10.12. It seems like a bug that kextlibs apparently can't figure out that this is where the kernel_task symbol is to be found.

              Quinn - thanks for the reply. This kext is still very much in development, so it has only broken for me (and now I can progress).

                • Re: _kernel_task symbol missing in 10.12.1?
                  eskimo Apple Staff Apple Staff (6,675 points)

                  the plist required another entry in the OSBundleLibraries dictionary, for com.apple.kpi.mach.

                  Interesting.  Thanks for letting us know.

                  It seems like a bug that kextlibs apparently can't figure out that this is where the kernel_task symbol is to be found.

                  Please do file a bug against kextlibs regarding this edge case (I’d appreciate you posting your bug number, just for the record).

                  Share and Enjoy

                  Quinn “The Eskimo!”
                  Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                  let myEmail = "eskimo" + "1" + "@apple.com"