mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: force_successful_syscall_return() buggy?
Date: Mon, 16 Jun 2003 12:30:16 +1000	[thread overview]
Message-ID: <16109.11192.531655.562208@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <20030615193604.L5417@flint.arm.linux.org.uk>

Russell King writes:

> #define force_successful_syscall_return()               \
>         do {                                            \
>                 ia64_task_regs(current)->r8 = 0;        \
>         } while (0)
> 
> I don't know what happens on these architectures, but I have a suspicion
> that there is a case which the above will fail, maybe with dramatic
> consequences.

On PPC, I am going to use a bit in the thread_info flags field to
indicate that the current syscall should not return an error.  The
syscall entry and exit paths already look at the thread_info flags
(testing the syscall trace bit, among others) so it's convenient to
have the "no error" flag there too.  The flag bit gets cleared on
syscall entry, set by force_successful_syscall_return() and tested on
syscall exit.  The only restriction is that kernel code should not do
a system call between where it calls force_successful_syscall_return
and where it returns from the syscall.  But I don't believe we ever do
recursive system calls anyway, so that should be fine.

Regards,
Paul.

  parent reply	other threads:[~2003-06-16  2:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-15 18:36 Russell King
2003-06-15 23:11 ` Richard Henderson
2003-06-16  2:30 ` Paul Mackerras [this message]
2003-06-16 17:38 ` David Mosberger
2003-06-16 17:55   ` Russell King
2003-06-16 18:02     ` David S. Miller
2003-06-16 18:25     ` David Mosberger
     [not found] <fa.it5uct2.s4s8om@ifi.uio.no>
     [not found] ` <fa.gvpfoqi.ngk8p2@ifi.uio.no>
2003-06-17  6:54   ` Aneesh Kumar K.V
2003-06-17 19:01     ` David Mosberger
2003-06-17 18:58       ` David S. Miller
2003-06-19 17:35       ` Richard Henderson

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=16109.11192.531655.562208@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /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

all inboxes | Powered by JetHome®