Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: projects/ngrou…

Jun 19, 2009

  1. Brooks Davis

    Use insertion sort of sort supplemental groups in crsetgroups(). Take

    advantage of this an reimplement groupmember() as a test against
    cr_group[0] followed by a binary search of the supplemental groups.
    Seems to work in trivial testing.
    brooksdavis authored
  2. Brooks Davis

    Document crcopysafe() and crsetgroups().

    Reminded by:	julian
    brooksdavis authored
  3. Brooks Davis

    MFH r194301-194502

    brooksdavis authored
  4. Brooks Davis

    Rework the credential code to support larger values of NGROUPS and

    NGROUPS_MAX, eliminate ABI dependencies on them, and raise the to 1024
    and 1023 respectively.  (Previously they were equal, but under a close
    reading of POSIX, NGROUPS_MAX was defined to be too large by 1 since it
    is the number of supplemental groups, not total number of groups.)
    
    The bulk of the change consists of converting the struct ucred member
    cr_groups from a static array to a pointer.  Do the equivalent in
    kinfo_proc.
    
    Introduce new interfaces crcopysafe() and crsetgroups() for duplicating
    a process credential before modifying it and for setting group lists
    respectively.  Both interfaces take care for the details of allocating
    groups array. crsetgroups() takes care of truncating the group list
    to the current maximum (NGROUPS) if necessary.  In the future,
    crsetgroups() may be responsible for insuring invariants such as sorting
    the supplemental groups to allow groupmember() to be implemented as a
    binary search.
    
    Because we can not change struct xucred without breaking application
    ABIs, we leave it alone and introduce a new XU_NGROUPS value which is
    always 16 and is to be used or NGRPS as appropriate for things such as
    NFS which need to use no more than 16 groups.  When feasible, truncate
    the group list rather than generating an error.
    
    Minor changes:
      - Reduce the number of hand rolled versions of groupmember().
      - Do not assign to both cr_gid and cr_groups[0].
      - Modify ipfw to cache ucreds instead of part of their contents since
        they are immutable once referenced by more than one entity.
    
    Submitted by:	Isilon Systems (initial implementation)
    X-MFC after:	never
    PR:		bin/113398 kern/133867
    brooksdavis authored
  5. When running pkg_add -r, check & install our dependencies for each

    package rather than expecting our top level package to get all of
    the dependencies correct.
    
    Previously, the code depended on the top level package having all
    of the pkgdep lines in +CONTENTS correct and in the right order,
    but that doesn't always happen due to code such as this (in
    security/gnutls/Makefile):
    
        .if (defined(WITH_LZO) || exists(${LOCALBASE}/lib/liblzo2.so)) && !defined(WITHOUT_LZO)
        LIB_DEPENDS+=           lzo2:${PORTSDIR}/archivers/lzo2
        ....
    
    With such conditional dependencies, my 'sophox-packages' package won't
    install.  The dependency tree looks like this:
    
        sophox-packages
          ...
          x11/gnome2
            x11/gnome-applets
              net/libgweather
                devel/libsoup
                  security/gnutls
                    security/libgcrypt
                      security/libgpg-error
          ...
          x11/gnome2
            archivers/file-roller
              archivers/gtar
                archivers/lzop
                  archivers/lzo2
          ...
    
    gnutls doesn't depend on lzo2 initially, but lzo2 is dragged into the
    mix via other dependencies and is built by the initial 'make'.  The
    subsequent package generation for gnutls adds a pkgdep line for lzo2
    to gnutls' +CONTENTS but the pkgdeps in sophox-packages' +CONTENTS
    has gnutls *before* lzo2.
    
    As a result, sophox-packages cannot install; gnutls fails because lzo2
    is missing, 82 more packages fail because gnutls is missing and the
    whole thing spirals into a super-confusing mess!
    
    MFC after:	3 weeks
    brian authored
  6. Brooks Davis

    In preparation for raising NGROUPS and NGROUPS_MAX, change base

    system callers of getgroups(), getgrouplist(), and setgroups() to
    allocate buffers dynamically.  Specifically, allocate a buffer of size
    sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow).
    
    This (or similar gymnastics) is required for the code to actually follow
    the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime
    and where getgroups may return {NGROUPS_MAX}+1 results on systems like
    FreeBSD which include the primary group.
    
    In id(1), don't pointlessly add the primary group to the list of all
    groups, it is always the first result from getgroups().  In principle
    the old code was more portable, but this was only done in one of the two
    places where getgroups() was called to the overall effect was pointless.
    
    Document the actual POSIX requirements in the getgroups(2) and
    setgroups(2) manpages.  We do not yet support a dynamic NGROUPS, but we
    may in the future.
    
    MFC after:	2 weeks
    brooksdavis authored
  7. Brooks Davis

    When checking if we can write to a file, use access() instead of a

    manual permission check based on stat output.  Also, get rid of the
    executability check since it is not used.
    
    MFC after:	2 weeks
    brooksdavis authored
  8. MFV of r194480

    - Official start of Bangladesh DST.
    edwin authored
  9. The "original" PR said that there were two issues with the motd

    (Eyes of the daemon not synced and the motd not displayed properly
    on black-on-white screens): The first one was not valid anymore
    since the text and logo were swapped already, the second one is
    fixed by resetting the whole colourscheme instead of only the
    background colour.
    
    (also removed svn:keywords from motd since it doesn't have the
     string $FreeBSD$ in it)
    
    PR:		misc/15876
    Submitted by:	peter.jeremy@ALCATEL.COM.AU
    MFC after:	1 week
    edwin authored

Jun 18, 2009

  1. Rui Paulo

    ieee80211_dwds_mcast(): check the correct mbuf ptr after encap.

    rpaulo authored
  2. Fix a deadlock in the getpeername() method for UNIX domain sockets.

    Instead of locking the local unp followed by the remote unp, use the same
    locking model as accept() and read lock the global link lock followed by
    the remote unp while fetching the remote sockaddr.
    
    Reported by:	Mel Flynn  mel.flynn of mailing.thruhere.net
    Reviewed by:	rwatson
    MFC after:	1 week
    jhb authored
  3. Andrew Thompson

    Track the kernel mapping of a physical page by a new entry in vm_page

    structure. When the page is shared, the kernel mapping becomes a special
    type of managed page to force the cache off the page mappings. This is
    needed to avoid stale entries on all ARM VIVT caches, and VIPT caches
    with cache color issue.
    
    Submitted by:	Mark Tinguely
    Reviewed by:	alc
    Tested by:	Grzegorz Bernacki, thompsa
    thompsa authored
  4. Utilize the new function kmem_alloc_contig() to implement the UMA bac…

    …k-end
    
    allocator for the jumbo frames zones.  This change has two benefits: (1) a
    custom back-end deallocator is no longer required.  UMA's standard
    deallocator suffices. (2) It eliminates a potentially confusing artifact
    of using contigmalloc(): The malloc(9) statistics contain bogus information
    about the usage of jumbo frames.  Specifically, the malloc(9) statistics
    report all jumbo frames in use whereas the UMA zone statistics report the
    "truth" about the number in use vs. the number free.
    alc authored
  5. Alexander Kabaev

    Re-do r192913 in less intrusive way. Only do IP_RECVDSTADDR/IP_SENDSR…

    …CADDR
    
    dace for UPDv4 sockets bound to INADDR_ANY. Move the code to set
    IP_RECVDSTADDR/IP_SENDSRCADDR into svc_dg.c, so that both TLI and non-TLI
    users will be using it.
    
    Back out my previous commit to mountd. Turns out the problem was affecting
    more than one binary so it needs to me addressed in generic rpc code in
    libc in order to fix them all.
    
    Reported by:	lstewart
    Tested by:	lstewart
    akabaev authored
  6. Since the width is always 2, it is enough to put just one

    trailing space is enough.
    
    MFC after:	1 week
    ume authored
  7. - Don't hard code _.disk.full. Use the variable.

    - _.bk should be created in MAKEOBJDIRPREFIX as well
    - Remove a misplaced and unnecessary message.
    n_hibma authored
  8. Reverse some stuff I accidentally committed in the previous commit:

    - creation of sparse files to speed up the build process. This was
      discussed with phk 2 years ago and he disagreed with this change.
    - handling of negative data partition sizes.
    
    Can I have the ... green pointy hat, please?
    n_hibma authored
  9. Ivan Voras

    Fix tabs, slightly improve comments.

    Approved by:	gnn (mentor) (original)
    Noticed by:	stas
    ivoras authored
  10. Replace use of ic->ic_flags with vap->iv_flags to operate on per-vap …

    …flags
    
    for ndis 802.11 work.
    
    Submitted by:	Paul B. Mahol <onemda@gmail.com>
    cokane authored
  11. Allow building world into a separate dir (for reuse in multiple images):

    - buildworld and buildkernel are built into MAKEOBJDIRPREFIX
    - installworld and installkernel are performed on NANO_OBJ.
    
    No change of functionality if MAKEOBJDIRPREFIX is not set. If it is sea,t
    clean_world deletes NANO_OBJ instead of NANO_WORLDDIR. By starting nanobsd.sh
    with the -b option the existing world can be reused to build a new world
    reducing time and disk space considerably.
    
    While there:
    - Fix two cases where (in comments) MAKEOBJDIRPREFIX should have been
      NANO_DISKIMGDIR.
    - Simplify an 'if (not wrong); then true; else action; fi' into
      'if wrong; then action; fi'. 'if ! false; then echo hello; fi' produces hello.
    
    Note: Make sure you use NANO_OBJ were you use MAKEOBJDIRPREFIX now in your
    nanobsd.conf files if you want to split out.
    n_hibma authored
  12. Add support for UMA_SLAB_KERNEL to page_free(). (While I'm here remov…

    …e an
    
    unnecessary newline character from the end of two panic messages.)
    alc authored
  13. Fix some of the style errors in *getpages().

    alc authored
  14. Brooks Davis

    Put parens around the definition of NGROUPS to avoid operator precedence

    bugs in code that uses it.
    
    Submitted by:	Matthew Fleming <matthew dot fleming at isilon dot com>
    brooksdavis authored

Jun 17, 2009

  1. Brooks Davis

    crextend() is now only used in kern_prot.c so make it static.

    Remove the inline from crsetgroups_locked() since the compiler should do
    that automagically.
    brooksdavis authored
  2. Brooks Davis

    s/cr_gid/cr_groups[0]/ so we'll remove the cr_gid reference from head.

    brooksdavis authored
  3. Add the SVC_RELEASE(xprt), as required by r194407.

    Approved by:	kib (mentor)
    rmacklem authored
  4. Since svc_[dg|vc|tli|tp]_create() did not hold a reference count on the

    SVCXPTR structure returned by them, it was possible for the structure
    to be free'd before svc_reg() had been completed using the structure.
    This patch acquires a reference count on the newly created structure
    that is returned by svc_[dg|vc|tli|tp]_create(). It also
    adds the appropriate SVC_RELEASE() calls to the callers, except the
    experimental nfs subsystem. The latter will be committed separately.
    
    Submitted by:	dfr
    Tested by:	pho
    Approved by:	kib (mentor)
    rmacklem authored
  5. Jilles Tjoelker

    Properly flush input after an error in backquotes in interactive mode.

    For parsing an old-style backquote substitution (`...`),
    a string "file" is used to store the contents of the
    substitution (with the special backslash processing done).
    If an error occurs, the shell cleans up all these files
    (returning to the top level) and flush the top level
    file. Erroneously, it first flushed the current file and
    then cleaned up all extra files, so that the top level
    file (i.e. the terminal) was not flushed.
    
    Example (in interactive mode):
      echo `for` echo This should not be printed
    
    Also noticeable in (in interactive mode):
      echo `(`
    The old version prints an extraneous prompt.
    
    Approved by:	ed (mentor)
    jillest authored
  6. Brooks Davis

    Use crsetgroups() in crcopy().

    When a user has more than a page worth of groups, switch from power of
    two allocation to allocating the number of pages actually required.  It
    seems more likely that a process will need a non-power-of-two number of
    pages than that they will use many thousands of groups and add them one
    at a time (in which case there would be no difference in number of
    allocations until they use more than 3072 groups and the context switch
    overhead would likely swamp the extra allocations).
    brooksdavis authored
  7. Brooks Davis

    Set cr_groups[0] instead of cr_gid here. They are the same and we use

    cr_groups[0] almost exclusivly.
    brooksdavis authored
  8. Brooks Davis

    We're filling in an xucred so use XU_NGROUPS instead of NGRPS.

    brooksdavis authored
  9. Eliminate unnecessary forward declarations.

    alc authored
  10. Regen.

    jhb authored
  11. Regen for added flags field.

    jhb authored
  12. - Add the ability to mix multiple flags seperated by pipe ('|') chara…

    …cters
    
      in the type field of system call tables.  Specifically, one can now use
      the 'NO*' types as flags in addition to the 'COMPAT*' types.  For example,
      to tag 'COMPAT*' system calls as living in a KLD via NOSTD.  The COMPAT*
      type is required to be listed first in this case.
    - Add new functions 'type()' and 'flag()' to the embedded awk script in
      makesyscalls.sh that return true if a requested flag is found in the
      type field ($3).  The flag() function checks all of the flags in the
      field, but type() only checks the first flag.  type() is meant to be
      used in the top-level "switch" statement and flag() should be used
      otherwise.
    - Retire the CPT_NOA type, it is now replaced with "COMPAT|NOARGS" using
      the flags approach.
    - Tweak the comment descriptions of COMPAT[46] system calls so that they
      say "freebsd[46] foo" rather than "old foo".
    - Document the COMPAT6 type.
    - Sync comments in compat32 syscall table with the master table.
    jhb authored
Something went wrong with that request. Please try again.