From patchwork Fri Feb 10 13:28:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 1740456 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=U3kEIJFw; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PCvhJ6Nywz23fc for ; Sat, 11 Feb 2023 00:28:48 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 85241385843A for ; Fri, 10 Feb 2023 13:28:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85241385843A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676035725; bh=DiF9aGTrZmFHYORiIPjIGUiw0sZruw7zgNIAhrBGjjc=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=U3kEIJFwWIcl9BtVYsZc0Xg0Jp1RfAgApnweOWu9gK6YncGeoyrFdHmSJa3Z2ZIU1 pBzWY65CZG99NdOV6mHZ7D/phXG7bdG8TYk8jIt4aGTpKL0v5ymGoRgsarvWor0NVa 6geQLi0RD3H15GLKDyqaz2gEPV9c8kle7GGvrDIs= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by sourceware.org (Postfix) with ESMTPS id 6CFBD3858D28 for ; Fri, 10 Feb 2023 13:28:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6CFBD3858D28 X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from ls3530 ([92.116.172.157]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MS3mt-1p1yPD2j7L-00TQQt; Fri, 10 Feb 2023 14:28:24 +0100 Date: Fri, 10 Feb 2023 14:28:21 +0100 To: libc-alpha@sourceware.org, dave.anglin@bell.net, fweimer@redhat.com Subject: [PATCH v2] hppa: Drop old parisc-specific MADV_* constants Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Provags-ID: V03:K1:fqDCv33CQJN8pKjai3eCJFamh+hJzLuDyRatp0RyEZ8Fuzj6gkT A8+JrkcAbBQymCJYV+DXpDeRBy/bkkPd/0wYx/Ts6+4C+/dOco7/hoDmcPdKhL9o7Kxh24f dVNejIy04skIm/9yo3WNfxBHYFotdynjRnBniLFXS28Wex3s8PddsYi7lnTLsmXCC9rT2e2 6F9CeXpdeeaZRBQvQ3ozA== UI-OutboundReport: notjunk:1;M01:P0:wa9b9fwDbxA=;K6CMhfsf/hXGrrKgElUcawEjReY NOc4xqi2+bICIof6QuoMS/bNccisD/eaRSwZGbUAmDxa4XWCDXpgj3QU2CIUWU+wBif+Qr77a SJs8UUl9Ih1SiIBxHuOaEw6yEA+x2AgJN+zJ+ME8dG338eC7Sva/R93/RNA+IPeM6lmN3Kh7B rUaQtEWftRaQlzGgSP4IafCkppNwJc3NiwBBZ/Az0M5Z3uv8J0G5bPgn5SmJS4ptsMN5zilTI 5GntGU+9I8bFXhJxoV4GRa2LypABhTTfNNFhCXCkJvzVEUneuHbrx1UkdajICPGO6o8N8gpcW 4f2pST61jbeF3fONYDmhjtE4fXMDOTvx5D6IhCaqKksrpJFw5zG4WM6mYyRliesugLHyNpXzM fqk6+JAnwpdRa9SLhnxJj55tIRW/pY+MsVLY1eEe+YYl89rczTAPkOCfrjMpx+xxif1SmUqpo xFLv1sHtygQIgbdY4AqPYu70B9yOg45nc3T++rkA9QJc5NO4m3BHt6/CXTcvNlvAZT6aL7duY 4uxzGrkf86H6yMg++l5olxpW09cMB7DEfE0mhEEINsJj5NjGVQQzr/JNtrEyUkW4cpEDRRpBu wA9ibTRwVDu7Yykjkmp7zNVuGpqeRKXF1qICowwjKm++3/UEnsA2ED21zr3dAmLuguGvLbKFy a6iHp+gIzPXye0uq/3jQBxC4elU1QOoXXyzDrwH0daCtdi58IJmePHPOgvFJbirSJ3KiFNChd xuNPfNm5QL/NUn/Klx5kB9jqJTnbJ3aOR9yguJUGuBkf5bR94yIEmDqzdJbP8waIZ4an8l2xS WPfPsm8nO8DkRBA8UZlQAn0hNxMkqItQHgJA1aUFFdUva/bpI5xlzqe87BbAu+X3TdhERw0Tl rN1WqkFdQoQyF3+VgPE/m5RchWcdgJ7L3f3Rba0hkv3rMTFNxP1iB7aZLp7b40bPQrF/Y5ewa y0JX37NYuOlcmVLpNNjVfrBNSB0= X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Helge Deller via Libc-alpha From: Helge Deller Reply-To: Helge Deller Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" The Linux kernel upstream commit 71bdea6f798b ("parisc: Align parisc MADV_XXX constants with all other architectures") dropped the parisc-specific MADV_* values in favour of the same constants as other architectures. In the same commit a wrapper was added which translates the old values to the standard MADV_* values to avoid breakage of existing programs. This upstream patch has been downported to all stable kernel trees as well. This patch now drops the parisc specific constants from glibc to allow newly compliled programs to use the standard MADV_* constants. Signed-off-by: Helge Deller --- v2: Added NEWS section, based on feedback from Florian Weimer diff --git a/NEWS b/NEWS index a7979a9cd3..d1e0d5c874 100644 --- a/NEWS +++ b/NEWS @@ -13,7 +13,12 @@ Major new features: Deprecated and removed features, and other changes affecting compatibility: - [Add deprecations, removals and changes affecting compatibility here] +* In the Linux kernel for the hppa/parisc architecture some of the + MADV_XXX constants were changed to have the same values as the other + architectures. New programs compiled with this glibc version and which + use the madvise call will require at least Linux kernel version 6.2, + alternatively stable kernels from versions 6.1.6, 5.15.87, 5.10.163, + 5.4.228, 4.19.270 or 4.14.303. Changes to build and runtime requirements: diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h index c315efceb0..f5a69693af 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h @@ -39,11 +39,6 @@ #define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap underlying mapping. */ -/* Advice to "madvise" */ -#ifdef __USE_MISC -# define MADV_SOFT_OFFLINE 101 /* Soft offline page for testing. */ -#endif - #include #undef MAP_TYPE @@ -59,26 +54,3 @@ #define MS_ASYNC 2 /* Sync memory asynchronously */ #undef MS_INVALIDATE #define MS_INVALIDATE 4 /* Invalidate the caches */ - -/* Advice to "madvise" */ -#ifdef __USE_MISC -# undef MADV_MERGEABLE -# define MADV_MERGEABLE 65 /* KSM may merge identical pages */ -# undef MADV_UNMERGEABLE -# define MADV_UNMERGEABLE 66 /* KSM may not merge identical pages */ -# undef MADV_HUGEPAGE -# define MADV_HUGEPAGE 67 /* Worth backing with hugepages */ -# undef MADV_NOHUGEPAGE -# define MADV_NOHUGEPAGE 68 /* Not worth backing with hugepages */ -# undef MADV_DONTDUMP -# define MADV_DONTDUMP 69 /* Explicity exclude from the core dump, - overrides the coredump filter bits */ -# undef MADV_DODUMP -# define MADV_DODUMP 70 /* Clear the MADV_NODUMP flag */ -# undef MADV_WIPEONFORK -# define MADV_WIPEONFORK 71 /* Zero memory on fork, child only. */ -# undef MADV_KEEPONFORK -# define MADV_KEEPONFORK 72 /* Undo MADV_WIPEONFORK. */ -# undef MADV_COLLAPSE -# define MADV_COLLAPSE 73 /* Synchronous hugepage collapse. */ -#endif