Received: by 10.223.185.116 with SMTP id b49csp3200333wrg; Sun, 25 Feb 2018 16:43:10 -0800 (PST) X-Google-Smtp-Source: AH8x227MsPW9jSQ1JuLOfx8DKt6m8EiaC6WeZZoEsLZh9OyxnJxx4ptKrGcv+PphNxye3zOTb46h X-Received: by 10.98.70.89 with SMTP id t86mr8851298pfa.215.1519605790137; Sun, 25 Feb 2018 16:43:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519605790; cv=none; d=google.com; s=arc-20160816; b=Um9tRAJEsgW3mH/sLB6OLvmIltcUSm4aAYJwqSxPY/2ieR7f/kMUXD4Tj6wUQ1aihH 8nJFk+A1yqR1CHizVWoKOfxhumqAqr2XELJ/NYaSAAvvjeay3yxExI7wTKeoxlrQeSsj 8NUGYgumvHQmM+xn6KANAaG5rIJ5FiF1d4h+R6y3n7KKryc53mRzcYo22ZFhVxQUU1d2 QwGve5BEQ/E/QjwTJjWl9YDgqkbLcosrN+dz+v1hQT8GYonXSbqXMal64fZ0t76tQ4Z6 PPBpYaEJ7chqmAEeA8B80YplnueJcWdzSEUyu+jIzvWCipdPAfVJkOuhEOQe+kkbTdU/ +bgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:subject:cc:to :from:date:dkim-signature:arc-authentication-results; bh=Snj7tFEmIUGapGc7S+zV8jWsJAS6x0C7IHUH1hOQVAg=; b=LmEwM60v4cVFZk4ryPBoXp8wYIg+xREzyIqWYqGrqpFUICf/qTSzJuj2hNPM4HSZog l+2MnU7t3IvB6NeCBmuyucPMlQ5PYknfOFl4/MggALO/pxhpiwPBIbnzAosFTbsMv6dA YUcP70ksQSHTOVnjN1FrrNBMBKfb8VCTPj74n6xuE/lnq6AqowyiJ6zo1KqW2+3TZHyU fNUsAG+CXUgQgB3ISG7suLiuOM+7cD3sAbaqhX4JRyki+M675LgRg4CfS1ETeJ4kSU/2 pMXoU5V29OIj/0Lh3jRkTp5uKQzbJ2hf1Cz+KoDPXuJiAbYGi6KPklbJbLnaDfaHx38Q zEjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=LMkt1gHt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z96-v6si5876617plh.35.2018.02.25.16.42.56; Sun, 25 Feb 2018 16:43:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=LMkt1gHt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752000AbeBZAl6 (ORCPT + 99 others); Sun, 25 Feb 2018 19:41:58 -0500 Received: from ozlabs.org ([103.22.144.67]:37885 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751904AbeBZAl4 (ORCPT ); Sun, 25 Feb 2018 19:41:56 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 3zqNLp1DQ0z9s1q; Mon, 26 Feb 2018 11:41:54 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=canb.auug.org.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1519605714; bh=OpwJZwzb1rfInJoEdjOyDmVuy5TtnphFNUZObC+M53g=; h=Date:From:To:Cc:Subject:From; b=LMkt1gHt9lJbHAl9kTm6KvQ2RUnWpedloWbnPKRAzLa3F/tORDZOTQuF7u3VPxNIt yWHtYwN4UCOJP6qKhsF9n8RnWzQnFmXOR/0PZF50M9kTWspE7GAcijVtpExaKXmbMB uo8wKmSrbIkTnX4cHMFcsSYJkSdXtbhP7L6nLk8EC8h0eURnFSn+7jGqueHRxQdxnp bFWN4k562POuJ98GVSE3dBvSYoko0jJZDXhvu/n3l8Lste+hjellIaMMyx1JsDt0Ym J0wRiMl2TNvren3Z6Yifl5HAgcRTs3pHmvmvqk9Pf6WrxnnJ+uE/wPBoLIH6lmutk4 m07WaZVgo6B+Q== Date: Mon, 26 Feb 2018 11:41:47 +1100 From: Stephen Rothwell To: Daniel Borkmann , Alexei Starovoitov , Networking Cc: Linux-Next Mailing List , Linux Kernel Mailing List Subject: linux-next: manual merge of the bpf-next tree with the bpf tree Message-ID: <20180226114147.2ab5c647@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/NJbGbTCk46_9_4Ko+KU8SuB"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/NJbGbTCk46_9_4Ko+KU8SuB Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all, Today's linux-next merge of the bpf-next tree got a conflict in: tools/testing/selftests/bpf/test_verifier.c between commit: ca36960211eb ("bpf: allow xadd only on aligned memory") from the bpf tree and commit: 23d191a82c13 ("bpf: add various jit test cases") from the bpf-next tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. --=20 Cheers, Stephen Rothwell diff --cc tools/testing/selftests/bpf/test_verifier.c index 437c0b1c9d21,c987d3a2426f..000000000000 --- a/tools/testing/selftests/bpf/test_verifier.c +++ b/tools/testing/selftests/bpf/test_verifier.c @@@ -11163,64 -11140,95 +11166,153 @@@ static struct bpf_test tests[] =3D=20 .result =3D REJECT, .prog_type =3D BPF_PROG_TYPE_TRACEPOINT, }, + { + "xadd/w check unaligned stack", + .insns =3D { + BPF_MOV64_IMM(BPF_REG_0, 1), + BPF_STX_MEM(BPF_DW, BPF_REG_10, BPF_REG_0, -8), + BPF_STX_XADD(BPF_W, BPF_REG_10, BPF_REG_0, -7), + BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_10, -8), + BPF_EXIT_INSN(), + }, + .result =3D REJECT, + .errstr =3D "misaligned stack access off", + .prog_type =3D BPF_PROG_TYPE_SCHED_CLS, + }, + { + "xadd/w check unaligned map", + .insns =3D { + BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), + BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), + BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), + BPF_LD_MAP_FD(BPF_REG_1, 0), + BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, + BPF_FUNC_map_lookup_elem), + BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 1), + BPF_EXIT_INSN(), + BPF_MOV64_IMM(BPF_REG_1, 1), + BPF_STX_XADD(BPF_W, BPF_REG_0, BPF_REG_1, 3), + BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_0, 3), + BPF_EXIT_INSN(), + }, + .fixup_map1 =3D { 3 }, + .result =3D REJECT, + .errstr =3D "misaligned value access off", + .prog_type =3D BPF_PROG_TYPE_SCHED_CLS, + }, + { + "xadd/w check unaligned pkt", + .insns =3D { + BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1, + offsetof(struct xdp_md, data)), + BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1, + offsetof(struct xdp_md, data_end)), + BPF_MOV64_REG(BPF_REG_1, BPF_REG_2), + BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8), + BPF_JMP_REG(BPF_JLT, BPF_REG_1, BPF_REG_3, 2), + BPF_MOV64_IMM(BPF_REG_0, 99), + BPF_JMP_IMM(BPF_JA, 0, 0, 6), + BPF_MOV64_IMM(BPF_REG_0, 1), + BPF_ST_MEM(BPF_W, BPF_REG_2, 0, 0), + BPF_ST_MEM(BPF_W, BPF_REG_2, 3, 0), + BPF_STX_XADD(BPF_W, BPF_REG_2, BPF_REG_0, 1), + BPF_STX_XADD(BPF_W, BPF_REG_2, BPF_REG_0, 2), + BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_2, 1), + BPF_EXIT_INSN(), + }, + .result =3D REJECT, + .errstr =3D "BPF_XADD stores into R2 packet", + .prog_type =3D BPF_PROG_TYPE_XDP, + }, + { + "jit: lsh, rsh, arsh by 1", + .insns =3D { + BPF_MOV64_IMM(BPF_REG_0, 1), + BPF_MOV64_IMM(BPF_REG_1, 0xff), + BPF_ALU64_IMM(BPF_LSH, BPF_REG_1, 1), + BPF_ALU32_IMM(BPF_LSH, BPF_REG_1, 1), + BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0x3fc, 1), + BPF_EXIT_INSN(), + BPF_ALU64_IMM(BPF_RSH, BPF_REG_1, 1), + BPF_ALU32_IMM(BPF_RSH, BPF_REG_1, 1), + BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0xff, 1), + BPF_EXIT_INSN(), + BPF_ALU64_IMM(BPF_ARSH, BPF_REG_1, 1), + BPF_JMP_IMM(BPF_JEQ, BPF_REG_1, 0x7f, 1), + BPF_EXIT_INSN(), + BPF_MOV64_IMM(BPF_REG_0, 2), + BPF_EXIT_INSN(), + }, + .result =3D ACCEPT, + .retval =3D 2, + }, + { + "jit: mov32 for ldimm64, 1", + .insns =3D { + BPF_MOV64_IMM(BPF_REG_0, 2), + BPF_LD_IMM64(BPF_REG_1, 0xfeffffffffffffffULL), + BPF_ALU64_IMM(BPF_RSH, BPF_REG_1, 32), + BPF_LD_IMM64(BPF_REG_2, 0xfeffffffULL), + BPF_JMP_REG(BPF_JEQ, BPF_REG_1, BPF_REG_2, 1), + BPF_MOV64_IMM(BPF_REG_0, 1), + BPF_EXIT_INSN(), + }, + .result =3D ACCEPT, + .retval =3D 2, + }, + { + "jit: mov32 for ldimm64, 2", + .insns =3D { + BPF_MOV64_IMM(BPF_REG_0, 1), + BPF_LD_IMM64(BPF_REG_1, 0x1ffffffffULL), + BPF_LD_IMM64(BPF_REG_2, 0xffffffffULL), + BPF_JMP_REG(BPF_JEQ, BPF_REG_1, BPF_REG_2, 1), + BPF_MOV64_IMM(BPF_REG_0, 2), + BPF_EXIT_INSN(), + }, + .result =3D ACCEPT, + .retval =3D 2, + }, + { + "jit: various mul tests", + .insns =3D { + BPF_LD_IMM64(BPF_REG_2, 0xeeff0d413122ULL), + BPF_LD_IMM64(BPF_REG_0, 0xfefefeULL), + BPF_LD_IMM64(BPF_REG_1, 0xefefefULL), + BPF_ALU64_REG(BPF_MUL, BPF_REG_0, BPF_REG_1), + BPF_JMP_REG(BPF_JEQ, BPF_REG_0, BPF_REG_2, 2), + BPF_MOV64_IMM(BPF_REG_0, 1), + BPF_EXIT_INSN(), + BPF_LD_IMM64(BPF_REG_3, 0xfefefeULL), + BPF_ALU64_REG(BPF_MUL, BPF_REG_3, BPF_REG_1), + BPF_JMP_REG(BPF_JEQ, BPF_REG_3, BPF_REG_2, 2), + BPF_MOV64_IMM(BPF_REG_0, 1), + BPF_EXIT_INSN(), + BPF_MOV32_REG(BPF_REG_2, BPF_REG_2), + BPF_LD_IMM64(BPF_REG_0, 0xfefefeULL), + BPF_ALU32_REG(BPF_MUL, BPF_REG_0, BPF_REG_1), + BPF_JMP_REG(BPF_JEQ, BPF_REG_0, BPF_REG_2, 2), + BPF_MOV64_IMM(BPF_REG_0, 1), + BPF_EXIT_INSN(), + BPF_LD_IMM64(BPF_REG_3, 0xfefefeULL), + BPF_ALU32_REG(BPF_MUL, BPF_REG_3, BPF_REG_1), + BPF_JMP_REG(BPF_JEQ, BPF_REG_3, BPF_REG_2, 2), + BPF_MOV64_IMM(BPF_REG_0, 1), + BPF_EXIT_INSN(), + BPF_LD_IMM64(BPF_REG_0, 0x952a7bbcULL), + BPF_LD_IMM64(BPF_REG_1, 0xfefefeULL), + BPF_LD_IMM64(BPF_REG_2, 0xeeff0d413122ULL), + BPF_ALU32_REG(BPF_MUL, BPF_REG_2, BPF_REG_1), + BPF_JMP_REG(BPF_JEQ, BPF_REG_2, BPF_REG_0, 2), + BPF_MOV64_IMM(BPF_REG_0, 1), + BPF_EXIT_INSN(), + BPF_MOV64_IMM(BPF_REG_0, 2), + BPF_EXIT_INSN(), + }, + .result =3D ACCEPT, + .retval =3D 2, + }, +=20 }; =20 static int probe_filter_length(const struct bpf_insn *fp) --Sig_/NJbGbTCk46_9_4Ko+KU8SuB Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAlqTV8sACgkQAVBC80lX 0Gxr0gf+IQlx4HqcMMxfTuakdRa4pBDX2U13K1AC07rSuisndsgR0axRzEjHSUQD ixR4YIjzQ8X55x1uG+4e2KPY+iBrHTgTGzxJN7/oB9vagsm3zw/rQRoFfGozeALE qaK2VguJWVL2nAbDOjvuCll0mbPzNG0rvtBhN18c7EksuagcaAq3Mcl3p5PlaA70 nLHGHZ1Y3tHSeGb/VK6Ye8ZqPqPRDLQ/EPiofvIajBmGnTPdRV3jvLQVwg2zKM+g MRh3eFQJ08hV8bCpPjw1wIJN+fHvKDUVLtc3m98mFxb4mOlYdrWZKWCCIC+af+o+ yXwsyeQByIfwySZx+7wKNMVgH0kWIQ== =xAZi -----END PGP SIGNATURE----- --Sig_/NJbGbTCk46_9_4Ko+KU8SuB--