Re: [PATCH 00/19] cifs: remove rfc1002 header from all smb2 requests

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

 



2017-11-08 16:48 GMT-08:00 ronnie sahlberg <ronniesahlberg@xxxxxxxxx>:
> Thanks.
>
> It is the __u8 Buffer[1] in the structure that is causing it.
> I will resend after I fix it and audit all other Buffer[1] in the
> request structures.
>
> Any particular reason we don't use  __u8 Buffer[0] instead?
>
>
>
> On Thu, Nov 9, 2017 at 1:46 AM, Aurélien Aptel <aaptel@xxxxxxxx> wrote:
>> I've looked at a network trace: after the patches when doing a setinfo
>> on the same file, the netbios length is 1 byte bigger and thus probably
>> wrong (server replies with a OBJECT_NAME_COLLISION error).
>>
>> --
>> Aurélien Aptel / SUSE Labs Samba Team
>> GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
>> SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
>> GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

It is because a buffer of size 1 is included in StructureSize field of
PDUs, so we need to send at least 1 byte. Having it in the structure
preventing us to allocate extra unused 1 byte e.g. for a READ request.
We can probably clean it as well.

--
Best regards,
Pavel Shilovsky
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux