Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ddd972d authored by Hiroshi Shimamoto's avatar Hiroshi Shimamoto Committed by Ingo Molnar
Browse files

x86: signal: rename COPY_SEG_STRICT to COPY_SEG_CPL3



Impact: cleanup

Rename macro COPY_SEG_STRICT to COPY_SEG_CPL3, as suggested by hpa.

Signed-off-by: default avatarHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 64977609
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -145,7 +145,7 @@ asmlinkage int sys_sigaltstack(unsigned long bx)
		regs->seg = tmp;			\
		regs->seg = tmp;			\
}
}


#define COPY_SEG_STRICT(seg)	{			\
#define COPY_SEG_CPL3(seg)	{			\
		unsigned short tmp;			\
		unsigned short tmp;			\
		err |= __get_user(tmp, &sc->seg);	\
		err |= __get_user(tmp, &sc->seg);	\
		regs->seg = tmp | 3;			\
		regs->seg = tmp | 3;			\
@@ -193,13 +193,13 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
#endif /* CONFIG_X86_64 */
#endif /* CONFIG_X86_64 */


#ifdef CONFIG_X86_32
#ifdef CONFIG_X86_32
	COPY_SEG_STRICT(cs);
	COPY_SEG_CPL3(cs);
	COPY_SEG_STRICT(ss);
	COPY_SEG_CPL3(ss);
#else /* !CONFIG_X86_32 */
#else /* !CONFIG_X86_32 */
	/* Kernel saves and restores only the CS segment register on signals,
	/* Kernel saves and restores only the CS segment register on signals,
	 * which is the bare minimum needed to allow mixed 32/64-bit code.
	 * which is the bare minimum needed to allow mixed 32/64-bit code.
	 * App's signal handler can save/restore other segments if needed. */
	 * App's signal handler can save/restore other segments if needed. */
	COPY_SEG_STRICT(cs);
	COPY_SEG_CPL3(cs);
#endif /* CONFIG_X86_32 */
#endif /* CONFIG_X86_32 */


	err |= __get_user(tmpflags, &sc->flags);
	err |= __get_user(tmpflags, &sc->flags);
+4 −4
Original line number Original line Diff line number Diff line
@@ -56,7 +56,7 @@ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
	err |= __get_user(regs->x, &sc->x);	\
	err |= __get_user(regs->x, &sc->x);	\
}
}


#define COPY_SEG_STRICT(seg)	{			\
#define COPY_SEG_CPL3(seg)	{			\
		unsigned short tmp;			\
		unsigned short tmp;			\
		err |= __get_user(tmp, &sc->seg);	\
		err |= __get_user(tmp, &sc->seg);	\
		regs->seg = tmp | 3;			\
		regs->seg = tmp | 3;			\
@@ -98,13 +98,13 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
#endif /* CONFIG_X86_64 */
#endif /* CONFIG_X86_64 */


#ifdef CONFIG_X86_32
#ifdef CONFIG_X86_32
	COPY_SEG_STRICT(cs);
	COPY_SEG_CPL3(cs);
	COPY_SEG_STRICT(ss);
	COPY_SEG_CPL3(ss);
#else /* !CONFIG_X86_32 */
#else /* !CONFIG_X86_32 */
	/* Kernel saves and restores only the CS segment register on signals,
	/* Kernel saves and restores only the CS segment register on signals,
	 * which is the bare minimum needed to allow mixed 32/64-bit code.
	 * which is the bare minimum needed to allow mixed 32/64-bit code.
	 * App's signal handler can save/restore other segments if needed. */
	 * App's signal handler can save/restore other segments if needed. */
	COPY_SEG_STRICT(cs);
	COPY_SEG_CPL3(cs);
#endif /* CONFIG_X86_32 */
#endif /* CONFIG_X86_32 */


	err |= __get_user(tmpflags, &sc->flags);
	err |= __get_user(tmpflags, &sc->flags);