Commit e3f08b26 authored by Herbert Xu's avatar Herbert Xu
Browse files
Merge crypto tree to pick up scompress off-by-one patch.  The
merge resolution is non-trivial as the dst handling code has been
moved in front of the src.
parents bb9c648b 8006aff1
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -202,8 +202,8 @@ static int scomp_acomp_comp_decomp(struct acomp_req *req, int dir)
		dpage = nth_page(dpage, doff / PAGE_SIZE);
		doff = offset_in_page(doff);

		n = dlen / PAGE_SIZE;
		n += (offset_in_page(dlen) + doff - 1) / PAGE_SIZE;
		n = (dlen - 1) / PAGE_SIZE;
		n += (offset_in_page(dlen - 1) + doff) / PAGE_SIZE;
		if (PageHighMem(dpage + n) &&
		    size_add(doff, dlen) > PAGE_SIZE)
			return -ENOSYS;
@@ -224,8 +224,8 @@ static int scomp_acomp_comp_decomp(struct acomp_req *req, int dir)
			spage = nth_page(spage, soff / PAGE_SIZE);
			soff = offset_in_page(soff);

			n = slen / PAGE_SIZE;
			n += (offset_in_page(slen) + soff - 1) / PAGE_SIZE;
			n = (slen - 1) / PAGE_SIZE;
			n += (offset_in_page(slen - 1) + soff) / PAGE_SIZE;
			if (PageHighMem(nth_page(spage, n)) &&
			    size_add(soff, slen) > PAGE_SIZE)
				break;
+6 −0
Original line number Diff line number Diff line
@@ -163,6 +163,12 @@ static int atmel_sha204a_probe(struct i2c_client *client)
	i2c_priv->hwrng.name = dev_name(&client->dev);
	i2c_priv->hwrng.read = atmel_sha204a_rng_read;

	/*
	 * According to review by Bill Cox [1], this HWRNG has very low entropy.
	 * [1] https://www.metzdowd.com/pipermail/cryptography/2014-December/023858.html
	 */
	i2c_priv->hwrng.quality = 1;

	ret = devm_hwrng_register(&client->dev, &i2c_priv->hwrng);
	if (ret)
		dev_warn(&client->dev, "failed to register RNG (%d)\n", ret);