Re: [PATCH v2 4/8] zram: use crypto api to check alg availability

2016-06-01 Thread Minchan Kim
On Wed, Jun 01, 2016 at 04:48:45PM +0900, Sergey Senozhatsky wrote: > On (06/01/16 15:47), Minchan Kim wrote: > [..] > > > so both BUILTIN and BUILT-AS-A-MODULE cases are handled at compile > > > time now and we can avoid crypto_has_comp() checks for most of the > > > comp_algorithm calls, except f

Re: [PATCH v2 4/8] zram: use crypto api to check alg availability

2016-06-01 Thread Austin S. Hemmelgarn
On 2016-06-01 03:48, Sergey Senozhatsky wrote: On (06/01/16 15:47), Minchan Kim wrote: [..] so both BUILTIN and BUILT-AS-A-MODULE cases are handled at compile time now and we can avoid crypto_has_comp() checks for most of the comp_algorithm calls, except for the case when someone requests an out

Re: [PATCH v2 4/8] zram: use crypto api to check alg availability

2016-06-01 Thread Sergey Senozhatsky
On (06/01/16 15:47), Minchan Kim wrote: [..] > > so both BUILTIN and BUILT-AS-A-MODULE cases are handled at compile > > time now and we can avoid crypto_has_comp() checks for most of the > > comp_algorithm calls, except for the case when someone requests an > > out-of-tree module. > > Hmm, isn't i

Re: [PATCH v2 4/8] zram: use crypto api to check alg availability

2016-05-31 Thread Minchan Kim
On Wed, Jun 01, 2016 at 12:17:35PM +0900, Sergey Senozhatsky wrote: > On (06/01/16 11:27), Minchan Kim wrote: > [..] > > > > So, if we do 'cat /sys/block/zram0/comp_algorithm", every crypto modules > > > > in the backend array are loaded in memory and not unloaded until admin > > > > executes rmmod

Re: [PATCH v2 4/8] zram: use crypto api to check alg availability

2016-05-31 Thread Sergey Senozhatsky
On (06/01/16 11:27), Minchan Kim wrote: [..] > > > So, if we do 'cat /sys/block/zram0/comp_algorithm", every crypto modules > > > in the backend array are loaded in memory and not unloaded until admin > > > executes rmmod? Right? > > > > yes, I think so. > > It scares me. Common case, except one

Re: [PATCH v2 4/8] zram: use crypto api to check alg availability

2016-05-31 Thread Minchan Kim
On Wed, Jun 01, 2016 at 10:07:07AM +0900, Sergey Senozhatsky wrote: > Hello Minchan, > > On (06/01/16 09:03), Minchan Kim wrote: > [..] > > So, if we do 'cat /sys/block/zram0/comp_algorithm", every crypto modules > > in the backend array are loaded in memory and not unloaded until admin > > execut

Re: [PATCH v2 4/8] zram: use crypto api to check alg availability

2016-05-31 Thread Sergey Senozhatsky
Hello Minchan, On (06/01/16 09:03), Minchan Kim wrote: [..] > So, if we do 'cat /sys/block/zram0/comp_algorithm", every crypto modules > in the backend array are loaded in memory and not unloaded until admin > executes rmmod? Right? yes, I think so. [..] > If user load out-of-tree crypto compres

Re: [PATCH v2 4/8] zram: use crypto api to check alg availability

2016-05-31 Thread Minchan Kim
On Tue, May 31, 2016 at 09:20:13PM +0900, Sergey Senozhatsky wrote: > There is no way to get a string with all the crypto comp > algorithms supported by the crypto comp engine, so we need > to maintain our own backends list. At the same time we > additionally need to use crypto_has_comp() to make s