Revert "Bump solana_rbpf to version 0.2.12 (#17585)"
This reverts commit 231a3bda8e
.
This commit is contained in:
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -5898,9 +5898,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana_rbpf"
|
name = "solana_rbpf"
|
||||||
version = "0.2.12"
|
version = "0.2.11"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c44596a3613a44f76a7f6e5205464a1e78d1529fa19e8eacde0b9e55a6387f50"
|
checksum = "7c1c5bdfa63c68d848d95024c7f4335bae4b1917f7df2e48e2d945f4664a8b45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"combine",
|
"combine",
|
||||||
|
@ -40,7 +40,7 @@ solana-config-program = { path = "../programs/config", version = "=1.8.7" }
|
|||||||
solana-faucet = { path = "../faucet", version = "=1.8.7" }
|
solana-faucet = { path = "../faucet", version = "=1.8.7" }
|
||||||
solana-logger = { path = "../logger", version = "=1.8.7" }
|
solana-logger = { path = "../logger", version = "=1.8.7" }
|
||||||
solana-net-utils = { path = "../net-utils", version = "=1.8.7" }
|
solana-net-utils = { path = "../net-utils", version = "=1.8.7" }
|
||||||
solana_rbpf = "=0.2.12"
|
solana_rbpf = "=0.2.11"
|
||||||
solana-remote-wallet = { path = "../remote-wallet", version = "=1.8.7" }
|
solana-remote-wallet = { path = "../remote-wallet", version = "=1.8.7" }
|
||||||
solana-sdk = { path = "../sdk", version = "=1.8.7" }
|
solana-sdk = { path = "../sdk", version = "=1.8.7" }
|
||||||
solana-transaction-status = { path = "../transaction-status", version = "=1.8.7" }
|
solana-transaction-status = { path = "../transaction-status", version = "=1.8.7" }
|
||||||
|
@ -10,7 +10,7 @@ use {
|
|||||||
clap::{App, AppSettings, Arg, ArgMatches, SubCommand},
|
clap::{App, AppSettings, Arg, ArgMatches, SubCommand},
|
||||||
log::*,
|
log::*,
|
||||||
solana_account_decoder::{UiAccountEncoding, UiDataSliceConfig},
|
solana_account_decoder::{UiAccountEncoding, UiDataSliceConfig},
|
||||||
solana_bpf_loader_program::{BpfError, ThisInstructionMeter},
|
solana_bpf_loader_program::{bpf_verifier, BpfError, ThisInstructionMeter},
|
||||||
solana_clap_utils::{self, input_parsers::*, input_validators::*, keypair::*},
|
solana_clap_utils::{self, input_parsers::*, input_validators::*, keypair::*},
|
||||||
solana_cli_output::{
|
solana_cli_output::{
|
||||||
CliProgram, CliProgramAccountType, CliProgramAuthority, CliProgramBuffer, CliProgramId,
|
CliProgram, CliProgramAccountType, CliProgramAuthority, CliProgramBuffer, CliProgramId,
|
||||||
@ -24,10 +24,7 @@ use {
|
|||||||
rpc_filter::{Memcmp, MemcmpEncodedBytes, RpcFilterType},
|
rpc_filter::{Memcmp, MemcmpEncodedBytes, RpcFilterType},
|
||||||
tpu_client::{TpuClient, TpuClientConfig},
|
tpu_client::{TpuClient, TpuClientConfig},
|
||||||
},
|
},
|
||||||
solana_rbpf::{
|
solana_rbpf::vm::{Config, Executable},
|
||||||
verifier,
|
|
||||||
vm::{Config, Executable},
|
|
||||||
},
|
|
||||||
solana_remote_wallet::remote_wallet::RemoteWalletManager,
|
solana_remote_wallet::remote_wallet::RemoteWalletManager,
|
||||||
solana_sdk::{
|
solana_sdk::{
|
||||||
account::Account,
|
account::Account,
|
||||||
@ -1989,7 +1986,7 @@ fn read_and_verify_elf(program_location: &str) -> Result<Vec<u8>, Box<dyn std::e
|
|||||||
// Verify the program
|
// Verify the program
|
||||||
<dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(
|
<dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(
|
||||||
&program_data,
|
&program_data,
|
||||||
Some(|x| verifier::check(x)),
|
Some(|x| bpf_verifier::check(x)),
|
||||||
Config::default(),
|
Config::default(),
|
||||||
)
|
)
|
||||||
.map_err(|err| format!("ELF error: {}", err))?;
|
.map_err(|err| format!("ELF error: {}", err))?;
|
||||||
|
4
programs/bpf/Cargo.lock
generated
4
programs/bpf/Cargo.lock
generated
@ -3698,9 +3698,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana_rbpf"
|
name = "solana_rbpf"
|
||||||
version = "0.2.12"
|
version = "0.2.11"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c44596a3613a44f76a7f6e5205464a1e78d1529fa19e8eacde0b9e55a6387f50"
|
checksum = "7c1c5bdfa63c68d848d95024c7f4335bae4b1917f7df2e48e2d945f4664a8b45"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.3.4",
|
"byteorder 1.3.4",
|
||||||
"combine",
|
"combine",
|
||||||
|
@ -30,7 +30,7 @@ solana-bpf-loader-program = { path = "../bpf_loader", version = "=1.8.7" }
|
|||||||
solana-cli-output = { path = "../../cli-output", version = "=1.8.7" }
|
solana-cli-output = { path = "../../cli-output", version = "=1.8.7" }
|
||||||
solana-logger = { path = "../../logger", version = "=1.8.7" }
|
solana-logger = { path = "../../logger", version = "=1.8.7" }
|
||||||
solana-measure = { path = "../../measure", version = "=1.8.7" }
|
solana-measure = { path = "../../measure", version = "=1.8.7" }
|
||||||
solana_rbpf = "=0.2.12"
|
solana_rbpf = "=0.2.11"
|
||||||
solana-runtime = { path = "../../runtime", version = "=1.8.7" }
|
solana-runtime = { path = "../../runtime", version = "=1.8.7" }
|
||||||
solana-sdk = { path = "../../sdk", version = "=1.8.7" }
|
solana-sdk = { path = "../../sdk", version = "=1.8.7" }
|
||||||
solana-transaction-status = { path = "../../transaction-status", version = "=1.8.7" }
|
solana-transaction-status = { path = "../../transaction-status", version = "=1.8.7" }
|
||||||
|
@ -21,7 +21,7 @@ sha3 = "0.9.1"
|
|||||||
solana-measure = { path = "../../measure", version = "=1.8.7" }
|
solana-measure = { path = "../../measure", version = "=1.8.7" }
|
||||||
solana-runtime = { path = "../../runtime", version = "=1.8.7" }
|
solana-runtime = { path = "../../runtime", version = "=1.8.7" }
|
||||||
solana-sdk = { path = "../../sdk", version = "=1.8.7" }
|
solana-sdk = { path = "../../sdk", version = "=1.8.7" }
|
||||||
solana_rbpf = "=0.2.12"
|
solana_rbpf = "=0.2.11"
|
||||||
thiserror = "1.0"
|
thiserror = "1.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#![allow(clippy::integer_arithmetic)]
|
#![allow(clippy::integer_arithmetic)]
|
||||||
pub mod alloc;
|
pub mod alloc;
|
||||||
pub mod allocator_bump;
|
pub mod allocator_bump;
|
||||||
|
pub mod bpf_verifier;
|
||||||
pub mod deprecated;
|
pub mod deprecated;
|
||||||
pub mod serialization;
|
pub mod serialization;
|
||||||
pub mod syscalls;
|
pub mod syscalls;
|
||||||
@ -10,6 +11,7 @@ pub mod with_jit;
|
|||||||
|
|
||||||
use {
|
use {
|
||||||
crate::{
|
crate::{
|
||||||
|
bpf_verifier::VerifierError,
|
||||||
serialization::{deserialize_parameters, serialize_parameters},
|
serialization::{deserialize_parameters, serialize_parameters},
|
||||||
syscalls::SyscallError,
|
syscalls::SyscallError,
|
||||||
},
|
},
|
||||||
@ -21,7 +23,6 @@ use {
|
|||||||
error::{EbpfError, UserDefinedError},
|
error::{EbpfError, UserDefinedError},
|
||||||
memory_region::MemoryRegion,
|
memory_region::MemoryRegion,
|
||||||
static_analysis::Analysis,
|
static_analysis::Analysis,
|
||||||
verifier::{self, VerifierError},
|
|
||||||
vm::{Config, EbpfVm, Executable, InstructionMeter},
|
vm::{Config, EbpfVm, Executable, InstructionMeter},
|
||||||
},
|
},
|
||||||
solana_runtime::message_processor::MessageProcessor,
|
solana_runtime::message_processor::MessageProcessor,
|
||||||
@ -102,8 +103,8 @@ pub fn create_executor(
|
|||||||
let (_, elf_bytes) = executable
|
let (_, elf_bytes) = executable
|
||||||
.get_text_bytes()
|
.get_text_bytes()
|
||||||
.map_err(|e| map_ebpf_error(invoke_context, e))?;
|
.map_err(|e| map_ebpf_error(invoke_context, e))?;
|
||||||
verifier::check(elf_bytes)
|
bpf_verifier::check(elf_bytes)
|
||||||
.map_err(|e| map_ebpf_error(invoke_context, EbpfError::UserError(e.into())))?;
|
.map_err(|e| map_ebpf_error(invoke_context, EbpfError::UserError(e)))?;
|
||||||
executable.set_syscall_registry(syscall_registry);
|
executable.set_syscall_registry(syscall_registry);
|
||||||
if use_jit {
|
if use_jit {
|
||||||
if let Err(err) = executable.jit_compile() {
|
if let Err(err) = executable.jit_compile() {
|
||||||
@ -1070,12 +1071,12 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[should_panic(expected = "LDDWCannotBeLast")]
|
#[should_panic(expected = "VerifierError(LDDWCannotBeLast)")]
|
||||||
fn test_bpf_loader_check_load_dw() {
|
fn test_bpf_loader_check_load_dw() {
|
||||||
let prog = &[
|
let prog = &[
|
||||||
0x18, 0x00, 0x00, 0x00, 0x88, 0x77, 0x66, 0x55, // first half of lddw
|
0x18, 0x00, 0x00, 0x00, 0x88, 0x77, 0x66, 0x55, // first half of lddw
|
||||||
];
|
];
|
||||||
verifier::check(prog).unwrap();
|
bpf_verifier::check(prog).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Reference in New Issue
Block a user