public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: linux-kernel@vger.kernel.org
Subject: Futex and get_user_pages error conditions
Date: Tue, 28 Jan 2014 13:55:15 +0100	[thread overview]
Message-ID: <52E7A8B3.5060105@redhat.com> (raw)

We currently do not deal with futex operation failures inside glibc, at 
least not for the glibc-internal locks.  (I noticed this while reading 
the code, my question is not prompted by real-world failures.)  In 
general, glibc will ensure that preconditions are met and handles some 
expected errors, or behavior is undefined user code doesn't ensure them, 
but there are some errors which are impossible to prevent by careful 
programming, such as memory allocation failures.

I looked at the kernel implementation, and noticed that in the guts of 
the get_user_pages implementation, it can return ENOMEM.  Does this 
actually affect futexes, especially the plain (non-PI, 
non-cross-process) variant?

Are there any other error conditions we should handle inside glibc?  We 
really need a fast, async-signal-safe locking primitive where locking 
and unlocking cannot fail (after suitable set-up).

-- 
Florian Weimer / Red Hat Product Security Team

                 reply	other threads:[~2014-01-28 12:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=52E7A8B3.5060105@redhat.com \
    --to=fweimer@redhat.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox