From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758071AbcHCQbR (ORCPT ); Wed, 3 Aug 2016 12:31:17 -0400 Received: from mail-yw0-f171.google.com ([209.85.161.171]:34686 "EHLO mail-yw0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754499AbcHCQbP convert rfc822-to-8bit (ORCPT ); Wed, 3 Aug 2016 12:31:15 -0400 MIME-Version: 1.0 In-Reply-To: References: <1470071280-78706-1-git-send-email-thgarnie@google.com> <1470071280-78706-2-git-send-email-thgarnie@google.com> From: Thomas Garnier Date: Wed, 3 Aug 2016 08:29:42 -0700 Message-ID: Subject: Re: [PATCH v1 1/2] x86/power/64: Support unaligned addresses for temporary mapping To: Yinghai Lu Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Kees Cook , "Rafael J . Wysocki" , Pavel Machek , "the arch/x86 maintainers" , Linux Kernel Mailing List , Linux PM list , "kernel-hardening@lists.openwall.com" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 2, 2016 at 12:55 PM, Yinghai Lu wrote: > On Tue, Aug 2, 2016 at 10:48 AM, Thomas Garnier wrote: >> On Tue, Aug 2, 2016 at 10:36 AM, Yinghai Lu wrote: >>> >>> Looks like we need to change the loop from phys address to virtual >>> address instead. >>> to avoid the overflow. > > something like attached. I tested it and it worked well. I just got this warning on build: In file included from arch/x86/mm/init_64.c:60:0: arch/x86/mm/ident_map.c: In function ‘ident_pmd_init’: arch/x86/mm/ident_map.c:18:29: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses] set_pmd(pmd, __pmd(vaddr - off | info->pmd_flag)); Do you want to resend your version for integration?