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] [day] [month] [year] [list]
Date:	Tue, 23 Dec 2014 03:08:10 +0100
From:	"PaX Team" <pageexec@...email.hu>
To:	linux-kernel@...r.kernel.org, rogelio.serrano@...il.com
Subject: Re: atomic_inc and spin_lock_irq

On 18 Dec 2014 at 21:07, Rogelio M. Serrano Jr. wrote:

> whats the difference between:
> 
> atomic_inc(&port->count);
> 
> and
> 
> spin_lock_irq(&port->lock);
> ++port->count;
> spin_unlock_irq(&port->lock);

in PaX this kind of change brings the ->count accesses under the coverage
of the REFCOUNT feature. if the kernel had a non-atomic refcount type and
corresponding accessors, they'd be used here instead.

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