lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 8 Feb 2019 21:01:37 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Sowjanya Komatineni <skomatineni@...dia.com>,
        "thierry.reding@...il.com" <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Mantravadi Karthik <mkarthik@...dia.com>,
        Shardar Mohammed <smohammed@...dia.com>,
        Timo Alho <talho@...dia.com>
Cc:     "linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>
Subject: Re: [PATCH V16 4/6] i2c: tegra: Add DMA support

08.02.2019 20:53, Sowjanya Komatineni пишет:
>>>>>>
>>>>>>> I'm still also suggesting to squash "fix maximum transfer size" into this patch because it is really part of DMA-support enabling.
>>>>>>
>>>>>> Max transfer length limits apply to PIO also but for DMA its more needed to prevent crash.
>>>>>> So had this as patch before DMA as its applicable for both DMA & PIO.
>>>>>
>>>>> Oh, so the packet_header size also shall be excluded for the PIO as well, really? It looked to me that PIO doesn't have that restriction and we only need to exclude the header size for DMA..
>>>>>
>>>>>> We exchanged on this yesterday, so thought the reason you want to squash separate patch and include in this is due to max msg len limit and when moved into hw feature.
>>>>>
>>>>> If PIO limits are incorrect, then it's absolutely fine to do it in the separate patch. I probably just misunderstood your point.
>>>>>
>>>>>> Sorry should have verified before sending. Please confirm if I leave max transfer as separate patch or add to this DMA support. Will update along with dma buf size fix.
>>>>>>
>>>>>> But max transfer limit applied to PIO also and that’s why added it before DMA patch to show its dependency
>>>>>>
>>>>>
>>>>> And then you need to explicitly tell in the commit message that PIO limits are incorrect.
>>>> Commit message says Tegra I2C max limit per packets transfer meaning that’s interface transfer limit so applies to both PIO & DMA.
>>>> Will add explicitly indicating applicable for both PIO & DMA to be more clear
>>>
>>> Thank you.
>>>
>>>>>
>>>>> It also probably worth to add a stable-tag to the commit message to request backporting of the limits-fixing patch to the stable kernels:
>>>>>
>>>>> Cc: stable@...r.kernel.org
>>>>>
>>>> Sorry I am new to upstream submissions. By adding stable-tag to commit message, do you mean explicitly mentioning this patch applicable to old kernel and adding in patch CC stable@...r.kernel.org?
>>>>
>>>
>>> You just need to add "Cc: stable@...r.kernel.org" to the commit message, like you did for the "Reviewed-by:". Don't add "stable@...r.kernel.org" to the email recipients. See for example [0]. 
>>>
>>> [0] https://lore.kernel.org/patchwork/patch/1001991/
>>>
>>
>> And yes, it will mean that patch is applicable for older kernels.
> 
> Thanks Dmitry. Added Cc: stable@...r.kernel.org
> Also has to use 65535 instead of 64K because when buf size is computed using max_write_len with addition of packet header it will be exact 64K but max msg len is 65535
> So 1 byte less 64K should be OK

It is absolutely fine for dma_buf size to be larger than the message len. The max_write_len is off by one byte from the correct value by using 65535 - PACKET_HEADER_SIZE, I'd recommend to keep the SZ_64K.

Powered by blists - more mailing lists