Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp14465757ybl; Mon, 30 Dec 2019 10:35:07 -0800 (PST) X-Google-Smtp-Source: APXvYqyYLJaHxcNKY9+2JzNaJYIZEStoBR1TSx8Sjr9Qs0BT4rE8uMS1qYy+fz9GrVc5JKbs1bmA X-Received: by 2002:a9d:68d1:: with SMTP id i17mr59093271oto.367.1577730907562; Mon, 30 Dec 2019 10:35:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577730907; cv=none; d=google.com; s=arc-20160816; b=E04uPLvS2qbFtWBkKgYfWQJZiFZSdBzXmBl67Fn14JqB9SqeYiztTJLVP67arDT0z+ HHZGPoWUG7MXRDyLIRu8AdC9JorsjAKR5zdDHoXpE6JCZUsUJljHKCRdA9BB8Ps+iWpa y37Hd6u3XL6ng8u1qgIxQY8r5MWFs+qZcBpP85G1kD6KxLfeTb8eQC9iZskNPVAFfZw+ 0DKaYHhu/fGwJO/xhJhiwMsj+sF6/RyZc3gOXAZ0VsV3GSDawHB8r7PeOWLrqkauu//I sd1aD64sXpvX1eLUuOvQTAY341qcRdx5i2FOKIrLBEtp/h+3RsxmoMaE5w0Db2TNwE8k kEWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qJxG5rXeQ+ZGJOaYW4EXkwuwUFBqKojJcyGWuzZri/k=; b=0dNVY4nv0Od6yDiycb6cBhBzno1hae0VhZgWbhk9Rr/Fi7HhgqFwQeGHQ+VNg/ZsTG 4bz3sJSgiTVfmlCNpnqzrKMEXMw5AH4dmvmmRQ1w6/utyGtKPI6x7GxaiR9eCYqzBMES 1WPBMHKOMp1OgLrI9b6gBn/XT8Kt++EYNRWK779kqILhCAwQEQIKYqZw/TQEhn+hNCGt ho4e7Xr0ITI5J0FoYI1198RU1xTJ7gYOV3gFJJPpH+BuuS0KEOGn+g6qUxxD3KTjw7cj KoPAtwTqXOFY40Y8QLlQLPsJDsvN23ztbXRhAKSJho1aruWoryFKi+mM/K4Lbx+W8vk6 3YTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=TjTY3FAw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r12si22804087otq.156.2019.12.30.10.34.54; Mon, 30 Dec 2019 10:35:07 -0800 (PST) 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; dkim=pass header.i=@chromium.org header.s=google header.b=TjTY3FAw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727544AbfL3SeL (ORCPT + 99 others); Mon, 30 Dec 2019 13:34:11 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:34636 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727504AbfL3SeK (ORCPT ); Mon, 30 Dec 2019 13:34:10 -0500 Received: by mail-ot1-f67.google.com with SMTP id a15so47234792otf.1 for ; Mon, 30 Dec 2019 10:34:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qJxG5rXeQ+ZGJOaYW4EXkwuwUFBqKojJcyGWuzZri/k=; b=TjTY3FAwY5LS77J2nD1DGrKzPF9YGkdN6ifPOrdb45SvYIh5qCd84cYm1LdF+hVVGC XV3U4NJuvtV55tXe8xuP2fhgaHpori4DgyCVgvTasyVyFLgoaMuRfGxZ9n7NxydMJ3iq lfGl9YM5+cEcPnqn5pPXqXPpApfTmCyA8sYNw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qJxG5rXeQ+ZGJOaYW4EXkwuwUFBqKojJcyGWuzZri/k=; b=IsJJl8R0qtUzkKUtUiugaQ8bsqRRwcRbYP4/2HrLLkKBoIyNAA/jFpzSvpnbw+RYxI mnmJXq7uZ9k5Fw+1vqxoF8X8PzTIfFExdxLoXM8lXBJNUcTmaaYCm2aSJHa1UrYegIjT w2YmxAhsRnoP+P6zg79tzQOp/iUytkGXr427xGwEgqgItcEUnQC1gvrnKzngToKFNamf 1NRJX7d71k60S2b7B79N9t7upaqrUt6cz6M+3bpQPmUCwjCbvp8ksrGk/c1tnycAc3QE l8QjqQHpx9nGLNqyQifkPJBh4T5eYjPdtXfeqmxWNUsy0gFhUNEBWiRXROkHwqPq0tOz RWHw== X-Gm-Message-State: APjAAAVJG8ptUM+8uuAQjENfI73A9uXR7Tc4JS18M1RoH/pVYP825ujb QCFpM7HTT//hHNp7+19zRPE09w== X-Received: by 2002:a05:6830:1141:: with SMTP id x1mr1566945otq.120.1577730849877; Mon, 30 Dec 2019 10:34:09 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id p65sm12426488oif.47.2019.12.30.10.34.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2019 10:34:08 -0800 (PST) Date: Mon, 30 Dec 2019 10:34:07 -0800 From: Kees Cook To: Arnd Bergmann Cc: "Kirill A. Shutemov" , Khem Raj , "linux-kernel@vger.kernel.org" , "Kirill A . Shutemov" , "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , x86-ml Subject: Re: [PATCH] x86/boot/compressed/64: Define __force_order only when CONFIG_RANDOMIZE_BASE is unset Message-ID: <201912301033.84517BA05@keescook> References: <20191221151813.1573450-1-raj.khem@gmail.com> <20191223171043.g54secptjtqkhuve@box> <20191223230857.eafab52y5erfmgab@box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 30, 2019 at 01:12:31PM +0100, Arnd Bergmann wrote: > On Tue, Dec 24, 2019 at 12:08 AM Kirill A. Shutemov > wrote: > > On Mon, Dec 23, 2019 at 02:25:02PM -0800, Khem Raj wrote: > > > On Mon, Dec 23, 2019 at 9:10 AM Kirill A. Shutemov wrote: > > > > > > > > On Sat, Dec 21, 2019 at 07:18:13AM -0800, Khem Raj wrote: > > > > > Since arch/x86/boot/compressed/Makefile overrides global CFLAGS it loses > > > > > -fno-common option which would have caught this > > > > > > > > If this doesn't cause any visible problems, why bother? > > > > > > > > > > it does break builds with gcc trunk as of now e.g. > > > > > > > Hopefully, we will be able to drop it altogether once we ditch GCC 4.X > > > > support. > > > > > > > > > > gcc10 is switching defaults to -fno-common so we need to solve this one way or > > > other, I am not sure if gcc 4.x will be dropped before gcc10 release > > > which would be > > > in mid of 2020 > > > > Okay, it makes sense then. Please include this info into the commit > > message. > > > > Also, I wounder if it would be cleaner to define both of them as __weak? > > Or maybe make the #ifdef check for gcc < 5 instead of checking for > CONFIG_RANDOMIZE_BASE? That way it will be found by whoever > cleans up the code when we increase the minimum compiler > version to one that doesn't require the hack. I agree: that seems a better way to do this. -- Kees Cook