All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Savitz <jsavitz@redhat.com>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Waiman Long <longman@redhat.com>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	Kristina Martsenko <kristina.martsenko@arm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Kees Cook <keescook@chromium.org>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	YueHaibing <yuehaibing@huawei.com>,
	Micah Morton <mortonm@chromium.org>,
	Yang Shi <yang.shi@linux.alibaba.com>,
	Jann Horn <jannh@google.com>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Rafael Aquini <aquini@redhat.com>,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	Yury Norov <norov.maillist@gmail.com>
Subject: Re: [PATCH v2 1/2] kernel/sys: add PR_GET_TASK_SIZE option to prctl(2)
Date: Thu, 2 May 2019 17:46:08 -0400	[thread overview]
Message-ID: <CAL1p7m6eC3-99oFEyp0F1xn7qN4Vx+s-kHQXh14cMUWoVFqbWw@mail.gmail.com> (raw)
In-Reply-To: <20190502210922.GF2488@uranus.lan>

> Won't be possible to use put_user here? Something like
>
> static int prctl_get_tasksize(unsigned long __user *uaddr)
> {
>         return put_user(TASK_SIZE, uaddr) ? -EFAULT : 0;
> }

What would be the benefit of using put_user() over copy_to_user() in
this context?

  reply	other threads:[~2019-05-02 21:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-02 20:52 [PATCH v2 0/2] sys/prctl: expose TASK_SIZE value to userspace Joel Savitz
2019-05-02 20:52 ` [PATCH v2 1/2] kernel/sys: add PR_GET_TASK_SIZE option to prctl(2) Joel Savitz
2019-05-02 21:09   ` Cyrill Gorcunov
2019-05-02 21:46     ` Joel Savitz [this message]
2019-05-03  8:31       ` Cyrill Gorcunov
2019-05-03 11:31         ` David Laight
2019-05-02 21:24   ` Rafael Aquini
2019-05-02 21:49   ` Yury Norov
2019-05-02 20:52 ` [PATCH v2 2/2] prctl.2: Document the new PR_GET_TASK_SIZE option Joel Savitz
2019-05-02 22:23   ` Yury Norov
2019-05-03  1:49     ` Rafael Aquini
2019-05-02 21:01 ` [PATCH v2 0/2] sys/prctl: expose TASK_SIZE value to userspace Waiman Long
2019-05-02 21:10   ` Cyrill Gorcunov
2019-05-02 21:22     ` Joel Savitz
2019-05-02 21:34       ` Yury Norov
2019-05-02 21:26 ` Rafael Aquini

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=CAL1p7m6eC3-99oFEyp0F1xn7qN4Vx+s-kHQXh14cMUWoVFqbWw@mail.gmail.com \
    --to=jsavitz@redhat.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=aquini@redhat.com \
    --cc=gorcunov@gmail.com \
    --cc=gustavo@embeddedor.com \
    --cc=jannh@google.com \
    --cc=keescook@chromium.org \
    --cc=kristina.martsenko@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mchehab+samsung@kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=mortonm@chromium.org \
    --cc=mtk.manpages@gmail.com \
    --cc=norov.maillist@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=yang.shi@linux.alibaba.com \
    --cc=yuehaibing@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.