Sync with portage [Thu Nov 2 08:40:35 MSK 2017].

mhiretskiy 1003
root 6 years ago
parent e161f081be
commit 64fa2527e4

@ -11,7 +11,7 @@ SRC_URI="http://download.augeas.net/${P}.tar.gz"
SLOT="0"
LICENSE="LGPL-2.1"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86"
IUSE="static-libs test"
RDEPEND="

@ -1,2 +1,3 @@
DIST mcollective-2.11.2.tar.gz 1516590 SHA256 aa3664d5ba2d4d20e448c374c315c91d55b5bb43918a04092747a4052bc3f969 SHA512 1dc393fa1a09c5151b64b84086ef9af934feeebd2700a00cc4c84696fa2a25d90a410a373b553198f5fda6e1e36808ffb8dc38edcb15bb9e4253998aa7504439 WHIRLPOOL f808d4f9ffbf733842dd29f8e0548b90a4705f8b502dcc62509380b013d69de786204025490d4fb67d657e5c6597fb0d3ffdac2724e8dbca6347511ef50be54a
DIST mcollective-2.11.3.tar.gz 1516665 SHA256 b9080779fa56c2b77a3f37404b3ac933183e0b0940e6086b0060be2c44aa38d3 SHA512 f5e26dff03f7a671db5de12acba1ce726c8d57fb99831ddbb258da5ba297ade31ea991840fa63cb1ba261281f7f6167a8492c8764a13cc332202ccb9c88d79b8 WHIRLPOOL 69e384489c8138aecc0c404dc9a08e5d92e09deab05a43ab4781b77506f4fe6f3bbd1a9ec9399a59e8a7c89d3462d3062d73a50fae490215628826c2794bd9ff
DIST mcollective-2.11.4.tar.gz 1517194 SHA256 2bf8425a50023744e28f26efd64931d6383b216e9918e1df49276bc5477e4493 SHA512 56af0a8b64ff75351f3448396f8a7cbba603869cdbfa7a97dde5a820e2e287c84e410a77469a3ce01f398858f5c6570c9e3542e372eaa00e3f54e68e3c1ce63b WHIRLPOOL 4e6bed8bbfbd9bf08c3380891321dd2fb673ffd4408acdd0e63c14ca3896d07014f6b034814f98ba89b52818522d49f4ad95d114cb940966ae13409f16ce9365

@ -0,0 +1,60 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
USE_RUBY="ruby21 ruby22 ruby23"
inherit ruby-ng
DESCRIPTION="Framework to build server orchestration or parallel job execution
systems"
HOMEPAGE="https://docs.puppet.com/mcollective/"
SRC_URI="https://github.com/puppetlabs/marionette-collective/archive/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/all/marionette-collective-${PV}"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc +client"
DEPEND=""
RDEPEND="dev-ruby/stomp"
src_compile() {
einfo "nothing to compile"
}
each_ruby_install() {
cd "marionette-collective-${PV}"
doruby -r lib/*
insinto /usr/share/mcollective
use client && dosbin bin/mco
dosbin bin/mcollectived
if use doc ; then
dohtml -r doc/*
insinto /usr/share/doc/${P}/ext
doins -r ext/*
fi
newinitd "${FILESDIR}"/mcollectived.initd mcollectived
insinto /etc/mcollective
cd etc
for cfg in *.dist ; do
newins "${cfg}" "${cfg%%.dist}"
sed -i -e "s:^libdir.*:libdir = /usr/share/mcollective/plugins:" \
"${D}"/etc/mcollective/${cfg%%.dist} || die "sed failed"
done
insinto /etc/mcollective/plugin.d
}
pkg_postinst() {
einfo "Mcollective requires a stomp server installed and functioning before"
einfo "you can use it. The recommended server to use is ActiveMQ [1] but"
einfo "any other stomp compatible server should work."
einfo
einfo "It is recommended you read the \'getting started\' guide [2] if this"
einfo "is a new installation"
einfo
einfo "[1] https://activemq.apache.org/"
einfo "[2] https://code.google.com/p/mcollective/wiki/GettingStarted"
}

@ -1,3 +1,4 @@
DIST sshguard-1.7.1.tar.gz 832220 SHA256 2e527589c9b33219222d827dff63974229d044de945729aa47271c4a29aaa195 SHA512 205f45f0f1260ebf2a1efabe5b4391b23c219f37df096383d87c220e7392cf58827a4e509be65287bac5b2af49fa0fc390775e1472cff4fb28f2323821f00fd1 WHIRLPOOL 2810c8c77d623dd21baace30bcd4c20efe1f7544e0db3a8abe84ca823e4cc391ecde072d56e63e10c2a490d1417e18fcd9cae16692ac72fffbf216a23036798e
DIST sshguard-2.0.0.tar.gz 886995 SHA256 e87c6c4a6dddf06f440ea76464eb6197869c0293f0a60ffa51f8a6a0d7b0cb06 SHA512 c9f7ef4b8d4b1ecbcee33b95e013c51f37b4a05226c6cd1f3c85006c83a32cf555644069d529a7317dcf6616f86a399d7338a5a414238de05bd41dc3005488e4 WHIRLPOOL 9ee1dc00c8f5571b3f36575e793a263dd70fa61f23c52bb446df5ffcddae981adbf7eb3c9dd6ad3894c1e434293297ab4894537a697df6282678ff5ebb5c3af9
DIST sshguard-2.0.99.tar.gz 1110725 SHA256 189b99b582ac70e2130402493b205b3608893301b49cedec84aa36c80ae2a308 SHA512 776a241b7af9a4afb048c99791202c0bf0f5130e265116a0f049853f8eb3d108e056c75f9dc009cf93a0dffe8d34b18b6fddc63febd54cc35bb6e71d6d2e77bb WHIRLPOOL 7905324d09974790412d16f3da775fb03f76cb0e4802268e78fd09e59c1586c290a3b70b820b833ebb9f7f9e0184bd1c91784d38036c36a65f5796f998529ba9
DIST sshguard-2.1.0.tar.gz 1117466 SHA256 21252a4834ad8408df384ee4ddf468624aa9de9cead5afde1c77380a48cf028a SHA512 0a75e9d1a8c9c010c767a49e96e88db4a92aae8d428deebcff1ce8befa36b77cb1937f2fcb2a4e2a3e86d47896a8405265eb30ee7a603fc18a3ee117d646b119 WHIRLPOOL 35b44288ae78740b8c3f52ae1851ca0058bc9b3f33de61b7cb06690b970b60ce61d009b38fb91a543a12e0dbf3526ab7e448722d0446ebd51a2af2abf02aedb0

@ -0,0 +1,37 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
DESCRIPTION="protects hosts from brute force attacks against ssh"
HOMEPAGE="http://sshguard.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~x86-fbsd"
DEPEND="
sys-devel/flex
"
RDEPEND="
virtual/logger
"
DOCS=(
CHANGELOG.rst
CONTRIBUTING.rst
README.rst
examples/net.sshguard.plist
examples/sshguard.service
examples/whitelistfile.example
)
src_install() {
default
newinitd "${FILESDIR}"/${PN}.initd ${PN}
newconfd "${FILESDIR}"/${PN}.confd ${PN}
insinto /etc
newins examples/sshguard.conf.sample sshguard.conf
}

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@ -14,7 +14,7 @@ SRC_URI="http://git.liw.fi/cgi-bin/cgit/cgit.cgi/obnam/snapshot/${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
KEYWORDS=""
IUSE=""
DEPEND="${PYTHON_DEPS}

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@ -14,7 +14,7 @@ SRC_URI="http://git.liw.fi/cgi-bin/cgit/cgit.cgi/obnam/snapshot/${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
KEYWORDS=""
IUSE=""
DEPEND="${PYTHON_DEPS}

@ -14,7 +14,7 @@ SRC_URI="http://git.liw.fi/cgi-bin/cgit/cgit.cgi/obnam/snapshot/${P}.tar.xz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
KEYWORDS=""
IUSE=""
DEPEND="${PYTHON_DEPS}

@ -1,6 +1,2 @@
DIST certbot-0.15.0.tar.gz 942788 SHA256 87d306b1c013b472b8f548b38ccc476c125816435bb3b99e932fed09ac777296 SHA512 e884b34985a1128ce94d6b2be77af6ee86ded8b870e066f3f4bc22f78501f3f0a51060edcf75a11cd31dd525388adb8ccc4e2da0068b5b75be131d0fb0ca6844 WHIRLPOOL 01b172e8c7ac5d3678ee608b36d93f23943bf17f1e9c593cc1af3febcf0549b03961e69e537f099643dd9ee268497f76c2c18d8fa7a1d45753bc50e670375317
DIST certbot-0.16.0.tar.gz 992700 SHA256 9abac759d7d72b520693ff806479e87609059a1546bb6ea26416267ebeedd25b SHA512 4cb6ec06c6ec71cd6886a716100f269de3922f17a582c8c20ec40327b65e1c16347a5b33d44131e56a7667233ebba88ff36a4e854beedd13e848897ba09a7e64 WHIRLPOOL 34dae0b20d472b4020986d0768ea6757c977fa4626666a9f81711007c051e76f9ad60f5a3bc77c768975e71a791f20e5ca2bb6f2fc41d809ebe2541129c975ef
DIST certbot-0.17.0.tar.gz 1036099 SHA256 ed4334dce166bf38ecc7218449efda3798d62c7e2934a71702c0dc3d78eccdd1 SHA512 57fa830d19173eacdbb17242a3c446d9414f02e09fab6ccd41c82b15156bc103ec358ff3d515e94881fcf6438f6acfe449eee9bb3108df41f7b8f2395500b549 WHIRLPOOL cbfffc3866ffed3e0c702ac686768e879c7f1306a62dc050aab05e5a207b4f77a4acae9ca8f3ce973a6691d98838a488ab6335aa0692dd2b28a99c8aecff232d
DIST certbot-0.18.2.tar.gz 1044019 SHA256 c8a94e3e2dfa8efa379912a8dc67f561cf6daf7d8e13dbb76b40a38cfb40c08d SHA512 30dea063cf8d4bd714a40c1a82a7f4aab51e3a7d4de0d5f9a923f95badb2881562562c4a198da6a4c3cd1db7f9e2d124c2def70f3a245faca0040438586bf6a4 WHIRLPOOL 79105ea9d54fdd42dbb4327dd3afa7beb80e5a13eef0a1d3236f5150b42281b299a06391a93372c80a04f0bd962565522e3ddd239cd4d2186e32262fedf97481
DIST certbot-0.19.0.tar.gz 1061557 SHA256 164b496cc111f19619da1eac9e3fe03baac5ad5a97c2fa19eeffe07273c4b723 SHA512 d29c9e2041171f2574bf2ee9ff7442b80b261a03f9e82e4dd40aad0617730aca6bff17fcc728496bda4133f86a4894cf21d083dacb0d0df2dec11d23e4e1541b WHIRLPOOL 203f00121dfc95136821dcbe224419b02f4f03aa1bfaf1d5516baa7f3e43aa898f30488026a18ffb27d238c5603892df8fca059d0670993f6b72b27af7ac82a1
DIST letsencrypt-0.1.0.tar.gz 524821 SHA256 1c1ac7b41e5e0fc0e41a7ef159ac9147a4aafff54453d57b519eb05bf52ade14 SHA512 6a786290362741ac97dcb4b59bc4cba56f3e8b5193bbc10be19086d462f76e6124259c42bac36afe9eb818f4bb9edec34f8e2a02bd8c855e3b35404f4ee81f96 WHIRLPOOL cdc41a3466de54ab8ddfeedea9935205d78383028769dcfbc876be0c2ef80c2d14f5d0e4a9c56a751163718f5ababb07848822989a060de7031ea8ebdf6424a0

@ -1,42 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=(python{2_7,3_4,3_5})
if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://github.com/letsencrypt/letsencrypt.git"
inherit git-r3
KEYWORDS=""
S=${WORKDIR}/${P}/${PN}
else
SRC_URI="https://github.com/letsencrypt/letsencrypt/archive/v${PV}.tar.gz -> letsencrypt-${PV}.tar.gz"
KEYWORDS="~amd64"
S=${WORKDIR}/letsencrypt-${PV}/acme
fi
inherit distutils-r1
DESCRIPTION="An implementation of the ACME protocol"
HOMEPAGE="https://github.com/letsencrypt/letsencrypt https://letsencrypt.org/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
RDEPEND=">=dev-python/cryptography-0.8[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
>=dev-python/ndg-httpsclient-0.4[${PYTHON_USEDEP}]
dev-python/pyasn1[${PYTHON_USEDEP}]
>=dev-python/pyopenssl-0.15[${PYTHON_USEDEP}]
dev-python/pyrfc3339[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
dev-python/werkzeug[${PYTHON_USEDEP}]"
DEPEND="test? ( ${RDEPEND} dev-python/nose[${PYTHON_USEDEP}] )
dev-python/setuptools[${PYTHON_USEDEP}]"
python_test() {
nosetests -w ${PN} || die
}

@ -1,38 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=(python{2_7,3_4,3_5,3_6})
if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://github.com/certbot/certbot.git"
inherit git-r3
S=${WORKDIR}/${P}/${PN}
else
SRC_URI="https://github.com/certbot/certbot/archive/v${PV}.tar.gz -> certbot-${PV}.tar.gz"
KEYWORDS="~amd64 ~arm ~x86"
S=${WORKDIR}/certbot-${PV}/acme
fi
inherit distutils-r1
DESCRIPTION="An implementation of the ACME protocol"
HOMEPAGE="https://github.com/certbot/certbot https://letsencrypt.org/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
RDEPEND=">=dev-python/cryptography-0.8[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
>=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
dev-python/pyrfc3339[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
>=dev-python/requests-2.10[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]"
DEPEND="test? ( ${RDEPEND} dev-python/nose[${PYTHON_USEDEP}] )
>=dev-python/setuptools-1.0[${PYTHON_USEDEP}]"
python_test() {
nosetests -w ${PN} || die
}

@ -1,38 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=(python{2_7,3_4,3_5,3_6})
if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://github.com/certbot/certbot.git"
inherit git-r3
S=${WORKDIR}/${P}/${PN}
else
SRC_URI="https://github.com/certbot/certbot/archive/v${PV}.tar.gz -> certbot-${PV}.tar.gz"
KEYWORDS="~amd64 ~arm ~x86"
S=${WORKDIR}/certbot-${PV}/acme
fi
inherit distutils-r1
DESCRIPTION="An implementation of the ACME protocol"
HOMEPAGE="https://github.com/certbot/certbot https://letsencrypt.org/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
RDEPEND=">=dev-python/cryptography-0.8[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
>=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
dev-python/pyrfc3339[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
>=dev-python/requests-2.10[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]"
DEPEND="test? ( ${RDEPEND} dev-python/nose[${PYTHON_USEDEP}] )
>=dev-python/setuptools-1.0[${PYTHON_USEDEP}]"
python_test() {
nosetests -w ${PN} || die
}

@ -1,38 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=(python{2_7,3_4,3_5,3_6})
if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://github.com/certbot/certbot.git"
inherit git-r3
S=${WORKDIR}/${P}/${PN}
else
SRC_URI="https://github.com/certbot/certbot/archive/v${PV}.tar.gz -> certbot-${PV}.tar.gz"
KEYWORDS="~amd64 ~arm ~x86"
S=${WORKDIR}/certbot-${PV}/acme
fi
inherit distutils-r1
DESCRIPTION="An implementation of the ACME protocol"
HOMEPAGE="https://github.com/certbot/certbot https://letsencrypt.org/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
RDEPEND=">=dev-python/cryptography-0.8[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
>=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
dev-python/pyrfc3339[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
>=dev-python/requests-2.10[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]"
DEPEND="test? ( ${RDEPEND} dev-python/nose[${PYTHON_USEDEP}] )
>=dev-python/setuptools-1.0[${PYTHON_USEDEP}]"
python_test() {
nosetests -w ${PN} || die
}

@ -10,7 +10,7 @@ if [[ ${PV} == 9999* ]]; then
S=${WORKDIR}/${P}/${PN}
else
SRC_URI="https://github.com/certbot/certbot/archive/v${PV}.tar.gz -> certbot-${PV}.tar.gz"
KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
KEYWORDS="amd64 ~arm ~ppc64 x86"
S=${WORKDIR}/certbot-${PV}/acme
fi

@ -29,7 +29,7 @@ RDEPEND=">=dev-python/cryptography-0.8[${PYTHON_USEDEP}]
dev-python/pyrfc3339[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
>=dev-python/requests-2.10[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]"
>=dev-python/six-1.9.0[${PYTHON_USEDEP}]"
DEPEND="test? ( ${RDEPEND} dev-python/nose[${PYTHON_USEDEP}] )
>=dev-python/setuptools-1.0[${PYTHON_USEDEP}]"

@ -1,4 +1,2 @@
DIST certbot-0.15.0.tar.gz 942788 SHA256 87d306b1c013b472b8f548b38ccc476c125816435bb3b99e932fed09ac777296 SHA512 e884b34985a1128ce94d6b2be77af6ee86ded8b870e066f3f4bc22f78501f3f0a51060edcf75a11cd31dd525388adb8ccc4e2da0068b5b75be131d0fb0ca6844 WHIRLPOOL 01b172e8c7ac5d3678ee608b36d93f23943bf17f1e9c593cc1af3febcf0549b03961e69e537f099643dd9ee268497f76c2c18d8fa7a1d45753bc50e670375317
DIST certbot-0.17.0.tar.gz 1036099 SHA256 ed4334dce166bf38ecc7218449efda3798d62c7e2934a71702c0dc3d78eccdd1 SHA512 57fa830d19173eacdbb17242a3c446d9414f02e09fab6ccd41c82b15156bc103ec358ff3d515e94881fcf6438f6acfe449eee9bb3108df41f7b8f2395500b549 WHIRLPOOL cbfffc3866ffed3e0c702ac686768e879c7f1306a62dc050aab05e5a207b4f77a4acae9ca8f3ce973a6691d98838a488ab6335aa0692dd2b28a99c8aecff232d
DIST certbot-0.18.2.tar.gz 1044019 SHA256 c8a94e3e2dfa8efa379912a8dc67f561cf6daf7d8e13dbb76b40a38cfb40c08d SHA512 30dea063cf8d4bd714a40c1a82a7f4aab51e3a7d4de0d5f9a923f95badb2881562562c4a198da6a4c3cd1db7f9e2d124c2def70f3a245faca0040438586bf6a4 WHIRLPOOL 79105ea9d54fdd42dbb4327dd3afa7beb80e5a13eef0a1d3236f5150b42281b299a06391a93372c80a04f0bd962565522e3ddd239cd4d2186e32262fedf97481
DIST certbot-0.19.0.tar.gz 1061557 SHA256 164b496cc111f19619da1eac9e3fe03baac5ad5a97c2fa19eeffe07273c4b723 SHA512 d29c9e2041171f2574bf2ee9ff7442b80b261a03f9e82e4dd40aad0617730aca6bff17fcc728496bda4133f86a4894cf21d083dacb0d0df2dec11d23e4e1541b WHIRLPOOL 203f00121dfc95136821dcbe224419b02f4f03aa1bfaf1d5516baa7f3e43aa898f30488026a18ffb27d238c5603892df8fca059d0670993f6b72b27af7ac82a1

@ -1,38 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=(python{2_7,3_4,3_5,3_6})
if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://github.com/certbot/certbot.git"
inherit git-r3
S=${WORKDIR}/${P}/${PN}
else
SRC_URI="https://github.com/${PN%-apache}/${PN%-apache}/archive/v${PV}.tar.gz -> ${PN%-apache}-${PV}.tar.gz"
KEYWORDS="~amd64"
S=${WORKDIR}/${PN%-apache}-${PV}/${PN}
fi
inherit distutils-r1
DESCRIPTION="Apache plugin for certbot (Let's Encrypt Client)"
HOMEPAGE="https://github.com/certbot/certbot https://letsencrypt.org/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
RDEPEND="~app-crypt/certbot-${PV}[${PYTHON_USEDEP}]
~app-crypt/acme-${PV}[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dev-python/python-augeas[${PYTHON_USEDEP}]
dev-python/zope-component[${PYTHON_USEDEP}]
dev-python/zope-interface[${PYTHON_USEDEP}]"
DEPEND="test? ( ${RDEPEND}
dev-python/nose[${PYTHON_USEDEP}] )
dev-python/setuptools[${PYTHON_USEDEP}]"
python_test() {
nosetests || die
}

@ -1,38 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=(python{2_7,3_4,3_5,3_6})
if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://github.com/certbot/certbot.git"
inherit git-r3
S=${WORKDIR}/${P}/${PN}
else
SRC_URI="https://github.com/${PN%-apache}/${PN%-apache}/archive/v${PV}.tar.gz -> ${PN%-apache}-${PV}.tar.gz"
KEYWORDS="~amd64"
S=${WORKDIR}/${PN%-apache}-${PV}/${PN}
fi
inherit distutils-r1
DESCRIPTION="Apache plugin for certbot (Let's Encrypt Client)"
HOMEPAGE="https://github.com/certbot/certbot https://letsencrypt.org/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
RDEPEND="~app-crypt/certbot-${PV}[${PYTHON_USEDEP}]
~app-crypt/acme-${PV}[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dev-python/python-augeas[${PYTHON_USEDEP}]
dev-python/zope-component[${PYTHON_USEDEP}]
dev-python/zope-interface[${PYTHON_USEDEP}]"
DEPEND="test? ( ${RDEPEND}
dev-python/nose[${PYTHON_USEDEP}] )
dev-python/setuptools[${PYTHON_USEDEP}]"
python_test() {
nosetests || die
}

@ -10,7 +10,7 @@ if [[ ${PV} == 9999* ]]; then
S=${WORKDIR}/${P}/${PN}
else
SRC_URI="https://github.com/${PN%-apache}/${PN%-apache}/archive/v${PV}.tar.gz -> ${PN%-apache}-${PV}.tar.gz"
KEYWORDS="~amd64 ~x86"
KEYWORDS="amd64 x86"
S=${WORKDIR}/${PN%-apache}-${PV}/${PN}
fi

@ -1,4 +1,2 @@
DIST certbot-0.15.0.tar.gz 942788 SHA256 87d306b1c013b472b8f548b38ccc476c125816435bb3b99e932fed09ac777296 SHA512 e884b34985a1128ce94d6b2be77af6ee86ded8b870e066f3f4bc22f78501f3f0a51060edcf75a11cd31dd525388adb8ccc4e2da0068b5b75be131d0fb0ca6844 WHIRLPOOL 01b172e8c7ac5d3678ee608b36d93f23943bf17f1e9c593cc1af3febcf0549b03961e69e537f099643dd9ee268497f76c2c18d8fa7a1d45753bc50e670375317
DIST certbot-0.17.0.tar.gz 1036099 SHA256 ed4334dce166bf38ecc7218449efda3798d62c7e2934a71702c0dc3d78eccdd1 SHA512 57fa830d19173eacdbb17242a3c446d9414f02e09fab6ccd41c82b15156bc103ec358ff3d515e94881fcf6438f6acfe449eee9bb3108df41f7b8f2395500b549 WHIRLPOOL cbfffc3866ffed3e0c702ac686768e879c7f1306a62dc050aab05e5a207b4f77a4acae9ca8f3ce973a6691d98838a488ab6335aa0692dd2b28a99c8aecff232d
DIST certbot-0.18.2.tar.gz 1044019 SHA256 c8a94e3e2dfa8efa379912a8dc67f561cf6daf7d8e13dbb76b40a38cfb40c08d SHA512 30dea063cf8d4bd714a40c1a82a7f4aab51e3a7d4de0d5f9a923f95badb2881562562c4a198da6a4c3cd1db7f9e2d124c2def70f3a245faca0040438586bf6a4 WHIRLPOOL 79105ea9d54fdd42dbb4327dd3afa7beb80e5a13eef0a1d3236f5150b42281b299a06391a93372c80a04f0bd962565522e3ddd239cd4d2186e32262fedf97481
DIST certbot-0.19.0.tar.gz 1061557 SHA256 164b496cc111f19619da1eac9e3fe03baac5ad5a97c2fa19eeffe07273c4b723 SHA512 d29c9e2041171f2574bf2ee9ff7442b80b261a03f9e82e4dd40aad0617730aca6bff17fcc728496bda4133f86a4894cf21d083dacb0d0df2dec11d23e4e1541b WHIRLPOOL 203f00121dfc95136821dcbe224419b02f4f03aa1bfaf1d5516baa7f3e43aa898f30488026a18ffb27d238c5603892df8fca059d0670993f6b72b27af7ac82a1

@ -1,34 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=(python{2_7,3_4,3_5,3_6})
if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://github.com/certbot/certbot.git"
inherit git-r3
S=${WORKDIR}/${P}/${PN}
else
SRC_URI="https://github.com/${PN%-nginx}/${PN%-nginx}/archive/v${PV}.tar.gz -> ${PN%-nginx}-${PV}.tar.gz"
KEYWORDS="~amd64 ~arm"
S=${WORKDIR}/${PN%-nginx}-${PV}/${PN}
fi
inherit distutils-r1
DESCRIPTION="Nginx plugin for certbot (Let's Encrypt Client)"
HOMEPAGE="https://github.com/certbot/certbot https://letsencrypt.org/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE=""
CDEPEND=">=dev-python/setuptools-1.0[${PYTHON_USEDEP}]"
RDEPEND="${CDEPEND}
~app-crypt/certbot-${PV}[${PYTHON_USEDEP}]
~app-crypt/acme-${PV}[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dev-python/pyopenssl[${PYTHON_USEDEP}]
>=dev-python/pyparsing-1.5.5[${PYTHON_USEDEP}]
dev-python/zope-interface[${PYTHON_USEDEP}]"
DEPEND="${CDEPEND}"

@ -1,34 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=(python{2_7,3_4,3_5,3_6})
if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://github.com/certbot/certbot.git"
inherit git-r3
S=${WORKDIR}/${P}/${PN}
else
SRC_URI="https://github.com/${PN%-nginx}/${PN%-nginx}/archive/v${PV}.tar.gz -> ${PN%-nginx}-${PV}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
S=${WORKDIR}/${PN%-nginx}-${PV}/${PN}
fi
inherit distutils-r1
DESCRIPTION="Nginx plugin for certbot (Let's Encrypt Client)"
HOMEPAGE="https://github.com/certbot/certbot https://letsencrypt.org/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE=""
CDEPEND=">=dev-python/setuptools-1.0[${PYTHON_USEDEP}]"
RDEPEND="${CDEPEND}
~app-crypt/certbot-${PV}[${PYTHON_USEDEP}]
~app-crypt/acme-${PV}[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dev-python/pyopenssl[${PYTHON_USEDEP}]
>=dev-python/pyparsing-1.5.5[${PYTHON_USEDEP}]
dev-python/zope-interface[${PYTHON_USEDEP}]"
DEPEND="${CDEPEND}"

@ -10,7 +10,7 @@ if [[ ${PV} == 9999* ]]; then
S=${WORKDIR}/${P}/${PN}
else
SRC_URI="https://github.com/${PN%-nginx}/${PN%-nginx}/archive/v${PV}.tar.gz -> ${PN%-nginx}-${PV}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
KEYWORDS="amd64 ~arm ~arm64 x86"
S=${WORKDIR}/${PN%-nginx}-${PV}/${PN}
fi

@ -1,4 +1,2 @@
DIST certbot-0.15.0.tar.gz 942788 SHA256 87d306b1c013b472b8f548b38ccc476c125816435bb3b99e932fed09ac777296 SHA512 e884b34985a1128ce94d6b2be77af6ee86ded8b870e066f3f4bc22f78501f3f0a51060edcf75a11cd31dd525388adb8ccc4e2da0068b5b75be131d0fb0ca6844 WHIRLPOOL 01b172e8c7ac5d3678ee608b36d93f23943bf17f1e9c593cc1af3febcf0549b03961e69e537f099643dd9ee268497f76c2c18d8fa7a1d45753bc50e670375317
DIST certbot-0.17.0.tar.gz 1036099 SHA256 ed4334dce166bf38ecc7218449efda3798d62c7e2934a71702c0dc3d78eccdd1 SHA512 57fa830d19173eacdbb17242a3c446d9414f02e09fab6ccd41c82b15156bc103ec358ff3d515e94881fcf6438f6acfe449eee9bb3108df41f7b8f2395500b549 WHIRLPOOL cbfffc3866ffed3e0c702ac686768e879c7f1306a62dc050aab05e5a207b4f77a4acae9ca8f3ce973a6691d98838a488ab6335aa0692dd2b28a99c8aecff232d
DIST certbot-0.18.2.tar.gz 1044019 SHA256 c8a94e3e2dfa8efa379912a8dc67f561cf6daf7d8e13dbb76b40a38cfb40c08d SHA512 30dea063cf8d4bd714a40c1a82a7f4aab51e3a7d4de0d5f9a923f95badb2881562562c4a198da6a4c3cd1db7f9e2d124c2def70f3a245faca0040438586bf6a4 WHIRLPOOL 79105ea9d54fdd42dbb4327dd3afa7beb80e5a13eef0a1d3236f5150b42281b299a06391a93372c80a04f0bd962565522e3ddd239cd4d2186e32262fedf97481
DIST certbot-0.19.0.tar.gz 1061557 SHA256 164b496cc111f19619da1eac9e3fe03baac5ad5a97c2fa19eeffe07273c4b723 SHA512 d29c9e2041171f2574bf2ee9ff7442b80b261a03f9e82e4dd40aad0617730aca6bff17fcc728496bda4133f86a4894cf21d083dacb0d0df2dec11d23e4e1541b WHIRLPOOL 203f00121dfc95136821dcbe224419b02f4f03aa1bfaf1d5516baa7f3e43aa898f30488026a18ffb27d238c5603892df8fca059d0670993f6b72b27af7ac82a1

@ -1,52 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=(python{2_7,3_4,3_5,3_6})
if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://github.com/certbot/certbot.git"
inherit git-r3
else
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~x86"
fi
inherit distutils-r1
DESCRIPTION="Let's encrypt client to automate deployment of X.509 certificates"
HOMEPAGE="https://github.com/certbot/certbot https://letsencrypt.org/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
CDEPEND=">=dev-python/setuptools-1.0[${PYTHON_USEDEP}]"
RDEPEND="
${CDEPEND}
~app-crypt/acme-${PV}[${PYTHON_USEDEP}]
>=dev-python/configargparse-0.9.3[${PYTHON_USEDEP}]
dev-python/configobj[${PYTHON_USEDEP}]
>=dev-python/cryptography-1.2[${PYTHON_USEDEP}]
>=dev-python/parsedatetime-1.3[${PYTHON_USEDEP}]
dev-python/pyopenssl[${PYTHON_USEDEP}]
dev-python/pyrfc3339[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
dev-python/zope-component[${PYTHON_USEDEP}]
dev-python/zope-interface[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]"
DEPEND="
${CDEPEND}
test? (
>=dev-python/astroid-1.3.5[${PYTHON_USEDEP}]
dev-python/coverage[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}]
dev-python/pep8[${PYTHON_USEDEP}]
>=dev-python/pylint-1.4.2[${PYTHON_USEDEP}]
dev-python/wheel[${PYTHON_USEDEP}]
)"
python_test() {
nosetests -v ${PN} || die
}

@ -1,52 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=(python{2_7,3_4,3_5,3_6})
if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://github.com/certbot/certbot.git"
inherit git-r3
else
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~x86"
fi
inherit distutils-r1
DESCRIPTION="Let's encrypt client to automate deployment of X.509 certificates"
HOMEPAGE="https://github.com/certbot/certbot https://letsencrypt.org/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
CDEPEND=">=dev-python/setuptools-1.0[${PYTHON_USEDEP}]"
RDEPEND="
${CDEPEND}
~app-crypt/acme-${PV}[${PYTHON_USEDEP}]
>=dev-python/configargparse-0.9.3[${PYTHON_USEDEP}]
dev-python/configobj[${PYTHON_USEDEP}]
>=dev-python/cryptography-1.2[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
>=dev-python/parsedatetime-1.3[${PYTHON_USEDEP}]
dev-python/pyopenssl[${PYTHON_USEDEP}]
dev-python/pyrfc3339[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
dev-python/zope-component[${PYTHON_USEDEP}]
dev-python/zope-interface[${PYTHON_USEDEP}]"
DEPEND="
${CDEPEND}
test? (
>=dev-python/astroid-1.3.5[${PYTHON_USEDEP}]
dev-python/coverage[${PYTHON_USEDEP}]
dev-python/ipdb[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}]
>=dev-python/pylint-1.4.2[${PYTHON_USEDEP}]
dev-python/wheel[${PYTHON_USEDEP}]
)"
python_test() {
nosetests -v ${PN} || die
}

@ -9,7 +9,7 @@ if [[ ${PV} == 9999* ]]; then
inherit git-r3
else
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
KEYWORDS="amd64 ~arm ~ppc64 x86"
fi
inherit distutils-r1

@ -28,21 +28,21 @@ RDEPEND="
>=dev-python/configargparse-0.9.3[${PYTHON_USEDEP}]
dev-python/configobj[${PYTHON_USEDEP}]
>=dev-python/cryptography-1.2[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
>=dev-python/parsedatetime-1.3[${PYTHON_USEDEP}]
dev-python/pyopenssl[${PYTHON_USEDEP}]
dev-python/pyrfc3339[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
dev-python/zope-component[${PYTHON_USEDEP}]
dev-python/zope-interface[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]"
dev-python/zope-interface[${PYTHON_USEDEP}]"
DEPEND="
${CDEPEND}
test? (
>=dev-python/astroid-1.3.5[${PYTHON_USEDEP}]
dev-python/coverage[${PYTHON_USEDEP}]
dev-python/ipdb[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}]
dev-python/pep8[${PYTHON_USEDEP}]
>=dev-python/pylint-1.4.2[${PYTHON_USEDEP}]
dev-python/wheel[${PYTHON_USEDEP}]
)"

@ -1,3 +1,2 @@
DIST gnome-dictionary-3.18.1.tar.xz 864460 SHA256 92cf2d519335b125018468c22405499fdb320e4446201c7b0f55f1a441bf05cc SHA512 efe4d1f8810bf218bae4d393be1d26938ed3a814ed22fb96c0bded5f874c32229b215351b08462eef1c92b756640a3d4e1c0f5ea1ee49f67e519bcf0d53aba74 WHIRLPOOL c20c73504e8ce0745170ec21296191d14770f252c80b208e4ac08659f80d2ece79cd2d408b4e3bdee992475a67be2ec77f4c16e501e8bbbebe8c0a95c3911e7b
DIST gnome-dictionary-3.20.0.tar.xz 871916 SHA256 efb36377d46eff9291d3b8fec37baab2355f9dc8bc7edb791b6a625574716121 SHA512 9be2564b5bf543e80afdb946c16b16e2daf6c31875e352b7c2d7e34436791fc9470eadb42eba3a4c1893e2f2568e6bb88d19ea4a0b8dbb2eca2dd4c95aeaf229 WHIRLPOOL 4c22c0b2f7f668f5efc3857ba4bf33808d52a524b4d8ccbe1ac91839daff97d7271cf5f8196c0fbaa47266bb83f9f0705c83d1fe5949f633bfa50269554e057f
DIST gnome-dictionary-3.24.0.tar.xz 878756 SHA256 41e7064a0cfab18e881a95ce9f1712ee5c9f426904b16f3bc04c35ebd1bbd9f2 SHA512 1c31149b02978a1840563941767e3ce2be4f6a5e790eb9126c0f0c50d932987f46447fe3bac0e2eb8ce87be1521d13e56d8a14e86407e367a6dd76cd5a77de30 WHIRLPOOL 3daf0e1efcf0783e6ad0d97877ff41037df0c257f60e95920d7dd1948a0f1c495964ee96497c826814d2e5a77a350da5eb0e5b6a49127065abd1264490f35010

@ -1,41 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
GCONF_DEBUG="yes"
inherit gnome2
DESCRIPTION="Dictionary utility for GNOME"
HOMEPAGE="https://wiki.gnome.org/Apps/Dictionary"
LICENSE="GPL-2+ LGPL-2.1+ FDL-1.1+"
SLOT="0/9" # subslot = suffix of libgdict-1.0.so
IUSE="+introspection ipv6"
KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
COMMON_DEPEND="
>=dev-libs/glib-2.39:2[dbus]
x11-libs/cairo:=
>=x11-libs/gtk+-3.14:3
x11-libs/pango
introspection? ( >=dev-libs/gobject-introspection-1.42:= )
"
RDEPEND="${COMMON_DEPEND}
gnome-base/gsettings-desktop-schemas
!<gnome-extra/gnome-utils-3.4
"
# ${PN} was part of gnome-utils before 3.4
DEPEND="${COMMON_DEPEND}
>=dev-util/gtk-doc-am-1.15
>=dev-util/intltool-0.40
dev-util/itstool
>=sys-devel/gettext-0.17
virtual/pkgconfig
"
src_configure() {
gnome2_src_configure \
$(use_enable introspection) \
$(use_enable ipv6)
}

@ -1,41 +0,0 @@
correctly initializes UID/GID values
gets UID correctly in light of user namespace API
origionally from https://462666.bugs.gentoo.org/attachment.cgi?id=342888
--- a/vmblock-only/linux/inode.c 2013-03-20 17:37:48.000000000 +0100
+++ b/vmblock-only/linux/inode.c 2013-03-20 17:41:22.000000000 +0100
@@ -135,7 +135,8 @@
inode->i_size = INODE_TO_IINFO(inode)->nameLen;
inode->i_version = 1;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
- inode->i_uid = inode->i_gid = 0;
+ inode->i_uid = GLOBAL_ROOT_UID;
+ inode->i_gid = GLOBAL_ROOT_GID;
inode->i_op = &LinkInodeOps;
d_add(dentry, inode);
--- a/vmci-only/linux/driver.c 2013-03-20 17:57:35.000000000 +0100
+++ b/vmci-only/linux/driver.c 2013-03-20 17:57:43.000000000 +0100
@@ -740,7 +740,7 @@
goto init_release;
}
- user = current_uid();
+ user = from_kuid(current_user_ns(), current_uid());
retval = VMCIContext_InitContext(initBlock.cid, initBlock.flags,
0 /* Unused */, vmciLinux->userVersion,
&user, &vmciLinux->context);
--- a/vsock-only/linux/af_vsock.c 2013-03-20 18:01:48.000000000 +0100
+++ b/vsock-only/linux/af_vsock.c 2013-03-20 18:01:58.000000000 +0100
@@ -2866,7 +2866,7 @@
vsk->connectTimeout = psk->connectTimeout;
} else {
vsk->trusted = capable(CAP_NET_ADMIN);
- vsk->owner = current_uid();
+ vsk->owner = from_kuid(current_user_ns(), current_uid());
vsk->queuePairSize = VSOCK_DEFAULT_QP_SIZE;
vsk->queuePairMinSize = VSOCK_DEFAULT_QP_SIZE_MIN;
vsk->queuePairMaxSize = VSOCK_DEFAULT_QP_SIZE_MAX;

@ -1,28 +0,0 @@
uses the new proc_create function to create /proc entries
instead of create_proc_entry which was deprecated:
https://lkml.org/lkml/2013/4/11/215
--- a/vmblock-only/linux/control.c 2013-05-21 19:21:19.165750556 +0200
+++ b/vmblock-only/linux/control.c 2013-05-21 19:22:18.363747723 +0200
@@ -208,9 +208,10 @@
VMBlockSetProcEntryOwner(controlProcMountpoint);
/* Create /proc/fs/vmblock/dev */
- controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME,
- VMBLOCK_CONTROL_MODE,
- controlProcDirEntry);
+ controlProcEntry = proc_create(VMBLOCK_CONTROL_DEVNAME,
+ VMBLOCK_CONTROL_MODE,
+ controlProcDirEntry,
+ &ControlFileOps);
if (!controlProcEntry) {
Warning("SetupProcDevice: could not create " VMBLOCK_DEVICE "\n");
remove_proc_entry(VMBLOCK_CONTROL_MOUNTPOINT, controlProcDirEntry);
@@ -218,7 +219,6 @@
return -EINVAL;
}
- controlProcEntry->proc_fops = &ControlFileOps;
return 0;
}

@ -1,24 +0,0 @@
uses __getname/__putname instead of getname. getname was deprecated
the new code calls __getname (which really is a specific type of
memory allocator, then copies the string safely from user space
into the allocated buffer
--- vmblock-only/linux/control.c 2014-03-15 15:28:40.871076076 +0100
+++ vmblock-only/linux/control.c.new 2014-03-15 15:29:15.079074439 +0100
@@ -279,11 +279,17 @@
int i;
int retval;
- name = getname(buf);
+ name = __getname();
if (IS_ERR(name)) {
return PTR_ERR(name);
}
+ i = strncpy_from_user(name, buf, PATH_MAX);
+ if (i < 0 || i == PATH_MAX) {
+ __putname(name);
+ return -EINVAL;
+ }
+
for (i = strlen(name) - 1; i >= 0 && name[i] == '/'; i--) {

@ -1,89 +0,0 @@
undefines DEPRECATED which is unfortunately also defined (as a string)
in <linux/printk.h>. Realistically, this macro isn't even used, so this
doesn't matter much. But it hushes some very loud warnings.
diff -rupN vmblock-only/shared/vm_assert.h vmblock-only.new/shared/vm_assert.h
--- vmblock-only/shared/vm_assert.h 2014-10-09 21:50:54.221159088 -0400
+++ vmblock-only.new/shared/vm_assert.h 2014-10-09 21:53:04.612166156 -0400
@@ -237,11 +237,13 @@ EXTERN void WarningThrottled(uint32 *cou
#define LOG_ONCE(_s) DO_ONCE(Log _s)
#ifdef VMX86_DEVEL
+ #undef DEPRECATED
#define DEPRECATED(_fix) DO_ONCE( \
Warning("%s:%d: %s is DEPRECATED; %s\n", \
__FILE__, __LINE__, __FUNCTION__, \
_fix))
#else
+ #undef DEPRECATED
#define DEPRECATED(_fix) do {} while (0)
#endif
diff -rupN vmci-only/shared/vm_assert.h vmci-only.new/shared/vm_assert.h
--- vmci-only/shared/vm_assert.h 2014-10-09 21:50:54.222159088 -0400
+++ vmci-only.new/shared/vm_assert.h 2014-10-09 21:52:52.348165492 -0400
@@ -237,11 +237,13 @@ EXTERN void WarningThrottled(uint32 *cou
#define LOG_ONCE(_s) DO_ONCE(Log _s)
#ifdef VMX86_DEVEL
+ #undef DEPRECATED
#define DEPRECATED(_fix) DO_ONCE( \
Warning("%s:%d: %s is DEPRECATED; %s\n", \
__FILE__, __LINE__, __FUNCTION__, \
_fix))
#else
+ #undef DEPRECATED
#define DEPRECATED(_fix) do {} while (0)
#endif
diff -rupN vmmon-only/include/vm_assert.h vmmon-only.new/include/vm_assert.h
--- vmmon-only/include/vm_assert.h 2014-10-09 21:50:54.222159088 -0400
+++ vmmon-only.new/include/vm_assert.h 2014-10-09 21:52:36.877164653 -0400
@@ -237,11 +237,13 @@ EXTERN void WarningThrottled(uint32 *cou
#define LOG_ONCE(_s) DO_ONCE(Log _s)
#ifdef VMX86_DEVEL
+ #undef DEPRECATED
#define DEPRECATED(_fix) DO_ONCE( \
Warning("%s:%d: %s is DEPRECATED; %s\n", \
__FILE__, __LINE__, __FUNCTION__, \
_fix))
#else
+ #undef DEPRECATED
#define DEPRECATED(_fix) do {} while (0)
#endif
diff -rupN vmnet-only/vm_assert.h vmnet-only.new/vm_assert.h
--- vmnet-only/vm_assert.h 2014-10-09 21:50:54.222159088 -0400
+++ vmnet-only.new/vm_assert.h 2014-10-09 21:52:57.736165784 -0400
@@ -237,11 +237,13 @@ EXTERN void WarningThrottled(uint32 *cou
#define LOG_ONCE(_s) DO_ONCE(Log _s)
#ifdef VMX86_DEVEL
+ #undef DEPRECATED
#define DEPRECATED(_fix) DO_ONCE( \
Warning("%s:%d: %s is DEPRECATED; %s\n", \
__FILE__, __LINE__, __FUNCTION__, \
_fix))
#else
+ #undef DEPRECATED
#define DEPRECATED(_fix) do {} while (0)
#endif
diff -rupN vsock-only/shared/vm_assert.h vsock-only.new/shared/vm_assert.h
--- vsock-only/shared/vm_assert.h 2014-10-09 21:50:54.222159088 -0400
+++ vsock-only.new/shared/vm_assert.h 2014-10-09 21:52:45.352165112 -0400
@@ -237,11 +237,13 @@ EXTERN void WarningThrottled(uint32 *cou
#define LOG_ONCE(_s) DO_ONCE(Log _s)
#ifdef VMX86_DEVEL
+ #undef DEPRECATED
#define DEPRECATED(_fix) DO_ONCE( \
Warning("%s:%d: %s is DEPRECATED; %s\n", \
__FILE__, __LINE__, __FUNCTION__, \
_fix))
#else
+ #undef DEPRECATED
#define DEPRECATED(_fix) do {} while (0)
#endif

@ -1,115 +0,0 @@
hushes warnings about unused typedefs which are part of the "static assert"
technique that the code uses. We simply add an "__attribute__((unused)) to each of them
--- vmblock-only/shared/vm_assert.h 2014-10-07 22:43:39.519402467 -0400
+++ vmblock-only/shared/vm_assert.h 2014-10-07 22:48:01.346409957 -0400
@@ -317,7 +317,7 @@ EXTERN void WarningThrottled(uint32 *cou
#define ASSERT_ON_COMPILE(e) \
do { \
enum { AssertOnCompileMisused = ((e) ? 1 : -1) }; \
- typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
+ __attribute__((unused)) typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
} while (0)
--- vmci-only/shared/vm_assert.h 2014-10-07 22:43:39.519402467 -0400
+++ vmci-only/shared/vm_assert.h 2014-10-07 22:47:51.829409685 -0400
@@ -317,7 +317,7 @@ EXTERN void WarningThrottled(uint32 *cou
#define ASSERT_ON_COMPILE(e) \
do { \
enum { AssertOnCompileMisused = ((e) ? 1 : -1) }; \
- typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
+ __attribute__((unused)) typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
} while (0)
--- vmmon-only/include/vm_assert.h 2014-10-07 22:43:39.520402467 -0400
+++ vmmon-only/include/vm_assert.h 2014-10-07 22:47:39.246409325 -0400
@@ -317,7 +317,7 @@ EXTERN void WarningThrottled(uint32 *cou
#define ASSERT_ON_COMPILE(e) \
do { \
enum { AssertOnCompileMisused = ((e) ? 1 : -1) }; \
- typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
+ __attribute__((unused)) typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
} while (0)
--- vmnet-only/vm_assert.h 2014-10-07 22:43:39.520402467 -0400
+++ vmnet-only/vm_assert.h 2014-10-07 22:47:55.804409799 -0400
@@ -317,7 +317,7 @@ EXTERN void WarningThrottled(uint32 *cou
#define ASSERT_ON_COMPILE(e) \
do { \
enum { AssertOnCompileMisused = ((e) ? 1 : -1) }; \
- typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
+ __attribute__((unused)) typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
} while (0)
--- vsock-only/shared/vm_assert.h 2014-10-07 22:47:11.595408534 -0400
+++ vsock-only/shared/vm_assert.h 2014-10-07 22:45:55.715406363 -0400
@@ -317,7 +317,7 @@ EXTERN void WarningThrottled(uint32 *cou
#define ASSERT_ON_COMPILE(e) \
do { \
enum { AssertOnCompileMisused = ((e) ? 1 : -1) }; \
- typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
+ __attribute__((unused)) typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
} while (0)
--- vsock-only/shared/vm_atomic.h 2013-11-05 23:33:27.000000000 -0500
+++ vsock-only/shared/vm_atomic.h 2014-10-07 22:53:06.024418673 -0400
@@ -2394,7 +2394,7 @@ Atomic_TestBit64(Atomic_uint64 *var, //
&& 8 * sizeof (out) == size \
&& 8 * sizeof (cast) == size \
? 1 : -1 }; \
- typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
+ __attribute__((unused)) typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
} \
\
\
--- vmci-only/shared/vm_atomic.h 2013-11-05 23:33:27.000000000 -0500
+++ vmci-only/shared/vm_atomic.h 2014-10-07 22:53:24.873419213 -0400
@@ -2394,7 +2394,7 @@ Atomic_TestBit64(Atomic_uint64 *var, //
&& 8 * sizeof (out) == size \
&& 8 * sizeof (cast) == size \
? 1 : -1 }; \
- typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
+ __attribute__((unused)) typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
} \
\
\
--- vmblock-only/shared/vm_atomic.h 2013-11-05 23:33:27.000000000 -0500
+++ vmblock-only/shared/vm_atomic.h 2014-10-07 22:53:31.073419390 -0400
@@ -2394,7 +2394,7 @@ Atomic_TestBit64(Atomic_uint64 *var, //
&& 8 * sizeof (out) == size \
&& 8 * sizeof (cast) == size \
? 1 : -1 }; \
- typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
+ __attribute__((unused)) typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
} \
\
--- vmnet-only/vm_atomic.h 2013-11-06 00:40:52.000000000 -0500
+++ vmnet-only/vm_atomic.h 2014-10-07 23:04:50.637438831 -0400
@@ -2394,7 +2394,7 @@ Atomic_TestBit64(Atomic_uint64 *var, //
&& 8 * sizeof (out) == size \
&& 8 * sizeof (cast) == size \
? 1 : -1 }; \
- typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
+ __attribute__((unused)) typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
} \
\
\
--- vmmon-only/include/vm_atomic.h 2013-11-06 00:40:52.000000000 -0500
+++ vmmon-only/include/vm_atomic.h 2014-10-07 23:04:50.637438831 -0400
@@ -2394,7 +2394,7 @@ Atomic_TestBit64(Atomic_uint64 *var, //
&& 8 * sizeof (out) == size \
&& 8 * sizeof (cast) == size \
? 1 : -1 }; \
- typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
+ __attribute__((unused)) typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
} \
\
\

@ -1,34 +0,0 @@
starting with kernel 3.6, d_revalidate takes an unsigned int "flags"
as the second argument, not a nameidata pointer! see fs/namei.c
for implementation
diff -Naur vmblock-only/linux/dentry.c vmblock-only/linux/dentry.c
--- vmblock-only/linux/dentry.c 2013-11-05 23:33:26.000000000 -0500
+++ vmblock-only/linux/dentry.c 2014-04-26 10:58:03.062635343 -0400
@@ -32,7 +32,7 @@
#include "block.h"
-static int DentryOpRevalidate(struct dentry *dentry, struct nameidata *nd);
+static int DentryOpRevalidate(struct dentry *dentry, unsigned int flags);
struct dentry_operations LinkDentryOps = {
.d_revalidate = DentryOpRevalidate,
@@ -60,7 +60,7 @@
static int
DentryOpRevalidate(struct dentry *dentry, // IN: dentry revalidating
- struct nameidata *nd) // IN: lookup flags & intent
+ unsigned int flags) // IN: lookup flags & intent
{
VMBlockInodeInfo *iinfo;
struct nameidata actualNd;
@@ -101,7 +101,7 @@
if (actualDentry &&
actualDentry->d_op &&
actualDentry->d_op->d_revalidate) {
- return actualDentry->d_op->d_revalidate(actualDentry, nd);
+ return actualDentry->d_op->d_revalidate(actualDentry, flags);
}
if (compat_path_lookup(iinfo->name, 0, &actualNd)) {

@ -1,36 +0,0 @@
starting with kernel 3.6, d_revalidate takes an unsigned int "flags"
as the second argument, not a nameidata pointer! see fs/namei.c
for implementation. Also changing vfs_follow_link to nd_set_link.
See: https://lkml.org/lkml/2013/9/9/236
diff -Naur vmblock-only/linux/inode.c vmblock-only/linux/inode.c
--- vmblock-only/linux/inode.c 2013-11-05 23:33:26.000000000 -0500
+++ vmblock-only/linux/inode.c 2014-04-26 10:58:03.063635343 -0400
@@ -36,7 +36,7 @@
/* Inode operations */
static struct dentry *InodeOpLookup(struct inode *dir,
- struct dentry *dentry, struct nameidata *nd);
+ struct dentry *dentry, unsigned int flags);
static int InodeOpReadlink(struct dentry *dentry, char __user *buffer, int buflen);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
@@ -75,7 +75,7 @@
static struct dentry *
InodeOpLookup(struct inode *dir, // IN: parent directory's inode
struct dentry *dentry, // IN: dentry to lookup
- struct nameidata *nd) // IN: lookup intent and information
+ unsigned int flags) // IN: lookup intent and information
{
char *filename;
struct inode *inode;
@@ -221,7 +221,8 @@
goto out;
}
- ret = vfs_follow_link(nd, iinfo->name);
+ nd_set_link(nd, iinfo->name);
+ ret = 0;
out:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)

@ -1,26 +0,0 @@
fixes a bug where sizeof was being used on a pointer when they clearly
meant to use the size of the array referred to. Fortunately, the amount is
always smaller than the actual size of the buffer, so likely not a security issue
(and was fixed in vmware-workstaiton 10
diff -rupN vmnet-only/hub.c vmnet-only.new/hub.c
--- vmnet-only/hub.c 2013-11-06 00:40:52.000000000 -0500
+++ vmnet-only.new/hub.c 2014-10-07 18:45:34.403918680 -0400
@@ -129,7 +129,7 @@ VNetHubFindHubByID(uint8 idNum[VNET_PVN_
{
VNetHub *currHub = vnetHub;
while (currHub && (currHub->hubType != HUB_TYPE_PVN ||
- memcmp(idNum, currHub->id.pvnID, sizeof idNum))) {
+ memcmp(idNum, currHub->id.pvnID, VNET_PVN_ID_LEN))) {
currHub = currHub->next;
}
return currHub;
@@ -312,7 +312,7 @@ VNetHubAlloc(Bool allocPvn, // IN: TRUE
if (allocPvn) {
hub->hubType = HUB_TYPE_PVN;
- memcpy(hub->id.pvnID, id, sizeof id);
+ memcpy(hub->id.pvnID, id, VNET_PVN_ID_LEN);
++pvnInstance;
} else {
hub->hubType = HUB_TYPE_VNET;

@ -1,809 +0,0 @@
--- a/vmnet-only/bridge.c
+++ b/vmnet-only/bridge.c
@@ -105,8 +105,6 @@ static Bool VNetBridgeCycleDetect(VNetJack *this, int generation);
static Bool VNetBridgeIsDeviceWireless(struct net_device *dev);
static void VNetBridgePortsChanged(VNetJack *this);
static int VNetBridgeIsBridged(VNetJack *this);
-static int VNetBridgeProcRead(char *page, char **start, off_t off,
- int count, int *eof, void *data);
static void VNetBridgeComputeHeaderPosIPv6(struct sk_buff *skb);
static PacketStatus VNetCallSMACFunc(struct SMACState *state,
struct sk_buff **skb, void *startOfData,
@@ -225,6 +223,53 @@ VNetBridgeDevCompatible(VNetBridge *bridge, // IN: Bridge
/*
*----------------------------------------------------------------------
*
+ * VNetBridgeProcShow --
+ *
+ * Callback for read operation on this bridge entry in vnets proc fs.
+ *
+ * Results:
+ * Length of read operation.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+VNetBridgeProcShow(struct seq_file *seqf, // IN/OUT: buffer to write into
+ void *data) // IN: client data - pointer to bridge
+{
+ VNetBridge *bridge = (VNetBridge*)data;
+
+ if (!bridge) {
+ return 0;
+ }
+
+ VNetPrintPort(&bridge->port, seqf);
+
+ seq_printf(seqf, "dev %s ", bridge->name);
+
+ seq_printf(seqf, "\n");
+
+ return 0;
+}
+
+static int proc_bridge_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, VNetBridgeProcShow, PDE_DATA(inode));
+}
+
+static const struct file_operations proc_bridge_fops = {
+ .open = proc_bridge_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
+};
+
+/*
+ *----------------------------------------------------------------------
+ *
* VNetBridge_Create --
*
* Creates a bridge. Allocates struct, allocates internal device,
@@ -319,17 +364,14 @@ VNetBridge_Create(const char *devName, // IN: name of device (e.g., "eth0")
* Make proc entry for this jack.
*/
- retval = VNetProc_MakeEntry(bridge->port.jack.name, S_IFREG,
- &bridge->port.jack.procEntry);
+ retval = VNetProc_MakeEntryOps(bridge->port.jack.name, S_IFREG,
+ &bridge->port.jack.procEntry, &proc_bridge_fops, bridge);
if (retval) {
if (retval == -ENXIO) {
bridge->port.jack.procEntry = NULL;
} else {
goto out;
}
- } else {
- bridge->port.jack.procEntry->read_proc = VNetBridgeProcRead;
- bridge->port.jack.procEntry->data = bridge;
}
/*
@@ -1719,45 +1761,3 @@ VNetBridgeReceiveFromDev(struct sk_buff *skb, // IN: packet to receive
return 0;
}
-
-/*
- *----------------------------------------------------------------------
- *
- * VNetBridgeProcRead --
- *
- * Callback for read operation on this bridge entry in vnets proc fs.
- *
- * Results:
- * Length of read operation.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-int
-VNetBridgeProcRead(char *page, // IN/OUT: buffer to write into
- char **start, // OUT: 0 if file < 4k, else offset into page
- off_t off, // IN: (unused) offset of read into the file
- int count, // IN: (unused) maximum number of bytes to read
- int *eof, // OUT: TRUE if there is nothing more to read
- void *data) // IN: client data - pointer to bridge
-{
- VNetBridge *bridge = (VNetBridge*)data;
- int len = 0;
-
- if (!bridge) {
- return len;
- }
-
- len += VNetPrintPort(&bridge->port, page+len);
-
- len += sprintf(page+len, "dev %s ", bridge->name);
-
- len += sprintf(page+len, "\n");
-
- *start = 0;
- *eof = 1;
- return len;
-}
--- a/vmnet-only/driver.c
+++ b/vmnet-only/driver.c
@@ -1785,21 +1785,17 @@ VNetSetMACUnique(VNetPort *port, // IN:
*----------------------------------------------------------------------
*/
-int
+void
VNetPrintJack(const VNetJack *jack, // IN: jack
- char *buf) // OUT: info about jack
+ struct seq_file *seqf) // OUT: info about jack
{
- int len = 0;
-
read_lock(&vnetPeerLock);
if (!jack->peer) {
- len += sprintf(buf+len, "connected not ");
+ seq_printf(seqf, "connected not ");
} else {
- len += sprintf(buf+len, "connected %s ", jack->peer->name);
+ seq_printf(seqf, "connected %s ", jack->peer->name);
}
read_unlock(&vnetPeerLock);
-
- return len;
}
@@ -1819,52 +1815,48 @@ VNetPrintJack(const VNetJack *jack, // IN: jack
*----------------------------------------------------------------------
*/
-int
+void
VNetPrintPort(const VNetPort *port, // IN: port
- char *buf) // OUT: info about port
+ struct seq_file *seqf) // OUT: info about port
{
- int len = 0;
+ VNetPrintJack(&port->jack, seqf);
- len += VNetPrintJack(&port->jack, buf+len);
-
- len += sprintf(buf+len, "mac %02x:%02x:%02x:%02x:%02x:%02x ",
+ seq_printf(seqf, "mac %02x:%02x:%02x:%02x:%02x:%02x ",
port->paddr[0], port->paddr[1], port->paddr[2],
port->paddr[3], port->paddr[4], port->paddr[5]);
- len += sprintf(buf+len, "ladrf %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x ",
+ seq_printf(seqf, "ladrf %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x ",
port->ladrf[0], port->ladrf[1], port->ladrf[2],
port->ladrf[3], port->ladrf[4], port->ladrf[5],
port->ladrf[6], port->ladrf[7]);
- len += sprintf(buf+len, "flags IFF_RUNNING");
+ seq_printf(seqf, "flags IFF_RUNNING");
if (port->flags & IFF_UP) {
- len += sprintf(buf+len, ",IFF_UP");
+ seq_printf(seqf, ",IFF_UP");
}
if (port->flags & IFF_BROADCAST) {
- len += sprintf(buf+len, ",IFF_BROADCAST");
+ seq_printf(seqf, ",IFF_BROADCAST");
}
if (port->flags & IFF_DEBUG) {
- len += sprintf(buf+len, ",IFF_DEBUG");
+ seq_printf(seqf, ",IFF_DEBUG");
}
if (port->flags & IFF_PROMISC) {
- len += sprintf(buf+len, ",IFF_PROMISC");
+ seq_printf(seqf, ",IFF_PROMISC");
}
if (port->flags & IFF_MULTICAST) {
- len += sprintf(buf+len, ",IFF_MULTICAST");
+ seq_printf(seqf, ",IFF_MULTICAST");
}
if (port->flags & IFF_ALLMULTI) {
- len += sprintf(buf+len, ",IFF_ALLMULTI");
+ seq_printf(seqf, ",IFF_ALLMULTI");
}
- len += sprintf(buf+len, " ");
-
- return len;
+ seq_printf(seqf, " ");
}
--- a/vmnet-only/hub.c
+++ b/vmnet-only/hub.c
@@ -25,6 +25,7 @@
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/poll.h>
+#include <linux/seq_file.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
@@ -71,8 +72,6 @@ static void VNetHubReceive(VNetJack *this, struct sk_buff *skb);
static Bool VNetHubCycleDetect(VNetJack *this, int generation);
static void VNetHubPortsChanged(VNetJack *this);
static int VNetHubIsBridged(VNetJack *this);
-static int VNetHubProcRead(char *page, char **start, off_t off,
- int count, int *eof, void *data);
static VNetHub *vnetHub;
static DEFINE_SPINLOCK(vnetHubLock);
@@ -241,6 +240,53 @@ VNetHub_AllocPvn(uint8 id[]) // IN: the PVN ID to alloc on
/*
*----------------------------------------------------------------------
*
+ * VNetHubProcShow --
+ *
+ * Callback for read operation on hub entry in vnets proc fs.
+ *
+ * Results:
+ * Length of read operation.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+VNetHubProcShow(struct seq_file *seqf, // IN/OUT: buffer to write into
+ void *data) // IN: client data - not used
+{
+ VNetJack *jack = (VNetJack*)data;
+ VNetHub *hub;
+
+ if (!jack || !jack->private) {
+ return 0;
+ }
+ hub = (VNetHub*)jack->private;
+
+ VNetPrintJack(jack, seqf);
+
+ seq_printf(seqf, "tx %u ", hub->stats[jack->index].tx);
+ seq_printf(seqf, "\n");
+ return 0;
+}
+
+static int proc_hub_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, VNetHubProcShow, PDE_DATA(inode));
+}
+
+static const struct file_operations proc_hub_fops = {
+ .open = proc_hub_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
+};
+
+/*
+ *----------------------------------------------------------------------
+ *
* VNetHubAlloc --
*
* Allocate a jack on this hub.
@@ -354,7 +400,7 @@ VNetHubAlloc(Bool allocPvn, // IN: TRUE for PVN, FALSE for vnet
* Make proc entry for this jack.
*/
- retval = VNetProc_MakeEntry(jack->name, S_IFREG, &jack->procEntry);
+ retval = VNetProc_MakeEntryOps(jack->name, S_IFREG, &jack->procEntry, &proc_hub_fops, jack);
if (retval) {
if (retval == -ENXIO) {
jack->procEntry = NULL;
@@ -362,9 +408,6 @@ VNetHubAlloc(Bool allocPvn, // IN: TRUE for PVN, FALSE for vnet
hub->used[i] = FALSE;
return NULL;
}
- } else {
- jack->procEntry->read_proc = VNetHubProcRead;
- jack->procEntry->data = jack;
}
/*
@@ -686,46 +729,3 @@ VNetHubIsBridged(VNetJack *this)
}
-/*
- *----------------------------------------------------------------------
- *
- * VNetHubProcRead --
- *
- * Callback for read operation on hub entry in vnets proc fs.
- *
- * Results:
- * Length of read operation.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-int
-VNetHubProcRead(char *page, // IN/OUT: buffer to write into
- char **start, // OUT: 0 if file < 4k, else offset into page
- off_t off, // IN: offset of read into the file
- int count, // IN: maximum number of bytes to read
- int *eof, // OUT: TRUE if there is nothing more to read
- void *data) // IN: client data - not used
-{
- VNetJack *jack = (VNetJack*)data;
- VNetHub *hub;
- int len = 0;
-
- if (!jack || !jack->private) {
- return len;
- }
- hub = (VNetHub*)jack->private;
-
- len += VNetPrintJack(jack, page+len);
-
- len += sprintf(page+len, "tx %u ", hub->stats[jack->index].tx);
-
- len += sprintf(page+len, "\n");
-
- *start = 0;
- *eof = 1;
- return len;
-}
--- a/vmnet-only/netif.c
+++ b/vmnet-only/netif.c
@@ -62,8 +62,6 @@ static int VNetNetifStartXmit(struct sk_buff *skb, struct net_device *dev);
static struct net_device_stats *VNetNetifGetStats(struct net_device *dev);
static int VNetNetifSetMAC(struct net_device *dev, void *addr);
static void VNetNetifSetMulticast(struct net_device *dev);
-static int VNetNetIfProcRead(char *page, char **start, off_t off,
- int count, int *eof, void *data);
/*
*----------------------------------------------------------------------
@@ -116,6 +114,53 @@ VNetNetIfSetup(struct net_device *dev) // IN:
}
+/*
+ *----------------------------------------------------------------------
+ *
+ * VNetNetIfProcShow --
+ *
+ * Callback for read operation on this netif entry in vnets proc fs.
+ *
+ * Results:
+ * Length of read operation.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+VNetNetIfProcShow(struct seq_file *seqf, // IN/OUT: buffer to write into
+ void *data) // IN: client data
+{
+ VNetNetIF *netIf = data;
+
+ if (!netIf) {
+ return 0;
+ }
+
+ VNetPrintPort(&netIf->port, seqf);
+
+ seq_printf(seqf, "dev %s ", netIf->dev->name);
+
+ seq_printf(seqf, "\n");
+
+ return 0;
+}
+
+static int proc_netif_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, VNetNetIfProcShow, PDE_DATA(inode));
+}
+
+static const struct file_operations proc_netif_fops = {
+ .open = proc_netif_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
+};
+
/*
*----------------------------------------------------------------------
@@ -180,16 +225,13 @@ VNetNetIf_Create(char *devName, // IN:
* Make proc entry for this jack.
*/
- retval = VNetProc_MakeEntry(netIf->port.jack.name, S_IFREG,
- &netIf->port.jack.procEntry);
+ retval = VNetProc_MakeEntryOps(netIf->port.jack.name, S_IFREG,
+ &netIf->port.jack.procEntry, &proc_netif_fops, netIf);
if (retval) {
netIf->port.jack.procEntry = NULL;
if (retval != -ENXIO) {
goto outFreeDev;
}
- } else {
- netIf->port.jack.procEntry->read_proc = VNetNetIfProcRead;
- netIf->port.jack.procEntry->data = netIf;
}
/*
@@ -553,45 +595,3 @@ VNetNetifGetStats(struct net_device *dev) // IN:
return &netIf->stats;
}
-
-/*
- *----------------------------------------------------------------------
- *
- * VNetNetIfProcRead --
- *
- * Callback for read operation on this netif entry in vnets proc fs.
- *
- * Results:
- * Length of read operation.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-int
-VNetNetIfProcRead(char *page, // IN/OUT: buffer to write into
- char **start, // OUT: 0 if file < 4k, else offset into page
- off_t off, // IN: (unused) offset of read into the file
- int count, // IN: (unused) maximum number of bytes to read
- int *eof, // OUT: TRUE if there is nothing more to read
- void *data) // IN: client data
-{
- VNetNetIF *netIf = data;
- int len = 0;
-
- if (!netIf) {
- return len;
- }
-
- len += VNetPrintPort(&netIf->port, page+len);
-
- len += sprintf(page+len, "dev %s ", netIf->dev->name);
-
- len += sprintf(page+len, "\n");
-
- *start = 0;
- *eof = 1;
- return len;
-}
--- a/vmnet-only/procfs.c
+++ b/vmnet-only/procfs.c
@@ -45,10 +45,6 @@
#if defined(CONFIG_PROC_FS)
-static int VNetProcMakeEntryInt(VNetProcEntry *parent, char *name, int mode,
- VNetProcEntry **ret);
-static void VNetProcRemoveEntryInt(VNetProcEntry *node, VNetProcEntry *parent);
-
static VNetProcEntry *base = NULL;
@@ -71,7 +67,12 @@ static VNetProcEntry *base = NULL;
int
VNetProc_Init(void)
{
- return VNetProcMakeEntryInt(NULL, "vmnet", S_IFDIR, &base);
+ base = proc_mkdir("vmnet", NULL);
+ if(IS_ERR(base)) {
+ base = NULL;
+ return PTR_ERR(base);
+ }
+ return 0;
}
@@ -94,14 +95,14 @@ VNetProc_Init(void)
void
VNetProc_Cleanup(void)
{
- VNetProcRemoveEntryInt(base, NULL);
+ proc_remove(base);
base = NULL;
}
/*
*----------------------------------------------------------------------
*
- * VNetProcMakeEntryInt --
+ * VNetProc_MakeEntryOps --
*
* Make an entry in the vnets proc file system.
*
@@ -116,72 +117,21 @@ VNetProc_Cleanup(void)
*/
int
-VNetProcMakeEntryInt(VNetProcEntry *parent, // IN:
- char *name, // IN:
+VNetProc_MakeEntryOps(char *name, // IN:
int mode, // IN:
- VNetProcEntry **ret) // OUT:
+ VNetProcEntry **ret,
+ const struct file_operations *fops,
+ void *data
+ ) // OUT:
{
VNetProcEntry *ent;
- ent = create_proc_entry(name, mode, parent);
+ ent = proc_create_data(name, mode, base, fops, data);
*ret = ent;
if (!ent)
return -ENOMEM;
return 0;
}
-
-/*
- *----------------------------------------------------------------------
- *
- * VNetProcRemoveEntryInt --
- *
- * Remove a previously installed proc entry.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-void
-VNetProcRemoveEntryInt(VNetProcEntry *node,
- VNetProcEntry *parent)
-{
- if (node) {
- remove_proc_entry(node->name, parent);
- }
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * VNetProc_MakeEntry --
- *
- * Make an entry in the vnets proc file system.
- *
- * Results:
- * errno. If errno is 0 and ret is non NULL then ret is filled
- * in with the resulting proc entry.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-int
-VNetProc_MakeEntry(char *name, // IN:
- int mode, // IN:
- VNetProcEntry **ret) // OUT:
-{
- return VNetProcMakeEntryInt(base, name, mode, ret);
-}
-
-
/*
*----------------------------------------------------------------------
*
@@ -201,7 +151,8 @@ VNetProc_MakeEntry(char *name, // IN:
void
VNetProc_RemoveEntry(VNetProcEntry *node)
{
- VNetProcRemoveEntryInt(node, base);
+ if(node)
+ proc_remove(node);
}
@@ -253,31 +204,6 @@ VNetProc_Cleanup(void)
}
-/*
- *----------------------------------------------------------------------
- *
- * VNetProc_MakeEntry --
- *
- * Make an entry in the vnets proc file system.
- *
- * Results:
- * errno. If errno is 0 and ret is non NULL then ret is filled
- * in with the resulting proc entry.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-int
-VNetProc_MakeEntry(char *name,
- int mode,
- VNetProcEntry **ret)
-{
- return -ENXIO;
-}
-
/*
*----------------------------------------------------------------------
--- a/vmnet-only/userif.c
+++ b/vmnet-only/userif.c
@@ -389,7 +389,7 @@ VNetUserIfReceive(VNetJack *this, // IN
/*
*----------------------------------------------------------------------
*
- * VNetUserIfProcRead --
+ * VNetUserIfProcShow --
*
* Callback for read operation on this userif entry in vnets proc fs.
*
@@ -403,30 +403,23 @@ VNetUserIfReceive(VNetJack *this, // IN
*/
static int
-VNetUserIfProcRead(char *page, // IN/OUT: buffer to write into
- char **start, // OUT: 0 if file < 4k, else offset into
- // page
- off_t off, // IN: offset of read into the file
- int count, // IN: maximum number of bytes to read
- int *eof, // OUT: TRUE if there is nothing more to
- // read
+VNetUserIfProcShow(struct seq_file *seqf, // IN/OUT: buffer to write into
void *data) // IN: client data - not used
{
VNetUserIF *userIf = (VNetUserIF*)data;
- int len = 0;
if (!userIf) {
- return len;
+ return 0;
}
- len += VNetPrintPort(&userIf->port, page+len);
+ VNetPrintPort(&userIf->port, seqf);
- len += sprintf(page+len, "read %u written %u queued %u ",
+ seq_printf(seqf, "read %u written %u queued %u ",
userIf->stats.read,
userIf->stats.written,
userIf->stats.queued);
- len += sprintf(page+len,
+ seq_printf(seqf,
"dropped.down %u dropped.mismatch %u "
"dropped.overflow %u dropped.largePacket %u",
userIf->stats.droppedDown,
@@ -434,13 +427,23 @@ VNetUserIfProcRead(char *page, // IN/OUT: buffer to write into
userIf->stats.droppedOverflow,
userIf->stats.droppedLargePacket);
- len += sprintf(page+len, "\n");
+ seq_printf(seqf, "\n");
- *start = 0;
- *eof = 1;
- return len;
+ return 0;
+}
+
+static int proc_userif_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, VNetUserIfProcShow, PDE_DATA(inode));
}
+static const struct file_operations proc_userif_fops = {
+ .open = proc_userif_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
+};
+
/*
*----------------------------------------------------------------------
@@ -1036,8 +1039,8 @@ VNetUserIf_Create(VNetPort **ret) // OUT
* Make proc entry for this jack.
*/
- retval = VNetProc_MakeEntry(userIf->port.jack.name, S_IFREG,
- &userIf->port.jack.procEntry);
+ retval = VNetProc_MakeEntryOps(userIf->port.jack.name, S_IFREG,
+ &userIf->port.jack.procEntry, &proc_userif_fops, userIf);
if (retval) {
if (retval == -ENXIO) {
userIf->port.jack.procEntry = NULL;
@@ -1045,9 +1048,6 @@ VNetUserIf_Create(VNetPort **ret) // OUT
kfree(userIf);
return retval;
}
- } else {
- userIf->port.jack.procEntry->read_proc = VNetUserIfProcRead;
- userIf->port.jack.procEntry->data = userIf;
}
/*
--- a/vmnet-only/vnetInt.h
+++ b/vmnet-only/vnetInt.h
@@ -171,12 +171,14 @@ VNetJack *VNetDisconnect(VNetJack *jack);
void VNetSend(const VNetJack *jack, struct sk_buff *skb);
-int VNetProc_MakeEntry(char *name, int mode,
- VNetProcEntry **ret);
+int VNetProc_MakeEntryOps(char *name, int mode,
+ VNetProcEntry **ret,
+ const struct file_operations *fops,
+ void *data);
void VNetProc_RemoveEntry(VNetProcEntry *node);
-int VNetPrintJack(const VNetJack *jack, char *buf);
+void VNetPrintJack(const VNetJack *jack, struct seq_file *seqf);
int VNet_MakeMACAddress(VNetPort *port);
@@ -196,7 +198,7 @@ Bool VNetPacketMatch(const uint8 *destAddr, const uint8 *ifAddr,
Bool VNetCycleDetectIf(const char *name, int generation);
-int VNetPrintPort(const VNetPort *port, char *buf);
+void VNetPrintPort(const VNetPort *port, struct seq_file *seqf);
int VNetSnprintf(char *str, size_t size, const char *format, ...);
--
--- a/vmblock-only/linux/control.c 2013-05-21 19:21:19.165750556 +0200
+++ b/vmblock-only/linux/control.c 2013-05-21 19:22:18.363747723 +0200
@@ -208,9 +208,10 @@
VMBlockSetProcEntryOwner(controlProcMountpoint);
/* Create /proc/fs/vmblock/dev */
- controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME,
- VMBLOCK_CONTROL_MODE,
- controlProcDirEntry);
+ controlProcEntry = proc_create(VMBLOCK_CONTROL_DEVNAME,
+ VMBLOCK_CONTROL_MODE,
+ controlProcDirEntry,
+ &ControlFileOps);
if (!controlProcEntry) {
Warning("SetupProcDevice: could not create " VMBLOCK_DEVICE "\n");
remove_proc_entry(VMBLOCK_CONTROL_MOUNTPOINT, controlProcDirEntry);
@@ -218,7 +219,6 @@
return -EINVAL;
}
- controlProcEntry->proc_fops = &ControlFileOps;
return 0;
}

@ -1,41 +0,0 @@
replaces usage of vfs_readdir with iterate_dir. origionally found here:
https://bugs.gentoo.org/show_bug.cgi?id=508204
diff -Naur vmblock-only/linux/file.c vmblock-only/linux/file.c
--- vmblock-only/linux/file.c 2013-11-05 23:33:26.000000000 -0500
+++ vmblock-only/linux/file.c 2014-04-26 10:58:03.062635343 -0400
@@ -166,11 +166,9 @@
static int
FileOpReaddir(struct file *file, // IN
- void *dirent, // IN
- filldir_t filldir) // IN
+ struct dir_context *ctx)
{
int ret;
- FilldirInfo info;
struct file *actualFile;
if (!file) {
@@ -184,11 +182,8 @@
return -EINVAL;
}
- info.filldir = filldir;
- info.dirent = dirent;
-
actualFile->f_pos = file->f_pos;
- ret = vfs_readdir(actualFile, Filldir, &info);
+ ret = iterate_dir(actualFile, ctx);
file->f_pos = actualFile->f_pos;
return ret;
@@ -237,7 +232,7 @@
struct file_operations RootFileOps = {
- .readdir = FileOpReaddir,
+ .iterate = FileOpReaddir,
.open = FileOpOpen,
.release = FileOpRelease,
};

@ -1,53 +0,0 @@
simply remove the code for Filldir since it is no longer used with the new
iterate_dir API
diff -rupN vmblock-only/linux/file.c vmblock-only.new/linux/file.c
--- vmblock-only/linux/file.c 2014-10-07 23:22:46.832469618 -0400
+++ vmblock-only.new/linux/file.c 2014-10-07 23:24:35.276472720 -0400
@@ -38,46 +38,6 @@ typedef u64 inode_num_t;
typedef ino_t inode_num_t;
#endif
-/* Specifically for our filldir_t callback */
-typedef struct FilldirInfo {
- filldir_t filldir;
- void *dirent;
-} FilldirInfo;
-
-
-/*
- *----------------------------------------------------------------------------
- *
- * Filldir --
- *
- * Callback function for readdir that we use in place of the one provided.
- * This allows us to specify that each dentry is a symlink, but pass through
- * everything else to the original filldir function.
- *
- * Results:
- * Original filldir's return value.
- *
- * Side effects:
- * Directory information gets copied to user's buffer.
- *
- *----------------------------------------------------------------------------
- */
-
-static int
-Filldir(void *buf, // IN: Dirent buffer passed from FileOpReaddir
- const char *name, // IN: Dirent name
- int namelen, // IN: len of dirent's name
- loff_t offset, // IN: Offset
- inode_num_t ino, // IN: Inode number of dirent
- unsigned int d_type) // IN: Type of file
-{
- FilldirInfo *info = buf;
-
- /* Specify DT_LNK regardless */
- return info->filldir(info->dirent, name, namelen, offset, ino, DT_LNK);
-}
-
-
/* File operations */
/*

@ -1,39 +0,0 @@
the new API to get the hooknum
origionally from http://forums.gentoo.org/viewtopic-t-979802-start-25.html
--- work/vmnet-only/filter.c 2013-08-27 20:29:04.000000000 +0100
+++ patched/vmnet-only/filter.c 2014-01-26 01:09:05.184893854 +0000
@@ -27,6 +27,7 @@
#include "compat_module.h"
#include <linux/mutex.h>
#include <linux/netdevice.h>
+#include <linux/version.h>
#if COMPAT_LINUX_VERSION_CHECK_LT(3, 2, 0)
# include <linux/module.h>
#else
@@ -203,7 +204,11 @@
#endif
static unsigned int
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
VNetFilterHookFn(unsigned int hooknum, // IN:
+#else
+VNetFilterHookFn(const struct nf_hook_ops *ops, // IN:
+#endif
#ifdef VMW_NFHOOK_USES_SKB
struct sk_buff *skb, // IN:
#else
@@ -252,7 +257,12 @@
/* When the host transmits, hooknum is VMW_NF_INET_POST_ROUTING. */
/* When the host receives, hooknum is VMW_NF_INET_LOCAL_IN. */
- transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
+
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
+ transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
+ #else
+ transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING);
+ #endif
packetHeader = compat_skb_network_header(skb);
ip = (struct iphdr*)packetHeader;

@ -1,15 +0,0 @@
replacing usage of vfs_readlink with new readlink_copy API
see: http://permalink.gmane.org/gmane.linux.kernel.commits.head/445090
diff -rupN vmblock-only/linux/inode.c vmblock-only/linux/inode.c
--- vmblock-only/linux/inode.c 2014-10-05 23:20:14.545218357 -0400
+++ vmblock-only/linux/inode.c 2014-10-05 23:33:01.549259933 -0400
@@ -178,7 +178,7 @@ InodeOpReadlink(struct dentry *dentry,
return -EINVAL;
}
- return vfs_readlink(dentry, buffer, buflen, iinfo->name);
+ return readlink_copy(buffer, buflen, iinfo->name);
}

@ -1,46 +0,0 @@
removing the no longer existing second parameter to sk_data_ready
doesn't seem it ever served a purpose.
diff -rupN vsock-only/linux/notify.c vsock-only.new/linux/notify.c
--- vsock-only/linux/notify.c 2013-11-05 23:33:27.000000000 -0500
+++ vsock-only.new/linux/notify.c 2014-10-05 23:46:47.943304728 -0400
@@ -515,8 +515,11 @@ VSockVmciHandleWrote(struct sock *sk,
vsk = vsock_sk(sk);
PKT_FIELD(vsk, sentWaitingRead) = FALSE;
#endif
-
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
+ sk->sk_data_ready(sk);
+#else
sk->sk_data_ready(sk, 0);
+#endif
}
diff -rupN vsock-only/linux/notifyQState.c vsock-only.new/linux/notifyQState.c
--- vsock-only/linux/notifyQState.c 2013-11-05 23:33:27.000000000 -0500
+++ vsock-only.new/linux/notifyQState.c 2014-10-05 23:46:33.231303931 -0400
@@ -164,7 +164,11 @@ VSockVmciHandleWrote(struct sock *sk,
struct sockaddr_vm *dst, // IN: unused
struct sockaddr_vm *src) // IN: unused
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
+ sk->sk_data_ready(sk);
+#else
sk->sk_data_ready(sk, 0);
+#endif
}
@@ -566,7 +570,11 @@ VSockVmciNotifyPktRecvPostDequeue(struct
}
/* See the comment in VSockVmciNotifyPktSendPostEnqueue */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
+ sk->sk_data_ready(sk);
+#else
sk->sk_data_ready(sk, 0);
+#endif
}
return err;

@ -1,16 +0,0 @@
new alloc_netdev requires a new parameter. All examples in the kernel i've seen just
use the constant NET_NAME_UNKNOWN.
origionally from: https://communities.vmware.com/message/2425189
diff -rupN vmnet-only/netif.c vmnet-only.new/netif.c
--- vmnet-only/netif.c 2013-11-06 00:40:52.000000000 -0500
+++ vmnet-only.new/netif.c 2014-10-09 17:29:12.361307961 -0400
@@ -149,7 +149,7 @@ VNetNetIf_Create(char *devName, // IN:
memcpy(deviceName, devName, sizeof deviceName);
NULL_TERMINATE_STRING(deviceName);
- dev = alloc_netdev(sizeof *netIf, deviceName, VNetNetIfSetup);
+ dev = alloc_netdev(sizeof *netIf, deviceName, NET_NAME_USER, VNetNetIfSetup);
if (!dev) {
retval = -ENOMEM;
goto out;

@ -1,13 +0,0 @@
diff -rupN vmnet-only/vm_device_version.h vmnet-only.new/vm_device_version.h
--- vmnet-only/vm_device_version.h 2013-11-06 00:40:52.000000000 -0500
+++ vmnet-only.new/vm_device_version.h 2015-05-05 12:03:06.879202223 -0400
@@ -53,7 +53,9 @@
* VMware HD Audio codec
* VMware HD Audio controller
*/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
#define PCI_VENDOR_ID_VMWARE 0x15AD
+#endif
#define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405
#define PCI_DEVICE_ID_VMWARE_SVGA 0x0710
#define PCI_DEVICE_ID_VMWARE_NET 0x0720

@ -1,67 +0,0 @@
Sources:
https://531682.bugs.gentoo.org/attachment.cgi?id=396484
https://531682.bugs.gentoo.org/attachment.cgi?id=396482
diff -rupN vmblock-only.orig/linux/dentry.c vmblock-only/linux/dentry.c
--- vmblock-only.orig/linux/dentry.c 2015-02-14 18:05:46.000000000 -0500
+++ vmblock-only/linux/dentry.c 2015-02-14 18:09:59.000000000 -0500
@@ -63,7 +63,7 @@ DentryOpRevalidate(struct dentry *dentry
unsigned int flags) // IN: lookup flags & intent
{
VMBlockInodeInfo *iinfo;
- struct nameidata actualNd;
+ struct path actualNd;
struct dentry *actualDentry;
int ret;
diff -rupN vmblock-only.orig/linux/filesystem.c vmblock-only/linux/filesystem.c
--- vmblock-only.orig/linux/filesystem.c 2014-11-20 19:29:15.000000000 -0500
+++ vmblock-only/linux/filesystem.c 2015-02-14 18:10:49.000000000 -0500
@@ -322,7 +322,7 @@ Iget(struct super_block *sb, // IN: f
{
VMBlockInodeInfo *iinfo;
struct inode *inode;
- struct nameidata actualNd;
+ struct path actualNd;
ASSERT(sb);
diff -rupN vmblock-only.orig/shared/compat_namei.h vmblock-only/shared/compat_namei.h
--- vmblock-only.orig/shared/compat_namei.h 2014-11-20 19:29:15.000000000 -0500
+++ vmblock-only/shared/compat_namei.h 2015-02-14 18:08:38.000000000 -0500
@@ -26,21 +26,21 @@
* struct. They were both replaced with a struct path.
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
-#define compat_vmw_nd_to_dentry(nd) (nd).path.dentry
+#define compat_vmw_nd_to_dentry(nd) (nd).dentry
#else
#define compat_vmw_nd_to_dentry(nd) (nd).dentry
#endif
/* In 2.6.25-rc2, path_release(&nd) was replaced with path_put(&nd.path). */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
-#define compat_path_release(nd) path_put(&(nd)->path)
+#define compat_path_release(nd) path_put(nd)
#else
#define compat_path_release(nd) path_release(nd)
#endif
/* path_lookup was removed in 2.6.39 merge window VFS merge */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
-#define compat_path_lookup(name, flags, nd) kern_path(name, flags, &((nd)->path))
+#define compat_path_lookup(name, flags, nd) kern_path(name, flags, nd)
#else
#define compat_path_lookup(name, flags, nd) path_lookup(name, flags, nd)
#endif
diff -u vmblock-only.orig/linux/file.c vmblock-only/linux/file.c
--- vmblock-only.orig/linux/file.c 2015-02-11 12:18:29.000000000 -0500
+++ vmblock-only/linux/file.c 2015-02-11 12:41:41.000000000 -0500
@@ -92,7 +92,7 @@
* and that would try to acquire the inode's semaphore; if the two inodes
* are the same we'll deadlock.
*/
- if (actualFile->f_dentry && inode == actualFile->f_dentry->d_inode) {
+ if (actualFile->f_path.dentry && inode == actualFile->f_path.dentry->d_inode) {
Warning("FileOpOpen: identical inode encountered, open cannot succeed.\n");
if (filp_close(actualFile, current->files) < 0) {
Warning("FileOpOpen: unable to close opened file.\n");

@ -1,29 +0,0 @@
diff -rupN vmci-only/linux/vmciKernelIf.c vmci-only.new/linux/vmciKernelIf.c
--- vmci-only/linux/vmciKernelIf.c 2015-05-05 11:22:55.276071501 -0400
+++ vmci-only.new/linux/vmciKernelIf.c 2015-05-05 11:23:58.912074950 -0400
@@ -40,6 +40,7 @@
#include <linux/socket.h> /* For memcpy_{to,from}iovec(). */
#include <linux/vmalloc.h>
#include <linux/wait.h>
+#include <linux/skbuff.h>
#include "compat_highmem.h"
#include "compat_interrupt.h"
diff -rupN vmci-only/linux/vmciKernelIf.c vmci-only.new/linux/vmciKernelIf.c
--- vmci-only/linux/vmciKernelIf.c 2013-11-05 23:33:26.000000000 -0500
+++ vmci-only.new/linux/vmciKernelIf.c 2015-05-05 11:21:59.929068500 -0400
@@ -1246,11 +1246,11 @@ __VMCIMemcpyFromQueue(void *dest,
}
if (isIovec) {
- struct iovec *iov = (struct iovec *)dest;
+ struct msghdr *msg = dest;
int err;
/* The iovec will track bytesCopied internally. */
- err = memcpy_toiovec(iov, (uint8 *)va + pageOffset, toCopy);
+ err = memcpy_to_msg(msg, (uint8 *)va + pageOffset, toCopy);
if (err != 0) {
kunmap(kernelIf->page[pageIndex]);
return VMCI_ERROR_INVALID_ARGS;

@ -1,29 +0,0 @@
diff -ur vmnet-only.orig/driver.c vmnet-only/driver.c
--- vmnet-only.orig/driver.c 2014-06-13 02:38:25.000000000 +0200
+++ vmnet-only/driver.c 2015-02-21 17:31:22.630656305 +0100
@@ -1236,8 +1236,8 @@
struct inode *inode = NULL;
long err;
- if (filp && filp->f_dentry) {
- inode = filp->f_dentry->d_inode;
+ if (filp && filp->f_path.dentry) {
+ inode = filp->f_path.dentry->d_inode;
}
err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);
return err;
diff -ur vmnet-only.orig/userif.c vmnet-only/userif.c
--- vmnet-only.orig/userif.c 2014-06-13 02:38:25.000000000 +0200
+++ vmnet-only/userif.c 2015-02-21 17:37:46.154589854 +0100
@@ -523,7 +523,10 @@
.iov_base = buf,
.iov_len = len,
};
- return skb_copy_datagram_iovec(skb, 0, &iov, len);
+ struct iov_iter to;
+
+ iov_iter_init(&to, READ, &iov, 1, len);
+ return skb_copy_datagram_iter(skb, 0, &to, len);
}

@ -1,12 +0,0 @@
diff -rupN vsock-only/linux/af_vsock.c vsock-only.new/linux/af_vsock.c
--- vsock-only/linux/af_vsock.c 2015-05-05 11:26:05.145081792 -0400
+++ vsock-only.new/linux/af_vsock.c 2015-05-05 11:30:54.304097466 -0400
@@ -4266,7 +4266,7 @@ VSockVmciDgramSendmsg(struct kiocb *kioc
goto out;
}
- memcpy_fromiovec(VMCI_DG_PAYLOAD(dg), msg->msg_iov, len);
+ memcpy_from_msg(VMCI_DG_PAYLOAD(dg), msg, len);
dg->dst = VMCI_MAKE_HANDLE(remoteAddr->svm_cid, remoteAddr->svm_port);
dg->src = VMCI_MAKE_HANDLE(vsk->localAddr.svm_cid, vsk->localAddr.svm_port);

@ -1,15 +0,0 @@
diff -rupN vsock-only/linux/af_vsock.c vsock-only.new/linux/af_vsock.c
--- vsock-only/linux/af_vsock.c 2015-05-05 11:31:35.710099711 -0400
+++ vsock-only.new/linux/af_vsock.c 2015-05-05 11:36:33.260115840 -0400
@@ -4727,7 +4727,11 @@ VSockVmciDgramRecvmsg(struct kiocb *kioc
}
/* Place the datagram payload in the user's iovec. */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
err = skb_copy_datagram_iovec(skb, sizeof *dg, msg->msg_iov, payloadLen);
+#else
+ err = skb_copy_datagram_iter(skb, sizeof *dg, &msg->msg_iter, payloadLen);
+#endif
if (err) {
goto out;
}

@ -1,24 +0,0 @@
diff -rupN vsock-only.old/linux/af_vsock.c vsock-only/linux/af_vsock.c
--- vsock-only.old/linux/af_vsock.c 2015-05-06 20:41:47.684046762 -0400
+++ vsock-only/linux/af_vsock.c 2015-05-06 20:52:15.245080779 -0400
@@ -4629,7 +4629,7 @@ VSockVmciStreamSendmsg(struct kiocb *kio
* able to send.
*/
- written = vmci_qpair_enquev(vsk->qpair, msg->msg_iov,
+ written = vmci_qpair_enquev(vsk->qpair, &msg->msg_iter.iov,
len - totalWritten, 0);
if (written < 0) {
err = -ENOMEM;
@@ -4874,9 +4874,9 @@ VSockVmciStreamRecvmsg(struct kiocb *kio
}
if (flags & MSG_PEEK) {
- read = vmci_qpair_peekv(vsk->qpair, msg->msg_iov, len - copied, 0);
+ read = vmci_qpair_peekv(vsk->qpair, &msg->msg_iter.iov, len - copied, 0);
} else {
- read = vmci_qpair_dequev(vsk->qpair, msg->msg_iov, len - copied, 0);
+ read = vmci_qpair_dequev(vsk->qpair, &msg->msg_iter.iov, len - copied, 0);
}
if (read < 0) {

@ -1,12 +0,0 @@
diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
index f1f4b10..c43242f 100644
--- a/vmmon-only/linux/hostif.c
+++ b/vmmon-only/linux/hostif.c
@@ -55,6 +55,7 @@
#include <linux/kthread.h>
#include <linux/wait.h>
+#include <asm/apic.h>
#include "vmware.h"
#include "x86apic.h"

@ -1,91 +0,0 @@
diff --git a/vmblock-only/linux/file.c b/vmblock-only/linux/file.c
index d7ac1f6..5499169 100644
--- a/vmblock-only/linux/file.c
+++ b/vmblock-only/linux/file.c
@@ -38,46 +38,6 @@ typedef u64 inode_num_t;
typedef ino_t inode_num_t;
#endif
-/* Specifically for our filldir_t callback */
-typedef struct FilldirInfo {
- filldir_t filldir;
- void *dirent;
-} FilldirInfo;
-
-
-/*
- *----------------------------------------------------------------------------
- *
- * Filldir --
- *
- * Callback function for readdir that we use in place of the one provided.
- * This allows us to specify that each dentry is a symlink, but pass through
- * everything else to the original filldir function.
- *
- * Results:
- * Original filldir's return value.
- *
- * Side effects:
- * Directory information gets copied to user's buffer.
- *
- *----------------------------------------------------------------------------
- */
-
-static int
-Filldir(void *buf, // IN: Dirent buffer passed from FileOpReaddir
- const char *name, // IN: Dirent name
- int namelen, // IN: len of dirent's name
- loff_t offset, // IN: Offset
- inode_num_t ino, // IN: Inode number of dirent
- unsigned int d_type) // IN: Type of file
-{
- FilldirInfo *info = buf;
-
- /* Specify DT_LNK regardless */
- return info->filldir(info->dirent, name, namelen, offset, ino, DT_LNK);
-}
-
-
/* File operations */
/*
@@ -166,11 +126,10 @@ FileOpOpen(struct inode *inode, // IN
static int
FileOpReaddir(struct file *file, // IN
- void *dirent, // IN
- filldir_t filldir) // IN
+ struct dir_context *ctx) // IN
{
int ret;
- FilldirInfo info;
+
struct file *actualFile;
if (!file) {
@@ -184,12 +143,10 @@ FileOpReaddir(struct file *file, // IN
return -EINVAL;
}
- info.filldir = filldir;
- info.dirent = dirent;
-
- actualFile->f_pos = file->f_pos;
- ret = vfs_readdir(actualFile, Filldir, &info);
- file->f_pos = actualFile->f_pos;
+ /* Ricky Wong Yung Fei:
+ * Manipulation of pos is now handled internally by iterate_dir().
+ */
+ ret = iterate_dir(actualFile, ctx);
return ret;
}
@@ -237,7 +194,7 @@ FileOpRelease(struct inode *inode, // IN
struct file_operations RootFileOps = {
- .readdir = FileOpReaddir,
+ .iterate = FileOpReaddir,
.open = FileOpOpen,
.release = FileOpRelease,
};

@ -1,170 +0,0 @@
diff --git a/vmci-only/linux/driver.c b/vmci-only/linux/driver.c
index 921f25c..41a39e3 100644
--- a/vmci-only/linux/driver.c
+++ b/vmci-only/linux/driver.c
@@ -241,7 +241,24 @@ static unsigned int LinuxDriverPoll(struct file *file, poll_table *wait);
#define LinuxDriverUnlockIoctlPerFD(mutex) do {} while (0)
#endif
-static struct file_operations vmuser_fops;
+/*
+ * Moved file operations initialize here because of incompatibilites
+ * with Gentoo hardened profile/hardend Linux 3.
+ */
+static struct file_operations vmuser_fops = {
+ .owner = THIS_MODULE,
+ .poll = LinuxDriverPoll,
+#ifdef HAVE_UNLOCKED_IOCTL
+ .unlocked_ioctl = LinuxDriver_UnlockedIoctl,
+#else
+ .ioctl = LinuxDriver_Ioctl,
+#endif
+#ifdef HAVE_COMPAT_IOCTL
+ .compat_ioctl = LinuxDriver_UnlockedIoctl,
+#endif
+ .open = LinuxDriver_Open,
+ .release = LinuxDriver_Close
+};
/*
@@ -378,26 +395,6 @@ vmci_host_init(void)
return -ENOMEM;
}
- /*
- * Initialize the file_operations structure. Because this code is always
- * compiled as a module, this is fine to do it here and not in a static
- * initializer.
- */
-
- memset(&vmuser_fops, 0, sizeof vmuser_fops);
- vmuser_fops.owner = THIS_MODULE;
- vmuser_fops.poll = LinuxDriverPoll;
-#ifdef HAVE_UNLOCKED_IOCTL
- vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl;
-#else
- vmuser_fops.ioctl = LinuxDriver_Ioctl;
-#endif
-#ifdef HAVE_COMPAT_IOCTL
- vmuser_fops.compat_ioctl = LinuxDriver_UnlockedIoctl;
-#endif
- vmuser_fops.open = LinuxDriver_Open;
- vmuser_fops.release = LinuxDriver_Close;
-
sprintf(linuxState.deviceName, "vmci");
linuxState.major = 10;
linuxState.misc.minor = MISC_DYNAMIC_MINOR;
diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c
index b21dd44..960c2aa 100644
--- a/vmmon-only/linux/driver.c
+++ b/vmmon-only/linux/driver.c
@@ -178,7 +178,22 @@ static struct vm_operations_struct vmuser_mops = {
#endif
};
-static struct file_operations vmuser_fops;
+static struct file_operations vmuser_fops = {
+ .owner = THIS_MODULE,
+ .poll = LinuxDriverPoll,
+#ifdef HAVE_UNLOCKED_IOCTL
+ .unlocked_ioctl = LinuxDriver_UnlockedIoctl,
+#else
+ .ioctl = LinuxDriver_Ioctl,
+#endif
+#ifdef HAVE_COMPAT_IOCTL
+ .compat_ioctl = LinuxDriver_UnlockedIoctl,
+#endif
+ .open = LinuxDriver_Open,
+ .release = LinuxDriver_Close,
+ .mmap = LinuxDriverMmap
+};
+
static struct timer_list tscTimer;
/*
@@ -357,27 +372,6 @@ init_module(void)
spin_lock_init(&linuxState.pollListLock);
#endif
- /*
- * Initialize the file_operations structure. Because this code is always
- * compiled as a module, this is fine to do it here and not in a static
- * initializer.
- */
-
- memset(&vmuser_fops, 0, sizeof vmuser_fops);
- vmuser_fops.owner = THIS_MODULE;
- vmuser_fops.poll = LinuxDriverPoll;
-#ifdef HAVE_UNLOCKED_IOCTL
- vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl;
-#else
- vmuser_fops.ioctl = LinuxDriver_Ioctl;
-#endif
-#ifdef HAVE_COMPAT_IOCTL
- vmuser_fops.compat_ioctl = LinuxDriver_UnlockedIoctl;
-#endif
- vmuser_fops.open = LinuxDriver_Open;
- vmuser_fops.release = LinuxDriver_Close;
- vmuser_fops.mmap = LinuxDriverMmap;
-
#ifdef VMX86_DEVEL
devel_init_module();
linuxState.minor = 0;
diff --git a/vmnet-only/driver.c b/vmnet-only/driver.c
index b12b982..40bd4cf 100644
--- a/vmnet-only/driver.c
+++ b/vmnet-only/driver.c
@@ -165,7 +165,22 @@ static long VNetFileOpUnlockedIoctl(struct file * filp,
unsigned int iocmd, unsigned long ioarg);
#endif
-static struct file_operations vnetFileOps;
+static struct file_operations vnetFileOps = {
+ .owner = THIS_MODULE,
+ .read = VNetFileOpRead,
+ .write = VNetFileOpWrite,
+ .poll = VNetFileOpPoll,
+#ifdef HAVE_UNLOCKED_IOCTL
+ .unlocked_ioctl = VNetFileOpUnlockedIoctl,
+#else
+ .ioctl = VNetFileOpIoctl,
+#endif
+#ifdef HAVE_COMPAT_IOCTL
+ .compat_ioctl = VNetFileOpUnlockedIoctl,
+#endif
+ .open = VNetFileOpOpen,
+ .release = VNetFileOpClose
+};
/*
* Utility functions
@@ -476,28 +491,6 @@ init_module(void)
goto err_proto;
}
- /*
- * Initialize the file_operations structure. Because this code is always
- * compiled as a module, this is fine to do it here and not in a static
- * initializer.
- */
-
- memset(&vnetFileOps, 0, sizeof vnetFileOps);
- vnetFileOps.owner = THIS_MODULE;
- vnetFileOps.read = VNetFileOpRead;
- vnetFileOps.write = VNetFileOpWrite;
- vnetFileOps.poll = VNetFileOpPoll;
-#ifdef HAVE_UNLOCKED_IOCTL
- vnetFileOps.unlocked_ioctl = VNetFileOpUnlockedIoctl;
-#else
- vnetFileOps.ioctl = VNetFileOpIoctl;
-#endif
-#ifdef HAVE_COMPAT_IOCTL
- vnetFileOps.compat_ioctl = VNetFileOpUnlockedIoctl;
-#endif
- vnetFileOps.open = VNetFileOpOpen;
- vnetFileOps.release = VNetFileOpClose;
-
retval = register_chrdev(VNET_MAJOR_NUMBER, "vmnet", &vnetFileOps);
if (retval) {
LOG(0, (KERN_NOTICE "/dev/vmnet: could not register major device %d\n",

@ -1,65 +0,0 @@
diff --git a/vmblock-only/Makefile.kernel b/vmblock-only/Makefile.kernel
index ab7a727..e3ec9d2 100644
--- a/vmblock-only/Makefile.kernel
+++ b/vmblock-only/Makefile.kernel
@@ -19,7 +19,7 @@
INCLUDE += -I$(SRCROOT)/include
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachecreate.c, -DVMW_KMEMCR_HAS_DTOR, )
EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachector.c, -DVMW_KMEMCR_CTOR_HAS_3_ARGS, )
diff --git a/vmci-only/Makefile.kernel b/vmci-only/Makefile.kernel
index ba343ee..861ea83 100644
--- a/vmci-only/Makefile.kernel
+++ b/vmci-only/Makefile.kernel
@@ -21,7 +21,7 @@ CC_OPTS += -DVMCI
INCLUDE += -I$(SRCROOT)/shared -I$(SRCROOT)/common -I$(SRCROOT)/linux
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
obj-m += $(DRIVER).o
diff --git a/vmmon-only/Makefile.kernel b/vmmon-only/Makefile.kernel
index 8770d1d..c4746c3 100644
--- a/vmmon-only/Makefile.kernel
+++ b/vmmon-only/Makefile.kernel
@@ -22,7 +22,7 @@ CC_OPTS += -DVMMON -DVMCORE
INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux \
-I$(SRCROOT)/vmcore
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/smpcall.c, -DVMW_HAVE_SMP_CALL_3ARG, )
diff --git a/vmnet-only/Makefile.kernel b/vmnet-only/Makefile.kernel
index d1e3133..665d428 100644
--- a/vmnet-only/Makefile.kernel
+++ b/vmnet-only/Makefile.kernel
@@ -19,7 +19,7 @@
INCLUDE := -I$(SRCROOT)
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, )
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_dev_net.c,-DVMW_NETDEV_HAS_DEV_NET, )
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/nfhook_uses_skb.c,-DVMW_NFHOOK_USES_SKB, )
diff --git a/vsock-only/Makefile.kernel b/vsock-only/Makefile.kernel
index b4629ee..264b8cb 100644
--- a/vsock-only/Makefile.kernel
+++ b/vsock-only/Makefile.kernel
@@ -25,7 +25,7 @@ INCLUDE += -I$(SRCROOT)/include
INCLUDE += -I$(SRCROOT)/linux
INCLUDE += -I$(SRCROOT)/common
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/netcreate_num_params.c, -DVMW_NETCREATE_KERNARG, )

@ -1,85 +0,0 @@
diff --git a/vmblock-only/Makefile b/vmblock-only/Makefile
index 2b81323..746c8b8 100644
--- a/vmblock-only/Makefile
+++ b/vmblock-only/Makefile
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
ifdef LINUXINCLUDE
HEADER_DIR = $(LINUXINCLUDE)
else
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(KERNEL_DIR)
endif
-BUILD_DIR = $(HEADER_DIR)/..
+BUILD_DIR = $(KBUILD_OUTPUT)
DRIVER := vmblock
PRODUCT := ws
diff --git a/vmci-only/Makefile b/vmci-only/Makefile
index 8e9c5be..6ec828b 100644
--- a/vmci-only/Makefile
+++ b/vmci-only/Makefile
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
ifdef LINUXINCLUDE
HEADER_DIR = $(LINUXINCLUDE)
else
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(KERNEL_DIR)
endif
-BUILD_DIR = $(HEADER_DIR)/..
+BUILD_DIR = $(KBUILD_OUTPUT)
DRIVER := vmci
PRODUCT := ws
diff --git a/vmmon-only/Makefile b/vmmon-only/Makefile
index 5bd867b..91a83d4 100644
--- a/vmmon-only/Makefile
+++ b/vmmon-only/Makefile
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
ifdef LINUXINCLUDE
HEADER_DIR = $(LINUXINCLUDE)
else
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(KERNEL_DIR)
endif
-BUILD_DIR = $(HEADER_DIR)/..
+BUILD_DIR = $(KBUILD_OUTPUT)
DRIVER := vmmon
PRODUCT := @@PRODUCT@@
diff --git a/vmnet-only/Makefile b/vmnet-only/Makefile
index d4eb73c..c7c6d38 100644
--- a/vmnet-only/Makefile
+++ b/vmnet-only/Makefile
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
ifdef LINUXINCLUDE
HEADER_DIR = $(LINUXINCLUDE)
else
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(KERNEL_DIR)
endif
-BUILD_DIR = $(HEADER_DIR)/..
+BUILD_DIR = $(KBUILD_OUTPUT)
DRIVER := vmnet
PRODUCT := @@PRODUCT@@
diff --git a/vsock-only/Makefile b/vsock-only/Makefile
index 93dd61d..9765696 100644
--- a/vsock-only/Makefile
+++ b/vsock-only/Makefile
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
ifdef LINUXINCLUDE
HEADER_DIR = $(LINUXINCLUDE)
else
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(KERNEL_DIR)
endif
-BUILD_DIR = $(HEADER_DIR)/..
+BUILD_DIR = $(KBUILD_OUTPUT)
DRIVER := vsock
PRODUCT := ws

@ -1,24 +0,0 @@
diff --git a/vmnet-only/compat_netdevice.h b/vmnet-only/compat_netdevice.h
index 7a56304..9ff4548 100644
--- a/vmnet-only/compat_netdevice.h
+++ b/vmnet-only/compat_netdevice.h
@@ -47,6 +47,19 @@
# define net_device device
#endif
+/* it looks like these have been removed from the kernel 3.1
+ * probably because the "transition" is considered complete.
+ * so to keep this source compatible we just redefine them like they were
+ * previously
+ */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
+#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev
+ functions are available. */
+#define HAVE_FREE_NETDEV /* free_netdev() */
+#define HAVE_NETDEV_PRIV /* netdev_priv() */
+#define HAVE_NETIF_QUEUE
+#define HAVE_NET_DEVICE_OPS
+#endif
/*
* SET_MODULE_OWNER appeared sometime during 2.3.x. It was setting

@ -1,13 +0,0 @@
diff --git a/vmblock-only/linux/control.c b/vmblock-only/linux/control.c
index 79716bd..2dd83fe 100644
--- a/vmblock-only/linux/control.c
+++ b/vmblock-only/linux/control.c
@@ -293,7 +293,7 @@ ExecuteBlockOp(const char __user *buf, // IN: buffer with name
retval = i < 0 ? -EINVAL : blockOp(name, blocker);
- putname(name);
+ __putname(name);
return retval;
}

@ -1,30 +0,0 @@
diff -Naur a/linux/inode.c b/linux/inode.c
--- a/vmblock-only/linux/inode.c 2013-10-03 04:29:47.471339204 -0400
+++ b/vmblock-only/linux/inode.c 2013-10-03 04:31:56.607334636 -0400
@@ -36,7 +36,7 @@
/* Inode operations */
static struct dentry *InodeOpLookup(struct inode *dir,
- struct dentry *dentry, struct nameidata *nd);
+ struct dentry *dentry, unsigned int flags);
static int InodeOpReadlink(struct dentry *dentry, char __user *buffer, int buflen);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
@@ -75,7 +75,7 @@
static struct dentry *
InodeOpLookup(struct inode *dir, // IN: parent directory's inode
struct dentry *dentry, // IN: dentry to lookup
- struct nameidata *nd) // IN: lookup intent and information
+ unsigned int flags) // IN: lookup intent and information
{
char *filename;
struct inode *inode;
@@ -221,7 +221,7 @@
goto out;
}
- ret = vfs_follow_link(nd, iinfo->name);
+ nd_set_link(nd, iinfo->name);
out:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)

@ -1,44 +0,0 @@
diff -ru source900/vmmon-only/linux/hostif.c source/vmmon-only/linux/hostif.c
--- source900/vmmon-only/linux/hostif.c 2012-07-23 18:18:55.000000000 +0900
+++ source/vmmon-only/linux/hostif.c 2012-08-03 16:20:23.200420885 +0900
@@ -48,6 +48,7 @@
#include <linux/smp_lock.h>
#endif
+#include <asm/asm.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <linux/mc146818rtc.h>
@@ -3586,31 +3587,14 @@
{
int ret;
unsigned low, high;
-#if defined(VM_X86_64)
asm volatile("2: rdmsr ; xor %0,%0\n"
"1:\n\t"
".section .fixup,\"ax\"\n\t"
"3: mov %4,%0 ; jmp 1b\n\t"
".previous\n\t"
- ".section __ex_table,\"a\"\n\t"
- ".balign 8\n"
- ".quad 2b,3b\n"
- ".previous\n"
+ _ASM_EXTABLE(2b,3b)
: "=r"(ret), "=a"(low), "=d"(high)
: "c"(msr), "i"(-EFAULT), "1"(0), "2"(0)); // init eax/edx to 0
-#else
- asm volatile("2: rdmsr ; xor %0,%0\n"
- "1:\n\t"
- ".section .fixup,\"ax\"\n\t"
- "3: mov %4,%0 ; jmp 1b\n\t"
- ".previous\n\t"
- ".section __ex_table,\"a\"\n"
- ".balign 4\n"
- ".long 2b,3b\n"
- ".previous\n"
- : "=r"(ret), "=a"(low), "=d"(high)
- : "c"(msr), "i"(-EFAULT), "1"(0), "2"(0)); // init eax/edx to 0
-#endif // VM_X86_64
*val = (low | ((u64)(high) << 32));
return ret;

@ -1,41 +0,0 @@
correctly initializes UID/GID values
gets UID correctly in light of user namespace API
origionally from https://462666.bugs.gentoo.org/attachment.cgi?id=342888
--- a/vmblock-only/linux/inode.c 2013-03-20 17:37:48.000000000 +0100
+++ b/vmblock-only/linux/inode.c 2013-03-20 17:41:22.000000000 +0100
@@ -135,7 +135,8 @@
inode->i_size = INODE_TO_IINFO(inode)->nameLen;
inode->i_version = 1;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
- inode->i_uid = inode->i_gid = 0;
+ inode->i_uid = GLOBAL_ROOT_UID;
+ inode->i_gid = GLOBAL_ROOT_GID;
inode->i_op = &LinkInodeOps;
d_add(dentry, inode);
--- a/vmci-only/linux/driver.c 2013-03-20 17:57:35.000000000 +0100
+++ b/vmci-only/linux/driver.c 2013-03-20 17:57:43.000000000 +0100
@@ -740,7 +740,7 @@
goto init_release;
}
- user = current_uid();
+ user = from_kuid(current_user_ns(), current_uid());
retval = VMCIContext_InitContext(initBlock.cid, initBlock.flags,
0 /* Unused */, vmciLinux->userVersion,
&user, &vmciLinux->context);
--- a/vsock-only/linux/af_vsock.c 2013-03-20 18:01:48.000000000 +0100
+++ b/vsock-only/linux/af_vsock.c 2013-03-20 18:01:58.000000000 +0100
@@ -2866,7 +2866,7 @@
vsk->connectTimeout = psk->connectTimeout;
} else {
vsk->trusted = capable(CAP_NET_ADMIN);
- vsk->owner = current_uid();
+ vsk->owner = from_kuid(current_user_ns(), current_uid());
vsk->queuePairSize = VSOCK_DEFAULT_QP_SIZE;
vsk->queuePairMinSize = VSOCK_DEFAULT_QP_SIZE_MIN;
vsk->queuePairMaxSize = VSOCK_DEFAULT_QP_SIZE_MAX;

@ -1,24 +0,0 @@
uses __getname/__putname instead of getname. getname was deprecated
the new code calls __getname (which really is a specific type of
memory allocator, then copies the string safely from user space
into the allocated buffer
--- vmblock-only/linux/control.c 2014-03-15 15:28:40.871076076 +0100
+++ vmblock-only/linux/control.c.new 2014-03-15 15:29:15.079074439 +0100
@@ -279,11 +279,17 @@
int i;
int retval;
- name = getname(buf);
+ name = __getname();
if (IS_ERR(name)) {
return PTR_ERR(name);
}
+ i = strncpy_from_user(name, buf, PATH_MAX);
+ if (i < 0 || i == PATH_MAX) {
+ __putname(name);
+ return -EINVAL;
+ }
+
for (i = strlen(name) - 1; i >= 0 && name[i] == '/'; i--) {

@ -1,89 +0,0 @@
undefines DEPRECATED which is unfortunately also defined (as a string)
in <linux/printk.h>. Realistically, this macro isn't even used, so this
doesn't matter much. But it hushes some very loud warnings.
diff -rupN vmblock-only/shared/vm_assert.h vmblock-only.new/shared/vm_assert.h
--- vmblock-only/shared/vm_assert.h 2014-04-14 17:41:41.000000000 -0400
+++ vmblock-only.new/shared/vm_assert.h 2014-10-11 17:37:23.010352172 -0400
@@ -251,11 +251,13 @@ void WarningThrottled(uint32 *count, con
#define LOG_ONCE(_s) DO_ONCE(Log _s)
#ifdef VMX86_DEVEL
+ #undef DEPRECATED
#define DEPRECATED(_fix) DO_ONCE( \
Warning("%s:%d: %s is DEPRECATED. %s\n", \
__FILE__, __LINE__, __FUNCTION__, \
_fix))
#else
+ #undef DEPRECATED
#define DEPRECATED(_fix) do {} while (0)
#endif
diff -rupN vmci-only/shared/vm_assert.h vmci-only.new/shared/vm_assert.h
--- vmci-only/shared/vm_assert.h 2014-04-14 17:41:41.000000000 -0400
+++ vmci-only.new/shared/vm_assert.h 2014-10-11 17:37:08.936352130 -0400
@@ -251,11 +251,13 @@ void WarningThrottled(uint32 *count, con
#define LOG_ONCE(_s) DO_ONCE(Log _s)
#ifdef VMX86_DEVEL
+ #undef DEPRECATED
#define DEPRECATED(_fix) DO_ONCE( \
Warning("%s:%d: %s is DEPRECATED. %s\n", \
__FILE__, __LINE__, __FUNCTION__, \
_fix))
#else
+ #undef DEPRECATED
#define DEPRECATED(_fix) do {} while (0)
#endif
diff -rupN vmmon-only/include/vm_assert.h vmmon-only.new/include/vm_assert.h
--- vmmon-only/include/vm_assert.h 2014-04-14 20:06:20.000000000 -0400
+++ vmmon-only.new/include/vm_assert.h 2014-10-11 17:36:45.289352058 -0400
@@ -251,11 +251,13 @@ void WarningThrottled(uint32 *count, con
#define LOG_ONCE(_s) DO_ONCE(Log _s)
#ifdef VMX86_DEVEL
+ #undef DEPRECATED
#define DEPRECATED(_fix) DO_ONCE( \
Warning("%s:%d: %s is DEPRECATED. %s\n", \
__FILE__, __LINE__, __FUNCTION__, \
_fix))
#else
+ #undef DEPRECATED
#define DEPRECATED(_fix) do {} while (0)
#endif
diff -rupN vmnet-only/vm_assert.h vmnet-only.new/vm_assert.h
--- vmnet-only/vm_assert.h 2014-04-14 20:06:21.000000000 -0400
+++ vmnet-only.new/vm_assert.h 2014-10-11 17:37:14.364352146 -0400
@@ -251,11 +251,13 @@ void WarningThrottled(uint32 *count, con
#define LOG_ONCE(_s) DO_ONCE(Log _s)
#ifdef VMX86_DEVEL
+ #undef DEPRECATED
#define DEPRECATED(_fix) DO_ONCE( \
Warning("%s:%d: %s is DEPRECATED. %s\n", \
__FILE__, __LINE__, __FUNCTION__, \
_fix))
#else
+ #undef DEPRECATED
#define DEPRECATED(_fix) do {} while (0)
#endif
diff -rupN vsock-only/shared/vm_assert.h vsock-only.new/shared/vm_assert.h
--- vsock-only/shared/vm_assert.h 2014-04-14 17:41:41.000000000 -0400
+++ vsock-only.new/shared/vm_assert.h 2014-10-11 17:37:02.778352111 -0400
@@ -251,11 +251,13 @@ void WarningThrottled(uint32 *count, con
#define LOG_ONCE(_s) DO_ONCE(Log _s)
#ifdef VMX86_DEVEL
+ #undef DEPRECATED
#define DEPRECATED(_fix) DO_ONCE( \
Warning("%s:%d: %s is DEPRECATED. %s\n", \
__FILE__, __LINE__, __FUNCTION__, \
_fix))
#else
+ #undef DEPRECATED
#define DEPRECATED(_fix) do {} while (0)
#endif

@ -1,34 +0,0 @@
starting with kernel 3.6, d_revalidate takes an unsigned int "flags"
as the second argument, not a nameidata pointer! see fs/namei.c
for implementation
diff -Naur vmblock-only/linux/dentry.c vmblock-only/linux/dentry.c
--- vmblock-only/linux/dentry.c 2013-11-05 23:33:26.000000000 -0500
+++ vmblock-only/linux/dentry.c 2014-04-26 10:58:03.062635343 -0400
@@ -32,7 +32,7 @@
#include "block.h"
-static int DentryOpRevalidate(struct dentry *dentry, struct nameidata *nd);
+static int DentryOpRevalidate(struct dentry *dentry, unsigned int flags);
struct dentry_operations LinkDentryOps = {
.d_revalidate = DentryOpRevalidate,
@@ -60,7 +60,7 @@
static int
DentryOpRevalidate(struct dentry *dentry, // IN: dentry revalidating
- struct nameidata *nd) // IN: lookup flags & intent
+ unsigned int flags) // IN: lookup flags & intent
{
VMBlockInodeInfo *iinfo;
struct nameidata actualNd;
@@ -101,7 +101,7 @@
if (actualDentry &&
actualDentry->d_op &&
actualDentry->d_op->d_revalidate) {
- return actualDentry->d_op->d_revalidate(actualDentry, nd);
+ return actualDentry->d_op->d_revalidate(actualDentry, flags);
}
if (compat_path_lookup(iinfo->name, 0, &actualNd)) {

@ -1,36 +0,0 @@
starting with kernel 3.6, d_revalidate takes an unsigned int "flags"
as the second argument, not a nameidata pointer! see fs/namei.c
for implementation. Also changing vfs_follow_link to nd_set_link.
See: https://lkml.org/lkml/2013/9/9/236
diff -Naur vmblock-only/linux/inode.c vmblock-only/linux/inode.c
--- vmblock-only/linux/inode.c 2013-11-05 23:33:26.000000000 -0500
+++ vmblock-only/linux/inode.c 2014-04-26 10:58:03.063635343 -0400
@@ -36,7 +36,7 @@
/* Inode operations */
static struct dentry *InodeOpLookup(struct inode *dir,
- struct dentry *dentry, struct nameidata *nd);
+ struct dentry *dentry, unsigned int flags);
static int InodeOpReadlink(struct dentry *dentry, char __user *buffer, int buflen);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
@@ -75,7 +75,7 @@
static struct dentry *
InodeOpLookup(struct inode *dir, // IN: parent directory's inode
struct dentry *dentry, // IN: dentry to lookup
- struct nameidata *nd) // IN: lookup intent and information
+ unsigned int flags) // IN: lookup intent and information
{
char *filename;
struct inode *inode;
@@ -221,7 +221,8 @@
goto out;
}
- ret = vfs_follow_link(nd, iinfo->name);
+ nd_set_link(nd, iinfo->name);
+ ret = 0;
out:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)

@ -1,15 +0,0 @@
replacing usage of vfs_readlink with new readlink_copy API
see: http://permalink.gmane.org/gmane.linux.kernel.commits.head/445090
diff -rupN vmblock-only/linux/inode.c vmblock-only/linux/inode.c
--- vmblock-only/linux/inode.c 2014-10-05 23:20:14.545218357 -0400
+++ vmblock-only/linux/inode.c 2014-10-05 23:33:01.549259933 -0400
@@ -178,7 +178,7 @@ InodeOpReadlink(struct dentry *dentry,
return -EINVAL;
}
- return vfs_readlink(dentry, buffer, buflen, iinfo->name);
+ return readlink_copy(buffer, buflen, iinfo->name);
}

@ -1,46 +0,0 @@
removing the no longer existing second parameter to sk_data_ready
doesn't seem it ever served a purpose.
diff -rupN vsock-only/linux/notify.c vsock-only.new/linux/notify.c
--- vsock-only/linux/notify.c 2013-11-05 23:33:27.000000000 -0500
+++ vsock-only.new/linux/notify.c 2014-10-05 23:46:47.943304728 -0400
@@ -515,8 +515,11 @@ VSockVmciHandleWrote(struct sock *sk,
vsk = vsock_sk(sk);
PKT_FIELD(vsk, sentWaitingRead) = FALSE;
#endif
-
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
+ sk->sk_data_ready(sk);
+#else
sk->sk_data_ready(sk, 0);
+#endif
}
diff -rupN vsock-only/linux/notifyQState.c vsock-only.new/linux/notifyQState.c
--- vsock-only/linux/notifyQState.c 2013-11-05 23:33:27.000000000 -0500
+++ vsock-only.new/linux/notifyQState.c 2014-10-05 23:46:33.231303931 -0400
@@ -164,7 +164,11 @@ VSockVmciHandleWrote(struct sock *sk,
struct sockaddr_vm *dst, // IN: unused
struct sockaddr_vm *src) // IN: unused
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
+ sk->sk_data_ready(sk);
+#else
sk->sk_data_ready(sk, 0);
+#endif
}
@@ -566,7 +570,11 @@ VSockVmciNotifyPktRecvPostDequeue(struct
}
/* See the comment in VSockVmciNotifyPktSendPostEnqueue */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
+ sk->sk_data_ready(sk);
+#else
sk->sk_data_ready(sk, 0);
+#endif
}
return err;

@ -1,16 +0,0 @@
new alloc_netdev requires a new parameter. All examples in the kernel i've seen just
use the constant NET_NAME_UNKNOWN.
origionally from: https://communities.vmware.com/message/2425189
diff -rupN vmnet-only/netif.c vmnet-only.new/netif.c
--- vmnet-only/netif.c 2013-11-06 00:40:52.000000000 -0500
+++ vmnet-only.new/netif.c 2014-10-09 17:29:12.361307961 -0400
@@ -149,7 +149,7 @@ VNetNetIf_Create(char *devName, // IN:
memcpy(deviceName, devName, sizeof deviceName);
NULL_TERMINATE_STRING(deviceName);
- dev = alloc_netdev(sizeof *netIf, deviceName, VNetNetIfSetup);
+ dev = alloc_netdev(sizeof *netIf, deviceName, NET_NAME_USER, VNetNetIfSetup);
if (!dev) {
retval = -ENOMEM;
goto out;

@ -1,24 +0,0 @@
--- a/vmci-only/shared/vm_device_version.h 2015-02-07 03:11:55.000000000 +0300
+++ c/vmci-only/shared/vm_device_version.h 2015-02-24 03:58:06.041605450 +0300
@@ -53,7 +53,9 @@
* VMware HD Audio codec
* VMware HD Audio controller
*/
+#ifndef PCI_VENDOR_ID_VMWARE
#define PCI_VENDOR_ID_VMWARE 0x15AD
+#endif
#define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405
#define PCI_DEVICE_ID_VMWARE_SVGA 0x0710
#define PCI_DEVICE_ID_VMWARE_VGA 0x0711
--- a/vmnet-only/vm_device_version.h 2015-02-07 03:54:16.000000000 +0300
+++ c/vmnet-only/vm_device_version.h 2015-02-24 03:58:06.044604981 +0300
@@ -53,7 +53,9 @@
* VMware HD Audio codec
* VMware HD Audio controller
*/
+#ifndef PCI_VENDOR_ID_VMWARE
#define PCI_VENDOR_ID_VMWARE 0x15AD
+#endif
#define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405
#define PCI_DEVICE_ID_VMWARE_SVGA 0x0710
#define PCI_DEVICE_ID_VMWARE_VGA 0x0711

@ -1,23 +0,0 @@
--- a/vmblock-only/shared/compat_namei.h 2015-02-07 03:11:55.000000000 +0300
+++ c/vmblock-only/shared/compat_namei.h 2015-02-24 03:51:25.235286047 +0300
@@ -21,6 +21,20 @@
#include <linux/namei.h>
+/* Copy-n-paste from kernel's source/fs/namei.c */
+struct nameidata {
+ struct path path;
+ struct qstr last;
+ struct path root;
+ struct inode *inode; /* path.dentry.d_inode */
+ unsigned int flags;
+ unsigned seq, m_seq;
+ int last_type;
+ unsigned depth;
+ struct file *base;
+ char *saved_names[MAX_NESTED_LINKS + 1];
+};
+
/*
* In 2.6.25-rc2, dentry and mount objects were removed from the nameidata
* struct. They were both replaced with a struct path.

@ -1,13 +0,0 @@
--- a/vmnet-only/driver.c 2015-02-07 03:54:17.000000000 +0300
+++ c/vmnet-only/driver.c 2015-02-24 03:58:06.043605137 +0300
@@ -1191,8 +1191,8 @@
struct inode *inode = NULL;
long err;
- if (filp && filp->f_dentry) {
- inode = filp->f_dentry->d_inode;
+ if (filp && filp->f_path.dentry) {
+ inode = filp->f_path.dentry->d_inode;
}
err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);
return err;

@ -1,67 +0,0 @@
Sources:
https://531682.bugs.gentoo.org/attachment.cgi?id=396484
https://531682.bugs.gentoo.org/attachment.cgi?id=396482
diff -rupN vmblock-only.orig/linux/dentry.c vmblock-only/linux/dentry.c
--- vmblock-only.orig/linux/dentry.c 2015-02-14 18:05:46.000000000 -0500
+++ vmblock-only/linux/dentry.c 2015-02-14 18:09:59.000000000 -0500
@@ -63,7 +63,7 @@ DentryOpRevalidate(struct dentry *dentry
unsigned int flags) // IN: lookup flags & intent
{
VMBlockInodeInfo *iinfo;
- struct nameidata actualNd;
+ struct path actualNd;
struct dentry *actualDentry;
int ret;
diff -rupN vmblock-only.orig/linux/filesystem.c vmblock-only/linux/filesystem.c
--- vmblock-only.orig/linux/filesystem.c 2014-11-20 19:29:15.000000000 -0500
+++ vmblock-only/linux/filesystem.c 2015-02-14 18:10:49.000000000 -0500
@@ -322,7 +322,7 @@ Iget(struct super_block *sb, // IN: f
{
VMBlockInodeInfo *iinfo;
struct inode *inode;
- struct nameidata actualNd;
+ struct path actualNd;
ASSERT(sb);
diff -rupN vmblock-only.orig/shared/compat_namei.h vmblock-only/shared/compat_namei.h
--- vmblock-only.orig/shared/compat_namei.h 2014-11-20 19:29:15.000000000 -0500
+++ vmblock-only/shared/compat_namei.h 2015-02-14 18:08:38.000000000 -0500
@@ -26,21 +26,21 @@
* struct. They were both replaced with a struct path.
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
-#define compat_vmw_nd_to_dentry(nd) (nd).path.dentry
+#define compat_vmw_nd_to_dentry(nd) (nd).dentry
#else
#define compat_vmw_nd_to_dentry(nd) (nd).dentry
#endif
/* In 2.6.25-rc2, path_release(&nd) was replaced with path_put(&nd.path). */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
-#define compat_path_release(nd) path_put(&(nd)->path)
+#define compat_path_release(nd) path_put(nd)
#else
#define compat_path_release(nd) path_release(nd)
#endif
/* path_lookup was removed in 2.6.39 merge window VFS merge */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
-#define compat_path_lookup(name, flags, nd) kern_path(name, flags, &((nd)->path))
+#define compat_path_lookup(name, flags, nd) kern_path(name, flags, nd)
#else
#define compat_path_lookup(name, flags, nd) path_lookup(name, flags, nd)
#endif
diff -u vmblock-only.orig/linux/file.c vmblock-only/linux/file.c
--- vmblock-only.orig/linux/file.c 2015-02-11 12:18:29.000000000 -0500
+++ vmblock-only/linux/file.c 2015-02-11 12:41:41.000000000 -0500
@@ -92,7 +92,7 @@
* and that would try to acquire the inode's semaphore; if the two inodes
* are the same we'll deadlock.
*/
- if (actualFile->f_dentry && inode == actualFile->f_dentry->d_inode) {
+ if (actualFile->f_path.dentry && inode == actualFile->f_path.dentry->d_inode) {
Warning("FileOpOpen: identical inode encountered, open cannot succeed.\n");
if (filp_close(actualFile, current->files) < 0) {
Warning("FileOpOpen: unable to close opened file.\n");

@ -1,19 +0,0 @@
--- a/vmnet-only/userif.c 2015-02-07 03:54:17.000000000 +0300
+++ c/vmnet-only/userif.c 2015-02-24 03:58:06.043605137 +0300
@@ -523,7 +523,15 @@
.iov_base = buf,
.iov_len = len,
};
- return skb_copy_datagram_iovec(skb, 0, &iov, len);
+
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
+ return skb_copy_datagram_iovec(skb, 0, &iov, len);
+#else
+ struct iov_iter to;
+ iov_iter_init(&to, READ, &iov, 1, len);
+ return skb_copy_datagram_iter(skb, 0, &to, len);
+#endif
}

@ -1,39 +0,0 @@
diff -rupN vmci-only.old/linux/vmciKernelIf.c vmci-only/linux/vmciKernelIf.c
--- vmci-only.old/linux/vmciKernelIf.c 2015-04-28 18:05:56.000000000 +0000
+++ vmci-only/linux/vmciKernelIf.c 2015-07-06 08:02:08.314262258 +0000
@@ -40,6 +40,7 @@
#include <linux/socket.h> /* For memcpy_{to,from}iovec(). */
#include <linux/vmalloc.h>
#include <linux/wait.h>
+#include <linux/skbuff.h>
#include "compat_highmem.h"
#include "compat_interrupt.h"
@@ -1227,11 +1228,11 @@ __VMCIMemcpyToQueue(VMCIQueue *queue,
}
if (isIovec) {
- struct iovec *iov = (struct iovec *)src;
+ struct msghdr *msg = (struct msghdr *)src;
int err;
/* The iovec will track bytesCopied internally. */
- err = memcpy_fromiovec((uint8 *)va + pageOffset, iov, toCopy);
+ err = memcpy_from_msg((u8 *)va + pageOffset, msg, toCopy);
if (err != 0) {
if (!kernelIf->isDataMapped) {
kunmap(kernelIf->page[pageIndex]);
@@ -1302,11 +1303,11 @@ __VMCIMemcpyFromQueue(void *dest,
}
if (isIovec) {
- struct iovec *iov = (struct iovec *)dest;
+ struct msghdr *msg = (struct msghdr *)dest;
int err;
/* The iovec will track bytesCopied internally. */
- err = memcpy_toiovec(iov, (uint8 *)va + pageOffset, toCopy);
+ err = memcpy_to_msg(msg, (uint8 *)va + pageOffset, toCopy);
if (err != 0) {
if (!kernelIf->isDataMapped) {
kunmap(kernelIf->page[pageIndex]);

@ -1,24 +0,0 @@
diff -rupN vsock-only.old/linux/af_vsock.c vsock-only/linux/af_vsock.c
--- vsock-only.old/linux/af_vsock.c 2015-05-06 20:41:47.684046762 -0400
+++ vsock-only/linux/af_vsock.c 2015-05-06 20:52:15.245080779 -0400
@@ -4629,7 +4629,7 @@ VSockVmciStreamSendmsg(struct kiocb *kio
* able to send.
*/
- written = vmci_qpair_enquev(vsk->qpair, msg->msg_iov,
+ written = vmci_qpair_enquev(vsk->qpair, &msg->msg_iter.iov,
len - totalWritten, 0);
if (written < 0) {
err = -ENOMEM;
@@ -4874,9 +4874,9 @@ VSockVmciStreamRecvmsg(struct kiocb *kio
}
if (flags & MSG_PEEK) {
- read = vmci_qpair_peekv(vsk->qpair, msg->msg_iov, len - copied, 0);
+ read = vmci_qpair_peekv(vsk->qpair, &msg->msg_iter.iov, len - copied, 0);
} else {
- read = vmci_qpair_dequev(vsk->qpair, msg->msg_iov, len - copied, 0);
+ read = vmci_qpair_dequev(vsk->qpair, &msg->msg_iter.iov, len - copied, 0);
}
if (read < 0) {

@ -1,15 +0,0 @@
diff -rupN vsock-only/linux/af_vsock.c vsock-only.new/linux/af_vsock.c
--- vsock-only/linux/af_vsock.c 2015-05-05 11:31:35.710099711 -0400
+++ vsock-only.new/linux/af_vsock.c 2015-05-05 11:36:33.260115840 -0400
@@ -4727,7 +4727,11 @@ VSockVmciDgramRecvmsg(struct kiocb *kioc
}
/* Place the datagram payload in the user's iovec. */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
err = skb_copy_datagram_iovec(skb, sizeof *dg, msg->msg_iov, payloadLen);
+#else
+ err = skb_copy_datagram_iter(skb, sizeof *dg, &msg->msg_iter, payloadLen);
+#endif
if (err) {
goto out;
}

@ -1,12 +0,0 @@
diff -rupN vsock-only/linux/af_vsock.c vsock-only.new/linux/af_vsock.c
--- vsock-only/linux/af_vsock.c 2015-05-05 11:26:05.145081792 -0400
+++ vsock-only.new/linux/af_vsock.c 2015-05-05 11:30:54.304097466 -0400
@@ -4266,7 +4266,7 @@ VSockVmciDgramSendmsg(struct kiocb *kioc
goto out;
}
- memcpy_fromiovec(VMCI_DG_PAYLOAD(dg), msg->msg_iov, len);
+ memcpy_from_msg(VMCI_DG_PAYLOAD(dg), msg, len);
dg->dst = VMCI_MAKE_HANDLE(remoteAddr->svm_cid, remoteAddr->svm_port);
dg->src = VMCI_MAKE_HANDLE(vsk->localAddr.svm_cid, vsk->localAddr.svm_port);

@ -1,79 +0,0 @@
See https://bugs.gentoo.org/show_bug.cgi?id=559602
Patch by Mike Auty <ikelos@gentoo.org>
diff --git a/vmblock-only/linux/inode.c b/vmblock-only/linux/inode.c
index 4811abd..2cbc1f6 100644
--- a/vmblock-only/linux/inode.c
+++ b/vmblock-only/linux/inode.c
@@ -38,7 +38,9 @@
static struct dentry *InodeOpLookup(struct inode *dir,
struct dentry *dentry, unsigned int flags);
static int InodeOpReadlink(struct dentry *dentry, char __user *buffer, int buflen);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
+static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
#else
static int InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
@@ -207,7 +209,12 @@ static void *
static int
#endif
InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink
- struct nameidata *nd) // OUT: stores result
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
+ void **cookie
+#else
+ struct nameidata *nd
+#endif
+ ) // OUT: stores result
{
int ret;
VMBlockInodeInfo *iinfo;
diff --git a/vmblock-only/linux/inode.c b/vmblock-only/linux/inode.c
index acb2803..4811abd 100644
--- a/vmblock-only/linux/inode.c
+++ b/vmblock-only/linux/inode.c
@@ -199,7 +199,9 @@ InodeOpReadlink(struct dentry *dentry, // IN : dentry of symlink
*----------------------------------------------------------------------------
*/
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
+static const char *
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
static void *
#else
static int
@@ -222,8 +224,12 @@ InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink
goto out;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
+ return *cookie = (char *)(iinfo->name);
+#else
nd_set_link(nd, iinfo->name);
ret = 0;
+#endif
out:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
diff --git a/vmnet-only/vmnetInt.h b/vmnet-only/vmnetInt.h
index 23b5d19..d129f7b 100644
--- a/vmnet-only/vmnetInt.h
+++ b/vmnet-only/vmnetInt.h
@@ -78,8 +78,13 @@
extern struct proto vmnet_proto;
#ifdef VMW_NETDEV_HAS_NET
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \
- PF_NETLINK, _pri, &vmnet_proto)
+ PF_NETLINK, _pri, &vmnet_proto, 1)
+# else
+# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \
+ PF_NETLINK, _pri, &vmnet_proto)
+# endif
#else
# define compat_sk_alloc(_bri, _pri) sk_alloc(PF_NETLINK, _pri, &vmnet_proto, 1)
#endif

@ -1,16 +0,0 @@
correctly initializes UID/GID values
gets UID correctly in light of user namespace API
origionally from https://462666.bugs.gentoo.org/attachment.cgi?id=342888
--- a/vmblock-only/linux/inode.c 2013-03-20 17:37:48.000000000 +0100
+++ b/vmblock-only/linux/inode.c 2013-03-20 17:41:22.000000000 +0100
@@ -135,7 +135,8 @@
inode->i_size = INODE_TO_IINFO(inode)->nameLen;
inode->i_version = 1;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
- inode->i_uid = inode->i_gid = 0;
+ inode->i_uid = GLOBAL_ROOT_UID;
+ inode->i_gid = GLOBAL_ROOT_GID;
inode->i_op = &LinkInodeOps;
d_add(dentry, inode);

@ -1,12 +0,0 @@
diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
index f1f4b10..c43242f 100644
--- a/vmmon-only/linux/hostif.c
+++ b/vmmon-only/linux/hostif.c
@@ -55,6 +55,7 @@
#include <linux/kthread.h>
#include <linux/wait.h>
+#include <asm/apic.h>
#include "vmware.h"
#include "x86apic.h"

@ -1,91 +0,0 @@
diff --git a/vmblock-only/linux/file.c b/vmblock-only/linux/file.c
index d7ac1f6..5499169 100644
--- a/vmblock-only/linux/file.c
+++ b/vmblock-only/linux/file.c
@@ -38,46 +38,6 @@ typedef u64 inode_num_t;
typedef ino_t inode_num_t;
#endif
-/* Specifically for our filldir_t callback */
-typedef struct FilldirInfo {
- filldir_t filldir;
- void *dirent;
-} FilldirInfo;
-
-
-/*
- *----------------------------------------------------------------------------
- *
- * Filldir --
- *
- * Callback function for readdir that we use in place of the one provided.
- * This allows us to specify that each dentry is a symlink, but pass through
- * everything else to the original filldir function.
- *
- * Results:
- * Original filldir's return value.
- *
- * Side effects:
- * Directory information gets copied to user's buffer.
- *
- *----------------------------------------------------------------------------
- */
-
-static int
-Filldir(void *buf, // IN: Dirent buffer passed from FileOpReaddir
- const char *name, // IN: Dirent name
- int namelen, // IN: len of dirent's name
- loff_t offset, // IN: Offset
- inode_num_t ino, // IN: Inode number of dirent
- unsigned int d_type) // IN: Type of file
-{
- FilldirInfo *info = buf;
-
- /* Specify DT_LNK regardless */
- return info->filldir(info->dirent, name, namelen, offset, ino, DT_LNK);
-}
-
-
/* File operations */
/*
@@ -166,11 +126,10 @@ FileOpOpen(struct inode *inode, // IN
static int
FileOpReaddir(struct file *file, // IN
- void *dirent, // IN
- filldir_t filldir) // IN
+ struct dir_context *ctx) // IN
{
int ret;
- FilldirInfo info;
+
struct file *actualFile;
if (!file) {
@@ -184,12 +143,10 @@ FileOpReaddir(struct file *file, // IN
return -EINVAL;
}
- info.filldir = filldir;
- info.dirent = dirent;
-
- actualFile->f_pos = file->f_pos;
- ret = vfs_readdir(actualFile, Filldir, &info);
- file->f_pos = actualFile->f_pos;
+ /* Ricky Wong Yung Fei:
+ * Manipulation of pos is now handled internally by iterate_dir().
+ */
+ ret = iterate_dir(actualFile, ctx);
return ret;
}
@@ -237,7 +194,7 @@ FileOpRelease(struct inode *inode, // IN
struct file_operations RootFileOps = {
- .readdir = FileOpReaddir,
+ .iterate = FileOpReaddir,
.open = FileOpOpen,
.release = FileOpRelease,
};

@ -1,113 +0,0 @@
diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c
index b21dd44..960c2aa 100644
--- a/vmmon-only/linux/driver.c
+++ b/vmmon-only/linux/driver.c
@@ -178,7 +178,22 @@ static struct vm_operations_struct vmuser_mops = {
#endif
};
-static struct file_operations vmuser_fops;
+static struct file_operations vmuser_fops = {
+ .owner = THIS_MODULE,
+ .poll = LinuxDriverPoll,
+#ifdef HAVE_UNLOCKED_IOCTL
+ .unlocked_ioctl = LinuxDriver_UnlockedIoctl,
+#else
+ .ioctl = LinuxDriver_Ioctl,
+#endif
+#ifdef HAVE_COMPAT_IOCTL
+ .compat_ioctl = LinuxDriver_UnlockedIoctl,
+#endif
+ .open = LinuxDriver_Open,
+ .release = LinuxDriver_Close,
+ .mmap = LinuxDriverMmap
+};
+
static struct timer_list tscTimer;
/*
@@ -357,27 +372,6 @@ init_module(void)
spin_lock_init(&linuxState.pollListLock);
#endif
- /*
- * Initialize the file_operations structure. Because this code is always
- * compiled as a module, this is fine to do it here and not in a static
- * initializer.
- */
-
- memset(&vmuser_fops, 0, sizeof vmuser_fops);
- vmuser_fops.owner = THIS_MODULE;
- vmuser_fops.poll = LinuxDriverPoll;
-#ifdef HAVE_UNLOCKED_IOCTL
- vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl;
-#else
- vmuser_fops.ioctl = LinuxDriver_Ioctl;
-#endif
-#ifdef HAVE_COMPAT_IOCTL
- vmuser_fops.compat_ioctl = LinuxDriver_UnlockedIoctl;
-#endif
- vmuser_fops.open = LinuxDriver_Open;
- vmuser_fops.release = LinuxDriver_Close;
- vmuser_fops.mmap = LinuxDriverMmap;
-
#ifdef VMX86_DEVEL
devel_init_module();
linuxState.minor = 0;
diff --git a/vmnet-only/driver.c b/vmnet-only/driver.c
index b12b982..40bd4cf 100644
--- a/vmnet-only/driver.c
+++ b/vmnet-only/driver.c
@@ -165,7 +165,22 @@ static long VNetFileOpUnlockedIoctl(struct file * filp,
unsigned int iocmd, unsigned long ioarg);
#endif
-static struct file_operations vnetFileOps;
+static struct file_operations vnetFileOps = {
+ .owner = THIS_MODULE,
+ .read = VNetFileOpRead,
+ .write = VNetFileOpWrite,
+ .poll = VNetFileOpPoll,
+#ifdef HAVE_UNLOCKED_IOCTL
+ .unlocked_ioctl = VNetFileOpUnlockedIoctl,
+#else
+ .ioctl = VNetFileOpIoctl,
+#endif
+#ifdef HAVE_COMPAT_IOCTL
+ .compat_ioctl = VNetFileOpUnlockedIoctl,
+#endif
+ .open = VNetFileOpOpen,
+ .release = VNetFileOpClose
+};
/*
* Utility functions
@@ -476,28 +491,6 @@ init_module(void)
goto err_proto;
}
- /*
- * Initialize the file_operations structure. Because this code is always
- * compiled as a module, this is fine to do it here and not in a static
- * initializer.
- */
-
- memset(&vnetFileOps, 0, sizeof vnetFileOps);
- vnetFileOps.owner = THIS_MODULE;
- vnetFileOps.read = VNetFileOpRead;
- vnetFileOps.write = VNetFileOpWrite;
- vnetFileOps.poll = VNetFileOpPoll;
-#ifdef HAVE_UNLOCKED_IOCTL
- vnetFileOps.unlocked_ioctl = VNetFileOpUnlockedIoctl;
-#else
- vnetFileOps.ioctl = VNetFileOpIoctl;
-#endif
-#ifdef HAVE_COMPAT_IOCTL
- vnetFileOps.compat_ioctl = VNetFileOpUnlockedIoctl;
-#endif
- vnetFileOps.open = VNetFileOpOpen;
- vnetFileOps.release = VNetFileOpClose;
-
retval = register_chrdev(VNET_MAJOR_NUMBER, "vmnet", &vnetFileOps);
if (retval) {
LOG(0, (KERN_NOTICE "/dev/vmnet: could not register major device %d\n",

@ -1,65 +0,0 @@
diff --git a/vmblock-only/Makefile.kernel b/vmblock-only/Makefile.kernel
index ab7a727..e3ec9d2 100644
--- a/vmblock-only/Makefile.kernel
+++ b/vmblock-only/Makefile.kernel
@@ -19,7 +19,7 @@
INCLUDE += -I$(SRCROOT)/include
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachecreate.c, -DVMW_KMEMCR_HAS_DTOR, )
EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachector.c, -DVMW_KMEMCR_CTOR_HAS_3_ARGS, )
diff --git a/vmci-only/Makefile.kernel b/vmci-only/Makefile.kernel
index ba343ee..861ea83 100644
--- a/vmci-only/Makefile.kernel
+++ b/vmci-only/Makefile.kernel
@@ -21,7 +21,7 @@ CC_OPTS += -DVMCI
INCLUDE += -I$(SRCROOT)/shared -I$(SRCROOT)/common -I$(SRCROOT)/linux
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
obj-m += $(DRIVER).o
diff --git a/vmmon-only/Makefile.kernel b/vmmon-only/Makefile.kernel
index 8770d1d..c4746c3 100644
--- a/vmmon-only/Makefile.kernel
+++ b/vmmon-only/Makefile.kernel
@@ -22,7 +22,7 @@ CC_OPTS += -DVMMON -DVMCORE
INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux \
-I$(SRCROOT)/vmcore
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/smpcall.c, -DVMW_HAVE_SMP_CALL_3ARG, )
diff --git a/vmnet-only/Makefile.kernel b/vmnet-only/Makefile.kernel
index d1e3133..665d428 100644
--- a/vmnet-only/Makefile.kernel
+++ b/vmnet-only/Makefile.kernel
@@ -19,7 +19,7 @@
INCLUDE := -I$(SRCROOT)
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, )
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_dev_net.c,-DVMW_NETDEV_HAS_DEV_NET, )
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/nfhook_uses_skb.c,-DVMW_NFHOOK_USES_SKB, )
diff --git a/vsock-only/Makefile.kernel b/vsock-only/Makefile.kernel
index b4629ee..264b8cb 100644
--- a/vsock-only/Makefile.kernel
+++ b/vsock-only/Makefile.kernel
@@ -25,7 +25,7 @@ INCLUDE += -I$(SRCROOT)/include
INCLUDE += -I$(SRCROOT)/linux
INCLUDE += -I$(SRCROOT)/common
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/netcreate_num_params.c, -DVMW_NETCREATE_KERNARG, )

@ -1,85 +0,0 @@
diff --git a/vmblock-only/Makefile b/vmblock-only/Makefile
index 2b81323..746c8b8 100644
--- a/vmblock-only/Makefile
+++ b/vmblock-only/Makefile
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
ifdef LINUXINCLUDE
HEADER_DIR = $(LINUXINCLUDE)
else
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(KERNEL_DIR)
endif
-BUILD_DIR = $(HEADER_DIR)/..
+BUILD_DIR = $(KBUILD_OUTPUT)
DRIVER := vmblock
PRODUCT := ws
diff --git a/vmci-only/Makefile b/vmci-only/Makefile
index 8e9c5be..6ec828b 100644
--- a/vmci-only/Makefile
+++ b/vmci-only/Makefile
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
ifdef LINUXINCLUDE
HEADER_DIR = $(LINUXINCLUDE)
else
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(KERNEL_DIR)
endif
-BUILD_DIR = $(HEADER_DIR)/..
+BUILD_DIR = $(KBUILD_OUTPUT)
DRIVER := vmci
PRODUCT := ws
diff --git a/vmmon-only/Makefile b/vmmon-only/Makefile
index 5bd867b..91a83d4 100644
--- a/vmmon-only/Makefile
+++ b/vmmon-only/Makefile
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
ifdef LINUXINCLUDE
HEADER_DIR = $(LINUXINCLUDE)
else
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(KERNEL_DIR)
endif
-BUILD_DIR = $(HEADER_DIR)/..
+BUILD_DIR = $(KBUILD_OUTPUT)
DRIVER := vmmon
PRODUCT := @@PRODUCT@@
diff --git a/vmnet-only/Makefile b/vmnet-only/Makefile
index d4eb73c..c7c6d38 100644
--- a/vmnet-only/Makefile
+++ b/vmnet-only/Makefile
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
ifdef LINUXINCLUDE
HEADER_DIR = $(LINUXINCLUDE)
else
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(KERNEL_DIR)
endif
-BUILD_DIR = $(HEADER_DIR)/..
+BUILD_DIR = $(KBUILD_OUTPUT)
DRIVER := vmnet
PRODUCT := @@PRODUCT@@
diff --git a/vsock-only/Makefile b/vsock-only/Makefile
index 93dd61d..9765696 100644
--- a/vsock-only/Makefile
+++ b/vsock-only/Makefile
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
ifdef LINUXINCLUDE
HEADER_DIR = $(LINUXINCLUDE)
else
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
+HEADER_DIR = $(KERNEL_DIR)
endif
-BUILD_DIR = $(HEADER_DIR)/..
+BUILD_DIR = $(KBUILD_OUTPUT)
DRIVER := vsock
PRODUCT := ws

@ -1,24 +0,0 @@
diff --git a/vmnet-only/compat_netdevice.h b/vmnet-only/compat_netdevice.h
index 7a56304..9ff4548 100644
--- a/vmnet-only/compat_netdevice.h
+++ b/vmnet-only/compat_netdevice.h
@@ -47,6 +47,19 @@
# define net_device device
#endif
+/* it looks like these have been removed from the kernel 3.1
+ * probably because the "transition" is considered complete.
+ * so to keep this source compatible we just redefine them like they were
+ * previously
+ */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
+#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev
+ functions are available. */
+#define HAVE_FREE_NETDEV /* free_netdev() */
+#define HAVE_NETDEV_PRIV /* netdev_priv() */
+#define HAVE_NETIF_QUEUE
+#define HAVE_NET_DEVICE_OPS
+#endif
/*
* SET_MODULE_OWNER appeared sometime during 2.3.x. It was setting

@ -1,13 +0,0 @@
diff --git a/vmblock-only/linux/control.c b/vmblock-only/linux/control.c
index 79716bd..2dd83fe 100644
--- a/vmblock-only/linux/control.c
+++ b/vmblock-only/linux/control.c
@@ -293,7 +293,7 @@ ExecuteBlockOp(const char __user *buf, // IN: buffer with name
retval = i < 0 ? -EINVAL : blockOp(name, blocker);
- putname(name);
+ __putname(name);
return retval;
}

@ -1,30 +0,0 @@
diff -Naur a/linux/inode.c b/linux/inode.c
--- a/vmblock-only/linux/inode.c 2013-10-03 04:29:47.471339204 -0400
+++ b/vmblock-only/linux/inode.c 2013-10-03 04:31:56.607334636 -0400
@@ -36,7 +36,7 @@
/* Inode operations */
static struct dentry *InodeOpLookup(struct inode *dir,
- struct dentry *dentry, struct nameidata *nd);
+ struct dentry *dentry, unsigned int flags);
static int InodeOpReadlink(struct dentry *dentry, char __user *buffer, int buflen);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
@@ -75,7 +75,7 @@
static struct dentry *
InodeOpLookup(struct inode *dir, // IN: parent directory's inode
struct dentry *dentry, // IN: dentry to lookup
- struct nameidata *nd) // IN: lookup intent and information
+ unsigned int flags) // IN: lookup intent and information
{
char *filename;
struct inode *inode;
@@ -221,7 +221,7 @@
goto out;
}
- ret = vfs_follow_link(nd, iinfo->name);
+ nd_set_link(nd, iinfo->name);
out:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)

@ -1,23 +0,0 @@
diff -ruN work.orig/vmblock-only/linux/control.c work/vmblock-only/linux/control.c
--- work.orig/vmblock-only/linux/control.c 2013-11-02 18:05:39.960226399 +0100
+++ work/vmblock-only/linux/control.c 2013-11-02 18:09:11.760231432 +0100
@@ -208,17 +208,14 @@
VMBlockSetProcEntryOwner(controlProcMountpoint);
/* Create /proc/fs/vmblock/dev */
- controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME,
- VMBLOCK_CONTROL_MODE,
- controlProcDirEntry);
- if (!controlProcEntry) {
+ controlProcEntry = proc_create(VMBLOCK_CONTROL_DEVNAME, VMBLOCK_CONTROL_MODE, controlProcDirEntry, &ControlFileOps);
+ if (controlProcEntry == NULL) {
Warning("SetupProcDevice: could not create " VMBLOCK_DEVICE "\n");
remove_proc_entry(VMBLOCK_CONTROL_MOUNTPOINT, controlProcDirEntry);
remove_proc_entry(VMBLOCK_CONTROL_PROC_DIRNAME, NULL);
return -EINVAL;
}
- controlProcEntry->proc_fops = &ControlFileOps;
return 0;
}

@ -1,43 +0,0 @@
Minor change the API, now it just gets passed flags instead of a pointer to the nameidata
--- a/vmblock-only/linux/dentry.c 2015-02-07 03:11:55.000000000 +0300
+++ c/vmblock-only/linux/dentry.c 2015-02-24 03:58:06.038605919 +0300
@@ -32,7 +32,11 @@
#include "block.h"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
static int DentryOpRevalidate(struct dentry *dentry, struct nameidata *nd);
+#else
+static int DentryOpRevalidate(struct dentry *dentry, unsigned int);
+#endif
struct dentry_operations LinkDentryOps = {
.d_revalidate = DentryOpRevalidate,
@@ -58,9 +62,12 @@
*----------------------------------------------------------------------------
*/
-static int
-DentryOpRevalidate(struct dentry *dentry, // IN: dentry revalidating
- struct nameidata *nd) // IN: lookup flags & intent
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+static int DentryOpRevalidate(struct dentry *dentry, struct nameidata *nd)
+#else
+static int DentryOpRevalidate(struct dentry *dentry, unsigned int flags)
+#endif
+
{
VMBlockInodeInfo *iinfo;
struct nameidata actualNd;
@@ -101,7 +108,11 @@
if (actualDentry &&
actualDentry->d_op &&
actualDentry->d_op->d_revalidate) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
+ return actualDentry->d_op->d_revalidate(actualDentry, flags);
+#else
return actualDentry->d_op->d_revalidate(actualDentry, nd);
+#endif
}
if (compat_path_lookup(iinfo->name, 0, &actualNd)) {

@ -1,94 +0,0 @@
Minor change the API, now it just gets passed flags instead of a pointer to the nameidata
Properly initializes UID/GID with repsect to namespaces
Some changes the readlink/setlink APIs
--- a/vmblock-only/linux/inode.c 2015-02-07 03:11:55.000000000 +0300
+++ c/vmblock-only/linux/inode.c 2015-02-24 03:58:06.039605762 +0300
@@ -35,9 +35,15 @@
/* Inode operations */
-static struct dentry *InodeOpLookup(struct inode *dir,
- struct dentry *dentry, struct nameidata *nd);
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+static struct dentry *InodeOpLookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd);
static int InodeOpReadlink(struct dentry *dentry, char __user *buffer, int buflen);
+#else
+static struct dentry *InodeOpLookup(struct inode *, struct dentry *, unsigned int);
+static int InodeOpReadlink(struct dentry *, char __user *, int);
+#endif
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
#else
@@ -49,12 +55,15 @@
.lookup = InodeOpLookup,
};
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
static struct inode_operations LinkInodeOps = {
+#else
+struct inode_operations LinkInodeOps = {
+#endif
.readlink = InodeOpReadlink,
.follow_link = InodeOpFollowlink,
};
-
/*
*----------------------------------------------------------------------------
*
@@ -75,7 +84,11 @@
static struct dentry *
InodeOpLookup(struct inode *dir, // IN: parent directory's inode
struct dentry *dentry, // IN: dentry to lookup
- struct nameidata *nd) // IN: lookup intent and information
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ struct nameidata *nd) // IN: lookup intent and information
+#else
+ unsigned int flags)
+#endif
{
char *filename;
struct inode *inode;
@@ -135,7 +148,12 @@
inode->i_size = INODE_TO_IINFO(inode)->nameLen;
inode->i_version = 1;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
inode->i_uid = inode->i_gid = 0;
+#else
+ inode->i_gid = make_kgid(current_user_ns(), 0);
+ inode->i_uid = make_kuid(current_user_ns(), 0);
+#endif
inode->i_op = &LinkInodeOps;
d_add(dentry, inode);
@@ -177,7 +195,12 @@
return -EINVAL;
}
- return vfs_readlink(dentry, buffer, buflen, iinfo->name);
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(3, 14, 99)
+ return vfs_readlink(dentry, buffer, buflen, iinfo->name);
+#else
+ return readlink_copy(buffer, buflen, iinfo->name);
+#endif
+
}
@@ -221,7 +244,7 @@
goto out;
}
- ret = vfs_follow_link(nd, iinfo->name);
+ nd_set_link(nd, iinfo->name);
out:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
@@ -230,3 +253,4 @@
return ret;
#endif
}
+

@ -1,57 +0,0 @@
The API to create proc entries now takes the file ops structure directly, instead of being set after the fact
Using new __getname/__putname API
--- a/vmblock-only/linux/control.c 2015-02-07 03:11:55.000000000 +0300
+++ c/vmblock-only/linux/control.c 2015-02-24 03:58:06.038605919 +0300
@@ -208,9 +208,11 @@
VMBlockSetProcEntryOwner(controlProcMountpoint);
/* Create /proc/fs/vmblock/dev */
- controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME,
- VMBLOCK_CONTROL_MODE,
- controlProcDirEntry);
+ controlProcEntry = proc_create(VMBLOCK_CONTROL_DEVNAME,
+ VMBLOCK_CONTROL_MODE,
+ controlProcDirEntry,
+ &ControlFileOps);
+
if (!controlProcEntry) {
Warning("SetupProcDevice: could not create " VMBLOCK_DEVICE "\n");
remove_proc_entry(VMBLOCK_CONTROL_MOUNTPOINT, controlProcDirEntry);
@@ -218,7 +220,10 @@
return -EINVAL;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
controlProcEntry->proc_fops = &ControlFileOps;
+#endif
+
return 0;
}
@@ -287,18 +287,24 @@ ExecuteBlockOp(const char __user *buf,
int i;
int retval;
- name = getname(buf);
+ name = __getname();
if (IS_ERR(name)) {
return PTR_ERR(name);
}
+ i = strncpy_from_user(name, buf, PATH_MAX);
+ if (i < 0 || i == PATH_MAX) {
+ __putname(name);
+ return -EINVAL;
+ }
+
for (i = strlen(name) - 1; i >= 0 && name[i] == '/'; i--) {
name[i] = '\0';
}
retval = i < 0 ? -EINVAL : blockOp(name, blocker);
- putname(name);
+ __putname(name);
return retval;
}

@ -1,14 +0,0 @@
Hushes a warning
--- a/vmmon-only/linux/driver.c 2015-02-07 03:54:16.000000000 +0300
+++ c/vmmon-only/linux/driver.c 2015-02-24 03:58:06.042605293 +0300
@@ -1328,7 +1328,9 @@
*-----------------------------------------------------------------------------
*/
-__attribute__((always_inline)) static Bool
+#include <linux/compiler-gcc.h>
+
+__always_inline static Bool
LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max - TSC min
{
TSCDelta tscDelta;

@ -1,41 +0,0 @@
replaces usage of vfs_readdir with iterate_dir. origionally found here:
https://bugs.gentoo.org/show_bug.cgi?id=508204
diff -Naur vmblock-only/linux/file.c vmblock-only/linux/file.c
--- vmblock-only/linux/file.c 2013-11-05 23:33:26.000000000 -0500
+++ vmblock-only/linux/file.c 2014-04-26 10:58:03.062635343 -0400
@@ -166,11 +166,9 @@
static int
FileOpReaddir(struct file *file, // IN
- void *dirent, // IN
- filldir_t filldir) // IN
+ struct dir_context *ctx)
{
int ret;
- FilldirInfo info;
struct file *actualFile;
if (!file) {
@@ -184,11 +182,8 @@
return -EINVAL;
}
- info.filldir = filldir;
- info.dirent = dirent;
-
actualFile->f_pos = file->f_pos;
- ret = vfs_readdir(actualFile, Filldir, &info);
+ ret = iterate_dir(actualFile, ctx);
file->f_pos = actualFile->f_pos;
return ret;
@@ -237,7 +232,7 @@
struct file_operations RootFileOps = {
- .readdir = FileOpReaddir,
+ .iterate = FileOpReaddir,
.open = FileOpOpen,
.release = FileOpRelease,
};

@ -1,53 +0,0 @@
simply remove the code for Filldir since it is no longer used with the new
iterate_dir API
diff -rupN vmblock-only/linux/file.c vmblock-only.new/linux/file.c
--- vmblock-only/linux/file.c 2014-10-07 23:22:46.832469618 -0400
+++ vmblock-only.new/linux/file.c 2014-10-07 23:24:35.276472720 -0400
@@ -38,46 +38,6 @@ typedef u64 inode_num_t;
typedef ino_t inode_num_t;
#endif
-/* Specifically for our filldir_t callback */
-typedef struct FilldirInfo {
- filldir_t filldir;
- void *dirent;
-} FilldirInfo;
-
-
-/*
- *----------------------------------------------------------------------------
- *
- * Filldir --
- *
- * Callback function for readdir that we use in place of the one provided.
- * This allows us to specify that each dentry is a symlink, but pass through
- * everything else to the original filldir function.
- *
- * Results:
- * Original filldir's return value.
- *
- * Side effects:
- * Directory information gets copied to user's buffer.
- *
- *----------------------------------------------------------------------------
- */
-
-static int
-Filldir(void *buf, // IN: Dirent buffer passed from FileOpReaddir
- const char *name, // IN: Dirent name
- int namelen, // IN: len of dirent's name
- loff_t offset, // IN: Offset
- inode_num_t ino, // IN: Inode number of dirent
- unsigned int d_type) // IN: Type of file
-{
- FilldirInfo *info = buf;
-
- /* Specify DT_LNK regardless */
- return info->filldir(info->dirent, name, namelen, offset, ino, DT_LNK);
-}
-
-
/* File operations */
/*

@ -1,46 +0,0 @@
removing the no longer existing second parameter to sk_data_ready
doesn't seem it ever served a purpose.
diff -rupN vsock-only/linux/notify.c vsock-only.new/linux/notify.c
--- vsock-only/linux/notify.c 2013-11-05 23:33:27.000000000 -0500
+++ vsock-only.new/linux/notify.c 2014-10-05 23:46:47.943304728 -0400
@@ -515,8 +515,11 @@ VSockVmciHandleWrote(struct sock *sk,
vsk = vsock_sk(sk);
PKT_FIELD(vsk, sentWaitingRead) = FALSE;
#endif
-
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
+ sk->sk_data_ready(sk);
+#else
sk->sk_data_ready(sk, 0);
+#endif
}
diff -rupN vsock-only/linux/notifyQState.c vsock-only.new/linux/notifyQState.c
--- vsock-only/linux/notifyQState.c 2013-11-05 23:33:27.000000000 -0500
+++ vsock-only.new/linux/notifyQState.c 2014-10-05 23:46:33.231303931 -0400
@@ -164,7 +164,11 @@ VSockVmciHandleWrote(struct sock *sk,
struct sockaddr_vm *dst, // IN: unused
struct sockaddr_vm *src) // IN: unused
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
+ sk->sk_data_ready(sk);
+#else
sk->sk_data_ready(sk, 0);
+#endif
}
@@ -566,7 +570,11 @@ VSockVmciNotifyPktRecvPostDequeue(struct
}
/* See the comment in VSockVmciNotifyPktSendPostEnqueue */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
+ sk->sk_data_ready(sk);
+#else
sk->sk_data_ready(sk, 0);
+#endif
}
return err;

@ -1,25 +0,0 @@
Hushes some (but not all warnings) relating to redefinitions of this define
--- a/vmci-only/shared/vm_device_version.h 2015-02-07 03:11:55.000000000 +0300
+++ c/vmci-only/shared/vm_device_version.h 2015-02-24 03:58:06.041605450 +0300
@@ -53,7 +53,9 @@
* VMware HD Audio codec
* VMware HD Audio controller
*/
+#ifndef PCI_VENDOR_ID_VMWARE
#define PCI_VENDOR_ID_VMWARE 0x15AD
+#endif
#define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405
#define PCI_DEVICE_ID_VMWARE_SVGA 0x0710
#define PCI_DEVICE_ID_VMWARE_VGA 0x0711
--- a/vmnet-only/vm_device_version.h 2015-02-07 03:54:16.000000000 +0300
+++ c/vmnet-only/vm_device_version.h 2015-02-24 03:58:06.044604981 +0300
@@ -53,7 +53,9 @@
* VMware HD Audio codec
* VMware HD Audio controller
*/
+#ifndef PCI_VENDOR_ID_VMWARE
#define PCI_VENDOR_ID_VMWARE 0x15AD
+#endif
#define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405
#define PCI_DEVICE_ID_VMWARE_SVGA 0x0710
#define PCI_DEVICE_ID_VMWARE_VGA 0x0711

@ -1,24 +0,0 @@
A copy of this since it is no longer exported by the kernel headers
--- a/vmblock-only/shared/compat_namei.h 2015-02-07 03:11:55.000000000 +0300
+++ c/vmblock-only/shared/compat_namei.h 2015-02-24 03:51:25.235286047 +0300
@@ -21,6 +21,20 @@
#include <linux/namei.h>
+/* Copy-n-paste from kernel's source/fs/namei.c */
+struct nameidata {
+ struct path path;
+ struct qstr last;
+ struct path root;
+ struct inode *inode; /* path.dentry.d_inode */
+ unsigned int flags;
+ unsigned seq, m_seq;
+ int last_type;
+ unsigned depth;
+ struct file *base;
+ char *saved_names[MAX_NESTED_LINKS + 1];
+};
+
/*
* In 2.6.25-rc2, dentry and mount objects were removed from the nameidata
* struct. They were both replaced with a struct path.

@ -1,14 +0,0 @@
There is an level of abstrxtion in the newre API as of 3.19 here
--- a/vmnet-only/driver.c 2015-02-07 03:54:17.000000000 +0300
+++ c/vmnet-only/driver.c 2015-02-24 03:58:06.043605137 +0300
@@ -1191,8 +1191,8 @@
struct inode *inode = NULL;
long err;
- if (filp && filp->f_dentry) {
- inode = filp->f_dentry->d_inode;
+ if (filp && filp->f_path.dentry) {
+ inode = filp->f_path.dentry->d_inode;
}
err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);
return err;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save