From: Lingzhu Xiang <lxiang@redhat.com>
To: Matt Fleming <matt.fleming@intel.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>,
linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
Jeremy Kerr <jeremy.kerr@canonical.com>
Subject: Re: [RFC] efivars write(2) races
Date: Tue, 29 Jan 2013 10:30:01 +0800 [thread overview]
Message-ID: <51073429.10503@redhat.com> (raw)
In-Reply-To: <1359376730.8282.20.camel@mfleming-mobl1.ger.corp.intel.com>
On 01/28/2013 08:38 PM, Matt Fleming wrote:
> On Mon, 2013-01-28 at 10:38 +0800, Lingzhu Xiang wrote:
>> On 01/25/2013 09:18 PM, Matt Fleming wrote:
>>>> 4. EFI_VARIABLE_APPEND_WRITE with EFI_OUT_OF_RESOURCES truncates size but you
>>>> can still read its content.
>>>
>>> I'm not sure what you mean by this. Could you please explain?
>>
>> Oops, this one is incorrect. I was testing EFI_VARIABLE_APPEND_WRITE
>> using this:
>>
>> printf "\x47\x00\x00\x00\x00" >test-1-$guid
>>
>> So it truncates the file before writing, but efivarfs figures out the right
>> size afterwards. The size remains zero if the write fails.
>>
>> I should be using this for appending:
>>
>> printf "\x47\x00\x00\x00\x00" >>test-1-$guid
>
> Does this mean that these two test cases work as expected?
Mostly yes.
printf "\x47\x00\x00\x00\x00" >test-1-$guid
still shows unexpected truncate behavior. But this is the same one
already noted previously (truncate doesn't actually work).
next prev parent reply other threads:[~2013-01-29 2:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-25 0:25 [RFC] efivars write(2) races Al Viro
2013-01-25 3:50 ` Lingzhu Xiang
2013-01-25 13:18 ` Matt Fleming
2013-01-28 2:38 ` Lingzhu Xiang
2013-01-28 12:38 ` Matt Fleming
2013-01-29 2:30 ` Lingzhu Xiang [this message]
2013-01-25 12:50 ` Matt Fleming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51073429.10503@redhat.com \
--to=lxiang@redhat.com \
--cc=jeremy.kerr@canonical.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox