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: <20190408023746.16916-2-sjhuang@iluvatar.ai>
Date:   Mon, 8 Apr 2019 10:37:46 +0800
From:   Huang Shijie <sjhuang@...vatar.ai>
To:     <akpm@...ux-foundation.org>
CC:     <william.kucharski@...cle.com>, <ira.weiny@...el.com>,
        <palmer@...ive.com>, <axboe@...nel.dk>, <keescook@...omium.org>,
        <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
        Huang Shijie <sjhuang@...vatar.ai>
Subject: [PATCH 2/2] lib/scatterlist.c: add more commit for sg_alloc_table_from_pages

The get_user_pages_fast() may mess up the page order in @pages array,
We will get the wrong DMA results in this case.

Add more commit to clarify it.

Signed-off-by: Huang Shijie <sjhuang@...vatar.ai>
---
 lib/scatterlist.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index 739dc9fe2c55..c170afb1a25e 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -450,6 +450,9 @@ EXPORT_SYMBOL(__sg_alloc_table_from_pages);
  *    specified by the page array. The returned sg table is released by
  *    sg_free_table.
  *
+ * Note: Do not use get_user_pages_fast() to pin the pages for @pages array,
+ *       it may mess up the page order, and we will get the wrong DMA results.
+
  * Returns:
  *   0 on success, negative error on failure
  */
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ