Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1086831pxb; Fri, 26 Feb 2021 02:06:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxTQUjy5lTc/d8sk7E65LQEXEIFOn9lxDJQV4FD2KOBnwhL6UGZ5YxOxDylpLSIRojSjRB X-Received: by 2002:a17:906:f113:: with SMTP id gv19mr2396635ejb.379.1614333961404; Fri, 26 Feb 2021 02:06:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614333961; cv=none; d=google.com; s=arc-20160816; b=zZNhuCW2S0T0dMfqbYitbYKUu55qRj79ENlqUbH8rcV3bvYEvMu3YQg0cI8oNbDk2Z oBfhbT5GvV2Tn6Iyl6tp+yQ2BYrA9kv7QXOJeMeS8q0G5sdeHCWXsA6EIZU/NZHHLQrn 8CIrFVnsnV9Okgtg/gDyKC4rK0bBquVJBZneoAJjVT8PVuZiSiYV07jboS9r6DueRn/1 rhZM/DUpXKdjk1d5XwYZTHEAXYnJsYFTbgaIKlr/6M5CvdrHGbLip6/sUnMMyNmrZ5Po hQ/ZYi8RG+7Ve6bpn16aWWpya1qB+tg0Uj86BsGcQF7xJukvAo1RZYrPvBW/MsgDlDR5 1AkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=OZXwVNbXZV4lI1LIGmmW/Kxp49zjuh7sF9Qwivelrog=; b=ktLnFfPAgWYaCeOgo8BhcY28P6MlHCem/Vjp6mF8mVzSYjNk/5qEvw/gzexaoCMta4 tgvrCHcctTrq9Yy3ZbAjNe9uG4mVszmA8GgaPMUkkyE43tylVj+yTJjJucmKyddZ04wo pgC0LXLUNHIyfayP3av16tXtzp5HNfzgkG+2BAKjzl/SIDteUTBxvYXRtiohx1/HR99r n9+IoVSG6zdAsBOP2TEYPvVTJgYVgdzpoin87Yf08M75yRYK8X8paVMKgDTmHGngypTf m/0NHVUmlLRdLN8P5DJav/oILVD6ESVvOvl9qeCVbwRnXxBFtjl29IDrX372LOO5S7BU lYDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="QF5cz/JC"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rp21si5742482ejb.563.2021.02.26.02.05.39; Fri, 26 Feb 2021 02:06:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="QF5cz/JC"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230519AbhBZKEX (ORCPT + 99 others); Fri, 26 Feb 2021 05:04:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230454AbhBZKDa (ORCPT ); Fri, 26 Feb 2021 05:03:30 -0500 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAAFAC061797 for ; Fri, 26 Feb 2021 02:02:13 -0800 (PST) Received: by mail-io1-xd30.google.com with SMTP id 81so5395159iou.11 for ; Fri, 26 Feb 2021 02:02:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=OZXwVNbXZV4lI1LIGmmW/Kxp49zjuh7sF9Qwivelrog=; b=QF5cz/JCOKoT06JtuRjEOFMjfXPFxO2+qcBXMI5ZC8+BlRHmWqhWeLKo5KrAN3LcLh MIV8llWK9RXONkhFUTuvTytreTu+uC2jxadh+NVAubP2rpZGBe1ZrkBSVLG0fugh0XqO vuB8N5TM3AecFjyqUAEQ55gn8OlodB9K1tKnhiBVYKHP9q81v0GbKlNspKUdcUVC5bEe ZQXfIcurYStCR48ZCTsBKfAVkK/VpEvpKuINApyjHD2ritz2WRS0ExaxW1CsjUyQQFSg /4iy/RrAB9oKVsynBM0BOSfMO2ai3R2AtVeoVsV5EZn0NY4DCpWp/Cem/0BtPaaAv+tp BWBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=OZXwVNbXZV4lI1LIGmmW/Kxp49zjuh7sF9Qwivelrog=; b=iCtaMCm30vPvYespHekxzlydkpedMoKmt6Bw+8HneLGrA03Vq+0FgVet2XL1yVxXtm IAx5Glzoj24aWGYp8KJMM4ZoF6ZklExltSh+kaEizxkGsXWAe5sdsCH0K0zoKrYApBXa 1xXAsTHtCoruMFfw5aQOuN89+GeBfBWLmFVc/zWgwx2SU4L0/ENzdlnpEIXSVJgN/iZG ctdtnyxOJ4tblulRGsVv91W+ok9KK6aAe81qhAqq24gT/StUb/H8eFC8IYLMHPS1Ekom 4ezmPSoCSs8Xtms0Z5QtZ2kW6lb/tEkzwxcld7oQmfYXPZYrj2h+quh+Amm5Gw6Rt7yE cG9A== X-Gm-Message-State: AOAM5325smPM7Z/VmfDAQFfEGLF5ESeVe3d20Ry0c9QhH6dHHY2PoPiG UbYwEqvuTVQdZBRWligJ3YSFhpFn2FE/qTiyhZ4= X-Received: by 2002:a5d:9c4e:: with SMTP id 14mr2066351iof.57.1614333733229; Fri, 26 Feb 2021 02:02:13 -0800 (PST) MIME-Version: 1.0 References: <20210225112122.2198845-1-arnd@kernel.org> In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Fri, 26 Feb 2021 11:02:01 +0100 Message-ID: Subject: Re: [PATCH] [RFC] arm64: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION To: Arnd Bergmann Cc: Catalin Marinas , Will Deacon , Nathan Chancellor , Nick Desaulniers , Arnd Bergmann , Kees Cook , Mark Brown , Vincenzo Frascino , Geert Uytterhoeven , Kristina Martsenko , Ionela Voinescu , Mark Rutland , Andrew Scull , David Brazdil , Marc Zyngier , Ard Biesheuvel , Linux ARM , "linux-kernel@vger.kernel.org" , Clang-Built-Linux ML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 26, 2021 at 10:51 AM Arnd Bergmann wrote: > > On Fri, Feb 26, 2021 at 10:05 AM Sedat Dilek wrote: > > On Fri, Feb 26, 2021 at 9:14 AM Arnd Bergmann wrote: > > > > > > BTW, is CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y setable for x86 (64bit)? > > > > ( Did not look or check for it. ) > > > > > > No, in mainline, HAVE_LD_DEAD_CODE_DATA_ELIMINATION is currently > > > only selected on MIPS and PowerPC. I only sent experimental patches to > > > enable it on arm64 and m68k, but have not tried booting them. If you > > > select the symbol on x86, you should see similar results. > > > > > > > OK, i see: > > > > $ git grep HAVE_LD_DEAD_CODE_DATA_ELIMINATION arch/mips/ > > arch/mips/Kconfig: select HAVE_LD_DEAD_CODE_DATA_ELIMINATION > > > > $ git grep HAVE_LD_DEAD_CODE_DATA_ELIMINATION arch/powerpc/ > > arch/powerpc/Kconfig: select HAVE_LD_DEAD_CODE_DATA_ELIMINATION > > > > So, I need to add this to arch/x86/Kconfig. > > > > You happen to know if changes to arch/x86/kernel/vmlinux.lds.S > > (sections) are needed? > > No idea. I'm still debugging a possible regression on arm64, but both > issues I found for arm64 are specific to that architecture and won't > happen on x86. It's likely that something else breaks though. > My first experiences with gc were with the freetz project (mips embedded router) and don't ask me what GCC version. I will try with gc + trim + cfi later after my current build has finished. > > Last question: > > The last days I see a lot of fixes touching inlining with LLVM/Clang v13-git. > > What git tag are you using? > > What are your experiences? > > Pending patches (kernel-side)? > > > > I use: > > $ /opt/llvm-toolchain/bin/clang --version > > dileks clang version 13.0.0 (https://github.com/llvm/llvm-project.git > > c465429f286f50e52a8d2b3b39f38344f3381cce) > > This is what I have on the build box: > Ubuntu clang version > 13.0.0-++20210223104451+ebca13c66504-1~exp1~20210223095200.234 > Distro-clang takes much longer here. Selfmade stage1-only LLVM toolchain compiles here 10% faster. cfi takes approx. 20% longer. With trim + gc I suppose it will take much longer. Let me test. Will report later. - Sedat -