Commit Graph
100 Commits
Author SHA1 Message Date
Julien Cretin 420f062a21 Install Rust tools with stable compiler
We only need the frozen nightly for Tock (and maybe the app).
2021-09-09 07:04:24 +02:00
Julien Cretinandkaczmarczyck e02eaa2cac Remove elf2tab dev-dependency (#366)
We don't use it anymore. Not sure when we used to use it.

Fixes #364

Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com>
2021-08-10 13:20:33 +02:00
Julien Cretin 5c7df89198 Return error instead of debug assert (#363)
With dirty storage we hit the assert. Returning an error permits to continue to
catch if the invariant is broken for normal operation while being able to
continue fuzzing with dirty storage.
2021-08-10 13:09:22 +02:00
Julien Cretin 40d6040d41 Add erase_storage application example (#352) 2021-08-02 09:51:57 +02:00
Julien Cretin c34d5c7d8a Merge pull request #235 from ia0/v2_lib
Add latency example
2020-12-10 18:17:36 +01:00
Julien Cretin 371b8af224 Move choice between prod and test storage to embedded_flash module
This way all users of storage can share the logic to choose between flash or RAM
storage depending on the "std" feature. This is needed because the store_latency
example assumes flash storage but is built when running `cargo test
--features=std`.
2020-12-10 18:04:25 +01:00
Julien Cretin ece546a03b Merge branch 'master' into v2_lib 2020-12-10 17:08:00 +01:00
Julien Cretin f85454ef97 Merge pull request #234 from ia0/no_ram_storage
Remove ram_storage feature
2020-12-10 17:07:07 +01:00
Julien Cretin bbe03b40bf Merge branch 'master' into v2_lib 2020-12-10 16:55:16 +01:00
Julien Cretin 030bc8cf67 Merge branch 'master' into no_ram_storage 2020-12-10 16:53:44 +01:00
Julien Cretin 869e932349 Add asserts to make sure we compact 2020-12-10 16:51:30 +01:00
Julien Cretin 7a78d3e038 Merge pull request #237 from ia0/fix_lang_items
Fix lang items
2020-12-10 16:47:58 +01:00
Julien Cretin 7a641d6391 Use the new const_mut_refs default feature of linked_list_allocator
This is necessary for Heap::empty() to be const.
2020-12-10 16:20:26 +01:00
Julien Cretin d4b20a5acc Fix linked_list_allocator version to fix build
They released version 0.8.7 today which breaks our assumption that Heap::empty
is callable in const context.
2020-12-10 16:15:58 +01:00
Julien Cretin 8800c3e906 Merge branch 'master' into no_ram_storage 2020-12-10 15:48:45 +01:00
Julien Cretin ecbd3a036a Merge pull request #236 from ia0/v2_fuzz
Do not use delay_map anymore
2020-12-10 15:47:33 +01:00
Julien Cretin 19ebacec15 Do not use delay_map anymore
This permits to avoid copies. Before we used to do one copy per storage
operation. Now we do one copy per store operation.
2020-12-10 13:36:33 +01:00
Julien Cretin ae08221cdb Add latency example 2020-12-10 13:31:25 +01:00
Julien Cretin 4253854cf1 Remove ram_storage feature
We don't need to build a production key without persistent storage. Tests and
fuzzing continue to use the std feature to use the RAM implementation (that does
sanity checks).
2020-12-10 13:06:05 +01:00
Julien Cretin 3badcc8206 Merge pull request #204 from ia0/v2_lib
Use new persistent store library (and delete old)
2020-12-10 12:31:12 +01:00
Julien Cretin f5ef235c69 Merge branch 'master' into v2_lib 2020-12-10 09:38:26 +01:00
Julien Cretin 776093a68b Find the next free key in a linear way 2020-12-09 10:52:51 +01:00
Julien Cretin 8965c6c8fb Rename and use HARDWARE_FAILURE error 2020-12-08 20:45:27 +01:00
Julien Cretin 16c0196b1d Check global counter length 2020-12-04 14:42:16 +01:00
Julien Cretin 042108e3d9 Reserve 700 additional keys for credential-related stuff 2020-12-01 17:46:28 +01:00
Julien Cretin b55d432043 Apply review comments 2020-12-01 15:39:51 +01:00
Julien Cretin 1db73c699b Apply review comments 2020-12-01 11:29:52 +01:00
Julien Cretin 069a1b8f19 Merge branch 'master' into v2_lib 2020-11-30 15:55:14 +01:00
Julien Cretin 9d80b87b43 Merge pull request #226 from ia0/v2_fuzz
Add debug helper for fuzzing
2020-11-30 15:53:17 +01:00
Julien Cretin a0e3048f82 Add debug helper for fuzzing 2020-11-30 11:30:49 +01:00
Julien Cretin 5f80a4b3a3 Merge pull request #225 from ia0/v2_fuzz
Do not crash with dirty init
2020-11-30 11:23:41 +01:00
Julien Cretin 7997041be0 Merge branch 'master' into v2_lib 2020-11-30 10:34:54 +01:00
Julien Cretin f548a35f01 Do not crash with dirty init 2020-11-30 10:29:18 +01:00
Julien Cretin 44b35169af Merge pull request #210 from ia0/v2_fuzz
Add store fuzzing
2020-11-30 10:11:52 +01:00
Julien Cretin a0801c3023 Merge branch 'master' into v2_lib 2020-11-28 19:27:21 +01:00
Julien Cretin ed5a9e5b24 Apply review comments 2020-11-28 19:01:16 +01:00
Julien Cretin 9f04408433 Merge branch 'master' into v2_fuzz 2020-11-28 18:45:41 +01:00
Julien Cretin b0dc019b4e Merge pull request #220 from ia0/fix_driver_crash
Do not crash in the driver for store errors
2020-11-24 16:55:42 +01:00
Julien Cretin 2add1c2cd2 Merge branch 'master' into fix_driver_crash 2020-11-24 16:46:21 +01:00
Julien Cretin 29ee45de6c Do not crash in the driver for store errors
We prefer to return those errors to the fuzzer which can then decide whether
they are expected or not (e.g. when starting from a dirty storage, the store is
expected to have errors).
2020-11-24 11:31:54 +01:00
Julien Cretin e842da0de7 Add store fuzzing 2020-11-19 11:27:50 +01:00
Julien Cretin 78e801c32a Merge pull request #209 from ia0/v2_fuzz
Add stats for fuzzing
2020-11-19 11:22:32 +01:00
Julien Cretin bbb73c77a8 Use width_lim instead of bucket_lim 2020-11-17 10:16:39 +01:00
Julien Cretin fcc9484510 Add stats for fuzzing 2020-11-16 22:44:10 +01:00
Julien Cretin cd898fbbf7 Merge pull request #206 from ia0/v2_fuzz
Add histogram for fuzzing
2020-11-16 22:30:37 +01:00
Julien Cretin fbb1be84a4 Merge branch 'master' into v2_fuzz 2020-11-16 22:15:57 +01:00
Julien Cretin de77d4fc0c Add histogram for fuzzing 2020-11-13 10:34:23 +01:00
Julien Cretin 73162ea82c Merge pull request #203 from ia0/v2_fuzz
Create fuzzing and add entropy helpers
2020-11-13 10:29:45 +01:00
Julien Cretin 1c2e450660 Improve documentation 2020-11-12 16:24:35 +01:00
Julien Cretin db5b21a4ff Add more documentation 2020-11-12 10:54:23 +01:00
Julien Cretin c6f9270be1 Update documentation 2020-11-11 17:52:33 +01:00
Julien Cretin 5673b9148f Use new persistent store library (and delete old) 2020-11-11 17:31:31 +01:00
Julien Cretin d3ee698d69 Build store fuzzing in run_desktop_tests too 2020-11-11 12:56:36 +01:00
Julien Cretin 163e92fa6b Create fuzzing and add entropy helpers 2020-11-11 12:30:24 +01:00
Julien Cretin 8d33c7866d Merge pull request #197 from ia0/v2_lib
Add driver for new store
2020-11-11 12:09:06 +01:00
Julien Cretin d5a43c346f Rename into_ into extract_ 2020-11-11 10:28:32 +01:00
Julien Cretin 833f195d88 Merge branch 'master' into v2_lib 2020-11-10 19:44:45 +01:00
Julien Cretin 0e4be8ca4a Update documentation 2020-11-10 19:44:28 +01:00
Julien Cretin 45332158df Add driver for new store 2020-11-03 21:27:32 +01:00
Julien Cretin aa4bc7faaa Merge pull request #193 from ia0/v2_lib
Add new store (without tests yet)
2020-11-03 21:25:17 +01:00
Julien Cretin a024e642d3 Return zero instead of negative immediate capacity 2020-11-03 13:30:39 +01:00
Julien Cretin 410314b780 Move transaction validity check to Format 2020-11-03 12:54:30 +01:00
Julien Cretin d734da3a0e Move transaction capacity formula to Format 2020-11-03 12:39:38 +01:00
Julien Cretin b97758dd99 Do not use import ::* 2020-11-03 11:58:20 +01:00
Julien Cretin 233c15b20c Add new store (without tests yet) 2020-11-02 11:17:09 +01:00
Julien Cretin c9fc621f59 Merge pull request #192 from ia0/v2_lib
Clarify different integer types
2020-11-02 11:16:06 +01:00
Julien Cretin 4b48c668be Merge branch 'master' into v2_lib 2020-11-02 10:14:41 +01:00
Julien Cretin 9778ea7fd2 Introduce distinct integer types
This PR does the following things:
- Give incompatible representations for integers with different semantics:
  - `usize` is used for natural numbers for the public API.
  - `Nat` is used internally for natural numbers (essentially a stable `usize`).
  - `Word` is used for sequences of bits representing words in flash.
  - `Position` is used for word positions in the virtual storage.
- Only use fixed size integers to preserve overflow behavior between targets.
- Use little-endian representation instead of native representation for `Word`.

Alternatives:
- Run tests and fuzzing on 32-bits architecture (or some compatibility mode).
  This approach would have better readability than the current solution (less
  conversions at public API). However it would require additional setup and
  might not be viable long-term by restricting machines on which fuzzing is
  possible.
- Accept the behavior difference for tests and fuzzing. This approach would also
  have better readability. However checking for arithmetic overflow (and other
  `usize` related concerns like memory size) is more important.
2020-10-29 18:48:15 +01:00
Julien Cretin dea28f622f Merge pull request #190 from ia0/v2_lib
Add model for new store
2020-10-29 13:29:49 +01:00
Julien Cretin 5ce91947b6 Fix StoreRatio fields visibility and improve documentation 2020-10-29 12:23:34 +01:00
Julien Cretin 8e22fbd9a6 Merge branch 'master' into v2_lib 2020-10-29 08:21:13 +01:00
Julien Cretin e7303ed7c6 Add model for new store 2020-10-27 14:23:39 +01:00
Julien Cretin 55ceec2a21 Merge pull request #172 from ia0/v2_lib
Add format helpers for new store
2020-10-27 14:13:33 +01:00
Julien Cretin 71815cad09 Update ERASED_WORD definition to use WORD 2020-10-27 13:45:18 +01:00
Julien Cretin edd1bcf5d2 Do not inline constants in documentation 2020-10-27 11:25:08 +01:00
Julien Cretin ab8b90b596 Merge branch 'master' into v2_lib 2020-10-27 11:09:52 +01:00
Julien Cretin 1f0f2d16e3 Merge pull request #189 from ia0/travis
Remove unused .travis.yml
2020-10-27 11:09:23 +01:00
Julien Cretin 1ef1a8d95b Remove unused .travis.yml 2020-10-27 10:36:16 +01:00
Julien Cretin 552bab6ba9 Remove public visibility for internal function 2020-10-26 17:51:40 +01:00
Julien Cretin cb3369213f Fix merge missing conflict 2020-10-23 17:27:20 +02:00
Julien Cretin 3755be1625 Merge branch 'master' into v2_lib 2020-10-23 17:20:19 +02:00
Julien Cretin 6bb11f09f0 Merge pull request #187 from ia0/v2_buffer
Add buffer storage for new store
2020-10-23 17:18:32 +02:00
Julien Cretin 99e2d07156 Fix documentation 2020-10-23 16:38:48 +02:00
Julien Cretin f52ea953b8 Improve documentation 2020-10-23 15:38:21 +02:00
Julien Cretin 34ad35fdc1 Fix documentation 2020-10-23 11:52:21 +02:00
Julien Cretin f5e6f8728f Do not use nightly features 2020-10-23 08:41:44 +02:00
Julien Cretin d8f405baab Add missing alloc crate 2020-10-23 08:37:09 +02:00
Julien Cretin 10ac76e58a Add buffer storage for new store 2020-10-23 08:22:30 +02:00
Julien Cretin b7fff97a8e Merge branch 'master' into v2_lib 2020-10-23 08:06:47 +02:00
Julien Cretin 43924ff8f4 Merge branch 'master' into v2_lib 2020-10-15 16:30:38 +02:00
Julien Cretin f8fe1a9493 Add small proofs 2020-10-14 17:36:52 +02:00
Julien Cretin c098f2695b Clarify current supported values 2020-10-14 12:20:48 +02:00
Julien Cretin 223908febd Remove confusing clarification 2020-10-14 11:41:46 +02:00
Julien Cretin 8191378b40 Merge branch 'master' into v2_lib 2020-10-14 11:16:00 +02:00
Julien Cretin 0aece24e0a Merge pull request #181 from ia0/disable_reproducible_workflow
Disable reproducible workflow
2020-10-13 15:49:39 +02:00
Julien Cretin 4c76d5618e Show the diff but do not fail 2020-10-13 14:59:31 +02:00
Julien Cretin f512645837 Improve documentation 2020-10-13 12:46:25 +02:00
Julien Cretin eede767fe3 Improve documentation 2020-10-12 18:07:29 +02:00
Julien Cretin 0242873a23 Improve comments 2020-10-12 16:25:25 +02:00
Julien Cretin d721949806 Improve documentation 2020-10-12 14:40:30 +02:00