Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3726887imu; Sun, 11 Nov 2018 22:30:05 -0800 (PST) X-Google-Smtp-Source: AJdET5fdp23PonEv4/JHkSKHQUHch3kFI6hldN0Z0d8ToIMuB/FOg3T8jR1VLVRpany9AZ7VrXu4 X-Received: by 2002:a62:d084:: with SMTP id p126-v6mr19733091pfg.147.1542004205829; Sun, 11 Nov 2018 22:30:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542004205; cv=none; d=google.com; s=arc-20160816; b=Egnzsq9H5ekdG+NI0w/xOfBo765mhCWoiMOrI8iMNuR6f4zpiwKiK+vJjr0ido4cte IjYmnZoIhr4eJI+0VwC3DKw3Qu2YVaXEx6u6G7034k9RhdWrNqit1KUSZkSbA51hTjUR x1LHIiLidVKI0gDRcBhTlOr09KVkGjkzprf2zi4TlMblHbWfzQtqQCDve/aThOtWoOyf c9M+1blPBm2bsYRgZEf1MSggKqESOMFZoOr8vP5hGiW2Hk3Og53YWHRaaLSHjVyjKp89 COg8ibMPOLSCn2dCCWUHwhswrYBMH+lJ9vxhKiwpKr25V/hZ2t233YmKXBitv0e6erQ2 FcPA== 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 :in-reply-to:references:mime-version:dkim-signature; bh=en+M8qwLLTVyz4mNnIV9oXGc3BXJGTwM/2EcYJ81ZKQ=; b=tVttm1TK6jd2o3NBJgrFP+jCc4aDgIXrDhgAROm/yZ8kb53IABGKZtRoOcK3w0+lzJ S5nVNe+XPMl/lwTQDgMPRyKG8cqWcFDA+p/Q6LsXQ/WzqYpv7Qlr+YgWiC+Pbmpr59D5 jvn9UY0CNqmMgS3IXP9+wKz44kl2vdC4nJgjlDrDT/0db0JySC0hP5LipAJvxYglIpm5 N0bcKDjvUelS1EqMPxUYctZbVWpiCbtVbW7vt+mdMAnAmz37W7aQEK+0vPssmMhooUmv e4brQFoc58LQ0ZmOOQSWnnsh5rQBNJR3sOEQ9P9n/2kWMB5pdx4xvF+6tkVNxogB6exo Yc+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kHSowSuo; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b4-v6si17322451plz.105.2018.11.11.22.29.50; Sun, 11 Nov 2018 22:30:05 -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=@gmail.com header.s=20161025 header.b=kHSowSuo; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731770AbeKLQVP (ORCPT + 99 others); Mon, 12 Nov 2018 11:21:15 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:33748 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726779AbeKLQVP (ORCPT ); Mon, 12 Nov 2018 11:21:15 -0500 Received: by mail-oi1-f196.google.com with SMTP id c206so727970oib.0 for ; Sun, 11 Nov 2018 22:29:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=en+M8qwLLTVyz4mNnIV9oXGc3BXJGTwM/2EcYJ81ZKQ=; b=kHSowSuom4FqPNxM1HfDTZTYlPyh+HPk405uNCGTaPvRgmqaWI+4yZCq2A69DhzPA2 fYt6KU/4SpVWiGg0ZALkO/NG/ZBJrMe54lz8Dbzsfy3dgOEJXWDXx5pY5ZE0YDGgz1dW ZeB2xaMfIMYER9/QFjPJVsSz0jgaTPP+Q/ymNhrcUiyWC7DV8wqHfmuC/Wn+5o6uGhWU KM7IUNTAkPPsZtZBoipIUCgoqaIAuT9mNCB3naaMG20RnCdi5kobVt2wqnPFC8UiKtUc hqWrEli6QIxdn3VLC9FvdpeKd+Jon7zXCEhCaLViEcIVz/NXavIa8ASPVXvb4WGTLMws nu8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=en+M8qwLLTVyz4mNnIV9oXGc3BXJGTwM/2EcYJ81ZKQ=; b=bXlTSNUrVC2FWZFHOjcq9XB0U3JFGKF6hUE/QwxEA2+PyQilw+hpcgXHmbKJ12L55j TV+iPQ3VQo9HCNMa/mY9bQ9cZKPWdvKub3owGn9cBlCVEAQxC0g2xhTEX1pOifxW2XeW rq94pe6kkw3Y2JICfYnGdosrojCk2j15Hpp/RXik2uglc7Cfkp6L1/QN6WPCvyoq8VHz Am6dO4QEmIHw3vprh1go1GvdlHO12iOe+YcioVupaaXrdhtjaeO6yK7QG6UA4I8eedwP A41d9vcTpEnlVlTbNgmIr0KtkKBFCiHrS6N+1Qy2/NwYFcPjAAmot7WhzCYhD9TRpYiz /Qrg== X-Gm-Message-State: AGRZ1gJxgBXNZiJDBeLx/W0og9+0XYb5+raP40bqmlsp22h7LCE8GGPC Q+KN2kfE3d/HVxkYASGPho01bvWyndKsw7U05tU= X-Received: by 2002:aca:b183:: with SMTP id a125-v6mr9373445oif.44.1542004164743; Sun, 11 Nov 2018 22:29:24 -0800 (PST) MIME-Version: 1.0 References: <7958aa50-8808-e909-753c-e232b3d1f84e@packi.ch> In-Reply-To: From: David Abdurachmanov Date: Mon, 12 Nov 2018 07:29:13 +0100 Message-ID: Subject: Re: [PATCH] riscv: add S and U modes to ISA string To: Palmer Dabbelt Cc: me@packi.ch, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org 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 Sun, Nov 11, 2018 at 11:14 PM Palmer Dabbelt wrote: > > On Sat, 10 Nov 2018 00:35:15 PST (-0800), me@packi.ch wrote: > > On 10.11.18 07:45, David Abdurachmanov wrote: > >> > >> The patch adds the missing S and U modes. > > > > This is the same patch I submitted earlier (see v2 here [1], based on > > Palmer's feedback). Palmer stated that the "S" extension should not be > > exposed to usermode. > > > > Since two people arrived at the same solution, I wonder if the > > supervisor mode should really be hidden from userspace, as it's about > > the CPU information, not about the environment the calling code is > > running as. > > > > [1] https://lkml.org/lkml/2018/11/10/96 > > I still think S should be hidden from applications. This patch was fairly > mechanical, so it probably just wasn't though about twice -- that's the problem > with user ABI stuff, lots of times the obvious answer isn't the correct one :). > True. It was mechanical based on warnings I noticed while booting Fedora with latest kernel and BBL. Also true, that /proc/cpuinfo doesn't need to reveal all things to user space (especially if you don't want various programs to depend on it as some tend to parse /proc/cpuinfo). Note, that on server systems which probably would implement SMBIOS (based on the current proposal for RISC-V) the administrator could check for S mode.