Commit graph

3648 commits

Author SHA1 Message Date
bunnie
ead5bd7dac enable gateware updates when no root keys are present 2022-06-30 22:58:54 +08:00
bunnie
3aeec85e06 add a note about the overhead of the migration flag 2022-06-30 22:58:36 +08:00
bunnie
f451cde9f9 Merge branch 'main' of github.com:betrusted-io/xous-core into main 2022-06-29 13:24:45 +08:00
bunnie
f14cce55ff update the updater readme
The FPGA gateware region is blocked from trivial readout via USB:
this makes it a tiny bit harder to obtain the gateware image, which
contains the secret keys. This slightly aids users who haven't
burned any efuse keys and are using the default "null" key from
a trivial readout attack, and it also hampers a WBSTAR exploit.

This makes the most convenient path of attack to be loading
a custom xous.img (or otherwise exploiting the kernel) with
a gadget that is capable of reading the gateware region
through priveleged code, and then relaying it over USB through
some run-around of the firewall. This primitive isn't impossible
to create but it doesn't exist and has no use in a normal
operational flow, so, it's going to at least force an attacker
to write some code, as opposed to using off the shelf utilities
we provide.
2022-06-29 13:20:52 +08:00
bunnie
5edb286690
Merge pull request #197 from nworbnhoj/iter
Image processing as Adaptor Iterators
2022-06-29 12:48:21 +08:00
nworbnhoj
278f6e884d Merge branch 'iter' of github.com:nworbnhoj/xous-core into iter 2022-06-29 12:33:17 +10:00
nworbnhoj
bc2e4a4b2c tweak modals test clifford attractor generation 2022-06-29 12:32:58 +10:00
nworbnhoj
e7d5c11cbc
Merge branch 'main' into iter 2022-06-29 10:54:06 +10:00
nworbnhoj
247dfd2fe7 simplify gam bitmap img struct 2022-06-29 07:33:37 +10:00
bunnie
5d874ac0f3 when connecting to debug core, enable programming 2022-06-28 20:38:23 +08:00
bunnie
4fcc1ea173 bump pddb key listing limits
makes it a bit easier for debugging
2022-06-28 19:59:52 +08:00
bunnie
62372488df fix removing keys from FIDO2
I had put the fallback operation in the wrong arm of the match branch
2022-06-28 19:59:27 +08:00
bunnie
23a31c2cf0 fix PDDB initial stack size and increase heap limit on boot
I had thought there was an issue with heap size limit increases
and multithreading but I think actually the problem is the
PDDB runs pretty close to the stack size limit. This increases
the stack size limit for the PDDB on boot and also bumps up
the heap limit so caching can work more flawlessly.
2022-06-28 19:58:20 +08:00
nworbnhoj
35cd593f24 refine clifford attractor generation 2022-06-28 07:39:02 +10:00
nworbnhoj
6d1d514fe5 refine modal show_image alignment 2022-06-28 07:32:55 +10:00
nworbnhoj
29925a5caa implement Dither adaptor iterator 2022-06-28 07:31:18 +10:00
bunnie
2bea23687e fix hosted mode emulation stubs 2022-06-28 03:36:40 +08:00
bunnie
f571e3069a fix regressions on USB suspend/resume
the core now enumerates after a suspend/resume cycle, although
sometimes it takes two tries for the enumeration to go all the way
through. not sure why, yet.
2022-06-28 03:25:33 +08:00
bunnie
77baf89d5c have time server retry on I2C error 2022-06-28 03:25:14 +08:00
bunnie
d67c5d53fb reduce I2C chatter on resume 2022-06-28 03:24:59 +08:00
bunnie
943e45f17e remove suspend/resume awareness from app
In retrospect forcing apps to manage their suspend in resume
crosses too many abstraction barriers.

Instead, the app should specify the mode of the hardware, but
then the driver should be responsible for restoring that state
on resume, not the app.
2022-06-28 01:18:26 +08:00
bunnie
a0217d9ffd debug logic and whitespace 2022-06-28 01:14:38 +08:00
bunnie
b1a37037dd add more debugging logic 2022-06-28 01:14:11 +08:00
bunnie
95b4df1923 fix regression on suspend/resume on time server
seems like we're putting too much demand on the I2C bus
on resume at the moment, backing off the requests a bit
helps ease the logjam.
2022-06-28 01:13:25 +08:00
bunnie
be7d8a76a5 catch potential div by 0 on status redraw 2022-06-27 18:45:02 +08:00
bunnie
89e7849bc5 improve debug output 2022-06-27 18:22:25 +08:00
bunnie
07f239dd9d Merge branch 'main' of github.com:betrusted-io/xous-core into main 2022-06-27 16:03:49 +08:00
bunnie
3e70dea0f8 start to lay in suspend/resume automation for vault
it doesn't work yet -- but we need to get a push into CI for
other testing now.
2022-06-27 16:03:11 +08:00
Sean Cross
0dd382b66a Merge branch 'libstd-fs'
Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-27 15:28:27 +08:00
Sean Cross
4410c2a1b3 spinor: add discriminants to api calls
Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-27 15:27:15 +08:00
Sean Cross
13b6669445 Merge branch 'libstd-fs' 2022-06-27 15:25:59 +08:00
bunnie
99f58db8e9 add note about performance regression 2022-06-27 15:25:58 +08:00
bunnie
6f849af2a2 fix busy-wait in prereqs ntp updater 2022-06-27 15:13:58 +08:00
bunnie
03d13cc758 add the archive log and link for future reference 2022-06-27 15:00:24 +08:00
bunnie
8a63e57862 improve ECC failure reporting on SPINOR
finally saw a failure in the wild, so we have something
to test against.
2022-06-27 14:58:36 +08:00
Sean Cross
7aae6dcab9 pddb: change Option<Opcode> -> Opcode in main
Instead of writing `Some(Opcode::*)` repeatedly, change it to simply
match against `Opcode::*`. This is accomplished by defining a new opcode
`Invalid` that will be matched against as a default.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-27 09:24:11 +08:00
Sean Cross
748d4ce87d Merge remote-tracking branch 'origin/main' into libstd-fs 2022-06-27 09:14:04 +08:00
Sean Cross
8cd04c3415 pddb: rework PddbBuf ordering to be non-packed
The new ordering remains the same size, but is no longer
`#[repr(packed)]`. This allows it to be `#[repr(align(4096))]` which
means we can get away with using a stack page for this struct instead of
allocating a new object every time.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-27 09:13:00 +08:00
bunnie
ac3f6a06fb fix status bar (ran out of precision during the floating pt refactoring) 2022-06-27 04:25:18 +08:00
bunnie
e2b550f34d
Merge pull request #193 from nworbnhoj/main
reduce memory footprint of Dither::dither()
2022-06-27 04:06:34 +08:00
bunnie
75b370a494 fix iterations on the test modal generator
the previous setting was so large that it took a long time to run.
the current setting takes maybe 2-3 minutes to complete.
2022-06-27 04:04:54 +08:00
bunnie
79cb4cd982 image display now works, once heap increase is called
takes about 1MiB of heap to decode the test PNG.

Putting the heap increase at boot seems to not
work, it causes other processes to not spawn. The condition
is not terribly reproducible, so it's probably a concurrency
issue of some type.
2022-06-27 04:03:49 +08:00
bunnie
fd63a33078 add PDDB heap limit increase based on passing a threshold 2022-06-27 04:03:33 +08:00
bunnie
f72f21a1f4 Merge remote-tracking branch 'origin/adjust-process-limit' into vault 2022-06-27 02:45:57 +08:00
bunnie
ed4f7b2092 restrict debug access when running vault app
this removes the security message about the debug core
being unlocked
2022-06-27 02:33:23 +08:00
bunnie
a7ce3e6204 make keyboard tick() blocks non-fatal
at the moment if for some reason the USB stack can't send a tick
there's a panic. it's not actually a life-ending event if that happens.
2022-06-27 02:18:55 +08:00
bunnie
0e5fb14894 add a compatibility gate on USB HID interface
If the SoC isn't compatible, don't try starting the U2F server.
2022-06-27 02:00:22 +08:00
bunnie
9cf48fcaa5 add storage limits on FIDO cred count
perfomance regression on the PDDB with the latest fixes make
the device stop passing compliance when the database grows
to about 40-ish keys. For now, we set the cred limit to 32,
until the performance issues are addressed. (note that yubico
has a limit of 25 credentials, so, 32 is not insanely low).
2022-06-27 00:04:46 +08:00
bunnie
79c20eb498 fix in-place edit of keys
The behavior with a secret basis is as follows:

- The key stays in the basis in which it was created.
- So, if you created k1 in .System basis, and k2 in Secret basis,
  if you edit k1 while Secret basis is open, k1 stays in .System
  basis. it does *not* migrate into Secret basis.

I think this is the "least surprising" behavior. There is an
argument that "maybe I want to keep secret notes in an overlay
on a key" but I feel like creating a second shadow copy of a key
with a different set of notes is not the most desired behavior
for this application (NB: it could be desired for others applications,
and that behavior can be programmed with the PDDB API; which is
why the API is a bit explicit at the moment. This flexibility goes
against the goal of "foolproof deniability", unfortunately, but
I think it is too early to know which default to set for the system).
2022-06-26 17:37:57 +08:00
Sean Cross
1388da7680 Merge remote-tracking branch 'origin/vault' into libstd-fs 2022-06-26 16:48:20 +08:00