Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp991888pxf; Thu, 18 Mar 2021 17:18:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9+5whxSf39fDxufig8Sk6avQQP8VhdafVFpI4penfQU+AKQC7zQHvfnv4VZNiXhptyFJL X-Received: by 2002:aa7:c941:: with SMTP id h1mr6684236edt.85.1616113139653; Thu, 18 Mar 2021 17:18:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616113139; cv=none; d=google.com; s=arc-20160816; b=DqcQbRRnaFUFHT3CPge/L/XFEwhDiCS2HgxQIAz/LIhtcB5Df93z50oSEwUnaXLHHf hF9LgfyKUORvZYi9qhz10Q72Ot6NPgeveGv6fG4SUiwISbK6U29pELK71wNp66tACvaz xuESkP7MPD1Dc2Uk9gT4sPUThulxnBmtKN6cLO9WbchoOEyNz33ESUymgbKSrRrZDqyV kfpmXieJzR5ZQpi6e8vTnawRVN7f7IzfrUqLEtjdpzXQ4hAYRWfl8MBOv0crC1fP7Kvu VyFqxO/ZardioodSVaoZGa6Suq8MKTGmcL+CIXne7bgAOdth3jLAJfm6OmFQ4a2besU7 juWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=f2AKhIvceBysJsmt345IynnTePxgl3t0FRMfNAmxRb8=; b=gkZgI4H+tjGJSThmJ+AJ73haI0RRkV6ivo9mNaIyQoeVzm23r4u816IMKjIEf8Bxhh RTcKxmQtgp2dVVzFhqg+jJwZNQIRp0flQqfXkMN9gI3ELqhrQ9PSBVbhPx7oFfjCelQt REO0uWvI9j8HmcWok+SVHvb9553wF8fj7m6rISfVCnn0qLtDmnlZXGqxFUu4co7ueVMF x/eHAa1t6sgpDTc1UFw8PZxTEAH9kVicMSSXGVMzHmZ7kbQihvmyeQrN+/K8UUBVrg/C c0XnAk0cMkzj3RrCHQZvz1cplBeLlpb335Gcf2kuoI1yBW/ahQvqI3ACCzl/gXJm4m8M Lv2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=Bq3nNEL6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u5si2799522ejg.130.2021.03.18.17.18.36; Thu, 18 Mar 2021 17:18:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=Bq3nNEL6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233336AbhCSARB (ORCPT + 99 others); Thu, 18 Mar 2021 20:17:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229769AbhCSAQ7 (ORCPT ); Thu, 18 Mar 2021 20:16:59 -0400 Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CB6FC06174A; Thu, 18 Mar 2021 17:16:58 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4F1kwQ1ynCz9sVb; Fri, 19 Mar 2021 11:16:53 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1616113015; bh=rGb+OlL120TU6VUsasYJ7KMDZZQBFctFwRjV/8knuLw=; h=Date:From:To:Cc:Subject:From; b=Bq3nNEL6Q2CX3BQTJ7nQjaklcUdJ55BG2tjqayjpd6Cu4L11a4wsa6QAnRkRxf61c BPQO/UAhdG9iea870KWVJoJ/DxAX3vXOJU+mK6JkcUBGw/rUClHLDSJ0bA3MP9QzVN HBkz+M7uCfpX9A6tmxGe2Dr2MNCF0qqIEboypL+bzfCkNCPLSRwEMEzp1V89HNbp9D +pbJDzKIbOdXQcIBGiTSjEqaE9wNH6nhWg1wogKL8JLHfiTZbxOSymos0Qfzmr9imv 5OZkSeQd9oYRWxKbprgE2oqHHXAiWmsKusWwSZTBuiOMM9OMj76v6eu9mtp3SchYzB INVL2KUd1Hoig== Date: Fri, 19 Mar 2021 11:16:52 +1100 From: Stephen Rothwell To: David Miller , Networking Cc: Alexei Starovoitov , Daniel Borkmann , Linux Kernel Mailing List , Linux Next Mailing List , Piotr Krysiuk , Yonghong Song Subject: linux-next: manual merge of the net-next tree with the net tree Message-ID: <20210319111652.474c0939@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/8_22xNXcrJvBbPa8M6GaNXh"; protocol="application/pgp-signature"; micalg=pgp-sha256 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/8_22xNXcrJvBbPa8M6GaNXh Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all, Today's linux-next merge of the net-next tree got a conflict in: kernel/bpf/verifier.c between commits: b5871dca250c ("bpf: Simplify alu_limit masking for pointer arithmetic") 1b1597e64e1a ("bpf: Add sanity check for upper ptr_limit") from the net tree and commit: 69c087ba6225 ("bpf: Add bpf_for_each_map_elem() helper") from the net-next tree. I fixed it up (see below - but it may need more work on the new "return" starement from the latter commit) 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 kernel/bpf/verifier.c index 44e4ec1640f1,f9096b049cd6..000000000000 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@@ -5876,10 -6056,22 +6060,23 @@@ static int retrieve_ptr_limit(const str if (mask_to_left) *ptr_limit =3D MAX_BPF_STACK + off; else - *ptr_limit =3D -off; - return 0; + *ptr_limit =3D -off - 1; + return *ptr_limit >=3D max ? -ERANGE : 0; + case PTR_TO_MAP_KEY: + /* Currently, this code is not exercised as the only use + * is bpf_for_each_map_elem() helper which requires + * bpf_capble. The code has been tested manually for + * future use. + */ + if (mask_to_left) { + *ptr_limit =3D ptr_reg->umax_value + ptr_reg->off; + } else { + off =3D ptr_reg->smin_value + ptr_reg->off; + *ptr_limit =3D ptr_reg->map_ptr->key_size - off; + } + return 0; case PTR_TO_MAP_VALUE: + max =3D ptr_reg->map_ptr->value_size; if (mask_to_left) { *ptr_limit =3D ptr_reg->umax_value + ptr_reg->off; } else { --Sig_/8_22xNXcrJvBbPa8M6GaNXh Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAmBT7XQACgkQAVBC80lX 0GxB0Qf5AeqEwFrlK/NGQNVYfPF7gbYVNlA0hgi3D0Y/NElOl78CO5FwAdZCX83+ hJDv2Rj4Dn4CeTFhYzfVqbdI74ghMc+kBPuskJTUc8Zp8/nVHH8pJJUopUYfONwp HCLaKbNtTYkN4H5p0yXT0E6Bbg8UNKIr3vLeofj/yfzgWGqU1dBClIUCGvQgvFOp F/ImZnmhDpl3g0koq99TAcXstlEeUmrczlfeiJgBrjAumfPPpoK9d14Dwtrz6AVe vc8dWlfmMo3sQss/jL8SVvkdOE05r17r4mwNQ/8qxcRBvacpLJHXO62ylA/UfSCx iHQxRlS3Gc4R4qjJtQNgQVPQSuKqBg== =TjyD -----END PGP SIGNATURE----- --Sig_/8_22xNXcrJvBbPa8M6GaNXh--