Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ksud: replace some utils with rust libraries #142

Merged
merged 1 commit into from
Jan 30, 2023
Merged

Conversation

skbeh
Copy link
Contributor

@skbeh skbeh commented Jan 29, 2023

No description provided.

userspace/ksud/Cross.toml Outdated Show resolved Hide resolved
userspace/ksud/src/module.rs Outdated Show resolved Hide resolved
userspace/ksud/src/module.rs Show resolved Hide resolved
userspace/ksud/src/restorecon.rs Outdated Show resolved Hide resolved
userspace/ksud/src/restorecon.rs Outdated Show resolved Hide resolved
userspace/ksud/src/utils.rs Outdated Show resolved Hide resolved
userspace/ksud/src/utils.rs Outdated Show resolved Hide resolved
@tiann tiann enabled auto-merge (squash) January 29, 2023 11:08
auto-merge was automatically disabled January 29, 2023 12:32

Head branch was pushed to by a user without write access

@tiann tiann enabled auto-merge (squash) January 29, 2023 12:37
auto-merge was automatically disabled January 29, 2023 16:01

Head branch was pushed to by a user without write access

@skbeh skbeh force-pushed the rust-utils branch 2 times, most recently from f1735f8 to 48d9ae2 Compare January 29, 2023 16:03
@skbeh skbeh requested a review from tiann January 29, 2023 16:03
userspace/ksud/src/module.rs Outdated Show resolved Hide resolved
userspace/ksud/src/module.rs Show resolved Hide resolved
userspace/ksud/src/debug.rs Outdated Show resolved Hide resolved
userspace/ksud/src/module.rs Outdated Show resolved Hide resolved
userspace/ksud/src/module.rs Outdated Show resolved Hide resolved
userspace/ksud/src/module.rs Outdated Show resolved Hide resolved
@tiann
Copy link
Owner

tiann commented Jan 30, 2023

I build it locally, but it fails with:

   Compiling loopdev v0.4.0
error: failed to run custom build command for `loopdev v0.4.0`

Caused by:
  process didn't exit successfully: `/Users/weishu/dev/github/KernelSU/userspace/ksud/target/release/build/loopdev-f50478a17c205526/build-script-build` (exit status: 101)
  --- stderr
  /Users/weishu/.cargo/registry/src/github.com-1ecc6299db9ec823/loopdev-0.4.0/wrapper.h:1:10: fatal error: 'linux/loop.h' file not found

(I did't use cross)

@tiann
Copy link
Owner

tiann commented Jan 30, 2023

And i take a look at loopdev, i worry about its stability: mdaffin/loopdev#34 (we do retries before)

@tiann
Copy link
Owner

tiann commented Jan 30, 2023

I build it locally, but it fails with:

   Compiling loopdev v0.4.0
error: failed to run custom build command for `loopdev v0.4.0`

Caused by:
  process didn't exit successfully: `/Users/weishu/dev/github/KernelSU/userspace/ksud/target/release/build/loopdev-f50478a17c205526/build-script-build` (exit status: 101)
  --- stderr
  /Users/weishu/.cargo/registry/src/github.com-1ecc6299db9ec823/loopdev-0.4.0/wrapper.h:1:10: fatal error: 'linux/loop.h' file not found

(I did't use cross)

Resolved by set BINDGEN_EXTRA_CLANG_ARGS_

@skbeh
Copy link
Contributor Author

skbeh commented Jan 30, 2023

I build it locally, but it fails with:

   Compiling loopdev v0.4.0
error: failed to run custom build command for `loopdev v0.4.0`

Caused by:
  process didn't exit successfully: `/Users/weishu/dev/github/KernelSU/userspace/ksud/target/release/build/loopdev-f50478a17c205526/build-script-build` (exit status: 101)
  --- stderr
  /Users/weishu/.cargo/registry/src/github.com-1ecc6299db9ec823/loopdev-0.4.0/wrapper.h:1:10: fatal error: 'linux/loop.h' file not found

(I did't use cross)

Maybe you don't have Linux headers installed?

userspace/ksud/Cargo.toml Outdated Show resolved Hide resolved
@tiann
Copy link
Owner

tiann commented Jan 30, 2023

I build it locally, but it fails with:

   Compiling loopdev v0.4.0
error: failed to run custom build command for `loopdev v0.4.0`

Caused by:
  process didn't exit successfully: `/Users/weishu/dev/github/KernelSU/userspace/ksud/target/release/build/loopdev-f50478a17c205526/build-script-build` (exit status: 101)
  --- stderr
  /Users/weishu/.cargo/registry/src/github.com-1ecc6299db9ec823/loopdev-0.4.0/wrapper.h:1:10: fatal error: 'linux/loop.h' file not found

(I did't use cross)

Maybe you don't have Linux headers installed?

I didn't set the bindgen env correctly, it is working now.

@tiann
Copy link
Owner

tiann commented Jan 30, 2023

Thank you, this is cool!

@tiann tiann merged commit 7785d2a into tiann:main Jan 30, 2023
dary1zhu added a commit to dary1zhu/KernelSU that referenced this pull request Jan 30, 2023
dary1zhu added a commit to dary1zhu/KernelSU that referenced this pull request Jan 30, 2023
dary1zhu added a commit to dary1zhu/KernelSU that referenced this pull request Jan 30, 2023
dary1zhu added a commit to dary1zhu/KernelSU that referenced this pull request Jan 30, 2023
dary1zhu added a commit to dary1zhu/KernelSU that referenced this pull request Jan 30, 2023
dary1zhu added a commit to dary1zhu/KernelSU that referenced this pull request Jan 30, 2023
dary1zhu added a commit to dary1zhu/KernelSU that referenced this pull request Jan 30, 2023
dary1zhu added a commit to dary1zhu/KernelSU that referenced this pull request Jan 30, 2023
dary1zhu added a commit to dary1zhu/KernelSU that referenced this pull request Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants