Kernel Newbies archive on lore.kernel.org
 help / color / Atom feed
From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: Richard Sailer <richard_siegfried@systemli.org>
Cc: kernelnewbies <Kernelnewbies@kernelnewbies.org>
Subject: Re: Dubios pointer casting with put_user()
Date: Sun, 19 Jul 2020 18:50:47 -0400
Message-ID: <223952.1595199047@turing-police> (raw)
In-Reply-To: <8de3b54c-8731-4be1-3e69-228d99bc4384@systemli.org>

[-- Attachment #1.1: Type: text/plain, Size: 422 bytes --]

On Sun, 19 Jul 2020 14:15:36 +0200, Richard Sailer said:

> > If that were true, you wouldn't need to pass the 'amount' variable....
> >
> Hmm, that would make no sense to me. arg is a pointer to user space
> memory, put_user would still need the value to copy to that memory.

-ENOCAFFEINE. :)

I was thinking copy_(to/from)_user, not get/put.

I will now depart for the grocery store and obtain a supply of caffeine :)


[-- Attachment #1.2: Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

      reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17  0:13 Richard Sailer
2020-07-17  0:19 ` Richard Sailer
2020-07-17 22:46 ` Valdis Klētnieks
2020-07-19 12:15   ` Richard Sailer
2020-07-19 22:50     ` Valdis Klētnieks [this message]

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=223952.1595199047@turing-police \
    --to=valdis.kletnieks@vt.edu \
    --cc=Kernelnewbies@kernelnewbies.org \
    --cc=richard_siegfried@systemli.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

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org
	public-inbox-index kernelnewbies

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git