From: behanw@converseincode.com Subject: [PATCH v4 08/12] crypto, dm: LLVMLinux: Remove VLAIS usage from dm-crypt Date: Mon, 22 Sep 2014 21:42:13 -0700 Message-ID: <1411447337-22362-9-git-send-email-behanw@converseincode.com> References: <1411447337-22362-1-git-send-email-behanw@converseincode.com> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: john.griffin@intel.com, Behan Webster , linux-ima-devel@lists.sourceforge.net, qat-linux@intel.com, pageexec@freemail.hu, zohar@linux.vnet.ibm.com, gmazyland@gmail.com, serge@hallyn.com, thomas.lendacky@amd.com, linux-ima-user@lists.sourceforge.net, d.kasatkin@samsung.com, linux-raid@vger.kernel.org, james.l.morris@oracle.com, bruce.w.allan@intel.com, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-crypto@vger.kernel.org, =?UTF-8?q?Jan-Simon=20M=C3=B6ller?= , akpm@linux-foundation.org, torvalds@linux-foundation.org, linux-btrfs@vger.kernel.org To: agk@redhat.com, clm@fb.com, davem@davemloft.net, dm-devel@redhat.com, fabf@skynet.be, herbert@gondor.apana.org.au, jbacik@fb.com, snitzer@redhat.com, tadeusz.struk@intel.com Return-path: In-Reply-To: <1411447337-22362-1-git-send-email-behanw@converseincode.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com List-Id: linux-crypto.vger.kernel.org RnJvbTogSmFuLVNpbW9uIE3DtmxsZXIgPGRsOXBmQGdteC5kZT4KClJlcGxhY2VkIHRoZSB1c2Ug b2YgYSBWYXJpYWJsZSBMZW5ndGggQXJyYXkgSW4gU3RydWN0IChWTEFJUykgd2l0aCBhIEM5OQpj b21wbGlhbnQgZXF1aXZhbGVudC4gVGhpcyBwYXRjaCBhbGxvY2F0ZXMgdGhlIGFwcHJvcHJpYXRl IGFtb3VudCBvZiBtZW1vcnkKdXNpbmcgYSBjaGFyIG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