Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1383739

[PATCH 3/5] x86, boot: Clean up things used by decompressors

Path csiph.com!news.freedyn.net!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod
From Kees Cook <keescook@chromium.org>
Newsgroups linux.kernel
Subject [PATCH 3/5] x86, boot: Clean up things used by decompressors
Date Wed, 20 Apr 2016 23:00:03 +0200
Message-ID <rq7o7-5F5-17@gated-at.bofh.it> (permalink)
References <rq7o5-5F5-3@gated-at.bofh.it>
X-Original-To Ingo Molnar <mingo@kernel.org>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uJ0EUlC3EAJCiCrnhzwb5mPrgn5He7sgTOHAIwIMMTI=; b=kBoKfhnS4DQCa31mQmDmwbnfFAiTycDgsCBam8/Hm5wqZJGk/wqMoFOG/3awtPlt2f QQUFH/03IgmYkiVrwCW3C+qjw86Eilv/brDeWgyKAxXXC90no35H6PVcEdje7k/CSVNy rigDOdcjuK8Fq84HCvRckELAjyNEGhhJAdYAk=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uJ0EUlC3EAJCiCrnhzwb5mPrgn5He7sgTOHAIwIMMTI=; b=Z6VgF9Pd/S3GeYPhIO8Py3dFMV967F4ye/ocPTEhlSm1h0KajFNpF4KJJjVjx3c9Aj Eu+5au0sBNeCwp43oJ7yycpJ/dldjqUbssRAY/m33v7SPxm7wvUZMH38R+EitZFGF1DX r0SMtSte90QHDxBhWrd1WmjfjzeDoq0cAixpsO47CEu1PhrEUnRgiWm6VPeprgF4tDtb jrhWbf1ZrERAiC/YZ2Jt6ixs1fDme2lMmJNdSUSBveQqp4tdhtYD5JHLIxSRGW7jCgX1 7WH8tkqFZaazzrU8WMd4TrxUV48qghNHuPtCdWpjLjfGXkQhXXu1XP7qwd5qFhch9Yl2 /DYg==
X-Gm-Message-State AOPr4FXxWclwugGw8dfCGpsA5bHuQ3m/7ijyIw7DJu7yP9ApOKhog60xguS8daQUfDmimg==
X-Received by 10.66.90.163 with SMTP id bx3mr15248419pab.59.1461185751053; Wed, 20 Apr 2016 13:55:51 -0700 (PDT)
X-Mailer git-send-email 2.6.3
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 39
Organization linux.* mail to news gateway
X-Original-Cc Kees Cook <keescook@chromium.org>, Yinghai Lu <yinghai@kernel.org>, Baoquan He <bhe@redhat.com>, Ingo Molnar <mingo@redhat.com>, x86@kernel.org, Andrew Morton <akpm@linux-foundation.org>, Andrey Ryabinin <aryabinin@virtuozzo.com>, Dmitry Vyukov <dvyukov@google.com>, "H.J. Lu" <hjl.tools@gmail.com>, Josh Poimboeuf <jpoimboe@redhat.com>, Borislav Petkov <bp@suse.de>, Andy Lutomirski <luto@kernel.org>, linux-kernel@vger.kernel.org
X-Original-Date Wed, 20 Apr 2016 13:55:44 -0700
X-Original-Message-ID <1461185746-8017-4-git-send-email-keescook@chromium.org>
X-Original-References <1461185746-8017-1-git-send-email-keescook@chromium.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1383739

Show key headers only | View raw


This rearranges the pieces needed to include the decompressor code
in misc.c. It wasn't obvious why things were there, so a comment was
added and definitions consolidated.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 arch/x86/boot/compressed/misc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index e96829bdb6d2..0381e250a785 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -21,19 +21,19 @@
  * it is not safe to place pointers in static structures.
  */
 
+/* Macros used by the included decompressor code below. */
 #define STATIC		static
 
-#undef memcpy
-
 /*
- * Use a normal definition of memset() from string.c. There are already
+ * Use normal definitions of mem*() from string.c. There are already
  * included header files which expect a definition of memset() and by
  * the time we define memset macro, it is too late.
  */
+#undef memcpy
 #undef memset
 #define memzero(s, n)	memset((s), 0, (n))
 
-
+/* Functions used by the included decompressor code below. */
 static void error(char *m);
 
 /*
-- 
2.6.3

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 3/5] x86, boot: Clean up things used by decompressors Kees Cook <keescook@chromium.org> - 2016-04-20 23:00 +0200
  [tip:x86/boot] x86/boot: Clean up things used by decompressors tip-bot for Kees Cook <tipbot@zytor.com> - 2016-04-22 11:50 +0200

csiph-web