| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Reported by: clang scan-build
|
|
|
|
| |
For example, it made gpart partitions without label report "1" as label.
|
|
|
|
|
|
|
| |
libgeom: plug memory leak in EndElement.
CID: 1016696
Found by: Clang static checker
|
| |
|
|
|
|
| |
Explicitly specify MAP_SHARED when mapping the stats file descriptor.
|
|
|
|
|
|
|
|
|
| |
kern.geom.confxml sysctl, it's silly to warn about tags in libgeom,
especially since libgeom exists simply to build a tree out of the conf
information.
Obtained from: Netflix
MFC after: 3 days
|
|
|
|
|
|
| |
from r233646 first.
Pointed out by: jmallett
|
|
|
|
|
|
| |
This improves compatibility when running an ILP32 binary on LP64 kernel.
Spotted by: gjb
|
|
|
|
|
|
|
| |
- Abort parsing and return an error if we run out of memory.
- Return EILSEQ from geom_xml2tree() for XML syntax errors.
Silence on: freebsd-geom
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compatibility, it broke programs using devstat, under 32-bit compatibility and
not.
It's very difficult to fix the identifiers used by devstat, so this change is
simply being backed out. Since changes to 3rd-party code seem likely, and may be
necessary to properly fix 32-bit binaries on 64-bit kernel, it would seem better
to make more invasive changes to fix GEOM's problems with 32-bit compatibility in
general.
The right thing to do is to replace all of the use of pointers as opaque
identifiers with a fixed-size (64-bit or even 32-bit should be enough for tracking
unique GEOM elments) field. That probably maintains source compatibility with
most GEOM consumers, and allows xml2tree to make better assumptions about how to
decode the identifiers.
Submitted by: Anton Yuzhaninov
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kernel pointer values are used as opaque unique identifiers, which are then
used to reconstruct references between various providers, classes, etc., inside
libgeom from the source XML. Unfortunately, they're converted to pointer-width
integers (in the form of pointers) to do this, and 32-bit userland pointers
cannot hold sensible representations (however opaque) of 64-bit kernel pointers
on all systems.
In the case where the leading bits are zero and 32 distinct bits of pointer can
be identified, this will happen to work. On systems where the upper 32-bits of
kernel pointers are non-zero and the same for all kernel pointers, this will
result in double frees and all kinds of bizarre crashes and linkage between
objects inside libgeom.
To mitigate this problem, treat the opaque identifiers in the XML as C strings
instead, and internalize them to give unique and consistent per-object pointer
values in userland for each identifier in the XML. This allows us to keep the
libgeom logic the same with only minor changes to initial setup and parsing.
It might be more sensible for speed reasons to treat the identifiers as numbers
of a large size (uintmax_t, say) rather than strings, but strings seem fine for
now.
(As an added side-effect, this makes it slightly easier to identify unresolved
references, but nothing has been added to inform the user of those.)
|
|
|
|
| |
PR: 151252
|
|
|
|
| |
is now used by both gctl_ro_param() and gctl_rw_param().
|
|
|
|
| |
- Prefer 'unsigned int' over 'u_int' in userland code.
|
|
|
|
|
|
|
| |
error conditions.
Submitted by: Mark Johnston <mjohnston at sandvine dot com>
MFC after: 2 weeks
|
|
|
|
|
|
| |
translating these manual pages. Minor corrections by me.
Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
|
|
|
|
|
|
| |
be offset, not size).
Submitted by: pluknet at gmail com
|
|
|
|
|
|
| |
utilities.
Reviewed by: pjd, mav (earlier version)
|
| |
|
| |
|
|
|
|
|
|
| |
g_providername utility functions.
Approved by: kib (mentor)
|
|
|
|
|
|
|
|
| |
- Add a routine for looking up a device and checking if it is a valid geom
provider given a partial or full path to its device node.
Reviewed by: phk
Approved by: pjd (mentor)
|
|
|
|
|
|
|
| |
completely dynamic sbuf.
Obtained from: Varnish
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Fix a number of potential memory leaks in libgeom related to doing realloc
without freeing old pointer if things go wrong.
- Fix a number of places in libgeom where malloc and calloc return values
were not checked.
- Check malloc return value and provide sufficient warning messages when XML
parsing fails.
PR: kern/83464
Submitted by: Dan Lukes <dan - at - obluda.cz>
Approved by: kib (mentor)
|
|
|
|
|
| |
PR: docs/124561
Submitted by: Sam Banks
|
| |
|
| |
|
|
|
|
|
|
| |
with GEOM providers.
OK'ed by: phk
|
|
|
|
|
|
|
|
|
|
|
| |
needed to hold the GEOM tree. At this point, pointer 'p' has an improper
value (as it was used previously), and we're getting EFAULT. Fix this
functionality by passing NULL instead of 'p'.
This fixes mdconfig(8) -l output with high number of md(4) devices.
Found by: kris
Reviewed by: phk
|
| |
|
|
|
|
| |
Spotted by: marcus
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Add DECL wrappers to libgeom.h.
- Rename structure members in libgeom.h to use a lg_ prefix for member
names. This is required because a few structures had members named
'class' which made g++ very unhappy.
- Catch gstat(8) and gconcat(8) up to these API changes.
Reviewed by: phk
|
|
|
|
| |
Noticed by: jhb
|
|
|
|
|
| |
Submitted by: le
Tweaks by: phk
|
| |
|
|
|
|
|
|
| |
binaries in /bin and /sbin installed in /lib. Only the versioned files
reside in /lib, the .so symlink continues to live /usr/lib so the
toolchain doesn't need to be modified.
|
|
|
|
| |
OK'ed by: phk
|
| |
|
|
|
|
| |
the first time.
|
|
|
|
|
| |
Reviewed by: phk
Approved by: re (scottl)
|
|
|
|
| |
just makes our own life harder.
|
|
|
|
|
|
|
| |
Use prefix gctl_ systematically.
Add flag with access perms for each argument.
Add ro/rw versions of argument building functions.
General cleanup.
|
| |
|
| |
|
|
|
|
| |
Improve a diagnostic printf.
|
| |
|
| |
|
|
|
|
| |
use .Fn there appropriate
|
| |
|