From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 08891CCA47B for ; Mon, 13 Jun 2022 17:01:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=24HK6n2vbLx94xEh7t6JGJEfmxlEeYsBc9qRbZ0fy10=; b=b8a5Y89f6D7jIS jofECMca5fEIJ4hETy3cjku5jtGOH5JC79L23JocwCkwMaJrCIz27CQDUs+PD9k6CjdLp7fWtmKH+ /tXkRf55LqcTab6jazEQ3FrFnhEaJfACva7Cyku/WblcHcFwFLoJMoT5aQ/v6zBSf4kWrF9zvGbUr IwjoI05Bko6fanWK1r9TiqIdp66Wqd4O06mSjfotcNNaK5MNSm7U3zLSps3uXQxs2+VHOAjXk1KX7 rMEfoYApp28uzdfVJwoQe9bMMwLA5+s+hIr9EDc6F9dYNOjMENc57dQdU9OMZiJat9/ULyuDr9u6g nvE/tX6RudwlHc5JpNCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0nQs-004oWP-Ru; Mon, 13 Jun 2022 17:00:54 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0nQp-004oVR-Qg for linux-arm-kernel@lists.infradead.org; Mon, 13 Jun 2022 17:00:53 +0000 Received: by mail-pf1-x42a.google.com with SMTP id x4so6257700pfj.10 for ; Mon, 13 Jun 2022 10:00:49 -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=78FqfRH7w514PF+DtTDUVZb4nuJTYN3Ujf+lT2vcKYw=; b=m4OpC7yjk6cQfwHjn5M2Ja5+zVSbNNSHFpomFR/Qqq7Xi3Arh2HO/aFpFwpXeVO3To V6/wik0x6+IpAZnIWC8NdwPsd66uwH6ttq1p9aEkRggL+0vMDF8GHcC3vY0PIAgQvtN7 1RV5mijcI0sEmsny/0R8SNQ0O6FKfnzjojjmg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=78FqfRH7w514PF+DtTDUVZb4nuJTYN3Ujf+lT2vcKYw=; b=wu5QS6pMybdsAZsZ0HrGqpM4A4nTu2whbiMs9Mdy4jatBFNZtIwPY3+C/HSn7IJDeC Kcm6JC3Scz653Ba9xAzbr7vlUqve5yCjAU1heigqJkK+NH2GDItZbNZ2jaUVA7vUDspw jDzWfirUPeyk/P82UNxnD3s8DlCP+DdC9NTMq1Xnaj5jNsJ7STXp6DfjDjAc1N8dtNDN t8Gg+G4rlPJgZlyKHwuPE8Fo6NajFIrGfUEm9kCx/MSXP6zoTh9G60p23piupkEt6FIa vw1sbWI7+mO1TD/4Crj1rLw13w7Knstv/F5bHMwDNzwZvBudNrmLNm/g8f1omnDAXgtF sY6Q== X-Gm-Message-State: AOAM530UB6J99ngMmYvnO19c/dlBotRP/Etyh475bq1Ht1+nohp1TnUy 9Qnb7j078lKRvb2yc5ahWDEBYQ== X-Google-Smtp-Source: ABdhPJwSHItZ1lerCMUPRWO1QCPNxs3aNf9iR9dOztuCtjArjjevQt7KrPA/zfU6UdslsPTNiKMJIw== X-Received: by 2002:a05:6a00:2389:b0:51c:3ca7:b177 with SMTP id f9-20020a056a00238900b0051c3ca7b177mr164659pfc.17.1655139648707; Mon, 13 Jun 2022 10:00:48 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id p28-20020a63741c000000b003fd9b8b865dsm5811318pgc.0.2022.06.13.10.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 10:00:48 -0700 (PDT) Date: Mon, 13 Jun 2022 10:00:47 -0700 From: Kees Cook To: Ard Biesheuvel Cc: linux-arm-kernel@lists.infradead.org, linux-hardening@vger.kernel.org, Marc Zyngier , Will Deacon , Mark Rutland , Catalin Marinas , Mark Brown , Anshuman Khandual Subject: Re: [PATCH v4 22/26] arm64: mm: move ro_after_init section into the data segment Message-ID: <202206130959.3C01F529@keescook> References: <20220613144550.3760857-1-ardb@kernel.org> <20220613144550.3760857-23-ardb@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220613144550.3760857-23-ardb@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220613_100051_906408_8E2E9127 X-CRM114-Status: GOOD ( 15.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 13, 2022 at 04:45:46PM +0200, Ard Biesheuvel wrote: > Currently, the ro_after_init sections sits right in the middle of the > text/rodata/inittext segment, making it difficult to map any of those > non-writable during early boot. So instead, move it to the start of > .data, and update the init sequences so that the section is remapped > read-only once startup completes. > > Note that this moves the entire HYP data section into .data as well - > this likely needs to remain as a single block for now, but could perhaps > split into a .rodata and .data..ro_after_init section later. If I'm reading this correctly, this means that .data..ro_after_init now lives between .data and .rodata? Do the various LKDTM tests still pass after this change? Reviewed-by: Kees Cook -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel