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: <20160609162553.10290-1-olaf@aepfle.de>
Date:	Thu,  9 Jun 2016 18:25:53 +0200
From:	Olaf Hering <olaf@...fle.de>
To:	"K. Y. Srinivasan" <kys@...rosoft.com>,
	Haiyang Zhang <haiyangz@...rosoft.com>,
	"James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@...cle.com>
Cc:	devel@...uxdriverproject.org, linux-kernel@...r.kernel.org,
	linux-scsi@...r.kernel.org, Olaf Hering <olaf@...fle.de>
Subject: [PATCH v3] storvsc: use small sg_tablesize on x86

Reducing the sg_tablesize allows booting of 32bit kernels in VMs, after
commit be0cf6ca301c61458dc4aa1a37acf4f58d2ed3d6 ("scsi: storvsc: Set the
tablesize based on the information given by the host")

[    5.567138] hv_storvsc vmbus_1: adjusting sg_tablesize 0x800 -> 0x20

Signed-off-by: Olaf Hering <olaf@...fle.de>
---

As requested, use CONFIG_<bitsize>. For some reason IS_ENABLED(64_BIT)
does not work.

 drivers/scsi/storvsc_drv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 3ddcabb..ae42324 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1673,11 +1673,15 @@ static int storvsc_probe(struct hv_device *device,
 	/* max cmd length */
 	host->max_cmd_len = STORVSC_MAX_CMD_LEN;
 
+#ifdef CONFIG_64BIT
 	/*
 	 * set the table size based on the info we got
 	 * from the host.
 	 */
 	host->sg_tablesize = (stor_device->max_transfer_bytes >> PAGE_SHIFT);
+#else
+	host->sg_tablesize = MAX_MULTIPAGE_BUFFER_COUNT;
+#endif
 
 	/* Register the HBA and start the scsi bus scan */
 	ret = scsi_add_host(host, &device->device);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ