Use a 64KB page size for pdump

Resolves: #1979804
This commit is contained in:
Jacek Migacz 2023-01-10 20:56:14 +01:00
parent 391dfab8e3
commit 9f4ab6e568
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From 216c65b135c2b0be7e048cdc6683873b03b99b9a Mon Sep 17 00:00:00 2001
From: Lars Ingebrigtsen <larsi@gnus.org>
Date: Sun, 28 Mar 2021 19:13:00 +0200
Subject: [PATCH] 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).
---
src/pdumper.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/pdumper.c b/src/pdumper.c
index 337742fda4..fdd9b3bacb 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -162,11 +162,7 @@ ptrdiff_t_to_dump_off (ptrdiff_t value)
static int
dump_get_page_size (void)
{
-#if defined (WINDOWSNT) || defined (CYGWIN)
- return 64 * 1024; /* Worst-case allocation granularity. */
-#else
- return getpagesize ();
-#endif
+ return 64 * 1024;
}
#define dump_offsetof(type, member) \
--
2.36.1

View File

@ -5,7 +5,7 @@ Summary: GNU Emacs text editor
Name: emacs
Epoch: 1
Version: 27.2
Release: 7%{?dist}
Release: 8%{?dist}
License: GPLv3+ and CC0-1.0
URL: http://www.gnu.org/software/emacs/
Source0: https://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.xz
@ -28,6 +28,7 @@ Patch1: emacs-spellchecker.patch
Patch2: emacs-system-crypto-policies.patch
Patch3: emacs-glibc-2.34.patch
Patch4: emacs-ctags-local-command-execute-vulnerability.patch
Patch5: emacs-64KB-page-size-for-pdump.patch
BuildRequires: gcc
BuildRequires: atk-devel
BuildRequires: cairo-devel
@ -191,6 +192,7 @@ Development header files for Emacs.
%patch2 -p1 -b .system-crypto-policies
%patch3 -p1 -b .glibc2.34
%patch4 -p1 -b .ctags-local-command-execute-vulnerability
%patch5 -p1 -b .64KB-page-size-for-pdump
autoconf
# We prefer our emacs.desktop file
@ -481,6 +483,9 @@ rm %{buildroot}%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document23.svg
%{_includedir}/emacs-module.h
%changelog
* Tue Jan 10 2023 Jacek Migacz <jmigacz@redhat.com> - 1:27.2-8
- Use a 64KB page size for pdump (#1979804)
* Wed Jan 04 2023 Jacek Migacz <jmigacz@redhat.com> - 1:27.2-7
- Fix ctags local command execute vulnerability (#2149387)