<feed xmlns='http://www.w3.org/2005/Atom'>
<title>phosphor-mboxd, branch master</title>
<subtitle>OpenBMC Phosphor Flash mailbox daemon sources</subtitle>
<id>https://git.raptorcs.com/git/phosphor-mboxd/atom?h=master</id>
<link rel='self' href='https://git.raptorcs.com/git/phosphor-mboxd/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-mboxd/'/>
<updated>2018-04-04T07:57:31+00:00</updated>
<entry>
<title>vpnor: Add README describing the expected behaviours</title>
<updated>2018-04-04T07:57:31+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-03-29T04:22:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-mboxd/commit/?id=0971299fc65fa2a09428a19bab629da0ebe9f724'/>
<id>urn:sha1:0971299fc65fa2a09428a19bab629da0ebe9f724</id>
<content type='text'>
Change-Id: I68d3f453325c15ef524d0fdce5228d65148427be
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>test: vpnor: Use MAP_SHARED for read-only file memory map</title>
<updated>2018-04-04T07:57:31+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-03-27T01:43:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-mboxd/commit/?id=506f2f556e2ad09b40980e2e578ca5039850b4ca'/>
<id>urn:sha1:506f2f556e2ad09b40980e2e578ca5039850b4ca</id>
<content type='text'>
It's not well defined whether a private mapping of a resource that is
MAP_SHARED on a separate file descriptor will see the updates done via
the shared mapping, though under Linux if the private mapping is not
written then we can expect updates from the shared mapping to propagate
(copy-on-write). However, we get a concrete guarantee of the desired
behaviour (observing the effects of the write) if we use MAP_SHARED.

Change-Id: If6a053209a979ee5b96ed09c60fbbd9bdb060a32
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>vpnor: Add handler for CREATE_WRITE_WINDOW</title>
<updated>2018-04-04T07:57:31+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-03-27T00:05:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-mboxd/commit/?id=52a8319658c8ac3dcce2fed116d20d6014d7b143'/>
<id>urn:sha1:52a8319658c8ac3dcce2fed116d20d6014d7b143</id>
<content type='text'>
The virtual PNOR implementation enforces the read-only attribute of FFS
partitions, which is a departure from how things were handled
previously. In the past it was purely up to the host to respect the
flags set on the partition, but nothing prevented the host from
modifying it. Now it's possible for errors to occur when the host
attempts to flush changes back to the flash: mboxd can deny the change.
This denial can happen in a number of circumstances:

1. An explicit WRITE_FLUSH command from the host
2. An implicit WRITE_FLUSH via an explicit CLOSE_WINDOW command
3. An implicit WRITE_FLUSH via CREATE_{READ,WRITE}_WINDOW, which happens
   via the implicit CLOSE_WINDOW

All of these attempts will fail if the write to the currently open
window cannot be allowed to succeed. Failing to open a read window due
to failure to flush pending writes is particularly painful, as we are
not able to ever successfully open a window again.

Instead, detect when the host attempts to open a write window over a
anything but a writeable partition. If this case is detected, return an
error for the CREATE_WRITE_WINDOW operation to prevent systemic failures
later on.

Change-Id: I991b6f1570d9b1b384b1024e3bd8a77e5efcd198
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>vpnor: Configure a handler table in init_vpnor()</title>
<updated>2018-04-04T07:57:31+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-03-26T05:07:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-mboxd/commit/?id=943aba060f143667d502792f11e95f42bc7da346'/>
<id>urn:sha1:943aba060f143667d502792f11e95f42bc7da346</id>
<content type='text'>
Currently the table just mirrors that which is set by the regular
implementation, however getting to that point requires massaging the
code a little. Thus, separate out this change from one that changes the
behaviour of the commands to improve the readability of the latter
change.

Change-Id: I4007a8a4d508c6d850b8cc878bab8f72bd343498
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>mbox_msg: Move handler table to struct mbox_context</title>
<updated>2018-04-04T07:57:31+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-03-26T04:06:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-mboxd/commit/?id=efb09def5e21959972adde9f5c092f1840eff908'/>
<id>urn:sha1:efb09def5e21959972adde9f5c092f1840eff908</id>
<content type='text'>
This allows us to provide alternative implementations for the handlers
as necessary. The vpnor feature, which enforces the read-only property
of FFS partitions, requires this for handling CREATE_WRITE_WINDOW.

Change-Id: Ia969a6f085244b194c500e66b62adca5e10bacba
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>test: Move vpnor tests to vpnor directory</title>
<updated>2018-04-04T07:57:31+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-03-26T01:43:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-mboxd/commit/?id=30bcf84c932a579532e5f8417af549494e11b6e9'/>
<id>urn:sha1:30bcf84c932a579532e5f8417af549494e11b6e9</id>
<content type='text'>
In the spirit of things that are together should be kept together. The
repository layout now better corresponds to upstream with the exception
of the vpnor directory and some modifications to Makefile.am

Change-Id: I16d59a3c9ee846065f6a8c83eb4459715d525f3f
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>vpnor: Isolate relevant code in vpnor directory</title>
<updated>2018-04-04T07:57:31+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-03-26T01:26:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-mboxd/commit/?id=53c21aaa803e148c9c79cb3f5e0252d911506b10'/>
<id>urn:sha1:53c21aaa803e148c9c79cb3f5e0252d911506b10</id>
<content type='text'>
This is prepatory work for introducing more vpnor-specific behaviours to
window handling. We will be introducing more objects to link, in order
to hook some of the window command handlers.

This change takes the opportunity to revert back to the upstream names
for some of the original C files.

Change-Id: I6b67ae466a2695054035e65ba752881be9c32d1a
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>test: vpnor: Add create_write_window_unmapped</title>
<updated>2018-04-04T07:56:23+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-03-29T00:11:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-mboxd/commit/?id=8b9102389718f639434253be3fa99f8f6d38d9a6'/>
<id>urn:sha1:8b9102389718f639434253be3fa99f8f6d38d9a6</id>
<content type='text'>
Deny attempts to open write windows to flash space that is unmapped in
the ToC. This gives explicit feedback that any data written would not be
persisted if it were possible create the write window in the first
place.

Change-Id: I0e7967247b122aa8d0c1de38af43162ba0ccc8fa
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>test: vpnor: Add create_write_window_rw_partition</title>
<updated>2018-04-04T07:56:23+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-03-26T06:39:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-mboxd/commit/?id=e32f2c15b96980f0d3e0962b0fe545788e94f7ce'/>
<id>urn:sha1:e32f2c15b96980f0d3e0962b0fe545788e94f7ce</id>
<content type='text'>
This test case should always pass. Ensure it does in the face of
modifications to how the request is processed.

Change-Id: I090aa6518750615c6b931404f5ad54b13cf95e28
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>test: vpnor: Add create_write_window_ro_partition</title>
<updated>2018-04-04T07:56:23+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-03-26T00:46:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-mboxd/commit/?id=7c5a1091903d5e0959b1ab48211aa187170eaacf'/>
<id>urn:sha1:7c5a1091903d5e0959b1ab48211aa187170eaacf</id>
<content type='text'>
The virtual PNOR implementation enforces the read-only attribute of
partitions out of the box. This causes trouble when the host requests a
write window over a read-only partition, as the flush command will fail.
Further, by design, we have open-implies-close-implies-flush semantics,
which means once a flush fails, any subsequent request to open a window
also fails.

We want the daemon to deny attempts to open write windows over a
read-only partition during the CREATE_WRITE_WINDOW request, to avoid
the cascading failures later on.

Change-Id: Ib6bec3d34a8a47e517088dd504f7a74641882f5d
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
</feed>
