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 9A8F8C433EF for ; Thu, 16 Jun 2022 16:19:26 +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=HYQL88IoHu2Lt6sdwG/yLWbuzmN5PTSEqAl/Cg9AEYA=; b=4xXtrshWU8lIAu 8cEPAfZxxd9aG77luxZtEB20hMhsyBZLcsg5Gd2LbSFE5rc5dpLyqTfU8DQIldqg1+iP02hNwkV0H 1i3q/OQ2ifsDFZ7reu6lyIS33qwqfs9LTRi/OAOmeNkCJ2gZ+LeYM76c7xf3J0fjd8oiG2qE1jezk ZY7eujTq63NM8cbz7uAZdNKVsCzJrtIVtLr3OQjfj4VvsimAP5JDmCdeYsAXrHzzTZPUnPVGdy712 0R9ijj3WHmAkCywhPpl/3T6ztuuFpe6DWUE8hE+JdCAf2fCCuP0Y7sMopEIsvXxRCpysP+2kZJIeW 8DrIYvZ+AwsLyZ9jZjjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1sCN-003NS7-EG; Thu, 16 Jun 2022 16:18:23 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1sCJ-003NQm-Oo for linux-arm-kernel@lists.infradead.org; Thu, 16 Jun 2022 16:18:21 +0000 Received: by mail-pg1-x532.google.com with SMTP id 184so1665479pga.12 for ; Thu, 16 Jun 2022 09:18:17 -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=YThWgln9l4OPG2o0oO5dP1Gq7H9lMTy8Vq4yIgbkHKk=; b=fGDws3BEt9Yg+0C5R4F03o8NCl6tMK4Z+jTdfp9fEL9+lPvBwyXNrucAMpfVQcGMWV LgpKgFMnojytc9QA57nfpQsUf7VPKwE1cbgVcbqGl9ZAKdtUgqEgoF+yZtCudxKHzY3E GwIvx0+XF0Qm7SPwgtymxXED//Mqbv0K7DFZE= 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=YThWgln9l4OPG2o0oO5dP1Gq7H9lMTy8Vq4yIgbkHKk=; b=kPd1mx1iyoEryxo5lfwPpsvlXl34HOdVL6VzCRJkI12lIMTDYvIXjAPeBgu9LjJd6z /fEUCzAGMBAl4S98dfcXUSWoyF4zeATR30sVr7ObVfqGPi2Jgurdi7ZBwR8z7/7nvufW /HHMqYWhlnCqb9F5wS+aU5m8UugRaXIMY2cG25LdRTxX4FH2tZDdZudxfDYxtSna0XvE tNdyLFG/I5eX//2EO/AopWCZZ/fQt7bBdIIlmE9UB/LIJOGZV15vGigzuuF57RQHOAt/ sBf+9KuGSv8BpyETZfi7JADmSciEcF9ih40kd6AsaietSGj8df9/c+5IUnN24l9gYbpn Ct1w== X-Gm-Message-State: AJIora8z1Ck1Hi7rwcXtsAGeXTJZa+gngprLM7DkbMEhSdqQvJZb9wDs heaBSuVPeeD0Jn7zbd4CW3YI1Q== X-Google-Smtp-Source: AGRyM1vngQEcxexkSYphjnCYw7tJkdkm+e/gUFDNpwia9hTwRvQEpsjkwfwWKjOzYWXFQh5qE1Ml9w== X-Received: by 2002:a05:6a00:22d1:b0:51c:15ac:396e with SMTP id f17-20020a056a0022d100b0051c15ac396emr5423982pfj.58.1655396296779; Thu, 16 Jun 2022 09:18:16 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id iy7-20020a170903130700b0016156e0c3cbsm1855692plb.156.2022.06.16.09.18.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 09:18:16 -0700 (PDT) Date: Thu, 16 Jun 2022 09:18:13 -0700 From: Kees Cook To: Ard Biesheuvel Cc: Linux ARM , 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: <202206160917.D7DB8221@keescook> References: <20220613144550.3760857-1-ardb@kernel.org> <20220613144550.3760857-23-ardb@kernel.org> <202206130959.3C01F529@keescook> <202206131630.B6AE6ECEA3@keescook> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220616_091819_862252_9EEF1746 X-CRM114-Status: GOOD ( 13.79 ) 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 Thu, Jun 16, 2022 at 01:31:23PM +0200, Ard Biesheuvel wrote: > We used to have > > text > -- > rodata > (ro_after_init) > -- > inittext > -- > initdata > -- > data > bss > > where -- are the segment boundaries, which are always aligned to 64k on arm64 > > After this patch, we get > > text > -- > rodata > -- > inittext > -- > initdata > -- > (ro_after_init) > data > bss > > so in terms of padding due to alignment, there is not a lot of difference. But how is ro_after_init read-only and data isn't, if there isn't a segment alignment to make that work out? -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel