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: <20120114100009.4dd8588b@Gantu.yeoh.info>
Date:	Sat, 14 Jan 2012 10:00:09 +1030
From:	Christopher Yeoh <cyeoh@....ibm.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, Oleg Nesterov <oleg@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	David Howells <dhowells@...hat.com>
Subject: Re: [PATCH] Fix race in process_vm_rw_core

On Fri, 13 Jan 2012 14:30:50 -0800
Andrew Morton <akpm@...ux-foundation.org> wrote:
> > +struct mm_struct *get_check_task_mm(struct task_struct *task,
> > unsigned int mode) +{
> > +	struct mm_struct *mm;
> > +	int err;
> > +
> > +	err =
> > mutex_lock_killable(&task->signal->cred_guard_mutex);
> > +	if (err)
> > +		return ERR_PTR(err);
> > +
> > +	task_lock(task);
> > +	if (__ptrace_may_access(task, mode)) {
> > +		mm = ERR_PTR(-EACCES);
> > +		goto out;
> > +	}
> > +
> > +	mm = task->mm;
> > +	if (mm) {
> > +		if (task->flags & PF_KTHREAD)
> > +			mm = NULL;
> > +		else
> > +			atomic_inc(&mm->mm_users);
> > +	}
> > +
> > +out:
> > +	task_unlock(task);
> > +	mutex_unlock(&task->signal->cred_guard_mutex);
> > +
> > +	return mm;
> > +}
> > +EXPORT_SYMBOL_GPL(get_check_task_mm);
> 
> I don't think the export is needed - CONFIG_PROC_FS=m isn't supported.

ok.

> btw, I'm trying to work out why we didn't make the whole
> process_vm_access.o feature Kconfigurable, so people who don't want
> it do not get burdened with it?

I don't know. I'll make this change if you'd like but I won't have time
to do it before leaving for LCA tomorrow. Have a toddler about to arrive
at my house.

Chris
-- 
cyeoh@...ibm.com

--
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