Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump version #27

Merged
merged 48 commits into from Feb 22, 2022
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
6afb78f
multipathd.service: remove LimitCORE=infinity directive
mwilck Dec 7, 2021
e90c387
multipathd.service: don't load SCSI device handler modules
mwilck Dec 7, 2021
11f0440
multipathd.service: add dependency on initrd-cleanup.service
mwilck Dec 7, 2021
7b251a0
multipathd.service: drop dependencies on iscsi and iscsid
mwilck Dec 7, 2021
cc18bab
libmultipath: embed dm_info in multipath structure
bmarzins Dec 15, 2021
67c86ad
multipathd: update dm_info on multipath change events
bmarzins Dec 15, 2021
6e40bf9
multipathd: avoid unnecessary path read-only reloads
bmarzins Dec 15, 2021
54e7ed6
libmpathpersist: split public and internal API
mwilck Dec 15, 2021
2f7fc4f
multipathd: remove duplicate definitions from main.h
mwilck Dec 16, 2021
ac8da60
libmpathpersist/multipathd: remove duplicate definition
mwilck Dec 16, 2021
e179cb8
libmpathpersist: remove __STDC_FORMAT_MACROS
mwilck Dec 16, 2021
e608144
libmpathpersist: cleanup mpathpr.h
mwilck Dec 16, 2021
69d5e81
multipath-tools: fix misspellings
xosevp Dec 18, 2021
1834dc4
libmultipath: fix DI_NOIO pathinfo PATH_PENDING handling
bmarzins Dec 23, 2021
5c88969
libmultipath: simplify out __set_no_path_retry()
bmarzins Dec 23, 2021
7278108
libmultipath: don't enter recovery mode with pending paths
bmarzins Dec 23, 2021
dd6338d
libmultipath.version: bump major version
mwilck Dec 23, 2021
a220dd1
build: don't compress man pages
thesamesam Jan 3, 2022
c54d933
multipath-tools: remove duplicate headers
xosevp Jan 4, 2022
2316566
kpartx/devmapper.c: fix unused-but-set variable error
trofi Jan 9, 2022
be16f42
kpartx/devmapper.c: fix unused variable error
trofi Jan 9, 2022
921fabd
multipath-tools: autodiscover libdevmapper.h headers
trofi Jan 9, 2022
1017d59
multipath-tools: autodiscover libudev.h headers
trofi Jan 9, 2022
193455b
multipath-tools: allow passing non-standard linux-headers location
trofi Jan 9, 2022
02bc889
multipath-tools: avoid using GZIP Makefile variable
trofi Jan 9, 2022
353419e
libmultipath: fix disassemble status for historical-service-time PS
bmarzins Jan 18, 2022
ad16d0b
libmultipath: make helper function to trigger path uevents
bmarzins Jan 18, 2022
9b634e8
multipathd: trigger udev change on path addition
bmarzins Jan 18, 2022
378932f
libmultipath: use asprintf() to allocate prefixed_uuid
bmarzins Jan 26, 2022
1ef4541
multipath/Makefile: use $(udevrulesdir)
mwilck Feb 1, 2022
41d0b66
multipath-tools: Makefile.inc: delete obsolete comment
mwilck Feb 1, 2022
92f0893
multipath-tools: install modules-load.d/multipath.conf
mwilck Feb 1, 2022
a1eabea
multipathd.service: drop ExecStartPre for loading dm-multipath
mwilck Feb 1, 2022
2159f76
multipath: Makefile: modules-load.d file for SCSI device handlers
mwilck Feb 1, 2022
5e5e51c
README.md: add basic information about building multipath-tools
mwilck Feb 1, 2022
544c4f4
libmultipath: hwtable: use ALUA for all LIO targets
mwilck Feb 2, 2022
4f50e0e
kpartx.rules: skip MD devices
mwilck Feb 7, 2022
cfff03e
multipathd: handle fpin events
muneendramandala Feb 10, 2022
3af023b
multipathd: disallow changing to/from fpin marginal paths on reconfig
bmarzins Feb 14, 2022
852a1df
libmultipath: support host adapter name lookup for s390x ccw bus
steffen-maier Feb 15, 2022
260d7cb
libmultipath: add %L path wildcard for 64-bit hex LUN
steffen-maier Feb 15, 2022
1a2f329
libmultipath: fix printing native nvme multipath topology.
bmarzins Feb 16, 2022
d11793a
Add missing include <assert.h>
Uglymotha Jan 8, 2022
571f28b
libmultipath: enable linear ordering of bus/proto tuple
mwilck Feb 17, 2022
28fcf23
libmultipath: use bus_protocol_id() in snprint_path_protocol()
mwilck Feb 17, 2022
6ae1b0c
libmultipath: enable defining a static bitfield
mwilck Feb 17, 2022
ac61ccc
libmultipath: only warn once about unsupported dev_loss_tmo
mwilck Feb 17, 2022
fc87ba4
Bump version to 0.8.9
mwilck Feb 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
libmultipath: use asprintf() to allocate prefixed_uuid
gcc 12.0.1 failed building libmultipath due to a format-overflow false
positive on 32-bit architectures.  This isn't so surprising as
format-overflow=2 is very aggressive in the assumptions it makes about
the arguments.  Here, it assumes that mpp->wwid could take up all the
space that a pointer could point to, even if I add code to this function
to explicitly null terminate mpp->wwid to fit in WWID_SIZE.

To avoid this and simplify the function, switch from using calloc() and
sprintf() to just using asprintf().

For reference, the gcc build error that this fixes is:

devmapper.c: In function 'dm_addmap.constprop.0':
devmapper.h:27:21: error: '%s' directive writing up to 2147483644 bytes into a region of size 2147483641 [-Werror=format-overflow=]
   27 | #define UUID_PREFIX "mpath-"
      |                     ^~~~~~~~
devmapper.c:484:53: note: format string is defined here
  484 |                 sprintf(prefixed_uuid, UUID_PREFIX "%s", mpp->wwid);
      |                                                     ^~

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
  • Loading branch information
bmarzins authored and mwilck committed Jan 26, 2022
commit 378932f296c153c634eaaaf1d6bf6e93ee8e7fc0
5 changes: 1 addition & 4 deletions libmultipath/devmapper.c
Expand Up @@ -473,14 +473,11 @@ dm_addmap (int task, const char *target, struct multipath *mpp,
dm_task_set_ro(dmt);

if (task == DM_DEVICE_CREATE) {
prefixed_uuid = calloc(1, UUID_PREFIX_LEN +
strlen(mpp->wwid) + 1);
if (!prefixed_uuid) {
if (asprintf(&prefixed_uuid, UUID_PREFIX "%s", mpp->wwid) < 0) {
condlog(0, "cannot create prefixed uuid : %s",
strerror(errno));
goto addout;
}
sprintf(prefixed_uuid, UUID_PREFIX "%s", mpp->wwid);
if (!dm_task_set_uuid(dmt, prefixed_uuid))
goto freeout;
dm_task_skip_lockfs(dmt);
Expand Down