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]
Date:   Fri, 10 Aug 2018 11:56:46 -0700
From:   Tadeusz Struk <tadeusz.struk@...el.com>
To:     James Bottomley <James.Bottomley@...senPartnership.com>,
        Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
Cc:     flihp@...bit.us, jgg@...pe.ca, linux-integrity@...r.kernel.org,
        linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 2/2] tpm: add support for nonblocking operation

On 08/10/2018 11:48 AM, James Bottomley wrote:
> On Fri, 2018-08-10 at 11:21 -0700, Tadeusz Struk wrote:
>> and the feedback I got from Jason was:
>>
>> "I wonder if it is worth creating this when the first file is
>> opened.. Lots of systems have TPMs but few use the userspace.."
>>
>> so I changed this to allocate the WQ on first open. I think it makes
>> sense, but I leave it to you to decide.
> 
> If the reason is to not create a wq unless it's needed, shouldn't the
> condition actually be first open with flag O_NONBLOCK?
> 

Not really because one can do:

int fd = open("/dev/tpm0", O_RDWR);
fcntl(fd, F_SETFL, O_NONBLOCK);

-- 
Tadeusz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ