Skip Menu |

This queue is for tickets about the Math-Pari CPAN distribution.

Report information
The Basics
Id: 17141
Status: open
Priority: 0/
Queue: Math-Pari

People
Owner: Nobody in particular
Requestors: mcummings [...] gentoo.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: patch for hppa(linux), grsecurity support
The attached patch (user contributed in gentoo, not of my making) adds hppa support to the linux section of PariBuild.pm. Additionally, it adds a read flag check to the opening of /proc/cpuinfo, which on hardened linux boxes may fail.
Subject: math-pari-2.010702-hppa.patch
--- Math-Pari-2.010702.orig/utils/Math/PariBuild.pm 2005-11-11 05:49:34.000000000 -0500 +++ Math-Pari-2.010702/utils/Math/PariBuild.pm 2006-01-18 17:45:59.000000000 -0500 @@ -717,7 +717,9 @@ sub find_machine_architecture () { } elsif ($os eq 'linux') { chomp($machine = `uname -m`); $machine = 'sparcv9' if $machine eq 'sparc64'; - if (-e '/proc/cpuinfo') { + $machine = 'hppa' if $machine eq 'parisc'; + $machine = 'hppa' if $machine eq 'parisc64'; + if (-e '/proc/cpuinfo' && -R '/proc/cpuinfo') { open IN, '/proc/cpuinfo' or die "open /proc/cpuinfo: $!"; local $/ = undef; # Needed? my $info = <IN>;
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #17141] patch for hppa(linux), grsecurity support
Date: Wed, 18 Jan 2006 15:58:37 -0800
To: Guest via RT <bug-Math-Pari [...] rt.cpan.org>
From: Ilya Zakharevich <nospam-abuse [...] ilyaz.org>
On Wed, Jan 18, 2006 at 05:52:48PM -0500, Guest via RT wrote: Show quoted text
> > Wed Jan 18 17:52:47 2006: Request 17141 was acted upon. > Transaction: Ticket created by guest > Queue: Math-Pari > Subject: patch for hppa(linux), grsecurity support > Owner: Nobody > Requestors: mcummings@gentoo.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=17141 > > > > The attached patch (user contributed in gentoo, not of my making) adds > hppa support to the linux section of PariBuild.pm. Additionally, it adds > a read flag check to the opening of /proc/cpuinfo, which on hardened > linux boxes may fail.
What happens with the module if it is not readable? Anyway, >>TODO. Thanks, Ilya
Subject: Re: [rt.cpan.org #17141] patch for hppa(linux), grsecurity support
Date: Thu, 19 Jan 2006 03:46:32 -0500
To: bug-Math-Pari [...] rt.cpan.org
From: Michael Cummings <mcummings [...] gentoo.org>
On Wed, 2006-01-18 at 19:06 -0500, Ilya Zakharevich via RT wrote: Show quoted text
> What happens with the module if it is not readable? > > Anyway, >>TODO. >
Pulling from our bug on it: Found GP/PARI build directory in ../pari-2.1.6 (integer-formatted version 2001006). ...Generating libPARI/paricfg.h ... Scanning header files... ...ulong ...getrusage ...CLK_TCK not defined Creating libPARI/paricfg.h... open /proc/cpuinfo: Permission denied at utils/Math/PariBuild.pm line 718. make: *** No targets specified and no makefile found. Stop. This is because on a hardened platform with CONFIG_GRKERNSEC_PROC_ADD enabled, /proc/cpuinfo get set to: 0 -r-------- 1 root root 0 Aug 5 14:05 /proc/cpuinfo which makes it inaccessible during a normal make process ("normal being relative here, of course :) Anywho, thanks for taking the time to take a look at this! ~mcummings
Download signature.asc
application/pgp-signature 189b

Message body not shown because it is not plain text.

CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #17141] patch for hppa(linux), grsecurity support
Date: Thu, 19 Jan 2006 08:54:04 -0800
To: "mcummings [...] gentoo.org via RT" <bug-Math-Pari [...] rt.cpan.org>
From: Ilya Zakharevich <nospam-abuse [...] ilyaz.org>
On Thu, Jan 19, 2006 at 03:47:37AM -0500, mcummings@gentoo.org via RT wrote: Show quoted text
> > What happens with the module if it is not readable?
Show quoted text
> Creating libPARI/paricfg.h... > open /proc/cpuinfo: Permission denied at utils/Math/PariBuild.pm line 718. > make: *** No targets specified and no makefile found. Stop. > > This is because on a hardened platform with CONFIG_GRKERNSEC_PROC_ADD enabled,
Oups, it was a badly worded question. What I intended was: What happens with the module AFTER THE PATCH if it is not readable? Thanks, Ilya
Subject: Re: [rt.cpan.org #17141] patch for hppa(linux), grsecurity support
Date: Thu, 19 Jan 2006 12:44:10 -0500
To: bug-Math-Pari [...] rt.cpan.org
From: Michael Cummings <mcummings [...] gentoo.org>
On Thu, 2006-01-19 at 11:52 -0500, Ilya Zakharevich via RT wrote: Show quoted text
> Oups, it was a badly worded question. What I intended was: > > What happens with the module AFTER THE PATCH if it is not readable?
Unfortunately, i'm middle man in this discussion :) So far, the users using the patch haven't reported any adverse affects. math-pari is in our tree in large part because all of the perl based crypto modules depend on it in some fashion, and i'd hope they would have started failing for these folks at first run. Let me query and see if anyone's noticed any bad problems yet, ~mike
Download signature.asc
application/pgp-signature 189b

Message body not shown because it is not plain text.

From: mcummings [...] gentoo.org
Looking at the latest release, this bug can be closed. Thanks!!