Requesting licensing advice on ARM SVE headers

Hi

I am working to implement ARM SVE register access support in LLDB for Linux based operating systems.

In order to access SVE registers via ptrace Linux provides macros implemented here:
https://github.com/torvalds/linux/blob/master/arch/arm64/include/uapi/asm/ptrace.h

https://github.com/torvalds/linux/blob/master/arch/arm64/include/uapi/asm/sve_context.h

These macros are pulled into aarch64-linux-gnu/include/asm/ptrace.h if we have aarch64-linux-gnu cross compiler installed on ubuntu 18.04. In cases where these headers are not available we have to manually include them into our code. Just like gdb has done here: https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/nat/aarch64-sve-linux-sigcontext.h

My patch posted here: https://reviews.llvm.org/D77047 also makes use of similar strategy by including these macros in LLDB under lldb/source/Plugins/Process/Linux/LinuxPTraceDefines_arm64sve.h
https://reviews.llvm.org/differential/changeset/?ref=1893998&whitespace=ignore-most

My question is about licensing issues around including this piece of patch into llvm mono repo. These macros are provided by linux kernel for the use of its client applications and are included when LLDB is compiled with #include <ptrace.h>. Only change we have here is that we are shipping this code as part of LLDB in case linux headers on a particular system do not yet support these macos.

Please provide your opinion on licensing validity of this code.

Thanks!

Hi

I am working to implement ARM SVE register access support in LLDB for Linux based operating systems.

In order to access SVE registers via ptrace Linux provides macros implemented here:
https://github.com/torvalds/linux/blob/master/arch/arm64/include/uapi/asm/ptrace.h

https://github.com/torvalds/linux/blob/master/arch/arm64/include/uapi/asm/sve_context.h

These macros are pulled into aarch64-linux-gnu/include/asm/ptrace.h if we have aarch64-linux-gnu cross compiler installed on ubuntu 18.04. In cases where these headers are not available we have to manually include them into our code. Just like gdb has done here: https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/nat/aarch64-sve-linux-sigcontext.h

My patch posted here: https://reviews.llvm.org/D77047 also makes use of similar strategy by including these macros in LLDB under lldb/source/Plugins/Process/Linux/LinuxPTraceDefines_arm64sve.h
https://reviews.llvm.org/differential/changeset/?ref=1893998&whitespace=ignore-most

My question is about licensing issues around including this piece of patch into llvm mono repo. These macros are provided by linux kernel for the use of its client applications and are included when LLDB is compiled with #include <ptrace.h>. Only change we have here is that we are shipping this code as part of LLDB in case linux headers on a particular system do not yet support these macos.

Please provide your opinion on licensing validity of this code.

Thanks!

The easiest option is always to check the origin of the code in the
Linux kernel and ask the copyright holder if they are fine with
re-licensing the code under the LLVM license. Anything else is much more
complicated and most likely outside the scope of the mailing list.

Joerg