From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x226WfI1C5PmCuMWqocG/n9gO+uRL8GUQ1TxGBjKhmWHf024lvMbTL6ZA6ZhJBbzWXTtsJ2ys ARC-Seal: i=1; a=rsa-sha256; t=1516887275; cv=none; d=google.com; s=arc-20160816; b=pcLNn5qVrjO5noNRunXOVbG1mSroBEzsKAiAt+LeiulUqwTjuPPOp2psQ2bQSTAZ1q iCkFWS8DCUANhZu+Vw4sTxK4h6Jz6ayaHP5ch3lbqFb6OJ59vDtk9lWDHD7HbUEIcPp+ gqJkdmqTxZrisvLdOxhrzRuZfwqcoDFj42xd/xQdAGWS1X4OzRlreyTiGv9lbiLFKlRd HRLoc1ddRfNBcRbImA3x1yKYgTitqc5cWgM3oprN/I0yMMUY0YWtnkDIT4axLRprYma3 ThRpv+FVIAccuUzJfLAX8cv+8KBRNAt+JcXlwPbUfVf2DNlXO6MlD/gvcurzH1JKfInC ZnaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=uwlQPaZl0Hs0nGfaDWucnds3rhJ1Y7ubFehhvUj49mc=; b=zRUlNrRQQ4s66cJf+QtMwTB9X2/v3s5IAguJGaDvrhnwOJ9Azb5gMaQJdfZqJlV1RH ZPjyGhh0M4Hoe9wwQQqhxAZkVc0rRsEWDTNuzHjuY+OmPTcBgvromXbXZOLmsjmZ76DY 4bsfN421JBzzFGPXpuBVl1RGAojfbD7ExUdmjnGB8zwrT50x3scMLdsBxp5EKlzCeqnJ 3fjgmDzF33unpEwy3NVyXu7m2RWFYgMUfBJYqFKZM25BNkGqE2dG9EULMWwwBe5k7SyW y50KJC+65OGlxrbUE2+M6XOR2Sj4UBQ99/07MQpdPqgF/nVAy1Vlx32x8pAxkCP+kNYa QH0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gnomes@lxorguk.ukuu.org.uk designates 82.70.14.225 as permitted sender) smtp.mailfrom=gnomes@lxorguk.ukuu.org.uk Authentication-Results: mx.google.com; spf=pass (google.com: domain of gnomes@lxorguk.ukuu.org.uk designates 82.70.14.225 as permitted sender) smtp.mailfrom=gnomes@lxorguk.ukuu.org.uk Date: Thu, 25 Jan 2018 13:34:33 +0000 From: Alan Cox To: "Jason A. Donenfeld" Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com Subject: Re: [PATCH] cpu: do not leak vulnerabilities to unprivileged users Message-ID: <20180125133433.3a750f25@alans-desktop> In-Reply-To: <20180125120401.30596-1-Jason@zx2c4.com> References: <20180125120401.30596-1-Jason@zx2c4.com> Organization: Intel Corporation X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590565909898584039?= X-GMAIL-MSGID: =?utf-8?q?1590571591491178615?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: On Thu, 25 Jan 2018 13:04:01 +0100 "Jason A. Donenfeld" wrote: > While it's public information if the CPU in general has spectre/meltdown > bugs, it probably shouldn't be as globally obvious to all unprivileged > users whether or not the kernel is doing something to mitigate There are plenty of cases where it is useful for an application such as a JIT to know what level of protection it needs to be providing. For example if you look across the ecosystem (notably ARM) a lot of common slower processors are not vulnerable. For those a JIT would want to generate code without the overhead of any protections. As you observe any attacker can already trivially ascertain whether protection is on, so there is no point pretending file permissions magically stop that. In fact the information is already in cpuinfo. IMHO given it's trivially available info and useful for JITs it make sense for the data to be exposed. Alan