All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
To: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH libibverbs] memory: use SCNxPTR format to read uintptr_t values
Date: Wed, 11 Jul 2012 08:47:05 -0700	[thread overview]
Message-ID: <CAL1RGDUQiWdSYbCH8k7Bwu8y549wQtQ7=tPA1G=uJuGW76G4hA@mail.gmail.com> (raw)
In-Reply-To: <1342019435-10041-1-git-send-email-ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>

On Wed, Jul 11, 2012 at 8:10 AM, Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org> wrote:
> @@ -116,7 +117,7 @@ static unsigned long get_page_size(void *base)
>                 int n;
>                 uintptr_t range_start, range_end;
>
> -               n = sscanf(buf, "%lx-%lx", &range_start, &range_end);
> +               n = sscanf(buf, "%" SCNxPTR "-%" SCNxPTR, &range_start, &range_end);
>
>                 if (n < 2)
>                         continue;

Looks fine in itself, and I don't necessarily expect you to be the one
to answer, but:

 - what does /proc/<pid>/maps show when running a 32-bit process on a 64-bit
   kernel?  Should we be using uint64_t / SCNx64?  (but surely 32-bit processes
   are guaranteed to have all their mappings fit into 32 bits)

 - earlier in this function, why do we do /proc/%d/maps, getpid()?  Why doesn't
   /proc/self/maps always work?

Thanks,
  Roland
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2012-07-11 15:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11 15:10 [PATCH libibverbs] memory: use SCNxPTR format to read uintptr_t values Yann Droneaud
     [not found] ` <1342019435-10041-1-git-send-email-ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2012-07-11 15:47   ` Roland Dreier [this message]
     [not found]     ` <CAL1RGDUQiWdSYbCH8k7Bwu8y549wQtQ7=tPA1G=uJuGW76G4hA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-11 16:09       ` Jason Gunthorpe
2012-07-11 16:17       ` Yann Droneaud

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='CAL1RGDUQiWdSYbCH8k7Bwu8y549wQtQ7=tPA1G=uJuGW76G4hA@mail.gmail.com' \
    --to=roland-bhel68plqrggvpxpguhicg@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org \
    /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.