From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) (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 D2CD82907 for ; Mon, 27 Jan 2025 03:48:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737949697; cv=none; b=mP7G+/hDRVbZAmbtsqhxOCNjddd+G/XuObSptyNpsQ1ne2ihh7q1vbl0zdIOnlo6Z+qzdn7UPH8C9Mkb0WXMBjZFOjTuqluAFNaDtpaXTnUdQPgEMpkV8g0DEOY4nBe14SkN2+QxUIwj1HbBZcJwG41GItWisWyQbsgKUjhq9eU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737949697; c=relaxed/simple; bh=a12wM+R9JoXdp06irt9Wta1KSpa60Zt4uuDx2iQe9Oo=; h=Message-ID:Date:MIME-Version:To:Cc:From:Subject:Content-Type; b=U6f8dvz9ygTOj+bYKfqC0QQuqOzbSrm/q8+UYD1J2KwfS0CTi2a1hE2LZnbLv1aARYisZpZDdE8gPvoI7JO7u2PpNj77tGbdAdjhI5WCYWPBw6h+luX55H05e1Wueck8JD7gHIgLaFy1FGxzRkq10+5qflKnNahNScsaHzQNooY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=uwIHzYyy; arc=none smtp.client-ip=95.215.58.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="uwIHzYyy" Message-ID: <5ec75c39-2878-4caa-8fbd-68cf0aee28de@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1737949692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r/gKc8INF5ixj2JFAhsw1Idy/+j4SxxF5N6p2D+UT8g=; b=uwIHzYyy4Fz+GIaxiPDOTcov7gb47pL16tJ0/1tkE7DOzJrIv1/7n3U8T4JKXo3XyQO0Jp Xa/ActL5bSnHo0eyBOxQgVDNfyDfrBoFBU7e9CdGRCbFtNUvkNidA2wPxCSadci2kcYcah QDci4WTVtS9mgFhfIO0GymkqYzyZI5E= Date: Sun, 26 Jan 2025 19:48:06 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Language: en-GB To: Masahiro Yamada Cc: Nathan Chancellor , Song Liu , LKML X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yonghong Song Subject: clang thin-lto not working for aarch64 for v6.13 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Hi, Masahiro, We are trying 6.13 kernel and found that for aarch64 thinlto not working. For example, for kernel/bpf/syscall.o, the compilation flags from .syscall.o.cmd are savedcmd_kernel/bpf/syscall.o := clang -Wp,-MMD,kernel/bpf/.syscall.o.d ... -D__KBUILD_MODNAME=kmod_syscall -c -o kernel/bpf/syscall.o kernel/bpf/syscall.c ; ld.lld -EL -maarch64elf -z norelro -mllvm -import-instr-limit=5 -z noexecstack -r -o kernel/bpf/.tmp_syscall.o kernel/bpf/syscall.o; mv kernel/bpf/.tmp_syscall.o kernel/bpf/syscall.o I did some bisecting and found the issue is due to ``` commit bede169618c68379e1be7ace14e8ac85b964a9ec Author: Masahiro Yamada Date: Thu Nov 14 08:45:22 2024 +0900 kbuild: enable objtool for *.mod.o and additional kernel objects ``` In the above, for thinlto, we should not do ld.lld as compiler needs IR to do cross-file inlining. Searching the internet, I found that the issue has been reported e.g. in https://patchwork.kernel.org/project/linux-kbuild/patch/20241113234526.402738-3-masahiroy@kernel.org/ and you mentioned you will fix it. Do you have a fix somewhere? With this fix, deploying 6.13 in our production will cause performance regression and that is not what we want. Thanks! Yonghong