Github messages for voidlinux
 help / color / mirror / Atom feed
From: malv-c <malv-c@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: sendfile syscall offset bug ???
Date: Sun, 09 May 2021 10:37:18 +0200	[thread overview]
Message-ID: <20210509083718.EkFs3U30oaTO3MWNSxnv1PhFEWI2-m72hDPEO9wEa3M@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30741@inbox.vuxu.org>

[-- 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 +++



  parent reply	other threads:[~2021-05-09  8:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
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 ` [ISSUE] [CLOSED] " Duncaen
2021-05-09 11:59 ` Duncaen
2021-05-09 14:01 ` malv-c
2021-05-09 14:25 ` Duncaen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210509083718.EkFs3U30oaTO3MWNSxnv1PhFEWI2-m72hDPEO9wEa3M@z \
    --to=malv-c@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).