From: "H.J. Lu" <hjl.tools@gmail.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: "H.J. Lu via Libc-alpha" <libc-alpha@sourceware.org>
Subject: Re: [PATCH] x32: Add <asm/unistd_x32.h> and regenerate arch-syscall.h
Date: Mon, 24 Aug 2020 12:29:56 -0700 [thread overview]
Message-ID: <CAMe9rOpwkZotmstjk6_G7Df39cPfYG8_T=0G1ik_VhHSLpVorw@mail.gmail.com> (raw)
In-Reply-To: <87k0xndfmu.fsf@oldenburg2.str.redhat.com>
On Mon, Aug 24, 2020 at 12:10 PM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> > Since __NR_set_thread_area may not be defined in the kernel header file,
> > move the test to tests-internal doesn't solve the problem.
>
> I expect that internal tests use the built-in system call tables, so
> <fixup-asm-unistd.h> should be effective for them (indirectly, after
> regenerating the tables).
<fixup-asm-unistd.h> can't be used to add a syscal number.
> >> But is it really correct to add an unsupported system call definition
> >> for the rest of glibc? If this is just setting things up for a test,
> >> maybe the __X32_SYSCALL_BIT hack is the right approach after all.
> >> (I don't know the objective of this test.)
> >
> > set_thread_area is supported on x32. The only thing missing is
> >
> > #define __NR_set_thread_area (__X32_SYSCALL_BIT + 205)
> >
> > in <asm/unistd_x32.h>.
> >
> > Should I update my original patch to
> >
> > #define __NR_set_thread_area (__X32_SYSCALL_BIT + 205)
>
> But set_thread_area is not supported for application use, so it's an
> internal/whitebox test no matter what.
True.
> What exactly are you trying to test?
I am putting tools/testing/selftests/x86/sigreturn.c from Linux kernel
into glibc to test a new arch_prctl syscall for CET:
ARCH_X86_CET_MMAP_SHSTK:
/* Allocate a new shadow stack with unsigned long long *addr:
IN: requested shadow stack size: addr[0].
IN: The mmap flags: addr[1].
1. MAP_32BIT
2. MAP_POPULATE
OUT: allocated shadow stack address: *addr.
*/
--
H.J.
next prev parent reply other threads:[~2020-08-24 19:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-15 21:31 H.J. Lu
2020-08-24 11:17 ` Florian Weimer
2020-08-24 12:42 ` H.J. Lu
2020-08-24 13:22 ` Florian Weimer
2020-08-24 13:56 ` H.J. Lu
2020-08-24 17:17 ` Florian Weimer
2020-08-24 18:54 ` H.J. Lu
2020-08-24 19:10 ` Florian Weimer
2020-08-24 19:29 ` H.J. Lu [this message]
2020-08-25 10:50 ` Florian Weimer
2020-08-25 12:51 ` [PATCH] x32: Add <fixup-asm-unistd.h> " H.J. Lu
2020-08-26 9:35 ` Florian Weimer
2020-08-27 13:36 ` H.J. Lu
2020-08-31 12:56 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMe9rOpwkZotmstjk6_G7Df39cPfYG8_T=0G1ik_VhHSLpVorw@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).