* [PATCH] dmsetup: fix 'dmsetup status' for crypt filling '0' in wrong area
@ 2007-04-20 16:07 Jun'ichi Nomura
2007-06-04 16:21 ` dmeventd - High level documentation, any kind of design documents Wood, Brian J
0 siblings, 1 reply; 2+ messages in thread
From: Jun'ichi Nomura @ 2007-04-20 16:07 UTC (permalink / raw)
To: device-mapper development, Alasdair Kergon
[-- Attachment #1: Type: text/plain, Size: 438 bytes --]
Hi,
dmsetup tries to suppress encryption key of crypt target in the table
by filling '0' in params buffer.
However, the code assumes the case for showing table only and will
fill '0' beyond the params buffer when it's showing status, where
the params is "".
The patch fixes it.
The suppression is not necessary for showing status as
no encryption key is included in status line.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
[-- Attachment #2: dmsetup-status-crypt-suppression-bug.patch --]
[-- Type: text/x-patch, Size: 866 bytes --]
dmsetup tries to suppress encryption key of crypt target.
However, the code overruns the params buffer if the command
is showing 'status', in that case params is "".
---
dmsetup/dmsetup.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: device-mapper.work/dmsetup/dmsetup.c
===================================================================
--- device-mapper.work.orig/dmsetup/dmsetup.c
+++ device-mapper.work/dmsetup/dmsetup.c
@@ -964,12 +964,14 @@ static int _status(int argc, char **argv
if (target_type) {
/* Suppress encryption key */
- if (!_switches[SHOWKEYS_ARG] &&
+ if (cmd == DM_DEVICE_TABLE &&
+ !_switches[SHOWKEYS_ARG] &&
!strcmp(target_type, "crypt")) {
c = params;
while (*c && *c != ' ')
c++;
- c++;
+ if (*c)
+ c++;
while (*c && *c != ' ')
*c++ = '0';
}
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread* dmeventd - High level documentation, any kind of design documents
2007-04-20 16:07 [PATCH] dmsetup: fix 'dmsetup status' for crypt filling '0' in wrong area Jun'ichi Nomura
@ 2007-06-04 16:21 ` Wood, Brian J
0 siblings, 0 replies; 2+ messages in thread
From: Wood, Brian J @ 2007-06-04 16:21 UTC (permalink / raw)
To: device-mapper development, Alasdair Kergon
Hello, I was wondering if there were any kinds of design documents,
etc... types of notes on how the device mapper event daemon was
thought-up/designed? Or if anyone is working on documentation?
From what I've gathered so far (by reading the code) is that dmeventd is
designed around a plug-in type model (and that LVM has a plugin for this
that I could possibly trace through to see how this all works). Also,
I've dug in enough to see that error event handling and failure handling
for dmraid is not implemented (correct me if I'm wrong, please :) ) and
that there is some very simple event handling for LVM (just userspace
mirroring from what I've found)?
Ideally what I would like to help out with is developing a shared
library for the dmeventd daemon for dmraid so events could be reported
for the various raid levels. From what I understand Jonathan Brassow did
the initial work on dmeventd and might be my best resource in finding
implementation details.
Until I can put together a High-Level document that management can
understand about dmeventd's current functionality I'm sort of in a catch
22...I am being tasked with adding functionality to this project, but
can't start working until they know what is currently there and how it
was designed. Any help with guidance would be greatly appreciated.
Brian Wood
Intel Corporation
Digital Enterprise Group
Manageability & Platform Software Division
brian.j.wood@intel.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-04 16:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-20 16:07 [PATCH] dmsetup: fix 'dmsetup status' for crypt filling '0' in wrong area Jun'ichi Nomura
2007-06-04 16:21 ` dmeventd - High level documentation, any kind of design documents Wood, Brian J
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.