Conversation
071bc5e to
0d736e2
Compare
42f366d to
bd036f9
Compare
| copied += decrypted; | ||
|
|
||
| plaintext = kmalloc(copied, GFP_KERNEL); | ||
| err = copy_from_user(plaintext, msg->msg_iter.iov->iov_base, copied); |
There was a problem hiding this comment.
Are you sure you need to copy from user here? Check the whole trace from the recvmsg syscall and see if there are no "promotions" to kernel space already.
Another thing, this is a scatter/gather array which means the buffer might not be non-linear, your code is too optimistic about it.
There was a problem hiding this comment.
It seems that the function will decrypt the data into user space msg directly and the previous code will gather the splitted received data and decrypt into msg(I didn't find the next pointer like skb structure.)
There was a problem hiding this comment.
Magically I could read the address without copy in Ubuntu but failed in Arch
There was a problem hiding this comment.
It seems we can use process_rx_list to make zero copy, see slack.
Uh oh!
There was an error while loading. Please reload this page.