Is this LOST??

From: Deng XueFeng (dsnofe_at_hotmail.com)
Date: 05/02/04

  • Next message: Julian H. Stacey: "Re: Accessing (the i4b) device driver"
    Date: Sun, 02 May 2004 13:26:13 +0800
    To: freebsd-hackers@freebsd.org
    
    
    

    I found the htonl implemention in libc for i386 is not sync with the
    kern.

    sys use bswap for swaping the int. but libc still use xchg.
    IS THIS LOST?

    Here is the patches.
    ----------------------------CUT HERE------------------------
    --- /usr/src/lib/libc/i386/net/htonl.S.orig Sun May 2 12:13:13 2004
    +++ /usr/src/lib/libc/i386/net/htonl.S Sun May 2 12:22:02 2004
    @@ -46,7 +46,5 @@
             .set CNAME(htonl),CNAME(__htonl)
     ENTRY(__htonl)
             movl 4(%esp),%eax
    - xchgb %al,%ah
    - roll $16,%eax
    - xchgb %al,%ah
    + bswap %eax
             ret
    -----------------------------END HERE----------------------
    ----------------------------CUT HERE------------------------
    --- /usr/src/lib/libc/i386/net/ntohl.S.orig Sun May 2 12:13:21 2004
    +++ /usr/src/lib/libc/i386/net/ntohl.S Sun May 2 12:19:16 2004
    @@ -46,7 +46,5 @@
             .set CNAME(ntohl),CNAME(__ntohl)
     ENTRY(__ntohl)
             movl 4(%esp),%eax
    - xchgb %al,%ah
    - roll $16,%eax
    - xchgb %al,%ah
    + bswap %eax
             ret
    -----------------------------END HERE----------------------

    Sincerely,
    Deng XueFeng

    
    
    
    

    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"




  • Next message: Julian H. Stacey: "Re: Accessing (the i4b) device driver"

    Relevant Pages

    • Re: Two copies of resolver routines in libc ?
      ... the resolver functions in getaddrinfo.c has some addition of ... Hide the internal functions from outside of libc. ... +extern int ...
      (freebsd-net)
    • Re: #include vs. -l
      ... applied, such as char being passed as int, and so on. ... both a header and a library link: ... and aren't stored in libc. ... libraries... ...
      (comp.lang.c.moderated)
    • Re: Defining an alias
      ... int __declspecSomeNewName ... The alias attribute causes the declaration to be emitted as an alias for ... weak symbols are used in libraries (libc especially) to provide a function ... So you can call a non-stdc function like fork() ...
      (comp.lang.c)
    • [SA-03] Example of Grsecurity protection avoid.
      ... I'm proud to introduce an example of return into libc exploit which works though grsecurity patch protection. ... char *uts; ... register int pid; ...
      (Bugtraq)
    • Re: Gforth execvp interface
      ... (Run external UNIX application: switch, launch, call) ... libc execvp ptr ptr (int) execvp ... libc vfork vfork ...
      (comp.lang.forth)