public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ports/14595] New: memset is broken on powerpc 405
@ 2012-09-19 20:03 jgunthorpe at gmail dot com
  2012-09-19 20:20 ` [Bug ports/14595] " carlos_odonell at mentor dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: jgunthorpe at gmail dot com @ 2012-09-19 20:03 UTC (permalink / raw)
  To: glibc-bugs


http://sourceware.org/bugzilla/show_bug.cgi?id=14595

             Bug #: 14595
           Summary: memset is broken on powerpc 405
           Product: glibc
           Version: 2.17
            Status: NEW
          Severity: critical
          Priority: P2
         Component: ports
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jgunthorpe@gmail.com
                CC: carlos@systemhalted.org, roland@gnu.org
    Classification: Unclassified


Created attachment 6638
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6638
fixed memset

The use_dcbz path in the hand coded assembly is assuming a 128 byte clear size
for dcbz, but dcbz uses the cache line size and 405 cores only have a 32 byte
cache line. So any clears to 0 that use the dcbz path fail to work.

Some high end PPC's have a 128 byte cache line, but all 405's are 32 byte,
see arch/powerpc/kernel/cputable.c, dcache_bsize assignments. This value
flows from the kernel to glibc's __cache_line_size value which drives
the dcbz step in the generic memset.

Attached is a patch.

Seen while testing on a 405GP.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ports/14595] memset is broken on powerpc 405
  2012-09-19 20:03 [Bug ports/14595] New: memset is broken on powerpc 405 jgunthorpe at gmail dot com
@ 2012-09-19 20:20 ` carlos_odonell at mentor dot com
  2012-09-25 16:23 ` rsa at us dot ibm.com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: carlos_odonell at mentor dot com @ 2012-09-19 20:20 UTC (permalink / raw)
  To: glibc-bugs


http://sourceware.org/bugzilla/show_bug.cgi?id=14595

Carlos O'Donell <carlos_odonell at mentor dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING
                 CC|                            |carlos_odonell at mentor
                   |                            |dot com

--- Comment #1 from Carlos O'Donell <carlos_odonell at mentor dot com> 2012-09-19 20:20:19 UTC ---
Jason,

Thanks for filling an issue in the bugzilla.

The patch looks like a great start, could you follow the contribution checklist
and post this to libc-alpha@sourceware.org for review?

http://sourceware.org/glibc/wiki/Contribution%20checklist

Thanks!

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ports/14595] memset is broken on powerpc 405
  2012-09-19 20:03 [Bug ports/14595] New: memset is broken on powerpc 405 jgunthorpe at gmail dot com
  2012-09-19 20:20 ` [Bug ports/14595] " carlos_odonell at mentor dot com
@ 2012-09-25 16:23 ` rsa at us dot ibm.com
  2012-09-25 16:25 ` rsa at us dot ibm.com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rsa at us dot ibm.com @ 2012-09-25 16:23 UTC (permalink / raw)
  To: glibc-bugs


http://sourceware.org/bugzilla/show_bug.cgi?id=14595

Ryan S. Arnold <rsa at us dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED
                 CC|                            |rsa at us dot ibm.com
         AssignedTo|unassigned at sourceware    |rsa at us dot ibm.com
                   |dot org                     |

--- Comment #2 from Ryan S. Arnold <rsa at us dot ibm.com> 2012-09-25 16:23:19 UTC ---
Per the following libc-ports email I have checked a fix into the rsa/405memset
branch for testing: http://sourceware.org/ml/libc-ports/2012-09/msg00077.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ports/14595] memset is broken on powerpc 405
  2012-09-19 20:03 [Bug ports/14595] New: memset is broken on powerpc 405 jgunthorpe at gmail dot com
  2012-09-19 20:20 ` [Bug ports/14595] " carlos_odonell at mentor dot com
  2012-09-25 16:23 ` rsa at us dot ibm.com
@ 2012-09-25 16:25 ` rsa at us dot ibm.com
  2012-11-29 15:47 ` [Bug ports/14595] power: " carlos_odonell at mentor dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rsa at us dot ibm.com @ 2012-09-25 16:25 UTC (permalink / raw)
  To: glibc-bugs


http://sourceware.org/bugzilla/show_bug.cgi?id=14595

Ryan S. Arnold <rsa at us dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.17

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ports/14595] power: memset is broken on powerpc 405
  2012-09-19 20:03 [Bug ports/14595] New: memset is broken on powerpc 405 jgunthorpe at gmail dot com
                   ` (2 preceding siblings ...)
  2012-09-25 16:25 ` rsa at us dot ibm.com
@ 2012-11-29 15:47 ` carlos_odonell at mentor dot com
  2012-11-29 15:51 ` rsa at us dot ibm.com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: carlos_odonell at mentor dot com @ 2012-11-29 15:47 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14595

Carlos O'Donell <carlos_odonell at mentor dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|memset is broken on powerpc |power: memset is broken on
                   |405                         |powerpc 405

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ports/14595] power: memset is broken on powerpc 405
  2012-09-19 20:03 [Bug ports/14595] New: memset is broken on powerpc 405 jgunthorpe at gmail dot com
                   ` (3 preceding siblings ...)
  2012-11-29 15:47 ` [Bug ports/14595] power: " carlos_odonell at mentor dot com
@ 2012-11-29 15:51 ` rsa at us dot ibm.com
  2014-06-13 13:57 ` fweimer at redhat dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rsa at us dot ibm.com @ 2012-11-29 15:51 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14595

Ryan S. Arnold <rsa at us dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Ryan S. Arnold <rsa at us dot ibm.com> 2012-11-29 15:51:00 UTC ---
This is fixed upstream.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ports/14595] power: memset is broken on powerpc 405
  2012-09-19 20:03 [Bug ports/14595] New: memset is broken on powerpc 405 jgunthorpe at gmail dot com
                   ` (4 preceding siblings ...)
  2012-11-29 15:51 ` rsa at us dot ibm.com
@ 2014-06-13 13:57 ` fweimer at redhat dot com
  2014-06-13 14:00 ` fweimer at redhat dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 13:57 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=14595

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security?

--- Comment #4 from Florian Weimer <fweimer at redhat dot com> ---
Jason, does the system kind-of-sort-of work prior to applying the fix, or does
it crash immediately?  I wonder if we should treat this as an
(architecture-specific) security issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ports/14595] power: memset is broken on powerpc 405
  2012-09-19 20:03 [Bug ports/14595] New: memset is broken on powerpc 405 jgunthorpe at gmail dot com
                   ` (5 preceding siblings ...)
  2014-06-13 13:57 ` fweimer at redhat dot com
@ 2014-06-13 14:00 ` fweimer at redhat dot com
  2014-06-13 15:36 ` jgunthorpe at gmail dot com
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 14:00 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=14595

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ports/14595] power: memset is broken on powerpc 405
  2012-09-19 20:03 [Bug ports/14595] New: memset is broken on powerpc 405 jgunthorpe at gmail dot com
                   ` (6 preceding siblings ...)
  2014-06-13 14:00 ` fweimer at redhat dot com
@ 2014-06-13 15:36 ` jgunthorpe at gmail dot com
  2014-06-13 15:44 ` fweimer at redhat dot com
  2014-06-13 15:44 ` fweimer at redhat dot com
  9 siblings, 0 replies; 11+ messages in thread
From: jgunthorpe at gmail dot com @ 2014-06-13 15:36 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=14595

--- Comment #5 from Jason Gunthorpe <jgunthorpe at gmail dot com> ---
In my testing everything crashed instantly, the loader was relying on
memset to 0 and it wasn't, IIRC.

It isn't a security issue because the system was unbootable.

Jason


On Fri, Jun 13, 2014 at 8:00 AM, fweimer at redhat dot com <
sourceware-bugzilla@sourceware.org> wrote:

> https://sourceware.org/bugzilla/show_bug.cgi?id=14595
>
> Florian Weimer <fweimer at redhat dot com> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |fweimer at redhat dot com
>
> --
> You are receiving this mail because:
> You reported the bug.
>

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ports/14595] power: memset is broken on powerpc 405
  2012-09-19 20:03 [Bug ports/14595] New: memset is broken on powerpc 405 jgunthorpe at gmail dot com
                   ` (8 preceding siblings ...)
  2014-06-13 15:44 ` fweimer at redhat dot com
@ 2014-06-13 15:44 ` fweimer at redhat dot com
  9 siblings, 0 replies; 11+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 15:44 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=14595

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|security?                   |security-

--- Comment #6 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Jason Gunthorpe from comment #5)
> In my testing everything crashed instantly, the loader was relying on
> memset to 0 and it wasn't, IIRC.
> 
> It isn't a security issue because the system was unbootable.

Yes, I agree, marking as such.  Thanks.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ports/14595] power: memset is broken on powerpc 405
  2012-09-19 20:03 [Bug ports/14595] New: memset is broken on powerpc 405 jgunthorpe at gmail dot com
                   ` (7 preceding siblings ...)
  2014-06-13 15:36 ` jgunthorpe at gmail dot com
@ 2014-06-13 15:44 ` fweimer at redhat dot com
  2014-06-13 15:44 ` fweimer at redhat dot com
  9 siblings, 0 replies; 11+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 15:44 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=14595

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #7637|0                           |1
        is obsolete|                            |

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-06-13 15:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-19 20:03 [Bug ports/14595] New: memset is broken on powerpc 405 jgunthorpe at gmail dot com
2012-09-19 20:20 ` [Bug ports/14595] " carlos_odonell at mentor dot com
2012-09-25 16:23 ` rsa at us dot ibm.com
2012-09-25 16:25 ` rsa at us dot ibm.com
2012-11-29 15:47 ` [Bug ports/14595] power: " carlos_odonell at mentor dot com
2012-11-29 15:51 ` rsa at us dot ibm.com
2014-06-13 13:57 ` fweimer at redhat dot com
2014-06-13 14:00 ` fweimer at redhat dot com
2014-06-13 15:36 ` jgunthorpe at gmail dot com
2014-06-13 15:44 ` fweimer at redhat dot com
2014-06-13 15:44 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).