summaryrefslogtreecommitdiff
path: root/mm/mincore.c
diff options
context:
space:
mode:
authorMartin KaFai Lau <martin.lau@kernel.org>2023-05-13 16:20:16 -0700
committerMartin KaFai Lau <martin.lau@kernel.org>2023-05-13 17:00:47 -0700
commit79b3604d6221220770fb52619e1f55ee04b2c1b7 (patch)
treea9447b5600d3d980f8445bb223db5cbab058042b /mm/mincore.c
parentbdeeed3498c7871c17465bb4f11d1bc67f9098af (diff)
parent6b6a23d5d8e857e0dda1bbe5043cf4d5e9c711d3 (diff)
Merge branch 'bpf: Don't EFAULT for {g,s}setsockopt with wrong optlen'
Stanislav Fomichev says: ==================== optval larger than PAGE_SIZE leads to EFAULT if the BPF program isn't careful enough. This is often overlooked and might break completely unrelated socket options. Instead of EFAULT, let's ignore BPF program buffer changes. See the first patch for more info. In addition, clearly document this corner case and reset optlen in our selftests (in case somebody copy-pastes from them). v6: - no changes; resending due to screwing up v5 series with the unrelated patch v5: - goto in the selftest (Martin) - set IP_TOS to zero to avoid endianness complications (Martin) v4: - ignore retval as well when optlen > PAGE_SIZE (Martin) v3: - don't hard-code PAGE_SIZE (Martin) - reset orig_optlen in getsockopt when kernel part succeeds (Martin) ==================== Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'mm/mincore.c')
0 files changed, 0 insertions, 0 deletions