Return-path: Received: from mga04.intel.com ([192.55.52.120]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fCTQM-00081e-NS for speck@linutronix.de; Sat, 28 Apr 2018 19:14:15 +0200 Subject: [MODERATED] Re: [PATCH v2] Linux Patch 1/1 References: <92c45587-5eb3-2421-6fc1-42e74a715e30@linux.intel.com> <20180427164743.GA14180@pd.tnic> <6e2b14fc-3bf6-071d-6ce2-e518f2c4f069@redhat.com> <20180427173221.GB14180@pd.tnic> <20180427180944.GD75137@tassilo.jf.intel.com> <85e5e716-bd80-30f5-d4fe-a9bf0601e6d8@linux.intel.com> <07ad1696-ef36-27ba-67b9-150f1d33b5e5@redhat.com> From: Tim Chen Message-ID: <5912f14a-8edc-ddda-630e-6261b71972d7@linux.intel.com> Date: Sat, 28 Apr 2018 10:14:08 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="mZzRjMYld9cMoxk41qByoh6uOw05bb3fW"; protected-headers="v1" To: speck@linutronix.de List-ID: This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) --mZzRjMYld9cMoxk41qByoh6uOw05bb3fW Content-Type: multipart/mixed; boundary="OE8iynTp14Px0RvD6KBMMYy5dLa5o91qT" --OE8iynTp14Px0RvD6KBMMYy5dLa5o91qT Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 04/28/2018 05:26 AM, speck for Thomas Gleixner wrote: > On Fri, 27 Apr 2018, speck for Tim Chen wrote: >> On 04/27/2018 01:37 PM, speck for Thomas Gleixner wrote: >>> So if spec_store_bypass_prctl is not enabled you can return some othe= r >>> error code and we surely can make that error code depend on the mitig= ation >>> state and return -ENOTVULNERABLE or whatever is suitable. >> >> You mean add a new ENOTVULNERABLE error number? I can't seem to find >> errno. If I need to add this, which file should it go to? >> >> I'll keep the EINVAL temporarily in my patch till I can figure out >> the ENOTSUPP and ENOTVULNERABLE usage. >=20 > I made that up and added: or whatever is suitable >=20 > In other words, find a suitable error code to express what you want to > express. How about EOPNOTSUPP if we are are trying to set RDS and platform does not support it. And EALREADY to indicate that the platform is not vulnerable? They are both defined in include/uapi/asm-generic/errno.h. For older kernels, they will always return EINVAL. Tim =20 >=20 > Thanks, >=20 > tglx >=20 --OE8iynTp14Px0RvD6KBMMYy5dLa5o91qT-- --mZzRjMYld9cMoxk41qByoh6uOw05bb3fW--