[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1810181522230.1647@nanos.tec.linutronix.de>
Date: Thu, 18 Oct 2018 15:28:08 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Tim Chen <tim.c.chen@...ux.intel.com>
cc: Jiri Kosina <jikos@...nel.org>,
Tom Lendacky <thomas.lendacky@....com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
David Woodhouse <dwmw@...zon.co.uk>,
Andi Kleen <ak@...ux.intel.com>,
Dave Hansen <dave.hansen@...el.com>,
Casey Schaufler <casey.schaufler@...el.com>,
Asit Mallick <asit.k.mallick@...el.com>,
Arjan van de Ven <arjan@...ux.intel.com>,
Jon Masters <jcm@...hat.com>, linux-kernel@...r.kernel.org,
x86@...nel.org
Subject: Re: [Patch v3 07/13] x86/process Add arch_set_dumpable
On Wed, 17 Oct 2018, Tim Chen wrote:
> Add arch_set_dumpable for setting architecture specific security
> modifications on processes according to its dumpable properties.
> Non dumpable processes are security sensitive and they can be modified
> to gain architecture specific security defenses via arch_set_dumpable.
You love that sentence, right? But it's still wrong.
arch_set_dumpable() does arch specific extra modifications depending on
'value'. It's not a one way street. It can tighten or relax.
> Signed-off-by: Tim Chen <tim.c.chen@...ux.intel.com>
> ---
> fs/exec.c | 6 ++++++
And this is related to the subsystem in $subject (x86/process) in which way?
> 1 file changed, 6 insertions(+)
>
> diff --git a/fs/exec.c b/fs/exec.c
> index e204830..6f329fc 100644
> --- a/fs/exec.c
> +++ b/fs/exec.c
> @@ -1940,6 +1940,11 @@ void set_binfmt(struct linux_binfmt *new)
> }
> EXPORT_SYMBOL(set_binfmt);
>
> +void __weak arch_set_dumpable(struct task_struct *tsk, unsigned int value)
> +{
> + return;
> +}
> +
> /*
> * set_dumpable stores three-value SUID_DUMP_* into mm->flags.
> */
> @@ -1956,6 +1961,7 @@ void set_dumpable(struct task_struct *tsk, unsigned int value)
> old = READ_ONCE(tsk->mm->flags);
> new = (old & ~MMF_DUMPABLE_MASK) | value;
> } while (cmpxchg(&tsk->mm->flags, old, new) != old);
> + arch_set_dumpable(tsk, value);
So now the obvious question. set_dumpable() operates on tsk->mm. i.e. it's
a process wide operation. But arch_set_dumpable() operates on the task
itself. What about the other tasks of that process?
Thanks,
tglx
Powered by blists - more mailing lists