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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Sat, 19 Jan 2019 00:16:21 -0700
From:   Jerry Snitselaar <jsnitsel@...hat.com>
To:     iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
        Joerg Roedel <joro@...tes.org>
Subject: Question about out_unmap section of map_sg in amd_iommu.c



  out_unmap:
          pr_err("%s: IOMMU mapping error in map_sg (io-pages: %d)\n",
                 dev_name(dev), npages);

          for_each_sg(sglist, s, nelems, i) {
                  int j, pages = iommu_num_pages(sg_phys(s), s->length, PAGE_SIZE);

                  for (j = 0; j < pages; ++j) {
                          unsigned long bus_addr;

                          bus_addr  = address + s->dma_address + (j << PAGE_SHIFT);
                          iommu_unmap_page(domain, bus_addr, PAGE_SIZE);

                          if (--mapped_pages)
                                  goto out_free_iova;

Is this condition correct?  My thought is this was meant to break out of the loop early if
all the mapped pages have been unmapped. So if (--mapped == 0) instead?

                  }
          }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ