lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <014a01d47c03$6b64eef0$422eccd0$@lge.com>
Date:   Wed, 14 Nov 2018 19:18:42 +0900
From:   "Chanho Min" <chanho.min@....com>
To:     "'Michal Hocko'" <mhocko@...nel.org>,
        "'Oleg Nesterov'" <oleg@...hat.com>
Cc:     "'Rafael J. Wysocki'" <rjw@...ysocki.net>,
        "'Pavel Machek'" <pavel@....cz>,
        "'Len Brown'" <len.brown@...el.com>,
        "'Andrew Morton'" <akpm@...ux-foundation.org>,
        "'Eric W. Biederman'" <ebiederm@...ssion.com>,
        "'Christian Brauner'" <christian@...uner.io>,
        "'Anna-Maria Gleixner'" <anna-maria@...utronix.de>,
        "'Alexander Viro'" <viro@...iv.linux.org.uk>,
        <linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-fsdevel@...r.kernel.org>,
        "'Seungho Park'" <seungho1.park@....com>,
        "'Inkyu Hwang'" <inkyu.hwang@....com>,
        "'Donghwan Jung'" <donghwan.jung@....com>,
        "'Jongsung Kim'" <neidhard.kim@....com>
Subject: RE: [PATCH v2] exec: make de_thread() freezable

> > > It's been some time since I have looked into this code so bear with
me.
> > > One thing is not really clear to me. Why does it help to exclude this
> > > particular task from the freezer
> >
> > we don't exclude it,
> >
> > > when it is not sleeping in the freezer.
> >
> > Yes, it is not sleeping in __refrigerator(), but it does
> >
> > 	schedule();
> > 	freezer_count();
> >
> > so it will enter __refrigerator() right after wakeup. If it won't be
> woken
> > up we do not care, we can consider it "frozen".
> 
> Right, but this is just silencing the freezing code to exclude this
> task, right?
> 
> > > I can see how other threads need to be zapped and TASK_WAKEKILL
> doesn't
> > > do that but shouldn't we fix that instead?
> >
> > Not sure I understand, but unlikely we can (or want) to make
> __refrigerator()
> > killable.
> 
> Why would that be a problem. If the kill is fatal then why to keep the
> killed task in the fridge?
> 

Is it  different between 'the killed task is frozen' and '__refrigerator()
is killable'?
>From a general '__refrigerator()' implementation point of view I know that
it should not be killable.

> > Otherwise, how can we fix that?
> 
> We can mark all threads PF_NOFREEZE and wake them up. This would require
> some more changes of course but wouldn't that be a more appropriate
> solution? Do we want to block exec for ever just because some threads
> are in the fridge?
> 

IMHO, It seems to be difficult and buggy to control with PF_NOFREEZE.
Because,
The sub-thread can freeze and receive SIG_KILL before the marking of
PF_NOFREEZE
and it should be freezable in other cases. I don't understand why it isn't
appropriate
for exec to block. The exec can freeze. When tasks are thawed, the killed
sub-thread
will die and wake de_thread(). The exec will continue to work from resume.

Chanho

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ