From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796248281; b=SRUf8IflQiuwQr56RCuDV6sbVFTuYl+0Jb6U3zsLobp3SC4przuWvyciXNK0FeErKFRx FP6SGQSeT3usvDeMQebewKIxgm4IEUdwSrcWbYvD1kDPnApmvMWHG4TVooCAnoZ2MwUEY 6tyXprz7yfpqfKd/s7tpg1tWnz3d4tm/EshA5VFlJD80i/aTy6o2HkZzVphbHAY1Fo2YE pshjlp8jvHGY1P6ZTKg/T3hNEUlgi07CqvBalQPysyn6k4PY2fXGc3V//GYNjdDEmiLp4 yLnrmOeAhKDmckzCiRd6rgBhqgna3ycXTjNY/CCZfdylCtRB1PjkwICSlk/NJ7QpU7A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796248281; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=RhQdCoDBM59W7ROL8T6LBZoC8oJ1frUNX2s7Ambjvmg=; b=4RHDL+wdmCKM5WgRcKxn7dXPRjDn09nDXYdMDToTdzjUE3NB55JdcIOEJQ2e3XCpYPbP G30EHtVdm9nonJcXUPts+XLdk52BhyaYvvgfaBf6Mgl3mYKXC8tm8V6H/6rRRFnUNF/jO 3LmV/X0JXr564z2yXWnqb6TXJ6m/NpZnv6b8mQGoeXnXuQ6qT4315W0hOW43lD3Ec1JjS wktDgOMJyOfEf89lpz167v2t2FGcFR1Ih8+UPGuGBC/FQeC90NUdcVEiiM/pHAfGj9z55 oX5otsxuAsO81q6hEyV9h+Ut1eI/65Vq2XRriNKthfsgUW5334zoOmXNKBZ5i9dqzCg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=DsdA2Eiu; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67027606A322; Wed, 2 Dec 2026 21:51:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=DsdA2Eiu Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4E351F00897; Wed, 2 Dec 2026 21:51:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796248281; bh=RhQdCoDBM59W7ROL8T6LBZoC8oJ1frUNX2s7Ambjvmg=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=DsdA2Eiu+O96lTPJmT18EIPffBueGvLYiJ08NR65sZ76juCksRQwm7to/NCrE8/9v +ELMhqKqOTixp6GAKlrV1hFQVxnjJvQ1bb9haWFocVTnXFljOnDfkEkspn6OlsfEJL ZELqomMehUr7EKdOFBgaDOh8lFvOCN29DOXsNiRG27mEsd9vqEYEKsWENznSDC1F4b HKddVw2OhlMzSAhUA4uo42EUjrSaq167BhED3RynyvSN2WC2VuYJftNJzf7lpu3eYq Inp28iWwy5WZ2w4ygNaMEICzTNjlh5l4uTjwwKBn4mqVaqlLIKKwSwlSqIjS4xJ4vb i1HN7k+g/RpJA== Date: Wed, 2 Dec 2026 13:51:19 -0800 From: Josh Poimboeuf To: Binoy Ravindran Cc: Peter Zijlstra , Song Liu , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Joe Lawrence , linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v2 0/2] objtool/klp: Copy constant pool entries for local labels Message-ID: References: <20261130-objtool-klp-cst-v2-0-2718c17fca37@vt.edu> X-Mailing-List: llvm@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20261130-objtool-klp-cst-v2-0-2718c17fca37@vt.edu> On Mon, Nov 30, 2026 at 06:50:36PM -0500, Binoy Ravindran wrote: > A small problem in __clone_symbol(): a .LC label in a .rodata.cst* > pool has no size, so its constant is never copied into the livepatch > module, and the patched function reads whatever bytes follow. Patch 1 > fixes it. Details and the three affected modules are in that patch. > > Patch 2 adds a test to tools/objtool/tests, as Joe suggested. With > patch 1's change to klp-diff.c reverted it fails, and with the change > in place it passes, under gcc 12.2.0 and clang 14.0.6. The whole suite > passes under both compilers. > > One thing I noticed while running the suite: with a gcc built with > --enable-default-pie, as Debian's is, -mnop-mcount is rejected, > preflight falls back to objtool's mcount, and every gcc test that > needs an ftrace call site fails with "no ftrace call site, can't > patch". CC="gcc -fno-PIE -fcf-protection=none" avoids it. The kernel > always builds with -fno-PIE, so FIXTURE_CFLAGS might want it as well. > I can send a patch for that if it is useful. > > --- > Changes in v2: > - Add a test for the fix (Joe). > - Add Joe's Acked-by to patch 1. > - Link to v1: https://patch.msgid.link/20261127-objtool-klp-cst-v1-1-dc19b08c8676@vt.edu Queued, thanks! -- Josh