Commit graph

4271 commits

Author SHA1 Message Date
bunnie
97895fd9c9 fix cache coherence issue with FLASH
after updating a piece of FLASH memory, there is an inherent
cache coherence issue. This is because the write happens through
a side channel that is outside of the memory model of the system:
writes happen through a CSR that feed data to pages of FLASH.
Reads happen through direct-mapped memory regions that are unaware
of write mutations.

Thus, after writing a page of memory, if you try to access it,
sometimes you'll read the old cached value instead of the new
updated value.

This patch introduces a mandatory dcache flush after every
FLASH write, so that any cached FLASH regions are re-fetched.
2022-10-07 18:50:51 +08:00
bunnie
d7333a51fd bump xous-susres version check 2022-10-07 18:50:35 +08:00
bunnie
6418f8b54f add notes about making the cache flush loop more efficient on suspend 2022-10-07 18:46:59 +08:00
bunnie
ce02d9ff50 bump release notes 2022-10-06 01:01:56 +08:00
bunnie
0f9195f305 add some sanity checks on the backup header
this tries to catch the cases that:
  - user tried to run the backup without first running "prepare backup..."
  - the USB connection is a little flakey and returning bum data

We can only inspect the plaintext portions of the header, which contains
things like protocol version numbers, time stamps, and language codes.

We use the timestamp validation heavily because it's the only field that
isn't almost always going to be a 0 or 1 when correct, which are highly
likely to be reported anyways if there's a problem with the USB link.

This does assume the user sets the time correctly on the device
doing the backup, and on the Precursor itself.
2022-10-06 00:53:52 +08:00
bunnie
97ccb67ff2 cleanup push artifacts 2022-10-06 00:03:27 +08:00
bunnie
e5704cef4e add for cargo push 2022-10-06 00:02:55 +08:00
bunnie
7a3a132780 bump other API levels 2022-10-05 23:58:46 +08:00
bunnie
3bca9de2a0 bump version numbers for xous-kernel patch
this fixes tests in CI
2022-10-05 23:51:35 +08:00
bunnie
8f71164278 crates.io source files differ in length from repo source files
because crlf->lf conversions
2022-10-05 21:25:54 +08:00
bunnie
3b9041d8d7 CRLF->LF handing in file comparisons 2022-10-05 21:20:16 +08:00
bunnie
86cc7de6b1 version.rs should not be cached 2022-10-05 21:20:01 +08:00
bunnie
5c0154f730 cleanup version comparison code
this should be "clean" and working. yowch, this is really strict...
i may need to loosen this checking to make development sustainable.
2022-10-05 18:53:09 +08:00
bunnie
969f93b001 cross-repo update versions from xous-rs bump 2022-10-05 18:32:44 +08:00
bunnie
32e3cf588f bump xous-rs to 0.9.11 to absorb feature flags into the kernel API 2022-10-05 18:26:58 +08:00
bunnie
113d4c2d96 fix typo in susres 2022-10-05 18:05:26 +08:00
bunnie
eaa59348e7 oops meant 0.1.3 2022-10-05 18:03:07 +08:00
bunnie
edadcecebc bump susres to 0.1.2 2022-10-05 18:02:18 +08:00
bunnie
851cd0924c bump xous-names to 0.9.9 2022-10-05 18:01:22 +08:00
bunnie
a10520cdd4 bump log to 0.1.1 2022-10-05 18:00:17 +08:00
bunnie
ef4053586d fix typo 2022-10-05 17:59:17 +08:00
bunnie
161a4dbc5d now republish ticktimer with updated api refs (0.1.3) 2022-10-05 17:58:21 +08:00
bunnie
2c4d8a0ca0 publish sures at 0.9.2 2022-10-05 17:57:07 +08:00
bunnie
395e079b01 publish names at 0.9.4 2022-10-05 17:56:09 +08:00
bunnie
7bc407a053 publish log dependency at 0.1.4 2022-10-05 17:55:25 +08:00
bunnie
e5c1c4059c ticktmer to 0.9.2 for dependencies 2022-10-05 17:53:17 +08:00
bunnie
c31e050926 it helps to save teh file 2022-10-05 17:44:14 +08:00
bunnie
45d606c8f2 bump susres to 0.1.2 (xous-rs dependency) 2022-10-05 17:43:13 +08:00
bunnie
a12973a7ae bump ticktimer to 0.1.2 for new xous-rs dependencies 2022-10-05 17:41:45 +08:00
bunnie
f863d742d9 absorb xous-rs change into xous-ipc 2022-10-05 17:39:19 +08:00
bunnie
5c6dc80249 xous-rs change bumps kernel rev 2022-10-05 17:33:25 +08:00
bunnie
0ae89626fe add default for crates 2022-10-05 17:20:26 +08:00
bunnie
644a52e784 defaults for cargo packaging 2022-10-05 17:18:54 +08:00
bunnie
586f2bddf6 bump xous-rs version to absorb feature flag changes from utralib 2022-10-05 17:15:28 +08:00
bunnie
bcee655dcb fix published package to reflect correct susres API 2022-10-05 17:08:03 +08:00
bunnie
4a8c4498ea fix inconsistency in Cargo.toml file 2022-10-05 17:00:18 +08:00
bunnie
33948e70d6 initial verifier attempt
verification is sort of pointless, because:

The Cargo.toml file is parsed and reformatted by the packaging tool to normalize its contents.
Thus, the Cargo.toml file of the downloaded version never matches the Cargo.toml file that's actually used.

Unfortunately, there doesn't seem to be an easy way to check the equivalence of two Cargo.toml files,
except for recursively and deeply parsing through and comparing all the possibile keys and values of
the abstract key/value tree. This is a much bigger project than I'm prepared to figure out today.

As a hack, we compare to the Cargo.toml.orig file. Which is...kind of OK, but really, this opens us
up to attacks where someone just has to replace a version on a package or even just swap out an
entire package for a malicious one by just using package name re-assignment which is a thing that
the format supports. In other words, all this checking is kind of pointless because it's super-easy
to swap out key crates for whole other crates and have it go undetected.
2022-10-05 05:33:24 +08:00
bunnie
9c5d773cf3 cleanup CargoSpec From trait 2022-10-05 02:54:12 +08:00
bunnie
9dcc0a3386 absorb ticktimer api bump, propagated from susres bump 2022-10-03 04:40:06 +08:00
bunnie
d91ee79b5f absorb susres package bump 2022-10-03 04:38:59 +08:00
bunnie
d2b2383d1a bump susres version 2022-10-03 04:36:32 +08:00
bunnie
2035e54518 fix susres API docs and bump version for upload to crates.io 2022-10-03 04:34:15 +08:00
bunnie
e5a3ff877d bump release notes 2022-10-03 04:21:31 +08:00
bunnie
e4c306d50a remove version from tracking when not packaging 2022-10-03 03:46:04 +08:00
bunnie
0a03782245 bump remote targets in xtask 2022-10-03 03:37:50 +08:00
bunnie
b184bfbe6a move ticktimer to remote api 2022-10-03 03:37:38 +08:00
bunnie
924c0fd802 fix more crates.io issues 2022-10-03 03:27:20 +08:00
bunnie
4fbfd0e686 commit an interim version for crating 2022-10-03 03:21:34 +08:00
bunnie
2b8b74003d set default for crates.io 2022-10-03 03:20:42 +08:00
bunnie
567a408c92 prep ticktimer crate for crates submission 2022-10-03 03:18:38 +08:00