in VALID_USER_DSEL3() only check the low 16 bits.
this fixes 32bit gmake from occasionally reporting "Error 255" after a command has successfully run. lots of help from ad@ and joerg@.
This commit is contained in:
parent
089984cd2f
commit
ceb63bd6ed
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: segments.h,v 1.7 2006/08/19 16:27:58 dsl Exp $ */
|
||||
/* $NetBSD: segments.h,v 1.8 2007/09/26 02:33:46 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -354,9 +354,12 @@ int valid_user_selector(struct lwp *, uint64_t, char *, int);
|
||||
* ldt is active.
|
||||
*/
|
||||
#define VALID_USER_DSEL32(s) \
|
||||
((s) == GSEL(GUDATA32_SEL, SEL_UPL) || (s) == LSEL(LUDATA32_SEL, SEL_UPL))
|
||||
(((s) & 0xffff) == GSEL(GUDATA32_SEL, SEL_UPL) || \
|
||||
((s) & 0xffff) == LSEL(LUDATA32_SEL, SEL_UPL))
|
||||
#if 0 /* not used */
|
||||
#define VALID_USER_CSEL32(s) \
|
||||
((s) == GSEL(GUCODE32_SEL, SEL_UPL) || (s) == LSEL(LUCODE32_SEL, SEL_UPL))
|
||||
#endif
|
||||
|
||||
#define VALID_USER_CSEL(s) \
|
||||
((s) == GSEL(GUCODE_SEL, SEL_UPL) || (s) == LSEL(LUCODE_SEL, SEL_UPL))
|
||||
|
Loading…
Reference in New Issue
Block a user