From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by befuddled.reisers.ca (Postfix, from userid 65534) id 0897A1EF6B4; Fri, 19 Jul 2013 01:51:46 -0400 (EDT) Received: from jdc.jasonjgw.net (jdc.jasonjgw.net [IPv6:2001:44b8:412f:6e00::2]) by befuddled.reisers.ca (Postfix) with ESMTPS id 12A7E1EF56E for ; Fri, 19 Jul 2013 01:51:46 -0400 (EDT) Received: by jdc.jasonjgw.net (Postfix, from userid 1000) id A618C18063597; Fri, 19 Jul 2013 15:51:30 +1000 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=jasonjgw.net; s=mail; t=1374213090; bh=2sOSNvaMvY0x/CkHfQGTem+aN/Y61OGl+cnbsSJZzC4=; h=Date:From:To:Subject:References:In-Reply-To; b=UxJEfgh2PA53sLTi7kMygwzNXRVBEyIYytt+e61NLWaovFflPxlJfXBCkVX0WqkS3 7FWuRIdQcqf8vz0BLtXqzrLbEWNh2J1U1ds4wvxG8lHt+8r44d0Ba9Oyrd3m2halsi TidAwQDujbt6spUznpz8qe24DP8VbUeplZPadcDE= Date: Fri, 19 Jul 2013 15:51:30 +1000 From: Jason White To: speakup@linux-speakup.org Subject: Re: OT: kernel oops Message-ID: <20130719055130.GA13329@jdc.jasonjgw.net> References: <0d30e6e5-261e-47e0-b5da-2ce5fe6bad24@default> <87mwpjx3ae.fsf@mushroom.PK5001Z> <20130718234302.GA7934@jdc.jasonjgw.net> <481c693b-a8bb-4700-baca-6e4a44fc23d6@default> <20130719013418.GA8869@jdc.jasonjgw.net> <8d1e7965-5bfe-4739-97a9-f483a615ca23@default> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8d1e7965-5bfe-4739-97a9-f483a615ca23@default> User-Agent: Mutt/1.5.21 (2010-09-15) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-BeenThere: speakup@linux-speakup.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: "Speakup is a screen review system for Linux." List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jul 2013 05:51:47 -0000 Don Raikes wrote: > Ok so I get it, but the problem is that I am hooking into the sys_write systemcall, and it is by default cast to a const. > > If I leave it as is, and cast the buf in my copy_to_user to a (char*) should that work? > Try (void __user *) which according to Linux Device Drivers is the correct type for copy_to_user. > Sorry my knowledge of c is very limited :) I would suggest reading a good book on the subject in that case. A good knowledge of C is a prerequisite for what you are doing.