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]
Date:	Sun, 31 Dec 2006 13:07:25 +0100
From:	Martin Schwidefsky <schwidefsky@...ibm.com>
To:	Chuck Ebbert <76306.1226@...puserve.com>
Cc:	Michael Holzheu <holzheu@...ibm.com>, linux-kernel@...r.kernel.org
Subject: Re: [S390] cio: fix stsch_reset.

On Sun, 2006-12-31 at 01:31 -0500, Chuck Ebbert wrote:
> > @@ -881,10 +880,18 @@ static void cio_reset_pgm_check_handler(
> >  static int stsch_reset(struct subchannel_id schid, volatile struct schib *addr)
> >  {
> >       int rc;
> > +     register struct subchannel_id reg1 asm ("1") = schid;
> >
> >       pgm_check_occured = 0;
> >       s390_reset_pgm_handler = cio_reset_pgm_check_handler;
> > -     rc = stsch(schid, addr);
> > +
> > +     asm volatile(
> > +             "       stsch   0(%2)\n"
> > +             "       ipm     %0\n"
> > +             "       srl     %0,28"
> > +             : "=d" (rc)
> > +             : "d" (reg1), "a" (addr), "m" (*addr) : "memory", "cc");
> > +
> >       s390_reset_pgm_handler = NULL;
> >       if (pgm_check_occured)
> >               return -EIO;
> 
> 
> Can't you just put a barrier() before the stsch() call?

You mean after. We have to prevent the sequence
1) load pgm_check_occured,
2) stsch and the execution of cio_reset_pgm_check_handler
3) use of the the value loaded in 1)
A barrier before 2) forces a reload of pgm_check_occured but it does not
force the reload to be before the stsch call.

But the basic idea is valid. The standard stsch() inline followed by a
barrier() is equivalent to the new inline assembly.

-- 
blue skies,
  Martin.

Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH

"Reality continues to ruin my life." - Calvin.


-
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