From: Markos Chandras Date: Mon, 23 Jun 2014 09:38:48 +0000 (+0100) Subject: MIPS: bpf: Return error code if the offset is a negative number X-Git-Tag: omap-for-v3.16/fixes-rc4~42^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55393ee535496f7db15f3b2e9d3cf418f772f71a;p=pandora-kernel.git MIPS: bpf: Return error code if the offset is a negative number Previously, the negative offset was not checked leading to failures due to trying to load data beyond the skb struct boundaries. Until we have proper asm helpers in place, it's best if we return ENOSUPP if K is negative when trying to JIT the filter or 0 during runtime if we do an indirect load where the value of X is unknown during build time. Signed-off-by: Markos Chandras Cc: David S. Miller Cc: Daniel Borkmann Cc: Alexei Starovoitov Cc: netdev@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/7123/ Signed-off-by: Ralf Baechle --- Reading git-diff-tree failed