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
| ||
|
Date: Fri, 2 Dec 2016 12:20:29 +0100 (CET) From: Thomas Gleixner <tglx@...utronix.de> To: Marcelo Tosatti <mtosatti@...hat.com> cc: Fenghua Yu <fenghua.yu@...el.com>, linux-kernel@...r.kernel.org Subject: Re: [PATCH v2] intelrdt: resctrl: recommend locking for resctrlfs On Thu, 1 Dec 2016, Marcelo Tosatti wrote: > > There is a locking problem between different applications > reading/writing to resctrlfs directory at the same time (read the patch > below for details). > > Suggest a standard locking scheme for applications to use. .... > +To coordinate atomic operations on resctrl and avoid the problem > +above, the following locking procedure is recommended: > + > +A) open /var/lock/resctrl/fs.lock with O_CREAT|O_EXCL. > +B) if success, write pid of program accessing the directory > + structure to this file. > +C) read/write the directory structure. > +D) remove file. What's wrong with using flock, which works from shell scripts as well? Thanks, tglx
Powered by blists - more mailing lists