From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 218A33D332E for ; Tue, 26 May 2026 15:11:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779808278; cv=none; b=k4P/ThAabJBVjhBpY1iDCZoyvzA0y1tsYtBnRSwR5kucQvsPehf2Vct5cw9wICXoTSAaodUqdvgcpIvBwvfTvrUZiURnkDF8vo2pAOeYXfHSiagxmuuJjvwS9S7bhBJOtGYsGwGYnPguzVK9S8MkTS59iDDfSKlPbH1lxEqFi5s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779808278; c=relaxed/simple; bh=gd7YB/+NXxKEZ9KxPswSPwnxYkI3190MPCT9SqzCRiI=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type; b=nbHe9AVoJPzXbAEW4OI4HWOUYIbsxH9kR/R9kANSalT92sx+dgQ2XrqZyP+X6fDOZeJEwpviC+X6HiI8lMYar+fGIG4bB6HRrd18u9pLXN6VLsHyhJgyHoCT0xH0z+K5HZD5jZqwd/ovDCcQIUx5LWTSFlsrAMMPXOz/abItg4A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=nuduw5SX; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="nuduw5SX" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:Message-ID:References: In-Reply-To:Subject:Cc:To:From:Date:MIME-Version:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=dgXPzZks042vDCPxwi/FYcjpoAOOgxJVnLQfvZEDcwU=; b=nuduw5SXvbcCXV/Mvx9DeIwsQn GC+6hx3vjvtfn5o8Q3q84RnCOk7HXuPFHnIxF4OESlsBxH3xwy3wfpjXjtCQKXuBG5WJVSZd0zwM2 wZJS/eXXUpvA8r2GppxKCQFP95UlHH7TETC3L+BtvunYCFUXpRJKelEq0uA4AJM5NPz3sd4X5bHgw x7cEydk9sMcA5WlGuvo/nIv3PcR1jKUaHeXLhtkcDXhsrDeR60OO9LaSFU54nipgHQ83tYyvyw/rG hSvka5eQpPYrJ/rsxTmuBJjZnHooMuG1Hy82Poa2D3d+PLOHsHhu9okwSeT4+s/28VI0YDe0k9cbQ 8Nayt9ug==; Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine2.igalia.com with esmtps (Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1wRtQq-008ULx-0d; Tue, 26 May 2026 17:11:00 +0200 Received: from webmail.service.igalia.com ([192.168.21.45]) by mail.igalia.com with esmtp (Exim) id 1wRtQn-00FQhw-Gh; Tue, 26 May 2026 17:10:59 +0200 Received: from localhost ([127.0.0.1] helo=webmail.igalia.com) by webmail.service.igalia.com with esmtp (Exim 4.98.2) (envelope-from ) id 1wRtQm-00000004KKo-3QFA; Tue, 26 May 2026 17:10:57 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Tue, 26 May 2026 12:10:57 -0300 From: Mauricio Faria de Oliveira To: Juergen Gross Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Alexey Dobriyan , Boris Ostrovsky , kernel-dev@igalia.com, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, kernel test robot Subject: Re: [PATCH v3 1/4] x86/asm: move inline string functions to In-Reply-To: References: <20260520-pvh-kasan-inline-v3-0-bede769c6ec7@igalia.com> <20260520-pvh-kasan-inline-v3-1-bede769c6ec7@igalia.com> Message-ID: X-Sender: mfo@igalia.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Report: NO, Score=-3.8, Tests=ALL_TRUSTED=-3,AWL=-1.612,BAYES_50=0.8,URIBL_BLOCKED=0.001,URIBL_ZEN_BLOCKED_OPENDNS=0.001 X-Spam-Score: -37 X-Spam-Bar: --- Thanks for reviewing. On 2026-05-26 06:51, Juergen Gross wrote: > On 20.05.26 23:12, Mauricio Faria de Oliveira wrote: >> In next patch, inline string functions are included from 'boot/string.c'. > > Please don't use "In next patch". You can't be sure the patches of a > series are going to be committed all together. > > A better alternative wording would be "In a future patch". Ack; replaced. > >> Using the header is problematic for a couple of reasons (*) >> (i.e., build errors), which can be addressed, but introduce unnecessary >> complexity and regression risk (beyond these _found_ couple of reasons). >> >> Using a new header is simpler and transparent to >> existing users of , with less changes to 'boot/string.c' >> and its users (eg 'boot/compressed/string.c' and 'purgatory/purgatory.ro'), >> which minimize regression risk. >> >> No functional change intended. >> > > I'd rather put the footnote below after the "---" line, as it is more > interesting for the reviewer than the consumer of "git log" or "git show". > > Note that others might disagree, though. Good point; indeed, that is review material. I'll change it for now. >> (*) Reasons not to include in 'boot/string.c': >> >> 1) 'boot/string.c' is built for 16-bit/real mode thus some type and word >> size errors happen when include, e.g., . >> >> This can be addressed with '#ifndef _SETUP' (defined by 'boot/Makefile'). >> >> 2) 'boot/string.c' is included by 'boot/compressed/string.c' which is >> the source of 'purgatory/string.o', linked by 'purgatory/purgatory.ro' >> (CONFIG_KEXEC_FILE). >> >> In 64BIT, includes , which references >> __memset() and __memmove() with KCFI_REFERENCE(), ie, __ADDRESSABLE(); >> however, 'purgatory/purgatory.ro' is not linked with implementations. >> >> So, CONFIG_KEXEC_FILE and CONFIG_CFI without CONFIG_KASAN hit errors: >> >> >> ld.lld: error: undefined symbol: __memset >> >>> referenced by string.c >> >>> arch/x86/purgatory/purgatory.ro:\ >> (__UNIQUE_ID_addressable___memset_0) >> -- >> >> ld.lld: error: undefined symbol: __memmove >> >>> referenced by string.c >> >>> arch/x86/purgatory/purgatory.ro:\ >> (__UNIQUE_ID_addressable___memmove_1) >> >> (Note: this is not hit with CONFIG_KASAN because 'boot/compressed/string.c' >> adds aliases __memset()/__memmove() to memset()/memmove() in that case.) >> >> This can be addressed with 'CFLAGS_string.o := -D__DISABLE_EXPORTS' so to >> disable KCFI_REFERENCE() in 'purgatory/Makefile' (it removes CC_FLAGS_CFI >> anyway). >> >> ... >> >> However, since a change in this series would need more changes to address >> errors it causes, it is reasonable to change the series not to cause them, >> by using a separate header with _just_ inline string functions. >> >> Reported-by: kernel test robot >> Closes: https://lore.kernel.org/oe-kbuild-all/202605140922.q7IlUv7o-lkp@intel.com/ >> Signed-off-by: Mauricio Faria de Oliveira > > With (at least) my first remark addressed: > > Reviewed-by: Juergen Gross Sent v4 with both remarks above addressed and your new R-b tags; thanks! > > > Juergen -- Mauricio