Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp789522imm; Fri, 5 Oct 2018 11:48:49 -0700 (PDT) X-Google-Smtp-Source: ACcGV62IziDW65H46eq9USyMqA4gh1euPn0oAZqcgn8oqjhkvyzzglKb7dZKwgRmyJUyh+4++ap3 X-Received: by 2002:a63:d84a:: with SMTP id k10-v6mr11468370pgj.314.1538765329359; Fri, 05 Oct 2018 11:48:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538765329; cv=none; d=google.com; s=arc-20160816; b=q4dCPa+z2NMlK6zSzXcwWmZfnq12IbAw7veJ6EuKqT6QwQX9m9PQP8em0jMrT7OTSQ WMixH9PiObG+5YSJHdjoB+u7XCdbJVTPsTWA+1kNmeMm1GihgJ2fmaCt1D9ZILbiS2ea 0c1fCSlbJjAQHE3/ORMl5fPhesdpHxcIZnXmbQNCFcoVz+oey0TX/DDjxTsAmGEafCO2 b7O67p8rMpFYqof08bGKiuEt47XiFSj4vlBdNeiRYYWhQFpps3iQT3YLIJp45FD3RrkO ckF9lAz+xEy0u3S2n8b5IApiCwMk0sdpozAXVZmyYwZ7mCNsvSfSU12jpgiPs1c1yT+I bqiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=bP4Xzq4ZHsTk348b6oYNF3ldAQvZU1jJ9WCqC0259zY=; b=Btj2gwCXoZSQW/E/69zl/bgM848pn6Gso++GzkXEHcO3lzPkJt5am/sqBJ90pSCIlh zND2adaNSdQh6jFFT3Ctdo6gHnrLed6FkiJNRLOPOz3Kvl7AvLHaLp8ps6lBcx6ShfnJ uVSI1YV3u068AtQ/ipMIA7T/Gti50bzXxefZ3mfWLb7lRlW2N7H/kQb1wy2V6AufkkEr xQCEPix2qtPKfJVSZj+kqf6z8fTmN4N2X4+zSVXfwqIU5rykwrUdCFajDhYdaEB+ofae Y33xPrlHrHD1Zl2mLz51aK/47kJd0hCybG9Xa4LYkMlenUBc/7KW5+15ZlY3PK2sJYZO ge4w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g79-v6si9510871pfk.260.2018.10.05.11.48.33; Fri, 05 Oct 2018 11:48:49 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729139AbeJFBqz (ORCPT + 99 others); Fri, 5 Oct 2018 21:46:55 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:38865 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728958AbeJFBqz (ORCPT ); Fri, 5 Oct 2018 21:46:55 -0400 Received: from p5492e4c1.dip0.t-ipconnect.de ([84.146.228.193] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1g8V7R-0006sW-9A; Fri, 05 Oct 2018 20:46:33 +0200 Date: Fri, 5 Oct 2018 20:46:29 +0200 (CEST) From: Thomas Gleixner To: Tim Chen cc: Jiri Kosina , Tom Lendacky , Ingo Molnar , Peter Zijlstra , Josh Poimboeuf , Andrea Arcangeli , David Woodhouse , Andi Kleen , Dave Hansen , Casey Schaufler , Asit Mallick , Arjan van de Ven , Jon Masters , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [Patch v2 4/4] x86/speculation: Add prctl to control indirect branch speculation per process In-Reply-To: <5a558b4e-e241-2ab8-3653-b25dc014b78d@linux.intel.com> Message-ID: References: <5a558b4e-e241-2ab8-3653-b25dc014b78d@linux.intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 5 Oct 2018, Tim Chen wrote: > On 10/02/2018 10:58 AM, Thomas Gleixner wrote: > > On Tue, 25 Sep 2018, Tim Chen wrote: > >> > >> +void arch_set_dumpable(struct task_struct *tsk, struct mm_struct *mm, int value) > >> +{ > >> + if (!static_branch_unlikely(&spectre_v2_app_lite)) > >> + return; > >> + if (!static_cpu_has(X86_FEATURE_STIBP)) > >> + return; > >> + > >> + if ((unsigned) value != SUID_DUMP_USER) { > > > > First of all we use unsigned int and not unsigned, Aside of that why is the > > argument not unsigned int right away? > > > The original set_dumpable passes suid_dumpable, which was > exposed via /proc/sys/fs/suid_dumpable and defined as int. > It will make sense to define suid_dumpable as an unsigned int instead. > > Would you like me to redefine suid_dumpable as unsigned int > in sysctl.c in the patch revision as a separate clean up patch? Yes, that makes sense. Thanks, tglx