PSL_RF inclusion in PSL_USERCHANGE for i386



hi

in i386/i386/machdep.c the set_regs() function sets i386 registers (called
by ptrace for example). it checks what eflags are being changed and compares
that with a mask of allowed flags to be changed. the mask is defined in psl.h
like this:

#define PSL_USERCHANGE (PSL_C | PSL_PF | PSL_AF | PSL_Z | PSL_N | PSL_T \
| PSL_D | PSL_V | PSL_NT | PSL_AC | PSL_ID)

PSL_RF (Flag to ensure single-step only happens once per instruction.). Can someone
tell me why this is omitted? I think its because of having in-kernel debugger.

User-mode Linux requires this to be allowed. So I wonder why this is disabled in FreeBSD.
(Linux itself does not check the eflags in any way).

thanks for answer, and/or pointer to answer

Roman Divacky
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • [PATCH 03/18] flag parameters: paccept
    ... This syscall differs from accept in that it adds ... The flags parameter can be used to set flag like SOCK_CLOEXEC. ... we really want the signal mask ... handler (int s) ...
    (Linux-Kernel)
  • [PATCH 02/18] flag parameters: paccept
    ... This syscall differs from accept in that it adds ... The flags parameter can be used to set flag like SOCK_CLOEXEC. ... we really want the signal mask ... handler (int s) ...
    (Linux-Kernel)
  • [patch 30/44] parisc: use generic bitops
    ... _atomic_spin_unlock_irqrestore(addr, flags);} ... {unsigned long mask = 1UL << CHOP_SHIFTCOUNT; ... * @addr: The address to start the search at ... * Returns the bit-number of the first set bit, not the number of the byte ...
    (Linux-Kernel)
  • Re: [PATCH 1/4] x86 paravirt_ops: create no_paravirt.h for native ops
    ... * Set IOPL bits in EFLAGS from given mask ... +static inline void set_iopl_mask(unsigned mask) ... all non IF manipulations of flags are separated that would help. ... in our case, this is not even a hypercall, merely a VMI call). ...
    (Linux-Kernel)
  • [PATCH 6/9] define first set of BIT* macros
    ... unsigned long flags; ... static inline void clear_bit(int nr, volatile unsigned long *addr) ...
    (Linux-Kernel)