pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/56559: sudo and gnupg2 memory fault on Loongson/evbmips



The following reply was made to PR pkg/56559; it has been noted by GNATS.

From: manphiz <manphiz%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/56559: sudo and gnupg2 memory fault on Loongson/evbmips
Date: Mon, 20 Dec 2021 21:38:42 -0800

 After some more testing, it turns out only sudo can be fixed by adding
 "-Wl,-z,common-page-size=0x10000" to LDFLAGS.  An example hacky patch
 is attached.  It may be beneficial to add this flag globally so that
 other ports may also be fixed.
 
 On the other hand, the LDFLAGS trick doesn't work for gnupg2.  On a
 closer look, the gnupg2 doesn't have "-Wl,-z,relro" in its LDFLAGS.
 As gnats doesn't handle attachments well, I'll send a follow-up email
 to port-mips with full gnupg2 build log hoping it will be useful for
 debugging purposes.
 
 
 Index: security/sudo/Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/security/sudo/Makefile,v
 retrieving revision 1.187
 diff -u -p -r1.187 Makefile
 --- security/sudo/Makefile      21 Oct 2021 07:46:38 -0000      1.187
 +++ security/sudo/Makefile      21 Dec 2021 05:27:01 -0000
 @@ -48,6 +48,11 @@ CFLAGS+=     -D_OPENBSD_SOURCE=1
  CFLAGS+=       -D_INCOMPLETE_XOPEN_C063=1
  .endif
 
 +# Hack to work around pkg/56559.  A more generic solution may be preferred.
 +.if !empty(MACHINE_ARCH:Mmips*)
 +LDFLAGS.NetBSD+=       -Wl,-z,common-page-size=0x10000
 +.endif
 +
  .include "options.mk"
 
  OWN_DIRS+=             ${VARBASE}/run
 


Home | Main Index | Thread Index | Old Index