Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2194790rdg; Sun, 13 Aug 2023 13:44:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHAnBRiCdkRvAW+SP6TDtahBDJvskeXENK87k1DMRYM82QUhGLcDklmiJ633QvBOUJgQBBY X-Received: by 2002:a17:906:1d:b0:99c:e38d:e47d with SMTP id 29-20020a170906001d00b0099ce38de47dmr7652973eja.27.1691959460752; Sun, 13 Aug 2023 13:44:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691959460; cv=none; d=google.com; s=arc-20160816; b=cPMFZuSW4JFqNq7gTKR8n+8aWWDzuDkxZEHLBt5evsWD+gADEbyH+4vnoARcqDAwI9 YmqNZ3HadmXnWWM8jaBS4u+kyb5aC2jVeJHQgU91xJT9DqRi6TX0kspNXDCiCX8VsPPA +F3JpKOEGgz8D2xEJWOG5fA+64HWYeThl5/QU3mhqsZVDHgfMejVir91M1fNntgO9C4J Xg0Sn9gsMWLorokirP/gJmyX1yXKOzNcnGP+lXMsRPDrasoiO2vz1qwWbAXur6EKgdJ5 ExMatZGJVnt3nY2CYMxdU9cRxbHVhzP8+trTSBZJt0nzGrxkP6XJWhu47AJbB2IceutT E/Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=4c9Nf0xCFNZxfPRt4PlZyVsc+0YLNfixZSDSHDUw0jA=; fh=f44jCB9A3eZOK/9ddIN/LQicG7u9iPkBEvfiUDd9o8g=; b=CwVfcEFeHI5j8+zr9ib1Fb5LrgwroCk65RokyOk8DZ+xerdp9Wb5H2uf3zu+7T87Qx wOECY2V93eEj0RFEgYDz+IBADjqcj9gFHyPrbj/WM1caUXpxTpY/dZ8PxykeBOamjYAa 8eQqq4bjrfs97U2FvNOcLskW0dt1HaC70TuO11BkH+hDTYaGENBRTamwNPU8ypGQRsTr w14NLUMbz+ETxRQFNrvOlFb8n/vbkmPkJrHyabl7iiYxSdwIy3XLs+lTY53sActypAMK o+XmgkDBWjwnDE9KjmuLvO82awZ8/TBdeCaLDkyz63LSQixgsgY7WC6NSNhHYij1dWrn gEPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kbgnKHJu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jj4-20020a170907984400b00992f45c9342si6370946ejc.1020.2023.08.13.13.43.56; Sun, 13 Aug 2023 13:44:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kbgnKHJu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230222AbjHMUUn (ORCPT + 99 others); Sun, 13 Aug 2023 16:20:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229745AbjHMUUn (ORCPT ); Sun, 13 Aug 2023 16:20:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5499110F9 for ; Sun, 13 Aug 2023 13:20:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E58DE60E07 for ; Sun, 13 Aug 2023 20:20:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D367EC433C8; Sun, 13 Aug 2023 20:20:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691958044; bh=4c9Nf0xCFNZxfPRt4PlZyVsc+0YLNfixZSDSHDUw0jA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=kbgnKHJuhrQSID8NCvBNxiKkQ85EEKEim4uacdl5bqSV9FcdOOa42L2xbef9HPoZW ayelpyjakJg63h0I9RoWxdIL/tOx0dUoV4ifR33Vb5QZpyu9TJsLneM7DVhgPb7dml F3APjUXxBTMSPyIhavL/1RcbMo1s1hA/lZg8U06lB2ZL9Ru6UThJ5hCPCllLjacBab q/GhCxtg0u1FcZjTNWzsEqmj83d2ov7RmtiIOt3Xgb7/Ty0DsPgDKa6bVdos0bVxxO Isd+h6n/EYzsuSM/42vN03WB/iCBzp7QvHQU91Ow6yDsleSCA7nX2IdAYDbXmxj+10 AxsJ7pddBfYAw== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Puranjay Mohan , paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, pulehui@huawei.com, conor.dooley@microchip.com, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, kpsingh@kernel.org, bpf@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: puranjay12@gmail.com Subject: Re: [PATCH bpf-next 1/2] riscv: Extend patch_text_nosync() for multiple pages In-Reply-To: <20230720154941.1504-2-puranjay12@gmail.com> References: <20230720154941.1504-1-puranjay12@gmail.com> <20230720154941.1504-2-puranjay12@gmail.com> Date: Sun, 13 Aug 2023 22:20:41 +0200 Message-ID: <87y1ie1yp2.fsf@all.your.base.are.belong.to.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Puranjay Mohan writes: > The patch_insn_write() function currently doesn't work for multiple > pages of instructions, therefore patch_text_nosync() will fail with a > page fault if called with lengths spanning multiple pages. > > This commit extends the patch_insn_write() function to support multiple > pages by copying at max 2 pages at a time in a loop. This implementation > is similar to text_poke_copy() function of x86. > > Signed-off-by: Puranjay Mohan Reviewed-by: Bj=C3=B6rn T=C3=B6pel