* Re: sendfile syscall offset bug ???
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30741@inbox.vuxu.org>
@ 2021-05-08 20:21 ` ericonr
2021-05-09 8:37 ` malv-c
` (6 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: ericonr @ 2021-05-08 20:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 300 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/issues/30741#issuecomment-835498277
Comment:
Is this not reproducible with C? What happens if you use sendfile as the function exposed by libc? Does it behave differently with different kernel versions?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sendfile syscall offset bug ???
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30741@inbox.vuxu.org>
` (6 preceding siblings ...)
2021-05-09 14:01 ` malv-c
@ 2021-05-09 14:25 ` Duncaen
7 siblings, 0 replies; 8+ messages in thread
From: Duncaen @ 2021-05-09 14:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 269 bytes --]
New comment by Duncaen on void-packages repository
https://github.com/void-linux/void-packages/issues/30741#issuecomment-835791971
Comment:
This has nothing to do with void linux, you are using the syscall wrong. lseek takes off_t and sendfile takes a off_t pointer.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sendfile syscall offset bug ???
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30741@inbox.vuxu.org>
` (5 preceding siblings ...)
2021-05-09 11:59 ` Duncaen
@ 2021-05-09 14:01 ` malv-c
2021-05-09 14:25 ` Duncaen
7 siblings, 0 replies; 8+ messages in thread
From: malv-c @ 2021-05-09 14:01 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 188 bytes --]
New comment by malv-c on void-packages repository
https://github.com/void-linux/void-packages/issues/30741#issuecomment-835813595
Comment:
sorry Duncaen
i didn't read the man correctly
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sendfile syscall offset bug ???
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30741@inbox.vuxu.org>
` (4 preceding siblings ...)
2021-05-09 11:59 ` Duncaen
@ 2021-05-09 11:59 ` Duncaen
2021-05-09 14:01 ` malv-c
2021-05-09 14:25 ` Duncaen
7 siblings, 0 replies; 8+ messages in thread
From: Duncaen @ 2021-05-09 11:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 269 bytes --]
New comment by Duncaen on void-packages repository
https://github.com/void-linux/void-packages/issues/30741#issuecomment-835791971
Comment:
This has nothing to do with void linux, you are using the syscall wrong. lseek takes off_t and sendfile tasks a off_t pointer.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sendfile syscall offset bug ???
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30741@inbox.vuxu.org>
` (3 preceding siblings ...)
2021-05-09 9:37 ` malv-c
@ 2021-05-09 11:59 ` Duncaen
2021-05-09 11:59 ` Duncaen
` (2 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: Duncaen @ 2021-05-09 11:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 270 bytes --]
New comment by Duncaen on void-packages repository
https://github.com/void-linux/void-packages/issues/30741#issuecomment-835791971
Comment:
This has nothing to do with void linux, you are using the syscalls wrong. lseek takes off_t and sendfile tasks a off_t pointer.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sendfile syscall offset bug ???
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30741@inbox.vuxu.org>
` (2 preceding siblings ...)
2021-05-09 9:37 ` malv-c
@ 2021-05-09 9:37 ` malv-c
2021-05-09 11:59 ` Duncaen
` (3 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: malv-c @ 2021-05-09 9:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 517 bytes --]
New comment by malv-c on void-packages repository
https://github.com/void-linux/void-packages/issues/30741#issuecomment-835765757
Comment:
for small tasks the time c exec is loaded asm exec did the job ...
also to return to code in c may aska long time
and the c lib can put any values where it want
to know it you just have to verify the code
reverify it after compilation
with the hope nothing happen while installing
deal only with kernel problems is less painfull
anyway i can test anything you want ...
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sendfile syscall offset bug ???
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30741@inbox.vuxu.org>
2021-05-08 20:21 ` sendfile syscall offset bug ??? ericonr
2021-05-09 8:37 ` malv-c
@ 2021-05-09 9:37 ` malv-c
2021-05-09 9:37 ` malv-c
` (4 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: malv-c @ 2021-05-09 9:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 517 bytes --]
New comment by malv-c on void-packages repository
https://github.com/void-linux/void-packages/issues/30741#issuecomment-835765753
Comment:
for small tasks the time c exec is loaded asm exec did the job ...
also to return to code in c may aska long time
and the c lib can put any values where it want
to know it you just have to verify the code
reverify it after compilation
with the hope nothing happen while installing
deal only with kernel problems is less painfull
anyway i can test anything you want ...
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sendfile syscall offset bug ???
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30741@inbox.vuxu.org>
2021-05-08 20:21 ` sendfile syscall offset bug ??? ericonr
@ 2021-05-09 8:37 ` malv-c
2021-05-09 9:37 ` malv-c
` (5 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: malv-c @ 2021-05-09 8:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 4987 bytes --]
New comment by malv-c on void-packages repository
https://github.com/void-linux/void-packages/issues/30741#issuecomment-835745838
Comment:
sorry all you don't know asm
me too i restart it
but i know enough to understand that sendfile off_t refuse the integer lseek one accept
also the exit value and size_t work
[sf.txt](https://github.com/void-linux/void-packages/files/6447150/sf.txt)
commented source of working example for too busy people to change a value in code ;) Duncaen
% strace ./sf3-3 +255 =q sf3.s b*
execve("./sf3-3", ["./sf3-3", "+255", "=q", "sf3.s", "bb", "bh%", "bh0"], 0x7ffc6a137880 /* 42 vars */) = 0
open("q", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_NOATIME, 0777) = 3
open("sf3.s", O_RDONLY) = 4
sendfile(3, 4, NULL, 255) = 255
open("bb", O_RDONLY) = 5
sendfile(3, 5, NULL, 255) = 255
open("bh%", O_RDONLY) = 6
sendfile(3, 6, NULL, 255) = 255
open("bh0", O_RDONLY) = 11
sendfile(3, 11, NULL, 255) = 255
exit_group(0) = ?
+++ exited with 0 +++
/tmp
% strace ./sf3-3 ^255 =qf sf3.s b*
execve("./sf3-3", ["./sf3-3", "^255", "=qf", "sf3.s", "bb", "bh%", "bh0"], 0x7ffde3499810 /* 42 vars */) = 0
open("qf", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_NOATIME, 0777) = 3
open("sf3.s", O_RDONLY) = 4
sendfile(3, 4, 0xff, 4611686018427387904) = -1 EFAULT (Bad address)
open("bb", O_RDONLY) = 5
sendfile(3, 5, 0xff, 4611686018427387904) = -1 EFAULT (Bad address)
open("bh%", O_RDONLY) = 6
sendfile(3, 6, 0xff, 4611686018427387904) = -1 EFAULT (Bad address)
open("bh0", O_RDONLY) = 11
sendfile(3, 11, 0xff, 4611686018427387904) = -1 EFAULT (Bad address)
exit_group(255) = ?
+++ exited with 255 +++
% strace ./sf3 +63 :q qq qqa qqs qqw
execve("./sf3", ["./sf3", "+63", ":q", "qq", "qqa", "qqs", "qqw"], 0x7ffeaec3d830 /* 42 vars */) = 0
open("q", O_RDONLY) = 3
open("qq", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_NOATIME, 0777) = 4
sendfile(4, 3, NULL, 63) = 63
open("qqa", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_NOATIME, 0777) = 5
lseek(3, 0, SEEK_SET) = 0
sendfile(5, 3, NULL, 63) = 63
open("qqs", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_NOATIME, 0777) = 6
lseek(3, 0, SEEK_SET) = 0
sendfile(6, 3, NULL, 63) = 63
open("qqw", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_NOATIME, 0777) = 11
lseek(3, 0, SEEK_SET) = 0
sendfile(11, 3, NULL, 63) = 63
exit_group(0) = ?
+++ exited with 0 +++
/tmp
% strace ./sf3 ^63 :q qq qqa qqs qqw
execve("./sf3", ["./sf3", "^63", ":q", "qq", "qqa", "qqs", "qqw"], 0x7ffcf6c22ce0 /* 42 vars */) = 0
open("q", O_RDONLY) = 3
open("qq", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_NOATIME, 0777) = 4
sendfile(4, 3, 0x3f, 4611686018427387904) = -1 EFAULT (Bad address)
open("qqa", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_NOATIME, 0777) = 5
lseek(3, 63, SEEK_SET) = 63
sendfile(5, 3, 0x3f, 4611686018427387904) = -1 EFAULT (Bad address)
open("qqs", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_NOATIME, 0777) = 6
lseek(3, 63, SEEK_SET) = 63
sendfile(6, 3, 0x3f, 4611686018427387904) = -1 EFAULT (Bad address)
open("qqw", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_NOATIME, 0777) = 11
lseek(3, 63, SEEK_SET) = 63
sendfile(11, 3, 0x3f, 4611686018427387904) = -1 EFAULT (Bad address)
exit_group(63) = ?
+++ exited with 63 +++
% strace ./sf3 ^63 b*
execve("./sf3", ["./sf3", "^63", "bb", "bh%", "bh0"], 0x7ffff06f9d30 /* 42 vars */) = 0
open("bb", O_RDONLY) = 3
fcntl(1, F_SETFL, O_RDONLY) = 0
sendfile(1, 3, 0x3f, 4611686018427387904) = -1 EFAULT (Bad address)
open("bh%", O_RDONLY) = 4
sendfile(1, 4, 0x3f, 4611686018427387904) = -1 EFAULT (Bad address)
open("bh0", O_RDONLY) = 5
sendfile(1, 5, 0x3f, 4611686018427387904) = -1 EFAULT (Bad address)
exit_group(63) = ?
+++ exited with 63 +++
/tmp
% strace ./sf3 +63 b*
execve("./sf3", ["./sf3", "+63", "bb", "bh%", "bh0"], 0x7fff8f955ab0 /* 42 vars */) = 0
open("bb", O_RDONLY) = 3
fcntl(1, F_SETFL, O_RDONLY) = 0
sendfile(1, 3, NULL, 63export HISTCONTROL=ignoredups:erasedups
shopt -s histreedit his) = 63
open("bh%", O_RDONLY) = 4
sendfile(1, 4, NULL, 63AE ri
M
man tr
ll /bin/tr
gcl https://github.com/coreutils/cor) = 63
open("bh0", O_RDONLY) = 5
sendfile(1, 5, NULL, 63./sbx -z
alsactl store
alsamixer
create_ap --help |more
ee /) = 63
exit_group(0) = ?
+++ exited with 0 +++
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-05-09 14:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30741@inbox.vuxu.org>
2021-05-08 20:21 ` sendfile syscall offset bug ??? ericonr
2021-05-09 8:37 ` malv-c
2021-05-09 9:37 ` malv-c
2021-05-09 9:37 ` malv-c
2021-05-09 11:59 ` Duncaen
2021-05-09 11:59 ` Duncaen
2021-05-09 14:01 ` malv-c
2021-05-09 14:25 ` Duncaen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).