Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: Steffen Eiden <seiden@linux.ibm.com>
Cc: Greg KH <greg@kroah.com>, Heiko Carstens <hca@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Shuah Khan <shuah@kernel.org>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	Nico Boehr <nrb@linux.ibm.com>,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	kvm@vger.kernel.org
Subject: Re: [PATCH v4 1/2] drivers/s390/char: Add Ultravisor io device
Date: Fri, 13 May 2022 10:37:58 +0200	[thread overview]
Message-ID: <20220513103758.5a4baf7c@p-imbrenda> (raw)
In-Reply-To: <80afde93-b9cf-f6c4-da40-3385d7f6741b@linux.ibm.com>

On Fri, 13 May 2022 09:45:39 +0200
Steffen Eiden <seiden@linux.ibm.com> wrote:

> On 5/12/22 16:33, Claudio Imbrenda wrote:
> 
> [snip]
> 
> >> +/*
> >> + * IOCTL entry point for the Ultravisor device.
> >> + */
> >> +static long uvio_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
> >> +{
> >> +	void __user *argp = (void __user *)arg;
> >> +	struct uvio_ioctl_cb *uv_ioctl;
> >> +	long ret;
> >> +
> >> +	ret = -ENOMEM;
> >> +	uv_ioctl = vzalloc(sizeof(*uv_ioctl));  
> > struct uvio_ioctl_cb is rather small, couldn't you just allocate it on
> > the stack?
> >   
> IIRC it was on stack in some previous version. We then had a discussion
> earlier about this triggered by the inverse comment and decided to not 
> use the stack.

ok fair enough

but what's the reason for a vzalloc instead of a kzalloc, when the
allocation is surely going to be small?

> 
> [snip]
> 


  reply	other threads:[~2022-05-13  8:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 14:47 [PATCH v4 0/2] s390: Ultravisor device Steffen Eiden
2022-05-10 14:47 ` [PATCH v4 1/2] drivers/s390/char: Add Ultravisor io device Steffen Eiden
2022-05-12 14:33   ` Claudio Imbrenda
2022-05-13  7:45     ` Steffen Eiden
2022-05-13  8:37       ` Claudio Imbrenda [this message]
2022-05-13 12:35         ` Steffen Eiden
2022-05-16 11:33   ` Steffen Eiden
2022-05-16 14:51     ` Claudio Imbrenda
2022-05-17  8:38   ` Janosch Frank
2022-05-17  8:42     ` Steffen Eiden
2022-05-17 12:41       ` Janosch Frank
2022-05-18 11:47   ` Heiko Carstens
2022-05-18 13:45     ` Janosch Frank
2022-05-18 13:49       ` Steffen Eiden
2022-05-19  5:37       ` Heiko Carstens
2022-05-19  9:13         ` Janosch Frank
2022-05-10 14:47 ` [PATCH v4 2/2] selftests: drivers/s390x: Add uvdevice tests Steffen Eiden
2022-05-21 13:53   ` Muhammad Usama Anjum

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=20220513103758.5a4baf7c@p-imbrenda \
    --to=imbrenda@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=greg@kroah.com \
    --cc=hca@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    --cc=seiden@linux.ibm.com \
    --cc=shuah@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