qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 00/19] vhost-user-rpmb (Replay Protected Memory Block)


From: no-reply
Subject: Re: [RFC PATCH 00/19] vhost-user-rpmb (Replay Protected Memory Block)
Date: Fri, 25 Sep 2020 07:07:05 -0700 (PDT)

Patchew URL: 
20200925125147.26943-1-alex.bennee@linaro.org/">https://patchew.org/QEMU/20200925125147.26943-1-alex.bennee@linaro.org/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20200925125147.26943-1-alex.bennee@linaro.org
Subject: [RFC PATCH  00/19] vhost-user-rpmb (Replay Protected Memory Block)

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Switched to a new branch 'test'
de93431 docs: add a man page for vhost-user-rpmb
2bc1b7e tools/vhost-user-rpmb: allow setting of the write_count
50f0f27 tools/vhost-user-rpmb: add key persistence
dd8233f tools/vhost-user-rpmb: implement VIRTIO_RPMB_REQ_DATA_READ
88283cc tools/vhost-user-rpmb: implement VIRTIO_RPMB_REQ_DATA_WRITE
aa2e735 tools/vhost-user-rpmb: implement VIRTIO_RPMB_REQ_GET_WRITE_COUNTER
24de191 tools/vhost-user-rpmb: implement the PROGRAM_KEY handshake
cf0cc66 tools/vhost-user-rpmb: import hmac_sha256 functions
f98813c tools/vhost-user-rpmb: add --flash-path for backing store
8db0f08 tools/vhost-user-rpmb: handle shutdown and SIGINT/SIGHUP cleanly
f7534d4 tools/vhost-user-rpmb: add a --verbose/debug flags for logging
4c44c17 tools/vhost-user-rpmb: connect to fd and instantiate basic run loop
061c2c0 tools/vhost-user-rpmb: implement --print-capabilities
d873168 tools/vhost-user-rpmb: add boilerplate and initial main
397a631 virtio-pci: add notification trace points
d947373 hw/block: add vhost-user-rpmb-pci boilerplate
5966eb3 hw/virtio: move virtio-pci.h into shared include space
48c264c hw/block: add boilerplate for vhost-user-rpmb device
220284c tools/virtiofsd: add support for --socket-group

=== OUTPUT BEGIN ===
1/19 Checking commit 220284c70dd3 (tools/virtiofsd: add support for 
--socket-group)
WARNING: line over 80 characters
#92: FILE: tools/virtiofsd/fuse_virtio.c:934:
+        old_umask = umask(S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | 
S_IXOTH);

total: 0 errors, 1 warnings, 74 lines checked

Patch 1/19 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/19 Checking commit 48c264cdfcd0 (hw/block: add boilerplate for 
vhost-user-rpmb device)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#42: 
new file mode 100644

total: 0 errors, 1 warnings, 395 lines checked

Patch 2/19 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/19 Checking commit 5966eb3db703 (hw/virtio: move virtio-pci.h into shared 
include space)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#250: 
rename from hw/virtio/virtio-pci.h

total: 0 errors, 1 warnings, 144 lines checked

Patch 3/19 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
4/19 Checking commit d94737395f8f (hw/block: add vhost-user-rpmb-pci 
boilerplate)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#28: 
new file mode 100644

total: 0 errors, 1 warnings, 89 lines checked

Patch 4/19 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
5/19 Checking commit 397a63150433 (virtio-pci: add notification trace points)
6/19 Checking commit d8731682a51c (tools/vhost-user-rpmb: add boilerplate and 
initial main)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#53: 
new file mode 100644

ERROR: that open brace { should be on the previous line
#84: FILE: tools/vhost-user-rpmb/main.c:16:
+static GOptionEntry options[] =
+{

ERROR: line over 90 characters
#85: FILE: tools/vhost-user-rpmb/main.c:17:
+    { "socket-path", 0, 0, G_OPTION_ARG_FILENAME, &socket_path, "Location of 
vhost-user Unix domain socket, incompatible with --fd", "PATH" },

ERROR: line over 90 characters
#86: FILE: tools/vhost-user-rpmb/main.c:18:
+    { "fd", 0, 0, G_OPTION_ARG_INT, &socket_fd, "Specify the file-descriptor 
of the backend, incompatible with --socket-path", "FD" },

ERROR: line over 90 characters
#87: FILE: tools/vhost-user-rpmb/main.c:19:
+    { "print-capabilities", 0, 0, G_OPTION_ARG_NONE, &print_cap, "Output to 
stdout the backend capabilities in JSON format and exit", NULL},

ERROR: space prohibited between function name and open parenthesis '('
#91: FILE: tools/vhost-user-rpmb/main.c:23:
+int main (int argc, char *argv[])

ERROR: line over 90 characters
#96: FILE: tools/vhost-user-rpmb/main.c:28:
+    context = g_option_context_new ("vhost-user-rpmb - vhost-user emulation of 
RPBM device");

ERROR: space prohibited between function name and open parenthesis '('
#96: FILE: tools/vhost-user-rpmb/main.c:28:
+    context = g_option_context_new ("vhost-user-rpmb - vhost-user emulation of 
RPBM device");

ERROR: space prohibited between function name and open parenthesis '('
#97: FILE: tools/vhost-user-rpmb/main.c:29:
+    g_option_context_add_main_entries (context, options, "vhost-user-rpmb");

ERROR: that open brace { should be on the previous line
#98: FILE: tools/vhost-user-rpmb/main.c:30:
+    if (!g_option_context_parse (context, &argc, &argv, &error))
+    {

ERROR: space prohibited between function name and open parenthesis '('
#98: FILE: tools/vhost-user-rpmb/main.c:30:
+    if (!g_option_context_parse (context, &argc, &argv, &error))

ERROR: space prohibited between function name and open parenthesis '('
#101: FILE: tools/vhost-user-rpmb/main.c:33:
+        exit (1);

total: 11 errors, 1 warnings, 75 lines checked

Patch 6/19 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

7/19 Checking commit 061c2c0a97eb (tools/vhost-user-rpmb: implement 
--print-capabilities)
8/19 Checking commit 4c44c17852d6 (tools/vhost-user-rpmb: connect to fd and 
instantiate basic run loop)
ERROR: spaces required around that '*' (ctx:WxV)
#32: FILE: tools/vhost-user-rpmb/main.c:21:
+        const typeof(((type *) 0)->member) *__mptr = (ptr);     \
                                            ^

ERROR: space required after that ';' (ctx:VxV)
#33: FILE: tools/vhost-user-rpmb/main.c:22:
+        (type *) ((char *) __mptr - offsetof(type, member));})
                                                            ^

ERROR: space prohibited between function name and open parenthesis '('
#199: FILE: tools/vhost-user-rpmb/main.c:194:
+    context = g_option_context_new ("vhost-user emulation of RPBM device");

ERROR: line over 90 characters
#219: FILE: tools/vhost-user-rpmb/main.c:219:
+        g_autoptr(GSocket) bind_socket = g_socket_new(G_SOCKET_FAMILY_UNIX, 
G_SOCKET_TYPE_STREAM,

WARNING: line over 80 characters
#220: FILE: tools/vhost-user-rpmb/main.c:220:
+                                                      
G_SOCKET_PROTOCOL_DEFAULT, &error);

WARNING: line over 80 characters
#246: FILE: tools/vhost-user-rpmb/main.c:246:
+    if (!vug_init(&rpmb.dev, VHOST_USER_RPMB_MAX_QUEUES, 
g_socket_get_fd(socket),

total: 4 errors, 2 warnings, 244 lines checked

Patch 8/19 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

9/19 Checking commit f7534d48c985 (tools/vhost-user-rpmb: add a --verbose/debug 
flags for logging)
WARNING: line over 80 characters
#39: FILE: tools/vhost-user-rpmb/main.c:39:
+    { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Be more verbose in 
output", NULL},

WARNING: line over 80 characters
#63: FILE: tools/vhost-user-rpmb/main.c:227:
+                          G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | 
G_LOG_LEVEL_ERROR,

total: 0 errors, 2 warnings, 49 lines checked

Patch 9/19 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
10/19 Checking commit 8db0f083eb3e (tools/vhost-user-rpmb: handle shutdown and 
SIGINT/SIGHUP cleanly)
11/19 Checking commit f98813cc37dd (tools/vhost-user-rpmb: add --flash-path for 
backing store)
ERROR: line over 90 characters
#45: FILE: tools/vhost-user-rpmb/main.c:45:
+    { "flash-path", 0, 0, G_OPTION_ARG_FILENAME, &flash_path, "Location of raw 
flash image file", "PATH" },

ERROR: spaces required around that '*' (ctx:WxV)
#102: FILE: tools/vhost-user-rpmb/main.c:231:
+    r->virtio_config.capacity = map_size / (128 *KiB);
                                                 ^

total: 2 errors, 0 warnings, 115 lines checked

Patch 11/19 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

12/19 Checking commit cf0cc660d83d (tools/vhost-user-rpmb: import hmac_sha256 
functions)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#15: 
new file mode 100644

ERROR: space prohibited before that close parenthesis ')'
#75: FILE: tools/vhost-user-rpmb/hmac_sha256.c:56:
+    *((str) + 3) = (uint8) ((x)      );       \

ERROR: spaces required around that '*' (ctx:WxV)
#83: FILE: tools/vhost-user-rpmb/hmac_sha256.c:64:
+    *(x) =   ((uint32) *((str) + 3)      )    \
                        ^

ERROR: space prohibited before that close parenthesis ')'
#83: FILE: tools/vhost-user-rpmb/hmac_sha256.c:64:
+    *(x) =   ((uint32) *((str) + 3)      )    \

ERROR: spaces required around that '*' (ctx:WxV)
#84: FILE: tools/vhost-user-rpmb/hmac_sha256.c:65:
+           | ((uint32) *((str) + 2) <<  8)    \
                        ^

ERROR: spaces required around that '*' (ctx:WxV)
#85: FILE: tools/vhost-user-rpmb/hmac_sha256.c:66:
+           | ((uint32) *((str) + 1) << 16)    \
                        ^

ERROR: spaces required around that '*' (ctx:WxV)
#86: FILE: tools/vhost-user-rpmb/hmac_sha256.c:67:
+           | ((uint32) *((str) + 0) << 24);   \
                        ^

ERROR: space prohibited before that close parenthesis ')'
#91: FILE: tools/vhost-user-rpmb/hmac_sha256.c:72:
+    *((str) + 7) = (uint8) ((x)      );       \

ERROR: spaces required around that '*' (ctx:WxV)
#103: FILE: tools/vhost-user-rpmb/hmac_sha256.c:84:
+    *(x) =   ((uint64) *((str) + 7)      )    \
                        ^

ERROR: space prohibited before that close parenthesis ')'
#103: FILE: tools/vhost-user-rpmb/hmac_sha256.c:84:
+    *(x) =   ((uint64) *((str) + 7)      )    \

ERROR: spaces required around that '*' (ctx:WxV)
#104: FILE: tools/vhost-user-rpmb/hmac_sha256.c:85:
+           | ((uint64) *((str) + 6) <<  8)    \
                        ^

ERROR: spaces required around that '*' (ctx:WxV)
#105: FILE: tools/vhost-user-rpmb/hmac_sha256.c:86:
+           | ((uint64) *((str) + 5) << 16)    \
                        ^

ERROR: spaces required around that '*' (ctx:WxV)
#106: FILE: tools/vhost-user-rpmb/hmac_sha256.c:87:
+           | ((uint64) *((str) + 4) << 24)    \
                        ^

ERROR: spaces required around that '*' (ctx:WxV)
#107: FILE: tools/vhost-user-rpmb/hmac_sha256.c:88:
+           | ((uint64) *((str) + 3) << 32)    \
                        ^

ERROR: spaces required around that '*' (ctx:WxV)
#108: FILE: tools/vhost-user-rpmb/hmac_sha256.c:89:
+           | ((uint64) *((str) + 2) << 40)    \
                        ^

ERROR: spaces required around that '*' (ctx:WxV)
#109: FILE: tools/vhost-user-rpmb/hmac_sha256.c:90:
+           | ((uint64) *((str) + 1) << 48)    \
                        ^

ERROR: spaces required around that '*' (ctx:WxV)
#110: FILE: tools/vhost-user-rpmb/hmac_sha256.c:91:
+           | ((uint64) *((str) + 0) << 56);   \
                        ^

ERROR: that open brace { should be on the previous line
#120: FILE: tools/vhost-user-rpmb/hmac_sha256.c:101:
+uint32 sha256_h0[8] =
+            {0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,

ERROR: that open brace { should be on the previous line
#124: FILE: tools/vhost-user-rpmb/hmac_sha256.c:105:
+uint32 sha256_k[64] =
+            {0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,

WARNING: line over 80 characters
#188: FILE: tools/vhost-user-rpmb/hmac_sha256.c:169:
+void sha256(const unsigned char *message, unsigned int len, unsigned char 
*digest)

ERROR: space required before the open brace '{'
#282: FILE: tools/vhost-user-rpmb/hmac_sha256.c:263:
+        if (key_size > SHA256_BLOCK_SIZE){

ERROR: space prohibited after that open parenthesis '('
#396: FILE: tools/vhost-user-rpmb/hmac_sha256.h:40:
+#define SHA256_DIGEST_SIZE ( 256 / 8)

ERROR: space prohibited after that open parenthesis '('
#397: FILE: tools/vhost-user-rpmb/hmac_sha256.h:41:
+#define SHA256_BLOCK_SIZE  ( 512 / 8)

ERROR: "foo * bar" should be "foo *bar"
#413: FILE: tools/vhost-user-rpmb/hmac_sha256.h:57:
+void sha256_init(sha256_ctx * ctx);

total: 22 errors, 2 warnings, 425 lines checked

Patch 12/19 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

13/19 Checking commit 24de191d1408 (tools/vhost-user-rpmb: implement the 
PROGRAM_KEY handshake)
WARNING: line over 80 characters
#125: FILE: tools/vhost-user-rpmb/main.c:143:
+static size_t vrpmb_iov_to_buf(const struct iovec *iov, const unsigned int 
iov_cnt,

WARNING: line over 80 characters
#205: FILE: tools/vhost-user-rpmb/main.c:262:
+static void vrpmb_handle_program_key(VuDev *dev, struct virtio_rpmb_frame 
*frame)

ERROR: "foo * bar" should be "foo *bar"
#239: FILE: tools/vhost-user-rpmb/main.c:296:
+static struct virtio_rpmb_frame * vrpmb_handle_result_read(VuDev *dev)

WARNING: line over 80 characters
#347: FILE: tools/vhost-user-rpmb/main.c:400:
+                    g_warning("%s: already sent a response in this set of 
frames",

total: 1 errors, 3 warnings, 352 lines checked

Patch 13/19 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

14/19 Checking commit aa2e735c5fbb (tools/vhost-user-rpmb: implement 
VIRTIO_RPMB_REQ_GET_WRITE_COUNTER)
15/19 Checking commit 88283ccf688e (tools/vhost-user-rpmb: implement 
VIRTIO_RPMB_REQ_DATA_WRITE)
WARNING: Block comments use a leading /* on a separate line
#110: FILE: tools/vhost-user-rpmb/main.c:371:
+    } else if (false /* what does an expired write counter mean? */) {

WARNING: Block comments use a leading /* on a separate line
#120: FILE: tools/vhost-user-rpmb/main.c:381:
+        /* At this point we have a valid authenticated write request

ERROR: spaces required around that ':' (ctx:VxV)
#150: FILE: tools/vhost-user-rpmb/main.c:411:
+           r->last_result == VIRTIO_RPMB_RES_OK ? "successful":"failed",
                                                               ^

total: 1 errors, 2 warnings, 163 lines checked

Patch 15/19 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

16/19 Checking commit dd8233f9d9d3 (tools/vhost-user-rpmb: implement 
VIRTIO_RPMB_REQ_DATA_READ)
17/19 Checking commit 50f0f2719ffb (tools/vhost-user-rpmb: add key persistence)
ERROR: line over 90 characters
#35: FILE: tools/vhost-user-rpmb/main.c:52:
+    { "key-path", 0, 0, G_OPTION_ARG_FILENAME, &key_path, "Location of 
persistent keyfile", "KEY"},

ERROR: line over 90 characters
#36: FILE: tools/vhost-user-rpmb/main.c:53:
+    { "key-set", 0, 0, G_OPTION_ARG_NONE, &key_set, "Is the key already 
programmed", NULL},

total: 2 errors, 0 warnings, 72 lines checked

Patch 17/19 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

18/19 Checking commit 2bc1b7e86343 (tools/vhost-user-rpmb: allow setting of the 
write_count)
ERROR: line over 90 characters
#29: FILE: tools/vhost-user-rpmb/main.c:53:
+    { "initial-counter", 0, 0, G_OPTION_ARG_INT, &initial_counter, "Set 
initial value of write counter", NULL},

total: 1 errors, 0 warnings, 24 lines checked

Patch 18/19 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

19/19 Checking commit de934315542c (docs: add a man page for vhost-user-rpmb)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#22: 
new file mode 100644

ERROR: trailing whitespace
#71: FILE: docs/tools/vhost-user-rpmb.rst:45:
+            $

ERROR: trailing whitespace
#93: FILE: docs/tools/vhost-user-rpmb.rst:67:
+            $

ERROR: trailing whitespace
#102: FILE: docs/tools/vhost-user-rpmb.rst:76:
+  incremented by each write operation. $

total: 3 errors, 1 warnings, 106 lines checked

Patch 19/19 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
20200925125147.26943-1-alex.bennee@linaro.org/testing.checkpatch/?type=message">http://patchew.org/logs/20200925125147.26943-1-alex.bennee@linaro.org/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]