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

tar value <uid> out of uid_t range 0..2097151 #438

Open
harpreetsc1992 opened this issue Apr 9, 2024 · 1 comment
Open

tar value <uid> out of uid_t range 0..2097151 #438

harpreetsc1992 opened this issue Apr 9, 2024 · 1 comment

Comments

@harpreetsc1992
Copy link

Hello,
I am trying to build keystone and am building this version of the tool - a1842a1 - on an x86 machine, so that I can run it with gem5. I'm building on the 5.15.0-100-generic kernel, and it is an Ubuntu distribution. The machine is a Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz model.

The steps that I have performed up until now are:
git clone https://github.com/keystone-enclave/keystone.git
cd keystone
git checkout a1842a1
./fast-setup.sh
source source.sh
mkdir build
cd build
cmake ..
make

On doing make, I get the following error:
[ 34%] Generating pkg/eyrie-rt
cd /home/grads/h/harpreetsc/Downloads/keystone/build/examples/tests && cp eyrie-rt /home/grads/h/harpreetsc/Downloads/keystone/build/examples/tests/pkg/eyrie-rt
cd /home/grads/h/harpreetsc/Downloads/keystone/build/examples/tests && /usr/bin/makeself --noprogress /home/grads/h/harpreetsc/Downloads/keystone/build/examples/tests/pkg tests.ke "Keystone Enclave Package" ./run-test.sh
Header is 714 lines long

About to compress 1520 KB of data...
Adding files to archive named "tests.ke"...
tar: value ######### out of uid_t range 0..2097151
tar: value ######### out of uid_t range 0..2097151
tar: value ######### out of uid_t range 0..2097151
tar: value ######### out of uid_t range 0..2097151
tar: value ######### out of uid_t range 0..2097151
tar: value ######### out of uid_t range 0..2097151
tar: value ######### out of uid_t range 0..2097151
tar: value ######### out of uid_t range 0..2097151
tar: value ######### out of uid_t range 0..2097151
tar: value ######### out of uid_t range 0..2097151
tar: value ######### out of uid_t range 0..2097151
tar: value ######### out of uid_t range 0..2097151
tar: value ######### out of uid_t range 0..2097151
tar: Exiting with failure status due to previous errors
ERROR: failed to create temporary archive: /tmp/mkself8151.tar
make[2]: *** [examples/tests/CMakeFiles/test-package.dir/build.make:85: examples/tests/CMakeFiles/test-package] Error 1
make[2]: Leaving directory '/home/grads/h/harpreetsc/Downloads/keystone/build'
make[1]: *** [CMakeFiles/Makefile2:1163: examples/tests/CMakeFiles/test-package.dir/all] Error 2
make[1]: Leaving directory '/home/grads/h/harpreetsc/Downloads/keystone/build'
make: *** [Makefile:94: all] Error 2

The ######### is a uid assigned to me by my university, a 9 digit number, which also happens to be my UIN (that is why I have hidden it).

My tar version is GNU tar 1.34.

Why is tar blocking on a big number in the script? And how can I mitigate this error? Any help would be useful.

Thanks

@harpreetsc1992
Copy link
Author

I did find a solution that is working for me. In sdk/macros.cmake, the makeself command can be changed to:
COMMAND
${MAKESELF} --tar-extra "--owner=0 --group=0" --noprogress ${pkg_dir} ${package_name} "Keystone Enclave Package" ${package_script_raw}

I believe this will even be applicable to the latest branch too.

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