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: <20090621085212.GC8218@one.firstfloor.org>
Date:	Sun, 21 Jun 2009 10:52:12 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	Wu Fengguang <fengguang.wu@...el.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Nick Piggin <npiggin@...e.de>, Ingo Molnar <mingo@...e.hu>,
	Minchan Kim <minchan.kim@...il.com>,
	Mel Gorman <mel@....ul.ie>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Hugh Dickins <hugh.dickins@...cali.co.uk>,
	Andi Kleen <andi@...stfloor.org>,
	"riel@...hat.com" <riel@...hat.com>,
	"chris.mason@...cle.com" <chris.mason@...cle.com>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH 12/15] HWPOISON: per process early kill option prctl(PR_MEMORY_FAILURE_EARLY_KILL)

On Sat, Jun 20, 2009 at 11:16:20AM +0800, Wu Fengguang wrote:
> The default option is late kill, ie. only kill the process when it actually
> tries to access the corrupted data. But an admin can still request a legacy
> application to be early killed by writing a wrapper tool which calls prctl()
> and exec the application:
> 
> 	# this_app_shall_be_early_killed  legacy_app
> 
> KVM needs the early kill signal. At early kill time it has good opportunity
> to isolate the corruption in guest kernel pages. It will be too late to do
> anything useful on late kill.
> 
> Proposed by Nick Pidgin.

If anything you would need two flags per process: one to signify
that the application set the flag and another what the actual
value is.

Also you broke the existing qemu implementation now which obviously
doesn't know about this new flag.

I don't think we need this patch right now.

> +static bool task_early_kill_elegible(struct task_struct *tsk)
> +{
> +	if (!tsk->mm)
> +		return false;

I don't think this can happen.

> +
> +	return tsk->flags & PF_EARLY_KILL;

This type mixing is also dangerous, if someone create e.g. a char bool
it would be always false.

-Andi

-- 
ak@...ux.intel.com -- Speaking for myself only.
--
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