VisualKernel 4.0 beta – LinuxKernelDebugHelper module compile fails

Sysprogs forums Forums VisualKernel VisualKernel 4.0 beta – LinuxKernelDebugHelper module compile fails

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #33166
    dgoetz
    Participant

    Did work with 3 version, updated tp 4.0 to see if there was some fixes/improvements

    Run "make -C "/usr/src/linux-source-4.15.0/linux-source-4.15.0" M="/tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f" modules" in directory "" on local computer -------------------------- make: Entering directory '/usr/src/linux-source-4.15.0/linux-source-4.15.0' CC [M] /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/AppendableBuffer.o CC [M] /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LinuxKernelDebugHelper_main.o CC [M] /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/SequentialModuleInfo.o CC [M] /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LiveMemoryEngine.o scripts/Makefile.build:332: recipe for target '/tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LiveMemoryEngine.o' failed Makefile:1551: recipe for target '_module_/tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f' failed make: Leaving directory '/usr/src/linux-source-4.15.0/linux-source-4.15.0' In file included from /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/AppendableBuffer.c:3:0: /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/AppendableBuffer.h:14:13: warning: ‘ResetAppendableBuffer’ defined but not used [-Wunused-function] static void ResetAppendableBuffer(AppendableBuffer *pBuffer) ^ In file included from /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LinuxKernelDebugHelper_main.c:7:0: /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/SerialInterface.h:33:26: warning: multi-character character constant [-Wmultichar] MODULE_LIST_SIGNATURE = 'TSLM', ^ /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/SerialInterface.h:34:27: warning: multi-character character constant [-Wmultichar] MODULE_EVENT_SIGNATURE = 'TVEM', ^ /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LinuxKernelDebugHelper_main.c:36:2: warning: multi-character character constant [-Wmultichar] 'GBDK', ^ In file included from ./include/uapi/linux/posix_types.h:5:0, from ./include/uapi/linux/types.h:14, from ./include/linux/compiler.h:169, from ./include/linux/init.h:5, from /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LinuxKernelDebugHelper_main.c:1: ./include/linux/stddef.h:8:14: warning: initialization makes integer from pointer without a cast [-Wint-conversion] #define NULL ((void *)0) ^ /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LinuxKernelDebugHelper_main.c:39:2: note: in expansion of macro ‘NULL’ NULL, ^ ./include/linux/stddef.h:8:14: note: (near initialization for ‘KernelDebugDataBlock.Reserved’) #define NULL ((void *)0) ^ /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LinuxKernelDebugHelper_main.c:39:2: note: in expansion of macro ‘NULL’ NULL, ^ /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LinuxKernelDebugHelper_main.c: In function ‘LookupSymbolByName’: /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LinuxKernelDebugHelper_main.c:57:12: warning: return makes pointer from integer without a cast [-Wint-conversion] return kallsyms_lookup_name(name); ^ /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LinuxKernelDebugHelper_main.c: At top level: /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LinuxKernelDebugHelper_main.c:67:13: warning: ‘make_range_writable’ defined but not used [-Wunused-function] static void make_range_writable(void *start, void *end) ^ In file included from /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/SequentialModuleInfo.h:2:0, from /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/SequentialModuleInfo.c:2: /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/AppendableBuffer.h:14:13: warning: ‘ResetAppendableBuffer’ defined but not used [-Wunused-function] static void ResetAppendableBuffer(AppendableBuffer *pBuffer) ^ /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LiveMemoryEngine.c: In function ‘LiveMemoryEngineThread’: /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LiveMemoryEngine.c:152:13: error: implicit declaration of function ‘kthread_should_stop’ [-Werror=implicit-function-declaration] while (!kthread_should_stop()) ^ /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LiveMemoryEngine.c: In function ‘UpdateLiveMemoryPort’: /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LiveMemoryEngine.c:218:9: error: implicit declaration of function ‘kthread_stop’ [-Werror=implicit-function-declaration] kthread_stop(s_LiveMemoryThread); ^ /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LiveMemoryEngine.c:226:30: error: implicit declaration of function ‘kthread_run’ [-Werror=implicit-function-declaration] s_LiveMemoryThread = kthread_run(LiveMemoryEngineThread, ^ /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LiveMemoryEngine.c:226:28: warning: assignment makes pointer from integer without a cast [-Wint-conversion] s_LiveMemoryThread = kthread_run(LiveMemoryEngineThread, ^ /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LiveMemoryEngine.c: In function ‘LiveMemoryEngineThread’: /tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LiveMemoryEngine.c:175:1: warning: the frame size of 1656 bytes is larger than 1024 bytes [-Wframe-larger-than=] } ^ cc1: some warnings being treated as errors make[1]: *** [/tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f/LiveMemoryEngine.o] Error 1 make: *** [_module_/tmp/LinuxKernelDebugHelper-2d7a2b0b-09da-4444-9e0c-d953c5798c8f] Error 2 -------------------------- Command exited with code 2

    #33167
    dgoetz
    Participant

    it didn’t work with 3.1 either

    Also when trying to load module symbols for given modules specified, GDB session reports it can’t find the .ko files, but because the path it is looking is incorrect:

    File is in

    C:\Users\<username>\source\repos\vmware-ubuntu-16.04\vmware-ubuntu-16.04\drivers\media\usb\dvb-usb

    but the error in GDB Session window says it is looking in

    C:\Users\<username>\source\repos\vmware-ubuntu-16.04\vmware-ubuntu-16.04\vmware-ubuntu-16.04\drivers\media\usb\dvb-usb

    Extra folder in the path coming from somewhere

    • This reply was modified 1 year, 7 months ago by dgoetz.
    #33169
    support
    Keymaster

    Hi,

    No problem, we can help you. The build errors happen because the LiveMemoryEngine.c file (responsible for the new Live Watch feature) cannot find the definitions of kthread_should_stop(), kthread_run() and kthread_stop() functions. The functions are defined in the kthread.h file that should normally be included from one of the headers already referenced from Live MemoryEngine.c, however it may be different in the kernel version you are using.

    Do you mind adding #include <linux/kthread.h> to LiveMemoryEngine.c manually and trying to debug again? If this solves the problem, we will update it on our side.

    Regarding the .ko file issue, could you please clarify how is the file referenced? Is it one of the modules indexed together with the kernel release, or are you building it manually? Also if you could attach the relevant .vkrnlproj/KernelRelease.xml files, we should be able to pinpoint the issue faster.

    #33170
    dgoetz
    Participant

    One more thing, even when I have specified a list of modules to load symbols from it appears to load from all active modules

    #33195
    support
    Keymaster

    Hi,

    Just wanted to let you know that we have just released VisualKernel 4.0 Beta 2.

    It includes the fix for the LinuxKernelDebugHelper build issue you mentioned, has numerous stability improvements and fixes the issue with the module list filter.

    Regarding the extra component in the module path (C:\Users\<username>\source\repos\vmware-ubuntu-16.04\vmware-ubuntu-16.04\vmware-ubuntu-16.04\drivers\media\usb\dvb-usb), VisualKernel computes them using the following logic:

    1. Locates the kernel release under your kernel release directory (configurable via Tools->VisualKernel->Manage Linux Kernel Symbols).
    2. Loads the matching IndexedModules/InTreeKernelModule element in KernelRelease.xml and appends the PathRelativetoKernel value to the directory of the KernelRelease.xml file.

    If you consistently get invalid paths, could you please recheck what module paths are stored in KernelRelease.xml? If they contain an extra component, please try patching the file manually, or just re-importing the kernel using the kernel symbol manager. This should get the correct paths stored, so VisualKernel will be able to load them automatically.

     

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.