From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr2-f2.google.com (mail-wr2-f2.google.com [74.125.225.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF67A3D7D97 for ; Thu, 16 Jul 2026 09:49:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.66 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784195398; cv=none; b=VylerewZkWcsSYtrvlF+riNDUECb4CJ/w+lyUMoEpjAMFXZYuy3uZdfYZZxWOUzpbQpFTVRx80d+2K2/0kuEaCrsKNN2uPP58emil0/vlkh08tHtjC7Z/pXbIQgh4+1IM0NhcyaB2BgesdJx9ey0nU6t41c1Vf75qFZOaEpB4Lw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784195398; c=relaxed/simple; bh=OXxPZmYpI4mlPN9ogZsls8TdJ88Jcg7GFTOk8CLyGng=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:From:To:Cc: References:In-Reply-To; b=lBr6Zw4cwNwfv7DZygB70hcx+u1udIUaHUHBdD34bzSViexcmLODbBGjuKuloLYZHroiiNTxyRPGCKru20qW9q4ItZ7Ei1RN9dATikcCP9BYAK04dSxTshtLwO/CIC5bMsBegNF6FWmjxiy2xzTauwmnX9fxoK4k0X6W6Fyhk/8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZzFQAQMS; arc=none smtp.client-ip=74.125.225.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZzFQAQMS" Received: by mail-wr2-f2.google.com with SMTP id ffacd0b85a97d-473ba029526so737459f8f.0 for ; Thu, 16 Jul 2026 02:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784195395; x=1784800195; darn=vger.kernel.org; h=in-reply-to:references:cc:to:from:subject:message-id:date :content-type:content-transfer-encoding:mime-version:from:to:cc :subject:date:message-id:reply-to:content-type; bh=jJkcunLS46ASTxyciuPjAcQ3CqFxXqHDA25xRazP2KQ=; b=ZzFQAQMSBR54PwafY60IJs9G8oWaxyYrNknwwDhzs0hGZ4exQodTjTM3/iL5hZZgbr rhr99zXowkkZdDk41POQ5BuKNLdyxpwnD6/awy9eBpKlDFiQ2xSnvG/zrnZdOKUwVjp4 7ueFDYdXVc+BgWXvQx8NykhvXDcrqqUVLKOBsCLORfEcpwzpCLjbo+1U9ShIWGw2aNnj voLeicyV0wWInd299zozTVm95Jn7A9iqNegBw9/bjss/f+W1SckkBTrih0+qAv99cO+2 Z0WtXhUWaCzpBgo2xf2Y6SMC1S5464o2KmNk7vtFX5kYcCCmhKyOzoyNfNfkc43ihtBj dvpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784195395; x=1784800195; h=in-reply-to:references:cc:to:from:subject:message-id:date :content-type:content-transfer-encoding:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=jJkcunLS46ASTxyciuPjAcQ3CqFxXqHDA25xRazP2KQ=; b=aGI6UnFljbgVhO/R1MEITxHFd6eCLBSvaOGQ3GSHDvlUYF1JMogmr4ubKRtxyGcpFI TvVQU9VzzQhh98bs2GC1s776WssOiEyYEbcc0ubbsG9M0UOKssGfaOWVLqjsm8/rwTit DewSCo47reULFLen1C+9/DjiBrxw5LkN7ngLkQU14UJR52hBk7TFR5JpnDG4lBh+tuQ1 DXC9mQGeiqs03BooHLDo4wv3YDzKPyPypuDyy9xIOxZ8NQaKdqGoXH+VCY8OR7o8dUhB QnclAMbWJBdpOr8Aw/1d7yoD/lM5pij6LSUMc4VBbEp3wZKsJGBZHfVpxHJswzFxUSvz 11+g== X-Forwarded-Encrypted: i=1; AHgh+Rr+4ILupvJPusj25bL+gJGE+NybLNDfkyoIhS41tHwj6uww9ZR4mU+wjtFOAty8DB39Tuvy/x+2Q832YX8=@vger.kernel.org X-Gm-Message-State: AOJu0YyKbWCp3M2sWK7IoeGl9aBB/7993KNIJB06tMByK3LLifLysRUR VbD6o+ZqVemSlRjh4nQIh+Vyk8G0mJjURZ98aGPRJZPDwb+p/ISocDFC X-Gm-Gg: AfdE7clhjJY3TkS6hnLl7VPn8oePli/XKmYyQW0ZNB+Cs/Oeg72sED/ZopWsAra8DSV Klz1XOtqVYQhtL2xt5AoF5zuMVfQHIxozX4xm1Jv3+Hy46GuBuE2WEVxVBQ56Ii2HZFlInQopyB /Ilp8C2SCzeT9vL6CoFSILS47NMGONNJYnzCuQULxYXk/w2NjV4R+Y/Tj/LZQF3c/r8DNsaD0JB +Ros0PwXVUWtHFQi7rvhL1U54LxcV2oAzpE4mqUJTC9wgi3rLkFtZ4zIMvwrRPowLLNCkBcRQiq nQ5NCsfRAyfuwIxOh01gSJNydaZ5Vq0raCFma47hJsepoKyPzlH6pYCwMtOkFCG4D3fO97v4qDu W+gRKb+yONh+/sU+ATCQs6X3WaJGdjl2g1SL2YAYSkgLxSnV6pyZ3AhoqjHEGZh9tt/sjig2Cum toUOG+4gyEdP4uGP7PE8oWR5T9+aZ2Q9LV9NA7sfh/4y9ceqZT8tVL+BENgER4nwDJXxsvhzhkC t19yqVtxAlNYiQc/FYF1oPJjOz5AGrn8jO26F35nVq5 X-Received: by 2002:a05:6000:2999:20b0:47e:96f6:ab7f with SMTP id ffacd0b85a97d-47f5a4334c4mr1461201f8f.16.1784195394746; Thu, 16 Jul 2026 02:49:54 -0700 (PDT) Received: from localhost (nat-icclus-192-26-29-3.epfl.ch. [192.26.29.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f464d6fa7sm23682779f8f.37.2026.07.16.02.49.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2026 02:49:54 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 16 Jul 2026 11:49:53 +0200 Message-Id: Subject: Re: [PATCH bpf-next v3 1/5] bpf: dispatcher: allocate bpf_dispatcher->rw_image with vzalloc() From: "Kumar Kartikeya Dwivedi" To: "Mike Rapoport" , Cc: , , , , , , , , , , , , , , , , , , , , , , , X-Mailer: aerc 0.21.0 References: <20260716-execmem-x86-rox-bpf-v0-v3-1-4e76158c01c5@kernel.org> <7cce7d9ee2d24519db79c652aee2e4e562a8139dac923e5cefb4d5edfd4f6407@mail.kernel.org> In-Reply-To: On Thu Jul 16, 2026 at 11:27 AM CEST, Mike Rapoport wrote: > On Thu, Jul 16, 2026 at 08:52:25AM +0000, bot+bpf-ci@kernel.org wrote: >> > diff --git a/kernel/bpf/dispatcher.c b/kernel/bpf/dispatcher.c >> > index ea2d60dc1fee..79f0c222c583 100644 >> > --- a/kernel/bpf/dispatcher.c >> > +++ b/kernel/bpf/dispatcher.c >> > @@ -148,7 +148,10 @@ void bpf_dispatcher_change_prog(struct bpf_dispat= cher *d, struct bpf_prog *from, >> > d->image =3D bpf_prog_pack_alloc(PAGE_SIZE, bpf_jit_fill_hole_with_= zero, false); >> > if (!d->image) >> > goto out; >> > - d->rw_image =3D bpf_jit_alloc_exec(PAGE_SIZE); >> > + /* d->rw_image doesn't need to be in module memory range, so we >> > + * can use vzalloc. >> > + */ >> > + d->rw_image =3D vzalloc(PAGE_SIZE); >> >> This isn't a bug, but for multi-line comments under kernel/bpf/ the open= ing >> /* is expected to sit on its own line, so would this read better as: >> >> /* >> * d->rw_image doesn't need to be in module memory range, so we >> * can use vzalloc. >> */ > > This really contradicts what I see in the code :/ > We ended up changing to the multi-line convention, but you can let it be. P= eople are out on vacation, hence things are moving slow, but I plan to get to thi= s series soon. Sorry about the delay. >> > if (!d->rw_image) { >> > bpf_prog_pack_free(d->image, PAGE_SIZE); >> > d->image =3D NULL; >> >> >> --- >> AI reviewed your patch. Please fix the bug or email reply why it's not a= bug. >> See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/READ= ME.md >> >> CI run summary: https://github.com/kernel-patches/bpf/actions/runs/29482= 648692