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: <20080415173534.b746f8da.akpm@linux-foundation.org>
Date:	Tue, 15 Apr 2008 17:35:34 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Markus Metzger <markus.t.metzger@...el.com>
Cc:	andi-suse@...stfloor.org, hpa@...or.com,
	linux-kernel@...r.kernel.org, mingo@...e.hu, tglx@...utronix.de,
	markus.t.metzger@...el.com, markus.t.metzger@...il.com,
	suresh.b.siddha@...el.com, roland@...hat.com,
	mtk.manpages@...il.com, eranian@...glemail.com,
	juan.villacis@...el.com
Subject: Re: [patch 1/1] x86, ptrace: PEBS support

On Tue, 8 Apr 2008 11:01:58 +0200
Markus Metzger <markus.t.metzger@...el.com> wrote:

> +static inline void *ds_allocate_buffer(size_t size, unsigned int *pages)
>  {
> -	(*(unsigned long *)(base + ds_cfg.bts_interrupt_threshold.offset)) = value;
> +	unsigned long rlim, vm, pgsz;
> +	void *buffer;
> +
> +	pgsz = PAGE_ALIGN(size) >> PAGE_SHIFT;
> +
> +	rlim = current->signal->rlim[RLIMIT_AS].rlim_cur >> PAGE_SHIFT;
> +	vm   = current->mm->total_vm  + pgsz;
> +	if (rlim < vm)
> +		return 0;
> +
> +	rlim = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur >> PAGE_SHIFT;
> +	vm   = current->mm->locked_vm  + pgsz;
> +	if (rlim < vm)
> +		return 0;

Should we skip the RLIMIT_MEMLOCK check if capable(CAP_IPC_LOCK)?

It's a fairly large patch.
--
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