linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jann Horn <jannh@google.com>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, Michal Hocko <mhocko@kernel.org>,
	Oleg Nesterov <oleg@redhat.com>,
	avagin@virtuozzo.com, kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [linux-next] BUG triggered in ptraceme
Date: Thu, 27 Sep 2018 17:35:10 +0200	[thread overview]
Message-ID: <CAG48ez0bKkv1rM-NDMNJMVO94_T92VAe_ABbGud1aOh_7UxaOg@mail.gmail.com> (raw)
In-Reply-To: <20180919161301.GF17524@uranus.lan>

On Wed, Sep 19, 2018 at 6:13 PM Cyrill Gorcunov <gorcunov@gmail.com> wrote:
>
> On Wed, Sep 19, 2018 at 04:16:50PM +0200, Jann Horn wrote:
> ...
> > >
> > > Heh, actually not :) It is due to commit
> > >
> > > commit 1f8266ff58840d698a1e96d2274189de1bdf7969
> > > Author: Jann Horn <jannh@google.com>
> > > Date:   Thu Sep 13 18:12:09 2018 +0200
> > >
> > > which introduced might_sleep. Seems it is bad idea to send bug report
> > > without having a cup of coffee at the morning :)
> >
> > Yeah, I fixed one sleep-in-atomic bug and figured I'd throw a
> > might_sleep() in there for good measure... sigh.
> > I guess now I have to go through all the callers of
> > begin_current_label_crit_section() to see what else looks wrong...
> >
>
> Yes, I fear so. Need to check every caller just to be sure.
>
> > apparmor_ptrace_traceme() is wrong, as reported...
> >
> > apparmor_path_link() looks icky, but I'm not sure - from what I can
> > tell, it's called with an i_rwsem held for writing, and that probably
> > makes calling back into filesystem context from there a bad idea?
> > OTOH, it's just the i_rwsem of a newly-created path, so I don't know
> > whether that's actually an issue...
> >
> > security_path_rename() is called with two i_rwsem's held, but again,
> > I'm not sure whether that's a problem.
>
> Lets wait for fs people opinions.

No reply yet - I guess I should just fix up the traceme case for now.

  reply	other threads:[~2018-09-27 21:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180919070737.GB17524@uranus.lan>
     [not found] ` <20180919071056.GC17524@uranus.lan>
2018-09-19 14:16   ` [linux-next] BUG triggered in ptraceme Jann Horn
2018-09-19 16:13     ` Cyrill Gorcunov
2018-09-27 15:35       ` Jann Horn [this message]
2018-09-27 15:41         ` 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=CAG48ez0bKkv1rM-NDMNJMVO94_T92VAe_ABbGud1aOh_7UxaOg@mail.gmail.com \
    --to=jannh@google.com \
    --cc=avagin@virtuozzo.com \
    --cc=gorcunov@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --cc=oleg@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;
as well as URLs for NNTP newsgroup(s).