[ofa-general] in PPC64 i'm able to register the code segment with write permission

Dotan Barak dotanb at dev.mellanox.co.il
Wed Dec 12 07:58:48 PST 2007


Hi all.

I'm using the following machine attributes:
*************************************************************
Host Name         : mtlsqt185
Host Architecture : ppc64
Linux Distribution: SUSE Linux Enterprise Server 10 (ppc) VERSION = 10 
PATCHLEVEL = 1
Kernel Version    : 2.6.16.53-0.16-ppc64
GCC Version       : gcc (GCC) 4.1.2 20070115 (prerelease) (SUSE Linux)
Memory size       : 1740232 kB
Number of CPUs    : 8
cpu MHz           : 4005.000000MHz
MST Version       : 4.4.3
Driver Version    : OFED-1.2.5.4-20071210-0614
HCA ID(s)         : mlx4_0
HCA model(s)      : 25418
FW version(s)     : 2.3.906
Board(s)          : IBM08A0000001
*************************************************************

I'm executing the gen2_basic test (i guess any other test will do the 
trick too)
and i try to register one of the functions address (which is in the Code
Segment) with write permission enabled.

In all of the machines in our regression i fail to do it but in PPC64 i 
can do it.
When i checked the address which is being registered and the permission 
of it's VMA, i noticed
that the VMA of this function has write enable permission.

The function that i try to register is in address 0x1005ac80.

mtlsqt185:~ # cat /proc/17366/maps
00100000-00103000 r-xp 00100000 00:00 0
10000000-1004a000 r-xp 00000000 08:03 1063667                            
/tmp/tsscr/svn.mlx_tp/branches/ofed1.2.5/gen2/userspace/useraccess/gen2_basic/gen2_basic
1005a000-1005e000 rw-p 0004a000 08:03 1063667                            
/tmp/tsscr/svn.mlx_tp/branches/ofed1.2.5/gen2/userspace/useraccess/gen2_basic/gen2_basic
1005e000-1015f000 rw-p 1005e000 00:00 0                                  
[heap]


Is this is an IB issue?
Is this is a security hole in the linux kernel in PPC (because viruses 
can change the code in the code segment ...)

thanks
Dotan



More information about the general mailing list