Comments (11)
Yes, you have gotten the point, the key point is "different destination buffer", and no crash happened with in-place operations.
So sorry to have bother you, wish you have a happy vacation.
Thanks!
from cryptodev-linux.
What AES (from the panic) test did you run and what kernel algortithm(s) did you enabled? What are the versions of kernel and cryptodev?
from cryptodev-linux.
aes_test was a testing program of user space, and it was coded after the file examples/aes.c. I put the three functions: aes_ctx_init, aes_encrypt,aes_ctx_deinit into a while loop for a longtime test, and killed the aes_test while it was running. Kernel algortithm was xts(aes), and I just added several lines to crypto_create_session to support this algortithm. The version of cryptodev is 1.9, and kernel is 4.1.46. The
kernel algortithm(s) I enabled were: stdrng, lzo, crct10dif, crc32c, ecb(arc4), arc4, aes, des3_ede, des, sha224, sha256, sha1, md5, md4.
from cryptodev-linux.
Did you get the crash also with vanilla examples/aes.c or with some of the tests? You could modify them to run a little longer for an easy time to CTRL-C.
The kernel algorithms question was to see if you run a software or a hardware AES driver - it is irrelevant though since the crash is on a different code path.
You can try this branch, we did not see issues with it at the time. If you do, let me know your results
https://github.com/cristian-stoica/cryptodev-linux/tree/umaster
from cryptodev-linux.
I just used the branch you gave to test again, and modified examples/aes.c, made the source address and destination address different in the aes_encrypt function. I tested kill -9 or -15 while running for several times, the crash always happened. Now I'm not sure the problem belongs to cryptodev or the kernel, I will change the kernel version to test it again, and maybe tomorrow I could give you the result. Thank you very much!
from cryptodev-linux.
If I understand you correctly you always get the crash with different destination buffer but not with in-place operations? This sounds like something worth investigating.
I'm going in vacation so we may continue the discussion in a couple of weeks. Otherwise feel free to submit a pull request if you stumble upon a patch.
from cryptodev-linux.
This week , I did the same test with other kernel version——4.10.0-42-generic,and it also reported calltrace information as following:
[10420.249240] [] release_user_pages+0x90/0x100 [cryptodev]
[10420.249246] [] get_userbuf+0x228/0x310 [cryptodev]
[10420.249252] [] crypto_run+0x1c8/0x4a8 [cryptodev]
[10420.249257] [] cryptodev_ioctl+0x520/0x7d8 [cryptodev]
[10420.249260] [] do_vfs_ioctl+0xc4/0x8e8
[10420.249262] [] SyS_ioctl+0x94/0xa8
[10420.249264] [] el0_svc_naked+0x24/0x28
[10420.249266] Code: 52800080 d37df035 f8617841 8b150042 (f9400023)
[10420.249268] ---[ end trace a5d9b3b46941a846 ]---
So I think this problem has nothing with kernel version. I will be glad to research it with you when you return to work.
from cryptodev-linux.
@JaybeamChing Am I wrong to ask if you've got a patch for this?
from cryptodev-linux.
Not yet, I am still not sure how to solve this problem.
from cryptodev-linux.
Do you have any idea how to fix this bug now?
from cryptodev-linux.
@JaybeamChing I'm sorry I don't have a solution for you. I am currently involved in other projects and not actively debugging this issue.
from cryptodev-linux.
Related Issues (20)
- SSH with openssl "mux digest failed" HOT 5
- make fail: zc.c:80:8: error: too many arguments to function ‘get_user_pages_remote’ HOT 9
- Openembedded out of tree patches HOT 5
- OpenSSL patch website cannot be opened, where to find the patch please? HOT 3
- encrypt-then-mac in aead is more secure
- kle
- openssl_wrapper.c needs to be updated for openssl 3.0.0 HOT 3
- "possible circular locking dependency" warning HOT 3
- pgcrypto to use cryptodev HOT 2
- [OpenBMC] Kernel panic while running "openssl engine" within cryptodev-linux kernel module inserted HOT 1
- What's the supported kernel version list? HOT 2
- Unable to fetch URL from any source HOT 3
- No file to patch. Skipping patch. HOT 3
- module install HOT 1
- Cryptodev module fails to load with Unknown symbol errors HOT 1
- Cipher supports in cryptodev-linux HOT 2
- AES-GCM tag issue HOT 5
- performance issue HOT 4
- the async mode is not truely async
- Phase 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cryptodev-linux.