Attila Bukor has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/18025 )

Change subject: [security] KUDU-3316 Add encrypted file keys
......................................................................


Patch Set 18:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/18025/17/src/kudu/fs/log_block_manager.cc
File src/kudu/fs/log_block_manager.cc:

http://gerrit.cloudera.org:8080/#/c/18025/17/src/kudu/fs/log_block_manager.cc@749
PS17, Line 749:   // If we have an encryption header, we need to align the next 
offset to the
              :   // next file system block.
              :   if (auto encryption_header_size = 
data_file_->GetEncryptionHeaderSize();
              :       encryption_header_size > 0) {
> nit: since it's C++17 code, it's possible to put the related variable under
Wow I wasn't aware of this feature, thanks for the tip!


http://gerrit.cloudera.org:8080/#/c/18025/17/src/kudu/util/env_posix.cc
File src/kudu/util/env_posix.cc:

http://gerrit.cloudera.org:8080/#/c/18025/17/src/kudu/util/env_posix.cc@849
PS17, Line 849: (key_size + 15) & -16)
> nit: there is BitUtil::Ceil() for that if you'd like to give the code a bit
It seems the difference between BitUtil::Ceil() and this bitwise trick is 
non-trivial (gcc 11.2 with -O3):

Bitwise magic
        lea     eax, [rdi+15]
        and     eax, -16

BitUtil::Ceil()
        xor     eax, eax
        test    dil, 15
        lea     edx, [rdi+15]
        setne   al
        test    edi, edi
        cmovns  edx, edi
        sar     edx, 4
        add     eax, edx
        sal     eax, 4
        ret



--
To view, visit http://gerrit.cloudera.org:8080/18025
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idb1282c117271fda63a8cc54c00add7cc96dcffd
Gerrit-Change-Number: 18025
Gerrit-PatchSet: 18
Gerrit-Owner: Attila Bukor <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Zoltan Chovan <[email protected]>
Gerrit-Comment-Date: Sat, 29 Jan 2022 23:54:41 +0000
Gerrit-HasComments: Yes

Reply via email to