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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 17 Jul 2014 08:50:54 -0500 (CDT) From: Christoph Lameter <cl@...two.org> To: Pranith Kumar <bobby.prani@...il.com> cc: Randy Dunlap <rdunlap@...radead.org>, "open list:DOCUMENTATION" <linux-doc@...r.kernel.org>, open list <linux-kernel@...r.kernel.org> Subject: Re: [PATCH v2 1/1] doc: Add remote CPU access details and others to this_cpu_ops.txt On Wed, 16 Jul 2014, Pranith Kumar wrote: > +You can also do the following to convert the datap offset to an address > + > + struct data *p = this_cpu_ptr(&datap); > + > +but, passing of pointers calculated via this_cpu_ptr to other cpus is > +unusual and should be avoided. > + > +Such remote accesses to per CPU data are not guaranteed to be atomic > +anymore. You will have to use atomic_t and rely on the standard atomic > +operations for these remote accesses to be atomic. The use of atomic_t implies a remote write operation to a percpu area. atomic_t needs to be avoided. If data needs to be modified from multiple cpus then it usually does not belong into a percpu area. -- 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