Merge ~paelzer/ubuntu/+source/qemu:lp-1921468-1887535-1921665-FOCAL into ubuntu/+source/qemu:ubuntu/focal-devel
- Git
- lp:~paelzer/ubuntu/+source/qemu
- lp-1921468-1887535-1921665-FOCAL
- Merge into ubuntu/focal-devel
Status: | Merged | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Christian Ehrhardt | ||||||||||||
Approved revision: | 2fb74686bdd620637ff3ba9ce6353f9d6045c5f3 | ||||||||||||
Merge reported by: | Christian Ehrhardt | ||||||||||||
Merged at revision: | 2fb74686bdd620637ff3ba9ce6353f9d6045c5f3 | ||||||||||||
Proposed branch: | ~paelzer/ubuntu/+source/qemu:lp-1921468-1887535-1921665-FOCAL | ||||||||||||
Merge into: | ubuntu/+source/qemu:ubuntu/focal-devel | ||||||||||||
Diff against target: |
587 lines (+530/-0) 8 files modified
debian/changelog (+14/-0) debian/patches/series (+5/-0) debian/patches/ubuntu/lp-1887535-configure-replace-enable-disable-git-update-with-wit.patch (+277/-0) debian/patches/ubuntu/lp-1921468-pc-bios-s390-ccw-break-loop-if-a-null-block-number-i.patch (+40/-0) debian/patches/ubuntu/lp-1921468-pc-bios-s390-ccw-fix-off-by-one-error.patch (+41/-0) debian/patches/ubuntu/lp-1921665-1-block-Require-aligned-image-size-to-avoid-assert.patch (+66/-0) debian/patches/ubuntu/lp-1921665-2-file-posix-Allow-byte-aligned-O_DIRECT-with-NFS.patch (+86/-0) debian/rules (+1/-0) |
||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Utkarsh Gupta (community) | Approve | ||
Sergio Durigan Junior (community) | Needs Information | ||
Canonical Server | Pending | ||
git-ubuntu developers | Pending | ||
Review via email: mp+400327@code.launchpad.net |
Commit message
Description of the change
Christian Ehrhardt (paelzer) wrote : | # |
Sergio Durigan Junior (sergiodj) wrote : | # |
Thanks, Christian.
I reviewed everything and the changes look alright. The patches are properly named, the DEP-3 headers are OK, the changelog entry is OK.
I'm marking this as Needs Information because (as of this writing) the builds haven't finished on the PPA, which means that the dep8 tests have not been run yet. I'd like to see the results before approving the MP.
I have reviewed the SRU templates for the bugs mentioned in the changelog, with the exception of #1921468 which still doesn't have a template ready. I think the template for #1887535 could be expanded a bit on the "Regression potential" (which now should be named "Where problems could occur", by the way). I agree that a regression would likely cause a failed build, but not always. Are there any more scenarios where a regression could creep in and change the result of the build?
Once the build finishes and the test results are available I will update this review. Thanks.
Christian Ehrhardt (paelzer) wrote : | # |
Builds are complete by now and LGTM.
Tests started but not yet finished.
I have expanded on the regression potential (it was filed before the rename) of bug 1887535
I added an SRU template to 1921468 as well
Utkarsh Gupta (utkarsh) wrote : | # |
* Changelog:
- [✔] changelog entry correct version and targeted codename
- [✔] changelog entries correct
- [✔] update-maintainer has been run
* New Delta:
- [✔] patches match what was proposed upstream
- [✔] patches correctly included in debian/
- [✔] patches have correct DEP3 metadata
- [?] patches are all correct
A quick note here: I prefer to run `quilt refresh` after a patch is applied to refresh a patch, this removes the unnecessary noise from all the patches.
The first 3 patches seems to be partially refreshed (which is good!), but the last two (namely, lp-1921665-
* Build/Test:
- [✔] build is ok
- [✔] verified PPA package installs/uninstalls
- [✔] autopkgtest against the PPA package passes
* Extra:
- [?] lintian warnings
I get a bunch of lintian warning for spelling errors; cf: https:/
Another very, very trivial lintian comment is about trailing whitespaces in debian/changelog. You could run:
sed -i -e 's@[[:space:
to get rid of them but I guess worth sending this pointer to mjt maybe?
That said, this MP looks good and you can upload as-is but maybe worth considering my points above?
Christian Ehrhardt (paelzer) wrote : | # |
Thanks for the review.
Ok on patch refreshing and done - thanks.
The rest I have postponed and answered in more detail on the groovy MP.
To ssh://git.
* [new tag] upload/
Uploading to ubuntu (via ftp to upload.ubuntu.com):
Uploading qemu_4.
Uploading qemu_4.
Uploading qemu_4.
Uploading qemu_4.
Successfully uploaded packages.
Christian Ehrhardt (paelzer) wrote : | # |
merged - closing MP
Preview Diff
1 | diff --git a/debian/changelog b/debian/changelog | |||
2 | index 6728b7a..d263f9e 100644 | |||
3 | --- a/debian/changelog | |||
4 | +++ b/debian/changelog | |||
5 | @@ -1,3 +1,17 @@ | |||
6 | 1 | qemu (1:4.2-3ubuntu6.15) focal; urgency=medium | ||
7 | 2 | |||
8 | 3 | * d/p/u/lp-1921468-*: fix issues handling boot menu index on s390x | ||
9 | 4 | (LP: #1921468) | ||
10 | 5 | * d/p/u/lp-1887535-configure-replace-enable-disable-git-update-with-wit.patch, | ||
11 | 6 | d/rules: Backport --with-git-submodules param so building from git repo | ||
12 | 7 | doesn't fail (LP: #1887535) | ||
13 | 8 | * Fix byte aligned writes when writing to image stored on NFS | ||
14 | 9 | server, as they aren't required to be 4kib aligned. (LP: #1921665) | ||
15 | 10 | - d/p/u/lp-1921665-1-block-Require-aligned-image-size-to-avoid-assert.patch | ||
16 | 11 | - d/p/u/lp-1921665-2-file-posix-Allow-byte-aligned-O_DIRECT-with-NFS.patch | ||
17 | 12 | |||
18 | 13 | -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Fri, 26 Mar 2021 10:38:47 +0100 | ||
19 | 14 | |||
20 | 1 | qemu (1:4.2-3ubuntu6.14) focal-security; urgency=medium | 15 | qemu (1:4.2-3ubuntu6.14) focal-security; urgency=medium |
21 | 2 | 16 | ||
22 | 3 | * SECURITY REGRESSION: fix multiple regressions caused by CVE-2020-13754 | 17 | * SECURITY REGRESSION: fix multiple regressions caused by CVE-2020-13754 |
23 | diff --git a/debian/patches/series b/debian/patches/series | |||
24 | index e622674..631f85a 100644 | |||
25 | --- a/debian/patches/series | |||
26 | +++ b/debian/patches/series | |||
27 | @@ -258,3 +258,8 @@ ubuntu/CVE-2020-13754-4.patch | |||
28 | 258 | ubuntu/CVE-2020-13754-5.patch | 258 | ubuntu/CVE-2020-13754-5.patch |
29 | 259 | ubuntu/CVE-2020-13754-6.patch | 259 | ubuntu/CVE-2020-13754-6.patch |
30 | 260 | ubuntu/CVE-2020-13754-9.patch | 260 | ubuntu/CVE-2020-13754-9.patch |
31 | 261 | ubuntu/lp-1921468-pc-bios-s390-ccw-fix-off-by-one-error.patch | ||
32 | 262 | ubuntu/lp-1921468-pc-bios-s390-ccw-break-loop-if-a-null-block-number-i.patch | ||
33 | 263 | ubuntu/lp-1887535-configure-replace-enable-disable-git-update-with-wit.patch | ||
34 | 264 | ubuntu/lp-1921665-1-block-Require-aligned-image-size-to-avoid-assert.patch | ||
35 | 265 | ubuntu/lp-1921665-2-file-posix-Allow-byte-aligned-O_DIRECT-with-NFS.patch | ||
36 | diff --git a/debian/patches/ubuntu/lp-1887535-configure-replace-enable-disable-git-update-with-wit.patch b/debian/patches/ubuntu/lp-1887535-configure-replace-enable-disable-git-update-with-wit.patch | |||
37 | 261 | new file mode 100644 | 266 | new file mode 100644 |
38 | index 0000000..0fe0ec5 | |||
39 | --- /dev/null | |||
40 | +++ b/debian/patches/ubuntu/lp-1887535-configure-replace-enable-disable-git-update-with-wit.patch | |||
41 | @@ -0,0 +1,277 @@ | |||
42 | 1 | From 7d7dbf9dc15be6e1465c756c2c5ae7f1ab104fc8 Mon Sep 17 00:00:00 2001 | ||
43 | 2 | From: Dan Streetman <ddstreet@canonical.com> | ||
44 | 3 | Date: Tue, 19 Jan 2021 12:20:46 -0500 | ||
45 | 4 | Subject: [PATCH] configure: replace --enable/disable-git-update with | ||
46 | 5 | --with-git-submodules | ||
47 | 6 | MIME-Version: 1.0 | ||
48 | 7 | Content-Type: text/plain; charset=UTF-8 | ||
49 | 8 | Content-Transfer-Encoding: 8bit | ||
50 | 9 | Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1887535 | ||
51 | 10 | Origin: upstream, https://git.qemu.org/?p=qemu.git;a=commit;h=7d7dbf9dc15be6e1465c756c2c5ae7f1ab104fc8 | ||
52 | 11 | |||
53 | 12 | Replace the --enable-git-update and --disable-git-update configure params | ||
54 | 13 | with the param --with-git-submodules=(update|validate|ignore) to | ||
55 | 14 | allow 3 options for building from a git repo. | ||
56 | 15 | |||
57 | 16 | This is needed because downstream packagers, e.g. Debian, Ubuntu, etc, | ||
58 | 17 | also keep the source code in git, but do not want to enable the | ||
59 | 18 | 'git_update' mode; with the current code, that's not possible even | ||
60 | 19 | if the downstream package specifies --disable-git-update. | ||
61 | 20 | |||
62 | 21 | The previous parameters are deprecated but still available; the | ||
63 | 22 | --enable-git-update parameter maps to --with-git-submodules=update and | ||
64 | 23 | --disable-git-update parameter maps to --with-git-submodules=validate. | ||
65 | 24 | |||
66 | 25 | The configure script behavior is slightly modified, where previously | ||
67 | 26 | the dtc, capstone, and slirp submodules were not validated when | ||
68 | 27 | --disable-git-update was specified (but were updated with git-update | ||
69 | 28 | enabled), now they are validated when using --with-git-submodules=validate | ||
70 | 29 | and are only ignored when using --with-git-submodules=ignore. | ||
71 | 30 | |||
72 | 31 | Signed-off-by: Dan Streetman <ddstreet@canonical.com> | ||
73 | 32 | Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> | ||
74 | 33 | --- | ||
75 | 34 | Makefile | 24 ++----------------- | ||
76 | 35 | configure | 51 ++++++++++++++++++++++++++++++---------- | ||
77 | 36 | scripts/git-submodule.sh | 34 ++++++++++++++++++++------- | ||
78 | 37 | 3 files changed, 66 insertions(+), 43 deletions(-) | ||
79 | 38 | |||
80 | 39 | --- a/Makefile | ||
81 | 40 | +++ b/Makefile | ||
82 | 41 | @@ -24,33 +24,11 @@ ifneq ($(wildcard config-host.mak),) | ||
83 | 42 | all: | ||
84 | 43 | include config-host.mak | ||
85 | 44 | |||
86 | 45 | -git-submodule-update: | ||
87 | 46 | - | ||
88 | 47 | .PHONY: git-submodule-update | ||
89 | 48 | - | ||
90 | 49 | -git_module_status := $(shell \ | ||
91 | 50 | - cd '$(SRC_PATH)' && \ | ||
92 | 51 | - GIT="$(GIT)" ./scripts/git-submodule.sh status $(GIT_SUBMODULES); \ | ||
93 | 52 | - echo $$?; \ | ||
94 | 53 | -) | ||
95 | 54 | - | ||
96 | 55 | -ifeq (1,$(git_module_status)) | ||
97 | 56 | -ifeq (no,$(GIT_UPDATE)) | ||
98 | 57 | -git-submodule-update: | ||
99 | 58 | - $(call quiet-command, \ | ||
100 | 59 | - echo && \ | ||
101 | 60 | - echo "GIT submodule checkout is out of date. Please run" && \ | ||
102 | 61 | - echo " scripts/git-submodule.sh update $(GIT_SUBMODULES)" && \ | ||
103 | 62 | - echo "from the source directory checkout $(SRC_PATH)" && \ | ||
104 | 63 | - echo && \ | ||
105 | 64 | - exit 1) | ||
106 | 65 | -else | ||
107 | 66 | git-submodule-update: | ||
108 | 67 | $(call quiet-command, \ | ||
109 | 68 | - (cd $(SRC_PATH) && GIT="$(GIT)" ./scripts/git-submodule.sh update $(GIT_SUBMODULES)), \ | ||
110 | 69 | - "GIT","$(GIT_SUBMODULES)") | ||
111 | 70 | -endif | ||
112 | 71 | -endif | ||
113 | 72 | + (GIT="$(GIT)" "$(SRC_PATH)/scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES)), \ | ||
114 | 73 | + "GIT","$(GIT_SUBMODULES)") | ||
115 | 74 | |||
116 | 75 | .git-submodule-status: git-submodule-update config-host.mak | ||
117 | 76 | |||
118 | 77 | --- a/configure | ||
119 | 78 | +++ b/configure | ||
120 | 79 | @@ -305,12 +305,12 @@ stack_protector="" | ||
121 | 80 | |||
122 | 81 | if test -e "$source_path/.git" | ||
123 | 82 | then | ||
124 | 83 | - git_update=yes | ||
125 | 84 | + git_submodules_action="update" | ||
126 | 85 | git_submodules="ui/keycodemapdb" | ||
127 | 86 | git_submodules="$git_submodules tests/fp/berkeley-testfloat-3" | ||
128 | 87 | git_submodules="$git_submodules tests/fp/berkeley-softfloat-3" | ||
129 | 88 | else | ||
130 | 89 | - git_update=no | ||
131 | 90 | + git_submodules_action="ignore" | ||
132 | 91 | git_submodules="" | ||
133 | 92 | |||
134 | 93 | if ! test -f "$source_path/ui/keycodemapdb/README" | ||
135 | 94 | @@ -1524,9 +1524,16 @@ for opt do | ||
136 | 95 | ;; | ||
137 | 96 | --with-git=*) git="$optarg" | ||
138 | 97 | ;; | ||
139 | 98 | - --enable-git-update) git_update=yes | ||
140 | 99 | + --enable-git-update) | ||
141 | 100 | + git_submodules_action="update" | ||
142 | 101 | + echo "--enable-git-update deprecated, use --with-git-submodules=update" | ||
143 | 102 | + ;; | ||
144 | 103 | + --disable-git-update) | ||
145 | 104 | + git_submodules_action="validate" | ||
146 | 105 | + echo "--disable-git-update deprecated, use --with-git-submodules=validate" | ||
147 | 106 | ;; | ||
148 | 107 | - --disable-git-update) git_update=no | ||
149 | 108 | + --with-git-submodules=*) | ||
150 | 109 | + git_submodules_action="$optarg" | ||
151 | 110 | ;; | ||
152 | 111 | --enable-debug-mutex) debug_mutex=yes | ||
153 | 112 | ;; | ||
154 | 113 | @@ -1552,6 +1559,21 @@ for opt do | ||
155 | 114 | esac | ||
156 | 115 | done | ||
157 | 116 | |||
158 | 117 | +case $git_submodules_action in | ||
159 | 118 | + update|validate) | ||
160 | 119 | + if test ! -e "$source_path/.git"; then | ||
161 | 120 | + echo "ERROR: cannot $git_submodules_action git submodules without .git" | ||
162 | 121 | + exit 1 | ||
163 | 122 | + fi | ||
164 | 123 | + ;; | ||
165 | 124 | + ignore) | ||
166 | 125 | + ;; | ||
167 | 126 | + *) | ||
168 | 127 | + echo "ERROR: invalid --with-git-submodules= value '$git_submodules_action'" | ||
169 | 128 | + exit 1 | ||
170 | 129 | + ;; | ||
171 | 130 | +esac | ||
172 | 131 | + | ||
173 | 132 | case "$cpu" in | ||
174 | 133 | ppc) | ||
175 | 134 | CPU_CFLAGS="-m32" | ||
176 | 135 | @@ -1678,6 +1700,9 @@ Advanced options (experts only): | ||
177 | 136 | --python=PYTHON use specified python [$python] | ||
178 | 137 | --smbd=SMBD use specified smbd [$smbd] | ||
179 | 138 | --with-git=GIT use specified git [$git] | ||
180 | 139 | + --with-git-submodules=update update git submodules (default if .git dir exists) | ||
181 | 140 | + --with-git-submodules=validate fail if git submodules are not up to date | ||
182 | 141 | + --with-git-submodules=ignore do not update or check git submodules (default if no .git dir) | ||
183 | 142 | --static enable static build [$static] | ||
184 | 143 | --mandir=PATH install man pages in PATH | ||
185 | 144 | --datadir=PATH install firmware in PATH$confsuffix | ||
186 | 145 | @@ -1885,7 +1910,7 @@ fi | ||
187 | 146 | # Consult white-list to determine whether to enable werror | ||
188 | 147 | # by default. Only enable by default for git builds | ||
189 | 148 | if test -z "$werror" ; then | ||
190 | 149 | - if test -e "$source_path/.git" && \ | ||
191 | 150 | + if test $git_submodules_action != 'ignore' && \ | ||
192 | 151 | { test "$linux" = "yes" || test "$mingw32" = "yes"; }; then | ||
193 | 152 | werror="yes" | ||
194 | 153 | else | ||
195 | 154 | @@ -4148,10 +4173,10 @@ EOF | ||
196 | 155 | fdt=system | ||
197 | 156 | else | ||
198 | 157 | # have GIT checkout, so activate dtc submodule | ||
199 | 158 | - if test -e "${source_path}/.git" ; then | ||
200 | 159 | + if test $git_submodules_action != 'ignore' ; then | ||
201 | 160 | git_submodules="${git_submodules} dtc" | ||
202 | 161 | fi | ||
203 | 162 | - if test -d "${source_path}/dtc/libfdt" || test -e "${source_path}/.git" ; then | ||
204 | 163 | + if test -d "${source_path}/dtc/libfdt" || test $git_submodules_action != 'ignore' ; then | ||
205 | 164 | fdt=git | ||
206 | 165 | mkdir -p dtc | ||
207 | 166 | if [ "$pwd_is_source_path" != "y" ] ; then | ||
208 | 167 | @@ -5084,7 +5109,7 @@ case "$capstone" in | ||
209 | 168 | "" | yes) | ||
210 | 169 | if $pkg_config capstone; then | ||
211 | 170 | capstone=system | ||
212 | 171 | - elif test -e "${source_path}/.git" && test $git_update = 'yes' ; then | ||
213 | 172 | + elif test $git_submodules_action != 'ignore' ; then | ||
214 | 173 | capstone=git | ||
215 | 174 | elif test -e "${source_path}/capstone/Makefile" ; then | ||
216 | 175 | capstone=internal | ||
217 | 176 | @@ -6054,7 +6079,7 @@ case "$slirp" in | ||
218 | 177 | "" | yes) | ||
219 | 178 | if $pkg_config slirp; then | ||
220 | 179 | slirp=system | ||
221 | 180 | - elif test -e "${source_path}/.git" && test $git_update = 'yes' ; then | ||
222 | 181 | + elif test $git_submodules_action != 'ignore' ; then | ||
223 | 182 | slirp=git | ||
224 | 183 | elif test -e "${source_path}/slirp/Makefile" ; then | ||
225 | 184 | slirp=internal | ||
226 | 185 | @@ -6678,7 +6703,7 @@ echo "libs_cpu=$libs_cpu" >> $config_hos | ||
227 | 186 | echo "libs_softmmu=$libs_softmmu" >> $config_host_mak | ||
228 | 187 | echo "GIT=$git" >> $config_host_mak | ||
229 | 188 | echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak | ||
230 | 189 | -echo "GIT_UPDATE=$git_update" >> $config_host_mak | ||
231 | 190 | +echo "GIT_SUBMODULES_ACTION=$git_submodules_action" >> $config_host_mak | ||
232 | 191 | |||
233 | 192 | echo "ARCH=$ARCH" >> $config_host_mak | ||
234 | 193 | |||
235 | 194 | --- a/scripts/git-submodule.sh | ||
236 | 195 | +++ b/scripts/git-submodule.sh | ||
237 | 196 | @@ -9,9 +9,14 @@ command=$1 | ||
238 | 197 | shift | ||
239 | 198 | maybe_modules="$@" | ||
240 | 199 | |||
241 | 200 | +# if --with-git-submodules=ignore, do nothing | ||
242 | 201 | +test "$command" = "ignore" && exit 0 | ||
243 | 202 | + | ||
244 | 203 | test -z "$GIT" && GIT=git | ||
245 | 204 | |||
246 | 205 | -error() { | ||
247 | 206 | +cd "$(dirname "$0")/.." | ||
248 | 207 | + | ||
249 | 208 | +update_error() { | ||
250 | 209 | echo "$0: $*" | ||
251 | 210 | echo | ||
252 | 211 | echo "Unable to automatically checkout GIT submodules '$modules'." | ||
253 | 212 | @@ -24,7 +29,7 @@ error() { | ||
254 | 213 | echo "Alternatively you may disable automatic GIT submodule checkout" | ||
255 | 214 | echo "with:" | ||
256 | 215 | echo | ||
257 | 216 | - echo " $ ./configure --disable-git-update" | ||
258 | 217 | + echo " $ ./configure --with-git-submodules=validate" | ||
259 | 218 | echo | ||
260 | 219 | echo "and then manually update submodules prior to running make, with:" | ||
261 | 220 | echo | ||
262 | 221 | @@ -33,6 +38,19 @@ error() { | ||
263 | 222 | exit 1 | ||
264 | 223 | } | ||
265 | 224 | |||
266 | 225 | +validate_error() { | ||
267 | 226 | + if test "$1" = "validate"; then | ||
268 | 227 | + echo "GIT submodules checkout is out of date, and submodules" | ||
269 | 228 | + echo "configured for validate only. Please run" | ||
270 | 229 | + echo " scripts/git-submodule.sh update $maybe_modules" | ||
271 | 230 | + echo "from the source directory or call configure with" | ||
272 | 231 | + echo " --with-git-submodules=update" | ||
273 | 232 | + echo "To disable GIT submodules validation, use" | ||
274 | 233 | + echo " --with-git-submodules=ignore" | ||
275 | 234 | + fi | ||
276 | 235 | + exit 1 | ||
277 | 236 | +} | ||
278 | 237 | + | ||
279 | 238 | modules="" | ||
280 | 239 | for m in $maybe_modules | ||
281 | 240 | do | ||
282 | 241 | @@ -52,17 +70,18 @@ then | ||
283 | 242 | fi | ||
284 | 243 | |||
285 | 244 | case "$command" in | ||
286 | 245 | -status) | ||
287 | 246 | +status|validate) | ||
288 | 247 | if test -z "$maybe_modules" | ||
289 | 248 | then | ||
290 | 249 | - test -s ${substat} && exit 1 || exit 0 | ||
291 | 250 | + test -s ${substat} && validate_error "$command" || exit 0 | ||
292 | 251 | fi | ||
293 | 252 | |||
294 | 253 | - test -f "$substat" || exit 1 | ||
295 | 254 | + test -f "$substat" || validate_error "$command" | ||
296 | 255 | CURSTATUS=$($GIT submodule status $modules) | ||
297 | 256 | OLDSTATUS=$(cat $substat) | ||
298 | 257 | - test "$CURSTATUS" = "$OLDSTATUS" | ||
299 | 258 | - exit $? | ||
300 | 259 | + if test "$CURSTATUS" != "$OLDSTATUS"; then | ||
301 | 260 | + validate_error "$command" | ||
302 | 261 | + fi | ||
303 | 262 | ;; | ||
304 | 263 | update) | ||
305 | 264 | if test -z "$maybe_modules" | ||
306 | 265 | @@ -72,10 +91,10 @@ update) | ||
307 | 266 | fi | ||
308 | 267 | |||
309 | 268 | $GIT submodule update --init $modules 1>/dev/null | ||
310 | 269 | - test $? -ne 0 && error "failed to update modules" | ||
311 | 270 | + test $? -ne 0 && update_error "failed to update modules" | ||
312 | 271 | |||
313 | 272 | $GIT submodule status $modules > "${substat}" | ||
314 | 273 | - test $? -ne 0 && error "failed to save git submodule status" >&2 | ||
315 | 274 | + test $? -ne 0 && update_error "failed to save git submodule status" >&2 | ||
316 | 275 | ;; | ||
317 | 276 | esac | ||
318 | 277 | |||
319 | diff --git a/debian/patches/ubuntu/lp-1921468-pc-bios-s390-ccw-break-loop-if-a-null-block-number-i.patch b/debian/patches/ubuntu/lp-1921468-pc-bios-s390-ccw-break-loop-if-a-null-block-number-i.patch | |||
320 | 0 | new file mode 100644 | 278 | new file mode 100644 |
321 | index 0000000..1df9421 | |||
322 | --- /dev/null | |||
323 | +++ b/debian/patches/ubuntu/lp-1921468-pc-bios-s390-ccw-break-loop-if-a-null-block-number-i.patch | |||
324 | @@ -0,0 +1,40 @@ | |||
325 | 1 | From 468184ec9024f4f7b55247f70ec57554e8a500d7 Mon Sep 17 00:00:00 2001 | ||
326 | 2 | From: Marc Hartmayer <mhartmay@linux.ibm.com> | ||
327 | 3 | Date: Thu, 24 Sep 2020 10:59:25 +0200 | ||
328 | 4 | Subject: [PATCH] pc-bios/s390-ccw: break loop if a null block number is | ||
329 | 5 | reached | ||
330 | 6 | |||
331 | 7 | Break the loop if `cur_block_nr` is a null block number because this | ||
332 | 8 | means that the end of chunk is reached. In this case we will try to | ||
333 | 9 | boot the default entry. | ||
334 | 10 | |||
335 | 11 | Fixes: ba831b25262a ("s390-ccw: read stage2 boot loader data to find menu") | ||
336 | 12 | Reviewed-by: Collin Walling <walling@linux.ibm.com> | ||
337 | 13 | Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> | ||
338 | 14 | Message-Id: <20200924085926.21709-3-mhartmay@linux.ibm.com> | ||
339 | 15 | Signed-off-by: Thomas Huth <thuth@redhat.com> | ||
340 | 16 | |||
341 | 17 | Origin: upstream, https://git.qemu.org/?p=qemu.git;a=commit;h=468184ec9024 | ||
342 | 18 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/1921468 | ||
343 | 19 | Last-Update: 2021-03-26 | ||
344 | 20 | |||
345 | 21 | --- | ||
346 | 22 | pc-bios/s390-ccw/bootmap.c | 2 +- | ||
347 | 23 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
348 | 24 | |||
349 | 25 | diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c | ||
350 | 26 | index 767bb612db..942fba3fa7 100644 | ||
351 | 27 | --- a/pc-bios/s390-ccw/bootmap.c | ||
352 | 28 | +++ b/pc-bios/s390-ccw/bootmap.c | ||
353 | 29 | @@ -192,7 +192,7 @@ static int eckd_get_boot_menu_index(block_number_t s1b_block_nr) | ||
354 | 30 | for (i = 0; i < STAGE2_BLK_CNT_MAX; i++) { | ||
355 | 31 | cur_block_nr = eckd_block_num(&s1b->seek[i].chs); | ||
356 | 32 | |||
357 | 33 | - if (!cur_block_nr) { | ||
358 | 34 | + if (!cur_block_nr || is_null_block_number(cur_block_nr)) { | ||
359 | 35 | break; | ||
360 | 36 | } | ||
361 | 37 | |||
362 | 38 | -- | ||
363 | 39 | 2.30.0 | ||
364 | 40 | |||
365 | diff --git a/debian/patches/ubuntu/lp-1921468-pc-bios-s390-ccw-fix-off-by-one-error.patch b/debian/patches/ubuntu/lp-1921468-pc-bios-s390-ccw-fix-off-by-one-error.patch | |||
366 | 0 | new file mode 100644 | 41 | new file mode 100644 |
367 | index 0000000..b59bdad | |||
368 | --- /dev/null | |||
369 | +++ b/debian/patches/ubuntu/lp-1921468-pc-bios-s390-ccw-fix-off-by-one-error.patch | |||
370 | @@ -0,0 +1,41 @@ | |||
371 | 1 | From 5f97ba0c74ccace0a4014460de9751ff3c6f454a Mon Sep 17 00:00:00 2001 | ||
372 | 2 | From: Marc Hartmayer <mhartmay@linux.ibm.com> | ||
373 | 3 | Date: Thu, 24 Sep 2020 10:59:24 +0200 | ||
374 | 4 | Subject: [PATCH] pc-bios/s390-ccw: fix off-by-one error | ||
375 | 5 | |||
376 | 6 | This error takes effect when the magic value "zIPL" is located at the | ||
377 | 7 | end of a block. For example if s2_cur_blk = 0x7fe18000 and the magic | ||
378 | 8 | value "zIPL" is located at 0x7fe18ffc - 0x7fe18fff. | ||
379 | 9 | |||
380 | 10 | Fixes: ba831b25262a ("s390-ccw: read stage2 boot loader data to find menu") | ||
381 | 11 | Reviewed-by: Collin Walling <walling@linux.ibm.com> | ||
382 | 12 | Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> | ||
383 | 13 | Message-Id: <20200924085926.21709-2-mhartmay@linux.ibm.com> | ||
384 | 14 | Reviewed-by: Thomas Huth <thuth@redhat.com> | ||
385 | 15 | [thuth: Use "<= ... - 4" instead of "< ... - 3"] | ||
386 | 16 | Signed-off-by: Thomas Huth <thuth@redhat.com> | ||
387 | 17 | |||
388 | 18 | Origin: upstream, https://git.qemu.org/?p=qemu.git;a=commit;h=5f97ba0c74cc | ||
389 | 19 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/1921468 | ||
390 | 20 | Last-Update: 2021-03-26 | ||
391 | 21 | |||
392 | 22 | --- | ||
393 | 23 | pc-bios/s390-ccw/bootmap.c | 2 +- | ||
394 | 24 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
395 | 25 | |||
396 | 26 | diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c | ||
397 | 27 | index 0ef6b851f3..767bb612db 100644 | ||
398 | 28 | --- a/pc-bios/s390-ccw/bootmap.c | ||
399 | 29 | +++ b/pc-bios/s390-ccw/bootmap.c | ||
400 | 30 | @@ -163,7 +163,7 @@ static bool find_zipl_boot_menu_banner(int *offset) | ||
401 | 31 | int i; | ||
402 | 32 | |||
403 | 33 | /* Menu banner starts with "zIPL" */ | ||
404 | 34 | - for (i = 0; i < virtio_get_block_size() - 4; i++) { | ||
405 | 35 | + for (i = 0; i <= virtio_get_block_size() - 4; i++) { | ||
406 | 36 | if (magic_match(s2_cur_blk + i, ZIPL_MAGIC_EBCDIC)) { | ||
407 | 37 | *offset = i; | ||
408 | 38 | return true; | ||
409 | 39 | -- | ||
410 | 40 | 2.30.0 | ||
411 | 41 | |||
412 | diff --git a/debian/patches/ubuntu/lp-1921665-1-block-Require-aligned-image-size-to-avoid-assert.patch b/debian/patches/ubuntu/lp-1921665-1-block-Require-aligned-image-size-to-avoid-assert.patch | |||
413 | 0 | new file mode 100644 | 42 | new file mode 100644 |
414 | index 0000000..81dd3fb | |||
415 | --- /dev/null | |||
416 | +++ b/debian/patches/ubuntu/lp-1921665-1-block-Require-aligned-image-size-to-avoid-assert.patch | |||
417 | @@ -0,0 +1,66 @@ | |||
418 | 1 | From 9c60a5d1978e6dcf85c0e01b50e6f7f54ca09104 Mon Sep 17 00:00:00 2001 | ||
419 | 2 | From: Kevin Wolf <kwolf@redhat.com> | ||
420 | 3 | Date: Thu, 16 Jul 2020 16:26:00 +0200 | ||
421 | 4 | Subject: [PATCH] block: Require aligned image size to avoid assertion failure | ||
422 | 5 | |||
423 | 6 | Unaligned requests will automatically be aligned to bl.request_alignment | ||
424 | 7 | and we can't extend write requests to access space beyond the end of the | ||
425 | 8 | image without resizing the image, so if we have the WRITE permission, | ||
426 | 9 | but not the RESIZE one, it's required that the image size is aligned. | ||
427 | 10 | |||
428 | 11 | Failing to meet this requirement could cause assertion failures like | ||
429 | 12 | this if RESIZE permissions weren't requested: | ||
430 | 13 | |||
431 | 14 | qemu-img: block/io.c:1910: bdrv_co_write_req_prepare: Assertion `end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE' failed. | ||
432 | 15 | |||
433 | 16 | This was e.g. triggered by qemu-img converting to a target image with 4k | ||
434 | 17 | request alignment when the image was only aligned to 512 bytes, but not | ||
435 | 18 | to 4k. | ||
436 | 19 | |||
437 | 20 | Turn this into a graceful error in bdrv_check_perm() so that WRITE | ||
438 | 21 | without RESIZE can only be taken if the image size is aligned. If a user | ||
439 | 22 | holds both permissions and drops only RESIZE, the function will return | ||
440 | 23 | an error, but bdrv_child_try_set_perm() will ignore the failure silently | ||
441 | 24 | if permissions are only requested to be relaxed and just keep both | ||
442 | 25 | permissions while returning success. | ||
443 | 26 | |||
444 | 27 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
445 | 28 | Message-Id: <20200716142601.111237-2-kwolf@redhat.com> | ||
446 | 29 | Reviewed-by: Max Reitz <mreitz@redhat.com> | ||
447 | 30 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
448 | 31 | |||
449 | 32 | Origin: backport, https://git.qemu.org/?p=qemu.git;a=commit;h=9c60a5d1978e6dcf85c0e01b50e6f7f54ca09104 | ||
450 | 33 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/1921665 | ||
451 | 34 | Last-Update: 2021-03-29 | ||
452 | 35 | |||
453 | 36 | --- | ||
454 | 37 | block.c | 16 ++++++++++++++++ | ||
455 | 38 | 1 file changed, 16 insertions(+) | ||
456 | 39 | |||
457 | 40 | Index: qemu-4.2/block.c | ||
458 | 41 | =================================================================== | ||
459 | 42 | --- qemu-4.2.orig/block.c 2021-03-29 16:37:44.376599273 +1300 | ||
460 | 43 | +++ qemu-4.2/block.c 2021-03-29 16:37:44.372599220 +1300 | ||
461 | 44 | @@ -1842,6 +1842,22 @@ | ||
462 | 45 | return -EPERM; | ||
463 | 46 | } | ||
464 | 47 | |||
465 | 48 | + /* | ||
466 | 49 | + * Unaligned requests will automatically be aligned to bl.request_alignment | ||
467 | 50 | + * and without RESIZE we can't extend requests to write to space beyond the | ||
468 | 51 | + * end of the image, so it's required that the image size is aligned. | ||
469 | 52 | + */ | ||
470 | 53 | + if ((cumulative_perms & (BLK_PERM_WRITE | BLK_PERM_WRITE_UNCHANGED)) && | ||
471 | 54 | + !(cumulative_perms & BLK_PERM_RESIZE)) | ||
472 | 55 | + { | ||
473 | 56 | + if ((bs->total_sectors * BDRV_SECTOR_SIZE) % bs->bl.request_alignment) { | ||
474 | 57 | + error_setg(errp, "Cannot get 'write' permission without 'resize': " | ||
475 | 58 | + "Image size is not a multiple of request " | ||
476 | 59 | + "alignment"); | ||
477 | 60 | + return -EPERM; | ||
478 | 61 | + } | ||
479 | 62 | + } | ||
480 | 63 | + | ||
481 | 64 | /* Check this node */ | ||
482 | 65 | if (!drv) { | ||
483 | 66 | return 0; | ||
484 | diff --git a/debian/patches/ubuntu/lp-1921665-2-file-posix-Allow-byte-aligned-O_DIRECT-with-NFS.patch b/debian/patches/ubuntu/lp-1921665-2-file-posix-Allow-byte-aligned-O_DIRECT-with-NFS.patch | |||
485 | 0 | new file mode 100644 | 67 | new file mode 100644 |
486 | index 0000000..3eeee86 | |||
487 | --- /dev/null | |||
488 | +++ b/debian/patches/ubuntu/lp-1921665-2-file-posix-Allow-byte-aligned-O_DIRECT-with-NFS.patch | |||
489 | @@ -0,0 +1,86 @@ | |||
490 | 1 | From 5edc85571e7b7269dce408735eba7507f18ac666 Mon Sep 17 00:00:00 2001 | ||
491 | 2 | From: Kevin Wolf <kwolf@redhat.com> | ||
492 | 3 | Date: Thu, 16 Jul 2020 16:26:01 +0200 | ||
493 | 4 | Subject: [PATCH] file-posix: Allow byte-aligned O_DIRECT with NFS | ||
494 | 5 | |||
495 | 6 | Since commit a6b257a08e3 ('file-posix: Handle undetectable alignment'), | ||
496 | 7 | we assume that if we open a file with O_DIRECT and alignment probing | ||
497 | 8 | returns 1, we just couldn't find out the real alignment requirement | ||
498 | 9 | because some filesystems make the requirement only for allocated blocks. | ||
499 | 10 | In this case, a safe default of 4k is used. | ||
500 | 11 | |||
501 | 12 | This is too strict for NFS, which does actually allow byte-aligned | ||
502 | 13 | requests even with O_DIRECT. Because we can't distinguish both cases | ||
503 | 14 | with generic code, let's just look at the file system magic and disable | ||
504 | 15 | s->needs_alignment for NFS. This way, O_DIRECT can still be used on NFS | ||
505 | 16 | for images that are not aligned to 4k. | ||
506 | 17 | |||
507 | 18 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
508 | 19 | Reviewed-by: Eric Blake <eblake@redhat.com> | ||
509 | 20 | Message-Id: <20200716142601.111237-3-kwolf@redhat.com> | ||
510 | 21 | Reviewed-by: Max Reitz <mreitz@redhat.com> | ||
511 | 22 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
512 | 23 | |||
513 | 24 | Origin: backport, https://git.qemu.org/?p=qemu.git;a=commit;h=5edc85571e7b7269dce408735eba7507f18ac666 | ||
514 | 25 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/1921665 | ||
515 | 26 | Last-Update: 2021-03-29 | ||
516 | 27 | |||
517 | 28 | --- | ||
518 | 29 | block/file-posix.c | 26 +++++++++++++++++++++++++- | ||
519 | 30 | 1 file changed, 25 insertions(+), 1 deletion(-) | ||
520 | 31 | |||
521 | 32 | Index: qemu-4.2/block/file-posix.c | ||
522 | 33 | =================================================================== | ||
523 | 34 | --- qemu-4.2.orig/block/file-posix.c 2021-03-29 16:38:00.008804168 +1300 | ||
524 | 35 | +++ qemu-4.2/block/file-posix.c 2021-03-29 16:38:00.008804168 +1300 | ||
525 | 36 | @@ -61,10 +61,12 @@ | ||
526 | 37 | #include <sys/ioctl.h> | ||
527 | 38 | #include <sys/param.h> | ||
528 | 39 | #include <sys/syscall.h> | ||
529 | 40 | +#include <sys/vfs.h> | ||
530 | 41 | #include <linux/cdrom.h> | ||
531 | 42 | #include <linux/fd.h> | ||
532 | 43 | #include <linux/fs.h> | ||
533 | 44 | #include <linux/hdreg.h> | ||
534 | 45 | +#include <linux/magic.h> | ||
535 | 46 | #include <scsi/sg.h> | ||
536 | 47 | #ifdef __s390__ | ||
537 | 48 | #include <asm/dasd.h> | ||
538 | 49 | @@ -298,6 +300,28 @@ | ||
539 | 50 | #endif | ||
540 | 51 | } | ||
541 | 52 | |||
542 | 53 | +/* | ||
543 | 54 | + * Returns true if no alignment restrictions are necessary even for files | ||
544 | 55 | + * opened with O_DIRECT. | ||
545 | 56 | + * | ||
546 | 57 | + * raw_probe_alignment() probes the required alignment and assume that 1 means | ||
547 | 58 | + * the probing failed, so it falls back to a safe default of 4k. This can be | ||
548 | 59 | + * avoided if we know that byte alignment is okay for the file. | ||
549 | 60 | + */ | ||
550 | 61 | +static bool dio_byte_aligned(int fd) | ||
551 | 62 | +{ | ||
552 | 63 | +#ifdef __linux__ | ||
553 | 64 | + struct statfs buf; | ||
554 | 65 | + int ret; | ||
555 | 66 | + | ||
556 | 67 | + ret = fstatfs(fd, &buf); | ||
557 | 68 | + if (ret == 0 && buf.f_type == NFS_SUPER_MAGIC) { | ||
558 | 69 | + return true; | ||
559 | 70 | + } | ||
560 | 71 | +#endif | ||
561 | 72 | + return false; | ||
562 | 73 | +} | ||
563 | 74 | + | ||
564 | 75 | /* Check if read is allowed with given memory buffer and length. | ||
565 | 76 | * | ||
566 | 77 | * This function is used to check O_DIRECT memory buffer and request alignment. | ||
567 | 78 | @@ -602,7 +626,7 @@ | ||
568 | 79 | |||
569 | 80 | s->has_discard = true; | ||
570 | 81 | s->has_write_zeroes = true; | ||
571 | 82 | - if ((bs->open_flags & BDRV_O_NOCACHE) != 0) { | ||
572 | 83 | + if ((bs->open_flags & BDRV_O_NOCACHE) != 0 && !dio_byte_aligned(s->fd)) { | ||
573 | 84 | s->needs_alignment = true; | ||
574 | 85 | } | ||
575 | 86 | |||
576 | diff --git a/debian/rules b/debian/rules | |||
577 | index e78d27d..6a55d5a 100755 | |||
578 | --- a/debian/rules | |||
579 | +++ b/debian/rules | |||
580 | @@ -53,6 +53,7 @@ common_configure_opts = \ | |||
581 | 53 | --disable-strip \ | 53 | --disable-strip \ |
582 | 54 | --interp-prefix=/etc/qemu-binfmt/%M \ | 54 | --interp-prefix=/etc/qemu-binfmt/%M \ |
583 | 55 | --localstatedir=/var \ | 55 | --localstatedir=/var \ |
584 | 56 | --with-git-submodules=ignore \ | ||
585 | 56 | 57 | ||
586 | 57 | # Cross compiling support | 58 | # Cross compiling support |
587 | 58 | ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) | 59 | ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) |
PPA: https:/ /launchpad. net/~ci- train-ppa- service/ +archive/ ubuntu/ 4504/+packages