lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6D83E89737156549AEA25EF9ED712C5DE208@DEFTHW99EK1MSX.ww902.siemens.net>
Date:	Tue, 30 Apr 2013 13:45:09 +0000
From:	"Warlich, Christof" <christof.warlich@...mens.com>
To:	Mikael Pettersson <mikpe@...uu.se>
CC:	Andi Kleen <andi@...stfloor.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: X86 fpu registers in a signal handler's ucontext

Mikael Pettersson <mikpe@...uu.se> writes:
> Write to the fpstate ->mxcsr and ->swd fields in the sigaction handler's uc_mcontext.

To me, "sigaction handler's uc_mcontext" sounds like userspace, which really confuses me:
Even in most recent glibc-2.17, uc_mcontext is of type mcontext_t, which us defined as:

typedef struct {
  gregset_t gregs;
  fpregset_t fpregs;
} mcontext_t;

typedef struct fpregset {
    union {
	struct fpchip_state {
	    int state[27];
	    int status;
	} fpchip_state;
	struct fp_emul_space {
	    char fp_emul[246];
	    char fp_epad[2];
	} fp_emul_space;
	int f_fpregs[62];
    } fp_reg_set;
    long int f_wregs[33];
} fpregset_t;

So there is no fpstate whatsoever.

However, these elements seem to be available in the uc_mcontext definition of the
kernel, but I can't have a sigaction handler there, can I? Then, how does the
kernel's uc_mcontext definition help me in my (userspace) signal handler?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ