linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* linuxppc-2.5 (rsync mvista) -- drivers/input/evdev.c:243: error: invalid lvalue in asm statement
@ 2003-08-03  1:23 Miles Lane
  2003-08-03  9:13 ` Benjamin Herrenschmidt
  2003-08-03 11:23 ` Paul Mackerras
  0 siblings, 2 replies; 7+ messages in thread
From: Miles Lane @ 2003-08-03  1:23 UTC (permalink / raw)
  To: linuxppc-dev


  CC      drivers/input/evdev.o
drivers/input/evdev.c: In function `evdev_ioctl':
drivers/input/evdev.c:243: error: invalid lvalue in asm statement
drivers/input/evdev.c:243: error: invalid lvalue in asm statement
drivers/input/evdev.c:243: error: invalid lvalue in asm statement
drivers/input/evdev.c:243: error: invalid lvalue in asm statement
make[2]: *** [drivers/input/evdev.o] Error 1

Gnu C                  3.3.1
Gnu make               3.80
util-linux             2.11z
mount                  2.11x
e2fsprogs              1.32
pcmcia-cs              3.2.3
PPP                    2.4.1
nfs-utils              1.0.5
Linux C Library        2.3.1
Dynamic linker (ldd)   2.3.1
Procps                 3.1.6
Net-tools              1.60
Console-tools          0.2.3
Sh-utils               5.0
GNU ld version 2.14 20030612

CONFIG_INPUT_EVDEV=y
CONFIG_INPUT_EVBUG=m


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linuxppc-2.5 (rsync mvista) -- drivers/input/evdev.c:243: error: invalid lvalue in asm statement
  2003-08-03  1:23 linuxppc-2.5 (rsync mvista) -- drivers/input/evdev.c:243: error: invalid lvalue in asm statement Miles Lane
@ 2003-08-03  9:13 ` Benjamin Herrenschmidt
  2003-08-03 11:23 ` Paul Mackerras
  1 sibling, 0 replies; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2003-08-03  9:13 UTC (permalink / raw)
  To: Miles Lane; +Cc: linuxppc-dev


On Sun, 2003-08-03 at 03:23, Miles Lane wrote:
>   CC      drivers/input/evdev.o
> drivers/input/evdev.c: In function `evdev_ioctl':
> drivers/input/evdev.c:243: error: invalid lvalue in asm statement
> drivers/input/evdev.c:243: error: invalid lvalue in asm statement
> drivers/input/evdev.c:243: error: invalid lvalue in asm statement
> drivers/input/evdev.c:243: error: invalid lvalue in asm statement
> make[2]: *** [drivers/input/evdev.o] Error 1

Known bug, I'm waiting for Vojtech to push a proper fix

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linuxppc-2.5 (rsync mvista) -- drivers/input/evdev.c:243: error: invalid lvalue in asm statement
  2003-08-03  1:23 linuxppc-2.5 (rsync mvista) -- drivers/input/evdev.c:243: error: invalid lvalue in asm statement Miles Lane
  2003-08-03  9:13 ` Benjamin Herrenschmidt
@ 2003-08-03 11:23 ` Paul Mackerras
  2003-08-03 11:31   ` Benjamin Herrenschmidt
  1 sibling, 1 reply; 7+ messages in thread
From: Paul Mackerras @ 2003-08-03 11:23 UTC (permalink / raw)
  To: Miles Lane; +Cc: linuxppc-dev


Miles Lane writes:
>
>   CC      drivers/input/evdev.o
> drivers/input/evdev.c: In function `evdev_ioctl':
> drivers/input/evdev.c:243: error: invalid lvalue in asm statement
> drivers/input/evdev.c:243: error: invalid lvalue in asm statement
> drivers/input/evdev.c:243: error: invalid lvalue in asm statement
> drivers/input/evdev.c:243: error: invalid lvalue in asm statement

These errors are a consequence of the change I made to make get_user
work on 64-bit quantities.  I can't actually see a way to have
get_user work when it's used the way it is here and also work on
64-bit quantities, without giving spurious warnings when used on
pointers.

Who was it that wanted 64-bit get_user?  I think we are going to have
to make a separate get_user64().

Paul.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linuxppc-2.5 (rsync mvista) -- drivers/input/evdev.c:243: error: invalid lvalue in asm statement
  2003-08-03 11:23 ` Paul Mackerras
@ 2003-08-03 11:31   ` Benjamin Herrenschmidt
  2003-08-04  8:49     ` Franz Sirl
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2003-08-03 11:31 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: Miles Lane, linuxppc-dev


On Sun, 2003-08-03 at 13:23, Paul Mackerras wrote:
> Miles Lane writes:
> >
> >   CC      drivers/input/evdev.o
> > drivers/input/evdev.c: In function `evdev_ioctl':
> > drivers/input/evdev.c:243: error: invalid lvalue in asm statement
> > drivers/input/evdev.c:243: error: invalid lvalue in asm statement
> > drivers/input/evdev.c:243: error: invalid lvalue in asm statement
> > drivers/input/evdev.c:243: error: invalid lvalue in asm statement
>
> These errors are a consequence of the change I made to make get_user
> work on 64-bit quantities.  I can't actually see a way to have
> get_user work when it's used the way it is here and also work on
> 64-bit quantities, without giving spurious warnings when used on
> pointers.
>
> Who was it that wanted 64-bit get_user?  I think we are going to have
> to make a separate get_user64().

No Paul, it's not your fault, if you look closely at evdev, that code
can't really work properly anyway.

I talked to Vojtech at OLS and he'll be fixing that to always pass
either an u32 or an int to userspace.

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linuxppc-2.5 (rsync mvista) -- drivers/input/evdev.c:243: error: invalid lvalue in asm statement
  2003-08-03 11:31   ` Benjamin Herrenschmidt
@ 2003-08-04  8:49     ` Franz Sirl
  2003-08-04  9:42       ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 7+ messages in thread
From: Franz Sirl @ 2003-08-04  8:49 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Paul Mackerras, Miles Lane, linuxppc-dev


At 13:31 03.08.2003, Benjamin Herrenschmidt wrote:

>On Sun, 2003-08-03 at 13:23, Paul Mackerras wrote:
> > Miles Lane writes:
> > >
> > >   CC      drivers/input/evdev.o
> > > drivers/input/evdev.c: In function `evdev_ioctl':
> > > drivers/input/evdev.c:243: error: invalid lvalue in asm statement
> > > drivers/input/evdev.c:243: error: invalid lvalue in asm statement
> > > drivers/input/evdev.c:243: error: invalid lvalue in asm statement
> > > drivers/input/evdev.c:243: error: invalid lvalue in asm statement
> >
> > These errors are a consequence of the change I made to make get_user
> > work on 64-bit quantities.  I can't actually see a way to have
> > get_user work when it's used the way it is here and also work on
> > 64-bit quantities, without giving spurious warnings when used on
> > pointers.
> >
> > Who was it that wanted 64-bit get_user?  I think we are going to have
> > to make a separate get_user64().
>
>No Paul, it's not your fault, if you look closely at evdev, that code
>can't really work properly anyway.

Well, his patch to get_user exposed it, but the bug is really in the very
questionable use of the gcc extension to accept ?: expressions as lvalue,
see <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11564>

>I talked to Vojtech at OLS and he'll be fixing that to always pass
>either an u32 or an int to userspace.

I've sent him a patch too as a result of the above GCC PR.

Franz.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linuxppc-2.5 (rsync mvista) -- drivers/input/evdev.c:243: error: invalid lvalue in asm statement
  2003-08-04  8:49     ` Franz Sirl
@ 2003-08-04  9:42       ` Benjamin Herrenschmidt
  2003-08-04 11:24         ` Paul Mackerras
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2003-08-04  9:42 UTC (permalink / raw)
  To: Franz Sirl; +Cc: Paul Mackerras, Miles Lane, linuxppc-dev, Vojtech Pavlik


On Mon, 2003-08-04 at 10:49, Franz Sirl wrote:
> >
> >No Paul, it's not your fault, if you look closely at evdev, that code
> >can't really work properly anyway.
>
> Well, his patch to get_user exposed it, but the bug is really in the very
> questionable use of the gcc extension to accept ?: expressions as lvalue,
> see <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11564>
>
> >I talked to Vojtech at OLS and he'll be fixing that to always pass
> >either an u32 or an int to userspace.
>
> I've sent him a patch too as a result of the above GCC PR.

It's still totally wrong to access userland with a variable sized
data since my understanding is that userland doesn't know what size
the kernel will use for access here, thus it works for little endian
but not big endian (well... afaik).

Vojtech and I agreed that this should be changed into uniform use
of a single sized type (u32 or int) that gets only converted in
the kernel.

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linuxppc-2.5 (rsync mvista) -- drivers/input/evdev.c:243: error: invalid lvalue in asm statement
  2003-08-04  9:42       ` Benjamin Herrenschmidt
@ 2003-08-04 11:24         ` Paul Mackerras
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Mackerras @ 2003-08-04 11:24 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Franz Sirl, Miles Lane, linuxppc-dev, Vojtech Pavlik


Benjamin Herrenschmidt writes:

> It's still totally wrong to access userland with a variable sized
> data since my understanding is that userland doesn't know what size
> the kernel will use for access here, thus it works for little endian
> but not big endian (well... afaik).

The userland data isn't variable-sized; it's an int, and it is
accessed as an int because the pointer given to get_user is int *.
The problem is (as Franz pointed out) the use of (a? b: c) as an
lvalue.

Incidentally there is a bug in the INPUT_KEYCODE macro: the second
(dev->keycodesize == 1) should be == 2 instead (the condition for the
u16 case).

Paul.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-08-04 11:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-03  1:23 linuxppc-2.5 (rsync mvista) -- drivers/input/evdev.c:243: error: invalid lvalue in asm statement Miles Lane
2003-08-03  9:13 ` Benjamin Herrenschmidt
2003-08-03 11:23 ` Paul Mackerras
2003-08-03 11:31   ` Benjamin Herrenschmidt
2003-08-04  8:49     ` Franz Sirl
2003-08-04  9:42       ` Benjamin Herrenschmidt
2003-08-04 11:24         ` Paul Mackerras

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 NNTP newsgroup(s).