Commit graph

610 commits

Author SHA1 Message Date
bunnie
de9af9cfd1 add std test templates to shellchat
some tests cherry-picked out of the `std` suite to help look
into locking problems in the kernel. Behind a feature gate
of `locktests`
2024-01-04 23:19:51 +08:00
bunnie
fda782663a bump version pins for xous change 2023-12-26 00:13:10 +08:00
nworbnhoj
7a75bf73e3
make net ws more robust to test websocket server connection failure 2023-12-12 16:12:22 +11:00
bunnie
fe2eb732a0 add a test for std seek 2023-12-10 12:54:06 +08:00
bunnie
fa3f349a0a bump pins as xous-rs has changed 2023-12-01 21:20:01 +08:00
nworbnhoj
e8e875742e replace more TcpStream::connect(&str) with TcpStream::connect((&str, u16))
resolves #453
2023-11-30 20:29:15 +11:00
bunnie
6ab88117f6 bump xous-api-log version & fix version pins 2023-10-31 20:07:28 +08:00
bunnie
d63b5912b1 absorb new xous-rs version 2023-10-10 16:50:00 +08:00
bunnie
83256257e1 bump xous-rs crate to absorb Send derives on Messages
this is necessary for the smoltcp port
2023-10-03 20:54:14 +08:00
bunnie
c072b18df6 remove nettest from the default args 2023-10-03 18:43:38 +08:00
bunnie
3dda5b967b add notes about net-tests that are intermittent or failing but waiving 2023-10-03 18:39:50 +08:00
bunnie
2faa518df8 add debug level setting on net stack 2023-10-03 17:18:07 +08:00
bunnie
ee18cb8e14 passing most nettests now. mostly an issue of poking at loopbacks. 2023-10-03 17:12:34 +08:00
bunnie
9f57ad96fd
Merge pull request #408 from nworbnhoj/chat
mtxchat app and chat library
2023-09-19 19:09:56 +08:00
nworbnhoj
c22419f7c7 bump rustls to harmonize versions 2023-09-13 06:57:39 +10:00
bunnie
478a612c02 commit version bump 2023-09-12 16:25:10 +08:00
Sean Cross
5dfad296ae xous: mark MemoryRange::as_slice and friends as unsafe
Mark `MemoryRange::as_slice()` and `MemoryRange::as_slice_mut()` as
unsafe.

This is due to the fact that not all representable types can be cast to
an arbitrary value. For example, if Process A sends random values to
Process B, then Process B casts the memory to a slice of `bool`, then
any values that are not 0 or 1 are undefined.

Because these functions can leak UB into the program, they are marked as
unsafe.

This patch adds `unsafe {}` blocks to all instances where this function
is called. Additionally, all instances have been checked to verify that
they do not cast to any invalid types -- most use `u8` or `u32`.

Additionally, the long-deprecated `MemoryRange::from_parts()` call was
removed, since that causes UB without being marked as unsafe.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-09-12 10:07:38 +08:00
bunnie
53469a68d0 publish package updates, sync to release tag 2023-08-08 14:35:49 +08:00
bunnie
b127cd093f bump version pins for change to xous-rs 2023-08-03 13:29:39 +08:00
bunnie
51278451a0 update version pins to pull in cramium target 2023-07-19 21:07:56 +08:00
bunnie
ecb42c6a0e Merge branch 'main' of github.com:betrusted-io/xous-core into main 2023-07-05 15:19:13 +08:00
bunnie
fc9cb5af8c fix dependency in hw mode 2023-07-05 13:54:21 +08:00
bunnie
2f54ae39d4 Merge branch 'fonts' into main 2023-07-05 13:47:26 +08:00
bunnie
dfffa48715 move default system font to gam/src/lib.rs SYSTEM_STYLE
default system font can be statically changed by modifying
the SYSTEM_STYLE constant.

This of course will lead to a request for a dynamically
configurable preference for font size. However, early
on it was decided this is a bad idea. Here's why.

We don't provide for dynamic system-wide font selection
because this adds a lot of complexity to what would otherwise
be static code: this is a deliberate choice to improve code
density and performance. If the system font were dynamically
adjustable, then every character rendered we would potentially
have to query the PDDB for the current system font setting.

The impact of this could be mitigated by caching values but
then what happens when you actually change the font? now
you need a registry to fire messages off to all dependent
crates with cached values to flush their caches and redraw
(or you punt and force a reboot if you change font sizes,
but still, you're creating a dependency on a lot of plumbing
for even the simplest crates).

Plus, with a static font selection, the compiler can take constants
like the font height and compose them with other fitting
parameters into optimized load/stores of borders and spacings
for the static case; if you make it dynamic, all those multiplies,
adds and divides now get pulled into the main rendering loop
and are recomputed all the time. For example, if you have a static
const list of items that need to be rendered, even if the code to
compute the height of the list is written as a for loop, the compiler
will know the list is constant, and the font height is constant,
and it can condense that all into a single number at compile time,
eliminating all the code for the for loop.

If you leave the option open to change that, that entire piece
of code has to be generated and executed even though in practice
nobody changes the parameter.
2023-07-05 13:39:11 +08:00
bunnie
afc8d96283
Merge pull request #395 from nworbnhoj/tls
Tls tidy-up
2023-07-04 00:57:56 -07:00
nworbnhoj
1a8c5fb080 update shellchat net tls notes 2023-07-04 17:11:25 +10:00
bunnie
4ac979f0ab update pins, again 2023-07-04 11:20:12 +08:00
bunnie
c9f8f2681b update version pins 2023-07-04 11:09:13 +08:00
nworbnhoj
f69b247398 fix tls feature dependency on ring 2023-06-29 20:28:23 +10:00
nworbnhoj
0545a08c8e remove redundant use rustls from net_cmd.rs 2023-06-29 13:13:01 +10:00
nworbnhoj
b8b591401f reconfigure [features] tls rootCA & websocket 2023-06-28 06:05:44 +10:00
nworbnhoj
aeeff17a6a relocate shellchat net tls sub-commands to libs/tls/src/cmd.rs 2023-06-27 14:38:11 +10:00
nworbnhoj
d6fe702278 improve tls error handling 2023-06-26 19:32:57 +10:00
nworbnhoj
ab8d40189a modify shellchat net tls test to use trusted CA certificates 2023-06-26 16:00:21 +10:00
nworbnhoj
6ef1e8d67c show help when: shellchat net tls <no sub-command> 2023-06-26 15:25:46 +10:00
nworbnhoj
33169f9df9 implement shellchat net tls trusted
list trusted Certificate Authority certificates
2023-06-26 12:38:12 +10:00
nworbnhoj
42eb72b3bd implement shellchat net tls mozilla
save/trust all Root CA's in webpki-roots en-masse
2023-06-26 11:46:54 +10:00
nworbnhoj
a741e7988b tidy-up tls cargo & use 2023-06-26 08:15:09 +10:00
nworbnhoj
4ea0c8457d implement tls::danger::StifledCertificateVerification
StifledCertificateVerification::verify_server_cert() will verify the certificate with the default rustls WebPkiVerifier, BUT specifically override a `CertificateError::UnknownIssuer` and return ServerCertVerified::assertion()

This allows us to use rustls to open a tls connection to a host with an untrusted certificate chain. And subsequently get to see the certificate chain, and possibly choose to trust the chain, or links in it.
2023-06-25 12:31:23 +10:00
nworbnhoj
5feaac2bae simplify shellchat net tls probe 2023-06-24 15:37:10 +10:00
nworbnhoj
a874ba307d implement shellchat "net tls probe" 2023-06-20 21:02:12 +10:00
nworbnhoj
e6ed977065 demote shellchat "net tls" to "net tls test" 2023-06-20 20:48:58 +10:00
bunnie
952ba18fba commit vesrion pin bumps 2023-06-16 01:30:18 +08:00
Jean-Pierre De Jesus DIAZ
2af737b57e
xous-rs: move LANG variable to locales
This change is made with the intention of making the xous-rs crate a bit
more freestanding without depending on the xtask build system.

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-06-15 18:23:12 +02:00
bunnie
118716da7b fix another 1.70 error 2023-06-05 01:45:10 +08:00
bunnie
0b32ac073b add scan state information to ssid scans
ssid scans can now be in-progress, and they also record
the time elapsed since the last scan was performed.

this allows the network manager to be a bit smarter about when
it decides to kick off a scan.

the ssid scan dialog box is also updated to show
the scan results in progress. This addresses #336.
2023-05-29 02:12:28 +08:00
bunnie
1b29ea0421 fixes #339
use the same API call used by `status` as in `shellchat`.
this should also fix the status bar reflecting the correct state.

code fixed but not explicitly tested; if I got this wrong
please re-open!
2023-05-28 18:01:46 +08:00
bunnie
fbe3cb2a3d bump package numbers to absorb PR #388 2023-05-28 15:58:11 +08:00
bunnie
5a2df4432c technical debt: cleanup UTRA package
- make the "base" field no longer public. It is accessible, but only
through an `unsafe` method, because, it is unsafe.
- add accessors to offest/mask fields. Because, it's not at all
unsafe to access these, and it can be useful for bit-ops that are
not part of the generic set of UTRA.
- add Arc to AtomicCSR, and require `std` for AtomicCSR types.
This should not break anything, I checked inside @foundation-devices
keyOS and they don't seem to be using AtomicCSR anywhere.

The Arc makes it a bit safer to clone the AtomicCSR base pointer
and share it between threads, but it will have an impact on performance.
The USB stack (which requires AtomicCSR) was regression testing and the
impact seems minimal.

Recall that the main purpose of AtomicCSR is to provide a CSR accessor
that does not require a mutable reference to the base object. This
can make certain Rust idioms a bit cleaner. We wrap the base accessor
in Arc+Atomic to try and improve the safety of throwing the borrow
checker under the bus, but it's still not perfect because hardware
mutable state can have side-effects within hardware itself that cannot
be modeled or checked by Rust's borrow checker.
2023-05-23 18:11:24 +08:00
bunnie
0065707528 add debug logging inside the shellchat command list
this helps us determine which server in the environment
creation list hangs
2023-05-21 17:20:27 +08:00