Re: Accessing sysctls from kernel

From: Ivan Voras (ivoras_at_fer.hr)
Date: 02/26/04

  • Next message: Mike Tancsa: "Re: Testers needed: Joe's MFC of USB code"
    Date: Thu, 26 Feb 2004 14:42:18 +0100
    To: hackers@freebsd.org
    
    

    Bruce M Simpson wrote:
    > On Thu, Feb 26, 2004 at 02:10:40PM +0100, Ivan Voras wrote:
    >
    >>In sys/sys/sysctl.h I see function kernel_sysctlbyname() that looks (to
    >>me) to be intended for accessing sysctl values from kernel, but for it's
    >>first parameter it requires a struct thread *td.

    >
    > You could try lying about which thread you are, when you aren't in
    > a userland thread:

    Ok, that seems reasonable - I'll try using thread0.

    _______________________________________________
    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: Mike Tancsa: "Re: Testers needed: Joe's MFC of USB code"

    Relevant Pages

    • Re: Accessing sysctls from kernel
      ... On Thu, 26 Feb 2004, Bruce M Simpson wrote: ... >> me) to be intended for accessing sysctl values from kernel, ... the thread exists in the context of a sysctl for several reasons -- ... another is the credential authorizing the change. ...
      (freebsd-hackers)
    • Re: SYN Attacks - how i cant stop it
      ... root# sysctl net.inet.tcp.syncookies=1 ... If you don't have firewall support compiled in the kernel, kldload ipfw. ... To port 80, or 22, or to some any other open port. ...
      (FreeBSD-Security)
    • Re: SYN Attacks - how i cant stop it
      ... root# sysctl net.inet.tcp.syncookies=1 ... If you don't have firewall support compiled in the kernel, kldload ipfw. ... To port 80, or 22, or to some any other open port. ...
      (freebsd-questions)
    • Re: mm snapshot broken-out-2007-01-26-00-36.tar.gz uploaded
      ... out an appropriate error message. ... wasn't thinking so much about whether it was a sysctl or not. ... What's the current advice on what kernel interface to use for this scenario: ...
      (Linux-Kernel)
    • Re: Automatic Configuration of a Kernel
      ... This patch is pointless without other kernel magic to guarantee that ... Guess it's time to re-post my sysctl patch to provide a general-purpose ... the size of the user buffer ...
      (Linux-Kernel)