From patchwork Fri Sep 14 16:03:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 969958 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-95843-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="CZ7A8SNQ"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42BgLK0QNqz9s3l for ; Sat, 15 Sep 2018 02:03:52 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=Oj1SGSMvZ/qRUbwafJH1037ThLRQn OiYK6lHNtjQurWQWhOEnzppyTR/1xHY8w9WWtuCZaTOKD1mLjKOsOAHUiQ8kklWk ietwt/kUUjCs3fBMHX1/tcVxbcoPdAC+MUHRp+on+e4J3b243XUxcYxS970EHJdf lzl57uCm3OgCdA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=VQmy5pVPoZF3Nk17Pz1P28W/578=; b=CZ7 A8SNQR2Mo//sfEtzVvcFoyx5MrOFjaLrDcYvi01eTi5H0nUDQCC5YtUPte/eJUKo HhWdb3Z6ZFNLgVGPMBr3qTaUOqHhCpKZWWiXS4oQXzQcU2ya8Rzq5FBxThyunnIW z7da1Mv9GHmOFc2KHcd6npIloCGQGMT3shp2Sl9s= Received: (qmail 37897 invoked by alias); 14 Sep 2018 16:03:45 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 37888 invoked by uid 89); 14 Sep 2018 16:03:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Fri, 14 Sep 2018 16:03:37 +0000 From: Joseph Myers To: Subject: Fix MIPS n32 pr_sigpend, pr_sighold, pr_flag type (bug 23656) [committed] Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 As discussed at and followup discussions, the MIPS n32 definitions of pr_sigpend and pr_sighold in struct elf_prstatus, and pr_flag in struct elf_prpsinfo, are wrong to use unsigned long long int; actual n32 core dumps use a 32-bit type there, so userspace unsigned long int is correct for all MIPS ABIs. This patch removes the conditionals (also thereby aligning the structures with other architectures and so facilitating future unification of different versions of this header). Tested with build-many-glibcs.py for its MIPS configurations. Committed. 2018-09-14 Joseph Myers [BZ #23656] * sysdeps/unix/sysv/linux/mips/sys/procfs.h (struct elf_prstatus): Remove [_MIPS_SIM = _ABIN32] conditional case. (struct elf_prpsinfo): Likewise. diff --git a/NEWS b/NEWS index dbb86a73a3..f76ada94d3 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,12 @@ Deprecated and removed features, and other changes affecting compatibility: the Linux kernel. This affects the size and layout of that structure on MicroBlaze, MIPS (n64 ABI only), Nios II and RISC-V. +* For the MIPS n32 ABI, the type of the pr_sigpend and pr_sighold members of + struct elf_prstatus, and the pr_flag member of struct elf_prpsinfo, + defined in , has been corrected to match the type actually + used by the Linux kernel. This affects the size and layout of those + structures. + Changes to build and runtime requirements: [Add changes to build and runtime requirements here] diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h index 523317dec7..6c4227781a 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h @@ -64,13 +64,8 @@ struct elf_prstatus { struct elf_siginfo pr_info; /* Info associated with signal. */ short int pr_cursig; /* Current signal. */ -#if _MIPS_SIM == _ABIN32 - __extension__ unsigned long long int pr_sigpend; - __extension__ unsigned long long int pr_sighold; -#else unsigned long int pr_sigpend; /* Set of pending signals. */ unsigned long int pr_sighold; /* Set of held signals. */ -#endif __pid_t pr_pid; __pid_t pr_ppid; __pid_t pr_pgrp; @@ -92,11 +87,7 @@ struct elf_prpsinfo char pr_sname; /* Char for pr_state. */ char pr_zomb; /* Zombie. */ char pr_nice; /* Nice val. */ -#if _MIPS_SIM == _ABIN32 - __extension__ unsigned long long int pr_flag; -#else unsigned long int pr_flag; /* Flags. */ -#endif unsigned int pr_uid; unsigned int pr_gid; int pr_pid, pr_ppid, pr_pgrp, pr_sid;