Re: [RFC PATCH v10 11/17] dm-verity: consume root hash digest and signature data via LSM hook
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Paul Moore <paul@xxxxxxxxxxxxxx>, Mike Snitzer <snitzer@xxxxxxxxxx>, corbet@xxxxxxx, zohar@xxxxxxxxxxxxx, jmorris@xxxxxxxxx, serge@xxxxxxxxxx, tytso@xxxxxxx, ebiggers@xxxxxxxxxx, axboe@xxxxxxxxx, agk@xxxxxxxxxx, eparis@xxxxxxxxxx, linux-doc@xxxxxxxxxxxxxxx, linux-integrity@xxxxxxxxxxxxxxx, linux-security-module@xxxxxxxxxxxxxxx, linux-fscrypt@xxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, dm-devel@xxxxxxxxxx, audit@xxxxxxxxxxxxxxx, roberto.sassu@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Deven Bowers <deven.desai@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [RFC PATCH v10 11/17] dm-verity: consume root hash digest and signature data via LSM hook
- From: Fan Wu <wufan@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 9 Aug 2023 11:02:42 -0700
- In-reply-to: <20230808234023.GC120054@agk-cloud1.hosts.prod.upshift.rdu2.redhat.com>
- References: <1687986571-16823-1-git-send-email-wufan@linux.microsoft.com> <1687986571-16823-12-git-send-email-wufan@linux.microsoft.com> <ZKgm+ffQbdDTxrg9@redhat.com> <20230712034319.GA17642@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <CAHC9VhQFxqcfgR0acgdiXKP9LT1KLgGjZd-QHs6O1dEex31HEQ@mail.gmail.com> <20230808224503.GA20095@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <20230808234023.GC120054@agk-cloud1.hosts.prod.upshift.rdu2.redhat.com>
- User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Aug 09, 2023 at 12:40:23AM +0100, Alasdair G Kergon wrote:
> On Tue, Aug 08, 2023 at 03:45:03PM -0700, Fan Wu wrote:
> > On Tue, Jul 25, 2023 at 04:43:48PM -0400, Paul Moore wrote:
> > > Where would the finalize() hook be called?
> >
> > It is in the __bind function in drivers/md/dm.c, calling just before
> > rcu_assign_pointer(md->map, (void *)t) which activates the inactive table.
>
> That would be after the existing commit point, meaning the table swap
> cannot be cancelled there, so is the finalize() you are proposing void()
> i.e. designed so it always succeeds?
>
> Alasdair
Thanks for the input.
Actually, no, the hook can be failed. I noticed the existing call before rcu_assign_pointer(md->map, (void *)t);
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/md/dm.c#n2255)
can also be failed so I was following the same pattern.
Could you explain a bit more about the "commit point"? It sounds like it might be better to move
the hook call just before the commit point instead.
-Fan
[Index of Archives]
[linux Cryptography]
[Asterisk App Development]
[PJ SIP]
[Gnu Gatekeeper]
[IETF Sipping]
[Info Cyrus]
[ALSA User]
[Fedora Linux Users]
[Linux SCTP]
[DCCP]
[Gimp]
[Yosemite News]
[Deep Creek Hot Springs]
[Yosemite Campsites]
[ISDN Cause Codes]