> /* > * return number of characters in a userland address string > * or -1 if an illegal access occurs. > */ > int > user_strlen(uaddr) > char *uaddr; > { > int ret; > > ret = -1; > do { > ch = fubyte(uaddr); > ret++; > } while (ch != 0 && ch != -1); > > return (ch == -1 ? -1 : ret); > } Then I don't get it. Won't this piece of code cycle forever fetching first byte of the string again and again ? According to fetch(9) fubyte() doesn't change uaddr, or am I missing something again ? Am I allowed to do uaddr++ for userspace addresses in such a case ? Regards, Eugene To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
- Re: Some questions about kernel programming Greg Lehey
- Re: Some questions about kernel programming Alfred Perlstein
- Re: Some questions about kernel programming Terry Lambert
- Re: Some questions about kernel programming Sergey Babkin
- Re: Some questions about kernel programming Eugene L. Vorokov
- Re: Some questions about kernel programming Alfred Perlstein
- Re: Some questions about kernel programming Brian Somers
- Re: Some questions about kernel programming Brian Somers
- Re: Some questions about kernel programming Eugene L. Vorokov
- Re: Some questions about kernel programming Alfred Perlstein
- Re: Some questions about kernel programming Eugene L. Vorokov
- Re: Some questions about kernel programming Drew Eckhardt
- Re: Some questions about kernel programming Alfred Perlstein