All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.de>
To: Jan Stancek <jstancek@redhat.com>
Cc: LTP List <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH 1/2] clock_nanosleep01: Avoid dereferencing bad pointers in libc on 32bit
Date: Tue, 05 Oct 2021 13:04:51 +0100	[thread overview]
Message-ID: <87ilybbrgo.fsf@suse.de> (raw)
In-Reply-To: <CAASaF6wtsAFJY8pkKdUSycFcaCQySL+xXLeUg8RrTRvxDdShLw@mail.gmail.com>

Hello Jan,

Jan Stancek <jstancek@redhat.com> writes:

> On Mon, Oct 4, 2021 at 8:07 AM Petr Vorel <pvorel@suse.cz> wrote:
>
>  Hi Richie,
>
>  > In 32-bit (regardless of kernel bits) glibc and musl will usually
>  > dereference the timespec pointers and try to read them. In some cases
>  > this might be avoidable, but they must do it in others.
>
>  > Passing invalid pointers is undefined in POSIX. In any case, AFAICT
>  > libc would have to catch the signal in order to guarantee EFAULT is
>  > returned.
>
>  LGTM.
>
>  Reviewed-by: Petr Vorel <pvorel@suse.cz>
>
>  > Possibly we shouldn't test things like this at all through libc
>  > wrappers.
>  Only for 32bit or also for 64 bit? Anyway, there has always been some cases
>  where bad addr testing was problematic (e.g. non-intel arch).
>
> I'd skip it for both, I recall that some implementations
> were crashing.

Yes, there is not much we can do if it fails.

>
> Acked-by: Jan Stancek <jstancek@redhat.com>
>  
>  
>  Kind regards,
>  Petr
>
>  -- 
>  Mailing list info: https://lists.linux.it/listinfo/ltp


-- 
Thank you,
Richard.

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2021-10-05 12:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29  8:59 [LTP] [PATCH 1/2] clock_nanosleep01: Avoid dereferencing bad pointers in libc on 32bit Richard Palethorpe via ltp
2021-09-29  8:59 ` [LTP] [PATCH 2/2] clock_nanosleep01: Add space to make make-check happy Richard Palethorpe via ltp
2021-10-04  6:07   ` Petr Vorel
2021-10-04  6:07 ` [LTP] [PATCH 1/2] clock_nanosleep01: Avoid dereferencing bad pointers in libc on 32bit Petr Vorel
2021-10-04 10:16   ` Jan Stancek
2021-10-05 12:04     ` Richard Palethorpe [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=87ilybbrgo.fsf@suse.de \
    --to=rpalethorpe@suse.de \
    --cc=jstancek@redhat.com \
    --cc=ltp@lists.linux.it \
    /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.