Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5183253rwl; Wed, 28 Dec 2022 14:23:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXsH4Lh+0f5UYUwP85XqAHAywRvI+93xo9Rjxz3CZnT2GXDsSwz4yBZum3Tqg6XnQ2Yua8jq X-Received: by 2002:a17:902:c40f:b0:189:d4c5:f155 with SMTP id k15-20020a170902c40f00b00189d4c5f155mr39352679plk.63.1672266202689; Wed, 28 Dec 2022 14:23:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672266202; cv=none; d=google.com; s=arc-20160816; b=BvFuvuXfN5Z1WMvmnbVg5bZ553CrbA+fAiuiZNAJNE4kYeWHk9WkWy+Quo15ZdK7eg d3OjkQETbA+v19bzNbXGVnWI2+3Tre00lwxE/pWpPrHO0fQiQ9Ft61Yczj+JWFOcdl5Q Cnt4erBVGy/wBKMf9MkiIrT4FSvY+84w2pDkThiK/BTjDmFvEvE9YohwqXfUME0fIBuo HlG2bsjLwLRRWtG2gNrwVzz69OiBFJCDrawoZBHYgpXKmgxc/A+Og9IvHXLXP46oB5DP os5Vw5syTrdRY/OS+1hoZPRd/nXqVr+Rj4hizejdFdBFk1ZNkRBeEyAy8a5A54wVyupm iBbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:date:message-id :from:subject:content-transfer-encoding:mime-version:dkim-signature; bh=3fkXP+kqyYAkooS6SDXSTNjRh0ZR0wvqpJrvURMKoqE=; b=YtrWyxAMIAvSBO7N/bxPAcagJZQ+G1HVb80epdJwB0d0Wn80qXj6J1wkknlzw9VN4l Tl/LAL0WHuy7tKWwABI+XaJDIuxaNVFCx4xcDUTfzkOmNVL0XYvSKI45NI62EuYuKQzA Q1z5Xa/CmTOIVNWLgBzdR3SytmRBEUT5hGsOylghXdRr87LpPAObfGlDahjHL0SkRSOf zwQxMnlCY4DqMPckhAHClqmAv152GG/pvMZE9T5o+hHSMOINBQVxuD8lXbtdAu1coRQx j7JT5lxBSU25pHbLGdzzL0JXOwh1OunRp/2kyvflLgrqfKFEKC7Jr5Mfuf5Yjnavb+M/ K3sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=ROi45159; 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 w17-20020a170903311100b00186e9ff4edcsi16194020plc.408.2022.12.28.14.23.14; Wed, 28 Dec 2022 14:23:22 -0800 (PST) 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=fail header.i=@kernel.org header.s=k20201202 header.b=ROi45159; 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 S232362AbiL1WLX (ORCPT + 62 others); Wed, 28 Dec 2022 17:11:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233041AbiL1WKc (ORCPT ); Wed, 28 Dec 2022 17:10:32 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE5071740D; Wed, 28 Dec 2022 14:10:17 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9F7A7B818C8; Wed, 28 Dec 2022 22:10:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 4D069C433F2; Wed, 28 Dec 2022 22:10:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672265415; bh=MeR9j/cmIt9uaY3svYNjr58bocyoGbZmb2YMoE//58s=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=ROi45159QDNZO1hDflueUiB9tf4rcCUGUT9ysje19VpGabAnEV+5U4/SrxbWwHR/z mFzlrCQ1OezK9FIrv/KsDzir96wTtvEVOOUa4I0rkTIGQwzbukE6QXxV+zBJ/2YOM3 wO9Z+atqRvRIPTALcGHZmr79zgN/G8TT41ywsf+IulaVWjE5b2qU3rm1fY1rN7rGja oyXrYzstMZDiwdWEHPlhZydJRP0okGDYE5YnjIJokfDFJMX2FTh5eetzIfLGt6KKAI mvfLZRtvCUBVHGUAZ1NxG85buVel7mtXF2bRTW2YFSzpz6AW9in5dzFkdtu09PzCi6 WTd9SsC0rwj2Q== Received: from aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (Postfix) with ESMTP id 30269C395DF; Wed, 28 Dec 2022 22:10:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH] bpf: Fix panic due to wrong pageattr of im->image From: patchwork-bot+netdevbpf@kernel.org Message-Id: <167226541519.8452.10536194221890799528.git-patchwork-notify@kernel.org> Date: Wed, 28 Dec 2022 22:10:15 +0000 References: <20221224133146.780578-1-nashuiliang@gmail.com> In-Reply-To: <20221224133146.780578-1-nashuiliang@gmail.com> To: Chuang Wang Cc: stable@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org 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 Hello: This patch was applied to bpf/bpf.git (master) by Alexei Starovoitov : On Sat, 24 Dec 2022 21:31:46 +0800 you wrote: > In the scenario where livepatch and kretfunc coexist, the pageattr of > im->image is rox after arch_prepare_bpf_trampoline in > bpf_trampoline_update, and then modify_fentry or register_fentry returns > -EAGAIN from bpf_tramp_ftrace_ops_func, the BPF_TRAMP_F_ORIG_STACK flag > will be configured, and arch_prepare_bpf_trampoline will be re-executed. > > At this time, because the pageattr of im->image is rox, > arch_prepare_bpf_trampoline will read and write im->image, which causes > a fault. as follows: > > [...] Here is the summary with links: - bpf: Fix panic due to wrong pageattr of im->image https://git.kernel.org/bpf/bpf/c/9ed1d9aeef58 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html