Re: KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-21 Thread David Holland
On Sun, May 17, 2020 at 12:38:41PM -0400, Mouse wrote: > Furthermore, "the" owner of a page > may be unclear in a few circumstances. This is a nontrivial problem... a good solution to it would be useful even just for accounting purposes. -- David A. Holland dholl...@netbsd.org

Re: KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-18 Thread Michael van Elst
mar...@duskware.de (Martin Husemann) writes: >I agree with both. Leave it an admin decision (and maybe default to >"encrypt"). Also assume that it is possible to complete enough of /etc/rc.d >without any swapping ;-} so a simple setting in /etc/sysctl.conf will do. If you don't allow to disable

Re: KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-18 Thread Martin Husemann
On Mon, May 18, 2020 at 06:21:10PM -0400, Mouse wrote: > >> Always encrypted swap would be even better but ... slow machines. > > Compared to the time required to put the pages out to disk? > > That comparison is relevant only if the system has nothing better to do > than wait for the page

Re: KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-18 Thread Mouse
>> Always encrypted swap would be even better but ... slow machines. > Compared to the time required to put the pages out to disk? That comparison is relevant only if the system has nothing better to do than wait for the page out/in. A few systems probably don't. Most, I suspect, do, and if

Re: KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-18 Thread Taylor R Campbell
> Date: Mon, 18 May 2020 17:51:51 -0400 > From: Thor Lancelot Simon > > On Mon, May 18, 2020 at 09:08:14PM +0100, Alexander Nasonov wrote: > > matthew green wrote: > > > what's the use-case for disabling encrypted swap later? > > > > It might be too slow on some machines. > > > > > i'd argue

Re: KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-18 Thread Thor Lancelot Simon
On Mon, May 18, 2020 at 09:08:14PM +0100, Alexander Nasonov wrote: > matthew green wrote: > > what's the use-case for disabling encrypted swap later? > > It might be too slow on some machines. > > > i'd argue we should avoid kauth for this and simply disable > > it always as i've been unable to

Re: KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-18 Thread Alexander Nasonov
matthew green wrote: > what's the use-case for disabling encrypted swap later? It might be too slow on some machines. > i'd argue we should avoid kauth for this and simply disable > it always as i've been unable to think of any use case that > is the only solution. Always encrypted swap would

re: KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-17 Thread matthew green
what's the use-case for disabling encrypted swap later? i'd argue we should avoid kauth for this and simply disable it always as i've been unable to think of any use case that is the only solution. .mrg.

Re: KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-17 Thread Mouse
> I think everybody believes that regardless of securelevel, root > should be able to enable encrypted swap. But probably almost > everyone thinks regular users should not be allowed to enable it. (Throughout the following, I'm using "root" as shorthand for "a user without suitable privilege".

Re: KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-17 Thread Greg Troxel
Alexander Nasonov writes: > Greg Troxel wrote: >> Kamil Rytarowski writes: >> >> > Is it possible to avoid negation in the name? >> > >> > KAUTH_SYSTEM_ENABLE_SWAP_ENCRYPTION >> >> I think the point is to have one permission to enable it, which is >> perhaps just regular root, and another to

Re: KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-17 Thread Alexander Nasonov
Greg Troxel wrote: > Kamil Rytarowski writes: > > > Is it possible to avoid negation in the name? > > > > KAUTH_SYSTEM_ENABLE_SWAP_ENCRYPTION > > I think the point is to have one permission to enable it, which is > perhaps just regular root, and another to disable it if securelevel is >

Re: KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-16 Thread Greg Troxel
Kamil Rytarowski writes: > Is it possible to avoid negation in the name? > > KAUTH_SYSTEM_ENABLE_SWAP_ENCRYPTION I think the point is to have one permission to enable it, which is perhaps just regular root, and another to disable it if securelevel is elevated. So perhaps there should be two

Re: KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-16 Thread Kamil Rytarowski
t; > > On Sat, 16 May 2020, Alexander Nasonov wrote: > >> Attached patch adds KAUTH_SYSTEM_UNENCRYPTED_SWAP and >> it forbids changing vm.swap_encrypt from 1 to 0 when >> securelevel > 0. >> >> If there are no objections, I'm going to commit it tomorrow.

Re: KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-16 Thread Alexander Nasonov
m...@netbsd.org wrote: > No objections from me, but I feel like "will commit unless objected" > should be done on longer time scales. I spend way too much time on > netbsd and I still have some days I dont get to reading email for > whatever reason. It's a small change, we discussed it on

Re: KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-16 Thread maya
On Sat, May 16, 2020 at 11:53:02PM +0100, Alexander Nasonov wrote: > Attached patch adds KAUTH_SYSTEM_UNENCRYPTED_SWAP and > it forbids changing vm.swap_encrypt from 1 to 0 when > securelevel > 0. > > If there are no objections, I'm going to commit it tomorrow. No objections f

Re: KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-16 Thread Paul Goyette
I'm not sure I like the name! Can you call it KAUTH_SYSTEM_DISABLE_SWAPENCRYPT ? That more closely describes the action which is being controlled. On Sat, 16 May 2020, Alexander Nasonov wrote: Attached patch adds KAUTH_SYSTEM_UNENCRYPTED_SWAP and it forbids changing vm.swap_encrypt from 1

KAUTH_SYSTEM_UNENCRYPTED_SWAP

2020-05-16 Thread Alexander Nasonov
Attached patch adds KAUTH_SYSTEM_UNENCRYPTED_SWAP and it forbids changing vm.swap_encrypt from 1 to 0 when securelevel > 0. If there are no objections, I'm going to commit it tomorrow. -- Alex Index: share/man/man9/kauth.9 ===