Compare commits
218 Commits
ppiao/gsoc
...
master
Author | SHA1 | Date | |
---|---|---|---|
2c8b6de913 | |||
|
f414d9e3ba | ||
|
04512207ac | ||
|
3798b04eab | ||
b9a262af78 | |||
bc87159e49 | |||
77265f5d49 | |||
88d842435e | |||
9c529cda68 | |||
3ef1efa2d1 | |||
17a1b88f8e | |||
be27e07c97 | |||
48f74df7d3 | |||
63de2e2055 | |||
2b31eeb6c1 | |||
4ba813df47 | |||
d0d79b4b7e | |||
536d2af968 | |||
bfff2ebaa6 | |||
25a73fb12f | |||
cf36cc7c78 | |||
|
91cdd32f65 | ||
3e93457d5f | |||
cd5b418320 | |||
cab745b842 | |||
d6c71dd061 | |||
51bd6db1ef | |||
27739ebccc | |||
2087d82fc7 | |||
|
2ecf1d5c2b | ||
|
721476cb78 | ||
333079522a | |||
|
38ea49ad11 | ||
|
c065838680 | ||
|
0954bf0ec8 | ||
|
3adbab7c2b | ||
|
a55f5485c6 | ||
|
95e1e717ac | ||
|
e3d913d5fb | ||
|
e850f7f95c | ||
|
2a750e9a9f | ||
|
6b662a84b4 | ||
|
665dd0ece8 | ||
|
cd933c16c9 | ||
|
6c9cfeaaa4 | ||
|
88863bf3ed | ||
|
5be335ceaa | ||
|
7e15b04b20 | ||
|
40771886ec | ||
|
09d91633d1 | ||
92e347b556 | |||
73fa3d6822 | |||
62b47db1ac | |||
|
e95c9ec4d1 | ||
|
2479d313e7 | ||
00d0c29d14 | |||
|
1448070a00 | ||
b967e34d70 | |||
d0ae0b3dca | |||
476b03b33a | |||
73f565d1b8 | |||
986a55423e | |||
b2c63fa897 | |||
|
8a5feb1cb3 | ||
f6869581d4 | |||
|
fa35f3e87d | ||
|
2b84c24551 | ||
4964cf3765 | |||
|
63144af13f | ||
|
b3f92b39f1 | ||
|
8c3b410bac | ||
|
d1a0f700f1 | ||
|
692dbd2c3d | ||
004e6b5b7a | |||
bc04bb238c | |||
7273c6fb3c | |||
e3b80cb65f | |||
7488ce9e23 | |||
86d073674e | |||
b93d52fe3d | |||
c6782f144a | |||
|
bf195a8455 | ||
|
e1f15583e0 | ||
c40270dd87 | |||
5be511bf86 | |||
1f84eefc40 | |||
217eccfba5 | |||
51d89ef0a0 | |||
917c2ccf3a | |||
bcd5cdddec | |||
afc80cdb3f | |||
|
26e1435f91 | ||
|
f476724ea1 | ||
1dc2a5313c | |||
114249603e | |||
a4fb2fbdde | |||
|
0933b30869 | ||
956dc3ed36 | |||
|
f11fb909d7 | ||
6f9cf06b99 | |||
c4c993b642 | |||
|
97c3deca54 | ||
|
384e286e5d | ||
|
ab30fe571d | ||
|
ca2121efef | ||
|
2482e7caba | ||
|
f9163e811b | ||
|
98306f2c05 | ||
|
d30aacd4ec | ||
|
b4b01268bb | ||
341eb0859d | |||
eca7e95886 | |||
422ecbe675 | |||
7a4c6b715d | |||
62267a93f4 | |||
f9e5f12b7c | |||
|
2649c8c8b6 | ||
|
e2d2dc699f | ||
|
846e277d0f | ||
|
e471c53d1d | ||
|
5f7f0b6c85 | ||
4c9516cc9b | |||
c12d2de112 | |||
5c62e29237 | |||
6726f218f7 | |||
|
7a7f6c6a7c | ||
6d6d5bc480 | |||
4370024753 | |||
|
3960969554 | ||
|
be3ba52a4d | ||
5993d50813 | |||
f5b9ee4945 | |||
e78becf8b9 | |||
9eeab98448 | |||
96df4b36f6 | |||
f708bcfa45 | |||
305e47a9ae | |||
762d8e06bf | |||
af39dee46c | |||
d7cbc89824 | |||
|
5aba529854 | ||
|
92b04d4a22 | ||
|
4b0130a7d0 | ||
|
750cdcba9c | ||
|
302cf02757 | ||
|
a5918bf7e6 | ||
|
4499e109ec | ||
|
201e01dbac | ||
|
ac2f6695cd | ||
|
da048e91a1 | ||
|
cfb86ab4e9 | ||
|
92d020787f | ||
|
cbbf708b4d | ||
|
c3ac40611c | ||
|
8a56b8a1b7 | ||
|
38e0f55602 | ||
|
9a969eb670 | ||
|
ef859a2702 | ||
|
54fc755c56 | ||
|
7c08fe37a1 | ||
|
a302982576 | ||
|
f561173367 | ||
|
9f4b5992fe | ||
|
79878e783c | ||
|
298f29a15b | ||
|
6177e74134 | ||
|
b05d2667e9 | ||
|
fdfc68a984 | ||
|
3f10639284 | ||
|
618d4ed497 | ||
|
9b5d56054c | ||
|
f3b38739d5 | ||
|
288b872266 | ||
|
1d7b8edda9 | ||
|
45afd0c7a3 | ||
|
dac524ad98 | ||
|
587d1d5663 | ||
|
00bfa52a81 | ||
|
5d18b8cdef | ||
|
25a4cafa90 | ||
|
6e7da52286 | ||
|
930864b083 | ||
|
3926f4a07d | ||
|
24535be245 | ||
|
4fa680e63f | ||
|
fb7c51690e | ||
|
df7dd5aa66 | ||
|
e8d95392ad | ||
|
fe8861f6b4 | ||
|
f7d175b562 | ||
|
701fd04d8a | ||
|
cde23ff80c | ||
|
6b141f643a | ||
|
d029a5efd1 | ||
|
eded21f5c0 | ||
|
9624d9f09d | ||
|
db5235d0e9 | ||
|
cf174ac87a | ||
|
f9578731fc | ||
|
9aa1efde58 | ||
44e21ae30d | |||
ccee090b78 | |||
1df0986c75 | |||
|
9d2848e517 | ||
14ae61f37b | |||
|
2d88ec9e39 | ||
538cf68f12 | |||
9725de9c22 | |||
7b0d371b3f | |||
f0ec4e696c | |||
|
ed29ac33bb | ||
|
e286b9cbc0 | ||
|
5ee385e2eb | ||
|
99300f217b | ||
|
e38143b00e | ||
0f09267db0 | |||
b89a69dec2 | |||
a264eb3b65 |
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/* export-ignore
|
||||
/README-github_gitlab-autogenerated-archives.txt -export-ignore
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -12,6 +12,8 @@
|
||||
/.version
|
||||
/CREDITS
|
||||
/ChangeLog
|
||||
/INSTALL
|
||||
/README
|
||||
/aclocal.m4
|
||||
/autom4te.cache
|
||||
/bpf_attr_check.c
|
||||
@ -53,15 +55,14 @@
|
||||
/native_printer_decls.h
|
||||
/native_printer_defs.h
|
||||
/printers.h
|
||||
/README
|
||||
/scno.h
|
||||
/sen.h
|
||||
/stamp-h1
|
||||
/strace
|
||||
/strace-*.tar.gz
|
||||
/strace-*.tar.xz
|
||||
/strace.1
|
||||
/strace-log-merge.1
|
||||
/strace.1
|
||||
/strace.dsc
|
||||
/strace.spec
|
||||
/sys_func.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
image: "ubuntu:17.10"
|
||||
image: "ubuntu:18.04"
|
||||
|
||||
before_script:
|
||||
- ci/install-dependencies.sh
|
||||
@ -8,6 +8,15 @@ variables:
|
||||
SLEEP_A_BIT: "sleep 0.2"
|
||||
VERBOSE: "1"
|
||||
|
||||
gcc-x86_64-libdw-mainline:
|
||||
stage: test
|
||||
script: ci/run-build-and-tests.sh
|
||||
variables:
|
||||
CC: "gcc"
|
||||
TARGET: "x86_64"
|
||||
STACKTRACE: "libdw"
|
||||
KHEADERS: "torvalds/linux"
|
||||
|
||||
gcc-x86_64-libdw:
|
||||
stage: test
|
||||
script: ci/run-build-and-tests.sh
|
||||
|
@ -24,6 +24,11 @@ matrix:
|
||||
- STACKTRACE=libunwind
|
||||
- CHECK=coverage
|
||||
- KHEADERS=torvalds/linux
|
||||
- compiler: gcc-8
|
||||
env:
|
||||
- TARGET=x86_64
|
||||
- STACKTRACE=libunwind
|
||||
- KHEADERS=torvalds/linux
|
||||
- compiler: gcc
|
||||
env:
|
||||
- TARGET=x86_64
|
||||
|
30
COPYING
30
COPYING
@ -7,24 +7,14 @@ Copyright (c) 1998-2001 Wichert Akkerman <wakkerma@deephackmode.org>
|
||||
Copyright (c) 2001-2018 The strace developers.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
strace is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published
|
||||
by the Free Software Foundation; either version 2.1 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
strace is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See LGPL-2.1-or-later for more details.
|
||||
|
||||
strace test suite is provided under the terms of the GNU General Public License
|
||||
version 2 or later, see tests/COPYING for more details.
|
||||
|
@ -5,5 +5,5 @@ that are needed to build strace. Some of these files are generated by tools
|
||||
from the GNU Autoconf and GNU Automake packages.
|
||||
|
||||
Note: rather than running `autoreconf` directly, please invoke `./bootstrap`
|
||||
script and follow the instructions given in [INSTALL](INSTALL) file for further
|
||||
script and follow the instructions given in [INSTALL](README-configure) file for further
|
||||
building and installation.
|
||||
|
501
LGPL-2.1-or-later
Normal file
501
LGPL-2.1-or-later
Normal file
@ -0,0 +1,501 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your freedom
|
||||
to share and change it. By contrast, the GNU General Public Licenses are
|
||||
intended to guarantee your freedom to share and change free software--to
|
||||
make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some specially
|
||||
designated software packages--typically libraries--of the Free Software
|
||||
Foundation and other authors who decide to use it. You can use it too,
|
||||
but we suggest you first think carefully about whether this license or
|
||||
the ordinary General Public License is the better strategy to use in
|
||||
any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get it
|
||||
if you want it; that you can change the software and use pieces of it in
|
||||
new free programs; and that you are informed that you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide complete
|
||||
object files to the recipients, so that they can relink them with the
|
||||
library after making changes to the library and recompiling it. And you
|
||||
must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that there
|
||||
is no warranty for the free library. Also, if the library is modified
|
||||
by someone else and passed on, the recipients should know that what they
|
||||
have is not the original version, so that the original author's reputation
|
||||
will not be affected by problems that might be introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot effectively
|
||||
restrict the users of a free program by obtaining a restrictive license
|
||||
from a patent holder. Therefore, we insist that any patent license
|
||||
obtained for a version of the library must be consistent with the full
|
||||
freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License. This license, the GNU Lesser General
|
||||
Public License, applies to certain designated libraries, and is quite
|
||||
different from the ordinary General Public License. We use this license
|
||||
for certain libraries in order to permit linking those libraries into
|
||||
non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using a
|
||||
shared library, the combination of the two is legally speaking a combined
|
||||
work, a derivative of the original library. The ordinary General Public
|
||||
License therefore permits such linking only if the entire combination
|
||||
fits its criteria of freedom. The Lesser General Public License permits
|
||||
more lax criteria for linking other code with the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to encourage
|
||||
the widest possible use of a certain library, so that it becomes a
|
||||
de-facto standard. To achieve this, non-free programs must be allowed
|
||||
to use the library. A more frequent case is that a free library does
|
||||
the same job as widely used non-free libraries. In this case, there
|
||||
is little to gain by limiting the free library to free software only,
|
||||
so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of free
|
||||
software. For example, permission to use the GNU C Library in non-free
|
||||
programs enables many more people to use the whole GNU operating system,
|
||||
as well as its variant, the GNU/Linux operating system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is linked
|
||||
with the Library has the freedom and the wherewithal to run that program
|
||||
using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License"). Each
|
||||
licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on
|
||||
the Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation
|
||||
is included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code
|
||||
means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of running
|
||||
a program using the Library is not restricted, and output from such
|
||||
a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided
|
||||
that you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion of
|
||||
it, thus forming a work based on the Library, and copy and distribute
|
||||
such modifications or work under the terms of Section 1 above,
|
||||
provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no charge
|
||||
to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or table,
|
||||
the facility still operates, and performs whatever part of its
|
||||
purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots
|
||||
has a purpose that is entirely well-defined independent of
|
||||
the application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square root
|
||||
function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work
|
||||
based on the Library, the distribution of the whole must be on the
|
||||
terms of this License, whose permissions for other licensees extend
|
||||
to the entire whole, and thus to each and every part regardless of
|
||||
who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is
|
||||
to exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume
|
||||
of a storage or distribution medium does not bring the other work
|
||||
under the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To
|
||||
do this, you must alter all the notices that refer to this License,
|
||||
so that they refer to the ordinary GNU General Public License,
|
||||
version 2, instead of to this License. (If a newer version than
|
||||
version 2 of the ordinary GNU General Public License has appeared,
|
||||
then you can specify that version instead if you wish.) Do not make
|
||||
any other change in these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of the
|
||||
Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or derivative
|
||||
of it, under Section 2) in object code or executable form under the
|
||||
terms of Sections 1 and 2 above provided that you accompany it with
|
||||
the complete corresponding machine-readable source code, which must
|
||||
be distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy from
|
||||
a designated place, then offering equivalent access to copy the source
|
||||
code from the same place satisfies the requirement to distribute the
|
||||
source code, even though third parties are not compelled to copy the
|
||||
source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the Library,
|
||||
but is designed to work with the Library by being compiled or linked
|
||||
with it, is called a "work that uses the Library". Such a work, in
|
||||
isolation, is not a derivative work of the Library, and therefore
|
||||
falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License. Section
|
||||
6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header
|
||||
file that is part of the Library, the object code for the work may
|
||||
be a derivative work of the Library even though the source code is
|
||||
not. Whether this is true is especially significant if the work can
|
||||
be linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data structure
|
||||
layouts and accessors, and small macros and small inline functions
|
||||
(ten lines or less in length), then the use of the object file
|
||||
is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section
|
||||
6. Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or link
|
||||
a "work that uses the Library" with the Library to produce a work
|
||||
containing portions of the Library, and distribute that work under
|
||||
terms of your choice, provided that the terms permit modification
|
||||
of the work for the customer's own use and reverse engineering for
|
||||
debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered
|
||||
by this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do
|
||||
one of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and
|
||||
(2) will operate properly with a modified version of the library,
|
||||
if the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at least three
|
||||
years, to give the same user the materials specified in Subsection
|
||||
6a, above, for a charge no more than the cost of performing this
|
||||
distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you
|
||||
cannot use both them and the Library together in an executable that
|
||||
you distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise permitted,
|
||||
and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities. This
|
||||
must be distributed under the terms of the Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute the
|
||||
Library except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense, link with, or distribute the
|
||||
Library is void, and will automatically terminate your rights under
|
||||
this License. However, parties who have received copies, or rights,
|
||||
from you under this License will not have their licenses terminated
|
||||
so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify
|
||||
or distribute the Library or its derivative works. These actions
|
||||
are prohibited by law if you do not accept this License. Therefore,
|
||||
by modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on
|
||||
the Library), the recipient automatically receives a license from
|
||||
the original licensor to copy, distribute, link with or modify the
|
||||
Library subject to these terms and conditions. You may not impose
|
||||
any further restrictions on the recipients' exercise of the rights
|
||||
granted herein. You are not responsible for enforcing compliance by
|
||||
third parties with this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement
|
||||
or otherwise) that contradict the conditions of this License, they
|
||||
do not excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence
|
||||
you may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library
|
||||
by all those who receive copies directly or indirectly through you,
|
||||
then the only way you could satisfy both it and this License would
|
||||
be to refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended
|
||||
to apply, and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of
|
||||
any such claims; this section has the sole purpose of protecting
|
||||
the integrity of the free software distribution system which
|
||||
is implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed
|
||||
to be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time. Such
|
||||
new versions will be similar in spirit to the present version, but
|
||||
may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published
|
||||
by the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free Software
|
||||
Foundation; we sometimes make exceptions for this. Our decision will
|
||||
be guided by the two goals of preserving the free status of all
|
||||
derivatives of our free software and of promoting the sharing and
|
||||
reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE
|
||||
LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
|
||||
AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF
|
||||
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO
|
||||
IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
|
||||
MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE
|
||||
TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
|
||||
THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR
|
||||
A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN
|
||||
IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES. END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of
|
||||
the ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and an idea of what it does.>
|
||||
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published
|
||||
by the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this library; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
your school, if any, to sign a "copyright disclaimer" for the library,
|
||||
if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in
|
||||
|
||||
the library `Frob' (a library for tweaking knobs) written
|
||||
|
||||
by James Random Hacker.
|
||||
|
||||
< signature of Ty Coon > , 1 April 1990
|
||||
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
97
Makefile.am
97
Makefile.am
@ -7,27 +7,7 @@
|
||||
# Copyright (c) 2002-2018 The strace developers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
if HAVE_M32_RUNTIME
|
||||
TESTS_M32 = tests-m32
|
||||
@ -147,13 +127,15 @@ strace_SOURCES = \
|
||||
fetch_struct_xfs_quotastat.c \
|
||||
file_handle.c \
|
||||
file_ioctl.c \
|
||||
filter_qualify.c \
|
||||
filter.h \
|
||||
filter_qualify.c \
|
||||
flock.c \
|
||||
flock.h \
|
||||
fs_x_ioctl.c \
|
||||
futex.c \
|
||||
gcc_compat.h \
|
||||
get_personality.c \
|
||||
get_personality.h \
|
||||
get_robust_list.c \
|
||||
getcpu.c \
|
||||
getcwd.c \
|
||||
@ -178,6 +160,7 @@ strace_SOURCES = \
|
||||
kexec.c \
|
||||
keyctl.c \
|
||||
keyctl_kdf_params.h \
|
||||
kill_save_errno.h \
|
||||
kvm.c \
|
||||
largefile_wrappers.h \
|
||||
ldt.c \
|
||||
@ -204,15 +187,15 @@ strace_SOURCES = \
|
||||
msghdr.h \
|
||||
mtd.c \
|
||||
native_defs.h \
|
||||
nbd_ioctl.c \
|
||||
negated_errno.h \
|
||||
net.c \
|
||||
netlink.c \
|
||||
netlink.h \
|
||||
netlink_crypto.c \
|
||||
netlink_inet_diag.c \
|
||||
netlink_kobject_uevent.c \
|
||||
netlink_kobject_uevent.h \
|
||||
netlink_sock_diag.h \
|
||||
netlink_inet_diag.c \
|
||||
netlink_netfilter.c \
|
||||
netlink_netlink_diag.c \
|
||||
netlink_packet_diag.c \
|
||||
@ -221,6 +204,7 @@ strace_SOURCES = \
|
||||
netlink_selinux.c \
|
||||
netlink_smc_diag.c \
|
||||
netlink_sock_diag.c \
|
||||
netlink_sock_diag.h \
|
||||
netlink_unix_diag.c \
|
||||
nlattr.c \
|
||||
nlattr.h \
|
||||
@ -243,9 +227,11 @@ strace_SOURCES = \
|
||||
prctl.c \
|
||||
print_aio_sigset.c \
|
||||
print_dev_t.c \
|
||||
print_group_req.c \
|
||||
print_fields.h \
|
||||
print_group_req.c \
|
||||
print_ifindex.c \
|
||||
print_instruction_pointer.c \
|
||||
print_kernel_version.c \
|
||||
print_mac.c \
|
||||
print_mq_attr.c \
|
||||
print_msgbuf.c \
|
||||
@ -265,7 +251,10 @@ strace_SOURCES = \
|
||||
process_vm.c \
|
||||
ptp.c \
|
||||
ptrace.h \
|
||||
ptrace_syscall_info.c \
|
||||
ptrace_syscall_info.h \
|
||||
quota.c \
|
||||
random_ioctl.c \
|
||||
readahead.c \
|
||||
readlink.c \
|
||||
reboot.c \
|
||||
@ -318,8 +307,8 @@ strace_SOURCES = \
|
||||
statx.c \
|
||||
statx.h \
|
||||
strace.c \
|
||||
string_to_uint.h \
|
||||
string_to_uint.c \
|
||||
string_to_uint.h \
|
||||
swapon.c \
|
||||
syscall.c \
|
||||
sysctl.c \
|
||||
@ -348,6 +337,7 @@ strace_SOURCES = \
|
||||
utimes.c \
|
||||
v4l2.c \
|
||||
wait.c \
|
||||
wait.h \
|
||||
xattr.c \
|
||||
xfs_quota_stat.h \
|
||||
xlat.c \
|
||||
@ -401,6 +391,8 @@ EXTRA_DIST = \
|
||||
CREDITS \
|
||||
ChangeLog \
|
||||
ChangeLog-CVS \
|
||||
LGPL-2.1-or-later \
|
||||
README-configure \
|
||||
README-linux-ptrace \
|
||||
debian/changelog \
|
||||
debian/compat \
|
||||
@ -428,9 +420,8 @@ EXTRA_DIST = \
|
||||
linux/64/ioctls_inc.h \
|
||||
linux/64/syscallent.h \
|
||||
linux/aarch64/arch_defs_.h \
|
||||
linux/aarch64/arch_get_personality.c \
|
||||
linux/aarch64/arch_regs.c \
|
||||
linux/aarch64/arch_regs.h \
|
||||
linux/aarch64/arch_rt_sigframe.c \
|
||||
linux/aarch64/arch_sigreturn.c \
|
||||
linux/aarch64/get_error.c \
|
||||
linux/aarch64/get_scno.c \
|
||||
@ -449,8 +440,6 @@ EXTRA_DIST = \
|
||||
linux/alpha/arch_defs_.h \
|
||||
linux/alpha/arch_getrval2.c \
|
||||
linux/alpha/arch_regs.c \
|
||||
linux/alpha/arch_regs.h \
|
||||
linux/alpha/arch_rt_sigframe.c \
|
||||
linux/alpha/arch_sigreturn.c \
|
||||
linux/alpha/errnoent.h \
|
||||
linux/alpha/get_error.c \
|
||||
@ -466,8 +455,6 @@ EXTRA_DIST = \
|
||||
linux/alpha/syscallent.h \
|
||||
linux/alpha/userent.h \
|
||||
linux/arc/arch_regs.c \
|
||||
linux/arc/arch_regs.h \
|
||||
linux/arc/arch_rt_sigframe.c \
|
||||
linux/arc/get_error.c \
|
||||
linux/arc/get_scno.c \
|
||||
linux/arc/get_syscall_args.c \
|
||||
@ -480,11 +467,10 @@ EXTRA_DIST = \
|
||||
linux/arch_defs_.h \
|
||||
linux/arch_kvm.c \
|
||||
linux/arch_regs.h \
|
||||
linux/arch_rt_sigframe.c \
|
||||
linux/arch_sigreturn.c \
|
||||
linux/arm/arch_defs_.h \
|
||||
linux/arm/arch_regs.c \
|
||||
linux/arm/arch_regs.h \
|
||||
linux/arm/arch_rt_sigframe.c \
|
||||
linux/arm/arch_sigreturn.c \
|
||||
linux/arm/get_error.c \
|
||||
linux/arm/get_scno.c \
|
||||
@ -499,8 +485,6 @@ EXTRA_DIST = \
|
||||
linux/arm/syscallent.h \
|
||||
linux/arm/userent.h \
|
||||
linux/avr32/arch_regs.c \
|
||||
linux/avr32/arch_regs.h \
|
||||
linux/avr32/arch_rt_sigframe.c \
|
||||
linux/avr32/get_error.c \
|
||||
linux/avr32/get_scno.c \
|
||||
linux/avr32/get_syscall_args.c \
|
||||
@ -513,7 +497,6 @@ EXTRA_DIST = \
|
||||
linux/avr32/userent.h \
|
||||
linux/bfin/arch_defs_.h \
|
||||
linux/bfin/arch_regs.c \
|
||||
linux/bfin/arch_rt_sigframe.c \
|
||||
linux/bfin/get_error.c \
|
||||
linux/bfin/get_scno.c \
|
||||
linux/bfin/get_syscall_args.c \
|
||||
@ -526,12 +509,12 @@ EXTRA_DIST = \
|
||||
linux/bfin/set_scno.c \
|
||||
linux/bfin/syscallent.h \
|
||||
linux/bfin/userent.h \
|
||||
linux/check_scno.c \
|
||||
linux/dummy.h \
|
||||
linux/errnoent.h \
|
||||
linux/getregs_old.h \
|
||||
linux/hppa/arch_defs_.h \
|
||||
linux/hppa/arch_regs.c \
|
||||
linux/hppa/arch_regs.h \
|
||||
linux/hppa/arch_rt_sigframe.c \
|
||||
linux/hppa/errnoent.h \
|
||||
linux/hppa/get_error.c \
|
||||
@ -546,10 +529,9 @@ EXTRA_DIST = \
|
||||
linux/hppa/set_scno.c \
|
||||
linux/hppa/signalent.h \
|
||||
linux/hppa/syscallent.h \
|
||||
linux/i386/arch_kvm.c \
|
||||
linux/i386/arch_defs_.h \
|
||||
linux/i386/arch_kvm.c \
|
||||
linux/i386/arch_regs.c \
|
||||
linux/i386/arch_regs.h \
|
||||
linux/i386/arch_rt_sigframe.c \
|
||||
linux/i386/arch_sigreturn.c \
|
||||
linux/i386/get_error.c \
|
||||
@ -583,7 +565,6 @@ EXTRA_DIST = \
|
||||
linux/inet_diag.h \
|
||||
linux/m68k/arch_defs_.h \
|
||||
linux/m68k/arch_regs.c \
|
||||
linux/m68k/arch_regs.h \
|
||||
linux/m68k/arch_rt_sigframe.c \
|
||||
linux/m68k/arch_sigreturn.c \
|
||||
linux/m68k/get_error.c \
|
||||
@ -598,7 +579,6 @@ EXTRA_DIST = \
|
||||
linux/m68k/syscallent.h \
|
||||
linux/m68k/userent.h \
|
||||
linux/metag/arch_regs.c \
|
||||
linux/metag/arch_regs.h \
|
||||
linux/metag/arch_rt_sigframe.c \
|
||||
linux/metag/get_error.c \
|
||||
linux/metag/get_scno.c \
|
||||
@ -611,7 +591,6 @@ EXTRA_DIST = \
|
||||
linux/metag/syscallent.h \
|
||||
linux/microblaze/arch_defs_.h \
|
||||
linux/microblaze/arch_regs.c \
|
||||
linux/microblaze/arch_rt_sigframe.c \
|
||||
linux/microblaze/arch_sigreturn.c \
|
||||
linux/microblaze/get_error.c \
|
||||
linux/microblaze/get_scno.c \
|
||||
@ -627,8 +606,6 @@ EXTRA_DIST = \
|
||||
linux/mips/arch_defs_.h \
|
||||
linux/mips/arch_getrval2.c \
|
||||
linux/mips/arch_regs.c \
|
||||
linux/mips/arch_regs.h \
|
||||
linux/mips/arch_rt_sigframe.c \
|
||||
linux/mips/arch_sigreturn.c \
|
||||
linux/mips/errnoent.h \
|
||||
linux/mips/genstub.sh \
|
||||
@ -651,8 +628,6 @@ EXTRA_DIST = \
|
||||
linux/netlink_diag.h \
|
||||
linux/nios2/arch_defs_.h \
|
||||
linux/nios2/arch_regs.c \
|
||||
linux/nios2/arch_regs.h \
|
||||
linux/nios2/arch_rt_sigframe.c \
|
||||
linux/nios2/get_error.c \
|
||||
linux/nios2/get_scno.c \
|
||||
linux/nios2/get_syscall_args.c \
|
||||
@ -664,8 +639,6 @@ EXTRA_DIST = \
|
||||
linux/nios2/syscallent.h \
|
||||
linux/nr_prefix.c \
|
||||
linux/or1k/arch_regs.c \
|
||||
linux/or1k/arch_regs.h \
|
||||
linux/or1k/arch_rt_sigframe.c \
|
||||
linux/or1k/get_error.c \
|
||||
linux/or1k/get_scno.c \
|
||||
linux/or1k/get_syscall_args.c \
|
||||
@ -679,7 +652,6 @@ EXTRA_DIST = \
|
||||
linux/packet_diag.h \
|
||||
linux/powerpc/arch_defs_.h \
|
||||
linux/powerpc/arch_regs.c \
|
||||
linux/powerpc/arch_regs.h \
|
||||
linux/powerpc/arch_rt_sigframe.c \
|
||||
linux/powerpc/arch_sigreturn.c \
|
||||
linux/powerpc/errnoent.h \
|
||||
@ -696,8 +668,8 @@ EXTRA_DIST = \
|
||||
linux/powerpc/syscallent.h \
|
||||
linux/powerpc/userent.h \
|
||||
linux/powerpc64/arch_defs_.h \
|
||||
linux/powerpc64/arch_get_personality.c \
|
||||
linux/powerpc64/arch_regs.c \
|
||||
linux/powerpc64/arch_regs.h \
|
||||
linux/powerpc64/arch_rt_sigframe.c \
|
||||
linux/powerpc64/arch_sigreturn.c \
|
||||
linux/powerpc64/errnoent.h \
|
||||
@ -717,11 +689,11 @@ EXTRA_DIST = \
|
||||
linux/powerpc64/syscallent.h \
|
||||
linux/powerpc64/syscallent1.h \
|
||||
linux/powerpc64/userent.h \
|
||||
linux/ptrace_pokeuser.c \
|
||||
linux/raw_syscall.h \
|
||||
linux/riscv/arch_defs_.h \
|
||||
linux/riscv/arch_get_personality.c \
|
||||
linux/riscv/arch_regs.c \
|
||||
linux/riscv/arch_regs.h \
|
||||
linux/riscv/arch_rt_sigframe.c \
|
||||
linux/riscv/get_error.c \
|
||||
linux/riscv/get_scno.c \
|
||||
linux/riscv/get_syscall_args.c \
|
||||
@ -737,8 +709,6 @@ EXTRA_DIST = \
|
||||
linux/rt_sigframe.h \
|
||||
linux/s390/arch_defs_.h \
|
||||
linux/s390/arch_regs.c \
|
||||
linux/s390/arch_regs.h \
|
||||
linux/s390/arch_rt_sigframe.c \
|
||||
linux/s390/arch_sigreturn.c \
|
||||
linux/s390/get_error.c \
|
||||
linux/s390/get_scno.c \
|
||||
@ -754,9 +724,8 @@ EXTRA_DIST = \
|
||||
linux/s390/userent0.h \
|
||||
linux/s390/userent1.h \
|
||||
linux/s390x/arch_defs_.h \
|
||||
linux/s390x/arch_get_personality.c \
|
||||
linux/s390x/arch_regs.c \
|
||||
linux/s390x/arch_regs.h \
|
||||
linux/s390x/arch_rt_sigframe.c \
|
||||
linux/s390x/arch_sigreturn.c \
|
||||
linux/s390x/get_error.c \
|
||||
linux/s390x/get_scno.c \
|
||||
@ -775,7 +744,6 @@ EXTRA_DIST = \
|
||||
linux/sh/arch_defs_.h \
|
||||
linux/sh/arch_getrval2.c \
|
||||
linux/sh/arch_regs.c \
|
||||
linux/sh/arch_rt_sigframe.c \
|
||||
linux/sh/get_error.c \
|
||||
linux/sh/get_scno.c \
|
||||
linux/sh/get_syscall_args.c \
|
||||
@ -791,7 +759,6 @@ EXTRA_DIST = \
|
||||
linux/sh64/arch_defs_.h \
|
||||
linux/sh64/arch_regs.c \
|
||||
linux/sh64/arch_regs.h \
|
||||
linux/sh64/arch_rt_sigframe.c \
|
||||
linux/sh64/get_error.c \
|
||||
linux/sh64/get_scno.c \
|
||||
linux/sh64/get_syscall_args.c \
|
||||
@ -812,8 +779,6 @@ EXTRA_DIST = \
|
||||
linux/sparc/arch_defs_.h \
|
||||
linux/sparc/arch_getrval2.c \
|
||||
linux/sparc/arch_regs.c \
|
||||
linux/sparc/arch_regs.h \
|
||||
linux/sparc/arch_rt_sigframe.c \
|
||||
linux/sparc/arch_sigreturn.c \
|
||||
linux/sparc/errnoent.h \
|
||||
linux/sparc/get_error.c \
|
||||
@ -829,9 +794,9 @@ EXTRA_DIST = \
|
||||
linux/sparc/syscallent.h \
|
||||
linux/sparc/userent.h \
|
||||
linux/sparc64/arch_defs_.h \
|
||||
linux/sparc64/arch_get_personality.c \
|
||||
linux/sparc64/arch_getrval2.c \
|
||||
linux/sparc64/arch_regs.c \
|
||||
linux/sparc64/arch_regs.h \
|
||||
linux/sparc64/arch_rt_sigframe.c \
|
||||
linux/sparc64/arch_sigreturn.c \
|
||||
linux/sparc64/errnoent.h \
|
||||
@ -853,9 +818,8 @@ EXTRA_DIST = \
|
||||
linux/subcall.h \
|
||||
linux/syscall.h \
|
||||
linux/tile/arch_defs_.h \
|
||||
linux/tile/arch_get_personality.c \
|
||||
linux/tile/arch_regs.c \
|
||||
linux/tile/arch_regs.h \
|
||||
linux/tile/arch_rt_sigframe.c \
|
||||
linux/tile/arch_sigreturn.c \
|
||||
linux/tile/get_error.c \
|
||||
linux/tile/get_scno.c \
|
||||
@ -875,11 +839,13 @@ EXTRA_DIST = \
|
||||
linux/userent.h \
|
||||
linux/userent0.h \
|
||||
linux/x32/arch_defs_.h \
|
||||
linux/x32/arch_get_personality.c \
|
||||
linux/x32/arch_kvm.c \
|
||||
linux/x32/arch_regs.c \
|
||||
linux/x32/arch_regs.h \
|
||||
linux/x32/arch_rt_sigframe.c \
|
||||
linux/x32/arch_sigreturn.c \
|
||||
linux/x32/check_scno.c \
|
||||
linux/x32/get_error.c \
|
||||
linux/x32/get_scno.c \
|
||||
linux/x32/get_syscall_args.c \
|
||||
@ -887,6 +853,7 @@ EXTRA_DIST = \
|
||||
linux/x32/ioctls_arch1.h \
|
||||
linux/x32/ioctls_inc0.h \
|
||||
linux/x32/ioctls_inc1.h \
|
||||
linux/x32/ptrace_pokeuser.c \
|
||||
linux/x32/raw_syscall.h \
|
||||
linux/x32/rt_sigframe.h \
|
||||
linux/x32/set_error.c \
|
||||
@ -896,6 +863,7 @@ EXTRA_DIST = \
|
||||
linux/x32/syscallent1.h \
|
||||
linux/x32/userent.h \
|
||||
linux/x86_64/arch_defs_.h \
|
||||
linux/x86_64/arch_get_personality.c \
|
||||
linux/x86_64/arch_kvm.c \
|
||||
linux/x86_64/arch_regs.c \
|
||||
linux/x86_64/arch_regs.h \
|
||||
@ -922,7 +890,6 @@ EXTRA_DIST = \
|
||||
linux/x86_64/syscallent2.h \
|
||||
linux/x86_64/userent.h \
|
||||
linux/xtensa/arch_regs.c \
|
||||
linux/xtensa/arch_rt_sigframe.c \
|
||||
linux/xtensa/get_error.c \
|
||||
linux/xtensa/get_scno.c \
|
||||
linux/xtensa/get_syscall_args.c \
|
||||
|
72
NEWS
72
NEWS
@ -1,3 +1,75 @@
|
||||
Noteworthy changes in release ?.?? (????-??-??)
|
||||
===============================================
|
||||
|
||||
* Improvements
|
||||
* Enhanced xlat styles support configured by -X option.
|
||||
* Updated lists of BPF_*, BTRFS_*, FAN_*, IFLA_*, KERN_*, KVM_CAP_*, NDA_*,
|
||||
NETNSA_*, NT_*, PR_*, REL_*, SECCOMP_*, SCTP_*, UDP_*, V4L2_*, and *_MAGIC
|
||||
constants.
|
||||
|
||||
* Bug fixes
|
||||
* Fixed strace-k test on alpha.
|
||||
* Fixed build on mips o32.
|
||||
* Fixed build on NOMMU architectures.
|
||||
|
||||
Noteworthy changes in release 4.26 (2018-12-26)
|
||||
===============================================
|
||||
|
||||
* License
|
||||
* The test suite is now provided under the terms of
|
||||
the GNU General Public License version 2 or later.
|
||||
* All the rest of strace is now provided under the terms of
|
||||
the GNU Lesser General Public License version 2.1 or later.
|
||||
|
||||
* Changes in behavior
|
||||
* If strace is interrupted by a signal it handles (currently
|
||||
one of HUP, INT, QUIT, PIPE, or TERM), strace terminates
|
||||
itself with this signal.
|
||||
|
||||
* Improvements
|
||||
* Implemented obtainment of system call information using
|
||||
PTRACE_GET_SYSCALL_INFO ptrace API.
|
||||
* Implemented decoding of PTRACE_GET_SYSCALL_INFO ptrace request.
|
||||
* Implemented decoding of BLKGETZONESZ, BLKGETNRZONES, and RND* ioctl
|
||||
commands.
|
||||
* Enhanced xlat styles support configured by -X option.
|
||||
* Enhanced internet address formatting in structureless contexts.
|
||||
* Enhanced decoding of getsockopt SO_ERROR option.
|
||||
* Enhanced error diagnostics when the first exec fails.
|
||||
* Added %net as a short form of %network in syscall specifications.
|
||||
* Updated lists of ABS_*, BPF_*, FAN_*, IFA_*, IFLA_*, KVM_CAP_*, NETLINK_*,
|
||||
NTF_*, PR_SPEC_*, REL_*, SOL_*, TCA_*, and V4L2_* constants.
|
||||
* Updated lists of ioctl commands from Linux 4.20.
|
||||
* Enhanced manual page.
|
||||
|
||||
* Bug fixes
|
||||
* Fixed "xlat_idx: Unexpected xlat value 0" warnings.
|
||||
* Fixed sthyi output format on s390.
|
||||
* Documented -X option in strace -h output.
|
||||
|
||||
Noteworthy changes in release 4.25 (2018-10-30)
|
||||
===============================================
|
||||
|
||||
* Improvements
|
||||
* Implemented decoding of KVM_CHECK_EXTENSION and NBD_* ioctl commands.
|
||||
* Implemented decoding of SOL_XDP socket option names.
|
||||
* Implemented decoding of AF_PACKET protocols in socket syscall.
|
||||
* Implemented decoding of AF_AX25 and AF_X25 addresses, protocols,
|
||||
and options.
|
||||
* Implemented stack trace printing on receiving signals.
|
||||
* Enhanced xlat styles support configured by -X option.
|
||||
* Enhanced decoding of IFLA_*, NETCONFA_*, and SMC_DIAG_* netlink attributes.
|
||||
* Wired up io_pgetevents syscall on arm, sparc, and sparc64.
|
||||
* Updated lists of AF_*, AUDIT_*, BPF_*, IFLA_*, IN_*, IPSTATS_*,
|
||||
IPV4_DEVCONF_*, NT_*, SCTP_*, SO_*, SOCK_*, SOL_*, and V4L2_* constants.
|
||||
* Updated lists of ioctl commands from Linux 4.19.
|
||||
|
||||
* Bug fixes
|
||||
* Fixed decoding of bit sets in evdev ioctl commands.
|
||||
* Fixed decoding of EVIOCGBIT(0, ...) ioctl commands.
|
||||
* Fixed test suite for the case when mlockall and unimplemented syscalls
|
||||
are explicitly disabled by a seccomp filter.
|
||||
|
||||
Noteworthy changes in release 4.24 (2018-08-14)
|
||||
===============================================
|
||||
|
||||
|
@ -15,10 +15,10 @@ Basic Installation
|
||||
Briefly, the shell command './configure && make && make install' should
|
||||
configure, build, and install this package. The following more-detailed
|
||||
instructions are generic; see the 'README' file for instructions
|
||||
specific to this package. Some packages provide this 'INSTALL' file but
|
||||
do not implement all of the features documented below. The lack of an
|
||||
optional feature in a given package is not necessarily a bug. More
|
||||
recommendations for GNU packages can be found in *note Makefile
|
||||
specific to this package. Some packages provide this 'README-configure'
|
||||
file but do not implement all of the features documented below. The
|
||||
lack of an optional feature in a given package is not necessarily a bug.
|
||||
More recommendations for GNU packages can be found in *note Makefile
|
||||
Conventions: (standards)Makefile Conventions.
|
||||
|
||||
The 'configure' shell script attempts to guess correct values for
|
11
README-github_gitlab-autogenerated-archives.txt
Normal file
11
README-github_gitlab-autogenerated-archives.txt
Normal file
@ -0,0 +1,11 @@
|
||||
github/gitlab autogenerated archives are not supported
|
||||
======================================================
|
||||
|
||||
This information applies to bundles automatically generated
|
||||
by github and gitlab.
|
||||
|
||||
strace's program version is maintained using git-version-gen script, therefore,
|
||||
building strace depends on "git describe" (a full git clone is needed for this)
|
||||
or, alternatively, a .tarball-version file. Neither github nor gitlab can
|
||||
provide the latter, they also do not allow to inject a .tarball-version file
|
||||
during export archiving.
|
@ -3,12 +3,15 @@ strace - the linux syscall tracer
|
||||
|
||||
This is [strace](https://strace.io) -- a diagnostic, debugging and instructional userspace utility with a traditional command-line interface for Linux. It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state. The operation of strace is made possible by the kernel feature known as [ptrace](http://man7.org/linux/man-pages/man2/ptrace.2.html).
|
||||
|
||||
strace is released under a Berkeley-style license at the request of Paul Kranenburg; see the file [COPYING](COPYING) for details.
|
||||
strace is released under the terms of [the GNU Lesser General Public License version 2.1 or later](LGPL-2.1-or-later); see the file [COPYING](COPYING) for details.
|
||||
strace test suite is released under the terms of [the GNU General Public License version 2 or later](tests/GPL-2.0-or-later); see the file [tests/COPYING](tests/COPYING) for details.
|
||||
|
||||
See the file [NEWS](NEWS) for information on what has changed in recent versions.
|
||||
|
||||
Please read the file [INSTALL-git](INSTALL-git.md) for installation instructions.
|
||||
|
||||
Please take a look at [the guide for new contributors](https://strace.io/wiki/NewContributorGuide) if you want to get involved in strace development.
|
||||
|
||||
The user discussion and development of strace take place on [the strace mailing list](https://lists.strace.io/mailman/listinfo/strace-devel) -- everyone is welcome to post bug reports, feature requests, comments and patches to strace-devel@lists.strace.io. The mailing list archives are available at https://lists.strace.io/pipermail/strace-devel/ and other archival sites.
|
||||
|
||||
The GIT repository of strace is available at [GitHub](https://github.com/strace/strace/) and [GitLab](https://gitlab.com/strace/strace/).
|
||||
|
7
access.c
7
access.c
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
|
24
affinity.c
24
affinity.c
@ -1,29 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2002-2004 Roland McGrath <roland@redhat.com>
|
||||
* Copyright (c) 2009-2016 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2009-2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
24
aio.c
24
aio.c
@ -6,27 +6,7 @@
|
||||
* Copyright (c) 1999-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
@ -70,7 +50,7 @@ tprint_lio_opcode(unsigned int cmd)
|
||||
[IOCB_CMD_PWRITEV] = SUB_VECTOR,
|
||||
};
|
||||
|
||||
printxval_indexn_ex(ARRSZ_PAIR(aio_cmds), cmd, "IOCB_CMD_???",
|
||||
printxval_indexn_ex(ARRSZ_PAIR(aio_cmds) - 1, cmd, "IOCB_CMD_???",
|
||||
XLAT_STYLE_FMT_U);
|
||||
|
||||
return cmd < ARRAY_SIZE(subs) ? subs[cmd] : SUB_NONE;
|
||||
|
22
alpha.c
22
alpha.c
@ -3,27 +3,7 @@
|
||||
* Copyright (c) 2016-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
13
arch_defs.h
13
arch_defs.h
@ -1,8 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
/* Architecture-specific definitions. */
|
||||
#ifndef STRACE_ARCH_DEFS_H
|
||||
#define STRACE_ARCH_DEFS_H
|
||||
# define STRACE_ARCH_DEFS_H
|
||||
|
||||
#include "arch_defs_.h"
|
||||
#include "linux/arch_defs_.h"
|
||||
# include "arch_defs_.h"
|
||||
# include "linux/arch_defs_.h"
|
||||
|
||||
#endif /* !STRACE_ARCH_DEFS_H */
|
||||
|
@ -3,27 +3,7 @@
|
||||
* Copyright (c) 2016-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
@ -174,6 +154,7 @@ lookup_class(const char *s)
|
||||
{ "%process", TRACE_PROCESS },
|
||||
{ "%signal", TRACE_SIGNAL },
|
||||
{ "%ipc", TRACE_IPC },
|
||||
{ "%net", TRACE_NETWORK },
|
||||
{ "%network", TRACE_NETWORK },
|
||||
{ "%stat", TRACE_STAT },
|
||||
{ "%lstat", TRACE_LSTAT },
|
||||
|
24
bind.c
24
bind.c
@ -3,30 +3,10 @@
|
||||
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
|
||||
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
|
||||
* Copyright (c) 1996-2000 Wichert Akkerman <wichert@cistron.nl>
|
||||
* Copyright (c) 1999-2017 The strace developers.
|
||||
* Copyright (c) 1999-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
24
bjm.c
24
bjm.c
@ -3,30 +3,10 @@
|
||||
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
|
||||
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
|
||||
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
|
||||
* Copyright (c) 1999-2017 The strace developers.
|
||||
* Copyright (c) 1999-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
81
block.c
81
block.c
@ -4,27 +4,7 @@
|
||||
* Copyright (c) 2011-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
@ -65,60 +45,15 @@ typedef struct blk_user_trace_setup {
|
||||
uint32_t pid;
|
||||
} struct_blk_user_trace_setup;
|
||||
|
||||
/* Provide fall-back definitions for BLK* ioctls */
|
||||
#define XLAT_MACROS_ONLY
|
||||
#include "xlat/block_ioctl_cmds.h"
|
||||
#undef XLAT_MACROS_ONLY
|
||||
|
||||
#include MPERS_DEFS
|
||||
|
||||
#include "print_fields.h"
|
||||
|
||||
#ifndef BLKPG
|
||||
# define BLKPG _IO(0x12, 105)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ioctl numbers <= 114 are present in Linux 2.4. The following ones have been
|
||||
* added since then and headers containing them may not be available on every
|
||||
* system.
|
||||
*/
|
||||
|
||||
#ifndef BLKTRACESETUP
|
||||
# define BLKTRACESETUP _IOWR(0x12, 115, struct_blk_user_trace_setup)
|
||||
#endif
|
||||
#ifndef BLKTRACESTART
|
||||
# define BLKTRACESTART _IO(0x12, 116)
|
||||
#endif
|
||||
#ifndef BLKTRACESTOP
|
||||
# define BLKTRACESTOP _IO(0x12, 117)
|
||||
#endif
|
||||
#ifndef BLKTRACETEARDOWN
|
||||
# define BLKTRACETEARDOWN _IO(0x12, 118)
|
||||
#endif
|
||||
#ifndef BLKDISCARD
|
||||
# define BLKDISCARD _IO(0x12, 119)
|
||||
#endif
|
||||
#ifndef BLKIOMIN
|
||||
# define BLKIOMIN _IO(0x12, 120)
|
||||
#endif
|
||||
#ifndef BLKIOOPT
|
||||
# define BLKIOOPT _IO(0x12, 121)
|
||||
#endif
|
||||
#ifndef BLKALIGNOFF
|
||||
# define BLKALIGNOFF _IO(0x12, 122)
|
||||
#endif
|
||||
#ifndef BLKPBSZGET
|
||||
# define BLKPBSZGET _IO(0x12, 123)
|
||||
#endif
|
||||
#ifndef BLKDISCARDZEROES
|
||||
# define BLKDISCARDZEROES _IO(0x12, 124)
|
||||
#endif
|
||||
#ifndef BLKSECDISCARD
|
||||
# define BLKSECDISCARD _IO(0x12, 125)
|
||||
#endif
|
||||
#ifndef BLKROTATIONAL
|
||||
# define BLKROTATIONAL _IO(0x12, 126)
|
||||
#endif
|
||||
#ifndef BLKZEROOUT
|
||||
# define BLKZEROOUT _IO(0x12, 127)
|
||||
#endif
|
||||
|
||||
#include "xlat/blkpg_ops.h"
|
||||
|
||||
static void
|
||||
@ -181,6 +116,8 @@ MPERS_PRINTER_DECL(int, block_ioctl, struct tcb *const tcp,
|
||||
case BLKIOMIN:
|
||||
case BLKIOOPT:
|
||||
case BLKDISCARDZEROES:
|
||||
case BLKGETZONESZ:
|
||||
case BLKGETNRZONES:
|
||||
if (entering(tcp))
|
||||
return 0;
|
||||
tprints(", ");
|
||||
@ -204,7 +141,6 @@ MPERS_PRINTER_DECL(int, block_ioctl, struct tcb *const tcp,
|
||||
printnum_ulong(tcp, arg);
|
||||
break;
|
||||
|
||||
#ifdef HAVE_BLKGETSIZE64
|
||||
/* returns an uint64_t */
|
||||
case BLKGETSIZE64:
|
||||
if (entering(tcp))
|
||||
@ -212,7 +148,6 @@ MPERS_PRINTER_DECL(int, block_ioctl, struct tcb *const tcp,
|
||||
tprints(", ");
|
||||
printnum_int64(tcp, arg, "%" PRIu64);
|
||||
break;
|
||||
#endif
|
||||
|
||||
/* takes a pair of uint64_t */
|
||||
case BLKDISCARD:
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/sh -eu
|
||||
#
|
||||
# Copyright (c) 2014-2018 The strace developers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
./m4/gen_bpf_attr_m4.sh
|
||||
./generate_mpers_am.sh
|
||||
@ -26,7 +31,7 @@ for m in m32 mx32; do
|
||||
done
|
||||
done
|
||||
|
||||
for f in README; do
|
||||
for f in README INSTALL; do
|
||||
cp "dist/$f" .
|
||||
done
|
||||
|
||||
|
29
bpf.c
29
bpf.c
@ -4,27 +4,7 @@
|
||||
* Copyright (c) 2015-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
@ -292,11 +272,8 @@ BEGIN_BPF_CMD_DECODER(BPF_PROG_LOAD)
|
||||
/* kern_version field was added in Linux commit v4.1-rc1~84^2~50. */
|
||||
if (len <= offsetof(struct BPF_PROG_LOAD_struct, kern_version))
|
||||
break;
|
||||
tprintf(", kern_version=KERNEL_VERSION(%u, %u, %u)",
|
||||
attr.kern_version >> 16,
|
||||
(attr.kern_version >> 8) & 0xFF,
|
||||
attr.kern_version & 0xFF);
|
||||
|
||||
tprints(", kern_version=");
|
||||
print_kernel_version(attr.kern_version);
|
||||
/* prog_flags field was added in Linux commit v4.12-rc2~34^2~29^2~2. */
|
||||
if (len <= offsetof(struct BPF_PROG_LOAD_struct, prog_flags))
|
||||
break;
|
||||
|
128
bpf_attr.h
128
bpf_attr.h
@ -2,31 +2,11 @@
|
||||
* Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#ifndef STRACE_BPF_ATTR_H
|
||||
#define STRACE_BPF_ATTR_H
|
||||
# define STRACE_BPF_ATTR_H
|
||||
|
||||
/*
|
||||
* The policy is that all fields of type uint64_t in this header file
|
||||
@ -39,21 +19,21 @@
|
||||
* v4.16-rc1~123^2~109^2~5^2~4.
|
||||
*/
|
||||
|
||||
#ifndef BPF_OBJ_NAME_LEN
|
||||
# define BPF_OBJ_NAME_LEN 16U
|
||||
#else
|
||||
# if BPF_OBJ_NAME_LEN != 16U
|
||||
# error "Unexpected value of BPF_OBJ_NAME_LEN"
|
||||
# ifndef BPF_OBJ_NAME_LEN
|
||||
# define BPF_OBJ_NAME_LEN 16U
|
||||
# else
|
||||
# if BPF_OBJ_NAME_LEN != 16U
|
||||
# error "Unexpected value of BPF_OBJ_NAME_LEN"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef BPF_TAG_SIZE
|
||||
# define BPF_TAG_SIZE 8
|
||||
#else
|
||||
# if BPF_TAG_SIZE != 8
|
||||
# error "Unexpected value of BPF_TAG_SIZE"
|
||||
# ifndef BPF_TAG_SIZE
|
||||
# define BPF_TAG_SIZE 8
|
||||
# else
|
||||
# if BPF_TAG_SIZE != 8
|
||||
# error "Unexpected value of BPF_TAG_SIZE"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
struct BPF_MAP_CREATE_struct {
|
||||
uint32_t map_type;
|
||||
@ -67,9 +47,9 @@ struct BPF_MAP_CREATE_struct {
|
||||
uint32_t map_ifindex;
|
||||
};
|
||||
|
||||
#define BPF_MAP_CREATE_struct_size \
|
||||
# define BPF_MAP_CREATE_struct_size \
|
||||
sizeof(struct BPF_MAP_CREATE_struct)
|
||||
#define expected_BPF_MAP_CREATE_struct_size 48
|
||||
# define expected_BPF_MAP_CREATE_struct_size 48
|
||||
|
||||
struct BPF_MAP_LOOKUP_ELEM_struct {
|
||||
uint32_t map_fd;
|
||||
@ -77,9 +57,9 @@ struct BPF_MAP_LOOKUP_ELEM_struct {
|
||||
uint64_t ATTRIBUTE_ALIGNED(8) value;
|
||||
};
|
||||
|
||||
#define BPF_MAP_LOOKUP_ELEM_struct_size \
|
||||
# define BPF_MAP_LOOKUP_ELEM_struct_size \
|
||||
sizeof(struct BPF_MAP_LOOKUP_ELEM_struct)
|
||||
#define expected_BPF_MAP_LOOKUP_ELEM_struct_size 24
|
||||
# define expected_BPF_MAP_LOOKUP_ELEM_struct_size 24
|
||||
|
||||
struct BPF_MAP_UPDATE_ELEM_struct {
|
||||
uint32_t map_fd;
|
||||
@ -88,18 +68,18 @@ struct BPF_MAP_UPDATE_ELEM_struct {
|
||||
uint64_t ATTRIBUTE_ALIGNED(8) flags;
|
||||
};
|
||||
|
||||
#define BPF_MAP_UPDATE_ELEM_struct_size \
|
||||
# define BPF_MAP_UPDATE_ELEM_struct_size \
|
||||
sizeof(struct BPF_MAP_UPDATE_ELEM_struct)
|
||||
#define expected_BPF_MAP_UPDATE_ELEM_struct_size 32
|
||||
# define expected_BPF_MAP_UPDATE_ELEM_struct_size 32
|
||||
|
||||
struct BPF_MAP_DELETE_ELEM_struct {
|
||||
uint32_t map_fd;
|
||||
uint64_t ATTRIBUTE_ALIGNED(8) key;
|
||||
};
|
||||
|
||||
#define BPF_MAP_DELETE_ELEM_struct_size \
|
||||
# define BPF_MAP_DELETE_ELEM_struct_size \
|
||||
sizeof(struct BPF_MAP_DELETE_ELEM_struct)
|
||||
#define expected_BPF_MAP_DELETE_ELEM_struct_size 16
|
||||
# define expected_BPF_MAP_DELETE_ELEM_struct_size 16
|
||||
|
||||
struct BPF_MAP_GET_NEXT_KEY_struct {
|
||||
uint32_t map_fd;
|
||||
@ -107,9 +87,9 @@ struct BPF_MAP_GET_NEXT_KEY_struct {
|
||||
uint64_t ATTRIBUTE_ALIGNED(8) next_key;
|
||||
};
|
||||
|
||||
#define BPF_MAP_GET_NEXT_KEY_struct_size \
|
||||
# define BPF_MAP_GET_NEXT_KEY_struct_size \
|
||||
sizeof(struct BPF_MAP_GET_NEXT_KEY_struct)
|
||||
#define expected_BPF_MAP_GET_NEXT_KEY_struct_size 24
|
||||
# define expected_BPF_MAP_GET_NEXT_KEY_struct_size 24
|
||||
|
||||
struct BPF_PROG_LOAD_struct {
|
||||
uint32_t prog_type;
|
||||
@ -126,9 +106,9 @@ struct BPF_PROG_LOAD_struct {
|
||||
uint32_t expected_attach_type;
|
||||
};
|
||||
|
||||
#define BPF_PROG_LOAD_struct_size \
|
||||
# define BPF_PROG_LOAD_struct_size \
|
||||
offsetofend(struct BPF_PROG_LOAD_struct, expected_attach_type)
|
||||
#define expected_BPF_PROG_LOAD_struct_size 72
|
||||
# define expected_BPF_PROG_LOAD_struct_size 72
|
||||
|
||||
struct BPF_OBJ_PIN_struct {
|
||||
uint64_t ATTRIBUTE_ALIGNED(8) pathname;
|
||||
@ -136,12 +116,12 @@ struct BPF_OBJ_PIN_struct {
|
||||
uint32_t file_flags;
|
||||
};
|
||||
|
||||
#define BPF_OBJ_PIN_struct_size \
|
||||
# define BPF_OBJ_PIN_struct_size \
|
||||
sizeof(struct BPF_OBJ_PIN_struct)
|
||||
#define expected_BPF_OBJ_PIN_struct_size 16
|
||||
# define expected_BPF_OBJ_PIN_struct_size 16
|
||||
|
||||
#define BPF_OBJ_GET_struct BPF_OBJ_PIN_struct
|
||||
#define BPF_OBJ_GET_struct_size BPF_OBJ_PIN_struct_size
|
||||
# define BPF_OBJ_GET_struct BPF_OBJ_PIN_struct
|
||||
# define BPF_OBJ_GET_struct_size BPF_OBJ_PIN_struct_size
|
||||
|
||||
struct BPF_PROG_ATTACH_struct {
|
||||
uint32_t target_fd;
|
||||
@ -150,9 +130,9 @@ struct BPF_PROG_ATTACH_struct {
|
||||
uint32_t attach_flags;
|
||||
};
|
||||
|
||||
#define BPF_PROG_ATTACH_struct_size \
|
||||
# define BPF_PROG_ATTACH_struct_size \
|
||||
sizeof(struct BPF_PROG_ATTACH_struct)
|
||||
#define expected_BPF_PROG_ATTACH_struct_size 16
|
||||
# define expected_BPF_PROG_ATTACH_struct_size 16
|
||||
|
||||
struct BPF_PROG_DETACH_struct {
|
||||
uint32_t target_fd;
|
||||
@ -160,9 +140,9 @@ struct BPF_PROG_DETACH_struct {
|
||||
uint32_t attach_type;
|
||||
};
|
||||
|
||||
#define BPF_PROG_DETACH_struct_size \
|
||||
# define BPF_PROG_DETACH_struct_size \
|
||||
sizeof(struct BPF_PROG_DETACH_struct)
|
||||
#define expected_BPF_PROG_DETACH_struct_size 12
|
||||
# define expected_BPF_PROG_DETACH_struct_size 12
|
||||
|
||||
struct BPF_PROG_TEST_RUN_struct /* test */ {
|
||||
uint32_t prog_fd;
|
||||
@ -175,9 +155,9 @@ struct BPF_PROG_TEST_RUN_struct /* test */ {
|
||||
uint32_t duration;
|
||||
};
|
||||
|
||||
#define BPF_PROG_TEST_RUN_struct_size \
|
||||
# define BPF_PROG_TEST_RUN_struct_size \
|
||||
sizeof(struct BPF_PROG_TEST_RUN_struct)
|
||||
#define expected_BPF_PROG_TEST_RUN_struct_size 40
|
||||
# define expected_BPF_PROG_TEST_RUN_struct_size 40
|
||||
|
||||
struct BPF_PROG_GET_NEXT_ID_struct {
|
||||
uint32_t start_id;
|
||||
@ -185,12 +165,12 @@ struct BPF_PROG_GET_NEXT_ID_struct {
|
||||
uint32_t open_flags;
|
||||
};
|
||||
|
||||
#define BPF_PROG_GET_NEXT_ID_struct_size \
|
||||
# define BPF_PROG_GET_NEXT_ID_struct_size \
|
||||
sizeof(struct BPF_PROG_GET_NEXT_ID_struct)
|
||||
#define expected_BPF_PROG_GET_NEXT_ID_struct_size 12
|
||||
# define expected_BPF_PROG_GET_NEXT_ID_struct_size 12
|
||||
|
||||
#define BPF_MAP_GET_NEXT_ID_struct BPF_PROG_GET_NEXT_ID_struct
|
||||
#define BPF_MAP_GET_NEXT_ID_struct_size BPF_PROG_GET_NEXT_ID_struct_size
|
||||
# define BPF_MAP_GET_NEXT_ID_struct BPF_PROG_GET_NEXT_ID_struct
|
||||
# define BPF_MAP_GET_NEXT_ID_struct_size BPF_PROG_GET_NEXT_ID_struct_size
|
||||
|
||||
struct BPF_PROG_GET_FD_BY_ID_struct {
|
||||
uint32_t prog_id;
|
||||
@ -198,9 +178,9 @@ struct BPF_PROG_GET_FD_BY_ID_struct {
|
||||
uint32_t open_flags;
|
||||
};
|
||||
|
||||
#define BPF_PROG_GET_FD_BY_ID_struct_size \
|
||||
# define BPF_PROG_GET_FD_BY_ID_struct_size \
|
||||
sizeof(struct BPF_PROG_GET_FD_BY_ID_struct)
|
||||
#define expected_BPF_PROG_GET_FD_BY_ID_struct_size 12
|
||||
# define expected_BPF_PROG_GET_FD_BY_ID_struct_size 12
|
||||
|
||||
struct BPF_MAP_GET_FD_BY_ID_struct {
|
||||
uint32_t map_id;
|
||||
@ -208,9 +188,9 @@ struct BPF_MAP_GET_FD_BY_ID_struct {
|
||||
uint32_t open_flags;
|
||||
};
|
||||
|
||||
#define BPF_MAP_GET_FD_BY_ID_struct_size \
|
||||
# define BPF_MAP_GET_FD_BY_ID_struct_size \
|
||||
sizeof(struct BPF_MAP_GET_FD_BY_ID_struct)
|
||||
#define expected_BPF_MAP_GET_FD_BY_ID_struct_size 12
|
||||
# define expected_BPF_MAP_GET_FD_BY_ID_struct_size 12
|
||||
|
||||
struct BPF_OBJ_GET_INFO_BY_FD_struct /* info */ {
|
||||
uint32_t bpf_fd;
|
||||
@ -218,9 +198,9 @@ struct BPF_OBJ_GET_INFO_BY_FD_struct /* info */ {
|
||||
uint64_t ATTRIBUTE_ALIGNED(8) info;
|
||||
};
|
||||
|
||||
#define BPF_OBJ_GET_INFO_BY_FD_struct_size \
|
||||
# define BPF_OBJ_GET_INFO_BY_FD_struct_size \
|
||||
sizeof(struct BPF_OBJ_GET_INFO_BY_FD_struct)
|
||||
#define expected_BPF_OBJ_GET_INFO_BY_FD_struct_size 16
|
||||
# define expected_BPF_OBJ_GET_INFO_BY_FD_struct_size 16
|
||||
|
||||
struct BPF_PROG_QUERY_struct /* query */ {
|
||||
uint32_t target_fd;
|
||||
@ -231,18 +211,18 @@ struct BPF_PROG_QUERY_struct /* query */ {
|
||||
uint32_t prog_cnt;
|
||||
};
|
||||
|
||||
#define BPF_PROG_QUERY_struct_size \
|
||||
# define BPF_PROG_QUERY_struct_size \
|
||||
offsetofend(struct BPF_PROG_QUERY_struct, prog_cnt)
|
||||
#define expected_BPF_PROG_QUERY_struct_size 28
|
||||
# define expected_BPF_PROG_QUERY_struct_size 28
|
||||
|
||||
struct BPF_RAW_TRACEPOINT_OPEN_struct /* raw_tracepoint */ {
|
||||
uint64_t ATTRIBUTE_ALIGNED(8) name;
|
||||
uint32_t prog_fd;
|
||||
};
|
||||
|
||||
#define BPF_RAW_TRACEPOINT_OPEN_struct_size \
|
||||
# define BPF_RAW_TRACEPOINT_OPEN_struct_size \
|
||||
offsetofend(struct BPF_RAW_TRACEPOINT_OPEN_struct, prog_fd)
|
||||
#define expected_BPF_RAW_TRACEPOINT_OPEN_struct_size 12
|
||||
# define expected_BPF_RAW_TRACEPOINT_OPEN_struct_size 12
|
||||
|
||||
struct bpf_map_info_struct {
|
||||
uint32_t type;
|
||||
@ -261,9 +241,9 @@ struct bpf_map_info_struct {
|
||||
uint64_t ATTRIBUTE_ALIGNED(8) netns_ino; /* skip check */
|
||||
};
|
||||
|
||||
#define bpf_map_info_struct_size \
|
||||
# define bpf_map_info_struct_size \
|
||||
sizeof(struct bpf_map_info_struct)
|
||||
#define expected_bpf_map_info_struct_size 64
|
||||
# define expected_bpf_map_info_struct_size 64
|
||||
|
||||
struct bpf_prog_info_struct {
|
||||
uint32_t type;
|
||||
@ -287,8 +267,8 @@ struct bpf_prog_info_struct {
|
||||
uint64_t ATTRIBUTE_ALIGNED(8) netns_ino; /* skip check */
|
||||
};
|
||||
|
||||
#define bpf_prog_info_struct_size \
|
||||
# define bpf_prog_info_struct_size \
|
||||
sizeof(struct bpf_prog_info_struct)
|
||||
#define expected_bpf_prog_info_struct_size 104
|
||||
# define expected_bpf_prog_info_struct_size 104
|
||||
|
||||
#endif /* !STRACE_BPF_ATTR_H */
|
||||
|
22
bpf_filter.c
22
bpf_filter.c
@ -5,27 +5,7 @@
|
||||
* Copyright (c) 2017-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
26
bpf_filter.h
26
bpf_filter.h
@ -1,34 +1,14 @@
|
||||
/*
|
||||
* Classic BPF filter block.
|
||||
*
|
||||
* Copyright (c) 2015-2017 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#ifndef STRACE_BPF_FILTER_H
|
||||
#define STRACE_BPF_FILTER_H
|
||||
# define STRACE_BPF_FILTER_H
|
||||
|
||||
struct bpf_filter_block {
|
||||
uint16_t code;
|
||||
|
@ -1,5 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#ifndef STRACE_BPF_FPROG_H
|
||||
#define STRACE_BPF_FPROG_H
|
||||
# define STRACE_BPF_FPROG_H
|
||||
|
||||
struct bpf_fprog {
|
||||
unsigned short len;
|
||||
|
@ -1,30 +1,10 @@
|
||||
/*
|
||||
* Decoder of seccomp filter programs.
|
||||
*
|
||||
* Copyright (c) 2015-2017 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
@ -5,27 +5,7 @@
|
||||
* Copyright (c) 2017-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
156
btrfs.c
156
btrfs.c
@ -3,37 +3,17 @@
|
||||
* Copyright (c) 2016-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#ifdef HAVE_LINUX_BTRFS_H
|
||||
|
||||
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_dev_replace_args)
|
||||
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_send_args)
|
||||
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_received_subvol_args)
|
||||
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_vol_args_v2)
|
||||
# include DEF_MPERS_TYPE(struct_btrfs_ioctl_dev_replace_args)
|
||||
# include DEF_MPERS_TYPE(struct_btrfs_ioctl_send_args)
|
||||
# include DEF_MPERS_TYPE(struct_btrfs_ioctl_received_subvol_args)
|
||||
# include DEF_MPERS_TYPE(struct_btrfs_ioctl_vol_args_v2)
|
||||
|
||||
# include <linux/btrfs.h>
|
||||
|
||||
@ -52,8 +32,8 @@ typedef struct btrfs_ioctl_vol_args_v2
|
||||
|
||||
#ifdef HAVE_LINUX_BTRFS_H
|
||||
|
||||
#include "print_fields.h"
|
||||
#include <linux/fs.h>
|
||||
# include "print_fields.h"
|
||||
# include <linux/fs.h>
|
||||
|
||||
/*
|
||||
* Prior to Linux 3.12, the BTRFS_IOC_DEFAULT_SUBVOL used u64 in
|
||||
@ -61,15 +41,15 @@ typedef struct btrfs_ioctl_vol_args_v2
|
||||
*/
|
||||
typedef __u64 u64;
|
||||
|
||||
#ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS
|
||||
# ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS
|
||||
struct btrfs_ioctl_feature_flags {
|
||||
uint64_t compat_flags;
|
||||
uint64_t compat_ro_flags;
|
||||
uint64_t incompat_flags;
|
||||
};
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START
|
||||
# ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START
|
||||
struct btrfs_ioctl_defrag_range_args {
|
||||
uint64_t start;
|
||||
uint64_t len;
|
||||
@ -78,37 +58,37 @@ struct btrfs_ioctl_defrag_range_args {
|
||||
uint32_t compress_type;
|
||||
uint32_t unused[4];
|
||||
};
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#ifndef BTRFS_LABEL_SIZE
|
||||
# define BTRFS_LABEL_SIZE 256
|
||||
#endif
|
||||
# ifndef BTRFS_LABEL_SIZE
|
||||
# define BTRFS_LABEL_SIZE 256
|
||||
# endif
|
||||
|
||||
#ifndef BTRFS_IOC_QUOTA_RESCAN
|
||||
# ifndef BTRFS_IOC_QUOTA_RESCAN
|
||||
struct btrfs_ioctl_quota_rescan_args {
|
||||
uint64_t flags, progress, reserved[6];
|
||||
};
|
||||
# define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \
|
||||
# define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \
|
||||
struct btrfs_ioctl_quota_rescan_args)
|
||||
# define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \
|
||||
# define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \
|
||||
struct btrfs_ioctl_quota_rescan_args)
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT
|
||||
# define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)
|
||||
#endif
|
||||
# ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT
|
||||
# define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)
|
||||
# endif
|
||||
|
||||
#ifndef BTRFS_IOC_GET_FEATURES
|
||||
# define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
|
||||
# ifndef BTRFS_IOC_GET_FEATURES
|
||||
# define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
|
||||
struct btrfs_ioctl_feature_flags)
|
||||
# define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \
|
||||
# define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \
|
||||
struct btrfs_ioctl_feature_flags[2])
|
||||
# define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
|
||||
# define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
|
||||
struct btrfs_ioctl_feature_flags[3])
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#ifndef BTRFS_IOC_TREE_SEARCH_V2
|
||||
# define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \
|
||||
# ifndef BTRFS_IOC_TREE_SEARCH_V2
|
||||
# define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \
|
||||
struct btrfs_ioctl_search_args_v2)
|
||||
struct btrfs_ioctl_search_args_v2 {
|
||||
struct btrfs_ioctl_search_key key; /* in/out - search parameters */
|
||||
@ -117,34 +97,34 @@ struct btrfs_ioctl_search_args_v2 {
|
||||
* to store item */
|
||||
uint64_t buf[0]; /* out - found items */
|
||||
};
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#include "xlat/btrfs_balance_args.h"
|
||||
#include "xlat/btrfs_balance_ctl_cmds.h"
|
||||
#include "xlat/btrfs_balance_flags.h"
|
||||
#include "xlat/btrfs_balance_state.h"
|
||||
#include "xlat/btrfs_compress_types.h"
|
||||
#include "xlat/btrfs_cont_reading_from_srcdev_mode.h"
|
||||
#include "xlat/btrfs_defrag_flags.h"
|
||||
#include "xlat/btrfs_dev_replace_cmds.h"
|
||||
#include "xlat/btrfs_dev_replace_results.h"
|
||||
#include "xlat/btrfs_dev_replace_state.h"
|
||||
#include "xlat/btrfs_dev_stats_flags.h"
|
||||
#include "xlat/btrfs_dev_stats_values.h"
|
||||
#include "xlat/btrfs_features_compat.h"
|
||||
#include "xlat/btrfs_features_compat_ro.h"
|
||||
#include "xlat/btrfs_features_incompat.h"
|
||||
#include "xlat/btrfs_key_types.h"
|
||||
#include "xlat/btrfs_logical_ino_args_flags.h"
|
||||
#include "xlat/btrfs_qgroup_ctl_cmds.h"
|
||||
#include "xlat/btrfs_qgroup_inherit_flags.h"
|
||||
#include "xlat/btrfs_qgroup_limit_flags.h"
|
||||
#include "xlat/btrfs_qgroup_status_flags.h"
|
||||
#include "xlat/btrfs_scrub_flags.h"
|
||||
#include "xlat/btrfs_send_flags.h"
|
||||
#include "xlat/btrfs_snap_flags_v2.h"
|
||||
#include "xlat/btrfs_space_info_flags.h"
|
||||
#include "xlat/btrfs_tree_objectids.h"
|
||||
# include "xlat/btrfs_balance_args.h"
|
||||
# include "xlat/btrfs_balance_ctl_cmds.h"
|
||||
# include "xlat/btrfs_balance_flags.h"
|
||||
# include "xlat/btrfs_balance_state.h"
|
||||
# include "xlat/btrfs_compress_types.h"
|
||||
# include "xlat/btrfs_cont_reading_from_srcdev_mode.h"
|
||||
# include "xlat/btrfs_defrag_flags.h"
|
||||
# include "xlat/btrfs_dev_replace_cmds.h"
|
||||
# include "xlat/btrfs_dev_replace_results.h"
|
||||
# include "xlat/btrfs_dev_replace_state.h"
|
||||
# include "xlat/btrfs_dev_stats_flags.h"
|
||||
# include "xlat/btrfs_dev_stats_values.h"
|
||||
# include "xlat/btrfs_features_compat.h"
|
||||
# include "xlat/btrfs_features_compat_ro.h"
|
||||
# include "xlat/btrfs_features_incompat.h"
|
||||
# include "xlat/btrfs_key_types.h"
|
||||
# include "xlat/btrfs_logical_ino_args_flags.h"
|
||||
# include "xlat/btrfs_qgroup_ctl_cmds.h"
|
||||
# include "xlat/btrfs_qgroup_inherit_flags.h"
|
||||
# include "xlat/btrfs_qgroup_limit_flags.h"
|
||||
# include "xlat/btrfs_qgroup_status_flags.h"
|
||||
# include "xlat/btrfs_scrub_flags.h"
|
||||
# include "xlat/btrfs_send_flags.h"
|
||||
# include "xlat/btrfs_snap_flags_v2.h"
|
||||
# include "xlat/btrfs_space_info_flags.h"
|
||||
# include "xlat/btrfs_tree_objectids.h"
|
||||
|
||||
static inline char
|
||||
prnibble(char v)
|
||||
@ -155,7 +135,7 @@ prnibble(char v)
|
||||
}
|
||||
|
||||
/* 8-4-4-4-12 = 36 characters */
|
||||
#define UUID_STRING_SIZE 36
|
||||
# define UUID_STRING_SIZE 36
|
||||
|
||||
/* Formats uuid, returns 0 if it's all zeroes */
|
||||
static int
|
||||
@ -242,9 +222,9 @@ btrfs_print_qgroup_limit(const struct btrfs_qgroup_limit *lim)
|
||||
tprints("}");
|
||||
}
|
||||
|
||||
#define btrfs_print_key_type(prefix_, where_, field_) \
|
||||
# define btrfs_print_key_type(prefix_, where_, field_) \
|
||||
PRINT_FIELD_XVAL_U((prefix_), (where_), field_, btrfs_key_types, NULL)
|
||||
#define btrfs_print_objectid(prefix_, where_, field_) \
|
||||
# define btrfs_print_objectid(prefix_, where_, field_) \
|
||||
PRINT_FIELD_XVAL_U((prefix_), (where_), field_, btrfs_tree_objectids, \
|
||||
NULL)
|
||||
|
||||
@ -738,9 +718,9 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
struct btrfs_ioctl_fs_info_args args;
|
||||
char uuid[UUID_STRING_SIZE+1];
|
||||
uint32_t nodesize, sectorsize, clone_alignment;
|
||||
#ifndef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
|
||||
# ifndef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
|
||||
uint32_t *reserved32;
|
||||
#endif
|
||||
# endif
|
||||
|
||||
if (entering(tcp))
|
||||
return 0;
|
||||
@ -749,16 +729,16 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
if (umove_or_printaddr(tcp, arg, &args))
|
||||
break;
|
||||
|
||||
#ifdef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
|
||||
# ifdef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
|
||||
nodesize = args.nodesize,
|
||||
sectorsize = args.sectorsize,
|
||||
clone_alignment = args.clone_alignment;
|
||||
#else
|
||||
# else
|
||||
reserved32 = (void *) args.reserved;
|
||||
nodesize = reserved32[0];
|
||||
sectorsize = reserved32[1];
|
||||
clone_alignment = reserved32[2];
|
||||
#endif
|
||||
# endif
|
||||
btrfs_unparse_uuid(args.fsid, uuid);
|
||||
|
||||
PRINT_FIELD_U("{", args, max_id);
|
||||
@ -912,11 +892,11 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
|
||||
tprintf(", flags=");
|
||||
printflags64(btrfs_logical_ino_args_flags,
|
||||
#ifdef HAVE_STRUCT_BTRFS_IOCTL_LOGICAL_INO_ARGS_FLAGS
|
||||
# ifdef HAVE_STRUCT_BTRFS_IOCTL_LOGICAL_INO_ARGS_FLAGS
|
||||
args.flags
|
||||
#else
|
||||
# else
|
||||
args.reserved[3]
|
||||
#endif
|
||||
# endif
|
||||
, "BTRFS_LOGICAL_INO_ARGS_???");
|
||||
PRINT_FIELD_ADDR64(", ", args, inodes);
|
||||
tprints("}");
|
||||
@ -1282,9 +1262,9 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
|
||||
case BTRFS_IOC_CLONE: /* FICLONE */
|
||||
case BTRFS_IOC_CLONE_RANGE: /* FICLONERANGE */
|
||||
#ifdef BTRFS_IOC_FILE_EXTENT_SAME
|
||||
# ifdef BTRFS_IOC_FILE_EXTENT_SAME
|
||||
case BTRFS_IOC_FILE_EXTENT_SAME: /* FIDEDUPERANGE */
|
||||
#endif
|
||||
# endif
|
||||
/*
|
||||
* FICLONE, FICLONERANGE, and FIDEDUPERANGE started out as
|
||||
* btrfs ioctls and the code was kept for the generic
|
||||
|
52
cacheflush.c
52
cacheflush.c
@ -4,30 +4,10 @@
|
||||
* Copyright (c) 2010 Carmelo Amoroso <carmelo.amoroso@st.com>
|
||||
* Copyright (c) 2015 Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
|
||||
* Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2014-2017 The strace developers.
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
@ -40,15 +20,15 @@
|
||||
# include "xlat/cacheflush_scope.h"
|
||||
|
||||
static const struct xlat cacheflush_flags[] = {
|
||||
#ifdef FLUSH_CACHE_BOTH
|
||||
# ifdef FLUSH_CACHE_BOTH
|
||||
XLAT(FLUSH_CACHE_BOTH),
|
||||
#endif
|
||||
#ifdef FLUSH_CACHE_DATA
|
||||
# endif
|
||||
# ifdef FLUSH_CACHE_DATA
|
||||
XLAT(FLUSH_CACHE_DATA),
|
||||
#endif
|
||||
#ifdef FLUSH_CACHE_INSN
|
||||
# endif
|
||||
# ifdef FLUSH_CACHE_INSN
|
||||
XLAT(FLUSH_CACHE_INSN),
|
||||
#endif
|
||||
# endif
|
||||
XLAT_END
|
||||
};
|
||||
|
||||
@ -92,18 +72,18 @@ SYS_FUNC(cacheflush)
|
||||
|
||||
#ifdef SH
|
||||
static const struct xlat cacheflush_flags[] = {
|
||||
#ifdef CACHEFLUSH_D_INVAL
|
||||
# ifdef CACHEFLUSH_D_INVAL
|
||||
XLAT(CACHEFLUSH_D_INVAL),
|
||||
#endif
|
||||
#ifdef CACHEFLUSH_D_WB
|
||||
# endif
|
||||
# ifdef CACHEFLUSH_D_WB
|
||||
XLAT(CACHEFLUSH_D_WB),
|
||||
#endif
|
||||
#ifdef CACHEFLUSH_D_PURGE
|
||||
# endif
|
||||
# ifdef CACHEFLUSH_D_PURGE
|
||||
XLAT(CACHEFLUSH_D_PURGE),
|
||||
#endif
|
||||
#ifdef CACHEFLUSH_I
|
||||
# endif
|
||||
# ifdef CACHEFLUSH_I
|
||||
XLAT(CACHEFLUSH_I),
|
||||
#endif
|
||||
# endif
|
||||
XLAT_END
|
||||
};
|
||||
|
||||
|
24
capability.c
24
capability.c
@ -2,30 +2,10 @@
|
||||
* Copyright (c) 2000 Wichert Akkerman <wakkerma@debian.org>
|
||||
* Copyright (c) 2011 Denys Vlasenko <dvlasenk@redhat.com>
|
||||
* Copyright (c) 2005-2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2014-2017 The strace developers.
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
7
caps0.h
7
caps0.h
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
CAP_CHOWN,
|
||||
CAP_DAC_OVERRIDE,
|
||||
CAP_DAC_READ_SEARCH,
|
||||
|
7
caps1.h
7
caps1.h
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
CAP_MAC_OVERRIDE,
|
||||
CAP_MAC_ADMIN,
|
||||
CAP_SYSLOG,
|
||||
|
7
chdir.c
7
chdir.c
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
SYS_FUNC(chdir)
|
||||
|
7
chmod.c
7
chmod.c
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
static void
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/sh -ex
|
||||
#
|
||||
# Copyright (c) 2018 The strace developers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
type sudo >/dev/null 2>&1 && sudo=sudo || sudo=
|
||||
common_packages='autoconf automake faketime file gawk gcc-multilib git gzip libbluetooth-dev make xz-utils'
|
||||
@ -49,10 +54,23 @@ clone_repo()
|
||||
git clone --depth=1 ${branch:+--branch $branch} "$src" "$dst"
|
||||
}
|
||||
|
||||
case "$CC" in
|
||||
gcc-*)
|
||||
retry_if_failed \
|
||||
$sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
apt_get_install $common_packages "$CC"-multilib
|
||||
;;
|
||||
clang*)
|
||||
apt_get_install $common_packages "$CC"
|
||||
;;
|
||||
*)
|
||||
apt_get_install $common_packages
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$KHEADERS" in
|
||||
*/*)
|
||||
clone_repo https://github.com/"$KHEADERS" kernel ${KBRANCH-}
|
||||
apt_get_install $common_packages
|
||||
$sudo make -C kernel headers_install INSTALL_HDR_PATH=/opt/kernel
|
||||
$sudo rm -rf kernel
|
||||
KHEADERS_INC=/opt/kernel/include
|
||||
@ -63,20 +81,8 @@ case "$KHEADERS" in
|
||||
esac
|
||||
|
||||
case "$CC" in
|
||||
gcc)
|
||||
apt_get_install $common_packages
|
||||
;;
|
||||
gcc-*)
|
||||
retry_if_failed \
|
||||
$sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
apt_get_install $common_packages "$CC"-multilib
|
||||
;;
|
||||
clang*)
|
||||
apt_get_install $common_packages "$CC"
|
||||
;;
|
||||
musl-gcc)
|
||||
clone_repo strace/musl musl
|
||||
apt_get_install $common_packages
|
||||
cd musl
|
||||
CC=gcc
|
||||
build=
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/sh -ex
|
||||
#
|
||||
# Copyright (c) 2018 The strace developers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS='--disable-dependency-tracking'
|
||||
export DISTCHECK_CONFIGURE_FLAGS
|
||||
@ -33,6 +38,7 @@ case "${STACKTRACE-}" in
|
||||
;;
|
||||
esac
|
||||
|
||||
CPPFLAGS=
|
||||
case "$KHEADERS" in
|
||||
*/*)
|
||||
CPPFLAGS='-isystem /opt/kernel/include'
|
||||
@ -62,7 +68,7 @@ $CC -print-multi-lib ||:
|
||||
make --version |head -1
|
||||
autoconf --version |head -1
|
||||
automake --version |head -1
|
||||
kver="$(printf '%s\n%s\n' '#include <linux/version.h>' 'LINUX_VERSION_CODE' | $CC -E -P -)"
|
||||
kver="$(printf '%s\n%s\n' '#include <linux/version.h>' 'LINUX_VERSION_CODE' | $CC $CPPFLAGS -E -P -)"
|
||||
printf 'kernel-headers %s.%s.%s\n' $(($kver/65536)) $(($kver/256%256)) $(($kver%256))
|
||||
echo 'END OF BUILD ENVIRONMENT INFORMATION'
|
||||
|
||||
|
28
clone.c
28
clone.c
@ -7,27 +7,7 @@
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
@ -111,8 +91,10 @@ SYS_FUNC(clone)
|
||||
tprints("flags=");
|
||||
if (!printflags64(clone_flags, flags & ~CSIGNAL, NULL))
|
||||
sep = "";
|
||||
if ((flags & CSIGNAL) != 0)
|
||||
tprintf("%s%s", sep, signame(flags & CSIGNAL));
|
||||
if ((flags & CSIGNAL) != 0) {
|
||||
tprints(sep);
|
||||
printsignal(flags & CSIGNAL);
|
||||
}
|
||||
if ((flags & (CLONE_PARENT_SETTID|CLONE_CHILD_SETTID
|
||||
|CLONE_CHILD_CLEARTID|CLONE_SETTLS)) == 0)
|
||||
return 0;
|
||||
|
34
configure.ac
34
configure.ac
@ -8,27 +8,7 @@
|
||||
# Copyright (c) 2002-2018 The strace developers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT([strace],
|
||||
@ -397,7 +377,6 @@ AC_CHECK_HEADERS(m4_normalize([
|
||||
linux/falloc.h
|
||||
linux/fib_rules.h
|
||||
linux/fiemap.h
|
||||
linux/genetlink.h
|
||||
linux/hiddev.h
|
||||
linux/if_addr.h
|
||||
linux/if_link.h
|
||||
@ -666,6 +645,8 @@ AC_CHECK_DECLS(m4_normalize([
|
||||
KERN_MAX_LOCK_DEPTH,
|
||||
KERN_NMI_WATCHDOG,
|
||||
KERN_PANIC_ON_NMI,
|
||||
KERN_PANIC_ON_WARN,
|
||||
KERN_PANIC_PRINT,
|
||||
NET_LLC,
|
||||
NET_NETFILTER,
|
||||
NET_DCCP,
|
||||
@ -788,15 +769,6 @@ AC_CHECK_MEMBERS(m4_normalize([
|
||||
#include <linux/types.h>
|
||||
#include <linux/videodev2.h>])
|
||||
|
||||
AC_CACHE_CHECK([for BLKGETSIZE64], [ac_cv_have_blkgetsize64],
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
|
||||
#include <stdlib.h>
|
||||
#include <linux/fs.h>], [return !BLKGETSIZE64;])],
|
||||
[ac_cv_have_blkgetsize64=yes], [ac_cv_have_blkgetsize64=no])]
|
||||
if test $ac_cv_have_blkgetsize64 = yes; then
|
||||
AC_DEFINE([HAVE_BLKGETSIZE64], [1], [Define to 1 if you have BLKGETSIZE64.])
|
||||
fi)
|
||||
|
||||
AC_CHECK_SIZEOF([long])
|
||||
SIZEOF_LONG="$ac_cv_sizeof_long"
|
||||
AC_SUBST(SIZEOF_LONG)
|
||||
|
@ -1,28 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2016-2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
@ -1,4 +1,9 @@
|
||||
#! /bin/sh
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2017-2018 The strace developers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
: ${YEAR_FILE:=$1}
|
||||
: ${DEFAULT_YEAR:=$2}
|
||||
@ -14,7 +19,7 @@ year=
|
||||
[ -f "${YEAR_FILE}" ] && year="$(cat "${YEAR_FILE}")"
|
||||
|
||||
[ -n "${year}" ] ||
|
||||
year="$(date -u +%Y -d "$(git show --format=format:%cD --no-patch)")"
|
||||
year="$(date -u +%Y -d "$(git show -s --format=format:%cD)")"
|
||||
|
||||
[ -n "${year}" ] ||
|
||||
year="${DEFAULT_YEAR}"
|
||||
|
22
count.c
22
count.c
@ -11,27 +11,7 @@
|
||||
* Copyright (c) 2006-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
18
debian/changelog.in
vendored
18
debian/changelog.in
vendored
@ -4,6 +4,24 @@ strace (@PACKAGE_VERSION@-1) experimental; urgency=low
|
||||
|
||||
-- Strace <@PACKAGE_BUGREPORT@> @DEB_CHANGELOGTIME@
|
||||
|
||||
strace (4.26-1) unstable; urgency=medium
|
||||
|
||||
* New upstream version.
|
||||
|
||||
-- Dmitry V. Levin <ldv@altlinux.org> Wed, 26 Dec 2018 18:25:10 +0000
|
||||
|
||||
strace (4.25-1) unstable; urgency=medium
|
||||
|
||||
* New upstream version.
|
||||
|
||||
-- Dmitry V. Levin <ldv@altlinux.org> Tue, 30 Oct 2018 08:09:10 +0000
|
||||
|
||||
strace (4.24-1) unstable; urgency=medium
|
||||
|
||||
* New upstream version.
|
||||
|
||||
-- Dmitry V. Levin <ldv@altlinux.org> Tue, 14 Aug 2018 00:01:02 +0000
|
||||
|
||||
strace (4.23-1) unstable; urgency=medium
|
||||
|
||||
* New upstream version.
|
||||
|
30
debian/copyright
vendored
30
debian/copyright
vendored
@ -14,24 +14,14 @@ Copyright (c) 1998-2001 Wichert Akkerman <wakkerma@deephackmode.org>
|
||||
Copyright (c) 2001-2018 The strace developers.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
strace is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published
|
||||
by the Free Software Foundation; either version 2.1 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
strace is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See LGPL-2.1-or-later for more details.
|
||||
|
||||
strace test suite is provided under the terms of the GNU General Public License
|
||||
version 2 or later, see tests/COPYING for more details.
|
||||
|
22
delay.c
22
delay.c
@ -2,27 +2,7 @@
|
||||
* Copyright (c) 2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
24
delay.h
24
delay.h
@ -2,31 +2,11 @@
|
||||
* Copyright (c) 2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#ifndef STRACE_DELAY_H
|
||||
#define STRACE_DELAY_H
|
||||
# define STRACE_DELAY_H
|
||||
|
||||
uint16_t alloc_delay_data(void);
|
||||
void fill_delay_data(uint16_t delay_idx, int intval, bool isenter);
|
||||
|
22
desc.c
22
desc.c
@ -6,27 +6,7 @@
|
||||
* Copyright (c) 1999-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
24
dirent.c
24
dirent.c
@ -4,30 +4,10 @@
|
||||
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
|
||||
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
|
||||
* Copyright (c) 2005-2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2014-2017 The strace developers.
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
24
dirent64.c
24
dirent64.c
@ -4,30 +4,10 @@
|
||||
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
|
||||
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
|
||||
* Copyright (c) 2005-2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2015-2017 The strace developers.
|
||||
* Copyright (c) 2015-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
134
dist/INSTALL
vendored
Normal file
134
dist/INSTALL
vendored
Normal file
@ -0,0 +1,134 @@
|
||||
0. BUILD REQUIREMENTS
|
||||
|
||||
- Sane POSIX shell.
|
||||
- gcc-like compiler that supports C99 and some GNU extensions (namely, empty
|
||||
structures, empty definitions, zero length arrays, ranged designated
|
||||
initialisers).
|
||||
- libc. GNU libc and musl are supported.
|
||||
- Linux UAPI headers.
|
||||
- GNU Make.
|
||||
- GNU coreutils.
|
||||
- For running test suite: gawk, grep, sed, runtime environment for all
|
||||
personalities.
|
||||
- Requirements for optional features are documented in their description.
|
||||
|
||||
1. CONFIGURATION AND OPTIONAL FEATURES
|
||||
|
||||
Configuration is done using GNU Autoconf-generated configure script.
|
||||
Please refer to the README-configure file for generic information regarding
|
||||
configure usage.
|
||||
|
||||
In addition to standard configure options, strace's configure file provides
|
||||
the following options:
|
||||
|
||||
1.1. Additional build and testing hardening
|
||||
|
||||
--enable-gcc-Werror turn on gcc's -Werror option
|
||||
--enable-code-coverage Whether to enable code coverage support
|
||||
--with-gcov=GCOV use given GCOV for coverage (GCOV=gcov).
|
||||
--enable-valgrind Whether to enable Valgrind on the unit tests
|
||||
--disable-valgrind-memcheck
|
||||
Whether to skip memcheck during the Valgrind tests
|
||||
--disable-valgrind-helgrind
|
||||
Whether to skip helgrind during the Valgrind tests
|
||||
--disable-valgrind-drd Whether to skip drd during the Valgrind tests
|
||||
--enable-valgrind-sgcheck
|
||||
Whether to use sgcheck during the Valgrind tests
|
||||
|
||||
1.2. Optional features
|
||||
|
||||
1.2.1. Multiple personalities support
|
||||
|
||||
--enable-mpers=yes|no|check|m32|mx32
|
||||
whether to enable multiple personalities support
|
||||
required for proper decoding of structures used by
|
||||
tracees with personalities that differ from the
|
||||
personality of strace, default is yes.
|
||||
|
||||
Personality is a way system call is performed (in terms of ABI). For example,
|
||||
Linux kernel on multiple 64-bit architectures that evolve from their 32-bit
|
||||
counterparts have support for running 32-bit binaries with 32-bit system call
|
||||
ABI, and that system call ABI constitutes a separate personality in strace's
|
||||
terms. Another example is 32-on-64 bit ABI; while exploiting the same way for
|
||||
performing system calls as native 64-bit system calls, this ABI has different
|
||||
type sizes and, as a result, also constitutes a separate personality; the only
|
||||
such ABI that is currently supported by strace is x32 on x86_64. This is
|
||||
important as different ABIs use different alignments and type sizes, as a
|
||||
result, fields in structures in unions have different offsets on different
|
||||
ABIs. In order to be able to correctly parse all the structures used in various
|
||||
system calls and ioctl commands, strace compiles these structure definitions
|
||||
for these different ABI and then parses DWARF of these compiled definitions in
|
||||
order to generate proper structure definitions that compiled with decoder code.
|
||||
Taking the aforementioned into account, there are the following requirements:
|
||||
|
||||
- gawk (at least version 3)
|
||||
- Ability to compile for m32 personality (on architectures where it is supported)
|
||||
- On x86_64, x32, powerpc64, sparc64, riscv64, tile64: gcc -m32
|
||||
- s390x: gcc -m31
|
||||
- AArch64: a separate compiler for armv7 EABI
|
||||
- See information about configuration in "1.3.2. AArch64: AArch32 support"
|
||||
- Ability to compile for mx32 personality (on architectures where it is supported)
|
||||
- On x86_64: gcc -mx32
|
||||
- For tests: runtime support (linker, libc, and loader)
|
||||
|
||||
1.2.2. Stack unwinding (-k option)
|
||||
|
||||
--with-libunwind use libunwind to implement stack tracing support
|
||||
--with-libiberty use libiberty to demangle symbols in stack trace
|
||||
|
||||
1.3. Architecture-specific features
|
||||
|
||||
1.3.1. ARMv7: OABI support
|
||||
|
||||
--enable-arm-oabi enable OABI support on ARM EABI
|
||||
|
||||
1.3.2. AArch64: AArch32 support
|
||||
|
||||
CC_FOR_M32
|
||||
CPP_FOR_M32
|
||||
CFLAGS_FOR_M32
|
||||
CPPFLAGS_FOR_M32
|
||||
|
||||
1.4. Miscellanea
|
||||
|
||||
1.4.1. Static build configuration
|
||||
|
||||
For static linking, provide LDFLAGS='-static -pthread'.
|
||||
|
||||
1.4.2. Cross-compilation configuration
|
||||
|
||||
2. BUILDING
|
||||
|
||||
make
|
||||
make V=1
|
||||
|
||||
3. TESTING
|
||||
|
||||
make check
|
||||
|
||||
TESTS='list of tests'
|
||||
VALGRIND_FLAGS
|
||||
TIMEOUT_DURATION
|
||||
|
||||
BTRFS_MOUNTPOINT
|
||||
|
||||
4. ADDITIONAL TARGETS
|
||||
|
||||
make code-coverage-capture
|
||||
make code-coverage-capture CODE_COVERAGE_BRANCH_COVERAGE=
|
||||
|
||||
5. INSTALLATION
|
||||
|
||||
make install
|
||||
|
||||
6. PACKAGING
|
||||
|
||||
6.1. Distribution tarball
|
||||
|
||||
./make-dist
|
||||
|
||||
Requires git
|
||||
|
||||
6.2. dpkg package
|
||||
|
||||
6.3. RPM package
|
14
dist/README
vendored
14
dist/README
vendored
@ -4,19 +4,29 @@ and tamper with interactions between processes and the Linux kernel, which
|
||||
include system calls, signal deliveries, and changes of process state.
|
||||
The operation of strace is made possible by the kernel feature known as ptrace.
|
||||
|
||||
strace is released under a Berkeley-style license at the request
|
||||
of Paul Kranenburg; see the file COPYING for details.
|
||||
strace is released under the terms of the GNU Lesser General Public License
|
||||
version 2.1 or later; see the file COPYING for details.
|
||||
strace test suite is released under the terms of the GNU General Public License
|
||||
version 2 or later; see the file tests/COPYING for details.
|
||||
|
||||
See the file CREDITS for a list of authors and other contributors.
|
||||
See the file INSTALL for compilation and installation instructions.
|
||||
See the file NEWS for information on what has changed in recent versions.
|
||||
See the file README-hacking for information related to strace development.
|
||||
|
||||
The project's homepage is at
|
||||
https://strace.io
|
||||
|
||||
The GIT repository of strace is available at
|
||||
https://github.com/strace/strace/ and https://gitlab.com/strace/strace/
|
||||
|
||||
strace has a mailing list:
|
||||
strace-devel@lists.strace.io
|
||||
|
||||
Everyone is welcome to post bug reports, feature requests, comments
|
||||
and patches to the list. The mailing list archives are available at
|
||||
https://lists.strace.io/pipermail/strace-devel/
|
||||
|
||||
System requirements:
|
||||
* Linux kernel >= 2.6.18 is recommended. Older versions might still work
|
||||
but they haven't been thoroughly tested with this release.
|
||||
|
24
dm.c
24
dm.c
@ -8,27 +8,7 @@
|
||||
* Copyright (c) 2016-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
@ -118,7 +98,7 @@ dm_decode_values(struct tcb *tcp, const unsigned int code,
|
||||
}
|
||||
}
|
||||
|
||||
#include "xlat/dm_flags.h"
|
||||
# include "xlat/dm_flags.h"
|
||||
|
||||
static void
|
||||
dm_decode_flags(const struct dm_ioctl *ioc)
|
||||
|
24
dyxlat.c
24
dyxlat.c
@ -1,27 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The strace developers.
|
||||
* Copyright (c) 2017-2018 The strace developers.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
22
epoll.c
22
epoll.c
@ -5,27 +5,7 @@
|
||||
* Copyright (c) 2015-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
@ -2,27 +2,7 @@
|
||||
* Copyright (c) 1999-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -4,38 +4,18 @@
|
||||
* package. Variable 'program_invocation_name' and function 'die()'
|
||||
* have to be defined globally.
|
||||
*
|
||||
* Copyright (c) 2001-2017 The strace developers.
|
||||
* Copyright (c) 2001-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#ifndef STRACE_ERROR_PRINTS_H
|
||||
#define STRACE_ERROR_PRINTS_H
|
||||
# define STRACE_ERROR_PRINTS_H
|
||||
|
||||
#include <stdbool.h>
|
||||
# include <stdbool.h>
|
||||
|
||||
#include "gcc_compat.h"
|
||||
# include "gcc_compat.h"
|
||||
|
||||
extern bool debug_flag;
|
||||
|
||||
@ -51,29 +31,29 @@ void error_msg_and_die(const char *fmt, ...)
|
||||
ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
|
||||
|
||||
/* Wrappers for if (debug_flag) error_msg(...) */
|
||||
#define debug_msg(...) \
|
||||
# define debug_msg(...) \
|
||||
do { \
|
||||
if (debug_flag) \
|
||||
error_msg(__VA_ARGS__); \
|
||||
} while (0)
|
||||
#define debug_perror_msg(...) \
|
||||
# define debug_perror_msg(...) \
|
||||
do { \
|
||||
if (debug_flag) \
|
||||
perror_msg(__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
/* Simple wrappers for providing function name in error messages */
|
||||
#define error_func_msg(fmt_, ...) \
|
||||
# define error_func_msg(fmt_, ...) \
|
||||
error_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
|
||||
#define perror_func_msg(fmt_, ...) \
|
||||
# define perror_func_msg(fmt_, ...) \
|
||||
perror_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
|
||||
#define debug_func_msg(fmt_, ...) \
|
||||
# define debug_func_msg(fmt_, ...) \
|
||||
debug_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
|
||||
#define debug_func_perror_msg(fmt_, ...) \
|
||||
# define debug_func_perror_msg(fmt_, ...) \
|
||||
debug_perror_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
|
||||
#define error_func_msg_and_die(fmt_, ...) \
|
||||
# define error_func_msg_and_die(fmt_, ...) \
|
||||
error_msg_and_die("%s: " fmt_, __func__, ##__VA_ARGS__)
|
||||
#define perror_func_msg_and_die(fmt_, ...) \
|
||||
# define perror_func_msg_and_die(fmt_, ...) \
|
||||
perror_msg_and_die("%s: " fmt_, __func__, ##__VA_ARGS__)
|
||||
|
||||
#endif /* !STRACE_ERROR_PRINTS_H */
|
||||
|
38
evdev.c
38
evdev.c
@ -4,32 +4,13 @@
|
||||
* Copyright (c) 2015-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#include "xlat/evdev_abs.h"
|
||||
#include "xlat/evdev_ev.h"
|
||||
|
||||
#ifdef HAVE_LINUX_INPUT_H
|
||||
|
||||
@ -47,7 +28,6 @@
|
||||
# include "xlat/evdev_relative_axes.h"
|
||||
# include "xlat/evdev_snd.h"
|
||||
# include "xlat/evdev_switch.h"
|
||||
# include "xlat/evdev_sync.h"
|
||||
|
||||
# ifndef SYN_MAX
|
||||
# define SYN_MAX 0xf
|
||||
@ -171,10 +151,10 @@ decode_bitset_(struct tcb *const tcp, const kernel_ulong_t arg,
|
||||
tprints(", ");
|
||||
|
||||
unsigned int size;
|
||||
if ((kernel_ulong_t) tcp->u_rval > max_nr)
|
||||
if ((kernel_ulong_t) tcp->u_rval > max_nr / 8)
|
||||
size = max_nr;
|
||||
else
|
||||
size = tcp->u_rval;
|
||||
size = tcp->u_rval * 8;
|
||||
char decoded_arg[size];
|
||||
|
||||
if (umove_or_printaddr(tcp, arg, &decoded_arg))
|
||||
@ -206,9 +186,9 @@ decode_bitset_(struct tcb *const tcp, const kernel_ulong_t arg,
|
||||
return RVAL_IOCTL_DECODED;
|
||||
}
|
||||
|
||||
#define decode_bitset(tcp_, arg_, decode_nr_, max_nr_, dflt_, xt_) \
|
||||
# define decode_bitset(tcp_, arg_, decode_nr_, max_nr_, dflt_, xt_) \
|
||||
decode_bitset_((tcp_), (arg_), (decode_nr_), (max_nr_), \
|
||||
(dflt_), ARRAY_SIZE(decode_nr_), (xt_))
|
||||
(dflt_), ARRAY_SIZE(decode_nr_) - 1, (xt_))
|
||||
|
||||
# ifdef EVIOCGMTSLOTS
|
||||
static int
|
||||
@ -258,9 +238,9 @@ bit_ioctl(struct tcb *const tcp, const unsigned int ev_nr,
|
||||
const kernel_ulong_t arg)
|
||||
{
|
||||
switch (ev_nr) {
|
||||
case EV_SYN:
|
||||
return decode_bitset(tcp, arg, evdev_sync,
|
||||
SYN_MAX, "SYN_???", XT_INDEXED);
|
||||
case 0:
|
||||
return decode_bitset(tcp, arg, evdev_ev,
|
||||
EV_MAX, "EV_???", XT_SORTED);
|
||||
case EV_KEY:
|
||||
return decode_bitset(tcp, arg, evdev_keycode,
|
||||
KEY_MAX, "KEY_???", XT_INDEXED);
|
||||
|
@ -4,34 +4,14 @@
|
||||
* Copyright (c) 2015-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#ifdef HAVE_LINUX_INPUT_H
|
||||
|
||||
#include DEF_MPERS_TYPE(struct_ff_effect)
|
||||
# include DEF_MPERS_TYPE(struct_ff_effect)
|
||||
|
||||
# include <linux/ioctl.h>
|
||||
# include <linux/input.h>
|
||||
|
24
eventfd.c
24
eventfd.c
@ -1,29 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Ulrich Drepper <drepper@redhat.com>
|
||||
* Copyright (c) 2008-2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2008-2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
22
execve.c
22
execve.c
@ -9,27 +9,7 @@
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
36
f_owner_ex.h
36
f_owner_ex.h
@ -2,40 +2,20 @@
|
||||
* Copyright (c) 2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#ifndef STRACE_F_OWNER_EX_H
|
||||
#define STRACE_F_OWNER_EX_H
|
||||
# define STRACE_F_OWNER_EX_H
|
||||
|
||||
#include <linux/fcntl.h>
|
||||
# include <linux/fcntl.h>
|
||||
|
||||
#if defined HAVE_STRUCT_F_OWNER_EX
|
||||
# if defined HAVE_STRUCT_F_OWNER_EX
|
||||
typedef struct f_owner_ex struct_kernel_f_owner_ex;
|
||||
#elif defined HAVE_STRUCT___KERNEL_F_OWNER_EX
|
||||
# elif defined HAVE_STRUCT___KERNEL_F_OWNER_EX
|
||||
typedef struct __kernel_f_owner_ex struct_kernel_f_owner_ex;
|
||||
#else
|
||||
# error struct f_owner_ex definition not found in <linux/fcntl.h>
|
||||
#endif
|
||||
# else
|
||||
# error struct f_owner_ex definition not found in <linux/fcntl.h>
|
||||
# endif
|
||||
|
||||
#endif /* !STRACE_F_OWNER_EX_H */
|
||||
|
24
fadvise.c
24
fadvise.c
@ -5,30 +5,10 @@
|
||||
* Copyright (c) 2009 Andreas Schwab <schwab@redhat.com>
|
||||
* Copyright (c) 2009 Kirill A. Shutemov <kirill@shutemov.name>
|
||||
* Copyright (c) 2011-2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2014-2017 The strace developers.
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#ifdef HAVE_LINUX_FALLOC_H
|
||||
|
22
fanotify.c
22
fanotify.c
@ -3,27 +3,7 @@
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
SYS_FUNC(fchownat)
|
||||
|
24
fcntl.c
24
fcntl.c
@ -6,27 +6,7 @@
|
||||
* Copyright (c) 1999-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
@ -134,7 +114,7 @@ print_fcntl(struct tcb *tcp)
|
||||
break;
|
||||
case F_SETSIG:
|
||||
tprints(", ");
|
||||
tprints(signame(tcp->u_arg[2]));
|
||||
printsignal(tcp->u_arg[2]);
|
||||
break;
|
||||
case F_GETOWN:
|
||||
case F_GETPIPE_SZ:
|
||||
|
@ -1,28 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2017 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
@ -2,27 +2,7 @@
|
||||
* Copyright (c) 2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
@ -1,29 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2015-2017 The strace developers.
|
||||
* Copyright (c) 2015-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2018 Eugene Syromyatnikov <evgsyr@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#include DEF_MPERS_TYPE(struct_keyctl_kdf_params)
|
||||
|
@ -1,28 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2016-2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
@ -1,28 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2016-2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
@ -1,29 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2016-2017 The strace developers.
|
||||
* Copyright (c) 2016-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
@ -1,29 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2016-2017 The strace developers.
|
||||
* Copyright (c) 2016-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
@ -1,29 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2016-2017 The strace developers.
|
||||
* Copyright (c) 2016-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#include DEF_MPERS_TYPE(struct_xfs_dqstats)
|
||||
|
@ -1,4 +1,9 @@
|
||||
#! /bin/sh
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2017-2018 The strace developers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
if [ "$1" = "-f" ]; then
|
||||
shift
|
||||
@ -22,7 +27,7 @@ date=
|
||||
[ -f "${DATE_FILE}" ] && date="$(cat "${DATE_FILE}")"
|
||||
|
||||
[ -n "${date}" ] ||
|
||||
date="$(git log -n 1 --format=format:%cD --no-patch "${FILE}")"
|
||||
date="$(git log -s -n 1 --format=format:%cD "${FILE}")"
|
||||
|
||||
[ -n "${date}" ] ||
|
||||
date="${DEFAULT_DATE}"
|
||||
|
@ -1,29 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2015-2017 The strace developers.
|
||||
* Copyright (c) 2015-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
22
file_ioctl.c
22
file_ioctl.c
@ -3,27 +3,7 @@
|
||||
* Copyright (c) 2016-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
24
filter.h
24
filter.h
@ -3,31 +3,11 @@
|
||||
* Copyright (c) 2017-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#ifndef STRACE_FILTER_H
|
||||
#define STRACE_FILTER_H
|
||||
# define STRACE_FILTER_H
|
||||
|
||||
struct number_set;
|
||||
typedef int (*string_to_uint_func)(const char *);
|
||||
|
@ -3,27 +3,7 @@
|
||||
* Copyright (c) 2016-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
@ -57,9 +37,12 @@ sigstr_to_uint(const char *s)
|
||||
if (strncasecmp(s, "SIG", 3) == 0)
|
||||
s += 3;
|
||||
|
||||
for (int i = 0; i <= 255; ++i) {
|
||||
for (int i = 1; i <= 255; ++i) {
|
||||
const char *name = signame(i);
|
||||
|
||||
if (!name)
|
||||
continue;
|
||||
|
||||
if (strncasecmp(name, "SIG", 3) != 0)
|
||||
continue;
|
||||
|
||||
|
24
flock.c
24
flock.c
@ -3,30 +3,10 @@
|
||||
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
|
||||
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
|
||||
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
|
||||
* Copyright (c) 1999-2017 The strace developers.
|
||||
* Copyright (c) 1999-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
48
flock.h
48
flock.h
@ -1,50 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2015-2017 The strace developers.
|
||||
* Copyright (c) 2015-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#ifndef STRACE_FLOCK_H
|
||||
#define STRACE_FLOCK_H
|
||||
# define STRACE_FLOCK_H
|
||||
|
||||
#include <linux/fcntl.h>
|
||||
# include <linux/fcntl.h>
|
||||
|
||||
#if defined HAVE_STRUCT_FLOCK
|
||||
# if defined HAVE_STRUCT_FLOCK
|
||||
typedef struct flock struct_kernel_flock;
|
||||
#elif defined HAVE_STRUCT___KERNEL_FLOCK
|
||||
# elif defined HAVE_STRUCT___KERNEL_FLOCK
|
||||
typedef struct __kernel_flock struct_kernel_flock;
|
||||
#else
|
||||
# error struct flock definition not found in <linux/fcntl.h>
|
||||
#endif
|
||||
# else
|
||||
# error struct flock definition not found in <linux/fcntl.h>
|
||||
# endif
|
||||
|
||||
#if defined HAVE_STRUCT_FLOCK64
|
||||
# if defined HAVE_STRUCT_FLOCK64
|
||||
typedef struct flock64 struct_kernel_flock64;
|
||||
#elif defined HAVE_STRUCT___KERNEL_FLOCK64
|
||||
# elif defined HAVE_STRUCT___KERNEL_FLOCK64
|
||||
typedef struct __kernel_flock64 struct_kernel_flock64;
|
||||
#else
|
||||
# error struct flock64 definition not found in <linux/fcntl.h>
|
||||
#endif
|
||||
# else
|
||||
# error struct flock64 definition not found in <linux/fcntl.h>
|
||||
# endif
|
||||
|
||||
#endif /* !STRACE_FLOCK_H */
|
||||
|
24
fs_x_ioctl.c
24
fs_x_ioctl.c
@ -1,30 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
|
||||
* Copyright (c) 2015-2016 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2016-2017 The strace developers.
|
||||
* Copyright (c) 2016-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
SYS_FUNC(fstatfs)
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
SYS_FUNC(fstatfs64)
|
||||
|
29
futex.c
29
futex.c
@ -6,27 +6,7 @@
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
@ -41,6 +21,7 @@
|
||||
# define FUTEX_OP_OPARG_SHIFT 8
|
||||
#endif
|
||||
|
||||
#include "xlat/futexbitset.h"
|
||||
#include "xlat/futexops.h"
|
||||
#include "xlat/futexwakeops.h"
|
||||
#include "xlat/futexwakecmps.h"
|
||||
@ -74,11 +55,13 @@ SYS_FUNC(futex)
|
||||
tprintf(", %u", val);
|
||||
tprints(", ");
|
||||
print_timespec(tcp, timeout);
|
||||
tprintf(", %#x", val3);
|
||||
tprints(", ");
|
||||
printxval(futexbitset, val3, NULL);
|
||||
break;
|
||||
case FUTEX_WAKE_BITSET:
|
||||
tprintf(", %u", val);
|
||||
tprintf(", %#x", val3);
|
||||
tprints(", ");
|
||||
printxval(futexbitset, val3, NULL);
|
||||
break;
|
||||
case FUTEX_REQUEUE:
|
||||
tprintf(", %u", val);
|
||||
|
181
gcc_compat.h
181
gcc_compat.h
@ -3,111 +3,118 @@
|
||||
* Copyright (c) 2015-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#ifndef STRACE_GCC_COMPAT_H
|
||||
#define STRACE_GCC_COMPAT_H
|
||||
# define STRACE_GCC_COMPAT_H
|
||||
|
||||
#if defined __GNUC__ && defined __GNUC_MINOR__
|
||||
# define GNUC_PREREQ(maj, min) \
|
||||
# if defined __GNUC__ && defined __GNUC_MINOR__
|
||||
# define GNUC_PREREQ(maj, min) \
|
||||
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
|
||||
#else
|
||||
# define __attribute__(x) /* empty */
|
||||
# define GNUC_PREREQ(maj, min) 0
|
||||
#endif
|
||||
# else
|
||||
# define GNUC_PREREQ(maj, min) 0
|
||||
# endif
|
||||
|
||||
#if GNUC_PREREQ(2, 5)
|
||||
# define ATTRIBUTE_NORETURN __attribute__((__noreturn__))
|
||||
#else
|
||||
# define ATTRIBUTE_NORETURN /* empty */
|
||||
#endif
|
||||
# if defined __clang__ && defined __clang_major__ && defined __clang_minor__
|
||||
# define CLANG_PREREQ(maj, min) \
|
||||
((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min))
|
||||
# else
|
||||
# define CLANG_PREREQ(maj, min) 0
|
||||
# endif
|
||||
|
||||
#if GNUC_PREREQ(2, 7)
|
||||
# define ATTRIBUTE_FORMAT(args) __attribute__((__format__ args))
|
||||
# define ATTRIBUTE_ALIGNED(arg) __attribute__((__aligned__(arg)))
|
||||
# define ATTRIBUTE_PACKED __attribute__((__packed__))
|
||||
#else
|
||||
# define ATTRIBUTE_FORMAT(args) /* empty */
|
||||
# define ATTRIBUTE_ALIGNED(arg) /* empty */
|
||||
# define ATTRIBUTE_PACKED /* empty */
|
||||
#endif
|
||||
# if !(GNUC_PREREQ(2, 0) || CLANG_PREREQ(1, 0))
|
||||
# define __attribute__(x) /* empty */
|
||||
# endif
|
||||
|
||||
#if GNUC_PREREQ(3, 0)
|
||||
# define SAME_TYPE(x, y) __builtin_types_compatible_p(typeof(x), typeof(y))
|
||||
# define FAIL_BUILD_ON_ZERO(expr) (sizeof(int[-1 + 2 * !!(expr)]) * 0)
|
||||
# if GNUC_PREREQ(2, 5)
|
||||
# define ATTRIBUTE_NORETURN __attribute__((__noreturn__))
|
||||
# else
|
||||
# define ATTRIBUTE_NORETURN /* empty */
|
||||
# endif
|
||||
|
||||
# if GNUC_PREREQ(2, 7)
|
||||
# define ATTRIBUTE_FORMAT(args) __attribute__((__format__ args))
|
||||
# define ATTRIBUTE_ALIGNED(arg) __attribute__((__aligned__(arg)))
|
||||
# define ATTRIBUTE_PACKED __attribute__((__packed__))
|
||||
# else
|
||||
# define ATTRIBUTE_FORMAT(args) /* empty */
|
||||
# define ATTRIBUTE_ALIGNED(arg) /* empty */
|
||||
# define ATTRIBUTE_PACKED /* empty */
|
||||
# endif
|
||||
|
||||
# if GNUC_PREREQ(3, 0)
|
||||
# define SAME_TYPE(x, y) __builtin_types_compatible_p(typeof(x), typeof(y))
|
||||
# define FAIL_BUILD_ON_ZERO(expr) (sizeof(int[-1 + 2 * !!(expr)]) * 0)
|
||||
/* &(a)[0] is a pointer and not an array, shouldn't be treated as the same */
|
||||
# define MUST_BE_ARRAY(a) FAIL_BUILD_ON_ZERO(!SAME_TYPE((a), &(a)[0]))
|
||||
#else
|
||||
# define SAME_TYPE(x, y) 0
|
||||
# define MUST_BE_ARRAY(a) 0
|
||||
#endif
|
||||
# define MUST_BE_ARRAY(a) FAIL_BUILD_ON_ZERO(!SAME_TYPE((a), &(a)[0]))
|
||||
# else
|
||||
# define SAME_TYPE(x, y) 0
|
||||
# define MUST_BE_ARRAY(a) 0
|
||||
# endif
|
||||
|
||||
#if GNUC_PREREQ(3, 0)
|
||||
# define ATTRIBUTE_MALLOC __attribute__((__malloc__))
|
||||
#else
|
||||
# define ATTRIBUTE_MALLOC /* empty */
|
||||
#endif
|
||||
# if GNUC_PREREQ(3, 0)
|
||||
# define ATTRIBUTE_MALLOC __attribute__((__malloc__))
|
||||
# else
|
||||
# define ATTRIBUTE_MALLOC /* empty */
|
||||
# endif
|
||||
|
||||
#if GNUC_PREREQ(3, 1)
|
||||
# define ATTRIBUTE_NOINLINE __attribute__((__noinline__))
|
||||
#else
|
||||
# define ATTRIBUTE_NOINLINE /* empty */
|
||||
#endif
|
||||
# if GNUC_PREREQ(3, 1)
|
||||
# define ATTRIBUTE_NOINLINE __attribute__((__noinline__))
|
||||
# else
|
||||
# define ATTRIBUTE_NOINLINE /* empty */
|
||||
# endif
|
||||
|
||||
#if GNUC_PREREQ(4, 0)
|
||||
# define ATTRIBUTE_SENTINEL __attribute__((__sentinel__))
|
||||
#else
|
||||
# define ATTRIBUTE_SENTINEL /* empty */
|
||||
#endif
|
||||
# if GNUC_PREREQ(4, 0)
|
||||
# define ATTRIBUTE_SENTINEL __attribute__((__sentinel__))
|
||||
# else
|
||||
# define ATTRIBUTE_SENTINEL /* empty */
|
||||
# endif
|
||||
|
||||
#if GNUC_PREREQ(4, 1)
|
||||
# define ALIGNOF(t_) __alignof__(t_)
|
||||
#else
|
||||
# define ALIGNOF(t_) (sizeof(struct { char x_; t_ y_; }) - sizeof(t_))
|
||||
#endif
|
||||
# if GNUC_PREREQ(4, 1)
|
||||
# define ALIGNOF(t_) __alignof__(t_)
|
||||
# else
|
||||
# define ALIGNOF(t_) (sizeof(struct { char x_; t_ y_; }) - sizeof(t_))
|
||||
# endif
|
||||
|
||||
#if GNUC_PREREQ(4, 3)
|
||||
# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__((__alloc_size__ args))
|
||||
#else
|
||||
# define ATTRIBUTE_ALLOC_SIZE(args) /* empty */
|
||||
#endif
|
||||
# if GNUC_PREREQ(4, 3)
|
||||
# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__((__alloc_size__ args))
|
||||
# else
|
||||
# define ATTRIBUTE_ALLOC_SIZE(args) /* empty */
|
||||
# endif
|
||||
|
||||
#if GNUC_PREREQ(7, 0)
|
||||
# define ATTRIBUTE_FALLTHROUGH __attribute__((__fallthrough__))
|
||||
#else
|
||||
# define ATTRIBUTE_FALLTHROUGH ((void) 0)
|
||||
#endif
|
||||
# if GNUC_PREREQ(7, 0)
|
||||
# define ATTRIBUTE_FALLTHROUGH __attribute__((__fallthrough__))
|
||||
# else
|
||||
# define ATTRIBUTE_FALLTHROUGH ((void) 0)
|
||||
# endif
|
||||
|
||||
#if GNUC_PREREQ(6, 0)
|
||||
# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE \
|
||||
# if CLANG_PREREQ(2, 8)
|
||||
# define DIAG_PUSH_IGNORE_OVERRIDE_INIT \
|
||||
_Pragma("clang diagnostic push"); \
|
||||
_Pragma("clang diagnostic ignored \"-Winitializer-overrides\"");
|
||||
# define DIAG_POP_IGNORE_OVERRIDE_INIT \
|
||||
_Pragma("clang diagnostic pop");
|
||||
# elif GNUC_PREREQ(4, 2)
|
||||
# define DIAG_PUSH_IGNORE_OVERRIDE_INIT \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Woverride-init\"");
|
||||
# define DIAG_POP_IGNORE_OVERRIDE_INIT \
|
||||
_Pragma("GCC diagnostic pop");
|
||||
# else
|
||||
# define DIAG_PUSH_IGNORE_OVERRIDE_INIT /* empty */
|
||||
# define DIAG_POP_IGNORE_OVERRIDE_INIT /* empty */
|
||||
# endif
|
||||
|
||||
# if GNUC_PREREQ(6, 0)
|
||||
# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Wtautological-compare\"");
|
||||
# define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE \
|
||||
# define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE \
|
||||
_Pragma("GCC diagnostic pop");
|
||||
#else
|
||||
# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE /* empty */
|
||||
# define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE /* empty */
|
||||
#endif
|
||||
# else
|
||||
# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE /* empty */
|
||||
# define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE /* empty */
|
||||
# endif
|
||||
|
||||
#endif /* !STRACE_GCC_COMPAT_H */
|
||||
|
@ -2,27 +2,7 @@
|
||||
# Copyright (c) 2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
input="$1"
|
||||
shift
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/sh -e
|
||||
#
|
||||
# Copyright (c) 2015-2018 The strace developers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
list="$(sed -r -n '/^strace_SOURCES[[:space:]]*=/,/^[[:space:]]*# end of strace_SOURCES/ s/^[[:space:]]*([[:alnum:]][^.]*\.c)[[:space:]]*\\$/\1/p' Makefile.am |
|
||||
xargs -r grep -Elx '#[[:space:]]*include[[:space:]]+MPERS_DEFS' |
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/sh -e
|
||||
#
|
||||
# Copyright (c) 2015-2018 The strace developers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
echo 'enum {'
|
||||
echo 'SEN_printargs = 0,'
|
||||
|
14
get_personality.c
Normal file
14
get_personality.c
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#if SUPPORTED_PERSONALITIES > 1
|
||||
# include "get_personality.h"
|
||||
# include <linux/audit.h>
|
||||
# include "arch_get_personality.c"
|
||||
#endif
|
16
get_personality.h
Normal file
16
get_personality.h
Normal file
@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#ifndef STRACE_GET_PERSONALITY_H
|
||||
# define STRACE_GET_PERSONALITY_H
|
||||
|
||||
# include "ptrace.h"
|
||||
|
||||
extern int
|
||||
get_personality_from_syscall_info(const struct ptrace_syscall_info *);
|
||||
|
||||
#endif /* !STRACE_GET_PERSONALITY_H */
|
@ -1,28 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2012-2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
7
getcpu.c
7
getcpu.c
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
SYS_FUNC(getcpu)
|
||||
|
7
getcwd.c
7
getcwd.c
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
SYS_FUNC(getcwd)
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2018 The strace developers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
SYS_FUNC(getpagesize)
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
#include "xlat/getrandom_flags.h"
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user