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 BEC78C47258 for ; Tue, 23 Jan 2024 22:36:50 +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=t2/qhOxueD+0iTDurPZujGExbqU5yLVKB1TCNODoAuI=; b=ej6gbtTmQX7Cmt wOfqpdB8BkiasFiCc0k1xFvPud7TqVOc0DdUVxwG67cbisFQu0kPu/hhb+/g91JITl/60QI6SZNR0 fvmI/lF4E1zNDhmn6LSPZUTvny6U0iAvbRPzot75q8ZEFJcP01Jvx+Hxagagziadbxzs73Dy2+7tC 9DDHqm8J8VuFAXEjSG7xoxokb1W/eIUUf/z0ZlNLqstaZG49jl9eixK8aYq5ztLhqY2vP3Q3iZ7In 8clNVjW+1I95+HPGpxSHiq7GNJ19TRKM5WkAQ3K3JSMou2lX4po5H69QQrTDLTmEMddnVRuW4KFJT qndKJqOrDDl7pHDtJPZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSPNV-000iHV-2x; Tue, 23 Jan 2024 22:36:21 +0000 Received: from mail-oi1-f178.google.com ([209.85.167.178]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSPNT-000iGJ-1H for linux-arm-kernel@lists.infradead.org; Tue, 23 Jan 2024 22:36:20 +0000 Received: by mail-oi1-f178.google.com with SMTP id 5614622812f47-3bd72353d9fso3949756b6e.3 for ; Tue, 23 Jan 2024 14:36:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1706049316; x=1706654116; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=c6AnvGe+nDcHjURBPGcdHvtcORYZs9pMI2C+Mc0vQNM=; b=PVkSpx9CMRfssBlLMMqkHeYiOfoo8X7vtdvfSzQCQML7HvhQzpHBMpVTmUf4dXgvoS qE+3MIjqbMD7xMt6hx6EV7OqNz5KLMQ3RSZ6RnsDZLd0RKZEbjKSbqj5gxVFDkzHOZjW w/CIDgAIY222iIryqMGoUAL2KMqq7k4QVuagM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706049316; x=1706654116; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=c6AnvGe+nDcHjURBPGcdHvtcORYZs9pMI2C+Mc0vQNM=; b=vNar90swYij67pVk47CLJEH/IiQqENXFoW87SPVRyNf94bGKXdjLbXDIp4vSr0LnEj ghMd+oc/bko2b/izqvVdtVOxlo95nKP4l2ESgCVgSTODqUJNYcJHX2zmOKWfkad6P7sS gsxedpysBmdvggVIelQQLXihuAmZlim5T4PWTNSIwsIqSigKeIErDsckxQB7TpNBKVGg pouyrk+wlYgNmPKGBbq/oCahSr+6O1zxlwxrIi9u9rgr+fZkgBw4FA+R9e6Jr4/2i+yE G67YusYiFpjE5n8dQfIsUt9UBHEatCjCoVddQSfwM3iaYtA5MY1GL8rEjx0b9zdrA6OI Taqw== X-Gm-Message-State: AOJu0Yy2Vc3z2i38Nr57iV0IAwXKDAzWXgixQsAtksmQ1Gk/ezKh4+Gb lLvuHkD0DLx4LgCh3g/bPxre0ZxccrRsFO5z9Ua1b++DVNxbLdG5UAehpNz+dg== X-Google-Smtp-Source: AGHT+IH6Wm9LU//CqVYjGKX/7agKx4Kncxxv9iSw1pxwiuakH0Ny/I7WoORPxMG+l0RwGcmkYq8/tg== X-Received: by 2002:a05:6808:1450:b0:3bd:b8d0:99e7 with SMTP id x16-20020a056808145000b003bdb8d099e7mr759504oiv.1.1706049315889; Tue, 23 Jan 2024 14:35:15 -0800 (PST) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id b20-20020aa78114000000b006dbd787aa8csm5484970pfi.67.2024.01.23.14.35.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 14:35:15 -0800 (PST) Date: Tue, 23 Jan 2024 14:35:14 -0800 From: Kees Cook To: Ard Biesheuvel Cc: Matthew Wilcox , Linux ARM , mail@horotw.com, linux-hardening@vger.kernel.org, Jakub Wilk , Salvatore Bonaccorso , Linux Memory Management List , William Kucharski Subject: Re: Limited/Broken functionality of ASLR for Libs >= 2MB Message-ID: <202401231433.FB2D7FBD@keescook> References: <69fa6015256613ed10aee996e181ebd4@horotw.com> <87il3ur1ik.fsf@gentoo.org> <07c348caaf6b4c457ab4b452f53ed048@horotw.com> 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-20240123_143619_432911_EFBB6628 X-CRM114-Status: GOOD ( 20.56 ) 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 Tue, Jan 16, 2024 at 09:09:45AM +0100, Ard Biesheuvel wrote: > (cc Kees, LAKML) > > https://lkml.kernel.org/r/69fa6015256613ed10aee996e181ebd4%40horotw.com > > On Mon, 15 Jan 2024 at 21:46, Matthew Wilcox wrote: > > > ... > > Yeah, I don't know either. Outside my scope of expertise. > > > > I received a suggestion off-list that we only do the PMD alignment on > > 64-bit, which seems quite reasonable to me. After all, I don't care > > about performance on 32-bit just as much as I don't care about security > > on 32-bit. > > > > For context, the culprit is > > commit 1854bc6e2420472676c5c90d3d6b15f6cd640e40 > Author: William Kucharski > Date: Sun Sep 22 08:43:15 2019 -0400 > > mm/readahead: Align file mappings for non-DAX > > When we have the opportunity to use PMDs to map a file, we want to follow > the same rules as DAX. > > Signed-off-by: William Kucharski > Signed-off-by: Matthew Wilcox (Oracle) > > which affects *all* 32-bit architectures not just i686. 32-bit ARM > user space is still being deployed widely, even on arm64 Chromebooks > running 64-bit kernels (at least up until recently) so unfortunately, > we're not quite at the point yet where we can just let it rot. Is this related at all to this thread as well? https://lore.kernel.org/lkml/20220809142457.4751229f@imladris.surriel.com/ Can we avoid this on 32-bit or at least not mislead userspace about the available entropy visible in /proc/sys/vm/mmap_rnd*_bits ? -Kees -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel