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: <3908561D78D1C84285E8C5FCA982C28F7B37DB0F@ORSMSX110.amr.corp.intel.com>
Date:   Tue, 20 Feb 2018 23:50:08 +0000
From:   "Luck, Tony" <tony.luck@...el.com>
To:     Matthew Garrett <mjg59@...gle.com>
CC:     Linus Torvalds <torvalds@...ux-foundation.org>,
        "joe.konno@...ux.intel.com" <joe.konno@...ux.intel.com>,
        linux-efi <linux-efi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        Jeremy Kerr <jk@...abs.org>,
        "ak@...ux.intel.com" <ak@...ux.intel.com>,
        "pjones@...hat.com" <pjones@...hat.com>,
        "luto@...nel.org" <luto@...nel.org>,
        James Bottomley <james.bottomley@...senpartnership.com>
Subject: RE: [PATCH 1/2] fs/efivarfs: restrict inode permissions

> read() will make two calls - one to obtain the size of the variable, the
> other to read it. It looks like cat will also trigger an fstat(), so we're
> probably also making a call for that. There's presumably some optimisation
> that could be made there if we trust the firmware not to change the size
> behind our back.

Hmmm. "ls -l" reports the size of each of the files without causing any SMIs,
so Linux has that cached someplace and "read" is being silly making a call
to get something that we already know.  Unless we think the size may be
changing asynchronously and are OK with reporting a stale value for "stat"
but want the actual value for "read".

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ