linux/lib/strncpy_from_user.c
<<
>>
Prefs
   1#include <linux/module.h>
   2#include <linux/uaccess.h>
   3#include <linux/kernel.h>
   4#include <linux/errno.h>
   5
   6#include <asm/byteorder.h>
   7#include <asm/word-at-a-time.h>
   8
   9#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
  10#define IS_UNALIGNED(src, dst)  0
  10#define IS_UNALIGNED(src, src, (   5

	  
 /*prefs();lass="line" name="L5">   5

	  
  * Do a ame="L5, jax+*" length of ameing without s="al '\0'.prefs();lass="line" name="L5">   5

	  
  * 'count' is the -supplied count (jax+*" 'count' if weprefs();lass="line" name="L5">   5

	  
  * hit it), 'max' is the address butce maximum (and we jax+*"prefs();lass="line" name="L5">   5

	  
  * -EFAULT if we hit it).prefs();lass="line" name="L5">   5

	  
  */prefs();lass="line" name="L5">   5
(   5ef">src,    5GNED"char *ode=src" class="sref">src, ef">src, GNED *ode=src" class=S_UNALIGNED(((   5
   5
((COT_A_TIME_UNASTANT_HAVE_EFFICIENT_WOR>COT_A_TIME_UNASTANT_L3" ss="fref">linux/module.h>
linux/module.h>
   5

	  
 /*prefs();lass="line" name="L5">   5

	  
          * Truncate 'max' to the -specified limit, so thatprefs();lass="line" name="L5">   5

	  
          * we only have one limit we need to check in the loopprefs();lass="line" name="L5">   5

	  
          */prefs();lass="line" name="L5">   5
ImaxNALIGNED((   5
ImaxNALIGNED((linux/uaccess.h>
   5
I  10#define IS_UNALIGNED(src,    5
(linux/uaccess.h>
   5
ImaxNALIGNED(   5
(src, linux/uaccess.h>
   5

	  
 /* Fall back to /byta-time.h"  if we get a page fault */prefs();lass="line" name="L5">   5
Iunfrkelyef">src, I__get5ef">src, GNED" class="sref">IUNALIGNED(ef">src, GNED *)" class="sref">IS_UNALIGNED(   5
linux/kernel.h>
I"sref">src, (linux/kernel.h>
Ihas_zeroNALIGNED(IUNALIGNED(src, (   5
src, src, IUNALIGNED(src, (linux/kernel.h>
src, src, I"ataef">src, linux/kernel.h>
(I"ataef">src, linux/kernel.h>
linux/kernel.h>
IresHAVE_EFFICIENT_resL3"  += sizeof(unsigned long)ass="fref">linux/errno.h>
ImaxNALIGNED(linux/errno.h>
linux/kernel.h>
   5
(   5
ImaxNALIGNED(   5
(linux/kernel.h>
   5
Iunfrkelyef">src, I__get5ef">src, GNED" class="sref">IUNALIGNED(IS_UNALIGNED(   5
linux/kernel.h>
I"sref">src, (linux/kernel.h>
(   5
linux/kernel.h>
IresHAVE_EFFICIENT_resL3" ++ss="fref">linux/kernel.h>
ImaxNALIGNED(linux/kernel.h>
linux/kernel.h>
   5

	  
 /*prefs();lass="line" name="L5">   5

	  
          * Uhhuh. We hit 'max'. But was that the -specified maximumprefs();lass="line" name="L5">   5

	  
          * too? If so, that's ok - we got as much as the  asked for.prefs();lass="line" name="L5">   5

	  
          */prefs();lass="line" name="L5">   5
IresHAVE_EFFICIENT_resL3"  "fal= ode=src" class=countNALIGNED(   5
linux/kernel.h>
   5

	  
 /*prefs();lass="line" name="L5">   5

	  
          * Nope: we hit the address butce limit, and we still had moreprefs();lass="line" name="L5">   5

	  
          * characters the calla> would have wanted. That's ttoEFAULT.prefs();lass="line" name="L5">   5

	  
          */prefs();lass="line" name="L5">   5
linux/kernel.h>
linux/kernel.h>
   5

	  
 /**prefs();lass="line" name="L5">   5

	  
  * ame="L5">   5: - Copy a NUL terminated ameing >    butce.prefs();lass="line" name="L5">   5

	  
  * @ hr:   Destinat >
 address, in x/kern butce.  This buffa> must be atprefs();lass="line" name="L5">   5

	  
  *         least @count /byts long.prefs();lass="line" name="L5">   5

	  
  * @ hr:   Source address, in  butce.prefs();lass="line" name="L5">   5

	  
  * @count: Maximum numba> of /byts to coL5, de/asming the trailing NUL.prefs();lass="line" name="L5">   5

	  
  *prefs();lass="line" name="L5">   5

	  
  * Copits a NUL-terminated ameing >    butce to x/kern butce.prefs();lass="line" name="L5">   5

	  
  *prefs();lass="line" name="L5">   5

	  
  * On suacces, jax+*"s the length of the ameing (not de/asming the trailingprefs();lass="line" name="L5">   5

	  
  * NUL).prefs();lass="line" name="L5">   5

	  
  *prefs();lass="line" name="L5">   5

	  
  * If uacces to butce fails, jax+*"s -EFAULT (some  ata may have bee"prefs();lass="line" name="L5">   5

	  
  * copitd).prefs();lass="line" name="L5">   5

	  
  *prefs();lass="line" name="L5">   5

	  
  * If @count is smalla> than the length of the ameing, copits @count /bytsprefs();lass="line" name="L5">   5

	  
  * and jax+*"s @count.prefs();lass="line" name="L5">   5

	  
  */prefs();lass="line" name="L5">   5
   5ef">src,    5GNED"char *ode=src" class="sref">src, ef">src, GNED *ode=src" class=S_UNALIGNED((   5
   5
((linux/kernel.h>
   5
Iunfrkelyef">src, IcountNALIGNED(linux/module.h>
   5
(_addr_maxNALIGNED(_addr_maxGNED")ass="fref">linux/errno.h>
((linux/errno.h>
Ifrkelyef">src, I hr_addrNALIGNED((   5
(((linux/kernel.h>
   5ef">src,    5GNED"ode=src" class="sref">src, (IcountNALIGNED(ImaxNALIGNED(linux/kernel.h>
linux/kernel.h>
linux/kernel.h>
linux/kernel.h>
I me="L5">   5ef">src,    5GNED)ss="fref">linux/kernel.h>
lhttp://sourceforge.net/projects/lx>e>LXR cd-aunityef="+cst"  experia	 >al va>b >
 by ="fref">lmailto:lx>@le/li.no@le/li.noef=".
ass="serch_rtrncpy_subfoota>e>
fx>.le/li.no kindly hosted by ="fref">lhttp://www.redpill-le/pro.no