Commit Graph

461 Commits

Author SHA1 Message Date
7686b70381 Bumps RBPF to v0.2.4 (#14865) 2021-01-26 14:45:03 -08:00
77572a7c53 Track account writable deescalation (#14626) 2021-01-22 15:28:01 -08:00
3c6dbd21d2 Add ic_msg()/ic_logger_msg() macros 2021-01-21 21:41:33 +00:00
a480b63234 Bail on small deploy buffers (#14677) 2021-01-20 01:56:44 +00:00
e3bd9e5300 Prevent the invoke and upgrade of programs in the same tx batch (#14653)
* Prevent the invoke and upgrade of programs in the same tx batch

* Pass program address as writable in the upgrade instruction
2021-01-19 16:24:44 -08:00
6e8a1ba7de Load executable accounts from invoke context (#14574) 2021-01-14 00:19:22 -08:00
0d26cb6d37 Bump RBPF version to v0.2.3 2021-01-11 21:29:00 -08:00
ec48631fc5 Bail on all CPI errors (#14500)
* Bail on all CPI errors

* whitespace
2021-01-09 02:27:39 +00:00
9d53eca6e3 Report correct program id (#14486) 2021-01-08 14:43:24 -08:00
58487c6360 Add buffer authority to upgradeable loader (#14482) 2021-01-08 09:37:57 -08:00
5eacc5d08d Enable program upgrades via CPI (#14449) 2021-01-06 14:31:14 -08:00
a8b5a32b50 Gate cpi program account passing (#14443) 2021-01-05 21:53:41 +00:00
0619805806 Upgradeable programs needs program account's address as program id (#14417) 2021-01-04 21:45:05 +00:00
2d8dacb72b Gate CPI authorized programs (#14361) 2020-12-30 18:13:37 -08:00
1c5427ff17 Remove assert (#14356) 2020-12-30 21:07:22 +00:00
6c6095abe7 nit: clarify loader id (#14355) 2020-12-30 20:02:29 +00:00
5524938a50 Limit CPI instruction size (#14317) 2020-12-29 01:14:17 +00:00
ee0a80a092 Prevent bpf loader impersonators (#14278) 2020-12-24 03:04:48 +00:00
b1d702a618 Don't use caller passed executable account (#14276) 2020-12-23 14:34:14 -08:00
0b479ab180 Limit CPI from calling loader or native programs (#14252) 2020-12-23 10:44:34 -08:00
ab205b682a Upgradeable programs called same as non-upgradeable (#14239)
* Upgradeable programs called same as non-upgradeable

* nudge
2020-12-22 09:26:55 -08:00
e8cc0bef6c Add CPI support for upgradeable loader (#14193) 2020-12-17 15:39:49 -08:00
593ad80954 Fix program account rent exemption (#14176) 2020-12-17 09:02:31 +00:00
025f886e10 check for resize access violations (#14142) 2020-12-15 23:21:08 -08:00
1e977ac025 Bump version to v1.6.0 2020-12-15 18:28:04 +00:00
d513b0c4ca Add Program loader/environment instruction errors (#14120) 2020-12-15 09:54:07 -08:00
ab98c1f2d4 Add try_find_program_address syscall (#14118) 2020-12-15 08:15:01 -08:00
9e90394583 Upgradeable loader (#13689) 2020-12-14 15:35:10 -08:00
a9185d4ea1 chore: bump rustversion from 1.0.3 to 1.0.4 (#14022)
* chore: bump rustversion from 1.0.3 to 1.0.4

Bumps [rustversion](https://github.com/dtolnay/rustversion) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/dtolnay/rustversion/releases)
- [Commits](https://github.com/dtolnay/rustversion/compare/1.0.3...1.0.4)

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2020-12-13 03:56:27 +09:00
83fda2d972 Clean invoke in prep for native invoke (#14055) 2020-12-10 18:25:57 -08:00
5ea80e673f Fix priv escalation test (#14046) 2020-12-10 22:36:33 +00:00
201637b326 Updates rbpf to v0.2.2 (#14036)
* Updates rbpf to v0.2.2
2020-12-10 16:32:54 +01:00
e1a4251b07 Cap CPI signers (#14021) 2020-12-09 02:14:53 -08:00
a706706572 Validator CLI option to enable just-in-time compilation of BPF (#13789)
* Adds a CLI option to the validator to enable just-in-time compilation of BPF.

* Refactoring to use bpf_loader_program instead of feature_set to pass JIT flag from the validator CLI to the executor.
2020-12-07 09:49:55 +01:00
f1fd999bb0 Translate data length as mutable (#13956) 2020-12-04 05:47:22 +00:00
661ca52135 Cap seeds not signers (#13941) 2020-12-03 09:58:25 -08:00
1c51711c75 Invoke with empty account slice (#13931) 2020-12-03 07:06:26 -08:00
3f841df7cf Cap number of program address seeds (#13924) 2020-12-02 22:25:06 +00:00
841c7a0f71 Cleanup memory translation APIs (#13921) 2020-12-02 20:03:36 +00:00
85bec37be4 Translate data length and owner as writable (#13914) 2020-12-02 09:05:42 -08:00
733fcbaa6c Check that the program was granted access to program_id (#13890) 2020-12-01 07:35:07 -08:00
2d62f2ad03 Re-fix arithmetic overflow and add better test (#13870) 2020-11-30 22:39:03 +00:00
cc78667118 Record instructions after account translation 2020-11-28 10:54:09 -08:00
c833ede4af Rbpf v0.2.1 (#13732)
* Refactoring to match rbpf-v0.2.1 and add JIT compilation caching.

* Removes obsolete bpf-trace.py which has been replaced by the rbpf CLI tool.
2020-11-24 18:00:19 +01:00
3a9dca0c67 Add back BPF error logging (#13633)
* Add back BPF error logging

* Update programs/bpf_loader/src/lib.rs

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-11-17 08:10:14 +00:00
8c922a0198 fix arithmetic overflow in slice translation (#13624)
* fix arithmetic overflow in slice translation

* nudge
2020-11-17 00:13:01 +00:00
baa6b3a261 Add stable program logging for BPF and native programs 2020-11-14 08:26:01 -08:00
30ef53cb13 fix bpf lddw check (#13554) 2020-11-12 13:13:42 -08:00
461ae40eea provide full Rust panic messages in BPF and add memory optimizations (#13455) 2020-11-09 13:40:26 -08:00
4999fe298b Rbpf v0.2.0 (#13365)
* Updates rbpf to v0.2.0,
which unifies the interfaces of the interpreter and the JIT.
However, the JIT is not enabled yet.
2020-11-04 18:46:26 +01:00