LinuxKernelDebugHelper Compile Fails In Ubuntu18 with kernel4.19

Sysprogs forums Forums VisualKernel LinuxKernelDebugHelper Compile Fails In Ubuntu18 with kernel4.19

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34179
    recode
    Participant

    Forgive my English.

    I copied the LinuxKernelDebugHelper code to reproduce the problem

     

    root@ubuntu:~/4.0# uname -rs
    Linux 4.19.141
    root@ubuntu:~/4.0# lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 18.04.1 LTS
    Release: 18.04
    Codename: bionic
    root@ubuntu:~/4.0# sh configure.sh /lib/modules/$(uname -r)/build
    Configuring KernelDebugHelper module.
    Checking layout of 'struct module'...
    Checking path to stdarg.h...
    root@ubuntu:~/4.0# make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
    make: Enter "/usr/src/linux-4.19.141"
    CC [M] /root/4.0/AppendableBuffer.o
    CC [M] /root/4.0/LinuxKernelDebugHelper_main.o
    CC [M] /root/4.0/SequentialModuleInfo.o
    CC [M] /root/4.0/LiveMemoryEngine.o
    /root/4.0/LiveMemoryEngine.c: In function ‘LiveMemoryEngineThread’:
    /root/4.0/LiveMemoryEngine.c:210:1: warning: the frame size of 1672 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    }
    ^
    CC [M] /root/4.0/TraceEngine.o
    /root/4.0/TraceEngine.c: In function ‘TraceEngineSendThread’:
    /root/4.0/TraceEngine.c:519:24: error: implicit declaration of function ‘jiffies64_to_msecs’; did you mean ‘jiffies64_to_nsecs’? [-Werror=implicit-function-declaration]
    uint32_t timestamp = jiffies64_to_msecs(get_jiffies_64() - startTime) & kSendTimeMask;
    ^~~~~~~~~~~~~~~~~~
    jiffies64_to_nsecs
    /root/4.0/TraceEngine.c:534:7: error: implicit declaration of function ‘kthread_should_stop’ [-Werror=implicit-function-declaration]
    if (kthread_should_stop())
    ^~~~~~~~~~~~~~~~~~~
    /root/4.0/TraceEngine.c: In function ‘TraceEngineEndTracing’:
    /root/4.0/TraceEngine.c:908:3: error: implicit declaration of function ‘kthread_stop’; did you mean ‘ether_setup’? [-Werror=implicit-function-declaration]
    kthread_stop(engine->TraceThread);
    ^~~~~~~~~~~~
    ether_setup
    /root/4.0/TraceEngine.c: In function ‘TraceEngineStartTracing’:
    /root/4.0/TraceEngine.c:1004:25: error: implicit declaration of function ‘kthread_run’; did you mean ‘it_real_fn’? [-Werror=implicit-function-declaration]
    engine->TraceThread = kthread_run(TraceEngineSendThread, engine, "Trace data sending thread");
    ^~~~~~~~~~~
    it_real_fn
    /root/4.0/TraceEngine.c:1004:23: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
    engine->TraceThread = kthread_run(TraceEngineSendThread, engine, "Trace data sending thread");
    ^
    /root/4.0/TraceEngine.c: At top level:
    /root/4.0/TraceEngine.c:1155:109: warning: ‘struct ftrace_regs’ declared inside parameter list will not be visible outside of this definition or declaration
    static notrace void FTraceHookImpl(unsigned long ip, unsigned long parent_ip, struct ftrace_ops *op, struct ftrace_reg
    *regs)
    ^~~~~~~~~~
    /root/4.0/TraceEngine.c: In function ‘ApplyTracepointState’:
    /root/4.0/TraceEngine.c:1230:34: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
    tp->AddressBased.FTrace.func = &FTraceHookImpl;
    ^
    /root/4.0/TraceEngine.c: In function ‘ValidateMemoryRange’:
    /root/4.0/TraceEngine.c:1745:8: error: implicit declaration of function ‘copy_from_user_nofault’; did you mean ‘copy_from_user_nmi’? [-Werror=implicit-function-declaration]
    if (copy_from_user_nofault(&tmp, (const void *)page, sizeof(void *)) < 0)
    ^~~~~~~~~~~~~~~~~~~~~~
    copy_from_user_nmi
    At top level:
    /root/4.0/TraceEngine.c:764:44: warning: always_inline function might not be inlinable [-Wattributes]
    static bool __attribute__((always_inline)) TraceEngineRollbackWrite(struct TraceTransaction *transaction, size_t size)
    ^~~~~~~~~~~~~~~~~~~~~~~~
    /root/4.0/TraceEngine.c:751:46: warning: always_inline function might not be inlinable [-Wattributes]
    static void * __attribute__((always_inline)) TraceEnginePrepareForWrite(struct TraceTransaction *transaction, size_t size)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~
    /root/4.0/TraceEngine.c: In function ‘TraceEngineSendThread’:
    /root/4.0/TraceEngine.c:686:1: warning: the frame size of 1576 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    }
    ^
    cc1: some warnings being treated as errors
    scripts/Makefile.build:303: recipe for target '/root/4.0/TraceEngine.o' failed
    make[1]: *** [/root/4.0/TraceEngine.o] Error 1
    Makefile:1530: recipe for target '_module_/root/4.0' failed
    make: *** [_module_/root/4.0] Error 2

    How to solve it ?

    #34181
    support
    Keymaster

    Hi,

    These errors come from the recently introduced Live Tracing engine that indeed was not tested with the older kernels (it works just fine with the recent 5.x versions though).

    We have updated VisualKernel to automatically detect it and turn off the tracing engine if it detects an incompatible kernel. Please try this build: VisualKernel-4.0.101.2361.msi

    If you would like to use Live Tracing on an older kernel, we can gladly backport it for you as long as you purchase a Standard VisualKernel license. If you would like to evaluate Live Tracing before purchasing, you can try it out on a more recent 5.x kernel (stock kernels coming with most Linux distros will work just fine).

    #34190
    recode
    Participant

    thaks for your kind reply

    now,I’m working in kernel5.x

    this  is a very nice tool,I would recommend this tool to my friends

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