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]
Date:	Mon, 13 Feb 2012 16:15:37 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Cong Wang <amwang@...hat.com>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Seth Jennings <sjenning@...ux.vnet.ibm.com>,
	Dan Magenheimer <dan.magenheimer@...cle.com>,
	Greg KH <greg@...ah.com>
Subject: linux-next: manual merge of the kmap_atomic tree with the staging
 tree

Hi Cong,

Today's linux-next merge of the kmap_atomic tree got a conflict in
drivers/staging/zcache/zcache-main.c between commit a49aeb1de585
("staging: zcache: replace xvmalloc with zsmalloc") (and mayb others)
from the staging tree and commit 1edbcaee3bbe ("zcache: remove the second
argument of k [un]map_atomic()") from the kmap_atomic tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc drivers/staging/zcache/zcache-main.c
index ccfa854,f0843e8a..0000000
--- a/drivers/staging/zcache/zcache-main.c
+++ b/drivers/staging/zcache/zcache-main.c
@@@ -455,14 -421,13 +455,14 @@@ static int zbud_decompress(struct page 
  	}
  	ASSERT_SENTINEL(zh, ZBH);
  	BUG_ON(zh->size == 0 || zh->size > zbud_max_buddy_size());
- 	to_va = kmap_atomic(page, KM_USER0);
+ 	to_va = kmap_atomic(page);
  	size = zh->size;
  	from_va = zbud_data(zh, size);
 -	ret = lzo1x_decompress_safe(from_va, size, to_va, &out_len);
 -	BUG_ON(ret != LZO_E_OK);
 +	ret = zcache_comp_op(ZCACHE_COMPOP_DECOMPRESS, from_va, size,
 +				to_va, &out_len);
 +	BUG_ON(ret);
  	BUG_ON(out_len != PAGE_SIZE);
- 	kunmap_atomic(to_va, KM_USER0);
+ 	kunmap_atomic(to_va);
  out:
  	spin_unlock(&zbpg->lock);
  	return ret;
@@@ -745,22 -708,21 +745,22 @@@ static void zv_free(struct zs_pool *poo
  	local_irq_restore(flags);
  }
  
 -static void zv_decompress(struct page *page, struct zv_hdr *zv)
 +static void zv_decompress(struct page *page, void *handle)
  {
 -	size_t clen = PAGE_SIZE;
 +	unsigned int clen = PAGE_SIZE;
  	char *to_va;
 -	unsigned size;
  	int ret;
 +	struct zv_hdr *zv;
  
 +	zv = zs_map_object(zcache_host.zspool, handle);
 +	BUG_ON(zv->size == 0);
  	ASSERT_SENTINEL(zv, ZVH);
- 	to_va = kmap_atomic(page, KM_USER0);
 -	size = xv_get_object_size(zv) - sizeof(*zv);
 -	BUG_ON(size == 0);
+ 	to_va = kmap_atomic(page);
 -	ret = lzo1x_decompress_safe((char *)zv + sizeof(*zv),
 -					size, to_va, &clen);
 +	ret = zcache_comp_op(ZCACHE_COMPOP_DECOMPRESS, (char *)zv + sizeof(*zv),
 +				zv->size, to_va, &clen);
- 	kunmap_atomic(to_va, KM_USER0);
+ 	kunmap_atomic(to_va);
 -	BUG_ON(ret != LZO_E_OK);
 +	zs_unmap_object(zcache_host.zspool, handle);
 +	BUG_ON(ret);
  	BUG_ON(clen != PAGE_SIZE);
  }
  
@@@ -1333,16 -1297,15 +1333,16 @@@ static int zcache_compress(struct page 
  	char *from_va;
  
  	BUG_ON(!irqs_disabled());
 -	if (unlikely(dmem == NULL || wmem == NULL))
 -		goto out;  /* no buffer, so can't compress */
 +	if (unlikely(dmem == NULL))
 +		goto out;  /* no buffer or no compressor so can't compress */
 +	*out_len = PAGE_SIZE << ZCACHE_DSTMEM_ORDER;
- 	from_va = kmap_atomic(from, KM_USER0);
+ 	from_va = kmap_atomic(from);
  	mb();
 -	ret = lzo1x_1_compress(from_va, PAGE_SIZE, dmem, out_len, wmem);
 -	BUG_ON(ret != LZO_E_OK);
 +	ret = zcache_comp_op(ZCACHE_COMPOP_COMPRESS, from_va, PAGE_SIZE, dmem,
 +				(unsigned int *)out_len);
 +	BUG_ON(ret);
  	*out_va = dmem;
- 	kunmap_atomic(from_va, KM_USER0);
+ 	kunmap_atomic(from_va);
  	ret = 1;
  out:
  	return ret;

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ