mirror of
https://git.yoctoproject.org/poky
synced 2026-02-22 09:29:40 +01:00
Compare commits
34 Commits
dunfell-23
...
yocto-3.1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aec83663aa | ||
|
|
f5e8301b20 | ||
|
|
d2a464dd59 | ||
|
|
6b4ee014f3 | ||
|
|
a99017d705 | ||
|
|
88cf58e2f5 | ||
|
|
a4d08aebae | ||
|
|
81a5f76511 | ||
|
|
25ace79510 | ||
|
|
8369253493 | ||
|
|
fe25a5ea27 | ||
|
|
8d7596c0eb | ||
|
|
b952c3f07a | ||
|
|
560a0ba359 | ||
|
|
fb8372aa70 | ||
|
|
4f6333a564 | ||
|
|
262f47eff8 | ||
|
|
82af51171e | ||
|
|
2d6b838a3a | ||
|
|
97f9525f2f | ||
|
|
c28f0905a2 | ||
|
|
a8de3a2233 | ||
|
|
c611f71574 | ||
|
|
c8149df17e | ||
|
|
40bfc5ff44 | ||
|
|
e3af3f6915 | ||
|
|
6c3fc7df68 | ||
|
|
113f05b50e | ||
|
|
c7fafc86a1 | ||
|
|
a4eed21341 | ||
|
|
4d69f69082 | ||
|
|
accc5ad750 | ||
|
|
b93a3fcbcd | ||
|
|
7d78d5f6e9 |
@@ -405,8 +405,8 @@ This fetcher supports the following parameters:
|
||||
|
||||
- *"nobranch":* Tells the fetcher to not check the SHA validation for
|
||||
the branch when set to "1". The default is "0". Set this option for
|
||||
the recipe that refers to the commit that is valid for a tag instead
|
||||
of the branch.
|
||||
the recipe that refers to the commit that is valid for any namespace
|
||||
(branch, tag, ...) instead of the branch.
|
||||
|
||||
- *"bareclone":* Tells the fetcher to clone a bare clone into the
|
||||
destination directory without checking out a working tree. Only the
|
||||
|
||||
@@ -44,7 +44,8 @@ Supported SRC_URI options are:
|
||||
|
||||
- nobranch
|
||||
Don't check the SHA validation for branch. set this option for the recipe
|
||||
referring to commit which is valid in tag instead of branch.
|
||||
referring to commit which is valid in any namespace (branch, tag, ...)
|
||||
instead of branch.
|
||||
The default is "0", set nobranch=1 if needed.
|
||||
|
||||
- usehead
|
||||
@@ -63,6 +64,7 @@ import errno
|
||||
import fnmatch
|
||||
import os
|
||||
import re
|
||||
import shlex
|
||||
import subprocess
|
||||
import tempfile
|
||||
import bb
|
||||
@@ -352,7 +354,7 @@ class Git(FetchMethod):
|
||||
# We do this since git will use a "-l" option automatically for local urls where possible
|
||||
if repourl.startswith("file://"):
|
||||
repourl = repourl[7:]
|
||||
clone_cmd = "LANG=C %s clone --bare --mirror \"%s\" %s --progress" % (ud.basecmd, repourl, ud.clonedir)
|
||||
clone_cmd = "LANG=C %s clone --bare --mirror %s %s --progress" % (ud.basecmd, shlex.quote(repourl), ud.clonedir)
|
||||
if ud.proto.lower() != 'file':
|
||||
bb.fetch2.check_network_access(d, clone_cmd, ud.url)
|
||||
progresshandler = GitProgressHandler(d)
|
||||
@@ -364,8 +366,12 @@ class Git(FetchMethod):
|
||||
if "origin" in output:
|
||||
runfetchcmd("%s remote rm origin" % ud.basecmd, d, workdir=ud.clonedir)
|
||||
|
||||
runfetchcmd("%s remote add --mirror=fetch origin \"%s\"" % (ud.basecmd, repourl), d, workdir=ud.clonedir)
|
||||
fetch_cmd = "LANG=C %s fetch -f --progress \"%s\" refs/*:refs/*" % (ud.basecmd, repourl)
|
||||
runfetchcmd("%s remote add --mirror=fetch origin %s" % (ud.basecmd, shlex.quote(repourl)), d, workdir=ud.clonedir)
|
||||
|
||||
if ud.nobranch:
|
||||
fetch_cmd = "LANG=C %s fetch -f --progress %s refs/*:refs/*" % (ud.basecmd, shlex.quote(repourl))
|
||||
else:
|
||||
fetch_cmd = "LANG=C %s fetch -f --progress %s refs/heads/*:refs/heads/* refs/tags/*:refs/tags/*" % (ud.basecmd, shlex.quote(repourl))
|
||||
if ud.proto.lower() != 'file':
|
||||
bb.fetch2.check_network_access(d, fetch_cmd, ud.url)
|
||||
progresshandler = GitProgressHandler(d)
|
||||
@@ -559,7 +565,7 @@ class Git(FetchMethod):
|
||||
raise bb.fetch2.UnpackError("No up to date source found: " + "; ".join(source_error), ud.url)
|
||||
|
||||
repourl = self._get_repo_url(ud)
|
||||
runfetchcmd("%s remote set-url origin \"%s\"" % (ud.basecmd, repourl), d, workdir=destdir)
|
||||
runfetchcmd("%s remote set-url origin %s" % (ud.basecmd, shlex.quote(repourl)), d, workdir=destdir)
|
||||
|
||||
if self._contains_lfs(ud, d, destdir):
|
||||
if need_lfs and not self._find_git_lfs(d):
|
||||
@@ -687,8 +693,8 @@ class Git(FetchMethod):
|
||||
d.setVar('_BB_GIT_IN_LSREMOTE', '1')
|
||||
try:
|
||||
repourl = self._get_repo_url(ud)
|
||||
cmd = "%s ls-remote \"%s\" %s" % \
|
||||
(ud.basecmd, repourl, search)
|
||||
cmd = "%s ls-remote %s %s" % \
|
||||
(ud.basecmd, shlex.quote(repourl), search)
|
||||
if ud.proto.lower() != 'file':
|
||||
bb.fetch2.check_network_access(d, cmd, repourl)
|
||||
output = runfetchcmd(cmd, d, True)
|
||||
|
||||
@@ -1570,21 +1570,22 @@ def set_process_name(name):
|
||||
|
||||
# export common proxies variables from datastore to environment
|
||||
def export_proxies(d):
|
||||
import os
|
||||
""" export common proxies variables from datastore to environment """
|
||||
|
||||
variables = ['http_proxy', 'HTTP_PROXY', 'https_proxy', 'HTTPS_PROXY',
|
||||
'ftp_proxy', 'FTP_PROXY', 'no_proxy', 'NO_PROXY',
|
||||
'GIT_PROXY_COMMAND']
|
||||
'GIT_PROXY_COMMAND', 'SSL_CERT_FILE', 'SSL_CERT_DIR']
|
||||
exported = False
|
||||
|
||||
for v in variables:
|
||||
if v in os.environ.keys():
|
||||
origenv = d.getVar("BB_ORIGENV")
|
||||
|
||||
for name in variables:
|
||||
value = d.getVar(name)
|
||||
if not value and origenv:
|
||||
value = origenv.getVar(name)
|
||||
if value:
|
||||
os.environ[name] = value
|
||||
exported = True
|
||||
else:
|
||||
v_proxy = d.getVar(v)
|
||||
if v_proxy is not None:
|
||||
os.environ[v] = v_proxy
|
||||
exported = True
|
||||
|
||||
return exported
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
DISTRO : "3.1.22"
|
||||
DISTRO : "3.1.23"
|
||||
DISTRO_NAME_NO_CAP : "dunfell"
|
||||
DISTRO_NAME : "Dunfell"
|
||||
DISTRO_NAME_NO_CAP_MINUS_ONE : "zeus"
|
||||
YOCTO_DOC_VERSION : "3.1.22"
|
||||
YOCTO_DOC_VERSION : "3.1.23"
|
||||
YOCTO_DOC_VERSION_MINUS_ONE : "3.0.4"
|
||||
DISTRO_REL_TAG : "yocto-3.1.22"
|
||||
DOCCONF_VERSION : "3.1.22"
|
||||
DISTRO_REL_TAG : "yocto-3.1.23"
|
||||
DOCCONF_VERSION : "3.1.23"
|
||||
BITBAKE_SERIES : "1.46"
|
||||
POKYVERSION : "23.0.22"
|
||||
POKYVERSION : "23.0.23"
|
||||
YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;"
|
||||
YOCTO_DL_URL : "https://downloads.yoctoproject.org"
|
||||
YOCTO_AB_URL : "https://autobuilder.yoctoproject.org"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
||||
DISTRO_VERSION = "3.1.22"
|
||||
DISTRO_VERSION = "3.1.23"
|
||||
DISTRO_CODENAME = "dunfell"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}', 'snapshot')}"
|
||||
|
||||
@@ -42,8 +42,8 @@ CVE_CHECK_LOG_JSON ?= "${T}/cve.json"
|
||||
CVE_CHECK_DIR ??= "${DEPLOY_DIR}/cve"
|
||||
CVE_CHECK_RECIPE_FILE ?= "${CVE_CHECK_DIR}/${PN}"
|
||||
CVE_CHECK_RECIPE_FILE_JSON ?= "${CVE_CHECK_DIR}/${PN}_cve.json"
|
||||
CVE_CHECK_MANIFEST ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cve"
|
||||
CVE_CHECK_MANIFEST_JSON ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.json"
|
||||
CVE_CHECK_MANIFEST ?= "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cve"
|
||||
CVE_CHECK_MANIFEST_JSON ?= "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.json"
|
||||
CVE_CHECK_COPY_FILES ??= "1"
|
||||
CVE_CHECK_CREATE_MANIFEST ??= "1"
|
||||
|
||||
@@ -195,7 +195,7 @@ python cve_check_write_rootfs_manifest () {
|
||||
recipies.add(pkg_data["PN"])
|
||||
|
||||
bb.note("Writing rootfs CVE manifest")
|
||||
deploy_dir = d.getVar("DEPLOY_DIR_IMAGE")
|
||||
deploy_dir = d.getVar("IMGDEPLOYDIR")
|
||||
link_name = d.getVar("IMAGE_LINK_NAME")
|
||||
|
||||
json_data = {"version":"1", "package": []}
|
||||
|
||||
@@ -225,7 +225,7 @@ def srctree_hash_files(d, srcdir=None):
|
||||
env['GIT_INDEX_FILE'] = tmp_index.name
|
||||
subprocess.check_output(['git', 'add', '-A', '.'], cwd=s_dir, env=env)
|
||||
git_sha1 = subprocess.check_output(['git', 'write-tree'], cwd=s_dir, env=env).decode("utf-8")
|
||||
if os.path.exists(os.path.join(s_dir, ".gitmodules")):
|
||||
if os.path.exists(os.path.join(s_dir, ".gitmodules")) and os.path.getsize(os.path.join(s_dir, ".gitmodules")) > 0:
|
||||
submodule_helper = subprocess.check_output(["git", "config", "--file", ".gitmodules", "--get-regexp", "path"], cwd=s_dir, env=env).decode("utf-8")
|
||||
for line in submodule_helper.splitlines():
|
||||
module_dir = os.path.join(s_dir, line.rsplit(maxsplit=1)[1])
|
||||
|
||||
@@ -117,7 +117,7 @@ python write_host_sdk_ext_manifest () {
|
||||
f.write("%s %s %s\n" % (info[1], info[2], info[3]))
|
||||
}
|
||||
|
||||
SDK_POSTPROCESS_COMMAND_append_task-populate-sdk-ext = "write_target_sdk_ext_manifest; write_host_sdk_ext_manifest; "
|
||||
SDK_POSTPROCESS_COMMAND_append_task-populate-sdk-ext = " write_target_sdk_ext_manifest; write_host_sdk_ext_manifest; "
|
||||
|
||||
SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} Extensible SDK"
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ toolchain_create_sdk_env_script () {
|
||||
echo '# http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80' >> $script
|
||||
echo '# http://xahlee.info/UnixResource_dir/_/ldpath.html' >> $script
|
||||
echo '# Only disable this check if you are absolutely know what you are doing!' >> $script
|
||||
echo 'if [ ! -z "$LD_LIBRARY_PATH" ]; then' >> $script
|
||||
echo 'if [ ! -z "${LD_LIBRARY_PATH:-}" ]; then' >> $script
|
||||
echo " echo \"Your environment is misconfigured, you probably need to 'unset LD_LIBRARY_PATH'\"" >> $script
|
||||
echo " echo \"but please check why this was set in the first place and that it's safe to unset.\"" >> $script
|
||||
echo ' echo "The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set."' >> $script
|
||||
|
||||
@@ -62,7 +62,8 @@ def get_source_date_epoch_from_git(d, sourcedir):
|
||||
return None
|
||||
|
||||
bb.debug(1, "git repository: %s" % gitpath)
|
||||
p = subprocess.run(['git', '--git-dir', gitpath, 'log', '-1', '--pretty=%ct'], check=True, stdout=subprocess.PIPE)
|
||||
p = subprocess.run(['git', '-c', 'log.showSignature=false', '--git-dir', gitpath, 'log', '-1', '--pretty=%ct'],
|
||||
check=True, stdout=subprocess.PIPE)
|
||||
return int(p.stdout.decode('utf-8'))
|
||||
|
||||
def get_source_date_epoch_from_youngest_file(d, sourcedir):
|
||||
|
||||
@@ -236,7 +236,7 @@ class TestImage(OESelftestTestCase):
|
||||
except FileNotFoundError:
|
||||
self.skipTest("/dev/dri directory does not exist; no render nodes available on this machine.")
|
||||
try:
|
||||
dripath = subprocess.check_output("pkg-config --variable=dridriverdir dri", shell=True)
|
||||
dripath = subprocess.check_output("PATH=/bin:/usr/bin:$PATH pkg-config --variable=dridriverdir dri", shell=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
self.skipTest("Could not determine the path to dri drivers on the host via pkg-config.\nPlease install Mesa development files (particularly, dri.pc) on the host machine.")
|
||||
qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native')
|
||||
|
||||
@@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk"
|
||||
|
||||
inherit core-image setuptools3
|
||||
|
||||
SRCREV ?= "f1292a552f33a329ff27bbdea4c90250908d6301"
|
||||
SRCREV ?= "f5e8301b203715404d18215d7d914499555b3425"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;branch=dunfell \
|
||||
file://Yocto_Build_Appliance.vmx \
|
||||
file://Yocto_Build_Appliance.vmxf \
|
||||
|
||||
@@ -19,6 +19,9 @@ CVE_DB_UPDATE_INTERVAL ?= "86400"
|
||||
|
||||
# Timeout for blocking socket operations, such as the connection attempt.
|
||||
CVE_SOCKET_TIMEOUT ?= "60"
|
||||
NVDCVE_URL ?= "https://nvd.nist.gov/feeds/json/cve/1.1/nvdcve-1.1-"
|
||||
|
||||
CVE_DB_TEMP_FILE ?= "${CVE_CHECK_DB_DIR}/temp_nvdcve_1.1.db"
|
||||
|
||||
python () {
|
||||
if not bb.data.inherits_class("cve-check", d):
|
||||
@@ -31,26 +34,15 @@ python do_fetch() {
|
||||
"""
|
||||
import bb.utils
|
||||
import bb.progress
|
||||
import sqlite3, urllib, urllib.parse, shutil, gzip
|
||||
from datetime import date
|
||||
import shutil
|
||||
|
||||
bb.utils.export_proxies(d)
|
||||
|
||||
BASE_URL = "https://nvd.nist.gov/feeds/json/cve/1.1/nvdcve-1.1-"
|
||||
YEAR_START = 2002
|
||||
|
||||
db_file = d.getVar("CVE_CHECK_DB_FILE")
|
||||
db_dir = os.path.dirname(db_file)
|
||||
db_tmp_file = d.getVar("CVE_DB_TEMP_FILE")
|
||||
|
||||
cve_socket_timeout = int(d.getVar("CVE_SOCKET_TIMEOUT"))
|
||||
|
||||
if os.path.exists("{0}-journal".format(db_file)):
|
||||
# If a journal is present the last update might have been interrupted. In that case,
|
||||
# just wipe any leftovers and force the DB to be recreated.
|
||||
os.remove("{0}-journal".format(db_file))
|
||||
|
||||
if os.path.exists(db_file):
|
||||
os.remove(db_file)
|
||||
cleanup_db_download(db_file, db_tmp_file)
|
||||
|
||||
# The NVD database changes once a day, so no need to update more frequently
|
||||
# Allow the user to force-update
|
||||
@@ -67,16 +59,68 @@ python do_fetch() {
|
||||
pass
|
||||
|
||||
bb.utils.mkdirhier(db_dir)
|
||||
if os.path.exists(db_file):
|
||||
shutil.copy2(db_file, db_tmp_file)
|
||||
|
||||
if update_db_file(db_tmp_file, d) == True:
|
||||
# Update downloaded correctly, can swap files
|
||||
shutil.move(db_tmp_file, db_file)
|
||||
else:
|
||||
# Update failed, do not modify the database
|
||||
bb.note("CVE database update failed")
|
||||
os.remove(db_tmp_file)
|
||||
}
|
||||
|
||||
do_fetch[lockfiles] += "${CVE_CHECK_DB_FILE_LOCK}"
|
||||
do_fetch[file-checksums] = ""
|
||||
do_fetch[vardeps] = ""
|
||||
|
||||
def cleanup_db_download(db_file, db_tmp_file):
|
||||
"""
|
||||
Cleanup the download space from possible failed downloads
|
||||
"""
|
||||
|
||||
# Clean up the updates done on the main file
|
||||
# Remove it only if a journal file exists - it means a complete re-download
|
||||
if os.path.exists("{0}-journal".format(db_file)):
|
||||
# If a journal is present the last update might have been interrupted. In that case,
|
||||
# just wipe any leftovers and force the DB to be recreated.
|
||||
os.remove("{0}-journal".format(db_file))
|
||||
|
||||
if os.path.exists(db_file):
|
||||
os.remove(db_file)
|
||||
|
||||
# Clean-up the temporary file downloads, we can remove both journal
|
||||
# and the temporary database
|
||||
if os.path.exists("{0}-journal".format(db_tmp_file)):
|
||||
# If a journal is present the last update might have been interrupted. In that case,
|
||||
# just wipe any leftovers and force the DB to be recreated.
|
||||
os.remove("{0}-journal".format(db_tmp_file))
|
||||
|
||||
if os.path.exists(db_tmp_file):
|
||||
os.remove(db_tmp_file)
|
||||
|
||||
def update_db_file(db_tmp_file, d):
|
||||
"""
|
||||
Update the given database file
|
||||
"""
|
||||
import bb.utils, bb.progress
|
||||
from datetime import date
|
||||
import urllib, gzip, sqlite3
|
||||
|
||||
YEAR_START = 2002
|
||||
cve_socket_timeout = int(d.getVar("CVE_SOCKET_TIMEOUT"))
|
||||
|
||||
# Connect to database
|
||||
conn = sqlite3.connect(db_file)
|
||||
conn = sqlite3.connect(db_tmp_file)
|
||||
initialize_db(conn)
|
||||
|
||||
with bb.progress.ProgressHandler(d) as ph, open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a') as cve_f:
|
||||
total_years = date.today().year + 1 - YEAR_START
|
||||
for i, year in enumerate(range(YEAR_START, date.today().year + 1)):
|
||||
bb.debug(2, "Updating %d" % year)
|
||||
ph.update((float(i + 1) / total_years) * 100)
|
||||
year_url = BASE_URL + str(year)
|
||||
year_url = (d.getVar('NVDCVE_URL')) + str(year)
|
||||
meta_url = year_url + ".meta"
|
||||
json_url = year_url + ".json.gz"
|
||||
|
||||
@@ -85,8 +129,11 @@ python do_fetch() {
|
||||
response = urllib.request.urlopen(meta_url, timeout=cve_socket_timeout)
|
||||
except urllib.error.URLError as e:
|
||||
cve_f.write('Warning: CVE db update error, Unable to fetch CVE data.\n\n')
|
||||
bb.warn("Failed to fetch CVE data (%s)" % e.reason)
|
||||
return
|
||||
bb.warn("Failed to fetch CVE data (%s)" % e)
|
||||
import socket
|
||||
result = socket.getaddrinfo("nvd.nist.gov", 443, proto=socket.IPPROTO_TCP)
|
||||
bb.warn("Host IPs are %s" % (", ".join(t[4][0] for t in result)))
|
||||
return False
|
||||
|
||||
if response:
|
||||
for l in response.read().decode("utf-8").splitlines():
|
||||
@@ -96,7 +143,7 @@ python do_fetch() {
|
||||
break
|
||||
else:
|
||||
bb.warn("Cannot parse CVE metadata, update failed")
|
||||
return
|
||||
return False
|
||||
|
||||
# Compare with current db last modified date
|
||||
cursor = conn.execute("select DATE from META where YEAR = ?", (year,))
|
||||
@@ -104,6 +151,7 @@ python do_fetch() {
|
||||
cursor.close()
|
||||
|
||||
if not meta or meta[0] != last_modified:
|
||||
bb.debug(2, "Updating entries")
|
||||
# Clear products table entries corresponding to current year
|
||||
conn.execute("delete from PRODUCTS where ID like ?", ('CVE-%d%%' % year,)).close()
|
||||
|
||||
@@ -116,19 +164,16 @@ python do_fetch() {
|
||||
except urllib.error.URLError as e:
|
||||
cve_f.write('Warning: CVE db update error, CVE data is outdated.\n\n')
|
||||
bb.warn("Cannot parse CVE data (%s), update failed" % e.reason)
|
||||
return
|
||||
|
||||
return False
|
||||
else:
|
||||
bb.debug(2, "Already up to date (last modified %s)" % last_modified)
|
||||
# Update success, set the date to cve_check file.
|
||||
if year == date.today().year:
|
||||
cve_f.write('CVE database update : %s\n\n' % date.today())
|
||||
|
||||
conn.commit()
|
||||
conn.close()
|
||||
}
|
||||
|
||||
do_fetch[lockfiles] += "${CVE_CHECK_DB_FILE_LOCK}"
|
||||
do_fetch[file-checksums] = ""
|
||||
do_fetch[vardeps] = ""
|
||||
return True
|
||||
|
||||
def initialize_db(conn):
|
||||
with conn:
|
||||
|
||||
@@ -404,9 +404,9 @@ FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
|
||||
${rootlibexecdir}/systemd/systemd-binfmt \
|
||||
${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
|
||||
${systemd_unitdir}/system/systemd-binfmt.service"
|
||||
RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
|
||||
RRECOMMENDS_${PN}-binfmt = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', 'kernel-module-binfmt-misc', '', d)}"
|
||||
|
||||
RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
|
||||
RRECOMMENDS_${PN}-vconsole-setup = "${@bb.utils.contains('PACKAGECONFIG', 'vconsole', 'kbd kbd-consolefonts kbd-keymaps', '', d)}"
|
||||
|
||||
|
||||
FILES_${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewayd \
|
||||
|
||||
@@ -51,6 +51,7 @@ SRC_URI += "\
|
||||
file://CVE-2022-28327.patch \
|
||||
file://CVE-2022-41715.patch \
|
||||
file://CVE-2022-41717.patch \
|
||||
file://CVE-2022-1962.patch \
|
||||
"
|
||||
|
||||
SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
|
||||
|
||||
357
meta/recipes-devtools/go/go-1.14/CVE-2022-1962.patch
Normal file
357
meta/recipes-devtools/go/go-1.14/CVE-2022-1962.patch
Normal file
@@ -0,0 +1,357 @@
|
||||
From ba8788ebcead55e99e631c6a1157ad7b35535d11 Mon Sep 17 00:00:00 2001
|
||||
From: Roland Shoemaker <bracewell@google.com>
|
||||
Date: Wed, 15 Jun 2022 10:43:05 -0700
|
||||
Subject: [PATCH] [release-branch.go1.17] go/parser: limit recursion depth
|
||||
|
||||
Limit nested parsing to 100,000, which prevents stack exhaustion when
|
||||
parsing deeply nested statements, types, and expressions. Also limit
|
||||
the scope depth to 1,000 during object resolution.
|
||||
|
||||
Thanks to Juho Nurminen of Mattermost for reporting this issue.
|
||||
|
||||
Fixes #53707
|
||||
Updates #53616
|
||||
Fixes CVE-2022-1962
|
||||
|
||||
Change-Id: I4d7b86c1d75d0bf3c7af1fdea91582aa74272c64
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1491025
|
||||
Reviewed-by: Russ Cox <rsc@google.com>
|
||||
Reviewed-by: Damien Neil <dneil@google.com>
|
||||
(cherry picked from commit 6a856f08d58e4b6705c0c337d461c540c1235c83)
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/417070
|
||||
Reviewed-by: Heschi Kreinick <heschi@google.com>
|
||||
TryBot-Result: Gopher Robot <gobot@golang.org>
|
||||
Run-TryBot: Michael Knyszek <mknyszek@google.com>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/golang/go/commit/ba8788ebcead55e99e631c6a1157ad7b35535d11]
|
||||
CVE: CVE-2022-1962
|
||||
Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
|
||||
---
|
||||
src/go/parser/interface.go | 10 ++-
|
||||
src/go/parser/parser.go | 48 ++++++++--
|
||||
src/go/parser/parser_test.go | 169 +++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 220 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/go/parser/interface.go b/src/go/parser/interface.go
|
||||
index 54f9d7b..537b327 100644
|
||||
--- a/src/go/parser/interface.go
|
||||
+++ b/src/go/parser/interface.go
|
||||
@@ -92,8 +92,11 @@ func ParseFile(fset *token.FileSet, filename string, src interface{}, mode Mode)
|
||||
defer func() {
|
||||
if e := recover(); e != nil {
|
||||
// resume same panic if it's not a bailout
|
||||
- if _, ok := e.(bailout); !ok {
|
||||
+ bail, ok := e.(bailout)
|
||||
+ if !ok {
|
||||
panic(e)
|
||||
+ } else if bail.msg != "" {
|
||||
+ p.errors.Add(p.file.Position(bail.pos), bail.msg)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,8 +191,11 @@ func ParseExprFrom(fset *token.FileSet, filename string, src interface{}, mode M
|
||||
defer func() {
|
||||
if e := recover(); e != nil {
|
||||
// resume same panic if it's not a bailout
|
||||
- if _, ok := e.(bailout); !ok {
|
||||
+ bail, ok := e.(bailout)
|
||||
+ if !ok {
|
||||
panic(e)
|
||||
+ } else if bail.msg != "" {
|
||||
+ p.errors.Add(p.file.Position(bail.pos), bail.msg)
|
||||
}
|
||||
}
|
||||
p.errors.Sort()
|
||||
diff --git a/src/go/parser/parser.go b/src/go/parser/parser.go
|
||||
index 31a7398..586fe90 100644
|
||||
--- a/src/go/parser/parser.go
|
||||
+++ b/src/go/parser/parser.go
|
||||
@@ -64,6 +64,10 @@ type parser struct {
|
||||
unresolved []*ast.Ident // unresolved identifiers
|
||||
imports []*ast.ImportSpec // list of imports
|
||||
|
||||
+ // nestLev is used to track and limit the recursion depth
|
||||
+ // during parsing.
|
||||
+ nestLev int
|
||||
+
|
||||
// Label scopes
|
||||
// (maintained by open/close LabelScope)
|
||||
labelScope *ast.Scope // label scope for current function
|
||||
@@ -236,6 +240,24 @@ func un(p *parser) {
|
||||
p.printTrace(")")
|
||||
}
|
||||
|
||||
+// maxNestLev is the deepest we're willing to recurse during parsing
|
||||
+const maxNestLev int = 1e5
|
||||
+
|
||||
+func incNestLev(p *parser) *parser {
|
||||
+ p.nestLev++
|
||||
+ if p.nestLev > maxNestLev {
|
||||
+ p.error(p.pos, "exceeded max nesting depth")
|
||||
+ panic(bailout{})
|
||||
+ }
|
||||
+ return p
|
||||
+}
|
||||
+
|
||||
+// decNestLev is used to track nesting depth during parsing to prevent stack exhaustion.
|
||||
+// It is used along with incNestLev in a similar fashion to how un and trace are used.
|
||||
+func decNestLev(p *parser) {
|
||||
+ p.nestLev--
|
||||
+}
|
||||
+
|
||||
// Advance to the next token.
|
||||
func (p *parser) next0() {
|
||||
// Because of one-token look-ahead, print the previous token
|
||||
@@ -348,8 +370,12 @@ func (p *parser) next() {
|
||||
}
|
||||
}
|
||||
|
||||
-// A bailout panic is raised to indicate early termination.
|
||||
-type bailout struct{}
|
||||
+// A bailout panic is raised to indicate early termination. pos and msg are
|
||||
+// only populated when bailing out of object resolution.
|
||||
+type bailout struct {
|
||||
+ pos token.Pos
|
||||
+ msg string
|
||||
+}
|
||||
|
||||
func (p *parser) error(pos token.Pos, msg string) {
|
||||
epos := p.file.Position(pos)
|
||||
@@ -1030,6 +1056,8 @@ func (p *parser) parseChanType() *ast.ChanType {
|
||||
|
||||
// If the result is an identifier, it is not resolved.
|
||||
func (p *parser) tryIdentOrType() ast.Expr {
|
||||
+ defer decNestLev(incNestLev(p))
|
||||
+
|
||||
switch p.tok {
|
||||
case token.IDENT:
|
||||
return p.parseTypeName()
|
||||
@@ -1609,7 +1637,13 @@ func (p *parser) parseBinaryExpr(lhs bool, prec1 int) ast.Expr {
|
||||
}
|
||||
|
||||
x := p.parseUnaryExpr(lhs)
|
||||
- for {
|
||||
+ // We track the nesting here rather than at the entry for the function,
|
||||
+ // since it can iteratively produce a nested output, and we want to
|
||||
+ // limit how deep a structure we generate.
|
||||
+ var n int
|
||||
+ defer func() { p.nestLev -= n }()
|
||||
+ for n = 1; ; n++ {
|
||||
+ incNestLev(p)
|
||||
op, oprec := p.tokPrec()
|
||||
if oprec < prec1 {
|
||||
return x
|
||||
@@ -1628,7 +1662,7 @@ func (p *parser) parseBinaryExpr(lhs bool, prec1 int) ast.Expr {
|
||||
// The result may be a type or even a raw type ([...]int). Callers must
|
||||
// check the result (using checkExpr or checkExprOrType), depending on
|
||||
// context.
|
||||
-func (p *parser) parseExpr(lhs bool) ast.Expr {
|
||||
+func (p *parser) parseExpr(lhs bool) ast.Expr {
|
||||
if p.trace {
|
||||
defer un(trace(p, "Expression"))
|
||||
}
|
||||
@@ -1899,6 +1933,8 @@ func (p *parser) parseIfHeader() (init ast.Stmt, cond ast.Expr) {
|
||||
}
|
||||
|
||||
func (p *parser) parseIfStmt() *ast.IfStmt {
|
||||
+ defer decNestLev(incNestLev(p))
|
||||
+
|
||||
if p.trace {
|
||||
defer un(trace(p, "IfStmt"))
|
||||
}
|
||||
@@ -2214,6 +2250,8 @@ func (p *parser) parseForStmt() ast.Stmt {
|
||||
}
|
||||
|
||||
func (p *parser) parseStmt() (s ast.Stmt) {
|
||||
+ defer decNestLev(incNestLev(p))
|
||||
+
|
||||
if p.trace {
|
||||
defer un(trace(p, "Statement"))
|
||||
}
|
||||
diff --git a/src/go/parser/parser_test.go b/src/go/parser/parser_test.go
|
||||
index 25a374e..37a6a2b 100644
|
||||
--- a/src/go/parser/parser_test.go
|
||||
+++ b/src/go/parser/parser_test.go
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"go/ast"
|
||||
"go/token"
|
||||
"os"
|
||||
+ "runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
@@ -569,3 +570,171 @@ type x int // comment
|
||||
t.Errorf("got %q, want %q", comment, "// comment")
|
||||
}
|
||||
}
|
||||
+
|
||||
+var parseDepthTests = []struct {
|
||||
+ name string
|
||||
+ format string
|
||||
+ // multipler is used when a single statement may result in more than one
|
||||
+ // change in the depth level, for instance "1+(..." produces a BinaryExpr
|
||||
+ // followed by a UnaryExpr, which increments the depth twice. The test
|
||||
+ // case comment explains which nodes are triggering the multiple depth
|
||||
+ // changes.
|
||||
+ parseMultiplier int
|
||||
+ // scope is true if we should also test the statement for the resolver scope
|
||||
+ // depth limit.
|
||||
+ scope bool
|
||||
+ // scopeMultiplier does the same as parseMultiplier, but for the scope
|
||||
+ // depths.
|
||||
+ scopeMultiplier int
|
||||
+}{
|
||||
+ // The format expands the part inside « » many times.
|
||||
+ // A second set of brackets nested inside the first stops the repetition,
|
||||
+ // so that for example «(«1»)» expands to (((...((((1))))...))).
|
||||
+ {name: "array", format: "package main; var x «[1]»int"},
|
||||
+ {name: "slice", format: "package main; var x «[]»int"},
|
||||
+ {name: "struct", format: "package main; var x «struct { X «int» }»", scope: true},
|
||||
+ {name: "pointer", format: "package main; var x «*»int"},
|
||||
+ {name: "func", format: "package main; var x «func()»int", scope: true},
|
||||
+ {name: "chan", format: "package main; var x «chan »int"},
|
||||
+ {name: "chan2", format: "package main; var x «<-chan »int"},
|
||||
+ {name: "interface", format: "package main; var x «interface { M() «int» }»", scope: true, scopeMultiplier: 2}, // Scopes: InterfaceType, FuncType
|
||||
+ {name: "map", format: "package main; var x «map[int]»int"},
|
||||
+ {name: "slicelit", format: "package main; var x = «[]any{«»}»", parseMultiplier: 2}, // Parser nodes: UnaryExpr, CompositeLit
|
||||
+ {name: "arraylit", format: "package main; var x = «[1]any{«nil»}»", parseMultiplier: 2}, // Parser nodes: UnaryExpr, CompositeLit
|
||||
+ {name: "structlit", format: "package main; var x = «struct{x any}{«nil»}»", parseMultiplier: 2}, // Parser nodes: UnaryExpr, CompositeLit
|
||||
+ {name: "maplit", format: "package main; var x = «map[int]any{1:«nil»}»", parseMultiplier: 2}, // Parser nodes: CompositeLit, KeyValueExpr
|
||||
+ {name: "dot", format: "package main; var x = «x.»x"},
|
||||
+ {name: "index", format: "package main; var x = x«[1]»"},
|
||||
+ {name: "slice", format: "package main; var x = x«[1:2]»"},
|
||||
+ {name: "slice3", format: "package main; var x = x«[1:2:3]»"},
|
||||
+ {name: "dottype", format: "package main; var x = x«.(any)»"},
|
||||
+ {name: "callseq", format: "package main; var x = x«()»"},
|
||||
+ {name: "methseq", format: "package main; var x = x«.m()»", parseMultiplier: 2}, // Parser nodes: SelectorExpr, CallExpr
|
||||
+ {name: "binary", format: "package main; var x = «1+»1"},
|
||||
+ {name: "binaryparen", format: "package main; var x = «1+(«1»)»", parseMultiplier: 2}, // Parser nodes: BinaryExpr, ParenExpr
|
||||
+ {name: "unary", format: "package main; var x = «^»1"},
|
||||
+ {name: "addr", format: "package main; var x = «& »x"},
|
||||
+ {name: "star", format: "package main; var x = «*»x"},
|
||||
+ {name: "recv", format: "package main; var x = «<-»x"},
|
||||
+ {name: "call", format: "package main; var x = «f(«1»)»", parseMultiplier: 2}, // Parser nodes: Ident, CallExpr
|
||||
+ {name: "conv", format: "package main; var x = «(*T)(«1»)»", parseMultiplier: 2}, // Parser nodes: ParenExpr, CallExpr
|
||||
+ {name: "label", format: "package main; func main() { «Label:» }"},
|
||||
+ {name: "if", format: "package main; func main() { «if true { «» }»}", parseMultiplier: 2, scope: true, scopeMultiplier: 2}, // Parser nodes: IfStmt, BlockStmt. Scopes: IfStmt, BlockStmt
|
||||
+ {name: "ifelse", format: "package main; func main() { «if true {} else » {} }", scope: true},
|
||||
+ {name: "switch", format: "package main; func main() { «switch { default: «» }»}", scope: true, scopeMultiplier: 2}, // Scopes: TypeSwitchStmt, CaseClause
|
||||
+ {name: "typeswitch", format: "package main; func main() { «switch x.(type) { default: «» }» }", scope: true, scopeMultiplier: 2}, // Scopes: TypeSwitchStmt, CaseClause
|
||||
+ {name: "for0", format: "package main; func main() { «for { «» }» }", scope: true, scopeMultiplier: 2}, // Scopes: ForStmt, BlockStmt
|
||||
+ {name: "for1", format: "package main; func main() { «for x { «» }» }", scope: true, scopeMultiplier: 2}, // Scopes: ForStmt, BlockStmt
|
||||
+ {name: "for3", format: "package main; func main() { «for f(); g(); h() { «» }» }", scope: true, scopeMultiplier: 2}, // Scopes: ForStmt, BlockStmt
|
||||
+ {name: "forrange0", format: "package main; func main() { «for range x { «» }» }", scope: true, scopeMultiplier: 2}, // Scopes: RangeStmt, BlockStmt
|
||||
+ {name: "forrange1", format: "package main; func main() { «for x = range z { «» }» }", scope: true, scopeMultiplier: 2}, // Scopes: RangeStmt, BlockStmt
|
||||
+ {name: "forrange2", format: "package main; func main() { «for x, y = range z { «» }» }", scope: true, scopeMultiplier: 2}, // Scopes: RangeStmt, BlockStmt
|
||||
+ {name: "go", format: "package main; func main() { «go func() { «» }()» }", parseMultiplier: 2, scope: true}, // Parser nodes: GoStmt, FuncLit
|
||||
+ {name: "defer", format: "package main; func main() { «defer func() { «» }()» }", parseMultiplier: 2, scope: true}, // Parser nodes: DeferStmt, FuncLit
|
||||
+ {name: "select", format: "package main; func main() { «select { default: «» }» }", scope: true},
|
||||
+}
|
||||
+
|
||||
+// split splits pre«mid»post into pre, mid, post.
|
||||
+// If the string does not have that form, split returns x, "", "".
|
||||
+func split(x string) (pre, mid, post string) {
|
||||
+ start, end := strings.Index(x, "«"), strings.LastIndex(x, "»")
|
||||
+ if start < 0 || end < 0 {
|
||||
+ return x, "", ""
|
||||
+ }
|
||||
+ return x[:start], x[start+len("«") : end], x[end+len("»"):]
|
||||
+}
|
||||
+
|
||||
+func TestParseDepthLimit(t *testing.T) {
|
||||
+ if runtime.GOARCH == "wasm" {
|
||||
+ t.Skip("causes call stack exhaustion on js/wasm")
|
||||
+ }
|
||||
+ for _, tt := range parseDepthTests {
|
||||
+ for _, size := range []string{"small", "big"} {
|
||||
+ t.Run(tt.name+"/"+size, func(t *testing.T) {
|
||||
+ n := maxNestLev + 1
|
||||
+ if tt.parseMultiplier > 0 {
|
||||
+ n /= tt.parseMultiplier
|
||||
+ }
|
||||
+ if size == "small" {
|
||||
+ // Decrease the number of statements by 10, in order to check
|
||||
+ // that we do not fail when under the limit. 10 is used to
|
||||
+ // provide some wiggle room for cases where the surrounding
|
||||
+ // scaffolding syntax adds some noise to the depth that changes
|
||||
+ // on a per testcase basis.
|
||||
+ n -= 10
|
||||
+ }
|
||||
+
|
||||
+ pre, mid, post := split(tt.format)
|
||||
+ if strings.Contains(mid, "«") {
|
||||
+ left, base, right := split(mid)
|
||||
+ mid = strings.Repeat(left, n) + base + strings.Repeat(right, n)
|
||||
+ } else {
|
||||
+ mid = strings.Repeat(mid, n)
|
||||
+ }
|
||||
+ input := pre + mid + post
|
||||
+
|
||||
+ fset := token.NewFileSet()
|
||||
+ _, err := ParseFile(fset, "", input, ParseComments|SkipObjectResolution)
|
||||
+ if size == "small" {
|
||||
+ if err != nil {
|
||||
+ t.Errorf("ParseFile(...): %v (want success)", err)
|
||||
+ }
|
||||
+ } else {
|
||||
+ expected := "exceeded max nesting depth"
|
||||
+ if err == nil || !strings.HasSuffix(err.Error(), expected) {
|
||||
+ t.Errorf("ParseFile(...) = _, %v, want %q", err, expected)
|
||||
+ }
|
||||
+ }
|
||||
+ })
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+func TestScopeDepthLimit(t *testing.T) {
|
||||
+ if runtime.GOARCH == "wasm" {
|
||||
+ t.Skip("causes call stack exhaustion on js/wasm")
|
||||
+ }
|
||||
+ for _, tt := range parseDepthTests {
|
||||
+ if !tt.scope {
|
||||
+ continue
|
||||
+ }
|
||||
+ for _, size := range []string{"small", "big"} {
|
||||
+ t.Run(tt.name+"/"+size, func(t *testing.T) {
|
||||
+ n := maxScopeDepth + 1
|
||||
+ if tt.scopeMultiplier > 0 {
|
||||
+ n /= tt.scopeMultiplier
|
||||
+ }
|
||||
+ if size == "small" {
|
||||
+ // Decrease the number of statements by 10, in order to check
|
||||
+ // that we do not fail when under the limit. 10 is used to
|
||||
+ // provide some wiggle room for cases where the surrounding
|
||||
+ // scaffolding syntax adds some noise to the depth that changes
|
||||
+ // on a per testcase basis.
|
||||
+ n -= 10
|
||||
+ }
|
||||
+
|
||||
+ pre, mid, post := split(tt.format)
|
||||
+ if strings.Contains(mid, "«") {
|
||||
+ left, base, right := split(mid)
|
||||
+ mid = strings.Repeat(left, n) + base + strings.Repeat(right, n)
|
||||
+ } else {
|
||||
+ mid = strings.Repeat(mid, n)
|
||||
+ }
|
||||
+ input := pre + mid + post
|
||||
+
|
||||
+ fset := token.NewFileSet()
|
||||
+ _, err := ParseFile(fset, "", input, DeclarationErrors)
|
||||
+ if size == "small" {
|
||||
+ if err != nil {
|
||||
+ t.Errorf("ParseFile(...): %v (want success)", err)
|
||||
+ }
|
||||
+ } else {
|
||||
+ expected := "exceeded max scope depth during object resolution"
|
||||
+ if err == nil || !strings.HasSuffix(err.Error(), expected) {
|
||||
+ t.Errorf("ParseFile(...) = _, %v, want %q", err, expected)
|
||||
+ }
|
||||
+ }
|
||||
+ })
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -531,7 +531,9 @@
|
||||
"rdepends": [
|
||||
"core"
|
||||
],
|
||||
"files": [],
|
||||
"files": [
|
||||
"${libdir}/python${PYTHON_MAJMIN}/distutils/command/wininst-*.exe"
|
||||
],
|
||||
"cached": []
|
||||
},
|
||||
"distutils": {
|
||||
|
||||
@@ -22,7 +22,7 @@ inherit autotools pkgconfig
|
||||
EXTRA_OECONF = "--disable-gssapi"
|
||||
|
||||
do_install_append() {
|
||||
chown root:root ${D}${sysconfdir}/netconfig
|
||||
test -e ${D}${sysconfdir}/netconfig && chown root:root ${D}${sysconfdir}/netconfig
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
@@ -1,40 +1,20 @@
|
||||
There is an assertion in function _cairo_arc_in_direction().
|
||||
|
||||
CVE: CVE-2019-6461
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
||||
|
||||
From ab2c5ee21e5f3d3ee4b3f67cfcd5811a4f99c3a0 Mon Sep 17 00:00:00 2001
|
||||
From: Heiko Lewin <hlewin@gmx.de>
|
||||
Date: Sun, 1 Aug 2021 11:16:03 +0000
|
||||
Subject: [PATCH] _arc_max_angle_for_tolerance_normalized: fix infinite loop
|
||||
|
||||
---
|
||||
src/cairo-arc.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
||||
|
||||
diff --git a/src/cairo-arc.c b/src/cairo-arc.c
|
||||
index 390397bae..1c891d1a0 100644
|
||||
index 390397bae..1bde774a4 100644
|
||||
--- a/src/cairo-arc.c
|
||||
+++ b/src/cairo-arc.c
|
||||
@@ -90,16 +90,18 @@ _arc_max_angle_for_tolerance_normalized (double tolerance)
|
||||
{ M_PI / 11.0, 9.81410988043554039085e-09 },
|
||||
};
|
||||
int table_size = ARRAY_LENGTH (table);
|
||||
+ const int max_segments = 1000; /* this value is chosen arbitrarily. this gives an error of about 1.74909e-20 */
|
||||
@@ -186,7 +186,8 @@ _cairo_arc_in_direction (cairo_t *cr,
|
||||
if (cairo_status (cr))
|
||||
return;
|
||||
|
||||
for (i = 0; i < table_size; i++)
|
||||
if (table[i].error < tolerance)
|
||||
return table[i].angle;
|
||||
- assert (angle_max >= angle_min);
|
||||
+ if (angle_max < angle_min)
|
||||
+ return;
|
||||
|
||||
++i;
|
||||
+
|
||||
do {
|
||||
angle = M_PI / i++;
|
||||
error = _arc_error_normalized (angle);
|
||||
- } while (error > tolerance);
|
||||
+ } while (error > tolerance && i < max_segments);
|
||||
|
||||
return angle;
|
||||
}
|
||||
--
|
||||
2.38.1
|
||||
|
||||
if (angle_max - angle_min > 2 * M_PI * MAX_FULL_CIRCLES) {
|
||||
angle_max = fmod (angle_max - angle_min, 2 * M_PI);
|
||||
|
||||
@@ -1,20 +1,40 @@
|
||||
There is an assertion in function _cairo_arc_in_direction().
|
||||
|
||||
CVE: CVE-2019-6462
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
||||
Upstream-Status: Backport
|
||||
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
||||
|
||||
From ab2c5ee21e5f3d3ee4b3f67cfcd5811a4f99c3a0 Mon Sep 17 00:00:00 2001
|
||||
From: Heiko Lewin <hlewin@gmx.de>
|
||||
Date: Sun, 1 Aug 2021 11:16:03 +0000
|
||||
Subject: [PATCH] _arc_max_angle_for_tolerance_normalized: fix infinite loop
|
||||
|
||||
---
|
||||
src/cairo-arc.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/cairo-arc.c b/src/cairo-arc.c
|
||||
index 390397bae..1bde774a4 100644
|
||||
index 390397bae..1c891d1a0 100644
|
||||
--- a/src/cairo-arc.c
|
||||
+++ b/src/cairo-arc.c
|
||||
@@ -186,7 +186,8 @@ _cairo_arc_in_direction (cairo_t *cr,
|
||||
if (cairo_status (cr))
|
||||
return;
|
||||
@@ -90,16 +90,18 @@ _arc_max_angle_for_tolerance_normalized (double tolerance)
|
||||
{ M_PI / 11.0, 9.81410988043554039085e-09 },
|
||||
};
|
||||
int table_size = ARRAY_LENGTH (table);
|
||||
+ const int max_segments = 1000; /* this value is chosen arbitrarily. this gives an error of about 1.74909e-20 */
|
||||
|
||||
- assert (angle_max >= angle_min);
|
||||
+ if (angle_max < angle_min)
|
||||
+ return;
|
||||
for (i = 0; i < table_size; i++)
|
||||
if (table[i].error < tolerance)
|
||||
return table[i].angle;
|
||||
|
||||
if (angle_max - angle_min > 2 * M_PI * MAX_FULL_CIRCLES) {
|
||||
angle_max = fmod (angle_max - angle_min, 2 * M_PI);
|
||||
++i;
|
||||
+
|
||||
do {
|
||||
angle = M_PI / i++;
|
||||
error = _arc_error_normalized (angle);
|
||||
- } while (error > tolerance);
|
||||
+ } while (error > tolerance && i < max_segments);
|
||||
|
||||
return angle;
|
||||
}
|
||||
--
|
||||
2.38.1
|
||||
|
||||
|
||||
38
meta/recipes-graphics/libsdl2/libsdl2/CVE-2022-4743.patch
Normal file
38
meta/recipes-graphics/libsdl2/libsdl2/CVE-2022-4743.patch
Normal file
@@ -0,0 +1,38 @@
|
||||
From 00b67f55727bc0944c3266e2b875440da132ce4b Mon Sep 17 00:00:00 2001
|
||||
From: zhailiangliang <zhailiangliang@loongson.cn>
|
||||
Date: Wed, 21 Sep 2022 10:30:38 +0800
|
||||
Subject: [PATCH] Fix potential memory leak in GLES_CreateTexture
|
||||
|
||||
|
||||
CVE: CVE-2022-4743
|
||||
Upstream-Status: Backport [https://github.com/libsdl-org/SDL/commit/00b67f55727bc0944c3266e2b875440da132ce4b.patch]
|
||||
Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
|
||||
|
||||
---
|
||||
src/render/opengles/SDL_render_gles.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/render/opengles/SDL_render_gles.c b/src/render/opengles/SDL_render_gles.c
|
||||
index a5fbab309eda..ba08a46e2805 100644
|
||||
--- a/src/render/opengles/SDL_render_gles.c
|
||||
+++ b/src/render/opengles/SDL_render_gles.c
|
||||
@@ -359,6 +359,9 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
|
||||
renderdata->glGenTextures(1, &data->texture);
|
||||
result = renderdata->glGetError();
|
||||
if (result != GL_NO_ERROR) {
|
||||
+ if (texture->access == SDL_TEXTUREACCESS_STREAMING) {
|
||||
+ SDL_free(data->pixels);
|
||||
+ }
|
||||
SDL_free(data);
|
||||
return GLES_SetError("glGenTextures()", result);
|
||||
}
|
||||
@@ -387,6 +390,9 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
|
||||
|
||||
result = renderdata->glGetError();
|
||||
if (result != GL_NO_ERROR) {
|
||||
+ if (texture->access == SDL_TEXTUREACCESS_STREAMING) {
|
||||
+ SDL_free(data->pixels);
|
||||
+ }
|
||||
SDL_free(data);
|
||||
return GLES_SetError("glTexImage2D()", result);
|
||||
}
|
||||
@@ -22,6 +22,7 @@ SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
|
||||
file://directfb-renderfillrect-fix.patch \
|
||||
file://CVE-2020-14409-14410.patch \
|
||||
file://CVE-2021-33657.patch \
|
||||
file://CVE-2022-4743.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/SDL2-${PV}"
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From ccdd431cd8f1cabae9d744f0514b6533c438908c Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Mon, 5 Dec 2022 15:55:54 +1000
|
||||
Subject: [PATCH] xkb: reset the radio_groups pointer to NULL after freeing it
|
||||
|
||||
Unlike other elements of the keymap, this pointer was freed but not
|
||||
reset. On a subsequent XkbGetKbdByName request, the server may access
|
||||
already freed memory.
|
||||
|
||||
CVE-2022-4283, ZDI-CAN-19530
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/ccdd431cd8f1cabae9d744f0514b6533c438908c]
|
||||
CVE: CVE-2022-4283
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
xkb/xkbUtils.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
|
||||
index 8975ade..9bc51fc 100644
|
||||
--- a/xkb/xkbUtils.c
|
||||
+++ b/xkb/xkbUtils.c
|
||||
@@ -1327,6 +1327,7 @@ _XkbCopyNames(XkbDescPtr src, XkbDescPtr dst)
|
||||
}
|
||||
else {
|
||||
free(dst->names->radio_groups);
|
||||
+ dst->names->radio_groups = NULL;
|
||||
}
|
||||
dst->names->num_rg = src->names->num_rg;
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
From b320ca0ffe4c0c872eeb3a93d9bde21f765c7c63 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue, 29 Nov 2022 12:55:45 +1000
|
||||
Subject: [PATCH] Xtest: disallow GenericEvents in XTestSwapFakeInput
|
||||
|
||||
XTestSwapFakeInput assumes all events in this request are
|
||||
sizeof(xEvent) and iterates through these in 32-byte increments.
|
||||
However, a GenericEvent may be of arbitrary length longer than 32 bytes,
|
||||
so any GenericEvent in this list would result in subsequent events to be
|
||||
misparsed.
|
||||
|
||||
Additional, the swapped event is written into a stack-allocated struct
|
||||
xEvent (size 32 bytes). For any GenericEvent longer than 32 bytes,
|
||||
swapping the event may thus smash the stack like an avocado on toast.
|
||||
|
||||
Catch this case early and return BadValue for any GenericEvent.
|
||||
Which is what would happen in unswapped setups anyway since XTest
|
||||
doesn't support GenericEvent.
|
||||
|
||||
CVE-2022-46340, ZDI-CAN 19265
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/b320ca0ffe4c0c872eeb3a93d9bde21f765c7c63]
|
||||
CVE: CVE-2022-46340
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
Xext/xtest.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Xext/xtest.c b/Xext/xtest.c
|
||||
index 38b8012..bf11789 100644
|
||||
--- a/Xext/xtest.c
|
||||
+++ b/Xext/xtest.c
|
||||
@@ -501,10 +501,11 @@ XTestSwapFakeInput(ClientPtr client, xReq * req)
|
||||
|
||||
nev = ((req->length << 2) - sizeof(xReq)) / sizeof(xEvent);
|
||||
for (ev = (xEvent *) &req[1]; --nev >= 0; ev++) {
|
||||
+ int evtype = ev->u.u.type & 0x177;
|
||||
/* Swap event */
|
||||
- proc = EventSwapVector[ev->u.u.type & 0177];
|
||||
+ proc = EventSwapVector[evtype];
|
||||
/* no swapping proc; invalid event type? */
|
||||
- if (!proc || proc == NotImplemented) {
|
||||
+ if (!proc || proc == NotImplemented || evtype == GenericEvent) {
|
||||
client->errorValue = ev->u.u.type;
|
||||
return BadValue;
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
From 51eb63b0ee1509c6c6b8922b0e4aa037faa6f78b Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue, 29 Nov 2022 13:55:32 +1000
|
||||
Subject: [PATCH] Xi: disallow passive grabs with a detail > 255
|
||||
|
||||
The XKB protocol effectively prevents us from ever using keycodes above
|
||||
255. For buttons it's theoretically possible but realistically too niche
|
||||
to worry about. For all other passive grabs, the detail must be zero
|
||||
anyway.
|
||||
|
||||
This fixes an OOB write:
|
||||
|
||||
ProcXIPassiveUngrabDevice() calls DeletePassiveGrabFromList with a
|
||||
temporary grab struct which contains tempGrab->detail.exact = stuff->detail.
|
||||
For matching existing grabs, DeleteDetailFromMask is called with the
|
||||
stuff->detail value. This function creates a new mask with the one bit
|
||||
representing stuff->detail cleared.
|
||||
|
||||
However, the array size for the new mask is 8 * sizeof(CARD32) bits,
|
||||
thus any detail above 255 results in an OOB array write.
|
||||
|
||||
CVE-2022-46341, ZDI-CAN 19381
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/51eb63b0ee1509c6c6b8922b0e4aa037faa6f78b]
|
||||
CVE: CVE-2022-46341
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
Xi/xipassivegrab.c | 22 ++++++++++++++--------
|
||||
1 file changed, 14 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
|
||||
index d30f51f..89a5910 100644
|
||||
--- a/Xi/xipassivegrab.c
|
||||
+++ b/Xi/xipassivegrab.c
|
||||
@@ -133,6 +133,12 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
||||
return BadValue;
|
||||
}
|
||||
|
||||
+ /* XI2 allows 32-bit keycodes but thanks to XKB we can never
|
||||
+ * implement this. Just return an error for all keycodes that
|
||||
+ * cannot work anyway, same for buttons > 255. */
|
||||
+ if (stuff->detail > 255)
|
||||
+ return XIAlreadyGrabbed;
|
||||
+
|
||||
if (XICheckInvalidMaskBits(client, (unsigned char *) &stuff[1],
|
||||
stuff->mask_len * 4) != Success)
|
||||
return BadValue;
|
||||
@@ -203,14 +209,8 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
||||
¶m, XI2, &mask);
|
||||
break;
|
||||
case XIGrabtypeKeycode:
|
||||
- /* XI2 allows 32-bit keycodes but thanks to XKB we can never
|
||||
- * implement this. Just return an error for all keycodes that
|
||||
- * cannot work anyway */
|
||||
- if (stuff->detail > 255)
|
||||
- status = XIAlreadyGrabbed;
|
||||
- else
|
||||
- status = GrabKey(client, dev, mod_dev, stuff->detail,
|
||||
- ¶m, XI2, &mask);
|
||||
+ status = GrabKey(client, dev, mod_dev, stuff->detail,
|
||||
+ ¶m, XI2, &mask);
|
||||
break;
|
||||
case XIGrabtypeEnter:
|
||||
case XIGrabtypeFocusIn:
|
||||
@@ -319,6 +319,12 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
|
||||
return BadValue;
|
||||
}
|
||||
|
||||
+ /* We don't allow passive grabs for details > 255 anyway */
|
||||
+ if (stuff->detail > 255) {
|
||||
+ client->errorValue = stuff->detail;
|
||||
+ return BadValue;
|
||||
+ }
|
||||
+
|
||||
rc = dixLookupWindow(&win, stuff->grab_window, client, DixSetAttrAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
From b79f32b57cc0c1186b2899bce7cf89f7b325161b Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Wed, 30 Nov 2022 11:20:40 +1000
|
||||
Subject: [PATCH] Xext: free the XvRTVideoNotify when turning off from the same
|
||||
client
|
||||
|
||||
This fixes a use-after-free bug:
|
||||
|
||||
When a client first calls XvdiSelectVideoNotify() on a drawable with a
|
||||
TRUE onoff argument, a struct XvVideoNotifyRec is allocated. This struct
|
||||
is added twice to the resources:
|
||||
- as the drawable's XvRTVideoNotifyList. This happens only once per
|
||||
drawable, subsequent calls append to this list.
|
||||
- as the client's XvRTVideoNotify. This happens for every client.
|
||||
|
||||
The struct keeps the ClientPtr around once it has been added for a
|
||||
client. The idea, presumably, is that if the client disconnects we can remove
|
||||
all structs from the drawable's list that match the client (by resetting
|
||||
the ClientPtr to NULL), but if the drawable is destroyed we can remove
|
||||
and free the whole list.
|
||||
|
||||
However, if the same client then calls XvdiSelectVideoNotify() on the
|
||||
same drawable with a FALSE onoff argument, only the ClientPtr on the
|
||||
existing struct was set to NULL. The struct itself remained in the
|
||||
client's resources.
|
||||
|
||||
If the drawable is now destroyed, the resource system invokes
|
||||
XvdiDestroyVideoNotifyList which frees the whole list for this drawable
|
||||
- including our struct. This function however does not free the resource
|
||||
for the client since our ClientPtr is NULL.
|
||||
|
||||
Later, when the client is destroyed and the resource system invokes
|
||||
XvdiDestroyVideoNotify, we unconditionally set the ClientPtr to NULL. On
|
||||
a struct that has been freed previously. This is generally frowned upon.
|
||||
|
||||
Fix this by calling FreeResource() on the second call instead of merely
|
||||
setting the ClientPtr to NULL. This removes the struct from the client
|
||||
resources (but not from the list), ensuring that it won't be accessed
|
||||
again when the client quits.
|
||||
|
||||
Note that the assignment tpn->client = NULL; is superfluous since the
|
||||
XvdiDestroyVideoNotify function will do this anyway. But it's left for
|
||||
clarity and to match a similar invocation in XvdiSelectPortNotify.
|
||||
|
||||
CVE-2022-46342, ZDI-CAN 19400
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/b79f32b57cc0c1186b2899bce7cf89f7b325161b]
|
||||
CVE: CVE-2022-46342
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
Xext/xvmain.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Xext/xvmain.c b/Xext/xvmain.c
|
||||
index c520c7d..5f4c174 100644
|
||||
--- a/Xext/xvmain.c
|
||||
+++ b/Xext/xvmain.c
|
||||
@@ -811,8 +811,10 @@ XvdiSelectVideoNotify(ClientPtr client, DrawablePtr pDraw, BOOL onoff)
|
||||
tpn = pn;
|
||||
while (tpn) {
|
||||
if (tpn->client == client) {
|
||||
- if (!onoff)
|
||||
+ if (!onoff) {
|
||||
tpn->client = NULL;
|
||||
+ FreeResource(tpn->id, XvRTVideoNotify);
|
||||
+ }
|
||||
return Success;
|
||||
}
|
||||
if (!tpn->client)
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From 842ca3ccef100ce010d1d8f5f6d6cc1915055900 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue, 29 Nov 2022 14:53:07 +1000
|
||||
Subject: [PATCH] Xext: free the screen saver resource when replacing it
|
||||
|
||||
This fixes a use-after-free bug:
|
||||
|
||||
When a client first calls ScreenSaverSetAttributes(), a struct
|
||||
ScreenSaverAttrRec is allocated and added to the client's
|
||||
resources.
|
||||
|
||||
When the same client calls ScreenSaverSetAttributes() again, a new
|
||||
struct ScreenSaverAttrRec is allocated, replacing the old struct. The
|
||||
old struct was freed but not removed from the clients resources.
|
||||
|
||||
Later, when the client is destroyed the resource system invokes
|
||||
ScreenSaverFreeAttr and attempts to clean up the already freed struct.
|
||||
|
||||
Fix this by letting the resource system free the old attrs instead.
|
||||
|
||||
CVE-2022-46343, ZDI-CAN 19404
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/842ca3ccef100ce010d1d8f5f6d6cc1915055900]
|
||||
CVE: CVE-2022-46343
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
Xext/saver.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Xext/saver.c b/Xext/saver.c
|
||||
index c23907d..05b9ca3 100644
|
||||
--- a/Xext/saver.c
|
||||
+++ b/Xext/saver.c
|
||||
@@ -1051,7 +1051,7 @@ ScreenSaverSetAttributes(ClientPtr client)
|
||||
pVlist++;
|
||||
}
|
||||
if (pPriv->attr)
|
||||
- FreeScreenAttr(pPriv->attr);
|
||||
+ FreeResource(pPriv->attr->resource, AttrType);
|
||||
pPriv->attr = pAttr;
|
||||
pAttr->resource = FakeClientID(client->index);
|
||||
if (!AddResource(pAttr->resource, AttrType, (void *) pAttr))
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
From 8f454b793e1f13c99872c15f0eed1d7f3b823fe8 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue, 29 Nov 2022 13:26:57 +1000
|
||||
Subject: [PATCH] Xi: avoid integer truncation in length check of
|
||||
ProcXIChangeProperty
|
||||
|
||||
This fixes an OOB read and the resulting information disclosure.
|
||||
|
||||
Length calculation for the request was clipped to a 32-bit integer. With
|
||||
the correct stuff->num_items value the expected request size was
|
||||
truncated, passing the REQUEST_FIXED_SIZE check.
|
||||
|
||||
The server then proceeded with reading at least stuff->num_items bytes
|
||||
(depending on stuff->format) from the request and stuffing whatever it
|
||||
finds into the property. In the process it would also allocate at least
|
||||
stuff->num_items bytes, i.e. 4GB.
|
||||
|
||||
The same bug exists in ProcChangeProperty and ProcXChangeDeviceProperty,
|
||||
so let's fix that too.
|
||||
|
||||
CVE-2022-46344, ZDI-CAN 19405
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/8f454b793e1f13c99872c15f0eed1d7f3b823fe8]
|
||||
CVE: CVE-2022-46344
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
Xi/xiproperty.c | 4 ++--
|
||||
dix/property.c | 3 ++-
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
|
||||
index 6ec419e..0cfa6e3 100644
|
||||
--- a/Xi/xiproperty.c
|
||||
+++ b/Xi/xiproperty.c
|
||||
@@ -890,7 +890,7 @@ ProcXChangeDeviceProperty(ClientPtr client)
|
||||
REQUEST(xChangeDevicePropertyReq);
|
||||
DeviceIntPtr dev;
|
||||
unsigned long len;
|
||||
- int totalSize;
|
||||
+ uint64_t totalSize;
|
||||
int rc;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq);
|
||||
@@ -1128,7 +1128,7 @@ ProcXIChangeProperty(ClientPtr client)
|
||||
{
|
||||
int rc;
|
||||
DeviceIntPtr dev;
|
||||
- int totalSize;
|
||||
+ uint64_t totalSize;
|
||||
unsigned long len;
|
||||
|
||||
REQUEST(xXIChangePropertyReq);
|
||||
diff --git a/dix/property.c b/dix/property.c
|
||||
index ff1d669..6fdb74a 100644
|
||||
--- a/dix/property.c
|
||||
+++ b/dix/property.c
|
||||
@@ -205,7 +205,8 @@ ProcChangeProperty(ClientPtr client)
|
||||
WindowPtr pWin;
|
||||
char format, mode;
|
||||
unsigned long len;
|
||||
- int sizeInBytes, totalSize, err;
|
||||
+ int sizeInBytes, err;
|
||||
+ uint64_t totalSize;
|
||||
|
||||
REQUEST(xChangePropertyReq);
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -8,7 +8,13 @@ SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat
|
||||
file://CVE-2022-3550.patch \
|
||||
file://CVE-2022-3551.patch \
|
||||
file://CVE-2022-3553.patch \
|
||||
"
|
||||
file://CVE-2022-4283.patch \
|
||||
file://CVE-2022-46340.patch \
|
||||
file://CVE-2022-46341.patch \
|
||||
file://CVE-2022-46342.patch \
|
||||
file://CVE-2022-46343.patch \
|
||||
file://CVE-2022-46344.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "453fc86aac8c629b3a5b77e8dcca30bf"
|
||||
SRC_URI[sha256sum] = "54b199c9280ff8bf0f73a54a759645bd0eeeda7255d1c99310d5b7595f3ac066"
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
|
||||
"
|
||||
# WHENCE checksum is defined separately to ease overriding it if
|
||||
# class-devupstream is selected.
|
||||
WHENCE_CHKSUM = "ab4ba608dc4b757716871f9be033f0f1"
|
||||
WHENCE_CHKSUM = "bf7c716d16e48fe118c6209f99b13253"
|
||||
|
||||
# These are not common licenses, set NO_GENERIC_LICENSE for them
|
||||
# so that the license files will be copied from fetched source
|
||||
@@ -209,7 +209,7 @@ SRC_URI:class-devupstream = "git://git.kernel.org/pub/scm/linux/kernel/git/firmw
|
||||
# Pin this to the 20220509 release, override this in local.conf
|
||||
SRCREV:class-devupstream ?= "b19cbdca78ab2adfd210c91be15a22568e8b8cae"
|
||||
|
||||
SRC_URI[sha256sum] = "c0ddffbbcf30f2e015bddd5c6d3ce1f13976b906aceabda4a57e3c41a3190701"
|
||||
SRC_URI[sha256sum] = "e793783e92acbde549965521462d1d1327827360664cf242dbda08f075654331"
|
||||
|
||||
inherit allarch
|
||||
|
||||
@@ -11,13 +11,13 @@ python () {
|
||||
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
|
||||
}
|
||||
|
||||
SRCREV_machine ?= "acaf6e01f6ecd6d80ac02f552344c6c0de1c7fe1"
|
||||
SRCREV_meta ?= "b00c12ce7affe7e5da43fa4285998866a51e6e79"
|
||||
SRCREV_machine ?= "053238af99b52ce5ffb19755cdfeb10f206463da"
|
||||
SRCREV_meta ?= "9c5bb858a6f5a9b1cc2e585e74e8517387863fd7"
|
||||
|
||||
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
|
||||
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}"
|
||||
|
||||
LINUX_VERSION ?= "5.4.228"
|
||||
LINUX_VERSION ?= "5.4.230"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig"
|
||||
|
||||
require recipes-kernel/linux/linux-yocto.inc
|
||||
|
||||
LINUX_VERSION ?= "5.4.228"
|
||||
LINUX_VERSION ?= "5.4.230"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native"
|
||||
KMETA = "kernel-meta"
|
||||
KCONF_BSP_AUDIT_LEVEL = "2"
|
||||
|
||||
SRCREV_machine_qemuarm ?= "575c3de9d720c998b5b4ab0253893a4132b4423f"
|
||||
SRCREV_machine ?= "b72387f2b7f2babf1b0ca6e4ced3b22538162474"
|
||||
SRCREV_meta ?= "b00c12ce7affe7e5da43fa4285998866a51e6e79"
|
||||
SRCREV_machine_qemuarm ?= "8517d03dcde5d19a2fd9493433275b3790450ae5"
|
||||
SRCREV_machine ?= "d05044bfcb54db9a3dfb9cccd3a39c2c07d844b1"
|
||||
SRCREV_meta ?= "9c5bb858a6f5a9b1cc2e585e74e8517387863fd7"
|
||||
|
||||
PV = "${LINUX_VERSION}+git${SRCPV}"
|
||||
|
||||
|
||||
@@ -12,16 +12,16 @@ KBRANCH_qemux86 ?= "v5.4/standard/base"
|
||||
KBRANCH_qemux86-64 ?= "v5.4/standard/base"
|
||||
KBRANCH_qemumips64 ?= "v5.4/standard/mti-malta64"
|
||||
|
||||
SRCREV_machine_qemuarm ?= "32654a547b05ba63c604503fc865d7052ae96992"
|
||||
SRCREV_machine_qemuarm64 ?= "2bd8ca7c0973870753b103107513689a598383d7"
|
||||
SRCREV_machine_qemumips ?= "84a8ba0ada556ba3307c33e2b5a0ca8f9e3df1dd"
|
||||
SRCREV_machine_qemuppc ?= "20db90d7935c8760bfc68c0de4f7d7085cba7c14"
|
||||
SRCREV_machine_qemuriscv64 ?= "921d9e22542506ba26c2e5e2f25ec00ff9bffa63"
|
||||
SRCREV_machine_qemux86 ?= "921d9e22542506ba26c2e5e2f25ec00ff9bffa63"
|
||||
SRCREV_machine_qemux86-64 ?= "921d9e22542506ba26c2e5e2f25ec00ff9bffa63"
|
||||
SRCREV_machine_qemumips64 ?= "929fde255b362923e9bba63250005b09c3a50f45"
|
||||
SRCREV_machine ?= "921d9e22542506ba26c2e5e2f25ec00ff9bffa63"
|
||||
SRCREV_meta ?= "b00c12ce7affe7e5da43fa4285998866a51e6e79"
|
||||
SRCREV_machine_qemuarm ?= "c3e35e461a4f880bfe3d007c763fe4ff1670621f"
|
||||
SRCREV_machine_qemuarm64 ?= "5604d6b87d39cd4eb427762610f505d5659ce73f"
|
||||
SRCREV_machine_qemumips ?= "d0ef5b5eea98083cbb30d42bb191b280d2637a02"
|
||||
SRCREV_machine_qemuppc ?= "79202d38795f70dd5c7601cbc8d1c54ecb831ad9"
|
||||
SRCREV_machine_qemuriscv64 ?= "c32d5a645da049cf72f9e6b819c32609c7effcec"
|
||||
SRCREV_machine_qemux86 ?= "c32d5a645da049cf72f9e6b819c32609c7effcec"
|
||||
SRCREV_machine_qemux86-64 ?= "c32d5a645da049cf72f9e6b819c32609c7effcec"
|
||||
SRCREV_machine_qemumips64 ?= "eafe1aabab778a089d20f0c686902a7a7215b57e"
|
||||
SRCREV_machine ?= "c32d5a645da049cf72f9e6b819c32609c7effcec"
|
||||
SRCREV_meta ?= "9c5bb858a6f5a9b1cc2e585e74e8517387863fd7"
|
||||
|
||||
# remap qemuarm to qemuarma15 for the 5.4 kernel
|
||||
# KMACHINE_qemuarm ?= "qemuarma15"
|
||||
@@ -30,7 +30,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
|
||||
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
|
||||
LINUX_VERSION ?= "5.4.228"
|
||||
LINUX_VERSION ?= "5.4.230"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
DEPENDS += "openssl-native util-linux-native"
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
From cb78974394a9af865e1d2d606e838dbec0de80e8 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Mon, 5 Oct 2020 15:31:42 -0400
|
||||
Subject: [PATCH 01/16] fix: strncpy equals destination size warning
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Some versions of GCC when called with -Wstringop-truncation will warn
|
||||
when doing a copy of the same size as the destination buffer with
|
||||
strncpy :
|
||||
|
||||
‘strncpy’ specified bound 256 equals destination size [-Werror=stringop-truncation]
|
||||
|
||||
Since we unconditionally write '\0' in the last byte, reduce the copy
|
||||
size by one.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Change-Id: Idb907c9550817a06fc0dffc489740f63d440e7d4
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
---
|
||||
lttng-syscalls.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lttng-syscalls.c b/lttng-syscalls.c
|
||||
index 49c0d81b..b43dd570 100644
|
||||
--- a/lttng-syscalls.c
|
||||
+++ b/lttng-syscalls.c
|
||||
@@ -719,7 +719,7 @@ int fill_table(const struct trace_syscall_entry *table, size_t table_len,
|
||||
ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT;
|
||||
break;
|
||||
}
|
||||
- strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN);
|
||||
+ strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN - 1);
|
||||
ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
|
||||
ev.instrumentation = LTTNG_KERNEL_SYSCALL;
|
||||
chan_table[i] = _lttng_event_create(chan, &ev, filter,
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
From 8e4e8641961df32bfe519fd18d899250951acd1a Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Mon, 26 Oct 2020 13:41:02 -0400
|
||||
Subject: [PATCH 02/16] fix: objtool: Rename frame.h -> objtool.h (v5.10)
|
||||
|
||||
See upstream commit :
|
||||
|
||||
commit 00089c048eb4a8250325efb32a2724fd0da68cce
|
||||
Author: Julien Thierry <jthierry@redhat.com>
|
||||
Date: Fri Sep 4 16:30:25 2020 +0100
|
||||
|
||||
objtool: Rename frame.h -> objtool.h
|
||||
|
||||
Header frame.h is getting more code annotations to help objtool analyze
|
||||
object files.
|
||||
|
||||
Rename the file to objtool.h.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Change-Id: Ic2283161bebcbf1e33b72805eb4d2628f4ae3e89
|
||||
---
|
||||
lttng-filter-interpreter.c | 2 +-
|
||||
wrapper/{frame.h => objtool.h} | 19 ++++++++++++-------
|
||||
2 files changed, 13 insertions(+), 8 deletions(-)
|
||||
rename wrapper/{frame.h => objtool.h} (50%)
|
||||
|
||||
diff --git a/lttng-filter-interpreter.c b/lttng-filter-interpreter.c
|
||||
index 21169f01..5d572437 100644
|
||||
--- a/lttng-filter-interpreter.c
|
||||
+++ b/lttng-filter-interpreter.c
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
#include <wrapper/uaccess.h>
|
||||
-#include <wrapper/frame.h>
|
||||
+#include <wrapper/objtool.h>
|
||||
#include <wrapper/types.h>
|
||||
#include <linux/swab.h>
|
||||
|
||||
diff --git a/wrapper/frame.h b/wrapper/objtool.h
|
||||
similarity index 50%
|
||||
rename from wrapper/frame.h
|
||||
rename to wrapper/objtool.h
|
||||
index 6e6dc811..3b997cae 100644
|
||||
--- a/wrapper/frame.h
|
||||
+++ b/wrapper/objtool.h
|
||||
@@ -1,18 +1,23 @@
|
||||
-/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
|
||||
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
|
||||
*
|
||||
- * wrapper/frame.h
|
||||
+ * wrapper/objtool.h
|
||||
*
|
||||
* Copyright (C) 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
*/
|
||||
|
||||
-#ifndef _LTTNG_WRAPPER_FRAME_H
|
||||
-#define _LTTNG_WRAPPER_FRAME_H
|
||||
+#ifndef _LTTNG_WRAPPER_OBJTOOL_H
|
||||
+#define _LTTNG_WRAPPER_OBJTOOL_H
|
||||
|
||||
#include <linux/version.h>
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
|
||||
-
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
|
||||
+#include <linux/objtool.h>
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
|
||||
#include <linux/frame.h>
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
|
||||
|
||||
#define LTTNG_STACK_FRAME_NON_STANDARD(func) \
|
||||
STACK_FRAME_NON_STANDARD(func)
|
||||
@@ -23,4 +28,4 @@
|
||||
|
||||
#endif
|
||||
|
||||
-#endif /* _LTTNG_WRAPPER_FRAME_H */
|
||||
+#endif /* _LTTNG_WRAPPER_OBJTOOL_H */
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,316 +0,0 @@
|
||||
From 5a3b76a81fd3df52405700d369223d64c7a04dc8 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Tue, 27 Oct 2020 11:42:23 -0400
|
||||
Subject: [PATCH 03/16] fix: btrfs: tracepoints: output proper root owner for
|
||||
trace_find_free_extent() (v5.10)
|
||||
|
||||
See upstream commit :
|
||||
|
||||
commit 437490fed3b0c9ae21af8f70e0f338d34560842b
|
||||
Author: Qu Wenruo <wqu@suse.com>
|
||||
Date: Tue Jul 28 09:42:49 2020 +0800
|
||||
|
||||
btrfs: tracepoints: output proper root owner for trace_find_free_extent()
|
||||
|
||||
The current trace event always output result like this:
|
||||
|
||||
find_free_extent: root=2(EXTENT_TREE) len=16384 empty_size=0 flags=4(METADATA)
|
||||
find_free_extent: root=2(EXTENT_TREE) len=16384 empty_size=0 flags=4(METADATA)
|
||||
find_free_extent: root=2(EXTENT_TREE) len=8192 empty_size=0 flags=1(DATA)
|
||||
find_free_extent: root=2(EXTENT_TREE) len=8192 empty_size=0 flags=1(DATA)
|
||||
find_free_extent: root=2(EXTENT_TREE) len=4096 empty_size=0 flags=1(DATA)
|
||||
find_free_extent: root=2(EXTENT_TREE) len=4096 empty_size=0 flags=1(DATA)
|
||||
|
||||
T's saying we're allocating data extent for EXTENT tree, which is not
|
||||
even possible.
|
||||
|
||||
It's because we always use EXTENT tree as the owner for
|
||||
trace_find_free_extent() without using the @root from
|
||||
btrfs_reserve_extent().
|
||||
|
||||
This patch will change the parameter to use proper @root for
|
||||
trace_find_free_extent():
|
||||
|
||||
Now it looks much better:
|
||||
|
||||
find_free_extent: root=5(FS_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP)
|
||||
find_free_extent: root=5(FS_TREE) len=8192 empty_size=0 flags=1(DATA)
|
||||
find_free_extent: root=5(FS_TREE) len=16384 empty_size=0 flags=1(DATA)
|
||||
find_free_extent: root=5(FS_TREE) len=4096 empty_size=0 flags=1(DATA)
|
||||
find_free_extent: root=5(FS_TREE) len=8192 empty_size=0 flags=1(DATA)
|
||||
find_free_extent: root=5(FS_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP)
|
||||
find_free_extent: root=7(CSUM_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP)
|
||||
find_free_extent: root=2(EXTENT_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP)
|
||||
find_free_extent: root=1(ROOT_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP)
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Change-Id: I1d674064d29b31417e2acffdeb735f5052a87032
|
||||
---
|
||||
instrumentation/events/lttng-module/btrfs.h | 206 ++++++++++++--------
|
||||
1 file changed, 122 insertions(+), 84 deletions(-)
|
||||
|
||||
diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h
|
||||
index 7b290085..52fcfd0d 100644
|
||||
--- a/instrumentation/events/lttng-module/btrfs.h
|
||||
+++ b/instrumentation/events/lttng-module/btrfs.h
|
||||
@@ -1856,7 +1856,29 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_f
|
||||
|
||||
#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0) || \
|
||||
+ LTTNG_KERNEL_RANGE(5,9,6, 5,10,0) || \
|
||||
+ LTTNG_KERNEL_RANGE(5,4,78, 5,5,0))
|
||||
+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
|
||||
+
|
||||
+ btrfs_find_free_extent,
|
||||
+
|
||||
+ TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
|
||||
+ u64 data),
|
||||
+
|
||||
+ TP_ARGS(root, num_bytes, empty_size, data),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
|
||||
+ ctf_integer(u64, root_objectid, root->root_key.objectid)
|
||||
+ ctf_integer(u64, num_bytes, num_bytes)
|
||||
+ ctf_integer(u64, empty_size, empty_size)
|
||||
+ ctf_integer(u64, data, data)
|
||||
+ )
|
||||
+)
|
||||
+
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
|
||||
+
|
||||
LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
|
||||
|
||||
btrfs_find_free_extent,
|
||||
@@ -1874,6 +1896,105 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
|
||||
)
|
||||
)
|
||||
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
|
||||
+
|
||||
+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
|
||||
+
|
||||
+ btrfs_find_free_extent,
|
||||
+
|
||||
+ TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
|
||||
+ u64 data),
|
||||
+
|
||||
+ TP_ARGS(fs_info, num_bytes, empty_size, data),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
|
||||
+ ctf_integer(u64, num_bytes, num_bytes)
|
||||
+ ctf_integer(u64, empty_size, empty_size)
|
||||
+ ctf_integer(u64, data, data)
|
||||
+ )
|
||||
+)
|
||||
+
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
|
||||
+
|
||||
+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
|
||||
+
|
||||
+ btrfs_find_free_extent,
|
||||
+
|
||||
+ TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
|
||||
+ u64 data),
|
||||
+
|
||||
+ TP_ARGS(fs_info, num_bytes, empty_size, data),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
|
||||
+ ctf_integer(u64, num_bytes, num_bytes)
|
||||
+ ctf_integer(u64, empty_size, empty_size)
|
||||
+ ctf_integer(u64, data, data)
|
||||
+ )
|
||||
+)
|
||||
+
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
|
||||
+
|
||||
+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
|
||||
+
|
||||
+ btrfs_find_free_extent,
|
||||
+
|
||||
+ TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
|
||||
+ u64 data),
|
||||
+
|
||||
+ TP_ARGS(fs_info, num_bytes, empty_size, data),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
|
||||
+ ctf_integer(u64, num_bytes, num_bytes)
|
||||
+ ctf_integer(u64, empty_size, empty_size)
|
||||
+ ctf_integer(u64, data, data)
|
||||
+ )
|
||||
+)
|
||||
+
|
||||
+#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
|
||||
+ LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
|
||||
+ LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
|
||||
+ LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
|
||||
+
|
||||
+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
|
||||
+
|
||||
+ btrfs_find_free_extent,
|
||||
+
|
||||
+ TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
|
||||
+ u64 data),
|
||||
+
|
||||
+ TP_ARGS(root, num_bytes, empty_size, data),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer(u64, root_objectid, root->root_key.objectid)
|
||||
+ ctf_integer(u64, num_bytes, num_bytes)
|
||||
+ ctf_integer(u64, empty_size, empty_size)
|
||||
+ ctf_integer(u64, data, data)
|
||||
+ )
|
||||
+)
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
|
||||
+
|
||||
+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
|
||||
+
|
||||
+ btrfs_find_free_extent,
|
||||
+
|
||||
+ TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
|
||||
+ u64 data),
|
||||
+
|
||||
+ TP_ARGS(root, num_bytes, empty_size, data),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer(u64, root_objectid, root->root_key.objectid)
|
||||
+ ctf_integer(u64, num_bytes, num_bytes)
|
||||
+ ctf_integer(u64, empty_size, empty_size)
|
||||
+ ctf_integer(u64, data, data)
|
||||
+ )
|
||||
+)
|
||||
+#endif
|
||||
+
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
|
||||
|
||||
TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
|
||||
@@ -1907,22 +2028,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
|
||||
)
|
||||
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
|
||||
-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
|
||||
-
|
||||
- btrfs_find_free_extent,
|
||||
-
|
||||
- TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
|
||||
- u64 data),
|
||||
-
|
||||
- TP_ARGS(fs_info, num_bytes, empty_size, data),
|
||||
-
|
||||
- TP_FIELDS(
|
||||
- ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
|
||||
- ctf_integer(u64, num_bytes, num_bytes)
|
||||
- ctf_integer(u64, empty_size, empty_size)
|
||||
- ctf_integer(u64, data, data)
|
||||
- )
|
||||
-)
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
|
||||
|
||||
@@ -1957,22 +2062,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
|
||||
)
|
||||
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
|
||||
-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
|
||||
-
|
||||
- btrfs_find_free_extent,
|
||||
-
|
||||
- TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
|
||||
- u64 data),
|
||||
-
|
||||
- TP_ARGS(fs_info, num_bytes, empty_size, data),
|
||||
-
|
||||
- TP_FIELDS(
|
||||
- ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
|
||||
- ctf_integer(u64, num_bytes, num_bytes)
|
||||
- ctf_integer(u64, empty_size, empty_size)
|
||||
- ctf_integer(u64, data, data)
|
||||
- )
|
||||
-)
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
|
||||
|
||||
@@ -2011,23 +2100,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
|
||||
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
|
||||
|
||||
-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
|
||||
-
|
||||
- btrfs_find_free_extent,
|
||||
-
|
||||
- TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
|
||||
- u64 data),
|
||||
-
|
||||
- TP_ARGS(fs_info, num_bytes, empty_size, data),
|
||||
-
|
||||
- TP_FIELDS(
|
||||
- ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
|
||||
- ctf_integer(u64, num_bytes, num_bytes)
|
||||
- ctf_integer(u64, empty_size, empty_size)
|
||||
- ctf_integer(u64, data, data)
|
||||
- )
|
||||
-)
|
||||
-
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
|
||||
|
||||
TP_PROTO(struct btrfs_fs_info *fs_info,
|
||||
@@ -2066,23 +2138,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
|
||||
LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
|
||||
LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
|
||||
|
||||
-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
|
||||
-
|
||||
- btrfs_find_free_extent,
|
||||
-
|
||||
- TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
|
||||
- u64 data),
|
||||
-
|
||||
- TP_ARGS(root, num_bytes, empty_size, data),
|
||||
-
|
||||
- TP_FIELDS(
|
||||
- ctf_integer(u64, root_objectid, root->root_key.objectid)
|
||||
- ctf_integer(u64, num_bytes, num_bytes)
|
||||
- ctf_integer(u64, empty_size, empty_size)
|
||||
- ctf_integer(u64, data, data)
|
||||
- )
|
||||
-)
|
||||
-
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
|
||||
|
||||
TP_PROTO(const struct btrfs_root *root,
|
||||
@@ -2120,23 +2175,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
|
||||
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
|
||||
|
||||
-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
|
||||
-
|
||||
- btrfs_find_free_extent,
|
||||
-
|
||||
- TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
|
||||
- u64 data),
|
||||
-
|
||||
- TP_ARGS(root, num_bytes, empty_size, data),
|
||||
-
|
||||
- TP_FIELDS(
|
||||
- ctf_integer(u64, root_objectid, root->root_key.objectid)
|
||||
- ctf_integer(u64, num_bytes, num_bytes)
|
||||
- ctf_integer(u64, empty_size, empty_size)
|
||||
- ctf_integer(u64, data, data)
|
||||
- )
|
||||
-)
|
||||
-
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
|
||||
|
||||
TP_PROTO(struct btrfs_root *root,
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,179 +0,0 @@
|
||||
From d51a3332909ff034c8ec16ead0090bd6a4e2bc38 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Tue, 27 Oct 2020 12:10:05 -0400
|
||||
Subject: [PATCH 04/16] fix: btrfs: make ordered extent tracepoint take
|
||||
btrfs_inode (v5.10)
|
||||
|
||||
See upstream commit :
|
||||
|
||||
commit acbf1dd0fcbd10c67826a19958f55a053b32f532
|
||||
Author: Nikolay Borisov <nborisov@suse.com>
|
||||
Date: Mon Aug 31 14:42:40 2020 +0300
|
||||
|
||||
btrfs: make ordered extent tracepoint take btrfs_inode
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Change-Id: I096d0801ffe0ad826cfe414cdd1c0857cbd2b624
|
||||
---
|
||||
instrumentation/events/lttng-module/btrfs.h | 120 +++++++++++++++-----
|
||||
1 file changed, 90 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h
|
||||
index 52fcfd0d..d47f3280 100644
|
||||
--- a/instrumentation/events/lttng-module/btrfs.h
|
||||
+++ b/instrumentation/events/lttng-module/btrfs.h
|
||||
@@ -346,7 +346,29 @@ LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
|
||||
)
|
||||
#endif
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
|
||||
+LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
|
||||
+
|
||||
+ TP_PROTO(const struct btrfs_inode *inode,
|
||||
+ const struct btrfs_ordered_extent *ordered),
|
||||
+
|
||||
+ TP_ARGS(inode, ordered),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_array(u8, fsid, inode->root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
|
||||
+ ctf_integer(ino_t, ino, btrfs_ino(inode))
|
||||
+ ctf_integer(u64, file_offset, ordered->file_offset)
|
||||
+ ctf_integer(u64, start, ordered->disk_bytenr)
|
||||
+ ctf_integer(u64, len, ordered->num_bytes)
|
||||
+ ctf_integer(u64, disk_len, ordered->disk_num_bytes)
|
||||
+ ctf_integer(u64, bytes_left, ordered->bytes_left)
|
||||
+ ctf_integer(unsigned long, flags, ordered->flags)
|
||||
+ ctf_integer(int, compress_type, ordered->compress_type)
|
||||
+ ctf_integer(int, refs, refcount_read(&ordered->refs))
|
||||
+ ctf_integer(u64, root_objectid, inode->root->root_key.objectid)
|
||||
+ )
|
||||
+)
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
|
||||
|
||||
TP_PROTO(const struct inode *inode,
|
||||
@@ -458,7 +480,39 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
|
||||
)
|
||||
#endif
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
|
||||
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
|
||||
+
|
||||
+ TP_PROTO(const struct btrfs_inode *inode,
|
||||
+ const struct btrfs_ordered_extent *ordered),
|
||||
+
|
||||
+ TP_ARGS(inode, ordered)
|
||||
+)
|
||||
+
|
||||
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
|
||||
+
|
||||
+ TP_PROTO(const struct btrfs_inode *inode,
|
||||
+ const struct btrfs_ordered_extent *ordered),
|
||||
+
|
||||
+ TP_ARGS(inode, ordered)
|
||||
+)
|
||||
+
|
||||
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
|
||||
+
|
||||
+ TP_PROTO(const struct btrfs_inode *inode,
|
||||
+ const struct btrfs_ordered_extent *ordered),
|
||||
+
|
||||
+ TP_ARGS(inode, ordered)
|
||||
+)
|
||||
+
|
||||
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
|
||||
+
|
||||
+ TP_PROTO(const struct btrfs_inode *inode,
|
||||
+ const struct btrfs_ordered_extent *ordered),
|
||||
+
|
||||
+ TP_ARGS(inode, ordered)
|
||||
+)
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
|
||||
LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
|
||||
LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
|
||||
LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
|
||||
@@ -494,7 +548,41 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
|
||||
|
||||
TP_ARGS(inode, ordered)
|
||||
)
|
||||
+#else
|
||||
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
|
||||
+
|
||||
+ TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
|
||||
+
|
||||
+ TP_ARGS(inode, ordered)
|
||||
+)
|
||||
+
|
||||
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
|
||||
+
|
||||
+ TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
|
||||
+
|
||||
+ TP_ARGS(inode, ordered)
|
||||
+)
|
||||
+
|
||||
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
|
||||
+
|
||||
+ TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
|
||||
+
|
||||
+ TP_ARGS(inode, ordered)
|
||||
+)
|
||||
|
||||
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
|
||||
+
|
||||
+ TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
|
||||
+
|
||||
+ TP_ARGS(inode, ordered)
|
||||
+)
|
||||
+#endif
|
||||
+
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
|
||||
+ LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
|
||||
+ LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
|
||||
+ LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
|
||||
+ LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
|
||||
|
||||
TP_PROTO(const struct page *page, const struct inode *inode,
|
||||
@@ -563,34 +651,6 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
|
||||
)
|
||||
)
|
||||
#else
|
||||
-LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
|
||||
-
|
||||
- TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
|
||||
-
|
||||
- TP_ARGS(inode, ordered)
|
||||
-)
|
||||
-
|
||||
-LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
|
||||
-
|
||||
- TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
|
||||
-
|
||||
- TP_ARGS(inode, ordered)
|
||||
-)
|
||||
-
|
||||
-LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
|
||||
-
|
||||
- TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
|
||||
-
|
||||
- TP_ARGS(inode, ordered)
|
||||
-)
|
||||
-
|
||||
-LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
|
||||
-
|
||||
- TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
|
||||
-
|
||||
- TP_ARGS(inode, ordered)
|
||||
-)
|
||||
-
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
|
||||
|
||||
TP_PROTO(struct page *page, struct inode *inode,
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
From b96f5364ba4d5a8b9e8159fe0b9e20d598a1c0f5 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Mon, 26 Oct 2020 17:03:23 -0400
|
||||
Subject: [PATCH 05/16] fix: ext4: fast commit recovery path (v5.10)
|
||||
|
||||
See upstream commit :
|
||||
|
||||
commit 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2
|
||||
Author: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
|
||||
Date: Thu Oct 15 13:37:59 2020 -0700
|
||||
|
||||
ext4: fast commit recovery path
|
||||
|
||||
This patch adds fast commit recovery path support for Ext4 file
|
||||
system. We add several helper functions that are similar in spirit to
|
||||
e2fsprogs journal recovery path handlers. Example of such functions
|
||||
include - a simple block allocator, idempotent block bitmap update
|
||||
function etc. Using these routines and the fast commit log in the fast
|
||||
commit area, the recovery path (ext4_fc_replay()) performs fast commit
|
||||
log recovery.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Change-Id: Ia65cf44e108f2df0b458f0d335f33a8f18f50baa
|
||||
---
|
||||
instrumentation/events/lttng-module/ext4.h | 40 ++++++++++++++++++++++
|
||||
1 file changed, 40 insertions(+)
|
||||
|
||||
diff --git a/instrumentation/events/lttng-module/ext4.h b/instrumentation/events/lttng-module/ext4.h
|
||||
index f9a55e29..5fddccad 100644
|
||||
--- a/instrumentation/events/lttng-module/ext4.h
|
||||
+++ b/instrumentation/events/lttng-module/ext4.h
|
||||
@@ -1423,6 +1423,18 @@ LTTNG_TRACEPOINT_EVENT(ext4_ext_load_extent,
|
||||
)
|
||||
)
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
|
||||
+LTTNG_TRACEPOINT_EVENT(ext4_load_inode,
|
||||
+ TP_PROTO(struct super_block *sb, unsigned long ino),
|
||||
+
|
||||
+ TP_ARGS(sb, ino),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer(dev_t, dev, sb->s_dev)
|
||||
+ ctf_integer(ino_t, ino, ino)
|
||||
+ )
|
||||
+)
|
||||
+#else
|
||||
LTTNG_TRACEPOINT_EVENT(ext4_load_inode,
|
||||
TP_PROTO(struct inode *inode),
|
||||
|
||||
@@ -2045,6 +2057,34 @@ LTTNG_TRACEPOINT_EVENT(ext4_es_shrink_exit,
|
||||
|
||||
#endif
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
|
||||
+LTTNG_TRACEPOINT_EVENT(ext4_fc_replay_scan,
|
||||
+ TP_PROTO(struct super_block *sb, int error, int off),
|
||||
+
|
||||
+ TP_ARGS(sb, error, off),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer(dev_t, dev, sb->s_dev)
|
||||
+ ctf_integer(int, error, error)
|
||||
+ ctf_integer(int, off, off)
|
||||
+ )
|
||||
+)
|
||||
+
|
||||
+LTTNG_TRACEPOINT_EVENT(ext4_fc_replay,
|
||||
+ TP_PROTO(struct super_block *sb, int tag, int ino, int priv1, int priv2),
|
||||
+
|
||||
+ TP_ARGS(sb, tag, ino, priv1, priv2),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer(dev_t, dev, sb->s_dev)
|
||||
+ ctf_integer(int, tag, tag)
|
||||
+ ctf_integer(int, ino, ino)
|
||||
+ ctf_integer(int, priv1, priv1)
|
||||
+ ctf_integer(int, priv2, priv2)
|
||||
+ )
|
||||
+)
|
||||
+#endif
|
||||
+
|
||||
#endif /* LTTNG_TRACE_EXT4_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
From a6334775b763c187d84914e89a0b835a793ae0fd Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Mon, 26 Oct 2020 14:11:17 -0400
|
||||
Subject: [PATCH 06/16] fix: KVM: x86: Add intr/vectoring info and error code
|
||||
to kvm_exit tracepoint (v5.10)
|
||||
|
||||
See upstream commit :
|
||||
|
||||
commit 235ba74f008d2e0936b29f77f68d4e2f73ffd24a
|
||||
Author: Sean Christopherson <sean.j.christopherson@intel.com>
|
||||
Date: Wed Sep 23 13:13:46 2020 -0700
|
||||
|
||||
KVM: x86: Add intr/vectoring info and error code to kvm_exit tracepoint
|
||||
|
||||
Extend the kvm_exit tracepoint to align it with kvm_nested_vmexit in
|
||||
terms of what information is captured. On SVM, add interrupt info and
|
||||
error code, while on VMX it add IDT vectoring and error code. This
|
||||
sets the stage for macrofying the kvm_exit tracepoint definition so that
|
||||
it can be reused for kvm_nested_vmexit without loss of information.
|
||||
|
||||
Opportunistically stuff a zero for VM_EXIT_INTR_INFO if the VM-Enter
|
||||
failed, as the field is guaranteed to be invalid. Note, it'd be
|
||||
possible to further filter the interrupt/exception fields based on the
|
||||
VM-Exit reason, but the helper is intended only for tracepoints, i.e.
|
||||
an extra VMREAD or two is a non-issue, the failed VM-Enter case is just
|
||||
low hanging fruit.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Change-Id: I638fa29ef7d8bb432de42a33f9ae4db43259b915
|
||||
---
|
||||
.../events/lttng-module/arch/x86/kvm/trace.h | 55 ++++++++++++++++++-
|
||||
1 file changed, 53 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
|
||||
index 4416ae02..0917b51f 100644
|
||||
--- a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
|
||||
+++ b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
|
||||
@@ -115,6 +115,37 @@ LTTNG_TRACEPOINT_EVENT_MAP(kvm_apic, kvm_x86_apic,
|
||||
/*
|
||||
* Tracepoint for kvm guest exit:
|
||||
*/
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
|
||||
+LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
|
||||
+ TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu, u32 isa),
|
||||
+ TP_ARGS(exit_reason, vcpu, isa),
|
||||
+
|
||||
+ TP_locvar(
|
||||
+ u64 info1, info2;
|
||||
+ u32 intr_info, error_code;
|
||||
+ ),
|
||||
+
|
||||
+ TP_code_pre(
|
||||
+ kvm_x86_ops.get_exit_info(vcpu, &tp_locvar->info1,
|
||||
+ &tp_locvar->info2,
|
||||
+ &tp_locvar->intr_info,
|
||||
+ &tp_locvar->error_code);
|
||||
+ ),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer(unsigned int, exit_reason, exit_reason)
|
||||
+ ctf_integer(unsigned long, guest_rip, kvm_rip_read(vcpu))
|
||||
+ ctf_integer(u32, isa, isa)
|
||||
+ ctf_integer(u64, info1, tp_locvar->info1)
|
||||
+ ctf_integer(u64, info2, tp_locvar->info2)
|
||||
+ ctf_integer(u32, intr_info, tp_locvar->intr_info)
|
||||
+ ctf_integer(u32, error_code, tp_locvar->error_code)
|
||||
+ ctf_integer(unsigned int, vcpu_id, vcpu->vcpu_id)
|
||||
+ ),
|
||||
+
|
||||
+ TP_code_post()
|
||||
+)
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
|
||||
LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
|
||||
TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu, u32 isa),
|
||||
TP_ARGS(exit_reason, vcpu, isa),
|
||||
@@ -124,13 +155,32 @@ LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
|
||||
),
|
||||
|
||||
TP_code_pre(
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
|
||||
kvm_x86_ops.get_exit_info(vcpu, &tp_locvar->info1,
|
||||
&tp_locvar->info2);
|
||||
+ ),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer(unsigned int, exit_reason, exit_reason)
|
||||
+ ctf_integer(unsigned long, guest_rip, kvm_rip_read(vcpu))
|
||||
+ ctf_integer(u32, isa, isa)
|
||||
+ ctf_integer(u64, info1, tp_locvar->info1)
|
||||
+ ctf_integer(u64, info2, tp_locvar->info2)
|
||||
+ ),
|
||||
+
|
||||
+ TP_code_post()
|
||||
+)
|
||||
#else
|
||||
+LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
|
||||
+ TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu, u32 isa),
|
||||
+ TP_ARGS(exit_reason, vcpu, isa),
|
||||
+
|
||||
+ TP_locvar(
|
||||
+ u64 info1, info2;
|
||||
+ ),
|
||||
+
|
||||
+ TP_code_pre(
|
||||
kvm_x86_ops->get_exit_info(vcpu, &tp_locvar->info1,
|
||||
&tp_locvar->info2);
|
||||
-#endif
|
||||
),
|
||||
|
||||
TP_FIELDS(
|
||||
@@ -143,6 +193,7 @@ LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
|
||||
|
||||
TP_code_post()
|
||||
)
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Tracepoint for kvm interrupt injection:
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
From 2f421c43c60b2c9d3ed63c1a363320e98a536a35 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Mon, 26 Oct 2020 14:28:35 -0400
|
||||
Subject: [PATCH 07/16] fix: kvm: x86/mmu: Add TDP MMU PF handler (v5.10)
|
||||
|
||||
See upstream commit :
|
||||
|
||||
commit bb18842e21111a979e2e0e1c5d85c09646f18d51
|
||||
Author: Ben Gardon <bgardon@google.com>
|
||||
Date: Wed Oct 14 11:26:50 2020 -0700
|
||||
|
||||
kvm: x86/mmu: Add TDP MMU PF handler
|
||||
|
||||
Add functions to handle page faults in the TDP MMU. These page faults
|
||||
are currently handled in much the same way as the x86 shadow paging
|
||||
based MMU, however the ordering of some operations is slightly
|
||||
different. Future patches will add eager NX splitting, a fast page fault
|
||||
handler, and parallel page faults.
|
||||
|
||||
Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell
|
||||
machine. This series introduced no new failures.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Change-Id: Ie56959cb6c77913d2f1188b0ca15da9114623a4e
|
||||
---
|
||||
.../lttng-module/arch/x86/kvm/mmutrace.h | 20 ++++++++++++++++++-
|
||||
probes/lttng-probe-kvm-x86-mmu.c | 5 +++++
|
||||
2 files changed, 24 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
|
||||
index e5470400..86717835 100644
|
||||
--- a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
|
||||
+++ b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
|
||||
@@ -163,7 +163,25 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kvm_mmu_page_class, kvm_mmu_prepare_zap_page,
|
||||
TP_ARGS(sp)
|
||||
)
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
|
||||
+
|
||||
+LTTNG_TRACEPOINT_EVENT_MAP(
|
||||
+ mark_mmio_spte,
|
||||
+
|
||||
+ kvm_mmu_mark_mmio_spte,
|
||||
+
|
||||
+ TP_PROTO(u64 *sptep, gfn_t gfn, u64 spte),
|
||||
+ TP_ARGS(sptep, gfn, spte),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer_hex(void *, sptep, sptep)
|
||||
+ ctf_integer(gfn_t, gfn, gfn)
|
||||
+ ctf_integer(unsigned, access, spte & ACC_ALL)
|
||||
+ ctf_integer(unsigned int, gen, get_mmio_spte_generation(spte))
|
||||
+ )
|
||||
+)
|
||||
+
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_MAP(
|
||||
mark_mmio_spte,
|
||||
diff --git a/probes/lttng-probe-kvm-x86-mmu.c b/probes/lttng-probe-kvm-x86-mmu.c
|
||||
index 8f981865..5043c776 100644
|
||||
--- a/probes/lttng-probe-kvm-x86-mmu.c
|
||||
+++ b/probes/lttng-probe-kvm-x86-mmu.c
|
||||
@@ -31,6 +31,11 @@
|
||||
#include <../../arch/x86/kvm/mmutrace.h>
|
||||
#endif
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
|
||||
+#include <../arch/x86/kvm/mmu.h>
|
||||
+#include <../arch/x86/kvm/mmu/spte.h>
|
||||
+#endif
|
||||
+
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
#undef TRACE_INCLUDE_FILE
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
From 14bbccffa579f4d66e2900843d6afae1294ce7c8 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Mon, 26 Oct 2020 17:07:13 -0400
|
||||
Subject: [PATCH 08/16] fix: KVM: x86/mmu: Return unique RET_PF_* values if the
|
||||
fault was fixed (v5.10)
|
||||
|
||||
See upstream commit :
|
||||
|
||||
commit c4371c2a682e0da1ed2cd7e3c5496f055d873554
|
||||
Author: Sean Christopherson <sean.j.christopherson@intel.com>
|
||||
Date: Wed Sep 23 15:04:24 2020 -0700
|
||||
|
||||
KVM: x86/mmu: Return unique RET_PF_* values if the fault was fixed
|
||||
|
||||
Introduce RET_PF_FIXED and RET_PF_SPURIOUS to provide unique return
|
||||
values instead of overloading RET_PF_RETRY. In the short term, the
|
||||
unique values add clarity to the code and RET_PF_SPURIOUS will be used
|
||||
by set_spte() to avoid unnecessary work for spurious faults.
|
||||
|
||||
In the long term, TDX will use RET_PF_FIXED to deterministically map
|
||||
memory during pre-boot. The page fault flow may bail early for benign
|
||||
reasons, e.g. if the mmu_notifier fires for an unrelated address. With
|
||||
only RET_PF_RETRY, it's impossible for the caller to distinguish between
|
||||
"cool, page is mapped" and "darn, need to try again", and thus cannot
|
||||
handle benign cases like the mmu_notifier retry.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Change-Id: Ie0855c78852b45f588e131fe2463e15aae1bc023
|
||||
---
|
||||
.../lttng-module/arch/x86/kvm/mmutrace.h | 22 ++++++++++++++++++-
|
||||
1 file changed, 21 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
|
||||
index 86717835..cdf0609f 100644
|
||||
--- a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
|
||||
+++ b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
|
||||
@@ -233,7 +233,27 @@ LTTNG_TRACEPOINT_EVENT_MAP(
|
||||
)
|
||||
)
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) || \
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
|
||||
+LTTNG_TRACEPOINT_EVENT_MAP(
|
||||
+ fast_page_fault,
|
||||
+
|
||||
+ kvm_mmu_fast_page_fault,
|
||||
+
|
||||
+ TP_PROTO(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa, u32 error_code,
|
||||
+ u64 *sptep, u64 old_spte, int ret),
|
||||
+ TP_ARGS(vcpu, cr2_or_gpa, error_code, sptep, old_spte, ret),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer(int, vcpu_id, vcpu->vcpu_id)
|
||||
+ ctf_integer(gpa_t, cr2_or_gpa, cr2_or_gpa)
|
||||
+ ctf_integer(u32, error_code, error_code)
|
||||
+ ctf_integer_hex(u64 *, sptep, sptep)
|
||||
+ ctf_integer(u64, old_spte, old_spte)
|
||||
+ ctf_integer(u64, new_spte, *sptep)
|
||||
+ ctf_integer(int, ret, ret)
|
||||
+ )
|
||||
+)
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) || \
|
||||
LTTNG_KERNEL_RANGE(4,19,103, 4,20,0) || \
|
||||
LTTNG_KERNEL_RANGE(5,4,19, 5,5,0) || \
|
||||
LTTNG_KERNEL_RANGE(5,5,3, 5,6,0) || \
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
From c6b31b349fe901a8f586a66064f9e9b15449ac1c Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Mon, 26 Oct 2020 17:09:05 -0400
|
||||
Subject: [PATCH 09/16] fix: tracepoint: Optimize using static_call() (v5.10)
|
||||
|
||||
See upstream commit :
|
||||
|
||||
commit d25e37d89dd2f41d7acae0429039d2f0ae8b4a07
|
||||
Author: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||
Date: Tue Aug 18 15:57:52 2020 +0200
|
||||
|
||||
tracepoint: Optimize using static_call()
|
||||
|
||||
Currently the tracepoint site will iterate a vector and issue indirect
|
||||
calls to however many handlers are registered (ie. the vector is
|
||||
long).
|
||||
|
||||
Using static_call() it is possible to optimize this for the common
|
||||
case of only having a single handler registered. In this case the
|
||||
static_call() can directly call this handler. Otherwise, if the vector
|
||||
is longer than 1, call a function that iterates the whole vector like
|
||||
the current code.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Change-Id: I739dd84d62cc1a821b8bd8acff74fa29aa25d22f
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
---
|
||||
lttng-statedump-impl.c | 44 ++++++++++++++++++++++++++++++++-------
|
||||
probes/lttng.c | 7 +++++--
|
||||
tests/probes/lttng-test.c | 7 ++++++-
|
||||
wrapper/tracepoint.h | 8 +++++++
|
||||
4 files changed, 56 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c
|
||||
index 54a309d1..e0b19b42 100644
|
||||
--- a/lttng-statedump-impl.c
|
||||
+++ b/lttng-statedump-impl.c
|
||||
@@ -55,13 +55,43 @@
|
||||
#define LTTNG_INSTRUMENTATION
|
||||
#include <instrumentation/events/lttng-module/lttng-statedump.h>
|
||||
|
||||
-DEFINE_TRACE(lttng_statedump_block_device);
|
||||
-DEFINE_TRACE(lttng_statedump_end);
|
||||
-DEFINE_TRACE(lttng_statedump_interrupt);
|
||||
-DEFINE_TRACE(lttng_statedump_file_descriptor);
|
||||
-DEFINE_TRACE(lttng_statedump_start);
|
||||
-DEFINE_TRACE(lttng_statedump_process_state);
|
||||
-DEFINE_TRACE(lttng_statedump_network_interface);
|
||||
+LTTNG_DEFINE_TRACE(lttng_statedump_block_device,
|
||||
+ TP_PROTO(struct lttng_session *session,
|
||||
+ dev_t dev, const char *diskname),
|
||||
+ TP_ARGS(session, dev, diskname));
|
||||
+
|
||||
+LTTNG_DEFINE_TRACE(lttng_statedump_end,
|
||||
+ TP_PROTO(struct lttng_session *session),
|
||||
+ TP_ARGS(session));
|
||||
+
|
||||
+LTTNG_DEFINE_TRACE(lttng_statedump_interrupt,
|
||||
+ TP_PROTO(struct lttng_session *session,
|
||||
+ unsigned int irq, const char *chip_name,
|
||||
+ struct irqaction *action),
|
||||
+ TP_ARGS(session, irq, chip_name, action));
|
||||
+
|
||||
+LTTNG_DEFINE_TRACE(lttng_statedump_file_descriptor,
|
||||
+ TP_PROTO(struct lttng_session *session,
|
||||
+ struct files_struct *files,
|
||||
+ int fd, const char *filename,
|
||||
+ unsigned int flags, fmode_t fmode),
|
||||
+ TP_ARGS(session, files, fd, filename, flags, fmode));
|
||||
+
|
||||
+LTTNG_DEFINE_TRACE(lttng_statedump_start,
|
||||
+ TP_PROTO(struct lttng_session *session),
|
||||
+ TP_ARGS(session));
|
||||
+
|
||||
+LTTNG_DEFINE_TRACE(lttng_statedump_process_state,
|
||||
+ TP_PROTO(struct lttng_session *session,
|
||||
+ struct task_struct *p,
|
||||
+ int type, int mode, int submode, int status,
|
||||
+ struct files_struct *files),
|
||||
+ TP_ARGS(session, p, type, mode, submode, status, files));
|
||||
+
|
||||
+LTTNG_DEFINE_TRACE(lttng_statedump_network_interface,
|
||||
+ TP_PROTO(struct lttng_session *session,
|
||||
+ struct net_device *dev, struct in_ifaddr *ifa),
|
||||
+ TP_ARGS(session, dev, ifa));
|
||||
|
||||
struct lttng_fd_ctx {
|
||||
char *page;
|
||||
diff --git a/probes/lttng.c b/probes/lttng.c
|
||||
index 05bc1388..7ddaa69f 100644
|
||||
--- a/probes/lttng.c
|
||||
+++ b/probes/lttng.c
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
-#include <linux/tracepoint.h>
|
||||
+#include <wrapper/tracepoint.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <linux/fs.h>
|
||||
@@ -32,7 +32,10 @@
|
||||
#define LTTNG_LOGGER_COUNT_MAX 1024
|
||||
#define LTTNG_LOGGER_FILE "lttng-logger"
|
||||
|
||||
-DEFINE_TRACE(lttng_logger);
|
||||
+LTTNG_DEFINE_TRACE(lttng_logger,
|
||||
+ PARAMS(const char __user *text, size_t len),
|
||||
+ PARAMS(text, len)
|
||||
+);
|
||||
|
||||
static struct proc_dir_entry *lttng_logger_dentry;
|
||||
|
||||
diff --git a/tests/probes/lttng-test.c b/tests/probes/lttng-test.c
|
||||
index c728bed5..8f2d3feb 100644
|
||||
--- a/tests/probes/lttng-test.c
|
||||
+++ b/tests/probes/lttng-test.c
|
||||
@@ -26,7 +26,12 @@
|
||||
#define LTTNG_INSTRUMENTATION
|
||||
#include <instrumentation/events/lttng-module/lttng-test.h>
|
||||
|
||||
-DEFINE_TRACE(lttng_test_filter_event);
|
||||
+LTTNG_DEFINE_TRACE(lttng_test_filter_event,
|
||||
+ PARAMS(int anint, int netint, long *values,
|
||||
+ char *text, size_t textlen,
|
||||
+ char *etext, uint32_t * net_values),
|
||||
+ PARAMS(anint, netint, values, text, textlen, etext, net_values)
|
||||
+);
|
||||
|
||||
#define LTTNG_TEST_FILTER_EVENT_FILE "lttng-test-filter-event"
|
||||
|
||||
diff --git a/wrapper/tracepoint.h b/wrapper/tracepoint.h
|
||||
index 3883e11a..758038b6 100644
|
||||
--- a/wrapper/tracepoint.h
|
||||
+++ b/wrapper/tracepoint.h
|
||||
@@ -20,6 +20,14 @@
|
||||
|
||||
#endif
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
|
||||
+#define LTTNG_DEFINE_TRACE(name, proto, args) \
|
||||
+ DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
|
||||
+#else
|
||||
+#define LTTNG_DEFINE_TRACE(name, proto, args) \
|
||||
+ DEFINE_TRACE(name)
|
||||
+#endif
|
||||
+
|
||||
#ifndef HAVE_KABI_2635_TRACEPOINT
|
||||
|
||||
#define kabi_2635_tracepoint_probe_register tracepoint_probe_register
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
From 2ce89d35c9477d8c17c00489c72e1548e16af9b9 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Fri, 20 Nov 2020 11:42:30 -0500
|
||||
Subject: [PATCH 10/16] fix: include order for older kernels
|
||||
|
||||
Fixes a build failure on v3.0 and v3.1.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Change-Id: Ic48512d2aa5ee46678e67d147b92dba6d0959615
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
---
|
||||
lttng-events.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/lttng-events.h b/lttng-events.h
|
||||
index 099fd78b..f5cc57c6 100644
|
||||
--- a/lttng-events.h
|
||||
+++ b/lttng-events.h
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <linux/kref.h>
|
||||
#include <lttng-cpuhotplug.h>
|
||||
#include <linux/uuid.h>
|
||||
+#include <linux/irq_work.h>
|
||||
#include <wrapper/uprobes.h>
|
||||
#include <lttng-tracer.h>
|
||||
#include <lttng-abi.h>
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
From 22ffa48439e617a32556365e00827fba062c5688 Mon Sep 17 00:00:00 2001
|
||||
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Date: Mon, 23 Nov 2020 10:49:57 -0500
|
||||
Subject: [PATCH 11/16] Add release maintainer script
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
---
|
||||
scripts/maintainer/do-release.sh | 37 ++++++++++++++++++++++++++++++++
|
||||
1 file changed, 37 insertions(+)
|
||||
create mode 100755 scripts/maintainer/do-release.sh
|
||||
|
||||
diff --git a/scripts/maintainer/do-release.sh b/scripts/maintainer/do-release.sh
|
||||
new file mode 100755
|
||||
index 00000000..e0cec167
|
||||
--- /dev/null
|
||||
+++ b/scripts/maintainer/do-release.sh
|
||||
@@ -0,0 +1,37 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+# invoke with do-release 2.N.M, or 2.N.M-rcXX
|
||||
+
|
||||
+REL=$1
|
||||
+SRCDIR=~/git/lttng-modules
|
||||
+# The output files are created in ${HOME}/stable/
|
||||
+OUTPUTDIR=${HOME}/stable
|
||||
+
|
||||
+if [ x"$1" = x"" ]; then
|
||||
+ echo "1 arg : VERSION";
|
||||
+ exit 1;
|
||||
+fi
|
||||
+
|
||||
+cd ${OUTPUTDIR}
|
||||
+
|
||||
+echo Doing LTTng modules release ${REL}
|
||||
+
|
||||
+mkdir lttng-modules-${REL}
|
||||
+cd lttng-modules-${REL}
|
||||
+cp -ax ${SRCDIR}/. .
|
||||
+
|
||||
+#cleanup
|
||||
+make clean
|
||||
+git clean -xdf
|
||||
+
|
||||
+for a in \*.orig \*.rej Module.markers Module.symvers; do
|
||||
+ find . -name "${a}" -exec rm '{}' \;;
|
||||
+done
|
||||
+for a in outgoing .tmp_versions .git .pc; do
|
||||
+ find . -name "${a}" -exec rm -rf '{}' \;;
|
||||
+done
|
||||
+
|
||||
+cd ..
|
||||
+tar cvfj lttng-modules-${REL}.tar.bz2 lttng-modules-${REL}
|
||||
+mksums lttng-modules-${REL}.tar.bz2
|
||||
+signpkg lttng-modules-${REL}.tar.bz2
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
From a241d30fa82ed0be1026f14e36e8bd2b0e65740d Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Mon, 23 Nov 2020 12:15:43 -0500
|
||||
Subject: [PATCH 12/16] Improve the release script
|
||||
|
||||
* Use git-archive, this removes all custom code to cleanup the repo, it
|
||||
can now be used in an unclean repo as the code will be exported from
|
||||
a specific tag.
|
||||
* Add parameters, this will allow using the script on any machine
|
||||
while keeping the default behavior for the maintainer.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Change-Id: I9f29d0e1afdbf475d0bbaeb9946ca3216f725e86
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
---
|
||||
.gitattributes | 3 +
|
||||
scripts/maintainer/do-release.sh | 121 +++++++++++++++++++++++++------
|
||||
2 files changed, 100 insertions(+), 24 deletions(-)
|
||||
create mode 100644 .gitattributes
|
||||
|
||||
diff --git a/.gitattributes b/.gitattributes
|
||||
new file mode 100644
|
||||
index 00000000..7839355a
|
||||
--- /dev/null
|
||||
+++ b/.gitattributes
|
||||
@@ -0,0 +1,3 @@
|
||||
+.gitattributes export-ignore
|
||||
+.gitignore export-ignore
|
||||
+.gitreview export-ignore
|
||||
diff --git a/scripts/maintainer/do-release.sh b/scripts/maintainer/do-release.sh
|
||||
index e0cec167..5e94e136 100755
|
||||
--- a/scripts/maintainer/do-release.sh
|
||||
+++ b/scripts/maintainer/do-release.sh
|
||||
@@ -1,37 +1,110 @@
|
||||
-#!/bin/sh
|
||||
+#!/bin/bash
|
||||
+
|
||||
+set -eu
|
||||
+set -o pipefail
|
||||
|
||||
# invoke with do-release 2.N.M, or 2.N.M-rcXX
|
||||
|
||||
-REL=$1
|
||||
-SRCDIR=~/git/lttng-modules
|
||||
+# Default maintainer values
|
||||
+SRCDIR="${HOME}/git/lttng-modules"
|
||||
# The output files are created in ${HOME}/stable/
|
||||
-OUTPUTDIR=${HOME}/stable
|
||||
+OUTPUTDIR="${HOME}/stable"
|
||||
+SIGN="yes"
|
||||
+VERBOSE=""
|
||||
+
|
||||
+usage() {
|
||||
+ echo "Usage: do-release.sh [OPTION]... RELEASE"
|
||||
+ echo
|
||||
+ echo "Mandatory arguments to long options are mandatory for short options too."
|
||||
+ echo " -s, --srcdir DIR source directory"
|
||||
+ echo " -o, --outputdir DIR output directory, must exist"
|
||||
+ echo " -n, --no-sign don't GPG sign the output archive"
|
||||
+ echo " -v, --verbose verbose command output"
|
||||
+}
|
||||
+
|
||||
+POS_ARGS=()
|
||||
+while [[ $# -gt 0 ]]
|
||||
+do
|
||||
+ arg="$1"
|
||||
+
|
||||
+ case $arg in
|
||||
+ -n|--no-sign)
|
||||
+ SIGN="no"
|
||||
+ shift 1
|
||||
+ ;;
|
||||
+
|
||||
+ -s|--srcdir)
|
||||
+ SRCDIR="$2"
|
||||
+ shift 2
|
||||
+ ;;
|
||||
+
|
||||
+ -o|--outputdir)
|
||||
+ OUTPUTDIR="$2"
|
||||
+ shift 2
|
||||
+ ;;
|
||||
+
|
||||
+ -v|--verbose)
|
||||
+ VERBOSE="-v"
|
||||
+ shift 1
|
||||
+ ;;
|
||||
+
|
||||
+ # Catch unknown arguments
|
||||
+ -*)
|
||||
+ usage
|
||||
+ exit 1
|
||||
+ ;;
|
||||
+
|
||||
+ *)
|
||||
+ POS_ARGS+=("$1")
|
||||
+ shift
|
||||
+ ;;
|
||||
+ esac
|
||||
+done
|
||||
+set -- "${POS_ARGS[@]}"
|
||||
|
||||
-if [ x"$1" = x"" ]; then
|
||||
- echo "1 arg : VERSION";
|
||||
+REL=${1:-}
|
||||
+
|
||||
+if [ x"${REL}" = x"" ]; then
|
||||
+ usage
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
-cd ${OUTPUTDIR}
|
||||
+echo "Doing LTTng modules release ${REL}"
|
||||
+echo " Source dir: ${SRCDIR}"
|
||||
+echo " Output dir: ${OUTPUTDIR}"
|
||||
+echo " GPG sign: ${SIGN}"
|
||||
|
||||
-echo Doing LTTng modules release ${REL}
|
||||
+# Make sure the output directory exists
|
||||
+if [ ! -d "${OUTPUTDIR}" ]; then
|
||||
+ echo "Output directory '${OUTPUTDIR}' doesn't exist."
|
||||
+ exit 1
|
||||
+fi
|
||||
|
||||
-mkdir lttng-modules-${REL}
|
||||
-cd lttng-modules-${REL}
|
||||
-cp -ax ${SRCDIR}/. .
|
||||
+# Make sure the source directory is a git repository
|
||||
+if [ ! -r "${SRCDIR}/.git/config" ]; then
|
||||
+ echo "Source directory '${SRCDIR}' isn't a git repository."
|
||||
+ exit 1
|
||||
+fi
|
||||
|
||||
-#cleanup
|
||||
-make clean
|
||||
-git clean -xdf
|
||||
+# Set the git repo directory for all further git commands
|
||||
+export GIT_DIR="${SRCDIR}/.git/"
|
||||
|
||||
-for a in \*.orig \*.rej Module.markers Module.symvers; do
|
||||
- find . -name "${a}" -exec rm '{}' \;;
|
||||
-done
|
||||
-for a in outgoing .tmp_versions .git .pc; do
|
||||
- find . -name "${a}" -exec rm -rf '{}' \;;
|
||||
-done
|
||||
+# Check if the release tag exists
|
||||
+if ! git rev-parse "refs/tags/v${REL}" >/dev/null 2>&1; then
|
||||
+ echo "Release tag 'v${REL}' doesn't exist."
|
||||
+ exit 1
|
||||
+fi
|
||||
+
|
||||
+# Generate the compressed tar archive, the git attributes from the tag will be used.
|
||||
+git archive $VERBOSE --format=tar --prefix="lttng-modules-${REL}/" "v${REL}" | bzip2 > "${OUTPUTDIR}/lttng-modules-${REL}.tar.bz2"
|
||||
|
||||
-cd ..
|
||||
-tar cvfj lttng-modules-${REL}.tar.bz2 lttng-modules-${REL}
|
||||
-mksums lttng-modules-${REL}.tar.bz2
|
||||
-signpkg lttng-modules-${REL}.tar.bz2
|
||||
+pushd "${OUTPUTDIR}" >/dev/null
|
||||
+# Generate the hashes
|
||||
+md5sum "lttng-modules-${REL}.tar.bz2" > "lttng-modules-${REL}.tar.bz2.md5"
|
||||
+sha256sum "lttng-modules-${REL}.tar.bz2" > "lttng-modules-${REL}.tar.bz2.sha256"
|
||||
+
|
||||
+if [ "x${SIGN}" = "xyes" ]; then
|
||||
+ # Sign with the default key
|
||||
+ gpg --armor -b "lttng-modules-${REL}.tar.bz2"
|
||||
+fi
|
||||
+popd >/dev/null
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From 59fcc704bea8ecf4bd401e744df41e3331359524 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Mon, 23 Nov 2020 10:19:52 -0500
|
||||
Subject: [PATCH 13/16] fix: backport of fix: ext4: fast commit recovery path
|
||||
(v5.10)
|
||||
|
||||
Add missing '#endif'.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Change-Id: I43349d685d7ed740b32ce992be0c2e7e6f12c799
|
||||
---
|
||||
instrumentation/events/lttng-module/ext4.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/instrumentation/events/lttng-module/ext4.h b/instrumentation/events/lttng-module/ext4.h
|
||||
index 5fddccad..d454fa6e 100644
|
||||
--- a/instrumentation/events/lttng-module/ext4.h
|
||||
+++ b/instrumentation/events/lttng-module/ext4.h
|
||||
@@ -1446,6 +1446,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_load_inode,
|
||||
)
|
||||
)
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From b2df75dd378ce5260bb51872e43ac1d76fbf4588 Mon Sep 17 00:00:00 2001
|
||||
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Date: Mon, 23 Nov 2020 14:21:51 -0500
|
||||
Subject: [PATCH 14/16] Revert "fix: include order for older kernels"
|
||||
|
||||
This reverts commit 2ce89d35c9477d8c17c00489c72e1548e16af9b9.
|
||||
|
||||
This commit is only needed for master and stable-2.12, because
|
||||
stable-2.11 does not include irq_work.h.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
---
|
||||
lttng-events.h | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/lttng-events.h b/lttng-events.h
|
||||
index f5cc57c6..099fd78b 100644
|
||||
--- a/lttng-events.h
|
||||
+++ b/lttng-events.h
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <linux/kref.h>
|
||||
#include <lttng-cpuhotplug.h>
|
||||
#include <linux/uuid.h>
|
||||
-#include <linux/irq_work.h>
|
||||
#include <wrapper/uprobes.h>
|
||||
#include <lttng-tracer.h>
|
||||
#include <lttng-abi.h>
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
From f8922333020aaa267e17fb23180b56c4c16ebe9e Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Tue, 24 Nov 2020 11:11:42 -0500
|
||||
Subject: [PATCH 15/16] fix: backport of fix: tracepoint: Optimize using
|
||||
static_call() (v5.10)
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Change-Id: I94f2b845f11654e639f03254185980de527a4ca8
|
||||
---
|
||||
lttng-statedump-impl.c | 9 ++++-----
|
||||
1 file changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c
|
||||
index e0b19b42..a8c32db5 100644
|
||||
--- a/lttng-statedump-impl.c
|
||||
+++ b/lttng-statedump-impl.c
|
||||
@@ -72,10 +72,9 @@ LTTNG_DEFINE_TRACE(lttng_statedump_interrupt,
|
||||
|
||||
LTTNG_DEFINE_TRACE(lttng_statedump_file_descriptor,
|
||||
TP_PROTO(struct lttng_session *session,
|
||||
- struct files_struct *files,
|
||||
- int fd, const char *filename,
|
||||
+ struct task_struct *p, int fd, const char *filename,
|
||||
unsigned int flags, fmode_t fmode),
|
||||
- TP_ARGS(session, files, fd, filename, flags, fmode));
|
||||
+ TP_ARGS(session, p, fd, filename, flags, fmode));
|
||||
|
||||
LTTNG_DEFINE_TRACE(lttng_statedump_start,
|
||||
TP_PROTO(struct lttng_session *session),
|
||||
@@ -85,8 +84,8 @@ LTTNG_DEFINE_TRACE(lttng_statedump_process_state,
|
||||
TP_PROTO(struct lttng_session *session,
|
||||
struct task_struct *p,
|
||||
int type, int mode, int submode, int status,
|
||||
- struct files_struct *files),
|
||||
- TP_ARGS(session, p, type, mode, submode, status, files));
|
||||
+ struct pid_namespace *pid_ns),
|
||||
+ TP_ARGS(session, p, type, mode, submode, status, pid_ns));
|
||||
|
||||
LTTNG_DEFINE_TRACE(lttng_statedump_network_interface,
|
||||
TP_PROTO(struct lttng_session *session,
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
From 5c3e67d7994097cc75f45258b7518aacb55dde1b Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Tue, 24 Nov 2020 11:27:18 -0500
|
||||
Subject: [PATCH 16/16] fix: adjust version range for trace_find_free_extent()
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Change-Id: Iaa6088092cf58b4d29d55f3ff9586c57ae272302
|
||||
---
|
||||
instrumentation/events/lttng-module/btrfs.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h
|
||||
index d47f3280..efe7af96 100644
|
||||
--- a/instrumentation/events/lttng-module/btrfs.h
|
||||
+++ b/instrumentation/events/lttng-module/btrfs.h
|
||||
@@ -1917,7 +1917,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_f
|
||||
#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0) || \
|
||||
- LTTNG_KERNEL_RANGE(5,9,6, 5,10,0) || \
|
||||
+ LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \
|
||||
LTTNG_KERNEL_RANGE(5,4,78, 5,5,0))
|
||||
LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
fix: jbd2: use the correct print format
|
||||
See upstream commit :
|
||||
|
||||
commit d87a7b4c77a997d5388566dd511ca8e6b8e8a0a8
|
||||
Author: Bixuan Cui <cuibixuan@linux.alibaba.com>
|
||||
Date: Tue Oct 11 19:33:44 2022 +0800
|
||||
|
||||
jbd2: use the correct print format
|
||||
|
||||
The print format error was found when using ftrace event:
|
||||
<...>-1406 [000] .... 23599442.895823: jbd2_end_commit: dev 252,8 transaction -1866216965 sync 0 head -1866217368
|
||||
<...>-1406 [000] .... 23599442.896299: jbd2_start_commit: dev 252,8 transaction -1866216964 sync 0
|
||||
|
||||
Use the correct print format for transaction, head and tid.
|
||||
|
||||
Change-Id: Ic053f0e0c1e24ebc75bae51d07696aaa5e1c0094
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
|
||||
Upstream-status: Backport
|
||||
Signed-off-by: Steve Sakoman <steve@sakoman.com>
|
||||
Note: combines three upstream commits:
|
||||
https://github.com/lttng/lttng-modules/commit/b28830a0dcdf95ec3e6b390b4d032667deaad0c0
|
||||
https://github.com/lttng/lttng-modules/commit/4fd2615b87b3cac0fd5bdc5fc82db05f6fcfdecf
|
||||
https://github.com/lttng/lttng-modules/commit/612c99eb24bf72f4d47d02025e92de8c35ece14e
|
||||
|
||||
diff --git a/instrumentation/events/lttng-module/jbd2.h b/instrumentation/events/lttng-module/jbd2.h
|
||||
--- a/instrumentation/events/lttng-module/jbd2.h
|
||||
+++ b/instrumentation/events/lttng-module/jbd2.h
|
||||
@@ -29,6 +29,25 @@ LTTNG_TRACEPOINT_EVENT(jbd2_checkpoint,
|
||||
)
|
||||
)
|
||||
|
||||
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0) \
|
||||
+ || LTTNG_KERNEL_RANGE(5,4,229, 5,5,0) \
|
||||
+ || LTTNG_KERNEL_RANGE(5,10,163, 5,11,0) \
|
||||
+ || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \
|
||||
+ || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \
|
||||
+ || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0))
|
||||
+LTTNG_TRACEPOINT_EVENT_CLASS(jbd2_commit,
|
||||
+
|
||||
+ TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
|
||||
+
|
||||
+ TP_ARGS(journal, commit_transaction),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
|
||||
+ ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit)
|
||||
+ ctf_integer(tid_t, transaction, commit_transaction->t_tid)
|
||||
+ )
|
||||
+)
|
||||
+#else
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(jbd2_commit,
|
||||
|
||||
TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
|
||||
@@ -41,6 +60,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(jbd2_commit
|
||||
ctf_integer(int, transaction, commit_transaction->t_tid)
|
||||
)
|
||||
)
|
||||
+#endif
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_commit, jbd2_start_commit,
|
||||
|
||||
@@ -79,6 +99,25 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_com
|
||||
)
|
||||
#endif
|
||||
|
||||
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0) \
|
||||
+ || LTTNG_KERNEL_RANGE(5,4,229, 5,5,0) \
|
||||
+ || LTTNG_KERNEL_RANGE(5,10,163, 5,11,0) \
|
||||
+ || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \
|
||||
+ || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \
|
||||
+ || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0))
|
||||
+LTTNG_TRACEPOINT_EVENT(jbd2_end_commit,
|
||||
+ TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
|
||||
+
|
||||
+ TP_ARGS(journal, commit_transaction),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
|
||||
+ ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit)
|
||||
+ ctf_integer(tid_t, transaction, commit_transaction->t_tid)
|
||||
+ ctf_integer(tid_t, head, journal->j_tail_sequence)
|
||||
+ )
|
||||
+)
|
||||
+#else
|
||||
LTTNG_TRACEPOINT_EVENT(jbd2_end_commit,
|
||||
TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
|
||||
|
||||
@@ -91,6 +130,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_end_commit,
|
||||
ctf_integer(int, head, journal->j_tail_sequence)
|
||||
)
|
||||
)
|
||||
+#endif
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT(jbd2_submit_inode_data,
|
||||
TP_PROTO(struct inode *inode),
|
||||
@@ -103,7 +143,48 @@ LTTNG_TRACEPOINT_EVENT(jbd2_submit_inode
|
||||
)
|
||||
)
|
||||
|
||||
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,32))
|
||||
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0) \
|
||||
+ || LTTNG_KERNEL_RANGE(5,4,229, 5,5,0) \
|
||||
+ || LTTNG_KERNEL_RANGE(5,10,163, 5,11,0) \
|
||||
+ || LTTNG_KERNEL_RANGE(5,15,87, 5,16,0) \
|
||||
+ || LTTNG_KERNEL_RANGE(6,0,18, 6,1,0) \
|
||||
+ || LTTNG_KERNEL_RANGE(6,1,4, 6,2,0))
|
||||
+LTTNG_TRACEPOINT_EVENT(jbd2_run_stats,
|
||||
+ TP_PROTO(dev_t dev, tid_t tid,
|
||||
+ struct transaction_run_stats_s *stats),
|
||||
+
|
||||
+ TP_ARGS(dev, tid, stats),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer(dev_t, dev, dev)
|
||||
+ ctf_integer(tid_t, tid, tid)
|
||||
+ ctf_integer(unsigned long, wait, stats->rs_wait)
|
||||
+ ctf_integer(unsigned long, running, stats->rs_running)
|
||||
+ ctf_integer(unsigned long, locked, stats->rs_locked)
|
||||
+ ctf_integer(unsigned long, flushing, stats->rs_flushing)
|
||||
+ ctf_integer(unsigned long, logging, stats->rs_logging)
|
||||
+ ctf_integer(__u32, handle_count, stats->rs_handle_count)
|
||||
+ ctf_integer(__u32, blocks, stats->rs_blocks)
|
||||
+ ctf_integer(__u32, blocks_logged, stats->rs_blocks_logged)
|
||||
+ )
|
||||
+)
|
||||
+
|
||||
+LTTNG_TRACEPOINT_EVENT(jbd2_checkpoint_stats,
|
||||
+ TP_PROTO(dev_t dev, tid_t tid,
|
||||
+ struct transaction_chp_stats_s *stats),
|
||||
+
|
||||
+ TP_ARGS(dev, tid, stats),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer(dev_t, dev, dev)
|
||||
+ ctf_integer(tid_t, tid, tid)
|
||||
+ ctf_integer(unsigned long, chp_time, stats->cs_chp_time)
|
||||
+ ctf_integer(__u32, forced_to_close, stats->cs_forced_to_close)
|
||||
+ ctf_integer(__u32, written, stats->cs_written)
|
||||
+ ctf_integer(__u32, dropped, stats->cs_dropped)
|
||||
+ )
|
||||
+)
|
||||
+#else
|
||||
LTTNG_TRACEPOINT_EVENT(jbd2_run_stats,
|
||||
TP_PROTO(dev_t dev, unsigned long tid,
|
||||
struct transaction_run_stats_s *stats),
|
||||
@@ -12,29 +12,14 @@ COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux'
|
||||
SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
|
||||
file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
|
||||
file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
|
||||
file://0001-fix-strncpy-equals-destination-size-warning.patch \
|
||||
file://0002-fix-objtool-Rename-frame.h-objtool.h-v5.10.patch \
|
||||
file://0003-fix-btrfs-tracepoints-output-proper-root-owner-for-t.patch \
|
||||
file://0004-fix-btrfs-make-ordered-extent-tracepoint-take-btrfs_.patch \
|
||||
file://0005-fix-ext4-fast-commit-recovery-path-v5.10.patch \
|
||||
file://0006-fix-KVM-x86-Add-intr-vectoring-info-and-error-code-t.patch \
|
||||
file://0007-fix-kvm-x86-mmu-Add-TDP-MMU-PF-handler-v5.10.patch \
|
||||
file://0008-fix-KVM-x86-mmu-Return-unique-RET_PF_-values-if-the-.patch \
|
||||
file://0009-fix-tracepoint-Optimize-using-static_call-v5.10.patch \
|
||||
file://0010-fix-include-order-for-older-kernels.patch \
|
||||
file://0011-Add-release-maintainer-script.patch \
|
||||
file://0012-Improve-the-release-script.patch \
|
||||
file://0013-fix-backport-of-fix-ext4-fast-commit-recovery-path-v.patch \
|
||||
file://0014-Revert-fix-include-order-for-older-kernels.patch \
|
||||
file://0015-fix-backport-of-fix-tracepoint-Optimize-using-static.patch \
|
||||
file://0016-fix-adjust-version-range-for-trace_find_free_extent.patch \
|
||||
file://0017-fix-random-remove-unused-tracepoints-v5.18.patch \
|
||||
file://0018-fix-random-remove-unused-tracepoints-v5.10-v5.15.patch \
|
||||
file://0019-fix-random-tracepoints-removed-in-stable-kernels.patch \
|
||||
file://fix-jbd2-use-the-correct-print-format.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "8ef09fdfcdec669d33f7fc1c1c80f2c4"
|
||||
SRC_URI[sha256sum] = "23372811cdcd2ac28ba8c9d09484ed5f9238cfbd0043f8c663ff3875ba9c8566"
|
||||
SRC_URI[md5sum] = "cfb23ea6bdaf1ad40c7f9ac098b4016d"
|
||||
SRC_URI[sha256sum] = "0c5fe9f8d8dbd1411a3c1c643dcbd0a55577bd15845758b73948e00bc7c387a6"
|
||||
|
||||
export INSTALL_MOD_DIR="kernel/lttng-modules"
|
||||
|
||||
41
meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2022-3109.patch
Normal file
41
meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2022-3109.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
From 656cb0450aeb73b25d7d26980af342b37ac4c568 Mon Sep 17 00:00:00 2001
|
||||
From: Jiasheng Jiang <jiasheng@iscas.ac.cn>
|
||||
Date: Tue, 15 Feb 2022 17:58:08 +0800
|
||||
Subject: [PATCH] avcodec/vp3: Add missing check for av_malloc
|
||||
|
||||
Since the av_malloc() may fail and return NULL pointer,
|
||||
it is needed that the 's->edge_emu_buffer' should be checked
|
||||
whether the new allocation is success.
|
||||
|
||||
Fixes: d14723861b ("VP3: fix decoding of videos with stride > 2048")
|
||||
|
||||
CVE: CVE-2022-3109
|
||||
Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/656cb0450aeb73b25d7d26980af342b37ac4c568]
|
||||
Comments: Refreshed hunk
|
||||
|
||||
Reviewed-by: Peter Ross <pross@xvid.org>
|
||||
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
|
||||
Signed-off-by: Bhabu Bindu <bhabu.bindu@kpit.com>
|
||||
---
|
||||
libavcodec/vp3.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
|
||||
index e9ab54d73677..e2418eb6fa04 100644
|
||||
--- a/libavcodec/vp3.c
|
||||
+++ b/libavcodec/vp3.c
|
||||
@@ -2740,8 +2740,13 @@
|
||||
if (ff_thread_get_buffer(avctx, &s->current_frame, AV_GET_BUFFER_FLAG_REF) < 0)
|
||||
goto error;
|
||||
|
||||
- if (!s->edge_emu_buffer)
|
||||
+ if (!s->edge_emu_buffer) {
|
||||
s->edge_emu_buffer = av_malloc(9 * FFABS(s->current_frame.f->linesize[0]));
|
||||
+ if (!s->edge_emu_buffer) {
|
||||
+ ret = AVERROR(ENOMEM);
|
||||
+ goto error;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if (s->keyframe) {
|
||||
if (!s->theora) {
|
||||
@@ -30,6 +30,7 @@ SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
|
||||
file://CVE-2021-3566.patch \
|
||||
file://CVE-2021-38291.patch \
|
||||
file://CVE-2022-1475.patch \
|
||||
file://CVE-2022-3109.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "348956fc2faa57a2f79bbb84ded9fbc3"
|
||||
SRC_URI[sha256sum] = "cb754255ab0ee2ea5f66f8850e1bd6ad5cac1cd855d0a2f4990fb8c668b0d29c"
|
||||
|
||||
@@ -20,8 +20,8 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
|
||||
file://no-path-adjust.patch \
|
||||
"
|
||||
|
||||
PV .= ".0947"
|
||||
SRCREV = "cc762a48d42b579fb7bdec2c614636b830342dd5"
|
||||
PV .= ".1211"
|
||||
SRCREV = "f7d1c6e1884c76680980571f1cf15e0928d247b5"
|
||||
|
||||
# Remove when 8.3 is out
|
||||
UPSTREAM_VERSION_UNKNOWN = "1"
|
||||
|
||||
@@ -357,7 +357,7 @@ def _move_file(src, dst, dry_run_outdir=None, base_outdir=None):
|
||||
bb.utils.mkdirhier(dst_d)
|
||||
shutil.move(src, dst)
|
||||
|
||||
def _copy_file(src, dst, dry_run_outdir=None):
|
||||
def _copy_file(src, dst, dry_run_outdir=None, base_outdir=None):
|
||||
"""Copy a file. Creates all the directory components of destination path."""
|
||||
dry_run_suffix = ' (dry-run)' if dry_run_outdir else ''
|
||||
logger.debug('Copying %s to %s%s' % (src, dst, dry_run_suffix))
|
||||
|
||||
Reference in New Issue
Block a user