From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751408AbcFKJ3N (ORCPT ); Sat, 11 Jun 2016 05:29:13 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34826 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750932AbcFKJ3L (ORCPT ); Sat, 11 Jun 2016 05:29:11 -0400 Date: Sat, 11 Jun 2016 11:29:06 +0200 From: Ingo Molnar To: Andy Lutomirski Cc: David Vrabel , Andy Lutomirski , X86 ML , Kees Cook , Brian Gerst , "linux-kernel@vger.kernel.org" , xen-devel , Jan Beulich , Borislav Petkov , Andrew Cooper , Boris Ostrovsky Subject: Re: [Xen-devel] [PATCH 1/7] x86/xen: Simplify set_aliased_prot Message-ID: <20160611092906.GA19376@gmail.com> References: <0706f1a2538e481194514197298cca6b5e3f2638.1464129798.git.luto@kernel.org> <57457582.9070608@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andy Lutomirski wrote: > On Wed, May 25, 2016 at 2:50 AM, David Vrabel wrote: > > On 24/05/16 23:48, Andy Lutomirski wrote: > >> In aa1acff356bb ("x86/xen: Probe target addresses in > >> set_aliased_prot() before the hypercall"), I added an explicit probe > >> to work around a hypercall issue. The code can be simplified by > >> using probe_kernel_read. > > > > Acked-by: David Vrabel > > Ingo, can you apply this one patch directly to x86/asm? The rest of > the series is stalled pending my fixing Borislav's review comments > and, more importantly, fixing the bugs that testing it has shaken > loose. This patch is a nice cleanup all by itself, though. Ok, agreed, done. Note that I simplified it some more: - probe_kernel_read(&dummy, (unsigned char *)v, 1); + probe_kernel_read(&dummy, v, 1); ... because 'v' already has a 'void *' natural type. Thanks, Ingo