All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/4] getcwd01.c: cleanup && convert to new API
Date: Tue, 17 Jan 2017 12:43:31 +0100	[thread overview]
Message-ID: <20170117114330.GC10880@rei> (raw)
In-Reply-To: <20170117113818.GB10880@rei>

Hi!
> I'm not sure if the newly added check for ERANGE is good idea, since
> depending on ordering of the checks in kernel it may either reutrn
> ERANGE, if size is checked first, or EFAULT if the buffer pointer is
> checked first. It may start to fail for no good reason if the order of
> kernel chesk ends up reversed.

And looks like glibc has non-standard extension to allocate the buffer
if NULL pointer is passed. The we should ifdef the case with

#ifdef __GLIBC__

#endif

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2017-01-17 11:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09  8:15 [LTP] [PATCH 1/4] getcwd01.c: cleanup && convert to new API Xiao Yang
2017-01-09  8:15 ` [LTP] [PATCH 2/4] getcwd02.c: " Xiao Yang
2017-01-17 11:47   ` Cyril Hrubis
2017-01-09  8:15 ` [LTP] [PATCH 3/4] getcwd03.c: " Xiao Yang
2017-01-17 12:19   ` Cyril Hrubis
2017-01-09  8:15 ` [LTP] [PATCH 4/4] getcwd04.c: " Xiao Yang
2017-01-17 11:38 ` [LTP] [PATCH 1/4] getcwd01.c: " Cyril Hrubis
2017-01-17 11:43   ` Cyril Hrubis [this message]
2017-01-17 14:11 ` Cyril Hrubis
2017-01-18  6:03   ` [LTP] [PATCH v2 1/3] syscalls/getcwd02.c: " Xiao Yang
2017-01-18  6:03     ` [LTP] [PATCH v2 2/3] syscalls/getcwd03.c: " Xiao Yang
2017-01-18 14:24       ` Cyril Hrubis
2017-01-18  6:03     ` [LTP] [PATCH v2 3/3] syscalls/getcwd04.c: " Xiao Yang
2017-01-18 14:28       ` Cyril Hrubis
2017-01-18 13:32     ` [LTP] [PATCH v2 1/3] syscalls/getcwd02.c: " Cyril Hrubis

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=20170117114330.GC10880@rei \
    --to=chrubis@suse.cz \
    --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.