Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp829969ybg; Tue, 9 Jun 2020 14:03:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2hYDWsQ2SbLn8xe8nAiy4GLV/tDZWfQ0cYSwA2dqOmV+xPwnoEgxG1pG3wD0KqpU0btlu X-Received: by 2002:a17:906:924c:: with SMTP id c12mr256016ejx.457.1591736639288; Tue, 09 Jun 2020 14:03:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591736639; cv=none; d=google.com; s=arc-20160816; b=lViLPkSDyQDYxzD3UGE6V0q8ZhREpU94uHuMRfDHhHGMIzgsvO4OzXOa3PfdqVms4d T6QbkD2TdJE99A6tf9dWuYdyA7XmK4Bzi5TgPhuc+8AzpTXrcjPB8taqIUwPAoP/hGxQ GK0Oxbj4C6oKeop++cZn3hgYQ7/7JkPPMaBCWvyEZFHd55kVkbV9BYvh91Z3MapbfB6+ BJX8ehPW6DhBDDlFGMkL6BHiZWaRgIKe+74QB0XDOWF/n+UUwZdB4fKZETVqG80d5kfP slKZKa5gS8z0KqSooh9uLJ66iBhSc+fwt2m0mBmKzW3CzEe0kvBnkSGgxFqiteG/bqht oDPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:ironport-sdr:ironport-sdr; bh=+oqhlMXJfQGHJI3O0j0Sk+c7hbx3hKLgqs1JWVN6Hxw=; b=xw5zQtdR+n2F7+Ov03jId9P7Hhn8Y2rTHD1YY9eQwFuGw1O0C6DxKs2+vxChtS0XHm f/F7Y0l1JebdZhgg19h/BT7LSbeG5pHixV57tWUxe0r2B/Qgt3YHcQNYA4c6cmMJvKWq Gh3vMXYnTU0b/3xkSb7Ln181HqBSJZc9p/hx5WetlG5mbFnzvJlz5CotygsHoYyNT7H6 0iZR/oTtIB91ChUgg7NEChTRvF6x/2QSjxvgazf0cl1Yl4uX+/sBy9WwVGPAXU/gLSHI +bh99AIjSChij/sHN4CHtYYRUiPpmb7DurXIPDne7MfO8FQpDfOQwH7F+rIxemt0JfuL V83w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m21si11339963ejo.731.2020.06.09.14.03.34; Tue, 09 Jun 2020 14:03:59 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727993AbgFIU7a (ORCPT + 99 others); Tue, 9 Jun 2020 16:59:30 -0400 Received: from mga07.intel.com ([134.134.136.100]:62079 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727904AbgFIU72 (ORCPT ); Tue, 9 Jun 2020 16:59:28 -0400 IronPort-SDR: 5lDixr/p/vdxV4ZZj5a+19kyLXJID/gFnj438kBPkXHByo3Q8w5ok1TXJFuTIyPFeYrspL0Fg+ B+XgYjjxk5gw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2020 13:59:27 -0700 IronPort-SDR: 0vHmxfcitgPq5aKmNiGaVNQijFphGRlPrPDnuFjSkrhPPNB25B1St8GMgMcxR6MjfyxsAjnbVY zDskt/CGzVyw== X-IronPort-AV: E=Sophos;i="5.73,493,1583222400"; d="scan'208";a="314305536" Received: from kcaccard-mobl.amr.corp.intel.com (HELO kcaccard-mobl1.jf.intel.com) ([10.209.86.25]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2020 13:59:26 -0700 Message-ID: Subject: Re: [PATCH v2 9/9] module: Reorder functions From: Kristen Carlson Accardi To: Kees Cook Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, "H. Peter Anvin" , Jessica Yu , arjan@linux.intel.com, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com, rick.p.edgecombe@intel.com, Ard Biesheuvel , Tony Luck Date: Tue, 09 Jun 2020 13:59:23 -0700 In-Reply-To: <202006091331.A94BB0DA@keescook> References: <20200521165641.15940-1-kristen@linux.intel.com> <20200521165641.15940-10-kristen@linux.intel.com> <202005211415.5A1ECC638@keescook> <9fdea0bc0008eccd6dfcad496b37930cf5bd364a.camel@linux.intel.com> <202006091331.A94BB0DA@keescook> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-06-09 at 13:42 -0700, Kees Cook wrote: > On Tue, Jun 09, 2020 at 01:14:04PM -0700, Kristen Carlson Accardi > wrote: > > On Thu, 2020-05-21 at 14:33 -0700, Kees Cook wrote: > > > Oh! And I am reminded suddenly about CONFIG_FG_KASLR needing to > > > interact > > > correctly with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION in that we do > > > NOT > > > want the sections to be collapsed at link time: > > > > sorry - I'm a little confused and was wondering if you could > > clarify > > something. Does this mean you expect CONFIG_FG_KASLR=y and > > CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y to be a valid config? I am > > not > > Yes, I don't see a reason they can't be used together. > > > familiar with the option, but it seems like you are saying that it > > requires sections to be collapsed, in which case both of these > > options > > as yes would not be allowed? Should I actively prevent this in the > > Kconfig? > > No, I'm saying that CONFIG_LD_DEAD_CODE_DATA_ELIMINATION does _not_ > actually require that the sections be collapsed, but the Makefile > currently does this just to keep the resulting ELF "tidy". We want > that disabled (for the .text parts) in the case of CONFIG_FG_KASLR. > The > dead code elimination step, is, IIUC, done at link time before the > output sections are written. > Ah ok, that makes sense. Thanks.