linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Anshuman Khandual <anshuman.linux@gmail.com>
To: Mateusz Guzik <mguzik@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Cyrill Gorcunov <gorcunov@openvz.org>,
	Jarod Wilson <jarod@redhat.com>,
	Jan Stancek <jstancek@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH 1/2] prctl: take mmap sem for writing to protect against others
Date: Wed, 6 Jan 2016 14:47:57 +0530	[thread overview]
Message-ID: <CAKeScWhEHY_kk4NXDTce1uz=W3deAHJ0YOH9X_sJk6A4KjeNUQ@mail.gmail.com> (raw)
In-Reply-To: <1452056549-10048-2-git-send-email-mguzik@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 653 bytes --]

On Wed, Jan 6, 2016 at 10:32 AM, Mateusz Guzik <mguzik@redhat.com> wrote:

> The code was taking the semaphore for reading, which does not protect
> against readers nor concurrent modifications.
>
>
(down/up)_read does not protect against concurrent readers ?


> The problem could cause a sanity checks to fail in procfs's cmdline
> reader, resulting in an OOPS.
>

Can you explain this a bit and may be give some examples ?


>
> Note that some functions perform an unlocked read of various mm fields,
> but they seem to be fine despite possible modificaton.
>
>
Those need to be fixed as well ?


> Signed-off-by: Mateusz Guzik <mguzik@redhat.com>
>

[-- Attachment #2: Type: text/html, Size: 1491 bytes --]

  reply	other threads:[~2016-01-06  9:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06  5:02 [PATCH 0/2] fix up {arg,env}_{start,end} vs prctl Mateusz Guzik
2016-01-06  5:02 ` [PATCH 1/2] prctl: take mmap sem for writing to protect against others Mateusz Guzik
2016-01-06  9:17   ` Anshuman Khandual [this message]
2016-01-06  9:35   ` Anshuman Khandual
2016-01-06 10:02     ` Mateusz Guzik
2016-01-06  5:02 ` [PATCH 2/2] proc read mm's {arg,env}_{start,end} with mmap semaphore taken Mateusz Guzik
2016-01-06  9:44   ` Anshuman Khandual
2016-01-06 19:43     ` Mateusz Guzik
2016-01-07  9:52 ` [PATCH 0/2] fix up {arg,env}_{start,end} vs prctl Cyrill Gorcunov

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='CAKeScWhEHY_kk4NXDTce1uz=W3deAHJ0YOH9X_sJk6A4KjeNUQ@mail.gmail.com' \
    --to=anshuman.linux@gmail.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=gorcunov@openvz.org \
    --cc=jarod@redhat.com \
    --cc=jstancek@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mguzik@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /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