public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: "H.J. Lu" <hjl.tools@gmail.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 19:17:23 +0200	[thread overview]
Message-ID: <871rjwdkv0.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <CAMe9rOqOiqFywGHdoARhoAnyjL+Sz9XGPGTmG-Ef-yG9605MKw@mail.gmail.com> (H. J. Lu's message of "Mon, 24 Aug 2020 06:56:29 -0700")

* H. J. Lu:

> On Mon, Aug 24, 2020 at 6:23 AM Florian Weimer <fweimer@redhat.com> wrote:
>>
>> * H. J. Lu:
>>
>> > It doesn't work in this case.  <fixup-asm-unistd.h> is used to undefine or
>> > redefine a syscall from <asm/unistd.h>.   The actual syscall numbers still
>> > come from <asm/unistd.h>.  In this case, the sycall number is missing from
>> > <asm/unistd_x32.h>.   My patch is a prerequisite for a new testcase:
>> >
>> > ../sysdeps/unix/sysv/linux/x86/tst-sigreturn-1.c: In function ‘setup_ldt’:
>> > ../sysdeps/unix/sysv/linux/x86/tst-sigreturn-1.c:258:14: error:
>> > ‘SYS_set_thread_area’ undeclared (first use in this function)
>> >   258 |  if (syscall(SYS_set_thread_area, &gdt_data16_desc) == 0) {
>> >       |              ^~~~~~~~~~~~~~~~~~~
>>
>> Can you make it an internal test and use __NR_set_thread_area?
>>
>
> Like?
>
> #if !defined(__NR_set_thread_area) && defined(__x86_64__) && defined(__ILP32__)
> /* X32 uses the same 64-bit syscall interface for set_thread_area.  */
> # define __NR_set_thread_area (__X32_SYSCALL_BIT + 205)
> #endif

No, I neant using tests-internal, so that you get the built-in system
call table.

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.)

Thanks,
Florian


  reply	other threads:[~2020-08-24 17:17 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 [this message]
2020-08-24 18:54           ` H.J. Lu
2020-08-24 19:10             ` Florian Weimer
2020-08-24 19:29               ` H.J. Lu
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=871rjwdkv0.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=hjl.tools@gmail.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).