From: Daniel Borkmann Date: Wed, 22 Nov 2017 20:40:54 +0000 (+0100) Subject: Merge branch 'bpf-fix-null-arg-semantics' X-Git-Tag: v5.15~9919^2~5^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=107af8ec117b0af6e90ddfe42e568b2efd8f6ff7;p=platform%2Fkernel%2Flinux-starfive.git Merge branch 'bpf-fix-null-arg-semantics' Gianluca Borello says: ==================== This set includes some fixes in semantics and usability issues that emerged recently, and would be good to have them in net before the next release. In particular, ARG_CONST_SIZE_OR_ZERO semantics was recently changed in commit 9fd29c08e520 ("bpf: improve verifier ARG_CONST_SIZE_OR_ZERO semantics") with the goal of letting the compiler generate simpler code that the verifier can more easily accept. To handle this change in semantics, a few checks in some helpers were added, like in commit 9c019e2bc4b2 ("bpf: change helper bpf_probe_read arg2 type to ARG_CONST_SIZE_OR_ZERO"), and those checks are less than ideal because once they make it into a released kernel bpf programs can start relying on them, preventing the possibility of being removed later on. This patch tries to fix the issue by introducing a new argument type ARG_PTR_TO_MEM_OR_NULL that can be used for helpers that can receive a tuple. By doing so, we can fix the semantics of the other helpers that don't need and can just handle , allowing the code to get rid of those checks. ==================== Signed-off-by: Daniel Borkmann --- 107af8ec117b0af6e90ddfe42e568b2efd8f6ff7