[LU-15928] pass key length as part of index API Created: 10/Jun/22 Updated: 14/Jun/22 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.15.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andreas Dilger | Assignee: | Sebastien Buisson |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
With fscrypt passing binary names to the underlying ldiskfs storage, the lookup API should be passing the length of the key through the DT index API instead of calling strlen() on the string, otherwise this may incorrectly process keys with embedded NUL bytes. |
| Comments |
| Comment by Gerrit Updater [ 14/Jun/22 ] |
|
"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/47624 |
| Comment by Andreas Dilger [ 14/Jun/22 ] |
|
Sebastien, I started on this patch but haven't had time to finish it off. I think this is needed to handle binary names properly. |
| Comment by Sebastien Buisson [ 14/Jun/22 ] |
|
Actually, in order to avoid this large change in the DT index API as part of the So the code is sane as it is today. But passing the length of the key through the DT index API instead of calling strlen on the string seems to be a better longer term option. And that would avoid the need to critical encode names on client side before the request is sent, just to critical decode those names on server side upon request receive. Unless the ptlrpc layer requires buffers put in the requests to be nul terminated? |