Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3798160ybz; Mon, 20 Apr 2020 09:38:00 -0700 (PDT) X-Google-Smtp-Source: APiQypLwPBJoNki9SuoaYXTkG/H49j2wA64kTN0ExMQuGKNO3d0Sa35N7TyoM9JZ0nws9epjAP+C X-Received: by 2002:a50:d78a:: with SMTP id w10mr15510221edi.356.1587400680431; Mon, 20 Apr 2020 09:38:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587400680; cv=none; d=google.com; s=arc-20160816; b=0WYKodKh811CmDjKa9xQ3tsqro0URcmiNJs7BKvvI6b47h3edL7AmUCV8fUL3OwGeo plYFHWhlAScAPSsE5uLBAHUEPIsPl+2Ki3HZu9F/Dbgvj0cLCshxfiZy0hehS0DrXQ9x 9IIyLYyTZl8/andp2bmWqyXQTIhPoXh7wd399R9scoa3o65NvRe8lXcgcHr2ScPKrQvR SmeZOBo7mDAc4CkYpHHj8kikawUWcXaon2bdodB6/U5wmWspMaydS6baYGHTRzGUrY2J DV2z4+k7F8pqbNiOaHsoXUHZtVcVmMLLK7YUrw3nRc4epB0n9K9B86b/biekLUjt5wDs rV+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=QZam6/Jc0zmflQrHk/tdI2JQLCdcFtvCqq02VxQ2xgQ=; b=VuCtBGOOO7/f70jV9qgfp7EHcq7uBCDPGNmE7lWUVGmtbVCU7yMTvGpzgKUIMf+F3c Van6NjEZGXMW72hANjXBIT+2UGAUu96d3iQRtR7UDE9XbSqh3/CwP6HkdEyg5rqhq3lA lh5NtUvlbb+Irhe3fnagN+dOur6Y2M4iob7QjxrN407GNIRgEsHfZvLUB2jcZbw43EgT 3+SrF8p2RexrvernIhYXajyG32GAh/WBDXc6p4F45KXflZ03MBs0ZLipE6w4honZBH7y GfPY7Qyi5C/axHLYGWC2Lv5xBhpHb5mOBapqW3KJ+NLKneuI6IBBCPhP5PczALuWrV4p 3c6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iUF22fF6; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn23si896467ejb.331.2020.04.20.09.37.37; Mon, 20 Apr 2020 09:38:00 -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=@kernel.org header.s=default header.b=iUF22fF6; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726798AbgDTNne (ORCPT + 99 others); Mon, 20 Apr 2020 09:43:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:47374 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726498AbgDTNnd (ORCPT ); Mon, 20 Apr 2020 09:43:33 -0400 Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4F87721473 for ; Mon, 20 Apr 2020 13:43:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587390213; bh=QZam6/Jc0zmflQrHk/tdI2JQLCdcFtvCqq02VxQ2xgQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=iUF22fF6UL3O3WqRu185lGxaT4VR1bUQPVizSD8ZNeX7VpAcN0ohK0bWwhmNPzVxR nOF8P6I+1ry5tSjvG7rmO0ijXhF1jR9sl2Xri+8x95E5M9ZGydOVdK3p3IRJGb343n FSAISa/0xSk89rwOJcJYA/PxID0SmIDz8CLiMmTk= Received: by mail-io1-f51.google.com with SMTP id z2so6610740iol.11 for ; Mon, 20 Apr 2020 06:43:33 -0700 (PDT) X-Gm-Message-State: AGi0PuberwbKt43mY/Ohfngl9r/gMhzJHTuEzeCeHDAHGNfz0rI07ow2 1vQI++PsiSC85LLLVTDfQ36rxQ6RFuE5JFG4D1s= X-Received: by 2002:a02:3341:: with SMTP id k1mr16096555jak.74.1587390212759; Mon, 20 Apr 2020 06:43:32 -0700 (PDT) MIME-Version: 1.0 References: <20200415210452.27436-1-kristen@linux.intel.com> <20200415210452.27436-10-kristen@linux.intel.com> In-Reply-To: From: Ard Biesheuvel Date: Mon, 20 Apr 2020 15:43:21 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 9/9] module: Reorder functions To: Arjan van de Ven Cc: Kristen Carlson Accardi , Kees Cook , Thomas Gleixner , Ingo Molnar , Borislav Petkov , hpa@zytor.com, Jessica Yu , X86 ML , Linux Kernel Mailing List , kernel-hardening@lists.openwall.com, rick.p.edgecomb@intel.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 20 Apr 2020 at 15:37, Arjan van de Ven wrote: > > On 4/20/2020 5:01 AM, Ard Biesheuvel wrote: > > Is that the only prerequisite? I.e., is it sufficient for another > > architecture to add -ffunction-sections to the module CFLAGS to get > > this functionality? (assuming it defines CONFIG_FG_KASLR=y) > > I suspect you also need/want at least normal KASLR enabled as > a "does it even make sense" common sense threshold Fair enough. But that is more of a policy concern than a functional concern. FWIW I took patches #8 and #9, hardwired a couple of CONFIG_FG_KASLR=y checks and added the -ffunction-sections GCC option for the modules, and everything appears to be working as expected on arm64. I was just wondering if I was missing something. Note that arm64 does not have a decompressor, so there the fine grained randomization of the core kernel is not really feasible using the approach presented here.