setcred(): Remove an optimization for when cr_groups[0] was the egid
Because setcred() has (always) treated the effective GID separately from
the supplementary groups, when cr_groups[0] was storing the effective
GID, it internally needed to build an array containing both the
effective GID and the specified supplementary groups to eventually call
crsetgroups_internal().
As kern_setcred() was only used to actually implement
user_setcred()/sys_setcred(), which need to allocate a buffer to copy in
the userland groups array into, some optimization was put in place where
these would allocate an array with one more element than
'wc_supp_groups', copyin() the latter into the subarray starting at
index 1 and pass the pointer to the whole array to kern_setcred() in
'preallocated_groups'. This would allow kern_setcred() not to have to
allocate memory again to make room for the additional effective GID.
Since commit be1f7435ef21 ("kern: start tracking cr_gid outside of
cr_groups[]"), crsetgroups_internal() only takes supplementary groups,
[8 lines not shown]
mdo(1): Avoid calling getgroups() in some unnecessary cases
If the basis for supplementary groups are the current ones, we do not
need to fetch them when they are to be replaced entirely (which we
already have been doing), as in the '!start_from_current_groups' case,
but specifically also when they are not going to be touched at all.
This change in passing makes the modified code block's comment saying
that SETCREDF_SUPP_GROUPS need not be set here correct.
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53771
handbooks: Add Accessibility Handbook
The Accessibility Handbook describes the assistive technologies
available in the base system and in the Ports Collection.
Currently, it covers features useful for visual impairments.
Reviewed by: pauamma_gundo.com
Approved by: carlavilla
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50894
irdma(4): fix potential memory leak on qhash cqp operation
It was found that in some circumstances when launching
non-waiting create qhash cqp operation the refcount on
the cqp_request may be not properly decremented leading to a memory
leak.
Signed-off-by: Bartosz Sobczak <bartosz.sobczak at intel.com>
Reviewed by: anzhu_netapp.com
Tested by: mateusz.moga_intel.com
Approved by: kbowling (mentor)
MFC after: 1 week
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D53732
cxgbe: Fix the RSS build
When "options RSS" is configured, opt_rss.h defines the "RSS" token.
PR: 291068
Fixes: 17b4a0acfaf5 ("cxgbe(4): T7 related updates to shared code")
vm_object_page_remove(): clear pager even if there is no resident pages
Swap pager might still carry the data.
Debugging help from: mmel
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D53891