Subject: redundant user mode check in syscall handling
Index:	sys/pdp/trap.c 2.11BSD

Description:
	There is a redundant test for a syscall originating in user
	mode.  This test has already been performed by the assembly
	routine which receives the 'trap' instruction.  The second
	test (which works out to 4 instructions per syscall) can
	safely be removed.

Repeat-By:
	Examine the code.  Look in sys/pdp/mch_trap.s in the routine
	ASENTRY(syscall) and see the test for the 'trap' instruction
	originating in user mode.

Fix:
	Apply the following patch and reinstall the kernel.
==========================================================================
*** /sys/pdp/trap.c.old	Mon Aug 19 17:46:46 1991
--- /sys/pdp/trap.c	Fri Feb  7 18:20:32 1992
***************
*** 355,362 ****
  	cnt.v_syscall++;
  #endif
  
- 	if (!USERMODE(ps))
- 		panic("syscall");
  	syst = u.u_ru.ru_stime;
  #ifndef NONFP
  	u.u_fpsaved = 0;
--- 355,360 ----
