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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 02 May 2020 12:13:19 +0800
From:   Jiaxun Yang <jiaxun.yang@...goat.com>
To:     Tiezhu Yang <yangtiezhu@...ngson.cn>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>
CC:     linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
        Xuefeng Li <lixuefeng@...ngson.cn>,
        Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Subject: Re: [PATCH v2] MIPS: tools: Show result for loongson3-llsc-check



于 2020年5月2日 GMT+08:00 上午11:55:01, Tiezhu Yang <yangtiezhu@...ngson.cn> 写到:
>It is better to show the result before loongson3-llsc-check exit,
>otherwise we can see nothing if the return status is EXIT_SUCCESS,
>it seems confusing.
>
>E.g. without this patch:
>
>[loongson@...alhost tools]$ ./loongson3-llsc-check ../../../vmlinux
>[loongson@...alhost tools]$
>
>With this patch:
>
>[loongson@...alhost tools]$ ./loongson3-llsc-check ../../../vmlinux
>loongson3-llsc-check returns success
>[loongson@...alhost tools]$
>
>Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>

Reviewed-by: Jiaxun Yang <jiaxun.yang@...goat.com>

Btw,
Just learned from Loongson that the latest generation of Loongson-3
doesn't have LLSC errata, also for Loongson 3A R2/R3, use synci instead
of sync would give better performance.

For performance approach, we'd better develop a method
to enable/disable these workarounds at runtime, looks like smp_alternative[1]
that was already employed by x86 and arm64 can be ported to MIPS and
serves to this target.

I'm struggling with device drivers recently so wish somebody
can take a look at it.

Thanks.

[1]: https://lwn.net/Articles/164121/

>---
>
>v2:
>  - move "returns" after "loongson3-llsc-check" suggested by Sergei
>
> arch/mips/tools/loongson3-llsc-check.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/arch/mips/tools/loongson3-llsc-check.c b/arch/mips/tools/loongson3-llsc-check.c
>index 0ebddd0..bdbc7b4 100644
>--- a/arch/mips/tools/loongson3-llsc-check.c
>+++ b/arch/mips/tools/loongson3-llsc-check.c
>@@ -303,5 +303,7 @@ int main(int argc, char *argv[])
> out_close:
> 	close(vmlinux_fd);
> out_ret:
>+	fprintf(stdout, "loongson3-llsc-check returns %s\n",
>+		status ? "failure" : "success");
> 	return status;
> }

-- 
Jiaxun Yang

Powered by blists - more mailing lists