From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.48 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796137892; b=dIgnxxgOYiZlkZfZ90LfnTPpVsjdf+mFkE6e1QCKifmCWetKTEZgL1yGtbj4fWEe6hNW jN0mq9AsIRet0NZCnII8I/oABY1toWuO11srN8ycPUrscl9T+On3eBuDfopNRRG5N2B2T usN5ccuO6QUbMfTTo1+CRwHr9HM/ulKdL7We6cmySZ9o5AL9tNytO4GSrmCgHxBGTnDTJ MSJ1Tm53ACDxqx0lcuBRY/BmGaUwvQLtG6JgBO+ZoYkVmKPZZWZ0IwhOIdBzmMTWkycgO 4BWrsobZAKTajfPcSfE8ZjC7xpu4QOsuBtJrIfjILFnFpO0cjk0oAfw7pGWatB7FNxQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796137892; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=GddvCNAr0OYV8B1hhXJPV9JPhzhxBHjkY2O9qQpVX+c=; b=kk9CZj6IwzMF9jYNgiHIEb4rA/ZUAH/NZXs+OnX44P3bd7zJVQVctSWGnmU9hQzSLbJ9 fnlKcWzNUWQsWmGXO1+8KOrRrgbY78ftkiCm3vchsVseWooG8eaVeJaGaefMQYTg6EHcu PlvNXgQmOFCyOIfXUsybbo7lF2gJu1UBnDReiwkM0cNB+wepYiQJpGcjnEujobuusXsmf OGSOHuyL7JAhAUQ0aIHrfL9fJ2X00fBvlN4a9mrXneD0PvTh5tJ5CODuvxNVTG3iw0UX8 EvVXkj638LFDxrA2ZouQm9tWxc7c+4N5GtKwyXUX/dalt3Vd5CK6jQjRjAPvbzhf2Ew== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Oqnp+kVC; arc=none smtp.remote-ip=209.85.221.48 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AEC76606A320 for ; Tue, 1 Dec 2026 15:11:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AEC76606A320 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.a=rsa-sha256 header.s=20260707 header.b=Oqnp+kVC Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-498f5fa4f70so10061328f8f.0 for ; Tue, 01 Dec 2026 07:11:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796137890; x=1796742690; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=GddvCNAr0OYV8B1hhXJPV9JPhzhxBHjkY2O9qQpVX+c=; b=Oqnp+kVC5/MyA7rt/NiwWSyp+zoO++1OrMpnRfS5CpVMOMGpfQfPb6R+L46b2mNTl/ V1meP/pPnJWEt0+Qs9FBiyHq2smgu5LeNqAwkONCY0e4caTrPrOoI4St+qZkmrl9vKeb VTz45Ty24lMxzgRl4cjDX9JE14Cc4LjoiT5bPpzD7/knekgI/r4rO9OwqSzpJ763brOa dJvV5C2N9dmOL2g5GbE2yezq7UvF15HTizk1nBaJWbu10SI2l+Wm9wnEnppxX/nBDcbw eN8t1xDnQIGoZAGWaGI3ksUL6qPNyqti/CGLRiLZ+X+D96wphQUyR2/65f7Ty6cvpcml Oqag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796137890; x=1796742690; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=GddvCNAr0OYV8B1hhXJPV9JPhzhxBHjkY2O9qQpVX+c=; b=CjM5GRjpky9oGf1nE+9i3PaqAgjSnBCmRsQEaSBieXbgnH2hSg9zXL3Pg3tbfNzRvd 8dfw/JsCUHVwcZ9/cvucyHM7jrGk60RoNuTFTDKmDMFRJnRaIJ8BmUv9Xnzm3uScOZdg jgBX5Dt5Sjtqju74OslBXjM790+gONr5xU8030CamQ6g+q27MtbBRZiVvst/xVDuSMmz m+81kaNYASU2N/IpdXjoxzJNZbDqlLNqwkHCfflZkMjg0Kh4NmsLm+SObhd3lfEKNglw vQnrXja5VAApOHxeUhG0oKr1ZHlMkCOVGoqftwVYsv8k6JtdkmYYk8PCtE0jc1Oek2ds zZKQ== X-Forwarded-Encrypted: i=1; AL+hErEKj8X5u0Q755YSqQPNYVXHHx5k7n1RzKwIYfko5GRqZF41h+7HG6Y1C/H/X7io3RTzvfw=@vger.kernel.org X-Gm-Message-State: APuU4Z9MrunHmfMX6m6GT8DteM/QoM6vPUkGARTY+tKV72sTeIJ6T+3I 97+g0xT0Hw7AkFJksg3s8OogI71Is46HPbe1UQ0FK/BwTL5xHg4LIBsn X-Gm-Gg: AZFdTZdV1JX23MJcxdT/mG3g6jlrmXRsQi4WhV87EHlZZKSyti/SHHrUPxB7ypfU8kK xdcrM2PtjKcn/kE98MYJp8QZ0jw+2YbOq7Q/neWem1hx3q+3A5umSTecQixnXrobiQbGW96coWk T57kMsOWWXT1I18Xqs9Ihf0Y9VG2d23p4ik8BixK7li/jCXCDvca/WHAOVOnUrzju9fq1y1N5TD 2hPY6Te5tYoaknAQ6OeqoLm4US05gwUvyQR0mF8ewixTTusqcQOQomAXgezHyBdozIUaSCOAXPN 9gRxSEpeAcdp5jY3jFjE657bz6ERApJe/2uS/DxPojTgwpz6dYcuvCRbtiOyY8AXJS4Af8IAqT7 HA9bQ//Myd0v4XlBJ6+Pp24GfgdtoBNUWOtJiIbaEBbSoAx8Xmw9A95DK9PjXD0BNpC/o4vbDY3 FQ4hTfBPyv76rWWbqMsKa+PLzhqv3VsWQc32aZICyOxUMQwwWl8V68q0otC3WTSNm3vs+Z1K5us Wf3kZo8f6FhTO2x3qTmc9s4z3BINt1MBoAS1/+ZgmZV8pn21hIiT0e+TvGm9aetGSxJSLu7u891 L1T2z4ShYxkaHwSP0CFeqGk6TsA4BN0SNscxBJs1WSCGQbGgHi242+cxRpg88QG7EU2fV42LVCr fWMsILi7sDrNPMWWbF8UEW1mcabUwln3k1WegKFQ1MH69xTtUIkeGVQ== X-Received: by 2002:a5d:6f0d:0:b0:4af:cd40:6fcb with SMTP id ffacd0b85a97d-4afcd40712emr58931644f8f.57.1796137889889; Tue, 01 Dec 2026 07:11:29 -0800 (PST) Received: from Developer ([216.234.217.221]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab658e2c8csm72395109f8f.2.2026.12.01.07.11.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 07:11:29 -0800 (PST) From: Seke Kazuru To: joe.lawrence@redhat.com Cc: live-patching@vger.kernel.org, jpoimboe@kernel.org, mbenes@suse.cz, pmladek@suse.com, song@kernel.org, peterz@infradead.org, bpf@vger.kernel.org Subject: Re: objtool/klp: ___bpf_prog_run jumptable is correlated to the original, fix never runs Date: Tue, 1 Dec 2026 17:11:17 +0200 Message-ID: <20261201151117.1659-1-kazuruuni@gmail.com> X-Mailer: git-send-email 2.51.0.windows.1 In-Reply-To: References: X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hello Joe, Thank you for the review and the pointers to the test documents. The regression test follows in the next message as a patch. It fails on mainline and passes with either fix, on gcc 11 to 16 and Clang 15 to 19 and 21 to 23, and on arm64 with Josh's klp-build-arm64-latest branch. Writing it showed that since v7.2 the problem has two forms. Since 873a2208ea ("objtool/klp: Calculate object checksums") and 6016dd33a1 ("objtool/klp: Rewrite symbol correlation algorithm"), a patch to ___bpf_prog_run() that moves a label is rejected with "changed data: jumptable.N", so it cannot be built. A patch that leaves every label in place still builds and runs the original handlers. On kernel/bpf/core.o from 7.4-rc5, a change to the ALU_NEG handler is rejected with "changed data: jumptable.14", and a change to the text of the pr_warn() in default_label builds, with ___bpf_prog_run() still pointing at .klp.sym.vmlinux.jumptable.14. The test covers both. I have a version of option 2 that passes the whole suite on the same compilers. I can send it, with a variant of the test whose table has a different name, if that would help. Separately, test-local-to-global-flip fails with Ubuntu's gcc 11 to 14, which default to -fcf-protection=full. I am sending a small patch for the fixture flags in its own thread. The test was written with an AI assistant from klp-write-tests.txt, klp-test-design.txt and the report, as its Assisted-by tag says. I reviewed it and ran the checks described in the changelog. Thank you, Seke Kazuru