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-next>] [day] [month] [year] [list]
Message-Id: <1306946564-30481-1-git-send-email-konrad.wilk@oracle.com>
Date:	Wed,  1 Jun 2011 12:42:43 -0400
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	linux-kernel@...r.kernel.org, fujita.tomonori@....ntt.co.jp
Subject: [PATCH] swiotlb=nslabs not honored when launching xen pv guests.

Hey Tomo-san,

I ran into an issue where the 'swiotlb' argument was being ignored when
launching a PV guest. Please see the patch - it has a nice explanation
in the description of the patch.

Not sure if this is the best way of fixing it. The other way of fixing
this would be to change swiotlb_init_with_tbl to sample the 'io_tlb_nslabs'
and if the io_tlb_nslabs is set use that instead of the passed in value?
But that looks a bit sneaky..

Something like this (not tested, nor compiled)?

diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 93ca08b..3cfad6e 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -136,9 +136,11 @@ void __init swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose)
 {
 	unsigned long i, bytes;
 
+	if (io_tlb_nslabs)
+		nslabs = io_tlb_nslabs;
+
 	bytes = nslabs << IO_TLB_SHIFT;
 
-	io_tlb_nslabs = nslabs;
 	io_tlb_start = tlb;
 	io_tlb_end = io_tlb_start + bytes;
 

--
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