public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <Ulrich.Weigand@de.ibm.com>
To: "Carl Love" <cel@us.ibm.com>
Cc: gdb-patches@sourceware.org, "Rogerio Alves" <rogealve@br.ibm.com>,
	"will schmidt" <will_schmidt@vnet.ibm.com>
Subject: Re: [PATCH] Powerpc: Add support for openat and fstatat syscalls
Date: Wed, 13 Oct 2021 15:08:05 +0200	[thread overview]
Message-ID: <OF8D70D176.67629273-ONC125876D.00479F81-C125876D.004826BA@ibm.com> (raw)
In-Reply-To: <9bf3148807544fd7b83ec9334e9c18cf7b9bee81.camel@us.ibm.com>



"Carl Love" <cel@us.ibm.com> wrote on 12.10.2021 21:13:43:

> So, it says to me that calling newfstatat for both, as Ulrich said, is
> fine.  I do think this is all rather convoluted.  I guess it is one of
> those things that evolved over time into something more convoulted and
> confusing then it should be.
>
> So as you said "...there is not a significant difference between the
> two syscalls".

The two syscalls are similar, but not identical.  In particular, they
differ in the amount of memory that is accessed:

 sys_newfstatat accesses a "struct stat"
    (144 bytes on 64-bit / 88 bytes on 32-bit)
 sys_fstatat64 accesses a "struct stat64"
    (104 bytes on both 64-bit and 32-bit)

Since this affects the memory being recorded, it would actually be
preferable to use the correct system call depending on ABI.

Note that in general, there are more cases of syscall numbers refering
to different system calls depending on the ABI (64-bit vs. 32-bit),
so it would make sense to add support for that in general.

As an example, you may want to look s390_canonicalize_syscall,
which does make the distinction between 64-bit and 32-bit ABI.


Bye,
Ulrich

  reply	other threads:[~2021-10-13 13:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05 20:59 Carl Love
2021-10-07 17:52 ` Ulrich Weigand
2021-10-07 19:43   ` Sergio Durigan Junior
     [not found] ` <OF499743BD.418B9A20-ONC1258767.0061CCF4-C1258767.006229AD@us.ibm.com>
2021-10-11 21:17   ` Carl Love
2021-10-11 21:57     ` will schmidt
2021-10-12 19:13       ` Carl Love
2021-10-13 13:08         ` Ulrich Weigand [this message]
     [not found]         ` <OF8D70D176.67629273-ONC125876D.00479F81-C125876D.004826BA@us.ibm.com>
2021-10-13 21:55           ` Carl Love
2021-10-14 11:21             ` Ulrich Weigand

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=OF8D70D176.67629273-ONC125876D.00479F81-C125876D.004826BA@ibm.com \
    --to=ulrich.weigand@de.ibm.com \
    --cc=cel@us.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=rogealve@br.ibm.com \
    --cc=will_schmidt@vnet.ibm.com \
    /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).