From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B659F68 for ; Fri, 3 Dec 2021 10:03:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A8FDC58325 for ; Fri, 3 Dec 2021 10:03:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638525827; bh=HcsQFI/ghrlsmuk/HhzFJHGCOxuy3yHFeobr2h17U9s=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IU5qXULyvMhg+VH4MemWiUQcN/UbSB/494YFo1EmGcJi5VmeeC4phaBSxcAuTQ9xm GzoZWX2pDdRYv5Ch1OzTgdbIwB7Z8ZJBG4DVQcFSQwvdwQarIynF8xY8spbo1m+t85 dZXkePHw9BRbabIAmhC2rp9rzoz1vHQE78+Gd5yFscnR5wuoSoAAI9REg3MRkNxqsS nTh3q+dJQ3mubqu+yPtUT0MiEhKmVcS/Owr6vNIpXglHfEKFaC0t4cdZKmADFQtSiq okEMoWcekcimXP3J1Z56FDqKGSBQn/7XFSTgVNKH4fk4QIqGfpolYb+29ZZpaptSmP SPTS7fMcsBzjA== Received: by mail-ot1-f42.google.com with SMTP id 47-20020a9d0332000000b005798ac20d72so2466992otv.9 for ; Fri, 03 Dec 2021 02:03:47 -0800 (PST) X-Gm-Message-State: AOAM532YFd+AyJAcLJpOtegyxoHDOdFDMTnJ5ua2TseqBg0+6YVP/pzA FaxuOT3tgo1qCAeSjaqu9YPY2wChG1/cVekctek= X-Google-Smtp-Source: ABdhPJxR9VEqm0AT4UQPc+72aVvXsObFDjS9txhyoFYIN9Rbgb5Ua9D/d7h3dSeJFtgJ9r+Pt7HZC+DraWfxddQ0EHk= X-Received: by 2002:a05:6830:1445:: with SMTP id w5mr15871334otp.112.1638525826380; Fri, 03 Dec 2021 02:03:46 -0800 (PST) Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20211202223214.72888-1-alexandr.lobakin@intel.com> <20211202223214.72888-8-alexandr.lobakin@intel.com> In-Reply-To: From: Ard Biesheuvel Date: Fri, 3 Dec 2021 11:03:35 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 07/14] kallsyms: Hide layout To: Peter Zijlstra Cc: Alexander Lobakin , linux-hardening@vger.kernel.org, X86 ML , Jesse Brandeburg , Kristen Carlson Accardi , Kees Cook , Miklos Szeredi , Tony Luck , Bruce Schlobohm , Jessica Yu , kernel test robot , Miroslav Benes , Evgenii Shatokhin , Jonathan Corbet , Masahiro Yamada , Michal Marek , Nick Desaulniers , Herbert Xu , "David S. Miller" , Thomas Gleixner , Will Deacon , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Arnd Bergmann , Josh Poimboeuf , Nathan Chancellor , Masami Hiramatsu , Marios Pomonis , Sami Tolvanen , Linux Kernel Mailing List , Linux Kbuild mailing list , linux-arch , live-patching@vger.kernel.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" On Fri, 3 Dec 2021 at 11:01, Peter Zijlstra wrote: > > On Thu, Dec 02, 2021 at 11:32:07PM +0100, Alexander Lobakin wrote: > > From: Kristen Carlson Accardi > > > > This patch makes /proc/kallsyms display in a random order, rather > > than sorted by address in order to hide the newly randomized address > > layout. > > Is there a reason to not always do this? That is, why are we keeping two > copies of this code around? Less code is more better etc.. +1. IIRC I made the exact same point when this patch was sent out by Kristen a while ago.