History log of /freebsd/sys/kern/kern_sendfile.c (Results 101 – 125 of 133)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 009ad572 10-Oct-2017 Sean Bruno <sbruno@FreeBSD.org>

Revert r324405 at the request of the submitter pending better solution.

Submitted by: Jason Eggleston <jason@eggnet.com>
Sponsored by: Limelight Networks


# 9c82bec4 09-Oct-2017 Gleb Smirnoff <glebius@FreeBSD.org>

Improvements to sendfile(2) mbuf free routine.

o Fall back to default m_ext free mech, using function pointer in
m_ext_free, and remove sf_ext_free() called directly from mbuf code.
Testing on m

Improvements to sendfile(2) mbuf free routine.

o Fall back to default m_ext free mech, using function pointer in
m_ext_free, and remove sf_ext_free() called directly from mbuf code.
Testing on modern CPUs showed no regression.
o Provide internally used flag EXT_FLAG_SYNC, to mark that I/O uses
SF_SYNC flag. Lack of the flag allows us not to dereference
ext_arg2, saving from a cache line miss.
o Create function sendfile_free_page() that later will be used, for
multi-page mbufs. For now compiler will inline it into
sendfile_free_mext().

In collaboration with: gallatin
Differential Revision: https://reviews.freebsd.org/D12615

show more ...


# 75c8dfb6 08-Oct-2017 Sean Bruno <sbruno@FreeBSD.org>

Check so_error early in sendfile() call. Prior to this patch, if a
connection was reset by the remote end, sendfile() would just report
ENOTCONN instead of ECONNRESET.

Submitted by: Jason Eggleston

Check so_error early in sendfile() call. Prior to this patch, if a
connection was reset by the remote end, sendfile() would just report
ENOTCONN instead of ECONNRESET.

Submitted by: Jason Eggleston <jason@eggnet.com>
Reviewed by: glebius
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12575

show more ...


Revision tags: release/10.4.0
# 8fcbcc2d 16-Sep-2017 Enji Cooper <ngie@FreeBSD.org>

MFhead@r323635


# d37aa3cc 14-Sep-2017 Gleb Smirnoff <glebius@FreeBSD.org>

Use soref() in sendfile(2) instead fhold() to reference a socket.

The problem is that fdrop() requires syscall context, as it may
enter sleep in some cases. The reason to use it in the original
non

Use soref() in sendfile(2) instead fhold() to reference a socket.

The problem is that fdrop() requires syscall context, as it may
enter sleep in some cases. The reason to use it in the original
non-blocking sendfile implementation, was to avoid use of global
ACCEPT_LOCK() on every I/O completion. Now in head sorele() no
longer requires this lock.

show more ...


# 1409e715 21-Aug-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Merge ^/head r322398 through r322746.


# 083c8ded 13-Aug-2017 Enji Cooper <ngie@FreeBSD.org>

MFhead@r322451


# af0460be 11-Aug-2017 Mark Johnston <markj@FreeBSD.org>

Have sendfile_swapin() use vm_page_grab_pages().

Reviewed by: alc, kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D11942


# 6921451d 11-Aug-2017 Alan Cox <alc@FreeBSD.org>

An invalid page can't be dirty.

Reviewed by: kib
MFC after: 1 week


# 0275f9db 11-Aug-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Merge ^/head r321383 through r322397.


# ef3266d5 09-Aug-2017 Gleb Smirnoff <glebius@FreeBSD.org>

Plug uninitialized stack variable leak in sendfile(2).

Reported by: Ilja Van Sprundel <ivansprundel ioactive.com>
Submitted by: Domagoj Stolfa <domagoj.stolfa gmail.com>
MFC after: 1 week
Security:

Plug uninitialized stack variable leak in sendfile(2).

Reported by: Ilja Van Sprundel <ivansprundel ioactive.com>
Submitted by: Domagoj Stolfa <domagoj.stolfa gmail.com>
MFC after: 1 week
Security: uninitialized stack variable leak

show more ...


Revision tags: release/11.1.0
# a14eb6db 03-Jun-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r319480 through r319547.


# d712b799 03-Jun-2017 Alan Cox <alc@FreeBSD.org>

The data type returned by vmoff() is too narrow in its range. This could
break the transmission of files longer than 4 GB on 32-bit architectures.

Reviewed by: glebius, kib
MFC after: 1 week
Differ

The data type returned by vmoff() is too narrow in its range. This could
break the transmission of files longer than 4 GB on 32-bit architectures.

Reviewed by: glebius, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D10019

show more ...


# 9e3c8bd3 24-Mar-2017 Gleb Smirnoff <glebius@FreeBSD.org>

Make sendfile(2) more robust against file change. This fixes a possible
crash when the file shrinks. This also fixes sendfile(2) not sending more
data in a case when the file grows, and the request

Make sendfile(2) more robust against file change. This fixes a possible
crash when the file shrinks. This also fixes sendfile(2) not sending more
data in a case when the file grows, and the request is open-ended or
specifies a size that is greater than old file size.

PR: 217789
Reviewed by: gallatin
MFC after: 10 days

show more ...


# 2b532af8 05-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r311314 through r311459.


# bfc8c24c 04-Jan-2017 Gleb Smirnoff <glebius@FreeBSD.org>

Move bogus_page declaration to vm_page.h and initialization to vm_page.c.

Reviewed by: kib


# 67bc8c8b 19-Nov-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r308491 through r308841.


# 00b5ffde 17-Nov-2016 Gleb Smirnoff <glebius@FreeBSD.org>

Add flag SF_USER_READAHEAD to sendfile(2). When specified, the syscall won't
do any speculations about readahead, and use exactly the amount of readahead
specified by user. E.g. setting SF_FLAGS(0,

Add flag SF_USER_READAHEAD to sendfile(2). When specified, the syscall won't
do any speculations about readahead, and use exactly the amount of readahead
specified by user. E.g. setting SF_FLAGS(0, SF_USER_READAHEAD) will guarantee
that no readahead at all will be performed.

show more ...


# 5dba303d 17-Nov-2016 Gleb Smirnoff <glebius@FreeBSD.org>

Use bogus_page to properly reduce number of I/Os in sendfile(2). The new
sendfile_swapin() loop works this way:

- Find first invalid page in the request.
- Do vm_pager_has_page() and get count of p

Use bogus_page to properly reduce number of I/Os in sendfile(2). The new
sendfile_swapin() loop works this way:

- Find first invalid page in the request.
- Do vm_pager_has_page() and get count of pages, that can be taken in
single I/O.
- Trim valid pages from the end of the request.
- Cycle through the request and substitute to bogus_page all valid
pages that are in the middle of the request.
- After I/O launched (pager copies array of pages into buf(9), it
is important to restore proper page pointers with help vm_page_lookup().

Count bogus pages used and report them in sendfile stats.

show more ...


Revision tags: release/11.0.1
# 8c4282b3 24-Sep-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r305892 through r306302.


# a2d8f9d2 22-Sep-2016 Gleb Smirnoff <glebius@FreeBSD.org>

Fix regression from r297400, which truncates headers in case of low socket
buffer and put a small optimization for low socket buffer case:

- Do not hack uio_resid, and let m_uiotombuf() properly tak

Fix regression from r297400, which truncates headers in case of low socket
buffer and put a small optimization for low socket buffer case:

- Do not hack uio_resid, and let m_uiotombuf() properly take care of it. This
fixes truncation of headers at low buffer.
- If headers ate all the space, jump right to the end of the cycle, to
avoid doing single page I/O and allocating zero length mbuf.
- Clear hdr_uio only if space is positive, which indicates that all uio
was copied in.

Reviewed by: pluknet, jtl, emax, rrs, lstewart, emax, gallatin, scottl

show more ...


Revision tags: release/11.0.0
# 85b0f9de 22-Sep-2016 Mariusz Zaborski <oshogbo@FreeBSD.org>

capsicum: propagate rights on accept(2)

Descriptor returned by accept(2) should inherits capabilities rights from
the listening socket.

PR: 201052
Reviewed by: emaste, jonathan
Discussed with: man

capsicum: propagate rights on accept(2)

Descriptor returned by accept(2) should inherits capabilities rights from
the listening socket.

PR: 201052
Reviewed by: emaste, jonathan
Discussed with: many
Differential Revision: https://reviews.freebsd.org/D7724

show more ...


# 93badfa1 16-Sep-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r305687 through r305890.


# 69a28758 15-Sep-2016 Ed Maste <emaste@FreeBSD.org>

Renumber license clauses in sys/kern to avoid skipping #3


# d6084013 05-Apr-2016 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: The FreeBSD Foundation


123456