All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: "Török Edwin" <edwintorok@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	LLVM Developers Mailing List <llvmdev@cs.uiuc.edu>
Subject: Re: inline asm semantics: output constraint width smaller than input
Date: Sat, 24 Jan 2009 21:07:02 +0100	[thread overview]
Message-ID: <jebptw4gex.fsf@sykes.suse.de> (raw)
In-Reply-To: <497B408C.20802@gmail.com> ("Török Edwin"'s message of "Sat, 24 Jan 2009 18:23:40 +0200")

Török Edwin <edwintorok@gmail.com> writes:

> @@ -239,11 +239,13 @@ extern void __put_user_8(void);
>   */
>  #define put_user(x, ptr)                    \
>  ({                                \
> -    int __ret_pu;                        \
> +    __typeof__(*(ptr)) __ret_pu;                \
>      __typeof__(*(ptr)) __pu_val;                \
>      __chk_user_ptr(ptr);                    \
>      might_fault();                        \
>      __pu_val = x;                        \
> +       /* return value is 0 or -EFAULT, both fit in 1 byte, and \
> +    * are sign-extendable to int */                \

That does not work when *ptr is unsigned (char or short).

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

      parent reply	other threads:[~2009-01-24 20:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-23 17:57 inline asm semantics: output constraint width smaller than input Török Edwin
2009-01-23 18:17 ` Ingo Molnar
2009-01-23 18:21   ` H. Peter Anvin
2009-01-23 18:27   ` Török Edwin
2009-01-23 18:30     ` Ingo Molnar
2009-01-23 18:52       ` Török Edwin
2009-01-23 20:42         ` Török Edwin
2009-01-24 16:23     ` Török Edwin
2009-01-24 17:27       ` Ingo Molnar
2009-01-24 18:57         ` Török Edwin
2009-01-24 21:25           ` [LLVMdev] " Mike Stump
2009-01-24 19:23         ` Chris Lattner
2009-01-24 21:10           ` H. Peter Anvin
2009-01-27 19:42         ` Duncan Sands
2009-01-27 21:25           ` H. Peter Anvin
2009-01-28  1:45             ` Kyle Moffett
2009-01-28  1:56               ` H. Peter Anvin
2009-01-28 13:28                 ` Kyle Moffett
2009-01-28 17:29                   ` H. Peter Anvin
2009-01-28 19:27                     ` Kyle Moffett
2009-01-28 20:59                       ` H. Peter Anvin
2009-01-24 20:07       ` Andreas Schwab [this message]

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=jebptw4gex.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=edwintorok@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvmdev@cs.uiuc.edu \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.