On 07/20, Steve French wrote:
I don't have any objections to this but wondering what prompted the patch? Did you see an error logged with ioctls? You mention: "SMB2_IOCTL, OutputLength and OutputContext are optional and can be zero"
No errors, it's just that when the IOCTL have a 0 len, there can be several messages printed when debugging. It wasn't that much, but enough to get me confused several times. Since they were completely unnecessary, I thought it was ok to not print it.
And did you want to change the pr_warn_once to a pr_warn on the mismatch since you had a case where server was frequently returning frame with bad length and you want to debug it?
Yes. I'm always getting a lot of those mismatched length calculations (Windows Server 2019). After investigating, I found that they were not real mismatches (see below).
I am a little worried that it could cause log spam if some server has a bug in smb3 response length.
Yes, it could, but as I mention in the commit message, this would only happen on the *real* mismatched cases, i.e. after passing all the checks inside the "if (len != calc_len)" check. In those cases, I'd prefer to really be aware of them then risk it getting lost in dmesg. Cheers, Enzo