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

keystone_create_enclave ioctl returns ENOTTY (inappropriate ioctl for device) #29

Closed
dayeol opened this issue Jan 21, 2019 · 4 comments
Closed
Assignees

Comments

@dayeol
Copy link
Contributor

dayeol commented Jan 21, 2019

Following up the issue keystone-enclave/keystone-demo#2
./test fails with

[Keystone SDK] src/keystone.cpp:78 : failed to create enclave - ioctl() failed: -1

which is caused by keystone_ioctl returning ENOTTY (-25)

@dayeol dayeol added the Bug Something isn't working label Jan 21, 2019
@dayeol dayeol self-assigned this Jan 21, 2019
@dayeol
Copy link
Contributor Author

dayeol commented Jan 21, 2019

@benlaurie

@dayeol
Copy link
Contributor Author

dayeol commented Jan 21, 2019

ENOTTY seems to be returned by the kernel, not the keystone driver nor the SM.
@benlaurie, Could you wipe out riscv-linux and rebuild?
You also need to rebuild riscv-pk after building riscv-linux,
because the booting image (i.e., bbl) is generated by riscv-pk with riscv-linux/vmlinux as a payload.

cd riscv-linux
make ARCH=riscv clean
git clean -df
git clean -Xf
git checkout -f .
cp ../busybear-linux/conf/linux.config .config
make ARCH=riscv olddefconfig
make ARCH=riscv -j$(nproc) vmlinux
cd ..
cd riscv-pk/build
make
cd ../..

If it fails, I'll add some debug code to the driver for further inspection

@dayeol
Copy link
Contributor Author

dayeol commented Jan 24, 2019

@benlaurie, if you are still getting the same error, can you try with a fresh repo,
checkout to dev branch,
and run ./build.sh ?
This will take about 3 hours, but ./fast-build.sh will take less than an hour.

fast-build.sh uses pre-built riscv toolchain instead of compiling all.

I believe that the problem is somehow caused while moving around the branches.

Also could you let me know which OS are you using?

@dayeol dayeol removed the Bug Something isn't working label Jan 28, 2019
@dayeol
Copy link
Contributor Author

dayeol commented Feb 23, 2019

Probably not reproducible in the latest dev branch.
Please reopen the issue when it reoccurs

@dayeol dayeol closed this as completed Feb 23, 2019
grg-haas pushed a commit that referenced this issue Feb 27, 2023
travis: Add build configurations
grg-haas pushed a commit that referenced this issue Feb 27, 2023
travis: Add build configurations
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

No branches or pull requests

1 participant