[LTP] [PATCH] open08: calling tst_get_bad_addr from LTP API

Li Wang liwang@redhat.com
Wed Jul 11 11:13:48 CEST 2018


On Wed, Jul 11, 2018 at 3:54 PM, Jan Stancek <jstancek@redhat.com> wrote:

>
>
> ----- Original Message -----
> > On Wed, Jul 11, 2018 at 3:28 PM, Jan Stancek <jstancek@redhat.com>
> wrote:
> > >
> > >
> > > ----- Original Message -----
> > >> Maybe we misled by the code comments before, after thinking over, I
> > >> guess the "outside your accessible address space" != "outside of
> > >> process mapped space". So we don't need to do map/unmap to satisfy
> > >> that.
> > >
> > > That may be the case, I changed it on purpose to match that comment.
> > > Though as you pointed out PROT_NONE might be enough too.
> > >
> > > Is the motivation for your patch to re-use existing function
> >
> > Yes, firstly my motivation is to re-use the existing function. But then I
> > realized that maybe the original author misunderst
> > ​oo​
> > d the EFAULT error in open().
> >
> > So I find open(2) manual and get this:
> > "EFAULT pathname points outside your *accessible* address space."
> >
> > ​Then I think maybe we need match the manual but not the code comments.
>
> I'd say we match it already (in stronger form than PROT_NONE).
>

Right, map/unmap is more strict.


> I don't object to re-using LTP function. Can you send v2
> that updates also the comment please?
>

​Sure, though it's not much value to change the function, I will do that to
make LTP happy.​


>
> Regards,
> Jan
>



-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20180711/bd2079da/attachment.html>


More information about the ltp mailing list