From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932452AbaHGPPx (ORCPT ); Thu, 7 Aug 2014 11:15:53 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:63656 "EHLO mail-ob0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932084AbaHGPPv (ORCPT ); Thu, 7 Aug 2014 11:15:51 -0400 MIME-Version: 1.0 In-Reply-To: <1407353564-21478-2-git-send-email-keescook@chromium.org> References: <1407353564-21478-1-git-send-email-keescook@chromium.org> <1407353564-21478-2-git-send-email-keescook@chromium.org> Date: Thu, 7 Aug 2014 19:15:51 +0400 Message-ID: Subject: Re: [PATCH 1/7] arm: use generic fixmap.h From: Max Filippov To: Kees Cook Cc: LKML , Mark Salter , Liu hua , Rabin Vincent , Nikolay Borisov , Nicolas Pitre , Leif Lindholm , Tomasz Figa , Rob Herring , Doug Anderson , Will Deacon , Laura Abbott , Catalin Marinas , Russell King - ARM Linux , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Aug 6, 2014 at 11:32 PM, Kees Cook wrote: > ARM is different from other architectures in that fixmap pages are indexed > with a positive offset from FIXADDR_START. Other architectures index with > a negative offset from FIXADDR_TOP. In order to use the generic fixmap.h Does anybody know if there's any reason why generic fixmap.h uses negative offsets? It complicates things with no obvious benefit if you e.g. try to align virtual address in the fixmap region with physical page color (that's why I've switched xtensa to positive fixmap addressing in v3.17). -- Thanks. -- Max From mboxrd@z Thu Jan 1 00:00:00 1970 From: jcmvbkbc@gmail.com (Max Filippov) Date: Thu, 7 Aug 2014 19:15:51 +0400 Subject: [PATCH 1/7] arm: use generic fixmap.h In-Reply-To: <1407353564-21478-2-git-send-email-keescook@chromium.org> References: <1407353564-21478-1-git-send-email-keescook@chromium.org> <1407353564-21478-2-git-send-email-keescook@chromium.org> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, On Wed, Aug 6, 2014 at 11:32 PM, Kees Cook wrote: > ARM is different from other architectures in that fixmap pages are indexed > with a positive offset from FIXADDR_START. Other architectures index with > a negative offset from FIXADDR_TOP. In order to use the generic fixmap.h Does anybody know if there's any reason why generic fixmap.h uses negative offsets? It complicates things with no obvious benefit if you e.g. try to align virtual address in the fixmap region with physical page color (that's why I've switched xtensa to positive fixmap addressing in v3.17). -- Thanks. -- Max