Bug 15402 - [i386] Run AVX audit tests for 32-bit x86
Summary: [i386] Run AVX audit tests for 32-bit x86
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: dynamic-link (show other bugs)
Version: 2.17
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-25 19:25 UTC by Joseph Myers
Modified: 2014-06-13 18:15 UTC (History)
2 users (show)

See Also:
Host: i?86-*
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Myers 2013-04-25 19:25:47 UTC
There are tests of audit modules and AVX tst-audit[34567] in sysdeps/x86_64/.  These should also be run for 32-bit x86 (moved to sysdeps/x86), or if not readily usable there then comments should be added explaining why they are 64-bit-specific.
Comment 1 H.J. Lu 2014-01-25 03:44:58 UTC
i386 audit doesn't support SSE.  That is why I didn't add
AVX support to i386 when I extended x86-64 audit from SSE
to AVX.
Comment 2 jsm-csl@polyomino.org.uk 2014-01-25 18:29:23 UTC
But what does "doesn't support SSE" mean?

If it means that the interface to audit functions doesn't provide 
information about SSE register contents, then indeed any parts of the 
tests that rely on the interface providing such information can't be run 
for i386.  But it should still be the case that audit functions for i386 
can be ordinary C functions making use of SSE and AVX, and so clobbering 
any registers that are call-clobbered, without this interfering with 
function arguments or return values that are passed in such registers 
(where the i386 ABI involves use of SSE registers for argument passing or 
return, this should still work when the function being called is in a 
shared library).  And so to the extent that the tests verify that such 
audit functions with incidental use of SSE or AVX work, they should be run 
for i386 - for example, I see nothing in tst-audit3 that should be 
inapplicable to i386.  (If in fact such functions don't work, that's a 
separate bug.)
Comment 3 H.J. Lu 2014-01-25 18:43:02 UTC
(In reply to joseph@codesourcery.com from comment #2)
> But what does "doesn't support SSE" mean?
> 

There are

/* Registers for entry into PLT on IA-32.  */
typedef struct La_i86_regs
{
  uint32_t lr_edx;
  uint32_t lr_ecx;
  uint32_t lr_eax;
  uint32_t lr_ebp;
  uint32_t lr_esp;
} La_i86_regs;

/* Return values for calls from PLT on IA-32.  */
typedef struct La_i86_retval
{
  uint32_t lrv_eax;
  uint32_t lrv_edx;
  long double lrv_st0;
  long double lrv_st1;
} La_i86_retval;

They don't support SSE.  Support AVX audit, we need to add
SSE audit support first.