Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp344351ybt; Wed, 24 Jun 2020 00:16:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxA+v1zU2wxOt/22rKAKowXOtFTJc+cXbCQJ56vAJUomyBJtKphm578iY6VOtWMn9cK+rfq X-Received: by 2002:a17:906:8316:: with SMTP id j22mr6357154ejx.97.1592982964727; Wed, 24 Jun 2020 00:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592982964; cv=none; d=google.com; s=arc-20160816; b=qPRCKFVPZIcDxTidFz/dOgM6+XoPw/DIsdsAWxoBsMRzkotktkEeBGk0FllF75r++8 k1/ifQsw8QozgEuMOvvfiWB9RSn5DPJUUXAIlAB6F2m1uGlEkAM43sacX9r7oJnop6AB 5nwwjwsKDn5/N4d+YEnZ3VVC+rwU2tEQcBv33pt3VBKaBtThq7PW08/JmSdTDWR0+5Gz pOufzKz8u1gg3iC8a1LtEmZGa/gRF8xKFzODW63QBwn5z5qvYsmhSwTgcWAWShiF2VhA mGqotR6dZE7YcDUkuV7eipVDn6wI40IuFscuqtUNMXOTGoecKXZphXlLIZ0BTLr7ZTuw VRHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=IaIupdZDTPQkymgBfVG+0UDzO2HZVyEhIFNy78lMOE8=; b=GuQydQJSFllDn9wP1O5A0VGujR+bWg8lGdzZKzcAu3LzFOfUwvso77q+ESJu7dPLMW +WMB+5dH559o2+LsFmom4YLiBCpycMyKSbC2IdaeBKzGbfyPJczjl2lIJBNtJGLh/Xx1 IuyxDe0Qmr9lI/Psu304cV2w692/ZJndCHpWKUAeRwAI9+QQoeiavZcRbSQ4E6R65Q0w ldGo3U/iK6xywm1s57GaKTNKoHZg+4f3vbXDm9VDoM/MZYO9Ec3VI6SZWuEea/kdlwwF guER44zSiA9a/HW3ApDCJN53dhxlpg0Wm+m0YPwZ/enWRu5/n4ZOki/x9CgTCvKsKpTa HcfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jpmMG0PH; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m16si6094265eji.77.2020.06.24.00.15.39; Wed, 24 Jun 2020 00:16:04 -0700 (PDT) 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=@chromium.org header.s=google header.b=jpmMG0PH; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389610AbgFXHL0 (ORCPT + 99 others); Wed, 24 Jun 2020 03:11:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389583AbgFXHLZ (ORCPT ); Wed, 24 Jun 2020 03:11:25 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5BE5C061573 for ; Wed, 24 Jun 2020 00:11:23 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id f9so759455pfn.0 for ; Wed, 24 Jun 2020 00:11:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=IaIupdZDTPQkymgBfVG+0UDzO2HZVyEhIFNy78lMOE8=; b=jpmMG0PHfYi6EnAmdG5fjMx0DjviB4vfHp7oxw+UsZCuKGtKIGPQi/axyb5qwcz/QA ZauxRm4oA32Nn3tJIT1A1IknQybBPHIEaqBWXeV6EZXzFaFNG1rzC+DdW/cpf5FoYqst OuHNnTxKdxtEFHNy0ON5sPTSLlYJ7o0Bln868= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=IaIupdZDTPQkymgBfVG+0UDzO2HZVyEhIFNy78lMOE8=; b=OynXqIAACHkMn+4ANckdzVuAoknGIsPfWYu1gu+F7w8y/xg0Q7wSOMTaa80TF2Noi1 7hPAuiXVYuQD4kMTTK629y8la2y9fKqkY0F8gxHzR46aiBYDv3kjvGGOplgr7R5bT+qM UUYlSNAG1Sz5isAEFdUHWWeSR7ALBbClp3VRc/yIqq6HNWvE/PTfvhPmuLXwBS59BPX0 EvnEjScj3tv0q0ubkIBYELpiAhhNPFTZtUA4cSwMwj1cWapL4Ye7iXMXdzGZACpCBhX9 ej9zEsmd7lCxDX1naRZLrFWO47fby9DnIlrEFU14rF5+a9LV/NkauYnzuWU8kiD63VXY ViDg== X-Gm-Message-State: AOAM532VKH5GOWNrRIjuGLvC211g2nALU3itBwWnhpr8Pw5bEtMV23tH QyQ7T6hV9pC7BswqZjQMpyMpVQ== X-Received: by 2002:a63:ac53:: with SMTP id z19mr19935654pgn.181.1592982683374; Wed, 24 Jun 2020 00:11:23 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id g9sm18897717pfm.151.2020.06.24.00.11.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 00:11:22 -0700 (PDT) Date: Wed, 24 Jun 2020 00:11:21 -0700 From: Kees Cook To: Kristen Carlson Accardi Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, Jonathan Corbet , x86@kernel.org, "H. Peter Anvin" , arjan@linux.intel.com, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com, rick.p.edgecombe@intel.com, Tony Luck , linux-doc@vger.kernel.org Subject: Re: [PATCH v3 08/10] x86: Add support for function granular KASLR Message-ID: <202006240007.095694C@keescook> References: <20200623172327.5701-1-kristen@linux.intel.com> <20200623172327.5701-9-kristen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200623172327.5701-9-kristen@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 23, 2020 at 10:23:25AM -0700, Kristen Carlson Accardi wrote: > This commit contains the changes required to re-layout the kernel text > sections generated by -ffunction-sections shortly after decompression. > Documentation of the feature is also added. > [...] > Signed-off-by: Kristen Carlson Accardi > Reviewed-by: Tony Luck > Tested-by: Tony Luck This looks good! I wonder about some way (in the future) to share the sorting routines for kallsyms, exceptions, orc, etc. For now, though, I think this is fine. > [...] > + if (cmdline_find_option("fgkaslr", arg, sizeof(arg)) == 3 && > + !strncmp(arg, "off", 3)) { > + warn("FG_KASLR disabled on cmdline."); > + nofgkaslr = 1; > + } I was recently reminded by Randy Lunlap to document my new boot params, so I need to point out the same here. :) With a section added to Documentation/admin-guide/kernel-parameters.txt consider this: Reviewed-by: Kees Cook -- Kees Cook