public inbox for linux-sgx@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
	dave@sr71.net, nathan@kernel.org, jarkko@kernel.org,
	linux-sgx@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH] x86/sgx: Fix NULL pointer dereference on non-SGX systems
Date: Fri, 17 Dec 2021 16:13:11 -0800	[thread overview]
Message-ID: <76cbcda7-ee56-1cbb-0490-4de0c6e79b66@intel.com> (raw)
In-Reply-To: <Yb0mR5kZQyACcqXu@kroah.com>

On 12/17/21 4:07 PM, Greg KH wrote:
>> +static umode_t arch_node_attr_is_visible(struct kobject * kobj,
>> +		struct attribute * attr, int idx)
>> +{
>> +	/* Make all x86/ attributes invisible when SGX is not initialized: */
>> +	return !nodes_empty(sgx_numa_mask);
> That's a very odd umode_t return value :)
> 
> Did you test this?  What was the mode of the sysfs file that is created?

Hah, I tested the "return 0" side of it.  That half works great!

The "return 1" side, obviously not.  I'll fix that up before sending it
out for real.

  reply	other threads:[~2021-12-18  0:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 22:31 [PATCH] x86/sgx: Fix NULL pointer dereference on non-SGX systems Dave Hansen
2021-12-17 22:57 ` Nathan Chancellor
2021-12-17 23:15 ` Greg KH
2021-12-17 23:30   ` Greg KH
2021-12-17 23:55     ` Dave Hansen
2021-12-18  0:07       ` Greg KH
2021-12-18  0:13         ` Dave Hansen [this message]
2021-12-21  8:42 ` Jarkko Sakkinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76cbcda7-ee56-1cbb-0490-4de0c6e79b66@intel.com \
    --to=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dave@sr71.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jarkko@kernel.org \
    --cc=linux-sgx@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox