[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1145760360.50519.1321308673807.JavaMail.root@zimbra-prod-mbox-2.vmware.com>
Date: Mon, 14 Nov 2011 14:11:13 -0800 (PST)
From: Andrei Warkentin <awarkentin@...are.com>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] /dev/mem: Fix wrong error on accessing beyond valid
memory addresses.
Hi Peter,
----- Original Message -----
> From: "H. Peter Anvin" <hpa@...or.com>
> To: "Andrei Warkentin" <awarkentin@...are.com>
> Cc: linux-kernel@...r.kernel.org
> Sent: Monday, November 14, 2011 4:59:58 PM
> Subject: Re: [PATCH] /dev/mem: Fix wrong error on accessing beyond valid memory addresses.
>
> On 11/14/2011 01:21 PM, Andrei Warkentin wrote:
> >
> > I know you're very busy, but I was wondering if you could
> > give your two cents on this change. This change grew from
> > our discussion on LKML last week.
> >
> > Thanks ahead,
> > A
>
> EOF seems wrong to me (not as bad as EFAULT, but still wrong).
Although that was what we had discussed, I do not return -EOF in the patch. As you
mention - that would be wrong. I played around with other devices (block, actually),
and if you attempt to read(2) beyond the end, read(2) simply returns 0, as in
zero bytes read out. Of course, lseek(2) beyond the end should return -EINVAL, as
well, so that is what that patch I CCd you on accomplishes.
A
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists