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: <20081201150947.85e25789.akpm@linux-foundation.org>
Date:	Mon, 1 Dec 2008 15:09:47 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Ying Han <yinghan@...gle.com>
Cc:	oleg@...hat.com, menage@...gle.com, penberg@...helsinki.fi,
	nickpiggin@...oo.com.au, hugh@...itas.com, matthew@....cx,
	rientjes@...gle.com, linux-kernel@...r.kernel.org
Subject: Re: + make-get_user_pages-interruptible.patch added to -mm tree

On Mon, 1 Dec 2008 15:00:14 -0800
Ying Han <yinghan@...gle.com> wrote:

> On Thu, Nov 27, 2008 at 12:04 PM, Oleg Nesterov <oleg@...hat.com> wrote:
> > Ying Han wrote:
> >>
> >> -static int sigkill_pending(struct task_struct *tsk)
> >> +int sigkill_pending(struct task_struct *tsk)
> >>  {
> >>       return  sigismember(&tsk->pending.signal, SIGKILL) ||
> >>               sigismember(&tsk->signal->shared_pending.signal, SIGKILL);
> >> diff -puN mm/memory.c~make-get_user_pages-interruptible mm/memory.c
> >> --- a/mm/memory.c~make-get_user_pages-interruptible
> >> +++ a/mm/memory.c
> >> @@ -1219,12 +1219,12 @@ int __get_user_pages(struct task_struct
> >>                       struct page *page;
> >>
> >>                       /*
> >> -                      * If tsk is ooming, cut off its access to large memory
> >> -                      * allocations. It has a pending SIGKILL, but it can't
> >> -                      * be processed until returning to user space.
> >> +                      * If we have a pending SIGKILL, don't keep
> >> +                      * allocating memory.
> >>                        */
> >> -                     if (unlikely(test_tsk_thread_flag(tsk, TIF_MEMDIE)))
> >> -                             return i ? i : -ENOMEM;
> >> +                     if (unlikely(sigkill_pending(current) ||
> >> +                                     sigkill_pending(tsk)))
> >
> > Please do not export/use sigkill_pending(). It is "private" for ptrace_stop()
> > (and actually should die imho).
> >
> > We have fatal_signal_pending() for that.
> >
> > Oleg.
> >

(top-posting repaired..)

> Thanks Oleg, i looked at the code again and this is a reasonable
> change. I will make the change on the patch.
> Andrew,
>     should i make a patch based on current change or make the same
> patch as [V6]?

I don't mind either way.  I guess a fresh new patch would simplify
review for everyone.

Note that fatal_signal_pending() is not an exact replacement for
sigkill_pending() - fatal_signal_pending() doesn't test the shared
pending signals.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ