Skip to contentSkip to conversation

fscrypt: remove filesystem specific build config option

PATCH Guenter Roeck 3 participants 5 messages Jan 10, 2019 – Jan 24, 2019

lore
Share & tools
lore
#0 lore raw
Quoted 8 lines · Chandan Rajendra

In order to have a common code base for fscrypt "post read" processing for all filesystems which support encryption, this commit removes filesystem specific build config option (e.g. CONFIG_EXT4_FS_ENCRYPTION) and replaces it with a build option (i.e. CONFIG_FS_ENCRYPTION) whose value affects all the filesystems making use of fscrypt.

This results in:

Building ia64:allnoconfig ... failed
--------------
Error log:
make[1]: Entering directory '/tmp/buildbot-builddir.7Wft3'
GEN Makefile
scripts/kconfig/conf --allnoconfig Kconfig arch/ia64/Kconfig:128:error: recursive dependency detected!
arch/ia64/Kconfig:128: choice <choice> contains symbol IA64_HP_SIM
arch/ia64/Kconfig:202: symbol IA64_HP_SIM is part of choice PM
kernel/power/Kconfig:144: symbol PM is selected by PM_SLEEP
kernel/power/Kconfig:104: symbol PM_SLEEP depends on HIBERNATE_CALLBACKS
kernel/power/Kconfig:31: symbol HIBERNATE_CALLBACKS is selected by HIBERNATION
kernel/power/Kconfig:34: symbol HIBERNATION depends on SWAP
init/Kconfig:250: symbol SWAP depends on BLOCK
block/Kconfig:5: symbol BLOCK is selected by UBIFS_FS
fs/ubifs/Kconfig:1: symbol UBIFS_FS depends on MISC_FILESYSTEMS
fs/Kconfig:227: symbol MISC_FILESYSTEMS is selected by ACPI_APEI
drivers/acpi/apei/Kconfig:8: symbol ACPI_APEI depends on ACPI
drivers/acpi/Kconfig:9: symbol ACPI depends on ARCH_SUPPORTS_ACPI
drivers/acpi/Kconfig:6: symbol ARCH_SUPPORTS_ACPI is selected by IA64_HP_SIM
arch/ia64/Kconfig:202: symbol IA64_HP_SIM is part of choice <choice>
For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations"

Didn't we have exactly the same problem before ?

Guenter

---
# bad: [6cab33afc3dd17bd9922c99a828f5680b4667cd9] Add linux-next specific files for 20190110 # good: [bfeffd155283772bbe78c6a05dec7c0128ee500c] Linux 5.0-rc1
git bisect start 'HEAD' 'v5.0-rc1'
# bad: [45daa05b201d684d42a186970731a9e39f75beb7] Merge remote-tracking branch 'mtd/mtd/next' git bisect bad 45daa05b201d684d42a186970731a9e39f75beb7
# good: [f570411d3495dc4acf76cffa3a4c3cca6ae693fb] Merge remote-tracking branch 'renesas/next' git bisect good f570411d3495dc4acf76cffa3a4c3cca6ae693fb
# bad: [849603c11808c63603b5ed4469e10e0760bc3d54] Merge remote-tracking branch 'ext3/for_next' git bisect bad 849603c11808c63603b5ed4469e10e0760bc3d54
# good: [2a6bce75e611c112d3971a4b9dcff8028d8b1f2d] Merge remote-tracking branch 'parisc-hd/for-next' git bisect good 2a6bce75e611c112d3971a4b9dcff8028d8b1f2d
# good: [41602048a8a5b2003f8341d07ae9f0071276653d] Merge remote-tracking branch 'xtensa/xtensa-for-next' git bisect good 41602048a8a5b2003f8341d07ae9f0071276653d
# bad: [a9e5d743c35d47c459d5ee80454fe23391a8d654] Merge remote-tracking branch 'btrfs-kdave/for-next' git bisect bad a9e5d743c35d47c459d5ee80454fe23391a8d654
# good: [dc82005ead5de0e5bb764c0c1c50a19891b6de15] ext4: use IS_ENCRYPTED() to check encryption status git bisect good dc82005ead5de0e5bb764c0c1c50a19891b6de15
# bad: [7138851022cbedd6ae6303168c2195c714ed3548] fsverity: Move verity status check to fsverity_file_open git bisect bad 7138851022cbedd6ae6303168c2195c714ed3548
# bad: [4dedd7844d2241d358c121d06109dfda2e46843f] Add S_VERITY and IS_VERITY()
git bisect bad 4dedd7844d2241d358c121d06109dfda2e46843f
# bad: [f3fd6cd74fedf99b6060f75df00943fda13b65f2] fscrypt: remove filesystem specific build config option git bisect bad f3fd6cd74fedf99b6060f75df00943fda13b65f2
# good: [1dcfeb539c09237c98b99685fb9cd156241db13f] f2fs: use IS_ENCRYPTED() to check encryption status git bisect good 1dcfeb539c09237c98b99685fb9cd156241db13f

# first bad commit: [f3fd6cd74fedf99b6060f75df00943fda13b65f2] fscrypt: remove filesystem specific build config option
#1 lore raw
Quoted 36 lines · Guenter Roeck
Quoted 8 lines · Chandan Rajendra

In order to have a common code base for fscrypt "post read" processing for all filesystems which support encryption, this commit removes filesystem specific build config option (e.g. CONFIG_EXT4_FS_ENCRYPTION) and replaces it with a build option (i.e. CONFIG_FS_ENCRYPTION) whose value affects all the filesystems making use of fscrypt.

This results in:

Building ia64:allnoconfig ... failed
--------------
Error log:
make[1]: Entering directory '/tmp/buildbot-builddir.7Wft3'
GEN Makefile
scripts/kconfig/conf --allnoconfig Kconfig arch/ia64/Kconfig:128:error: recursive dependency detected!
arch/ia64/Kconfig:128: choice <choice> contains symbol IA64_HP_SIM
arch/ia64/Kconfig:202: symbol IA64_HP_SIM is part of choice PM
kernel/power/Kconfig:144: symbol PM is selected by PM_SLEEP
kernel/power/Kconfig:104: symbol PM_SLEEP depends on HIBERNATE_CALLBACKS
kernel/power/Kconfig:31: symbol HIBERNATE_CALLBACKS is selected by HIBERNATION
kernel/power/Kconfig:34: symbol HIBERNATION depends on SWAP
init/Kconfig:250: symbol SWAP depends on BLOCK
block/Kconfig:5: symbol BLOCK is selected by UBIFS_FS
fs/ubifs/Kconfig:1: symbol UBIFS_FS depends on MISC_FILESYSTEMS
fs/Kconfig:227: symbol MISC_FILESYSTEMS is selected by ACPI_APEI
drivers/acpi/apei/Kconfig:8: symbol ACPI_APEI depends on ACPI
drivers/acpi/Kconfig:9: symbol ACPI depends on ARCH_SUPPORTS_ACPI
drivers/acpi/Kconfig:6: symbol ARCH_SUPPORTS_ACPI is selected by IA64_HP_SIM
arch/ia64/Kconfig:202: symbol IA64_HP_SIM is part of choice <choice>
For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations"

Quoted 3 lines

Didn't we have exactly the same problem before ?

Guenter

Indeed, Chandan Rajendra sent out a new version of the patch which fixes the problem (by removing the 'select BLOCK' from fs/ubifs/Kconfig), but it never made it into the fscrypt tree and hence never made it into linux-next.

Ted, what you are planning to do with the fscrypt tree following the fsverity discussion? IMO, we should keep the fsverity stuff in its own branch, separate from any fscrypt changes. As a suggestion, in the branch "fscrypt" of my linux.git repo [1], I applied just these four patches on top of v5.0-rc1 and resolved the conflicts with them no longer being on top of fsverity:

fscrypt: remove CRYPTO_CTR dependency
ext4: use IS_ENCRYPTED() to check encryption status
f2fs: use IS_ENCRYPTED() to check encryption status
fscrypt: remove filesystem specific build config option

(The last patch is the fixed version.)

Please consider doing the same with the official fscrypt tree. Thanks!

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=fscrypt

- Eric

#2 lore raw
Quoted 10 lines · Eric Biggers

Indeed, Chandan Rajendra sent out a new version of the patch which fixes the problem (by removing the 'select BLOCK' from fs/ubifs/Kconfig), but it never made it into the fscrypt tree and hence never made it into linux-next.

Ted, what you are planning to do with the fscrypt tree following the fsverity discussion? IMO, we should keep the fsverity stuff in its own branch, separate from any fscrypt changes. As a suggestion, in the branch "fscrypt" of my linux.git repo [1], I applied just these four patches on top of v5.0-rc1 and resolved the conflicts with them no longer being on top of fsverity...

Sorry, I was on vacation last week and I've been catching up on things this week. I've reset the master branch on my fscrypt.git tree so that it has what you have on your fscrypt branch, rebased to 5.0-rc3.

Also, as we had talked about earlier, it probably makes sense to set up jointly maintained git tree for fscrypt and fsverity. My proposal is that we set up a new fscrypt.git tree, at /pub/scm/fs/fscrypt/fscrypt.git, that would be owned by the "FSCRYPT group", with group membership being ebiggers, jaeguk, and tytso. We'll have to figure out ways that we can jointly update the git tree without stepping on each other, probably using a group chat. Does that sound good to you?

- Ted

#3 lore raw
Quoted 16 lines · Theodore Y. Ts'o
Quoted 10 lines · Eric Biggers

Indeed, Chandan Rajendra sent out a new version of the patch which fixes the problem (by removing the 'select BLOCK' from fs/ubifs/Kconfig), but it never made it into the fscrypt tree and hence never made it into linux-next.

Ted, what you are planning to do with the fscrypt tree following the fsverity discussion? IMO, we should keep the fsverity stuff in its own branch, separate from any fscrypt changes. As a suggestion, in the branch "fscrypt" of my linux.git repo [1], I applied just these four patches on top of v5.0-rc1 and resolved the conflicts with them no longer being on top of fsverity...

Sorry, I was on vacation last week and I've been catching up on things this week. I've reset the master branch on my fscrypt.git tree so that it has what you have on your fscrypt branch, rebased to 5.0-rc3.

Quoted 9 lines

Also, as we had talked about earlier, it probably makes sense to set up jointly maintained git tree for fscrypt and fsverity. My proposal is that we set up a new fscrypt.git tree, at /pub/scm/fs/fscrypt/fscrypt.git, that would be owned by the "FSCRYPT group", with group membership being ebiggers, jaeguk, and tytso. We'll have to figure out ways that we can jointly update the git tree without stepping on each other, probably using a group chat. Does that sound good to you?

Hi Ted, that sounds good to me. I assume you know how to get that set up? Also, should I go ahead and send a patch that adds myself to the MAINTAINERS file?

- Eric

#4 lore raw
Quoted 4 lines · Eric Biggers

Hi Ted, that sounds good to me. I assume you know how to get that set up? Also, should I go ahead and send a patch that adds myself to the MAINTAINERS file?

I have the request to the git.kernel.org folks and the edits to the MAINTAINERS file already done, so I'll send them out shortly. :-)

- Ted