From patchwork Tue May 30 09:14:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 100697 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp120930qge; Tue, 30 May 2017 02:16:08 -0700 (PDT) X-Received: by 10.99.44.9 with SMTP id s9mr24627731pgs.72.1496135768238; Tue, 30 May 2017 02:16:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496135768; cv=none; d=google.com; s=arc-20160816; b=dbzOcCXxtXL9tFlMxTQS2sUpyaaTCZvzFG3iP240/BjGnZnYuSsu6vy4Fb3qh5d5vv TxztVQ12uKxEwdJiqNmUWY82mL3k9RiyyUjNAhfrOSX30XlDW4NVirPYzBHFuTb0gowz S64ccjTrzTpBL3iIzm4UKjdVnq8SFi+2JEqVa73N49YlK6/x161HcS5T9+48uud5jGDM Cq7Ngf19cOiGaitg1leM2Eez2ar1mr+PHO6alRBs+JsoyuhKyXwuDvXx1kSKi83jwhyN 91VicOqU2WUuf3Dyy3Ub+HL644k5doiJ7XvVl9A/qGikUACuGNvPPfXXtN6g8zUci3qw 6tUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=LuoEr/ZndSbfMQ/OPL7hZps5hKFWcxQz2MC4NGZYA/k=; b=jVR4MpmXFuMkjL79596zE5eDzKLR6ydXdcIEbMTA/iBoHiTSsl4WwirwRkRedz5mmq DF47XIpGo/R3RNtjEYIQykZ2LayNnKsuiiXLvQtFsNLKEY5ArAbMNKUvMGTp9w+d+5fM RO4ovr5gaRK50ic3K9+lhJ3lIj+ByLK9MDVirrJXk5J1zXjn2KmOrkGt7NbI9iY5WW+u y0t+L0RWmr7Qb2SKyZW7pV3o5ZnJenF/+pOJlfKmPZj5+Z0Mk02efrHFysVcKly+WUcS 7VL5O/SD1P6mtXyZEs3D8VqtsfpozMLIW4RCYP5MW4ucl6t9AeK3gWcmIp6bHzEPKDaL 9Ehw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r15si44853987pli.221.2017.05.30.02.16.07; Tue, 30 May 2017 02:16:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751488AbdE3JQF (ORCPT + 25 others); Tue, 30 May 2017 05:16:05 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:61931 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750992AbdE3JQD (ORCPT ); Tue, 30 May 2017 05:16:03 -0400 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0MOG72-1dIv1w2SVo-005WBx; Tue, 30 May 2017 11:14:48 +0200 From: Arnd Bergmann To: Ingo Molnar , x86@kernel.org Cc: Arnd Bergmann , "H. Peter Anvin" , Thomas Gleixner , Kees Cook , Baoquan He , Thomas Garnier , Dave Jiang , linux-kernel@vger.kernel.org Subject: [PATCH] x86/KASLR: use the right memcpy Date: Tue, 30 May 2017 11:14:17 +0200 Message-Id: <20170530091446.1000183-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:+1pOeInaujirOLlnHuNpB41jKmDSbQJqqCFHjFsylHOv+lRilPx rBvKnFQBBg0r+ifCYGQ5dlxo05qhFukJjKoVhrKH6YDdknHuC03LwyVZnkbJUznUin+LUG2 6GjpN9OuKmUUqsH8bgNZ1LLUWT7L/xl9t1lXIuqImLxvjjtD+pi0By8knrYy30fuk5KPD09 bW392I8NbDni281vpnwhw== X-UI-Out-Filterresults: notjunk:1; V01:K0:QjdFQw7T2EE=:61M1M7mOriqJnUfjoGjkdI xHzDjIBGciublsADzPGdvRX/rWGCKaeDAe+IC3ikx1v5UINxE/JB5ocAA6OHufs4CnNUXtdeb btdEQA86QGSTccmfp2weEUZMj1sqVf+MQRb/dB1K3RBA2UY3cHmUN9Jbxfz8zdgHZPAIF7+3W KWKng1glbkOOxDhPpR//sZFHvf3h/xZ2uN7NZZN5jHj/DT//WOTwkyREA0nKGdHfOrEbExqFZ f0tE3sfxRVqZne4bAt4E8jEf647HgOuKuZYv0wdHuE8StdJxrX2dWVYzqIS4GxNeRSvy+/2Xj fS4vot2gP0MuhTPdcbQTB9lQWwcTsVudsabS8EpI60e0u4R8nhCcJ2WWv0X+8McZUrcBwcILY AAGY4PP3wZAphOnMVo3blfryoNh7d21cgfg5ZpveOXBuHQgJlLAdk8EuYNOCcS2h2tKofPzQP eXoX1OZRsuBHaV59Gc0U0iTPvbnE8tDzJ4/ekyKsVrK1tQwmo7N39sBCH2iNpKOhoueZTZCG6 ThtSiaHMmLfFdWv+XsTokTK+FFykW1+JrITfYnBEiT8cXxuB/VSpLtonJf9davNjPnI78Tzxz oq7isK1aRkT0Y8bt2J9KHSyo3dat/Eil1oc4Qx6n3KjXwPJfWONKnXBJS5AT6SSyalYv6YB8b aW4U+sjb86J1E+8J3mw0GfXakW0RVhno7yEpsEJR2acVfPBo94Mf4BDUcZPjkHSX8PsA= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The decompressor has its own implementation of the string functions, but has to include the right header to get those, while implicitly including linux/string.h may result in a link error: arch/x86/boot/compressed/kaslr.o: In function `choose_random_location': kaslr.c:(.text+0xf51): undefined reference to `_mmx_memcpy' This has appeared now as kaslr started using memcpy. Other files in the decompressor already do the same thing. Fixes: d52e7d5a952c ("x86/KASLR: Parse all 'memmap=' boot option entries") Signed-off-by: Arnd Bergmann --- arch/x86/boot/compressed/kaslr.c | 1 + 1 file changed, 1 insertion(+) -- 2.9.0 diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c index e0eba12bffe7..fe318b44f7b8 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c @@ -30,6 +30,7 @@ #include "misc.h" #include "error.h" +#include "../string.h" #include #include