lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <add50f8c-7592-75ec-ffb2-84c4280f2fc7@loongson.cn>
Date:   Wed, 27 Jan 2021 09:40:49 +0800
From:   Tiezhu Yang <yangtiezhu@...ngson.cn>
To:     Daniel Borkmann <daniel@...earbox.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        Nathan Chancellor <natechancellor@...il.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     netdev@...r.kernel.org, bpf@...r.kernel.org,
        clang-built-linux@...glegroups.com, linux-mips@...r.kernel.org,
        linux-kernel@...r.kernel.org, Xuefeng Li <lixuefeng@...ngson.cn>
Subject: Re: [PATCH bpf-next] samples/bpf: Add include dir for MIPS Loongson64
 to fix build errors

On 01/27/2021 12:01 AM, Daniel Borkmann wrote:
> On 1/26/21 3:05 PM, Tiezhu Yang wrote:
>> There exists many build errors when make M=samples/bpf on the Loongson
>> platform, this issue is MIPS related, x86 compiles just fine.
>>
>> Here are some errors:
> [...]
>>
>> So we can do the similar things in samples/bpf/Makefile, just add
>> platform specific and generic include dir for MIPS Loongson64 to
>> fix the build errors.
>
> Your patch from [0] said ...
>
>   There exists many build warnings when make M=samples/bpf on the 
> Loongson
>   platform, this issue is MIPS related, x86 compiles just fine.
>
>   Here are some warnings:
>   [...]
>
>   With #ifndef __SANE_USERSPACE_TYPES__  in tools/include/linux/types.h,
>   the above error has gone and this ifndef change does not hurt other
>   compilations.
>
> ... which ave the impression that all the issues were fixed. What else
> is needed aside from this patch here? More samples/bpf fixes coming? If
> yes, please all submit them as a series instead of individual ones.

Hi Daniel,

Thanks for your reply.

This is the last samples/bpf patch to fix the obvious build issues when
make M=samples/bpf on the MIPS Loongson64 platform.

There is another MIPS patch to fix the following build error when make
M=samples/bpf, but it seems a common and known issue when build MIPS
kernel used with clang [1]:

./arch/mips/include/asm/checksum.h:161:9: error: unsupported inline asm: 
input with type 'unsigned long' matching output with type '__wsum' (aka 
'unsigned int')
         : "0" ((__force unsigned long)daddr),
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Because these two patches are independent, this one is bpf-next related,
the other one is mips-next related, so I submit them sepearately.

[1] 
https://lore.kernel.org/linux-mips/CAG_fn=W0JHf8QyUX==+rQMp8PoULHrsQCa9Htffws31ga8k-iw@mail.gmail.com/

Thanks,
Tiezhu

>
>  [0] 
> https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=190d1c921ad0862da14807e1670f54020f48e889
>
>> Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
>> ---
>>   samples/bpf/Makefile | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
>> index 362f314..45ceca4 100644
>> --- a/samples/bpf/Makefile
>> +++ b/samples/bpf/Makefile
>> @@ -185,6 +185,10 @@ endif
>>     ifeq ($(ARCH), mips)
>>   TPROGS_CFLAGS += -D__SANE_USERSPACE_TYPES__
>> +ifdef CONFIG_MACH_LOONGSON64
>> +BPF_EXTRA_CFLAGS += -I$(srctree)/arch/mips/include/asm/mach-loongson64
>> +BPF_EXTRA_CFLAGS += -I$(srctree)/arch/mips/include/asm/mach-generic
>> +endif
>>   endif
>>     TPROGS_CFLAGS += -Wall -O2
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ