android - lost some parameter from user space to kernel space -
I have a question for the consultation parameter,
I have some parameters user location , one of them has been lost on kernel space (value is wrong when checking it from the kernel location).
Below are some of my code and logs, write lost paragraph, I set write_flag as integer number (2) in user space.
But when I print write_flag in colonel space it is completely wrong (1651866136). Some parameters were moved without problem like Oploads and Arg.
[859.877750] user.write_flag: 1651866136, idata-> Ic.write_flag: 1651866136 [859.883133] user.opcode: 8, Idata-> Ic.opcode: 8 [859.887421] user.arg: 0, idata- & gt; Ic.arg: 0
To correct this issue, anyone can give me ideas,
HAL PARTY:
< Code> LOGI ("dev-> Fd:% d, cmd_idx:% d, arg:% d.", Dev-> fd, mmc_local_cmd- & gt; opcode, mmc_local_cmd-> arg); LOGI ("dev-> write_flag:.% D", mmc_local_cmd-> write_flag); Rate = IoCTL (dev-> FD, MMC_IOCCMDDD, and MMC_LOCAL_CDD);
kernel side:
if (copy_from_user (and idata-> ic, user, size (idata-> ic))) {err = -Afal; Goto idata_err; } / * FIXME: executed copy_from_user * / printk ("user.write_flag:% d, idata-> ic.write_flag:% d \ n", user-> write_flag, idata-> ic.write_flag First write_flag is incorrect); Printk ("user.opcode:% d, idata-> ic.opcode:% d \ n", user-> opcode, idata-> ic.opcode); Printk ("user.arg:% d, idata-> ic.arg:% d \ n", user-> Arg, idata-> ic.arg);
I asked this issue & amp; Because we do not have to give context.
rate = ioctl (dev- & gt; FD, MMC_IOCCMDMD, MMC_Loc_COM);
Comments
Post a Comment