Skip to content

Corrected dmsetup argument in README.md. - #3

Open
fadedbee wants to merge 1 commit into
nxp-imx:lf-6.1.36_2.1.0from
fadedbee:lf-6.1.36_2.1.0
Open

Corrected dmsetup argument in README.md.#3
fadedbee wants to merge 1 commit into
nxp-imx:lf-6.1.36_2.1.0from
fadedbee:lf-6.1.36_2.1.0

Conversation

@fadedbee

@fadedbee fadedbee commented Apr 4, 2024

Copy link
Copy Markdown

When I attempted to use the dmsetup command, I received an error:

root@smarcimx8mq4g:/data/caam# dmsetup -v create encrypted --table "0 $(blockdev --getsz /dev/mmcblk1p3) crypt capi:tk(cbc(aes))-plain :32:logon:logkey: 0 /dev/mmcblk1p3 0 1 sector_size:512"
device-mapper: reload ioctl on encrypted (252:0) failed: Invalid argument Command failed.

Replacing 32 with 36 made this work:

root@smarcimx8mq4g:/data/caam# dmsetup -v create encrypted --table "0 $(blockdev --getsz /dev/mmcblk1p3) crypt capi:tk(cbc(aes))-plain :36:logon:logkey: 0 /dev/mmcblk1p3 0 1 sector_size:512"
Name: encrypted
State: ACTIVE
Read Ahead: 256
Tables present: LIVE
Open count: 0
Event number: 0
Major, minor: 252, 0
Number of targets: 1

I have a couple of questions about keyctl_caam. Who can I contact? (There is no "issues" tab in the repo.)

When I attempted to use the dmsetup command, I received an error:

root@smarcimx8mq4g:/data/caam# dmsetup -v create encrypted --table "0 $(blockdev --getsz /dev/mmcblk1p3) crypt capi:tk(cbc(aes))-plain :32:logon:logkey: 0 /dev/mmcblk1p3 0 1 sector_size:512"
device-mapper: reload ioctl on encrypted (252:0) failed: Invalid argument
Command failed.

Replacing 32 with 36 made this work:

root@smarcimx8mq4g:/data/caam# dmsetup -v create encrypted --table "0 $(blockdev --getsz /dev/mmcblk1p3) crypt capi:tk(cbc(aes))-plain :36:logon:logkey: 0 /dev/mmcblk1p3 0 1 sector_size:512"
Name:              encrypted
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        0
Event number:      0
Major, minor:      252, 0
Number of targets: 1

I have a couple of questions about keyctl_caam.  Who can I contact?  (There is no "issues" tab in the repo.)
@jontrulson

Copy link
Copy Markdown

It might also be worth mentioning how that value is computed - essentially key length + 20 (overhead). See

#define TAG_OVERHEAD_SIZE 20

@leorampen-engie

Copy link
Copy Markdown

@iuliana-prodan it would be very helpful if you merged this PR. I wasted a lot of time today trying to debug why it wasn't working - and it turns out there's been a PR for the last 2 years which would have saved all that time.

@iuliana-prodan

Copy link
Copy Markdown
Contributor

@iuliana-prodan it would be very helpful if you merged this PR. I wasted a lot of time today trying to debug why it wasn't working - and it turns out there's been a PR for the last 2 years which would have saved all that time.

@kshitizvars can we merge this?

@iuliana-prodan

Copy link
Copy Markdown
Contributor

@iuliana-prodan it would be very helpful if you merged this PR. I wasted a lot of time today trying to debug why it wasn't working - and it turns out there's been a PR for the last 2 years which would have saved all that time.

@kshitizvars can we merge this?

LE: @fadedbee I'm not maintaining this repo so not my call to merge it or not.

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.

4 participants