<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 8, 2021 at 8:40 PM Cyril Hrubis <<a href="mailto:chrubis@suse.cz">chrubis@suse.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi!<br>
> asm volatile (<br>
> "add $0x400, %%esp\n\t"<br>
> "int $0x80\n\t"<br>
> @@ -114,15 +112,14 @@ static void run(void)<br>
> <br>
> static struct tst_test test = {<br>
> .test_all = run,<br>
> + .supported_archs = (const char *const []) {<br>
> + "i386",<br>
> + "ppc",<br>
> + NULL<br>
> + },<br>
> .tags = (const struct tst_tag[]) {<br>
> {"linux-git", "cf01fb9985e8"},<br>
> {"CVE", "CVE-2017-7616"},<br>
> {}<br>
> }<br>
> };<br>
> -<br>
> -#else /* #if defined(__x86_64__) || defined(__powerpc__) */<br>
> -<br>
> -TST_TEST_TCONF("not i386 or powerpc");<br>
> -<br>
> -#endif /* #else #if defined(__x86_64__) || defined(__powerpc__) */<br>
<br>
Accordingly to this table:<br>
<br>
<a href="https://wiki.debian.org/ArchitectureSpecificsMemo" rel="noreferrer" target="_blank">https://wiki.debian.org/ArchitectureSpecificsMemo</a><br>
<br>
__powerpc__ matches both 32bit and 64bit variants.<br>
<br>
I guess that we would have to change the checks in the library as:<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Yes, but I think we can simply reverse the order to solve this.</div><div class="gmail_default" style="font-size:small">It will try to match 64bit firstly otherwise 32bit. The s390 does as well.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">....</div><div class="gmail_default" style="font-size:small">#elif defined(__powerpc64__ || __ppc64__)</div> .name = "ppc64",<br> .type = TST_PPC64,<br>#elif defined(__powerpc__ || __ppc__)<br> .name = "ppc",<br> .type = TST_PPC,<br>#elif defined(__s390x__)<br> .name = "s390x",<br> .type = TST_S390X,<br>#elif defined(__s390__)<br> .name = "s390",<br> .type = TST_S390,<br><div class="gmail_default" style="font-size:small">....</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
#ifdef __powerpc__<br>
# ifdef __powerpc64__ || __ppc64__<br>
.arch = "ppc64",<br>
.type = TST_PPC64,<br>
# else<br>
.arch = "ppc",<br>
.type = "TST_PPC"<br>
# endif<br>
#endif<br>
<br>
Also I guess that gcc does not define __x86__ for historical reasons and<br>
__i386__ really means __x86__, but I haven't checked that one.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">You are right. And next we have to get rid of __x86__ from ltp testcase.</div><br></div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>