2005-04-17 02:20:36 +04:00
/ *
* This f i l e i s s u b j e c t t o t h e t e r m s a n d c o n d i t i o n s o f t h e G N U G e n e r a l P u b l i c
* License. S e e t h e f i l e " C O P Y I N G " i n t h e m a i n d i r e c t o r y o f t h i s a r c h i v e
* for m o r e d e t a i l s .
*
* Copyright ( C ) 1 9 9 5 - 2 0 0 0 , 2 0 0 1 b y R a l f B a e c h l e
* Copyright ( C ) 1 9 9 9 , 2 0 0 0 S i l i c o n G r a p h i c s , I n c .
* Copyright ( C ) 2 0 0 1 M I P S T e c h n o l o g i e s , I n c .
* Copyright ( C ) 2 0 0 4 T h i e m o S e u f e r
*
* Hairy, t h e u s e r s p a c e a p p l i c a t i o n u s e s a d i f f e r e n t a r g u m e n t p a s s i n g
* convention t h a n t h e k e r n e l , s o w e h a v e t o t r a n s l a t e t h i n g s f r o m o 3 2
* to A B I 6 4 c a l l i n g c o n v e n t i o n . 6 4 - b i t s y s c a l l s a r e a l s o p r o c e s s e d
* here f o r n o w .
* /
# include < l i n u x / e r r n o . h >
# include < a s m / a s m . h >
# include < a s m / a s m m a c r o . h >
2006-07-07 17:07:18 +04:00
# include < a s m / i r q f l a g s . h >
2005-04-17 02:20:36 +04:00
# include < a s m / m i p s r e g s . h >
# include < a s m / r e g d e f . h >
# include < a s m / s t a c k f r a m e . h >
# include < a s m / t h r e a d _ i n f o . h >
# include < a s m / u n i s t d . h >
# include < a s m / s y s m i p s . h >
.align 5
NESTED( h a n d l e _ s y s , P T _ S I Z E , s p )
.set noat
SAVE_ S O M E
2006-09-26 18:43:40 +04:00
TRACE_ I R Q S _ O N _ R E L O A D
2005-04-17 02:20:36 +04:00
STI
.set at
ld t 1 , P T _ E P C ( s p ) # s k i p s y s c a l l o n r e t u r n
dsubu t 0 , v0 , _ _ N R _ O 3 2 _ L i n u x # c h e c k s y s c a l l n u m b e r
sltiu t 0 , t 0 , _ _ N R _ O 3 2 _ L i n u x _ s y s c a l l s + 1
daddiu t 1 , 4 # s k i p t o n e x t i n s t r u c t i o n
sd t 1 , P T _ E P C ( s p )
beqz t 0 , n o t _ o 3 2 _ s c a l l
# if 0
SAVE_ A L L
move a1 , v0
PRINT( " S c a l l % l d \ n " )
RESTORE_ A L L
# endif
/ * We d o n ' t w a n t t o s t u m b l e o v e r b r o k e n s i g n e x t e n s i o n s f r o m
userland. O 3 2 d o e s n e v e r u s e t h e u p p e r h a l f . * /
sll a0 , a0 , 0
sll a1 , a1 , 0
sll a2 , a2 , 0
sll a3 , a3 , 0
dsll t 0 , v0 , 3 # o f f s e t i n t o t a b l e
ld t 2 , ( s y s _ c a l l _ t a b l e - ( _ _ N R _ O 3 2 _ L i n u x * 8 ) ) ( t 0 )
sd a3 , P T _ R 2 6 ( s p ) # s a v e a 3 f o r s y s c a l l r e s t a r t i n g
/ *
* More t h a n f o u r a r g u m e n t s . T r y t o d e a l w i t h i t b y c o p y i n g t h e
* stack a r g u m e n t s f r o m t h e u s e r s t a c k t o t h e k e r n e l s t a c k .
* This S u c k s ( T M ) .
*
* We i n t e n t i o n a l l y k e e p t h e k e r n e l s t a c k a l i t t l e b e l o w t h e t o p o f
* userspace s o w e d o n ' t h a v e t o d o a s l o w e r b y t e a c c u r a t e c h e c k h e r e .
* /
ld t 0 , P T _ R 2 9 ( s p ) # g e t o l d u s e r s t a c k p o i n t e r
daddu t 1 , t 0 , 3 2
bltz t 1 , b a d _ s t a c k
1 : lw a4 , 1 6 ( t 0 ) # a r g u m e n t # 5 f r o m u s p
2 : lw a5 , 2 0 ( t 0 ) # a r g u m e n t # 6 f r o m u s p
3 : lw a6 , 2 4 ( t 0 ) # a r g u m e n t # 7 f r o m u s p
4 : lw a7 , 2 8 ( t 0 ) # a r g u m e n t # 8 f r o m u s p ( f o r i n d i r e c t s y s c a l l s )
.section _ _ ex_ t a b l e ," a "
PTR 1 b , b a d _ s t a c k
PTR 2 b , b a d _ s t a c k
PTR 3 b , b a d _ s t a c k
PTR 4 b , b a d _ s t a c k
.previous
li t 1 , _ T I F _ S Y S C A L L _ T R A C E | _ T I F _ S Y S C A L L _ A U D I T
LONG_ L t 0 , T I _ F L A G S ( $ 2 8 ) # s y s c a l l t r a c i n g e n a b l e d ?
and t 0 , t 1 , t 0
bnez t 0 , t r a c e _ a _ s y s c a l l
jalr t 2 # D o T h e R e a l T h i n g ( T M )
li t 0 , - E M A X E R R N O - 1 # e r r o r ?
sltu t 0 , t 0 , v0
sd t 0 , P T _ R 7 ( s p ) # s e t e r r o r f l a g
beqz t 0 , 1 f
2010-09-28 21:50:37 +04:00
ld t 1 , P T _ R 2 ( s p ) # s y s c a l l n u m b e r
2005-04-17 02:20:36 +04:00
dnegu v0 # e r r o r
2010-09-28 21:50:37 +04:00
sd t 1 , P T _ R 0 ( s p ) # s a v e i t f o r s y s c a l l r e s t a r t i n g
2005-04-17 02:20:36 +04:00
1 : sd v0 , P T _ R 2 ( s p ) # r e s u l t
o32_syscall_exit :
local_ i r q _ d i s a b l e # m a k e n e e d _ r e s c h e d a n d
# signals d o n t c h a n g e b e t w e e n
# sampling a n d r e t u r n
LONG_ L a2 , T I _ F L A G S ( $ 2 8 )
li t 0 , _ T I F _ A L L W O R K _ M A S K
and t 0 , a2 , t 0
bnez t 0 , o 3 2 _ s y s c a l l _ e x i t _ w o r k
j r e s t o r e _ p a r t i a l
o32_syscall_exit_work :
j s y s c a l l _ e x i t _ w o r k _ p a r t i a l
/* ------------------------------------------------------------------------ */
trace_a_syscall :
SAVE_ S T A T I C
sd a4 , P T _ R 8 ( s p ) # S a v e a r g u m e n t r e g i s t e r s
sd a5 , P T _ R 9 ( s p )
sd a6 , P T _ R 1 0 ( s p )
sd a7 , P T _ R 1 1 ( s p ) # F o r i n d i r e c t s y s c a l l s
move s0 , t 2 # S a v e s y s c a l l p o i n t e r
move a0 , s p
2011-05-19 12:21:29 +04:00
jal s y s c a l l _ t r a c e _ e n t e r
2005-04-17 02:20:36 +04:00
2005-11-30 19:24:57 +03:00
move t 0 , s0
RESTORE_ S T A T I C
2005-04-17 02:20:36 +04:00
ld a0 , P T _ R 4 ( s p ) # R e s t o r e a r g u m e n t r e g i s t e r s
ld a1 , P T _ R 5 ( s p )
ld a2 , P T _ R 6 ( s p )
ld a3 , P T _ R 7 ( s p )
ld a4 , P T _ R 8 ( s p )
ld a5 , P T _ R 9 ( s p )
ld a6 , P T _ R 1 0 ( s p )
ld a7 , P T _ R 1 1 ( s p ) # F o r i n d i r e c t s y s c a l l s
2005-11-30 19:24:57 +03:00
jalr t 0
2005-04-17 02:20:36 +04:00
li t 0 , - E M A X E R R N O - 1 # e r r o r ?
sltu t 0 , t 0 , v0
sd t 0 , P T _ R 7 ( s p ) # s e t e r r o r f l a g
beqz t 0 , 1 f
2010-09-28 21:50:37 +04:00
ld t 1 , P T _ R 2 ( s p ) # s y s c a l l n u m b e r
2005-04-17 02:20:36 +04:00
dnegu v0 # e r r o r
2010-09-28 21:50:37 +04:00
sd t 1 , P T _ R 0 ( s p ) # s a v e i t f o r s y s c a l l r e s t a r t i n g
2005-04-17 02:20:36 +04:00
1 : sd v0 , P T _ R 2 ( s p ) # r e s u l t
j s y s c a l l _ e x i t
/* ------------------------------------------------------------------------ */
/ *
* The s t a c k p o i n t e r f o r a c a l l w i t h m o r e t h a n 4 a r g u m e n t s i s b a d .
* /
bad_stack :
2010-09-28 21:50:47 +04:00
li v0 , E F A U L T
2005-04-17 02:20:36 +04:00
sd v0 , P T _ R 2 ( s p )
li t 0 , 1 # s e t e r r o r f l a g
sd t 0 , P T _ R 7 ( s p )
j o 3 2 _ s y s c a l l _ e x i t
not_o32_scall :
/ *
* This i s n o t a n o 3 2 c o m p a t i b i l i t y s y s c a l l , p a s s i t o n
* to t h e 6 4 - b i t s y s c a l l h a n d l e r s .
* /
# ifdef C O N F I G _ M I P S 3 2 _ N 3 2
j h a n d l e _ s y s n 3 2
# else
j h a n d l e _ s y s64
# endif
END( h a n d l e _ s y s )
LEAF( s y s32 _ s y s c a l l )
2008-11-19 02:05:46 +03:00
subu t 0 , a0 , _ _ N R _ O 3 2 _ L i n u x # c h e c k s y s c a l l n u m b e r
sltiu v0 , t 0 , _ _ N R _ O 3 2 _ L i n u x _ s y s c a l l s + 1
beqz t 0 , e i n v a l # d o n o t r e c u r s e
dsll t 1 , t 0 , 3
2005-04-17 02:20:36 +04:00
beqz v0 , e i n v a l
2008-11-19 02:05:46 +03:00
ld t 2 , s y s _ c a l l _ t a b l e ( t 1 ) # s y s c a l l r o u t i n e
2005-04-17 02:20:36 +04:00
move a0 , a1 # s h i f t a r g u m e n t r e g i s t e r s
move a1 , a2
move a2 , a3
move a3 , a4
move a4 , a5
move a5 , a6
move a6 , a7
sd a0 , P T _ R 4 ( s p ) # . . . a n d p u s h b a c k a 0 - a3 , s o m e
sd a1 , P T _ R 5 ( s p ) # s y s c a l l s e x p e c t t h e m t h e r e
sd a2 , P T _ R 6 ( s p )
sd a3 , P T _ R 7 ( s p )
sd a3 , P T _ R 2 6 ( s p ) # u p d a t e a 3 f o r s y s c a l l r e s t a r t i n g
jr t 2
/* Unreached */
2008-10-31 21:23:09 +03:00
einval : li v0 , - E N O S Y S
2005-04-17 02:20:36 +04:00
jr r a
END( s y s32 _ s y s c a l l )
.align 3
.type sys_ c a l l _ t a b l e ,@object
sys_call_table :
PTR s y s32 _ s y s c a l l / * 4 0 0 0 * /
PTR s y s _ e x i t
PTR s y s _ f o r k
PTR s y s _ r e a d
PTR s y s _ w r i t e
2006-05-28 18:02:53 +04:00
PTR c o m p a t _ s y s _ o p e n / * 4 0 0 5 * /
2005-04-17 02:20:36 +04:00
PTR s y s _ c l o s e
PTR s y s _ w a i t p i d
PTR s y s _ c r e a t
PTR s y s _ l i n k
PTR s y s _ u n l i n k / * 4 0 1 0 * /
PTR s y s32 _ e x e c v e
PTR s y s _ c h d i r
PTR c o m p a t _ s y s _ t i m e
PTR s y s _ m k n o d
PTR s y s _ c h m o d / * 4 0 1 5 * /
PTR s y s _ l c h o w n
PTR s y s _ n i _ s y s c a l l
PTR s y s _ n i _ s y s c a l l / * w a s s y s _ s t a t * /
PTR s y s _ l s e e k
PTR s y s _ g e t p i d / * 4 0 2 0 * /
2006-10-16 19:49:37 +04:00
PTR c o m p a t _ s y s _ m o u n t
2005-04-17 02:20:36 +04:00
PTR s y s _ o l d u m o u n t
PTR s y s _ s e t u i d
PTR s y s _ g e t u i d
PTR c o m p a t _ s y s _ s t i m e / * 4 0 2 5 * /
2008-08-17 18:49:25 +04:00
PTR c o m p a t _ s y s _ p t r a c e
2005-04-17 02:20:36 +04:00
PTR s y s _ a l a r m
PTR s y s _ n i _ s y s c a l l / * w a s s y s _ f s t a t * /
PTR s y s _ p a u s e
PTR c o m p a t _ s y s _ u t i m e / * 4 0 3 0 * /
PTR s y s _ n i _ s y s c a l l
PTR s y s _ n i _ s y s c a l l
PTR s y s _ a c c e s s
PTR s y s _ n i c e
PTR s y s _ n i _ s y s c a l l / * 4 0 3 5 * /
PTR s y s _ s y n c
PTR s y s _ k i l l
PTR s y s _ r e n a m e
PTR s y s _ m k d i r
PTR s y s _ r m d i r / * 4 0 4 0 * /
PTR s y s _ d u p
2008-07-20 16:16:46 +04:00
PTR s y s m _ p i p e
2005-04-17 02:20:36 +04:00
PTR c o m p a t _ s y s _ t i m e s
PTR s y s _ n i _ s y s c a l l
PTR s y s _ b r k / * 4 0 4 5 * /
PTR s y s _ s e t g i d
PTR s y s _ g e t g i d
PTR s y s _ n i _ s y s c a l l / * w a s s i g n a l 2 * /
PTR s y s _ g e t e u i d
PTR s y s _ g e t e g i d / * 4 0 5 0 * /
PTR s y s _ a c c t
PTR s y s _ u m o u n t
PTR s y s _ n i _ s y s c a l l
PTR c o m p a t _ s y s _ i o c t l
PTR c o m p a t _ s y s _ f c n t l / * 4 0 5 5 * /
PTR s y s _ n i _ s y s c a l l
PTR s y s _ s e t p g i d
PTR s y s _ n i _ s y s c a l l
PTR s y s _ o l d u n a m e
PTR s y s _ u m a s k / * 4 0 6 0 * /
PTR s y s _ c h r o o t
2008-11-28 12:09:09 +03:00
PTR c o m p a t _ s y s _ u s t a t
2005-04-17 02:20:36 +04:00
PTR s y s _ d u p2
PTR s y s _ g e t p p i d
PTR s y s _ g e t p g r p / * 4 0 6 5 * /
PTR s y s _ s e t s i d
2009-02-08 19:00:26 +03:00
PTR s y s _ 3 2 _ s i g a c t i o n
2005-04-17 02:20:36 +04:00
PTR s y s _ s g e t m a s k
PTR s y s _ s s e t m a s k
PTR s y s _ s e t r e u i d / * 4 0 7 0 * /
PTR s y s _ s e t r e g i d
PTR s y s32 _ s i g s u s p e n d
PTR c o m p a t _ s y s _ s i g p e n d i n g
PTR s y s _ s e t h o s t n a m e
PTR c o m p a t _ s y s _ s e t r l i m i t / * 4 0 7 5 * /
PTR c o m p a t _ s y s _ g e t r l i m i t
PTR c o m p a t _ s y s _ g e t r u s a g e
2008-10-16 09:02:06 +04:00
PTR c o m p a t _ s y s _ g e t t i m e o f d a y
PTR c o m p a t _ s y s _ s e t t i m e o f d a y
2005-04-17 02:20:36 +04:00
PTR s y s _ g e t g r o u p s / * 4 0 8 0 * /
PTR s y s _ s e t g r o u p s
PTR s y s _ n i _ s y s c a l l / * o l d _ s e l e c t * /
PTR s y s _ s y m l i n k
PTR s y s _ n i _ s y s c a l l / * w a s s y s _ l s t a t * /
PTR s y s _ r e a d l i n k / * 4 0 8 5 * /
PTR s y s _ u s e l i b
PTR s y s _ s w a p o n
PTR s y s _ r e b o o t
2006-02-21 09:59:00 +03:00
PTR c o m p a t _ s y s _ o l d _ r e a d d i r
2009-02-08 19:00:26 +03:00
PTR s y s _ m i p s _ m m a p / * 4 0 9 0 * /
2005-04-17 02:20:36 +04:00
PTR s y s _ m u n m a p
PTR s y s _ t r u n c a t e
PTR s y s _ f t r u n c a t e
PTR s y s _ f c h m o d
PTR s y s _ f c h o w n / * 4 0 9 5 * /
PTR s y s _ g e t p r i o r i t y
PTR s y s _ s e t p r i o r i t y
PTR s y s _ n i _ s y s c a l l
PTR c o m p a t _ s y s _ s t a t f s
PTR c o m p a t _ s y s _ f s t a t f s / * 4 1 0 0 * /
PTR s y s _ n i _ s y s c a l l / * s y s _ i o p e r m * /
2007-02-27 04:11:28 +03:00
PTR c o m p a t _ s y s _ s o c k e t c a l l
2005-04-17 02:20:36 +04:00
PTR s y s _ s y s l o g
PTR c o m p a t _ s y s _ s e t i t i m e r
PTR c o m p a t _ s y s _ g e t i t i m e r / * 4 1 0 5 * /
PTR c o m p a t _ s y s _ n e w s t a t
PTR c o m p a t _ s y s _ n e w l s t a t
PTR c o m p a t _ s y s _ n e w f s t a t
PTR s y s _ u n a m e
PTR s y s _ n i _ s y s c a l l / * s y s _ i o p e r m * / / * 4 1 1 0 * /
PTR s y s _ v h a n g u p
PTR s y s _ n i _ s y s c a l l / * w a s s y s _ i d l e * /
PTR s y s _ n i _ s y s c a l l / * s y s _ v m 8 6 * /
2005-02-17 00:18:52 +03:00
PTR c o m p a t _ s y s _ w a i t 4
2005-04-17 02:20:36 +04:00
PTR s y s _ s w a p o f f / * 4 1 1 5 * /
2007-02-10 12:46:00 +03:00
PTR c o m p a t _ s y s _ s y s i n f o
2009-02-08 19:00:26 +03:00
PTR s y s _ 3 2 _ i p c
2005-04-17 02:20:36 +04:00
PTR s y s _ f s y n c
PTR s y s32 _ s i g r e t u r n
2005-04-13 21:43:59 +04:00
PTR s y s32 _ c l o n e / * 4 1 2 0 * /
2005-04-17 02:20:36 +04:00
PTR s y s _ s e t d o m a i n n a m e
2010-03-11 02:21:19 +03:00
PTR s y s _ n e w u n a m e
2005-04-17 02:20:36 +04:00
PTR s y s _ n i _ s y s c a l l / * s y s _ m o d i f y _ l d t * /
2006-03-26 13:37:29 +04:00
PTR c o m p a t _ s y s _ a d j t i m e x
2005-04-17 02:20:36 +04:00
PTR s y s _ m p r o t e c t / * 4 1 2 5 * /
PTR c o m p a t _ s y s _ s i g p r o c m a s k
PTR s y s _ n i _ s y s c a l l / * w a s c r e a t _ m o d u l e * /
PTR s y s _ i n i t _ m o d u l e
PTR s y s _ d e l e t e _ m o d u l e
PTR s y s _ n i _ s y s c a l l / * 4 1 3 0 , g e t _ k e r n e l _ s y m s * /
PTR s y s _ q u o t a c t l
PTR s y s _ g e t p g i d
PTR s y s _ f c h d i r
PTR s y s _ b d f l u s h
PTR s y s _ s y s f s / * 4 1 3 5 * /
2009-02-08 19:00:26 +03:00
PTR s y s _ 3 2 _ p e r s o n a l i t y
2005-04-17 02:20:36 +04:00
PTR s y s _ n i _ s y s c a l l / * f o r a f s _ s y s c a l l * /
PTR s y s _ s e t f s u i d
PTR s y s _ s e t f s g i d
2009-02-08 19:00:26 +03:00
PTR s y s _ 3 2 _ l l s e e k / * 4 1 4 0 * /
2006-02-21 09:59:00 +03:00
PTR c o m p a t _ s y s _ g e t d e n t s
2005-04-17 02:20:36 +04:00
PTR c o m p a t _ s y s _ s e l e c t
PTR s y s _ f l o c k
PTR s y s _ m s y n c
PTR c o m p a t _ s y s _ r e a d v / * 4 1 4 5 * /
PTR c o m p a t _ s y s _ w r i t e v
PTR s y s _ c a c h e f l u s h
PTR s y s _ c a c h e c t l
PTR s y s _ s y s m i p s
PTR s y s _ n i _ s y s c a l l / * 4 1 5 0 * /
PTR s y s _ g e t s i d
PTR s y s _ f d a t a s y n c
2009-04-03 11:46:47 +04:00
PTR c o m p a t _ s y s _ s y s c t l
2005-04-17 02:20:36 +04:00
PTR s y s _ m l o c k
PTR s y s _ m u n l o c k / * 4 1 5 5 * /
PTR s y s _ m l o c k a l l
PTR s y s _ m u n l o c k a l l
PTR s y s _ s c h e d _ s e t p a r a m
PTR s y s _ s c h e d _ g e t p a r a m
PTR s y s _ s c h e d _ s e t s c h e d u l e r / * 4 1 6 0 * /
PTR s y s _ s c h e d _ g e t s c h e d u l e r
PTR s y s _ s c h e d _ y i e l d
PTR s y s _ s c h e d _ g e t _ p r i o r i t y _ m a x
PTR s y s _ s c h e d _ g e t _ p r i o r i t y _ m i n
2009-02-08 19:00:26 +03:00
PTR s y s _ 3 2 _ s c h e d _ r r _ g e t _ i n t e r v a l / * 4 1 6 5 * /
2005-04-17 02:20:36 +04:00
PTR c o m p a t _ s y s _ n a n o s l e e p
PTR s y s _ m r e m a p
PTR s y s _ a c c e p t
PTR s y s _ b i n d
PTR s y s _ c o n n e c t / * 4 1 7 0 * /
PTR s y s _ g e t p e e r n a m e
PTR s y s _ g e t s o c k n a m e
PTR s y s _ g e t s o c k o p t
PTR s y s _ l i s t e n
net/compat/wext: send different messages to compat tasks
Wireless extensions have the unfortunate problem that events
are multicast netlink messages, and are not independent of
pointer size. Thus, currently 32-bit tasks on 64-bit platforms
cannot properly receive events and fail with all kinds of
strange problems, for instance wpa_supplicant never notices
disassociations, due to the way the 64-bit event looks (to a
32-bit process), the fact that the address is all zeroes is
lost, it thinks instead it is 00:00:00:00:01:00.
The same problem existed with the ioctls, until David Miller
fixed those some time ago in an heroic effort.
A different problem caused by this is that we cannot send the
ASSOCREQIE/ASSOCRESPIE events because sending them causes a
32-bit wpa_supplicant on a 64-bit system to overwrite its
internal information, which is worse than it not getting the
information at all -- so we currently resort to sending a
custom string event that it then parses. This, however, has a
severe size limitation we are frequently hitting with modern
access points; this limitation would can be lifted after this
patch by sending the correct binary, not custom, event.
A similar problem apparently happens for some other netlink
users on x86_64 with 32-bit tasks due to the alignment for
64-bit quantities.
In order to fix these problems, I have implemented a way to
send compat messages to tasks. When sending an event, we send
the non-compat event data together with a compat event data in
skb_shinfo(main_skb)->frag_list. Then, when the event is read
from the socket, the netlink code makes sure to pass out only
the skb that is compatible with the task. This approach was
suggested by David Miller, my original approach required
always sending two skbs but that had various small problems.
To determine whether compat is needed or not, I have used the
MSG_CMSG_COMPAT flag, and adjusted the call path for recv and
recvfrom to include it, even if those calls do not have a cmsg
parameter.
I have not solved one small part of the problem, and I don't
think it is necessary to: if a 32-bit application uses read()
rather than any form of recvmsg() it will still get the wrong
(64-bit) event. However, neither do applications actually do
this, nor would it be a regression.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-01 15:26:02 +04:00
PTR c o m p a t _ s y s _ r e c v / * 4 1 7 5 * /
PTR c o m p a t _ s y s _ r e c v f r o m
2005-04-17 02:20:36 +04:00
PTR c o m p a t _ s y s _ r e c v m s g
PTR s y s _ s e n d
PTR c o m p a t _ s y s _ s e n d m s g
PTR s y s _ s e n d t o / * 4 1 8 0 * /
PTR c o m p a t _ s y s _ s e t s o c k o p t
PTR s y s _ s h u t d o w n
PTR s y s _ s o c k e t
PTR s y s _ s o c k e t p a i r
PTR s y s _ s e t r e s u i d / * 4 1 8 5 * /
PTR s y s _ g e t r e s u i d
PTR s y s _ n i _ s y s c a l l / * w a s q u e r y _ m o d u l e * /
PTR s y s _ p o l l
2005-05-06 20:28:55 +04:00
PTR c o m p a t _ s y s _ n f s s e r v c t l
2005-04-17 02:20:36 +04:00
PTR s y s _ s e t r e s g i d / * 4 1 9 0 * /
PTR s y s _ g e t r e s g i d
PTR s y s _ p r c t l
PTR s y s32 _ r t _ s i g r e t u r n
2009-02-08 19:00:26 +03:00
PTR s y s _ 3 2 _ r t _ s i g a c t i o n
PTR s y s _ 3 2 _ r t _ s i g p r o c m a s k / * 4 1 9 5 * /
PTR s y s _ 3 2 _ r t _ s i g p e n d i n g
2005-04-17 02:20:36 +04:00
PTR c o m p a t _ s y s _ r t _ s i g t i m e d w a i t
2009-02-08 19:00:26 +03:00
PTR s y s _ 3 2 _ r t _ s i g q u e u e i n f o
2005-04-17 02:20:36 +04:00
PTR s y s32 _ r t _ s i g s u s p e n d
2009-02-08 19:00:26 +03:00
PTR s y s _ 3 2 _ p r e a d / * 4 2 0 0 * /
PTR s y s _ 3 2 _ p w r i t e
2005-04-17 02:20:36 +04:00
PTR s y s _ c h o w n
PTR s y s _ g e t c w d
PTR s y s _ c a p g e t
PTR s y s _ c a p s e t / * 4 2 0 5 * /
PTR s y s32 _ s i g a l t s t a c k
2009-02-08 19:00:26 +03:00
PTR s y s _ 3 2 _ s e n d f i l e
2005-04-17 02:20:36 +04:00
PTR s y s _ n i _ s y s c a l l
PTR s y s _ n i _ s y s c a l l
2009-02-08 19:00:26 +03:00
PTR s y s _ m i p s _ m m a p2 / * 4 2 1 0 * /
PTR s y s _ 3 2 _ t r u n c a t e 6 4
PTR s y s _ 3 2 _ f t r u n c a t e 6 4
2005-04-17 02:20:36 +04:00
PTR s y s _ n e w s t a t
PTR s y s _ n e w l s t a t
PTR s y s _ n e w f s t a t / * 4 2 1 5 * /
PTR s y s _ p i v o t _ r o o t
PTR s y s _ m i n c o r e
PTR s y s _ m a d v i s e
PTR s y s _ g e t d e n t s64
PTR c o m p a t _ s y s _ f c n t l 6 4 / * 4 2 2 0 * /
PTR s y s _ n i _ s y s c a l l
PTR s y s _ g e t t i d
PTR s y s32 _ r e a d a h e a d
PTR s y s _ s e t x a t t r
PTR s y s _ l s e t x a t t r / * 4 2 2 5 * /
PTR s y s _ f s e t x a t t r
PTR s y s _ g e t x a t t r
PTR s y s _ l g e t x a t t r
PTR s y s _ f g e t x a t t r
PTR s y s _ l i s t x a t t r / * 4 2 3 0 * /
PTR s y s _ l l i s t x a t t r
PTR s y s _ f l i s t x a t t r
PTR s y s _ r e m o v e x a t t r
PTR s y s _ l r e m o v e x a t t r
PTR s y s _ f r e m o v e x a t t r / * 4 2 3 5 * /
PTR s y s _ t k i l l
PTR s y s _ s e n d f i l e 6 4
PTR c o m p a t _ s y s _ f u t e x
PTR c o m p a t _ s y s _ s c h e d _ s e t a f f i n i t y
PTR c o m p a t _ s y s _ s c h e d _ g e t a f f i n i t y / * 4 2 4 0 * /
2010-09-28 22:15:37 +04:00
PTR c o m p a t _ s y s _ i o _ s e t u p
2005-04-17 02:20:36 +04:00
PTR s y s _ i o _ d e s t r o y
2010-09-28 22:15:37 +04:00
PTR c o m p a t _ s y s _ i o _ g e t e v e n t s
PTR c o m p a t _ s y s _ i o _ s u b m i t
2005-04-17 02:20:36 +04:00
PTR s y s _ i o _ c a n c e l / * 4 2 4 5 * /
PTR s y s _ e x i t _ g r o u p
2009-10-10 15:19:49 +04:00
PTR s y s32 _ l o o k u p _ d c o o k i e
2005-04-17 02:20:36 +04:00
PTR s y s _ e p o l l _ c r e a t e
PTR s y s _ e p o l l _ c t l
PTR s y s _ e p o l l _ w a i t / * 4 2 5 0 * /
PTR s y s _ r e m a p _ f i l e _ p a g e s
PTR s y s _ s e t _ t i d _ a d d r e s s
PTR s y s _ r e s t a r t _ s y s c a l l
2007-05-17 19:46:13 +04:00
PTR s y s32 _ f a d v i s e 6 4 _ 6 4
2005-04-17 02:20:36 +04:00
PTR c o m p a t _ s y s _ s t a t f s64 / * 4 2 5 5 * /
PTR c o m p a t _ s y s _ f s t a t f s64
2007-02-27 04:21:17 +03:00
PTR c o m p a t _ s y s _ t i m e r _ c r e a t e
2005-04-17 02:20:36 +04:00
PTR c o m p a t _ s y s _ t i m e r _ s e t t i m e
PTR c o m p a t _ s y s _ t i m e r _ g e t t i m e
PTR s y s _ t i m e r _ g e t o v e r r u n / * 4 2 6 0 * /
PTR s y s _ t i m e r _ d e l e t e
PTR c o m p a t _ s y s _ c l o c k _ s e t t i m e
PTR c o m p a t _ s y s _ c l o c k _ g e t t i m e
PTR c o m p a t _ s y s _ c l o c k _ g e t r e s
PTR c o m p a t _ s y s _ c l o c k _ n a n o s l e e p / * 4 2 6 5 * /
PTR s y s _ t g k i l l
PTR c o m p a t _ s y s _ u t i m e s
PTR s y s _ n i _ s y s c a l l / * s y s _ m b i n d * /
PTR s y s _ n i _ s y s c a l l / * s y s _ g e t _ m e m p o l i c y * /
PTR s y s _ n i _ s y s c a l l / * 4 2 7 0 s y s _ s e t _ m e m p o l i c y * /
PTR c o m p a t _ s y s _ m q _ o p e n
PTR s y s _ m q _ u n l i n k
PTR c o m p a t _ s y s _ m q _ t i m e d s e n d
PTR c o m p a t _ s y s _ m q _ t i m e d r e c e i v e
PTR c o m p a t _ s y s _ m q _ n o t i f y / * 4 2 7 5 * /
PTR c o m p a t _ s y s _ m q _ g e t s e t a t t r
PTR s y s _ n i _ s y s c a l l / * s y s _ v s e r v e r * /
2009-02-08 19:00:26 +03:00
PTR s y s _ 3 2 _ w a i t i d
2005-04-17 02:20:36 +04:00
PTR s y s _ n i _ s y s c a l l / * a v a i l a b l e , w a s s e t a l t r o o t * /
PTR s y s _ a d d _ k e y / * 4 2 8 0 * /
PTR s y s _ r e q u e s t _ k e y
PTR s y s _ k e y c t l
2005-04-13 21:43:59 +04:00
PTR s y s _ s e t _ t h r e a d _ a r e a
2005-07-13 15:48:45 +04:00
PTR s y s _ i n o t i f y _ i n i t
PTR s y s _ i n o t i f y _ a d d _ w a t c h / * 4 2 8 5 * /
PTR s y s _ i n o t i f y _ r m _ w a t c h
2006-02-08 16:38:50 +03:00
PTR s y s _ m i g r a t e _ p a g e s
PTR c o m p a t _ s y s _ o p e n a t
PTR s y s _ m k d i r a t
PTR s y s _ m k n o d a t / * 4 2 9 0 * /
PTR s y s _ f c h o w n a t
PTR c o m p a t _ s y s _ f u t i m e s a t
2006-09-17 23:30:46 +04:00
PTR s y s _ n e w f s t a t a t
2006-02-08 16:38:50 +03:00
PTR s y s _ u n l i n k a t
PTR s y s _ r e n a m e a t / * 4 2 9 5 * /
PTR s y s _ l i n k a t
PTR s y s _ s y m l i n k a t
PTR s y s _ r e a d l i n k a t
PTR s y s _ f c h m o d a t
PTR s y s _ f a c c e s s a t / * 4 3 0 0 * /
2007-01-10 15:30:50 +03:00
PTR c o m p a t _ s y s _ p s e l e c t 6
2009-10-20 12:27:47 +04:00
PTR c o m p a t _ s y s _ p p o l l
2006-02-08 16:38:50 +03:00
PTR s y s _ u n s h a r e
2006-03-31 12:27:20 +04:00
PTR s y s _ s p l i c e
2006-04-01 10:49:21 +04:00
PTR s y s32 _ s y n c _ f i l e _ r a n g e / * 4 3 0 5 * /
2006-04-15 13:16:19 +04:00
PTR s y s _ t e e
2008-12-03 20:03:27 +03:00
PTR c o m p a t _ s y s _ v m s p l i c e
2006-07-02 19:31:14 +04:00
PTR c o m p a t _ s y s _ m o v e _ p a g e s
2006-09-06 17:42:02 +04:00
PTR c o m p a t _ s y s _ s e t _ r o b u s t _ l i s t
PTR c o m p a t _ s y s _ g e t _ r o b u s t _ l i s t / * 4 3 1 0 * /
2006-10-18 17:14:55 +04:00
PTR c o m p a t _ s y s _ k e x e c _ l o a d
2006-10-30 00:07:40 +03:00
PTR s y s _ g e t c p u
2007-02-25 00:15:11 +03:00
PTR c o m p a t _ s y s _ e p o l l _ p w a i t
2007-03-06 20:04:49 +03:00
PTR s y s _ i o p r i o _ s e t
PTR s y s _ i o p r i o _ g e t / * 4 3 1 5 * /
2007-05-29 18:29:40 +04:00
PTR c o m p a t _ s y s _ u t i m e n s a t
PTR c o m p a t _ s y s _ s i g n a l f d
2011-04-13 22:50:46 +04:00
PTR s y s _ n i _ s y s c a l l / * w a s t i m e r f d * /
2007-05-29 18:29:40 +04:00
PTR s y s _ e v e n t f d
2007-09-28 21:15:20 +04:00
PTR s y s32 _ f a l l o c a t e / * 4 3 2 0 * /
2008-02-19 00:02:37 +03:00
PTR s y s _ t i m e r f d _ c r e a t e
2009-04-16 20:20:17 +04:00
PTR c o m p a t _ s y s _ t i m e r f d _ g e t t i m e
PTR c o m p a t _ s y s _ t i m e r f d _ s e t t i m e
2008-07-31 14:16:43 +04:00
PTR c o m p a t _ s y s _ s i g n a l f d4
PTR s y s _ e v e n t f d2 / * 4 3 2 5 * /
PTR s y s _ e p o l l _ c r e a t e 1
PTR s y s _ d u p3
PTR s y s _ p i p e 2
PTR s y s _ i n o t i f y _ i n i t 1
2009-04-03 03:59:24 +04:00
PTR c o m p a t _ s y s _ p r e a d v / * 4 3 3 0 * /
PTR c o m p a t _ s y s _ p w r i t e v
2009-06-26 20:53:57 +04:00
PTR c o m p a t _ s y s _ r t _ t g s i g q u e u e i n f o
perf: Do the big rename: Performance Counters -> Performance Events
Bye-bye Performance Counters, welcome Performance Events!
In the past few months the perfcounters subsystem has grown out its
initial role of counting hardware events, and has become (and is
becoming) a much broader generic event enumeration, reporting, logging,
monitoring, analysis facility.
Naming its core object 'perf_counter' and naming the subsystem
'perfcounters' has become more and more of a misnomer. With pending
code like hw-breakpoints support the 'counter' name is less and
less appropriate.
All in one, we've decided to rename the subsystem to 'performance
events' and to propagate this rename through all fields, variables
and API names. (in an ABI compatible fashion)
The word 'event' is also a bit shorter than 'counter' - which makes
it slightly more convenient to write/handle as well.
Thanks goes to Stephane Eranian who first observed this misnomer and
suggested a rename.
User-space tooling and ABI compatibility is not affected - this patch
should be function-invariant. (Also, defconfigs were not touched to
keep the size down.)
This patch has been generated via the following script:
FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')
sed -i \
-e 's/PERF_EVENT_/PERF_RECORD_/g' \
-e 's/PERF_COUNTER/PERF_EVENT/g' \
-e 's/perf_counter/perf_event/g' \
-e 's/nb_counters/nb_events/g' \
-e 's/swcounter/swevent/g' \
-e 's/tpcounter_event/tp_event/g' \
$FILES
for N in $(find . -name perf_counter.[ch]); do
M=$(echo $N | sed 's/perf_counter/perf_event/g')
mv $N $M
done
FILES=$(find . -name perf_event.*)
sed -i \
-e 's/COUNTER_MASK/REG_MASK/g' \
-e 's/COUNTER/EVENT/g' \
-e 's/\<event\>/event_id/g' \
-e 's/counter/event/g' \
-e 's/Counter/Event/g' \
$FILES
... to keep it as correct as possible. This script can also be
used by anyone who has pending perfcounters patches - it converts
a Linux kernel tree over to the new naming. We tried to time this
change to the point in time where the amount of pending patches
is the smallest: the end of the merge window.
Namespace clashes were fixed up in a preparatory patch - and some
stylistic fallout will be fixed up in a subsequent patch.
( NOTE: 'counters' are still the proper terminology when we deal
with hardware registers - and these sed scripts are a bit
over-eager in renaming them. I've undone some of that, but
in case there's something left where 'counter' would be
better than 'event' we can undo that on an individual basis
instead of touching an otherwise nicely automated patch. )
Suggested-by: Stephane Eranian <eranian@google.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Paul Mackerras <paulus@samba.org>
Reviewed-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <linux-arch@vger.kernel.org>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-21 14:02:48 +04:00
PTR s y s _ p e r f _ e v e n t _ o p e n
2009-08-03 20:27:19 +04:00
PTR s y s _ a c c e p t 4
2010-08-24 01:10:37 +04:00
PTR c o m p a t _ s y s _ r e c v m m s g / * 4 3 3 5 * /
PTR s y s _ f a n o t i f y _ i n i t
PTR s y s _ 3 2 _ f a n o t i f y _ m a r k
PTR s y s _ p r l i m i t 6 4
2011-03-18 20:37:23 +03:00
PTR s y s _ n a m e _ t o _ h a n d l e _ a t
PTR c o m p a t _ s y s _ o p e n _ b y _ h a n d l e _ a t / * 4 3 4 0 * /
PTR c o m p a t _ s y s _ c l o c k _ a d j t i m e
2011-03-25 20:45:20 +03:00
PTR s y s _ s y n c f s
2011-05-28 06:28:27 +04:00
PTR s y s _ s e t n s
2005-04-17 02:20:36 +04:00
.size sys_ c a l l _ t a b l e ,. - s y s _ c a l l _ t a b l e