summaryrefslogtreecommitdiff
path: root/security/tomoyo
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2013-02-04 11:57:27 -0500
committerJ. Bruce Fields <bfields@redhat.com>2013-02-08 16:02:26 -0500
commit01a7decf75930925322c5efc87af0b5e58eb8650 (patch)
treecdd3420f451edc0568f4318b1d2338d491679068 /security/tomoyo
parent4c190e2f913f038c9c91ee63b59cd037260ba353 (diff)
nfsd: keep a checksum of the first 256 bytes of request
Now that we're allowing more DRC entries, it becomes a lot easier to hit problems with XID collisions. In order to mitigate those, calculate a checksum of up to the first 256 bytes of each request coming in and store that in the cache entry, along with the total length of the request. This initially used crc32, but Chuck Lever and Jim Rees pointed out that crc32 is probably more heavyweight than we really need for generating these checksums, and recommended looking at using the same routines that are used to generate checksums for IP packets. On an x86_64 KVM guest measurements with ftrace showed ~800ns to use csum_partial vs ~1750ns for crc32. The difference probably isn't terribly significant, but for now we may as well use csum_partial. Signed-off-by: Jeff Layton <jlayton@redhat.com> Stones-thrown-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'security/tomoyo')
0 files changed, 0 insertions, 0 deletions