You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Joseph Wu <jo...@mesosphere.io> on 2019/11/19 23:06:58 UTC

Review Request 71790: SSL Socket: Implemented sendfile.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71790/
-----------------------------------------------------------

Review request for mesos, Benno Evers, Benjamin Mahler, Greg Mann, and Till Toenshoff.


Bugs: MESOS-10010
    https://issues.apache.org/jira/browse/MESOS-10010


Repository: mesos


Description
-------

This implements the SSL socket's sendfile method, which must read
the file (unlike the zero-copy os::sendfile).

This also moves a test exercising sendfile from process_tests.cpp
into http_tests.cpp and parameterizes it for SSL and non-SSL.


Diffs
-----

  3rdparty/libprocess/src/ssl/socket_wrapper.cpp PRE-CREATION 
  3rdparty/libprocess/src/tests/http_tests.cpp 1433f3d09a72133fab1441be53562d508bc01682 
  3rdparty/libprocess/src/tests/process_tests.cpp 05dc5ec2fdc74a989689e4378bef775bcf2b7a87 


Diff: https://reviews.apache.org/r/71790/diff/1/


Testing
-------

cmake --build . --target libprocess-tests
libprocess-tests


Thanks,

Joseph Wu


Re: Review Request 71790: SSL Socket: Implemented sendfile.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71790/#review219054
-----------------------------------------------------------


Ship it!




Ship It!

- Greg Mann


On Dec. 10, 2019, 11:55 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71790/
> -----------------------------------------------------------
> 
> (Updated Dec. 10, 2019, 11:55 p.m.)
> 
> 
> Review request for mesos, Benno Evers, Benjamin Mahler, Greg Mann, and Till Toenshoff.
> 
> 
> Bugs: MESOS-10010
>     https://issues.apache.org/jira/browse/MESOS-10010
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This implements the SSL socket's sendfile method, which must read
> the file (unlike the zero-copy os::sendfile).
> 
> This also moves a test exercising sendfile from process_tests.cpp
> into http_tests.cpp and parameterizes it for SSL and non-SSL.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/ssl/openssl_socket.cpp PRE-CREATION 
>   3rdparty/libprocess/src/tests/http_tests.cpp 1433f3d09a72133fab1441be53562d508bc01682 
>   3rdparty/libprocess/src/tests/process_tests.cpp 05dc5ec2fdc74a989689e4378bef775bcf2b7a87 
> 
> 
> Diff: https://reviews.apache.org/r/71790/diff/4/
> 
> 
> Testing
> -------
> 
> cmake --build . --target libprocess-tests
> libprocess-tests
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 71790: SSL Socket: Implemented sendfile.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71790/#review218992
-----------------------------------------------------------



Patch looks great!

Reviews applied: [71659, 71764, 71660, 71661, 71662, 71663, 71664, 71665, 71666, 71790]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers --disable-parallel-test-execution' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Dec. 10, 2019, 3:55 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71790/
> -----------------------------------------------------------
> 
> (Updated Dec. 10, 2019, 3:55 p.m.)
> 
> 
> Review request for mesos, Benno Evers, Benjamin Mahler, Greg Mann, and Till Toenshoff.
> 
> 
> Bugs: MESOS-10010
>     https://issues.apache.org/jira/browse/MESOS-10010
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This implements the SSL socket's sendfile method, which must read
> the file (unlike the zero-copy os::sendfile).
> 
> This also moves a test exercising sendfile from process_tests.cpp
> into http_tests.cpp and parameterizes it for SSL and non-SSL.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/ssl/openssl_socket.cpp PRE-CREATION 
>   3rdparty/libprocess/src/tests/http_tests.cpp 1433f3d09a72133fab1441be53562d508bc01682 
>   3rdparty/libprocess/src/tests/process_tests.cpp 05dc5ec2fdc74a989689e4378bef775bcf2b7a87 
> 
> 
> Diff: https://reviews.apache.org/r/71790/diff/3/
> 
> 
> Testing
> -------
> 
> cmake --build . --target libprocess-tests
> libprocess-tests
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 71790: SSL Socket: Implemented sendfile.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71790/#review219042
-----------------------------------------------------------



Patch looks great!

Reviews applied: [71659, 71764, 71660, 71661, 71662, 71663, 71664, 71665, 71666, 71790]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers --disable-parallel-test-execution' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Dec. 10, 2019, 11:55 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71790/
> -----------------------------------------------------------
> 
> (Updated Dec. 10, 2019, 11:55 p.m.)
> 
> 
> Review request for mesos, Benno Evers, Benjamin Mahler, Greg Mann, and Till Toenshoff.
> 
> 
> Bugs: MESOS-10010
>     https://issues.apache.org/jira/browse/MESOS-10010
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This implements the SSL socket's sendfile method, which must read
> the file (unlike the zero-copy os::sendfile).
> 
> This also moves a test exercising sendfile from process_tests.cpp
> into http_tests.cpp and parameterizes it for SSL and non-SSL.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/ssl/openssl_socket.cpp PRE-CREATION 
>   3rdparty/libprocess/src/tests/http_tests.cpp 1433f3d09a72133fab1441be53562d508bc01682 
>   3rdparty/libprocess/src/tests/process_tests.cpp 05dc5ec2fdc74a989689e4378bef775bcf2b7a87 
> 
> 
> Diff: https://reviews.apache.org/r/71790/diff/4/
> 
> 
> Testing
> -------
> 
> cmake --build . --target libprocess-tests
> libprocess-tests
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 71790: SSL Socket: Implemented sendfile.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71790/
-----------------------------------------------------------

(Updated Dec. 10, 2019, 3:55 p.m.)


Review request for mesos, Benno Evers, Benjamin Mahler, Greg Mann, and Till Toenshoff.


Changes
-------

Rebase on earlier rename.


Bugs: MESOS-10010
    https://issues.apache.org/jira/browse/MESOS-10010


Repository: mesos


Description
-------

This implements the SSL socket's sendfile method, which must read
the file (unlike the zero-copy os::sendfile).

This also moves a test exercising sendfile from process_tests.cpp
into http_tests.cpp and parameterizes it for SSL and non-SSL.


Diffs (updated)
-----

  3rdparty/libprocess/src/ssl/openssl_socket.cpp PRE-CREATION 
  3rdparty/libprocess/src/tests/http_tests.cpp 1433f3d09a72133fab1441be53562d508bc01682 
  3rdparty/libprocess/src/tests/process_tests.cpp 05dc5ec2fdc74a989689e4378bef775bcf2b7a87 


Diff: https://reviews.apache.org/r/71790/diff/3/

Changes: https://reviews.apache.org/r/71790/diff/2-3/


Testing
-------

cmake --build . --target libprocess-tests
libprocess-tests


Thanks,

Joseph Wu


Re: Review Request 71790: SSL Socket: Implemented sendfile.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71790/#review218714
-----------------------------------------------------------



Patch looks great!

Reviews applied: [71659, 71764, 71660, 71661, 71662, 71663, 71664, 71665, 71666, 71790]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers --disable-parallel-test-execution' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Nov. 20, 2019, 12:29 a.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71790/
> -----------------------------------------------------------
> 
> (Updated Nov. 20, 2019, 12:29 a.m.)
> 
> 
> Review request for mesos, Benno Evers, Benjamin Mahler, Greg Mann, and Till Toenshoff.
> 
> 
> Bugs: MESOS-10010
>     https://issues.apache.org/jira/browse/MESOS-10010
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This implements the SSL socket's sendfile method, which must read
> the file (unlike the zero-copy os::sendfile).
> 
> This also moves a test exercising sendfile from process_tests.cpp
> into http_tests.cpp and parameterizes it for SSL and non-SSL.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/ssl/socket_wrapper.cpp PRE-CREATION 
>   3rdparty/libprocess/src/tests/http_tests.cpp 1433f3d09a72133fab1441be53562d508bc01682 
>   3rdparty/libprocess/src/tests/process_tests.cpp 05dc5ec2fdc74a989689e4378bef775bcf2b7a87 
> 
> 
> Diff: https://reviews.apache.org/r/71790/diff/2/
> 
> 
> Testing
> -------
> 
> cmake --build . --target libprocess-tests
> libprocess-tests
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 71790: SSL Socket: Implemented sendfile.

Posted by Greg Mann <gr...@mesosphere.io>.

> On Nov. 20, 2019, 3:53 a.m., Benjamin Mahler wrote:
> > Are you aware of kTLS?
> > 
> > E.g. https://blog.filippo.io/playing-with-kernel-tls-in-linux-4-13-and-go/
> 
> Greg Mann wrote:
>     Cool feature!! Although it landed in 4.13, so I don't think we could use it? Sounds like it's also not full-featured enough to replace much functionality here, it doesn't support handshakes or decryption:
>     ```
>     Moreover, only encryption is supported, not decryption. This wasn't clear to me until I failed to find the TLS_RX constant.
>     
>     These limitations are very good to contain complexity and attack surface, but they mean that kTLS won't replace any userspace complexity as you still need a TLS library to do the handshake, for all other cipher suites, and for the receiving side of the connection. That makes kTLS purely a performance feature.
>     ```

Ah sorry, I see why you left this on the `sendfile()` patch, that feature was added to facilitate improved `sendfile()` performance :)

Would be cool, but seems hard for us to use if it only landed in 4.13?


- Greg


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71790/#review218712
-----------------------------------------------------------


On Nov. 20, 2019, 12:29 a.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71790/
> -----------------------------------------------------------
> 
> (Updated Nov. 20, 2019, 12:29 a.m.)
> 
> 
> Review request for mesos, Benno Evers, Benjamin Mahler, Greg Mann, and Till Toenshoff.
> 
> 
> Bugs: MESOS-10010
>     https://issues.apache.org/jira/browse/MESOS-10010
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This implements the SSL socket's sendfile method, which must read
> the file (unlike the zero-copy os::sendfile).
> 
> This also moves a test exercising sendfile from process_tests.cpp
> into http_tests.cpp and parameterizes it for SSL and non-SSL.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/ssl/socket_wrapper.cpp PRE-CREATION 
>   3rdparty/libprocess/src/tests/http_tests.cpp 1433f3d09a72133fab1441be53562d508bc01682 
>   3rdparty/libprocess/src/tests/process_tests.cpp 05dc5ec2fdc74a989689e4378bef775bcf2b7a87 
> 
> 
> Diff: https://reviews.apache.org/r/71790/diff/2/
> 
> 
> Testing
> -------
> 
> cmake --build . --target libprocess-tests
> libprocess-tests
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 71790: SSL Socket: Implemented sendfile.

Posted by Greg Mann <gr...@mesosphere.io>.

> On Nov. 20, 2019, 3:53 a.m., Benjamin Mahler wrote:
> > Are you aware of kTLS?
> > 
> > E.g. https://blog.filippo.io/playing-with-kernel-tls-in-linux-4-13-and-go/

Cool feature!! Although it landed in 4.13, so I don't think we could use it? Sounds like it's also not full-featured enough to replace much functionality here, it doesn't support handshakes or decryption:
```
Moreover, only encryption is supported, not decryption. This wasn't clear to me until I failed to find the TLS_RX constant.

These limitations are very good to contain complexity and attack surface, but they mean that kTLS won't replace any userspace complexity as you still need a TLS library to do the handshake, for all other cipher suites, and for the receiving side of the connection. That makes kTLS purely a performance feature.
```


- Greg


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71790/#review218712
-----------------------------------------------------------


On Nov. 20, 2019, 12:29 a.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71790/
> -----------------------------------------------------------
> 
> (Updated Nov. 20, 2019, 12:29 a.m.)
> 
> 
> Review request for mesos, Benno Evers, Benjamin Mahler, Greg Mann, and Till Toenshoff.
> 
> 
> Bugs: MESOS-10010
>     https://issues.apache.org/jira/browse/MESOS-10010
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This implements the SSL socket's sendfile method, which must read
> the file (unlike the zero-copy os::sendfile).
> 
> This also moves a test exercising sendfile from process_tests.cpp
> into http_tests.cpp and parameterizes it for SSL and non-SSL.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/ssl/socket_wrapper.cpp PRE-CREATION 
>   3rdparty/libprocess/src/tests/http_tests.cpp 1433f3d09a72133fab1441be53562d508bc01682 
>   3rdparty/libprocess/src/tests/process_tests.cpp 05dc5ec2fdc74a989689e4378bef775bcf2b7a87 
> 
> 
> Diff: https://reviews.apache.org/r/71790/diff/2/
> 
> 
> Testing
> -------
> 
> cmake --build . --target libprocess-tests
> libprocess-tests
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 71790: SSL Socket: Implemented sendfile.

Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71790/#review218712
-----------------------------------------------------------



Are you aware of kTLS?

E.g. https://blog.filippo.io/playing-with-kernel-tls-in-linux-4-13-and-go/

- Benjamin Mahler


On Nov. 20, 2019, 12:29 a.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71790/
> -----------------------------------------------------------
> 
> (Updated Nov. 20, 2019, 12:29 a.m.)
> 
> 
> Review request for mesos, Benno Evers, Benjamin Mahler, Greg Mann, and Till Toenshoff.
> 
> 
> Bugs: MESOS-10010
>     https://issues.apache.org/jira/browse/MESOS-10010
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This implements the SSL socket's sendfile method, which must read
> the file (unlike the zero-copy os::sendfile).
> 
> This also moves a test exercising sendfile from process_tests.cpp
> into http_tests.cpp and parameterizes it for SSL and non-SSL.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/ssl/socket_wrapper.cpp PRE-CREATION 
>   3rdparty/libprocess/src/tests/http_tests.cpp 1433f3d09a72133fab1441be53562d508bc01682 
>   3rdparty/libprocess/src/tests/process_tests.cpp 05dc5ec2fdc74a989689e4378bef775bcf2b7a87 
> 
> 
> Diff: https://reviews.apache.org/r/71790/diff/2/
> 
> 
> Testing
> -------
> 
> cmake --build . --target libprocess-tests
> libprocess-tests
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 71790: SSL Socket: Implemented sendfile.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71790/
-----------------------------------------------------------

(Updated Nov. 19, 2019, 4:29 p.m.)


Review request for mesos, Benno Evers, Benjamin Mahler, Greg Mann, and Till Toenshoff.


Changes
-------

Rebase on top of compute_thread and shutdown changes.


Bugs: MESOS-10010
    https://issues.apache.org/jira/browse/MESOS-10010


Repository: mesos


Description
-------

This implements the SSL socket's sendfile method, which must read
the file (unlike the zero-copy os::sendfile).

This also moves a test exercising sendfile from process_tests.cpp
into http_tests.cpp and parameterizes it for SSL and non-SSL.


Diffs (updated)
-----

  3rdparty/libprocess/src/ssl/socket_wrapper.cpp PRE-CREATION 
  3rdparty/libprocess/src/tests/http_tests.cpp 1433f3d09a72133fab1441be53562d508bc01682 
  3rdparty/libprocess/src/tests/process_tests.cpp 05dc5ec2fdc74a989689e4378bef775bcf2b7a87 


Diff: https://reviews.apache.org/r/71790/diff/2/

Changes: https://reviews.apache.org/r/71790/diff/1-2/


Testing
-------

cmake --build . --target libprocess-tests
libprocess-tests


Thanks,

Joseph Wu