Skip to content

RFC x86: reduce fixup of uaccess

Hiroshi Shimamoto lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest3 patches 5 repliesIn review
  2. v1 RFC4 patches 3 repliesSuperseded

Changes in v2 from the cover letter

	- Change framework syntax. Previous version doesn't look easy to read.
	  Remove parens from try and add redundant braces as Peter suggested.
		get_user_try {
			get_user_ex(...);
			:
		} get_user_catch(err);
	- Remove double underscores.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3x86: uaccess: introduce try and catch frameworkarch/x86/include/asm/thread_info.h arch/x86/include/asm/uaccess.h arch/x86/mm/extable.c+110 -00 replies
2/3x86: signal: use {get|put}_user_try and catcharch/x86/kernel/signal.c+154 -1370 replies
3/3x86: ia32_signal: use {get|put}_user_try and catcharch/x86/ia32/ia32_signal.c+195 -1703 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC v2 -tip 0/3] x86: reduce fixup of uaccess

This patch series redues fixup code for exceptions of uaccess in signal.

There is a lot of fixup code which is generated by using __{get|put}_user. I think that code can be reduced. The concept is that to add uaccess_err in thread_info and set it to -EFAULT on exception, finally check this value on the last of function.

The code size reductions are below;

$ size *signal*.o.*
   text	   data	    bss	    dec	    hex	filename
   4596	      0	      0	   4596	   11f4	ia32_signal.o.new
   6006	      0	      0	   6006	   1776	ia32_signal.o.old
   3583	      0	      0	   3583	    dff	signal.o.new
   4540	      0	      0	   4540	   11bc	signal.o.old
   3863	      0	      0	   3863	    f17	signal32.o.new
   4876	      0	      0	   4876	   130c	signal32.o.old
[ signal32.o means signal.o on 32-bit. ]

ChangeLog v1 -> v2

	- Change framework syntax. Previous version doesn't look easy to read.
	  Remove parens from try and add redundant braces as Peter suggested.
		get_user_try {
			get_user_ex(...);
			:
		} get_user_catch(err);
	- Remove double underscores.