From dce0c55a23ab4da9360fb4e7ff3d93d07e1ea945 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Fri, 6 Apr 2018 16:03:00 +0100 Subject: [PATCH 1/4] Add missing LICENSE. libdtrace-ctf is dual-licensed under the UPL and GPLv2, so we should have the UPL license text in the source tree. --- LICENSE | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..86f3727 --- /dev/null +++ b/LICENSE @@ -0,0 +1,36 @@ +The Universal Permissive License (UPL), Version 1.0 + +Subject to the condition set forth below, permission is hereby granted +to any person obtaining a copy of this software, associated +documentation and/or data (collectively the "Software"), free of charge +and under any and all copyright rights in the Software, and any and all +patent rights owned or freely licensable by each licensor hereunder +covering either (i) the unmodified Software as contributed to or +provided by such licensor, or (ii) the Larger Works (as defined below), +to deal in both + +(a) the Software, and +(b) any piece of software and/or hardware listed in the lrgrwrks.txt +file if one is included with the Software (each a “Larger Work” to which +the Software is contributed by such licensors), + +without restriction, including without limitation the rights to copy, +create derivative works of, display, perform, and distribute the +Software and make, use, sell, offer for sale, import, export, have made, +and have sold the Software and the Larger Work(s), and to sublicense the +foregoing rights on either these or other terms. + +This license is subject to the following condition: +The above copyright notice and either this complete permission notice or +at a minimum a reference to the UPL must be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Licensed under the Universal Permissive License v 1.0 as shown at +http://oss.oracle.com/licenses/upl. From baf0c6a3b9ca48957c47f1d689ae3877133023c6 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Fri, 4 May 2018 19:06:43 +0100 Subject: [PATCH 2/4] create: stop rollback in child containers destroying all types therein We mix up a type and index, and in child containers these differ by 0x8000: so ctf_rollback() finds that *every* type has been 'added' since the last ctf_snapshot(), and deletes them all, with unpleasant effects on users, since this violates their specified behaviour rather drastically. Orabug: 27971037 --- libctf/ctf_create.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libctf/ctf_create.c b/libctf/ctf_create.c index e9e6695..6986c43 100644 --- a/libctf/ctf_create.c +++ b/libctf/ctf_create.c @@ -653,7 +653,7 @@ ctf_rollback(ctf_file_t *fp, ctf_snapshot_id_t id) for (dtd = ctf_list_next(&fp->ctf_dtdefs); dtd != NULL; dtd = ntd) { ntd = ctf_list_next(dtd); - if (dtd->dtd_type <= id.dtd_id) + if (CTF_TYPE_TO_INDEX(dtd->dtd_type) <= id.dtd_id) continue; ctf_dtd_delete(fp, dtd); From c18536fb38a19954f3c27f861dc671c236ce1c9a Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Fri, 4 May 2018 19:11:40 +0100 Subject: [PATCH 3/4] Prepare for 0.8.1. --- GNUmakefile | 2 +- NEWS | 7 +++++++ libdtrace-ctf.spec | 6 +++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 16c1e82..e54194d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -14,7 +14,7 @@ .SUFFIXES: PROJECT := libdtrace-ctf -VERSION := 0.8.0 +VERSION := 0.8.1 # Verify supported hardware. diff --git a/NEWS b/NEWS index f0cba2c..3adc510 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,10 @@ +0.8.1 +----- + +Fix bug causing loss of all types in a CTF container if the container has +a parent and ctf_rollback() is called. (Only the types since the last +ctf_snapshot() should be removed, not every type.) + 0.8.0 ----- diff --git a/libdtrace-ctf.spec b/libdtrace-ctf.spec index db44112..a9dd8e0 100644 --- a/libdtrace-ctf.spec +++ b/libdtrace-ctf.spec @@ -15,7 +15,7 @@ Group: Development/Libraries Requires: gcc elfutils-libelf zlib BuildRequires: elfutils-libelf-devel kernel-headers glibc-headers zlib-devel Summary: Compact Type Format library. -Version: 0.8.0 +Version: 0.8.1 Release: 1%{?dist} Source: libdtrace-ctf-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -77,6 +77,10 @@ rm -rf $RPM_BUILD_DIR/%{name}-%{version} %{_includedir}/sys/ctf_api.h %changelog +* Fri May 04 2018 - nick.alcock@oracle.com - 0.8.1-1 +- Fix ctf_rollback() in client containers to delete only the types +added since the last snapshot, rather than all of them. +[Orabug: 27971037] * Mon Jan 29 2018 - nick.alcock@oracle.com - 0.8.0-1 - Add CTF_CHAR. * Mon Jan 22 2018 - nick.alcock@oracle.com - 0.7.1-1 From 99f229863c58e058601e700e8ba86a0c461cee03 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Wed, 3 Feb 2021 19:41:38 +0000 Subject: [PATCH 4/4] License clarifications. --- README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..5ad1d51 --- /dev/null +++ b/README.md @@ -0,0 +1,55 @@ +# Linux libdtrace-ctf + +libdtrace-ctf is a port of the Solaris Compact Type Format library to Linux. +It's meant to be used with DTrace for Linux. +Its file format is similar to but not compatible with Solaris CTF files. +The public API is source-compatible, to ease adoption of Linux for libctf users. + +The source has been available at +[oss.oracle.com](https://oss.oracle.com/git/gitweb.cgi?p=libdtrace-ctf.git;a=tags), +as a git repository with full git history. +By posting the source here on github.com, we hope to increase the visibility for our work +and to make it even easier for people to access the source. +We will also use this repository to work with developers in the Linux community. + +See the [dtrace-utils README](https://github.com/oracle/dtrace-utils) +for more information on how to build DTrace utilities +with `libdtrace-ctf` for the Linux kernel. + +## License + +libdtrace-ctf is licensed under either the GPLv2+ or the UPL 1.0 (Universal +Permissive License). A copy of the GPLv2 license is included in this repository +as the COPYING file. A copy of the UPL 1.0 license is included in this repository +as the LICENSE file. + +## Dependencies + +Dependencies may include: +- elfutils (to the extent that elfutils is utilized, libdtrace-ctf uses only + those portions of elfutils that are licensed LGPLv3) +- zlib + +## Build + +Build as follows: + +``` +$ make +$ sudo make install +``` + +For more detail, see [README.build-system](README.build-system). + +## Questions + +For questions, check the +[dtrace-devel mailing list](https://oss.oracle.com/mailman/listinfo/dtrace-devel). + +## Pull Requests and Support + +We currently do not accept pull requests via GitHub, please contact us via the mailing list above. + +The source code for libdtrace-ctf is published here without support. Compiled binaries are provided as part of Oracle Linux, +which is [free to download](http://www.oracle.com/technetwork/server-storage/linux/downloads/index.html), distribute and use. +Support for libdtrace-ctf is included in Oracle Linux support subscriptions. Individual packages and updates are available on the [Oracle Linux yum server](https://yum.oracle.com).