Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target
Cargo.lock
18 changes: 18 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[workspace]
resolver = "2"
members = [
"libnyx",
"libnyx_config",
"libnyx_fuzz_runner",
"acat",
]
default_members = [
"libnyx",
"libnyx_config",
"libnyx_fuzz_runner",
"acat",
]

[workspace.package]
version = "0.1.0"
license = "GPLv2"
2 changes: 1 addition & 1 deletion acat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
fuzz_runner={path="../fuzz_runner"}
libnyx_fuzz_runner={path="../libnyx_fuzz_runner"}
colored = "2.0.0"
clap="2.33.0"
2 changes: 1 addition & 1 deletion acat/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use fuzz_runner::nyx::aux_buffer::{self, AUX_BUFFER_SIZE};
use libnyx_fuzz_runner::nyx::aux_buffer::{self, AUX_BUFFER_SIZE};

use clap::{App, Arg, AppSettings};

Expand Down
4 changes: 2 additions & 2 deletions libnyx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ crate-type = ["lib", "staticlib", "dylib"]
cbindgen = "0.28.0"

[dependencies]
config={path="../config"}
fuzz_runner={path="../fuzz_runner"}
libnyx_config={path="../libnyx_config"}
libnyx_fuzz_runner={path="../libnyx_fuzz_runner"}
libc = "0.2"
2 changes: 1 addition & 1 deletion libnyx/src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use libc::c_char;
use std::ffi::CStr;
use std::ffi::c_void;

use fuzz_runner::nyx::aux_buffer::{NYX_CRASH, NYX_HPRINTF, NYX_ABORT};
use libnyx_fuzz_runner::nyx::aux_buffer::{NYX_CRASH, NYX_HPRINTF, NYX_ABORT};
use super::*;

/* Helper function to load a C string pointer and return a Rust string. */
Expand Down
10 changes: 5 additions & 5 deletions libnyx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/
extern crate libc;

use config::{Config, FuzzRunnerConfig, QemuNyxRole};
use libnyx_config::{Config, FuzzRunnerConfig, QemuNyxRole};

use fuzz_runner::nyx::qemu_process::QemuProcess;
use fuzz_runner::nyx::aux_buffer::{NYX_SUCCESS, NYX_CRASH, NYX_TIMEOUT, NYX_INPUT_WRITE, NYX_ABORT};
use libnyx_fuzz_runner::nyx::qemu_process::QemuProcess;
use libnyx_fuzz_runner::nyx::aux_buffer::{NYX_SUCCESS, NYX_CRASH, NYX_TIMEOUT, NYX_INPUT_WRITE, NYX_ABORT};
use libc::fcntl;

use std::fmt;
Expand Down Expand Up @@ -258,7 +258,7 @@ impl NyxProcess {
let sharedir = config.sharedir_path();
config.set_worker_id(worker_id);

match fuzz_runner::nyx::qemu_process_new(sharedir.to_string(), &config.config){
match libnyx_fuzz_runner::nyx::qemu_process_new(sharedir.to_string(), &config.config){
Ok(x) => Ok(NyxProcess{
process: x,
}),
Expand Down Expand Up @@ -389,5 +389,5 @@ impl NyxProcess {
}

pub fn remove_work_dir(workdir: &str) -> Result<(), String> {
fuzz_runner::nyx::qemu_process::remove_workdir_safe(workdir)
libnyx_fuzz_runner::nyx::qemu_process::remove_workdir_safe(workdir)
}
File renamed without changes.
2 changes: 1 addition & 1 deletion config/Cargo.toml → libnyx_config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "config"
name = "libnyx_config"
version = "0.1.0"
authors = ["coco <cornelius@hexgolems.com>"]
edition = "2021"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions fuzz_runner/Cargo.toml → libnyx_fuzz_runner/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "fuzz_runner"
name = "libnyx_fuzz_runner"
version = "0.1.0"
authors = ["coco <cornelius@hexgolems.com>"]
edition = "2021"
Expand All @@ -19,7 +19,7 @@ byteorder = "*"
snafu = "0.6.3"
timeout-readwrite = "0.3.1"
glob="0.3.0"
config={path="../config"}
libnyx_config={path="../libnyx_config"}
colored = "2.0.0"
derivative = "2.1.1"
fs4 = "0.5.4"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion fuzz_runner/src/lib.rs → libnyx_fuzz_runner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extern crate nix;
extern crate serde_derive;
extern crate snafu;
extern crate timeout_readwrite;
extern crate config;
extern crate libnyx_config;


pub mod exitreason;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub use qemu_process::QemuProcess;
use std::fs;
use std::path::PathBuf;

extern crate config;
extern crate libnyx_config;

fn into_absolute_path(sharedir: &str) -> String{

Expand All @@ -23,7 +23,7 @@ fn into_absolute_path(sharedir: &str) -> String{
}
}

pub fn qemu_process_new(sharedir: String, cfg: &config::Config) -> Result<QemuProcess, String> {
pub fn qemu_process_new(sharedir: String, cfg: &libnyx_config::Config) -> Result<QemuProcess, String> {


let qemu_params = params::QemuParams::new(into_absolute_path(&sharedir), cfg);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::time::Duration;
use crate::{config::{Config, FuzzRunnerConfig, QemuNyxRole}, QemuProcess};
use crate::{libnyx_config::{Config, FuzzRunnerConfig, QemuNyxRole}, QemuProcess};

pub struct QemuParams {
pub cmd: Vec<String>,
Expand Down