Received: by 10.223.176.46 with SMTP id f43csp79922wra; Tue, 23 Jan 2018 16:32:43 -0800 (PST) X-Google-Smtp-Source: AH8x2258uV/df1uWZstCxwFIYPoDROYhy+EXvktX2Hm5eqrVQ1/XnCIy7JstnI1Dy6yN6cNXg5Y8 X-Received: by 10.99.111.68 with SMTP id k65mr9594126pgc.446.1516753963825; Tue, 23 Jan 2018 16:32:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516753963; cv=none; d=google.com; s=arc-20160816; b=jOGCO+LkjFbs76uhSoFheDiQDgylSFRjKkHNZUEnoSKqeKLuM4yv6A6LZbR0MvpbA8 nXD/ETCn0DoLcPkS98YgLn+JjW1Khp3G41ys4G1jeJ5XvLtVsdH7TDru/D55mhgrfVF2 QO38FM7rzK9sDtMf9hc2n9kCCAS2ikonvY5138+llv9+QjSdtZ3qFSBeZClSypRcLKDw J3VqWLHdacF5IYlBa98DpPb6zLZzfVIZUFbzRZOIr3mJPb4dvInrHW9TQHTxQ0Zg3T7Z 5M6IH/sefdWliY3IsT+JGWKplD9d6DUiweulE80YIcONS5q4w7MYPttnhq9UyiFWAghP UkMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=7w66O6PbqtzjqGvjrmpe5JegQP2JI/jFYDYd1q2qpwE=; b=xCtc3OXK75lsc0LagH+5Lg6yS5q66qIvnsoc6eK745rOv+mEOOui4KVEA6fav55+Kb GMZcae0SNzwSgFo0i+bBeBw2oQKCuxm4PWgspHx6ql0gYaANDqwSN65Bjk3hKA8Q4v1B LsZh3PbHCC6riNFdGQurpxctxB9FZVg8zxtajNMyEE2DWCG7cgk2etJgSR+cFi5b6oVD BCsrpqGdOKZoy1kf651zgO9RZAeG/jofmDi9ABceoPkzkrZPdNYpYWLKedAxrAmzTwNB dHK0A5XNkZN7YUlFtTdn2X0Kyyo3W3IpGeXYr7yBPF+iRHZ/65/f594CTLtmTn9kEB2K Awyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ldt5/3BY; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a17si15049553pgv.479.2018.01.23.16.32.27; Tue, 23 Jan 2018 16:32:43 -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=@google.com header.s=20161025 header.b=Ldt5/3BY; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752736AbeAXAcD (ORCPT + 99 others); Tue, 23 Jan 2018 19:32:03 -0500 Received: from mail-vk0-f68.google.com ([209.85.213.68]:38315 "EHLO mail-vk0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752455AbeAXAcC (ORCPT ); Tue, 23 Jan 2018 19:32:02 -0500 Received: by mail-vk0-f68.google.com with SMTP id z9so1500762vkd.5 for ; Tue, 23 Jan 2018 16:32:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7w66O6PbqtzjqGvjrmpe5JegQP2JI/jFYDYd1q2qpwE=; b=Ldt5/3BYRaVcd+wuUyTpJYtf0zx5PtiquTzmV/0vKIJPJQy2wGqV92FlD7DAjEM/Ob G7AvKeNrVml2KFd6pUzqffXgMlMS/LgvgQgI5hdUZwggLxHaMx/RLrj1OS9ctThGLZ8g mzhM4/RSQFQUNlAIXCs8YKO0iEvgfyIatsJv8N1M0CzX45dvL1B0NrKgfxlI2zBUTsmx GUrK3N4IE6VW/FzbGEz47BXIsGkecXzRztxZ383QPAE2++pg9tdy1vvblkuLaw50uS9o saNBLh98PaXINE3uJdfUsqNqfRSnFWaFaSXns+q/YcuyuE/9T5Zxc21tMC7KB8nhLY7w gcgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7w66O6PbqtzjqGvjrmpe5JegQP2JI/jFYDYd1q2qpwE=; b=QsgTq3/p1NqijLJiVWtu9+KvMws1ZQjmEk0qUL1pFEUPl7CijcY0keq40NUM20YyLL ynSgK1z838ZnkyFAV/xcV5JLzqGgH1XmFOb4JcK1Y0LCa0u60SqmoiXKt41m+Wa8QslY 7Luv/p5lgFhs6eyZ64Z/5WmoAOFtcz1MVE1nuflSGJw7i3pZhZBB0ZCa8t6J2GWeKUsd gLPUTM1wQW3auKjA7NNf58mrItVkPlsPpNrbj4B3Ug5MdPeXB9d2bfY5mZvn1IKqQeZ9 4V1j2pcbU3ma0PUjqA+6BM0m5wxna9wkcY3k1fRihFqTMAlbxYp9WI83o4E1kA0/idXa 1MBQ== X-Gm-Message-State: AKwxytcdghLrmOxOtF+/0j1eIfvIOsGS601oafdEPM7/uo3CM5xgKy9z B/mbvE4hPhsOO0XFOJ8gfE/OFaZ0uUKncduE3gP85g== X-Received: by 10.31.33.22 with SMTP id h22mr2981214vkh.195.1516753921216; Tue, 23 Jan 2018 16:32:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.67.196 with HTTP; Tue, 23 Jan 2018 16:32:00 -0800 (PST) In-Reply-To: <20180123230545.jufkdgttxe4eiswf@pd.tnic> References: <1515707194-20531-1-git-send-email-dwmw@amazon.co.uk> <1515707194-20531-5-git-send-email-dwmw@amazon.co.uk> <20180123224014.dsbzps4hydt6h7ed@pd.tnic> <20180123230545.jufkdgttxe4eiswf@pd.tnic> From: Kees Cook Date: Wed, 24 Jan 2018 11:32:00 +1100 Message-ID: Subject: Re: [PATCH v8 04/12] x86/spectre: Add boot time option to select Spectre v2 mitigation To: Borislav Petkov Cc: Jiri Kosina , David Woodhouse , Andi Kleen , Paul Turner , LKML , Linus Torvalds , Greg Kroah-Hartman , Tim Chen , Dave Hansen , Thomas Gleixner , Rik van Riel , Peter Zijlstra , Andy Lutomirski , Alan Cox , X86 ML , Tom Lendacky , Josh Poimboeuf Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 24, 2018 at 10:05 AM, Borislav Petkov wrote: > On Tue, Jan 23, 2018 at 11:55:05PM +0100, Jiri Kosina wrote: >> I think we should start recording CFLAGS the kernel has been compiled with >> anyway; doesn't hurt and might come handy when debugging. >> >> /proc/version is probably not the best place ... /proc/cflags? > > Yap, I guess I can find that string with hexdump on the kernel binary too :-) I've wanted this for a while (especially for the coming detected support for stack protector). Having more than just the clfags is, I think, important. We'd likely want to record the entire environment (compiler version, linker version, flags on both, etc). -Kees -- Kees Cook Pixel Security