Bug 1979804

Summary: emacs: portable dumper incompatible with 64K pages on aarch64
Product: Red Hat Enterprise Linux 9 Reporter: Florian Weimer <fweimer>
Component: emacsAssignee: Jacek Migacz <jmigacz>
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: ddutile, fsumsal, gcase, sam
Target Milestone: betaKeywords: Reopened, Triaged
Target Release: ---   
Hardware: aarch64   
OS: Unspecified   
Whiteboard:
Fixed In Version: emacs-27.2-8.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1974244 Environment:
Last Closed: 2023-05-09 07:49:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1974244    
Bug Blocks: 1978730, 2151999    

Description Florian Weimer 2021-07-07 06:18:52 UTC
If the aarch64 builders for CentOS 9 or Red Hat Enterprise Linux 9 switch to 4K pages, this bug will also affect the Emacs package there.

+++ This bug was initially created as a clone of Bug #1974244 +++

The emacs binary from emacs-nox-27.2-2.fc33.aarch64 cannot start in a chroot on Red Hat Enterprise Linux 8 because it assumes 4K pages:

openat(AT_FDCWD, "/usr/bin/emacs-27.2-nox.pdmp", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=10124128, ...}) = 0
read(3, "DUMPEDGNUEMACS\0\0(\304wp;D\330G%\f\265\337\214\264VO"..., 80) = 80
mmap(NULL, 10124128, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffff92240000
mmap(0xffff92240000, 6946816, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xffff92240000
mmap(0xffff928e0000, 90112, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x6a0000) = 0xffff928e0000
mmap(0xffff928f6000, 3087200, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x6b6000) = -1 EINVAL (Invalid argument)

Map offsets and addresses must be a multiple of the page size.

Comment 6 Florian Weimer 2023-01-09 13:27:24 UTC
I believe this was fixed upstream with this commit:

commit 216c65b135c2b0be7e048cdc6683873b03b99b9a
Author: Lars Ingebrigtsen <larsi>
Date:   Sun Mar 28 19:13:00 2021 +0200

    Use a 64KB page size for pdump
    
    * src/pdumper.c (dump_get_page_size): Use a 64KB page size on all
    architectures, as this many vary between systems (bug#47125).

Comment 12 errata-xmlrpc 2023-05-09 07:49:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: emacs security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:2366