Re: [PATCH v7 3/9] ksmbd: add and use ksmbd_smb2_cur_pdu_buflen() in ksmbd_smb2_check_message()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2021-10-05 16:46 GMT+09:00, Ralph Boehme <slow@xxxxxxxxx>:
> Am 05.10.21 um 09:29 schrieb Namjae Jeon:
>> 2021-10-05 14:03 GMT+09:00, Ralph Boehme <slow@xxxxxxxxx>:
>>> -		if (ALIGN(clc_len, 8) == len)
>>> +		if (ALIGN(clc_len, 8) == ALIGN(len, 8))
>> Can I know why you align rfc1002 len with 8 here ?
>
> this should match the previous behaviour where for compound requests we
> called round_up(len, 8).
>
> This could be done differently though:
>
> len = ksmbd_smb2_cur_pdu_buflen(work);
> if (work->next_smb2_rcv_hdr_off)
>          len = ALIGN(len, 8);
I think that this code is wrong, we don't need to add pad about last
compound *request* length.

Thanks!

>
> and then just do
>
>                  if (ALIGN(clc_len, 8) == len)
>
> -slow
>
> --
> Ralph Boehme, Samba Team                 https://samba.org/
> SerNet Samba Team Lead      https://sernet.de/en/team-samba
>



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux