lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <87ire7af4v.fsf@bonsai.taydin.org>
Date:	Mon, 12 Feb 2007 11:39:44 +0200
From:	Timur Aydin <ta@...din.org>
To:	linux-kernel@...r.kernel.org
Subject: Adjusting destination pointer with copy_to_user

Hi,

I am passing a packet consisting of a fixed length header and a
variable length data block to a user mode application. The user mode
application passes the pointer of its buffer with an ioctl call
(buff_ptr). When the driver receives buff_ptr, it makes two calls to
pass the packet to user mode:

copy_to_user(buff_ptr, header, header_size);
copy_to_user(buff_ptr + header_size, data, data_size);

Is this a valid usage? Or can I only use buff_ptr here?

Timur
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ