Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-04-05 Thread Joe Damato
I misunderstood your prior message and/or > misconstrued what you said -- it was not clear to me what you meant. I think what added to my confusion here was this bit, Jens: > > As far as the bit about plumbing only the splice bits, sorry if I'm > > being dense here, do

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-04-04 Thread Stefan Metzmacher
you can do it simpler this other way, why not consider that? The end result would be the same, you can do fast sendfile() with sane buffer reuse. But the kernel side would be simpler, which is always a kernel main goal for those of us that have to maintain it. Just adding sendfile2() works in the

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-04-04 Thread Stefan Metzmacher
, 2025 at 01:04:48AM -0700, Christoph Hellwig wrote: On Wed, Mar 19, 2025 at 12:15:11AM +, Joe Damato wrote: One way to fix this is to add zerocopy notifications to sendfile similar to how MSG_ZEROCOPY works with sendmsg. This is possible thanks to the extensive work done by Pavel [1]. What

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-04-04 Thread Jens Axboe
On 3/19/25 5:22 PM, Joe Damato wrote: > Would you be open to the idea that sendfile could be extended to > generate error queue completions if the network socket has > SO_ZEROCOPY set? I thought I was quite clear on my view of SO_ZEROCOPY and its error queue usage, I guess I was not. N

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-25 Thread Christoph Hellwig
On Thu, Mar 20, 2025 at 11:23:57AM -0700, Joe Damato wrote: > In my other message to Jens I proposed: > - SPLICE_F_ZC for splice to generate zc completion notifications > to the error queue > - Modifying sendfile so that if SO_ZEROCOPY (which already exists) > is s

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-22 Thread Jens Axboe
in other messages, it seems like it is >> possible to improve the networking parts of splice (and therefore >> sendfile) to make them safer to use without introducing a new system >> call. >> >> Are you saying that you are against doing that, even if the code is

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-21 Thread Jens Axboe
would seem saner to > plumb up those bits only. Would be much simpler too... > > wherein I interpreted "plumb those bits" to mean plumbing the error > queue notifications on TX completions. > > My sincere apologies that I misunderstood your prior message and/or > misc

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-21 Thread Joe Damato
logies that I misunderstood your prior message and/or > >> misconstrued what you said -- it was not clear to me what you meant. > > > > I think what added to my confusion here was this bit, Jens: > > > > > > As far as the bit about plumbing only

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-21 Thread Pavel Begunkov
would be the same as for other features - if you can do it simpler this other way, why not consider that? The end result would be the same, you can do fast sendfile() with sane buffer reuse. But the kernel side would be simpler, which is always a kernel main goal for those of us that have to maintain

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-21 Thread Jens Axboe
ean plumbing the error >> queue notifications on TX completions. >> >> My sincere apologies that I misunderstood your prior message and/or >> misconstrued what you said -- it was not clear to me what you meant. > > I think what added to my confusion here was this bit, Je

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-21 Thread Joe Damato
On Thu, Mar 20, 2025 at 10:56:15PM -0700, Christoph Hellwig wrote: > On Thu, Mar 20, 2025 at 11:23:57AM -0700, Joe Damato wrote: > > In my other message to Jens I proposed: > > - SPLICE_F_ZC for splice to generate zc completion notifications > > to the error queue >

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-21 Thread Joe Damato
ose bits" to mean plumbing the error queue notifications on TX completions. My sincere apologies that I misunderstood your prior message and/or misconstrued what you said -- it was not clear to me what you meant. It is clear to me now, though, that adding a flag to splice as previously prop

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-21 Thread Jens Axboe
On 3/19/25 1:16 PM, Joe Damato wrote: >>> In general: it does seem a bit odd to me that there isn't a safe >>> sendfile syscall in Linux that uses existing completion notification >>> mechanisms. >> >> Pretty natural, I think. sendfile(2) predates that

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-20 Thread Joe Damato
; > So if you don't know that why do you even do the work? I am doing the work because I use splice and sendfile and it seems relatively straightforward to make them safer using an existing mechanism, at least for network sockets. After dropping the sendfile2 patches completely, it l

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-20 Thread Joe Damato
or splice. I'll wait a bit to hear what Jens thinks about the SO_ZEROCOPY thing (basically: if a network socket has that option set, maybe the existing sendfile can generate error queue completions without needing a separate system call?). I agree overall that sendfile2 or sendmsg2 or whatever els

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-20 Thread Pavel Begunkov
consider that? The end result would be the same, you can do fast sendfile() with sane buffer reuse. But the kernel side would be simpler, which is always a kernel main goal for those of us that have to maintain it. Just adding sendfile2() works in the sense that it's an easier drop in replacemen

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-19 Thread Christoph Hellwig
s seem a bit odd to me that there isn't a safe > sendfile syscall in Linux that uses existing completion notification > mechanisms. Agreed. Where the existing notification mechanism is called io_uring. > Of course, I certainly agree that the error queue is a work around. > But it wor

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-19 Thread Christoph Hellwig
On Wed, Mar 19, 2025 at 08:32:19AM -0700, Joe Damato wrote: > See the docs on MSG_ZEROCOPY [1], but in short when a user app calls > sendmsg and passes MSG_ZEROCOPY a completion notification is added > to the error queue. The user app can poll for these to find out when > the TX has completed and t

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-19 Thread Joe Damato
add zerocopy notifications to sendfile similar > >>> to how MSG_ZEROCOPY works with sendmsg. This is possible thanks to the > >>> extensive work done by Pavel [1]. > >> > >> What is a "zerocopy notification" > > > > See the docs

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-19 Thread Joe Damato
add zerocopy notifications to sendfile similar > >>> to how MSG_ZEROCOPY works with sendmsg. This is possible thanks to the > >>> extensive work done by Pavel [1]. > >> > >> What is a "zerocopy notification" > > > > See the docs

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-19 Thread Joe Damato
wrote: > >>>> On 3/19/25 9:32 AM, Joe Damato wrote: > >>>>> On Wed, Mar 19, 2025 at 01:04:48AM -0700, Christoph Hellwig wrote: > >>>>>> On Wed, Mar 19, 2025 at 12:15:11AM +, Joe Damato wrote: > >>>>>>> One way to fix t

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-19 Thread Jens Axboe
> On Wed, Mar 19, 2025 at 01:04:48AM -0700, Christoph Hellwig wrote: >>>>>> On Wed, Mar 19, 2025 at 12:15:11AM +, Joe Damato wrote: >>>>>>> One way to fix this is to add zerocopy notifications to sendfile similar >>>>>>> to ho

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-19 Thread Joe Damato
On Wed, Mar 19, 2025 at 01:04:48AM -0700, Christoph Hellwig wrote: > On Wed, Mar 19, 2025 at 12:15:11AM +, Joe Damato wrote: > > One way to fix this is to add zerocopy notifications to sendfile similar > > to how MSG_ZEROCOPY works with sendmsg. This is possible thanks to th

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-19 Thread Joe Damato
h Hellwig wrote: > >>>> On Wed, Mar 19, 2025 at 12:15:11AM +, Joe Damato wrote: > >>>>> One way to fix this is to add zerocopy notifications to sendfile similar > >>>>> to how MSG_ZEROCOPY works with sendmsg. This is possible thanks to the > &g

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-19 Thread Jens Axboe
to wrote: >>>>> One way to fix this is to add zerocopy notifications to sendfile similar >>>>> to how MSG_ZEROCOPY works with sendmsg. This is possible thanks to the >>>>> extensive work done by Pavel [1]. >>>> >>>> What is a &q

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-19 Thread Jens Axboe
On 3/19/25 9:32 AM, Joe Damato wrote: > On Wed, Mar 19, 2025 at 01:04:48AM -0700, Christoph Hellwig wrote: >> On Wed, Mar 19, 2025 at 12:15:11AM +, Joe Damato wrote: >>> One way to fix this is to add zerocopy notifications to sendfile similar >>> to how MSG_ZEROCOPY

Re: [RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-19 Thread Christoph Hellwig
On Wed, Mar 19, 2025 at 12:15:11AM +, Joe Damato wrote: > One way to fix this is to add zerocopy notifications to sendfile similar > to how MSG_ZEROCOPY works with sendmsg. This is possible thanks to the > extensive work done by Pavel [1]. What is a "zerocopy notification"

[RFC -next 10/10] selftests: Add sendfile zerocopy notification test

2025-03-18 Thread Joe Damato
Extend the existing the msg_zerocopy test to allow testing sendfile to ensure that notifications are generated. Signed-off-by: Joe Damato --- tools/testing/selftests/net/msg_zerocopy.c | 54 - tools/testing/selftests/net/msg_zerocopy.sh | 5 ++ 2 files changed, 58

[RFC -next 08/10] fs: Add sendfile flags for sendfile2

2025-03-18 Thread Joe Damato
e mode 100644 index ..0bd3c76ea6f2 --- /dev/null +++ b/include/linux/sendfile.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef SENDFILE_H +#define SENDFILE_H + +#define SENDFILE_DEFAULT (0x1) /* normal sendfile */ +#define SENDFILE_ZC (0x2) /* sendfile

[RFC -next 00/10] Add ZC notifications to splice and sendfile

2025-03-18 Thread Joe Damato
Greetings: Welcome to the RFC. Currently, when a user app uses sendfile the user app has no way to know if the bytes were transmit; sendfile simply returns, but it is possible that a slow client on the other side may take time to receive and ACK the bytes. In the meantime, the user app which

Re: [git pull] sendfile fixes

2021-02-21 Thread pr-tracker-bot
The pull request you sent on Sun, 14 Feb 2021 15:19:27 +: > git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.sendfile has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/054560e961a0ee4067fccfcfa943335e1aa48928 Thank you! -- Deet-doot-dot, I am a bot.

Re: [git pull] sendfile fixes

2021-02-14 Thread Al Viro
On Sun, Feb 14, 2021 at 11:35:36AM -0800, Linus Torvalds wrote: > Just to clarify: this says "fixes", but I get the feeling that you > meant for me to pull tomorrow in the 5.12 merge window? > > I like the patches, but they don't seem to be anything hugely urgent. >

Re: [git pull] sendfile fixes

2021-02-14 Thread Linus Torvalds
On Sun, Feb 14, 2021 at 7:19 AM Al Viro wrote: > > Making sendfile() to pipe destination do the right thing, should > make "fs/pipe: allow sendfile() to pipe again" redundant. Sat in -next > for 3 weeks... Just to clarify: this says "fixes", but I get t

[git pull] sendfile fixes

2021-02-14 Thread Al Viro
Making sendfile() to pipe destination do the right thing, should make "fs/pipe: allow sendfile() to pipe again" redundant. Sat in -next for 3 weeks... The following changes since commit 5c8fe583cce542aa0b84adc939ce85293de36e5e: Linux 5.11-rc1 (2020-12-27 15:30:22 -0800) are

Re: [PATCH 3/3] teach sendfile(2) to handle send-to-pipe directly

2021-01-26 Thread Al Viro
On Tue, Jan 26, 2021 at 10:57:38AM -0800, Linus Torvalds wrote: > On Mon, Jan 25, 2021 at 10:09 PM Al Viro wrote: > > > > no point going through the intermediate pipe > > Ok, this series looks fine to me. > > Al - do you want me to apply this as patches for 5.11 (and I'll revert > the then unnec

Re: [PATCH 3/3] teach sendfile(2) to handle send-to-pipe directly

2021-01-26 Thread Linus Torvalds
On Mon, Jan 25, 2021 at 10:09 PM Al Viro wrote: > > no point going through the intermediate pipe Ok, this series looks fine to me. Al - do you want me to apply this as patches for 5.11 (and I'll revert the then unnecessary one-liner), or should I expect a pull request or what? Lin

[PATCH] fs/pipe: allow sendfile() to pipe again

2021-01-26 Thread Johannes Berg
After commit 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") sendfile() could no longer send data from a real file to a pipe, breaking for example certain cgit setups (e.g. when running behind fcgiwrap), because in this case cgit will try to do exactly this:

Re: [PATCH] fs/pipe: allow sendfile() to pipe again

2021-01-26 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

[PATCH 3/3] teach sendfile(2) to handle send-to-pipe directly

2021-01-26 Thread Al Viro
no point going through the intermediate pipe Signed-off-by: Al Viro --- fs/internal.h | 9 + fs/read_write.c | 19 +-- fs/splice.c | 2 +- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/fs/internal.h b/fs/internal.h index 77c50befbfbe..cff1f30cfef

Re: [PATCH] fs/pipe: allow sendfile() to pipe again

2021-01-25 Thread Linus Torvalds
On Mon, Jan 25, 2021 at 1:16 AM Johannes Berg wrote: > > Mostly for the record, since it looks like we'll have a proper > fix without another intermediate pipe. However, this fixes the > regression for now. I've applied this anyway. We'll see how big Al's proper fix ends up being, and depending

Re: restore splice and sendfile support on kernfs

2021-01-21 Thread Robert Karszniewicz
On 1/20/21 9:46 PM, Christoph Hellwig wrote: > Hi Greg and Tejun, > > this fixes a regression in Linux 5.10 that stopped sendfile and splice > from working on kernfs/sysfs files. > > Diffstt: > file.c | 65 > ---

Re: restore splice and sendfile support on kernfs

2021-01-21 Thread Greg Kroah-Hartman
On Wed, Jan 20, 2021 at 09:46:28PM +0100, Christoph Hellwig wrote: > Hi Greg and Tejun, > > this fixes a regression in Linux 5.10 that stopped sendfile and splice > from working on kernfs/sysfs files. > > Diffstt

restore splice and sendfile support on kernfs

2021-01-20 Thread Christoph Hellwig
Hi Greg and Tejun, this fixes a regression in Linux 5.10 that stopped sendfile and splice from working on kernfs/sysfs files. Diffstt: file.c | 65 - 1 file changed, 24 insertions(+), 41 deletions(-)

Re: PROBLEM: Firmware loader fallback mechanism no longer works with sendfile

2021-01-20 Thread Siddharth Gupta
On 1/20/2021 1:10 AM, Christoph Hellwig wrote: Can you give this patch a spin? Thanks! This patch fixed the fallback mechanism for me. Attaching logs: [   84.410162][  T244] qcom_q6v5_pas .remoteproc-cdsp: Direct firmware load for cdsp.bX failed with error -2 [   84.418276][  T244] q

Re: PROBLEM: Firmware loader fallback mechanism no longer works with sendfile

2021-01-20 Thread Christoph Hellwig
Can you give this patch a spin? diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c index f277d023ebcd14..4b5833b3059f9c 100644 --- a/fs/kernfs/file.c +++ b/fs/kernfs/file.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "kernfs-internal.h" @@ -180,11 +181,10 @@ static c

Re: PROBLEM: Firmware loader fallback mechanism no longer works with sendfile

2021-01-17 Thread Siddharth Gupta
lice_{read,write} functions the calls to splice_{read,write} used the default kernel_{read,write} functions. With the above change this results in an -EINVAL return from do_splice_from[4]. This essentially means that sendfile will not work for any binary attribute in the sysfs. Have you tried fixing

Re: PROBLEM: Firmware loader fallback mechanism no longer works with sendfile

2021-01-15 Thread Greg KH
ge this results in an -EINVAL return from > > > > > > > do_splice_from[4]. > > > > > > > > > > > > > > This essentially means that sendfile will not work for any binary > > > > > > > attribute > > > > > &g

Re: PROBLEM: Firmware loader fallback mechanism no longer works with sendfile

2021-01-12 Thread Siddharth Gupta
tions. With the above change this results in an -EINVAL return from do_splice_from[4]. This essentially means that sendfile will not work for any binary attribute in the sysfs. Have you tried fixing this with a patch much like what we did for the proc files that needed this? If not, can you? I a

Re: PROBLEM: Firmware loader fallback mechanism no longer works with sendfile

2021-01-08 Thread Greg KH
the default kernel_{read,write} > > > > > functions. > > > > > With the above change this results in an -EINVAL return from > > > > > do_splice_from[4]. > > > > > > > > > > This essentially means that sendfile will not wo

Re: PROBLEM: Firmware loader fallback mechanism no longer works with sendfile

2021-01-07 Thread Siddharth Gupta
plice read/write without explicit ops"[1] the fallback mechanism of the firmware loader[2] no longer works when using sendfile[3] from the userspace. What userspace program are you using to load firmware? The userspace program is in the android userspace which listens to a uevent from the firm

Re: PROBLEM: Firmware loader fallback mechanism no longer works with sendfile

2021-01-06 Thread Greg KH
don't allow splice > > > read/write without explicit ops"[1] the fallback mechanism of the firmware > > > loader[2] no longer works when using sendfile[3] from the userspace. > > What userspace program are you using to load firmware? > The userspace program is

Re: PROBLEM: Firmware loader fallback mechanism no longer works with sendfile

2021-01-05 Thread Siddharth Gupta
orks when using sendfile[3] from the userspace. What userspace program are you using to load firmware? The userspace program is in the android userspace which listens to a uevent from the firmware loader and then loads the firmware using sendfile[1]. Are you not using the in-kernel firmware

Re: PROBLEM: Firmware loader fallback mechanism no longer works with sendfile

2021-01-04 Thread Greg KH
On Mon, Jan 04, 2021 at 02:43:45PM -0800, Siddharth Gupta wrote: > Hi all, > > With the introduction of the filesystem change "fs: don't allow splice > read/write without explicit ops"[1] the fallback mechanism of the firmware > loader[2] no longer works when using

PROBLEM: Firmware loader fallback mechanism no longer works with sendfile

2021-01-04 Thread Siddharth Gupta
Hi all, With the introduction of the filesystem change "fs: don't allow splice read/write without explicit ops"[1] the fallback mechanism of the firmware loader[2] no longer works when using sendfile[3] from the userspace. Since the binary attributes don't suppor

[PATCH 5.8 015/633] net/tls: sendfile fails with ktls offload

2020-10-27 Thread Greg Kroah-Hartman
From: Rohit Maheshwari [ Upstream commit ea1dd3e9d080c961b9a451130b61c72dc9a5397b ] At first when sendpage gets called, if there is more data, 'more' in tls_push_data() gets set which later sets pending_open_record_frags, but when there is no more data in file left, and last time tls_push_data()

[PATCH 5.9 017/757] net/tls: sendfile fails with ktls offload

2020-10-27 Thread Greg Kroah-Hartman
From: Rohit Maheshwari [ Upstream commit ea1dd3e9d080c961b9a451130b61c72dc9a5397b ] At first when sendpage gets called, if there is more data, 'more' in tls_push_data() gets set which later sets pending_open_record_frags, but when there is no more data in file left, and last time tls_push_data()

[PATCH 5.4 009/408] net/tls: sendfile fails with ktls offload

2020-10-27 Thread Greg Kroah-Hartman
From: Rohit Maheshwari [ Upstream commit ea1dd3e9d080c961b9a451130b61c72dc9a5397b ] At first when sendpage gets called, if there is more data, 'more' in tls_push_data() gets set which later sets pending_open_record_frags, but when there is no more data in file left, and last time tls_push_data()

[PATCH 4.19 013/264] net/tls: sendfile fails with ktls offload

2020-10-27 Thread Greg Kroah-Hartman
From: Rohit Maheshwari [ Upstream commit ea1dd3e9d080c961b9a451130b61c72dc9a5397b ] At first when sendpage gets called, if there is more data, 'more' in tls_push_data() gets set which later sets pending_open_record_frags, but when there is no more data in file left, and last time tls_push_data()

[tip:perf/core] perf trace: Add "sendfile64" alias to the "sendfile" syscall

2019-07-30 Thread tip-bot for Arnaldo Carvalho de Melo
perf trace: Add "sendfile64" alias to the "sendfile" syscall We were looking in tracefs for: /sys/kernel/debug/tracing/events/syscalls/sys_enter_sendfile/format when what is there is just /sys/kernel/debug/tracing/events/syscalls/sys_enter_sendfile/format Its the same

[PATCH 027/107] perf trace: Add "sendfile64" alias to the "sendfile" syscall

2019-07-29 Thread Arnaldo Carvalho de Melo
*/ }, [1] = { .scnprintf = SCA_SECCOMP_FLAGS, /* flags */ }, }, }, { .name = "select", .timeout = true, }, + { .name = "sendfile", .alias = "sendfile64", }, { .name = "sendmmsg", .arg = { [3]

[PATCH 34/37] perf trace: Add "sendfile64" alias to the "sendfile" syscall

2019-07-22 Thread Arnaldo Carvalho de Melo
*/ }, [1] = { .scnprintf = SCA_SECCOMP_FLAGS, /* flags */ }, }, }, { .name = "select", .timeout = true, }, + { .name = "sendfile", .alias = "sendfile64", }, { .name = "sendmmsg", .arg = { [3]

[PATCH] splice: sendfile() softlockup for big files

2019-03-17 Thread chenjie6
From: chen jie sendfile() softlockup for big files [34922.213193] [Softlockup Clock][34922213187422] [34922.213204] BUG: soft lockup - CPU#1 stuck for 60008ms! [trinity-c1:20239] [34922.213211] Modules linked in: rtos_snapshot(O) rsm(O) nfsv3 veth(O) higmac(O) comm(O) nand mtdblock mtd_blkdevs

[PATCH 3.18 117/144] vfs: Make sendfile(2) killable even better

2018-11-08 Thread Greg Kroah-Hartman
3.18-stable review patch. If anyone has any objections, please let me know. -- [ Upstream commit c725bfce7968009756ed2836a8cd7ba4dc163011 ] Commit 296291cdd162 (mm: make sendfile(2) killable) fixed an issue where sendfile(2) was doing a lot of tiny writes into a filesystem and

[PATCH AUTOSEL 3.18 89/98] vfs: Make sendfile(2) killable even better

2018-10-25 Thread Sasha Levin
From: Jan Kara [ Upstream commit c725bfce7968009756ed2836a8cd7ba4dc163011 ] Commit 296291cdd162 (mm: make sendfile(2) killable) fixed an issue where sendfile(2) was doing a lot of tiny writes into a filesystem and thus was unkillable for a long time. However sendfile(2) can be (mis)used to

Re: Periodic Null pointer access with 4.14.29-30 (while using minidlna) in sendfile system call

2018-03-26 Thread Eric Valette
On 3/25/18 11:39 PM, Eric Valette wrote: On 3/25/18 11:07 PM, Eric Valette wrote: Since a few kernels I get this error when streaming video to TV via minidlna: Checked it started with at least 4.14.25. My older kern.log.2.gz file says before first march I did not get this error. But I removed

Re: Periodic Null pointer access with 4.14.29-30 (while using minidlna) in sendfile system call

2018-03-25 Thread Eric Valette
On 3/25/18 11:07 PM, Eric Valette wrote: Since a few kernels I get this error when streaming video to TV via minidlna: Checked it started with at least 4.14.25. My older kern.log.2.gz file says before first march I did not get this error. But I removed older kernels from my /boot directory.

Periodic Null pointer access with 4.14.29-30 (while using minidlna) in sendfile system call

2018-03-25 Thread Eric Valette
Since a few kernels I get this error when streaming video to TV via minidlna: Please CC me, I'm not subscribed BUG: unable to handle kernel NULL pointer dereference at 0078 [ 3330.960519] IP: tcp_push+0x70/0xeb [ 3330.960520] PGD 0 P4D 0 [ 3330.960523] Oops: [#1] SMP PTI [ 3330

[PATCH] sendfile: Do not update file offset of non-lseek()able objects.

2017-06-12 Thread Tetsuo Handa
I tried to sendfile() a file which is larger than 4GB to a pipe (which is the stdout of Apache's CGI program), and noticed that sendfile() fails with EFBIG after 2GB is copied to stdout pipe. This is because sendfile() is updating file offset of the file descriptor of the pipe. sendfile() s

sendfile() > 2GB to pipe fails with EFBIG

2017-05-18 Thread Tetsuo Handa
Hello. I tried to sendfile() a file which is larger than 4GB to a pipe (which is the stdout of Apache's CGI program) using 3.10.0-514.16.1.el7.x86_64 kernel, and noticed that sendfile() fails with EFBIG after 2GB is copied to stdout pipe. I confirmed using 4.12.0-rc1 kernel that sendfile()

Re: sendfile from 9p fs into af_alg

2016-11-23 Thread Alexei Starovoitov
sizes (in megabytes) the difference between what > > sendfile is reporting and actual file size can be 3x. > > In the small file case (like above dump) it looks rounded to page size for > > some reason. > > OK, I think I see one bug in there; could you check if this gets it back

Re: sendfile from 9p fs into af_alg

2016-11-23 Thread Al Viro
On Wed, Nov 23, 2016 at 12:58:11AM -0800, Alexei Starovoitov wrote: > if I read it correctly 9p actually responded with 8192 bytes of requests... > whereas the file size was 9624. > For large file sizes (in megabytes) the difference between what > sendfile is reporting and actual file

Re: sendfile from 9p fs into af_alg

2016-11-23 Thread Alexei Starovoitov
gt; Hi Al, > > > > > > > > it seems the following commit 523ac9afc73a ("switch > > > > default_file_splice_read() to use of pipe-backed iov_iter") > > > > breaks sendfile from 9p fs into af_alg socket. > > > > sendfile into af_alg

Re: sendfile from 9p fs into af_alg

2016-11-22 Thread Al Viro
llowing commit 523ac9afc73a ("switch > > > default_file_splice_read() to use of pipe-backed iov_iter") > > > breaks sendfile from 9p fs into af_alg socket. > > > sendfile into af_alg is used by iproute2/tc. > > > I'm not sure whether it's 9p or crypto or vfs

Re: sendfile from 9p fs into af_alg

2016-11-22 Thread Alexei Starovoitov
On Wed, Nov 23, 2016 at 04:46:26AM +, Al Viro wrote: > On Tue, Nov 22, 2016 at 07:58:29PM -0800, Alexei Starovoitov wrote: > > Hi Al, > > > > it seems the following commit 523ac9afc73a ("switch > > default_file_splice_read() to use of pipe-backed iov_iter&

Re: sendfile from 9p fs into af_alg

2016-11-22 Thread Al Viro
On Tue, Nov 22, 2016 at 07:58:29PM -0800, Alexei Starovoitov wrote: > Hi Al, > > it seems the following commit 523ac9afc73a ("switch > default_file_splice_read() to use of pipe-backed iov_iter") > breaks sendfile from 9p fs into af_alg socket. > sendfile into af_alg i

sendfile from 9p fs into af_alg

2016-11-22 Thread Alexei Starovoitov
Hi Al, it seems the following commit 523ac9afc73a ("switch default_file_splice_read() to use of pipe-backed iov_iter") breaks sendfile from 9p fs into af_alg socket. sendfile into af_alg is used by iproute2/tc. I'm not sure whether it's 9p or crypto or vfs problem, but happy

[PATCH 3.4 055/125] vfs: Avoid softlockups with sendfile(2)

2016-10-12 Thread lizf
don't have any scheduling point at that path in sendfile(2) implementation: int r1 = eventfd(0, 0); int r2 = memfd_create("", 0); unsigned long n = 1<<30; fallocate(r2, 0, 0, n); sendfile(r1, r2, 0, n); Add cond_resched() into __splice_f

[PATCH 3.4 054/125] vfs: Make sendfile(2) killable even better

2016-10-12 Thread lizf
From: Jan Kara 3.4.113-rc1 review patch. If anyone has any objections, please let me know. -- commit c725bfce7968009756ed2836a8cd7ba4dc163011 upstream. Commit 296291cdd162 (mm: make sendfile(2) killable) fixed an issue where sendfile(2) was doing a lot of tiny writes into a

[PATCH 3.10 045/143] tracing: Fix crash from reading trace_pipe with sendfile

2016-06-05 Thread Willy Tarreau
From: "Steven Rostedt (Red Hat)" commit a29054d9478d0435ab01b7544da4f674ab13f533 upstream. If tracing contains data and the trace_pipe file is read with sendfile(), then it can trigger a NULL pointer dereference and various BUG_ON within the VM code. There's a patch to

[PATCH 3.16 125/217] tracing: Fix crash from reading trace_pipe with sendfile

2016-04-26 Thread Ben Hutchings
3.16.35-rc1 review patch. If anyone has any objections, please let me know. -- From: "Steven Rostedt (Red Hat)" commit a29054d9478d0435ab01b7544da4f674ab13f533 upstream. If tracing contains data and the trace_pipe file is read with sendfile(), then it can trig

[PATCH 3.2 049/115] tracing: Fix crash from reading trace_pipe with sendfile

2016-04-26 Thread Ben Hutchings
3.2.80-rc1 review patch. If anyone has any objections, please let me know. -- From: "Steven Rostedt (Red Hat)" commit a29054d9478d0435ab01b7544da4f674ab13f533 upstream. If tracing contains data and the trace_pipe file is read with sendfile(), then it can trig

[PATCH 3.4 91/92] splice: sendfile() at once fails for big files

2016-04-18 Thread lizf
From: Christophe Leroy 3.4.112-rc1 review patch. If anyone has any objections, please let me know. -- commit 0ff28d9f4674d781e492bcff6f32f0fe48cf0fed upstream. Using sendfile with below small program to get MD5 sums of some files, it appear that big files (over 64kbytes with

[PATCH 3.4 85/92] mm: make sendfile(2) killable

2016-04-18 Thread lizf
From: Jan Kara 3.4.112-rc1 review patch. If anyone has any objections, please let me know. -- commit 296291cdd1629c308114504b850dc343eabc2782 upstream. Currently a simple program below issues a sendfile(2) system call which takes about 62 days to complete in my test KVM

[PATCH 3.12 86/98] tracing: Fix crash from reading trace_pipe with sendfile

2016-04-11 Thread Jiri Slaby
From: "Steven Rostedt (Red Hat)" 3.12-stable review patch. If anyone has any objections, please let me know. === commit a29054d9478d0435ab01b7544da4f674ab13f533 upstream. If tracing contains data and the trace_pipe file is read with sendfile(), then it can trigger a NU

[PATCH 4.5 181/238] tracing: Fix crash from reading trace_pipe with sendfile

2016-04-10 Thread Greg Kroah-Hartman
4.5-stable review patch. If anyone has any objections, please let me know. -- From: Steven Rostedt (Red Hat) commit a29054d9478d0435ab01b7544da4f674ab13f533 upstream. If tracing contains data and the trace_pipe file is read with sendfile(), then it can trigger a NULL pointer

[PATCH 3.14 63/76] tracing: Fix crash from reading trace_pipe with sendfile

2016-04-10 Thread Greg Kroah-Hartman
3.14-stable review patch. If anyone has any objections, please let me know. -- From: Steven Rostedt (Red Hat) commit a29054d9478d0435ab01b7544da4f674ab13f533 upstream. If tracing contains data and the trace_pipe file is read with sendfile(), then it can trigger a NULL pointer

[PATCH 4.4 165/210] tracing: Fix crash from reading trace_pipe with sendfile

2016-04-10 Thread Greg Kroah-Hartman
4.4-stable review patch. If anyone has any objections, please let me know. -- From: Steven Rostedt (Red Hat) commit a29054d9478d0435ab01b7544da4f674ab13f533 upstream. If tracing contains data and the trace_pipe file is read with sendfile(), then it can trigger a NULL pointer

[PATCH 3.13.y-ckt 63/97] tracing: Fix crash from reading trace_pipe with sendfile

2016-04-04 Thread Kamal Mostafa
ace_pipe file is read with sendfile(), then it can trigger a NULL pointer dereference and various BUG_ON within the VM code. There's a patch to fix this in the splice_to_pipe() code, but it's also a good idea to not let that happen from trace_pipe either. Link: http://lkml.kernel.org/

[PATCH 3.19.y-ckt 107/170] tracing: Fix crash from reading trace_pipe with sendfile

2016-04-01 Thread Kamal Mostafa
ace_pipe file is read with sendfile(), then it can trigger a NULL pointer dereference and various BUG_ON within the VM code. There's a patch to fix this in the splice_to_pipe() code, but it's also a good idea to not let that happen from trace_pipe either. Link: http://lkml.kernel.org/

[PATCH 4.2.y-ckt 134/218] tracing: Fix crash from reading trace_pipe with sendfile

2016-03-31 Thread Kamal Mostafa
_pipe file is read with sendfile(), then it can trigger a NULL pointer dereference and various BUG_ON within the VM code. There's a patch to fix this in the splice_to_pipe() code, but it's also a good idea to not let that happen from trace_pipe either. Link: http://lkml.kernel.org/r/145

[for-next][PATCH 6/8] tracing: Fix crash from reading trace_pipe with sendfile

2016-03-19 Thread Steven Rostedt
From: "Steven Rostedt (Red Hat)" If tracing contains data and the trace_pipe file is read with sendfile(), then it can trigger a NULL pointer dereference and various BUG_ON within the VM code. There's a patch to fix this in the splice_to_pipe() code, but it's also a good

[PATCH 3.12 037/116] splice: sendfile() at once fails for big files

2016-03-04 Thread Jiri Slaby
From: Christophe Leroy 3.12-stable review patch. If anyone has any objections, please let me know. === commit 0ff28d9f4674d781e492bcff6f32f0fe48cf0fed upstream. Using sendfile with below small program to get MD5 sums of some files, it appear that big files (over 64kbytes with 4k

[PATCH 3.12 058/116] vfs: Avoid softlockups with sendfile(2)

2016-03-04 Thread Jiri Slaby
don't have any scheduling point at that path in sendfile(2) implementation: int r1 = eventfd(0, 0); int r2 = memfd_create("", 0); unsigned long n = 1<<30; fallocate(r2, 0, 0, n); sendfile(r1, r2, 0, n); Add cond_resched() into __splice_f

[PATCH 3.10 33/80] vfs: Avoid softlockups with sendfile(2)

2016-03-01 Thread Greg Kroah-Hartman
don't have any scheduling point at that path in sendfile(2) implementation: int r1 = eventfd(0, 0); int r2 = memfd_create("", 0); unsigned long n = 1<<30; fallocate(r2, 0, 0, n); sendfile(r1, r2, 0, n); Add cond_resched() into __splice_f

[PATCH 3.10 19/80] splice: sendfile() at once fails for big files

2016-03-01 Thread Greg Kroah-Hartman
3.10-stable review patch. If anyone has any objections, please let me know. -- From: Christophe Leroy commit 0ff28d9f4674d781e492bcff6f32f0fe48cf0fed upstream. Using sendfile with below small program to get MD5 sums of some files, it appear that big files (over 64kbytes with

[PATCH 3.14 038/130] splice: sendfile() at once fails for big files

2016-03-01 Thread Greg Kroah-Hartman
3.14-stable review patch. If anyone has any objections, please let me know. -- From: Christophe Leroy commit 0ff28d9f4674d781e492bcff6f32f0fe48cf0fed upstream. Using sendfile with below small program to get MD5 sums of some files, it appear that big files (over 64kbytes with

[PATCH 3.14 065/130] vfs: Avoid softlockups with sendfile(2)

2016-03-01 Thread Greg Kroah-Hartman
don't have any scheduling point at that path in sendfile(2) implementation: int r1 = eventfd(0, 0); int r2 = memfd_create("", 0); unsigned long n = 1<<30; fallocate(r2, 0, 0, n); sendfile(r1, r2, 0, n); Add cond_resched() into __splice_f

[PATCH 2.6.32 16/42] vfs: Avoid softlockups with sendfile(2)

2016-01-23 Thread Willy Tarreau
we don't have any scheduling point at that path in sendfile(2) implementation: int r1 = eventfd(0, 0); int r2 = memfd_create("", 0); unsigned long n = 1<<30; fallocate(r2, 0, 0, n); sendfile(r1, r2, 0, n); Add cond_resched() into __spli

[PATCH 3.16.y-ckt 071/126] vfs: Avoid softlockups with sendfile(2)

2016-01-06 Thread Luis Henriques
eventfd and we don't have any scheduling point at that path in sendfile(2) implementation: int r1 = eventfd(0, 0); int r2 = memfd_create("", 0); unsigned long n = 1<<30; fallocate(r2, 0, 0, n); sendfile(r1, r2, 0, n); Add cond_resched() in

[PATCH 3.16.y-ckt 070/126] vfs: Make sendfile(2) killable even better

2016-01-06 Thread Luis Henriques
3.16.7-ckt22 -stable review patch. If anyone has any objections, please let me know. -- From: Jan Kara commit c725bfce7968009756ed2836a8cd7ba4dc163011 upstream. Commit 296291cdd162 (mm: make sendfile(2) killable) fixed an issue where sendfile(2) was doing a lot of tiny

  1   2   3   4   5   6   >