* [dm-devel] setting up dmverity using device mapper IOCTLs
@ 2022-09-10 18:46 Pra.. Dew..
2022-09-12 5:55 ` [dm-devel] Location for the definition of dm_task Pra.. Dew..
2022-09-12 13:01 ` [dm-devel] setting up dmverity using device mapper IOCTLs Zdenek Kabelac
0 siblings, 2 replies; 6+ messages in thread
From: Pra.. Dew.. @ 2022-09-10 18:46 UTC (permalink / raw)
To: dm-devel@redhat.com
[-- Attachment #1.1: Type: text/plain, Size: 462 bytes --]
Hello,
I need to setup dm-verity from my program-basically mount verity enabled filesystems from my code. I have looked at veritysetup and devicemapper (libdm) library. I was wondering if there is some simple C code to use the DM IOCTLs directly to setup verity. Any guidance to directly use the dm IOCTLs or libdm would also be helpful. Thank you for the guidance.
Thanks
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
[-- Attachment #1.2: Type: text/html, Size: 1884 bytes --]
[-- Attachment #2: Type: text/plain, Size: 98 bytes --]
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dm-devel] Location for the definition of dm_task
2022-09-10 18:46 [dm-devel] setting up dmverity using device mapper IOCTLs Pra.. Dew..
@ 2022-09-12 5:55 ` Pra.. Dew..
2022-09-12 12:54 ` Zdenek Kabelac
2022-09-12 13:01 ` [dm-devel] setting up dmverity using device mapper IOCTLs Zdenek Kabelac
1 sibling, 1 reply; 6+ messages in thread
From: Pra.. Dew.. @ 2022-09-12 5:55 UTC (permalink / raw)
To: dm-devel@redhat.com
[-- Attachment #1.1: Type: text/plain, Size: 367 bytes --]
I see that in libdevmapper.c<https://gitlab.com/cryptsetup/cryptsetup/-/blob/master/lib/libdevmapper.c#L266> following line is defined
struct dm_task *dmt;
I cannot seem to find out where is dm_task and associated functions are actually defined? I do not see them in the libdevmapper library headers and .c files. Thank you for all the guidance.
Thanks
[-- Attachment #1.2: Type: text/html, Size: 2473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 98 bytes --]
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dm-devel] setting up dmverity using device mapper IOCTLs
2022-09-10 18:46 [dm-devel] setting up dmverity using device mapper IOCTLs Pra.. Dew..
2022-09-12 5:55 ` [dm-devel] Location for the definition of dm_task Pra.. Dew..
@ 2022-09-12 13:01 ` Zdenek Kabelac
2022-09-12 15:37 ` Pra.. Dew..
1 sibling, 1 reply; 6+ messages in thread
From: Zdenek Kabelac @ 2022-09-12 13:01 UTC (permalink / raw)
To: Pra.. Dew.., dm-devel@redhat.com
[-- Attachment #1.1: Type: text/plain, Size: 812 bytes --]
Dne 10. 09. 22 v 20:46 Pra.. Dew.. napsal(a):
>
> Hello,
>
> I need to setup dm-verity from my program-basically mount verity enabled
> filesystems from my code. I have looked at veritysetup and devicemapper
> (libdm) library. I was wondering if there is some simple C code to use the
> DM IOCTLs directly to setup verity. Any guidance to directly use the dm
> IOCTLs or libdm would also be helpful. Thank you for the guidance.
>
Hi
I'd recommend to exec "dmsetup" call - as that's by far the simplest
solution for your problem.
Verity tool should supposedly solve 'compatibility' between various versions
and various capabilities of driver.
What is the idea behind redevelopment of this tool by your C code (as
clearly you should then do the same thing as verity tool) ?
Regards
Zdenek
[-- Attachment #1.2: Type: text/html, Size: 2143 bytes --]
[-- Attachment #2: Type: text/plain, Size: 98 bytes --]
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dm-devel] setting up dmverity using device mapper IOCTLs
2022-09-12 13:01 ` [dm-devel] setting up dmverity using device mapper IOCTLs Zdenek Kabelac
@ 2022-09-12 15:37 ` Pra.. Dew..
2022-09-12 15:59 ` Bryn M. Reeves
0 siblings, 1 reply; 6+ messages in thread
From: Pra.. Dew.. @ 2022-09-12 15:37 UTC (permalink / raw)
To: Zdenek Kabelac, dm-devel@redhat.com
[-- Attachment #1.1: Type: text/plain, Size: 1437 bytes --]
Thank you Zdenek. We are developing a embedded system with very constrained memory/storage. So we are trying to see if we can combine utilities like dmsetup with other Rust code for managing storage in our embedded system, while only including the parts of dmsetup that we really need. Hence I am trying to figure out what is the best way here.
Thanks
From: Zdenek Kabelac<mailto:zkabelac@redhat.com>
Sent: Monday, September 12, 2022 6:01 AM
To: Pra.. Dew..<mailto:linux_learner@outlook.com>; dm-devel@redhat.com<mailto:dm-devel@redhat.com>
Subject: Re: [dm-devel] setting up dmverity using device mapper IOCTLs
Dne 10. 09. 22 v 20:46 Pra.. Dew.. napsal(a):
Hello,
I need to setup dm-verity from my program-basically mount verity enabled filesystems from my code. I have looked at veritysetup and devicemapper (libdm) library. I was wondering if there is some simple C code to use the DM IOCTLs directly to setup verity. Any guidance to directly use the dm IOCTLs or libdm would also be helpful. Thank you for the guidance.
Hi
I'd recommend to exec "dmsetup" call - as that's by far the simplest solution for your problem.
Verity tool should supposedly solve 'compatibility' between various versions and various capabilities of driver.
What is the idea behind redevelopment of this tool by your C code (as clearly you should then do the same thing as verity tool) ?
Regards
Zdenek
[-- Attachment #1.2: Type: text/html, Size: 3424 bytes --]
[-- Attachment #2: Type: text/plain, Size: 98 bytes --]
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dm-devel] setting up dmverity using device mapper IOCTLs
2022-09-12 15:37 ` Pra.. Dew..
@ 2022-09-12 15:59 ` Bryn M. Reeves
0 siblings, 0 replies; 6+ messages in thread
From: Bryn M. Reeves @ 2022-09-12 15:59 UTC (permalink / raw)
To: Pra.. Dew..; +Cc: dm-devel@redhat.com, Zdenek Kabelac
On Mon, Sep 12, 2022 at 03:37:19PM +0000, Pra.. Dew.. wrote:
> Thank you Zdenek. We are developing a embedded system with very constrained memory/storage. So we are trying to see if we can combine utilities like dmsetup with other Rust code for managing storage in our embedded system, while only including the parts of dmsetup that we really need. Hence I am trying to figure out what is the best way here.
If you are working with Rust then you may want to evaluate the
devicemapper-rs library:
https://github.com/stratis-storage/devicemapper-rs/
This is an implementation of a high level interface to the DM ioctls in
Rust - it obtains some constants from libdevmapper.h via bindgen but the
ioctl handling and header parsing is done natively.
It's been around for a while and is used by Stratis and some other
projects. There have been a few discussions around a new userspace DM
implementation in Rust with a somewhat different interface but nothing
has been written so far.
Regards,
Bryn.
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-09-12 16:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-10 18:46 [dm-devel] setting up dmverity using device mapper IOCTLs Pra.. Dew..
2022-09-12 5:55 ` [dm-devel] Location for the definition of dm_task Pra.. Dew..
2022-09-12 12:54 ` Zdenek Kabelac
2022-09-12 13:01 ` [dm-devel] setting up dmverity using device mapper IOCTLs Zdenek Kabelac
2022-09-12 15:37 ` Pra.. Dew..
2022-09-12 15:59 ` Bryn M. Reeves
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.