* [PATCH v3 1/2] Add libfuzzer target to fuzz/x86_instruction_emulator
@ 2024-07-22 11:27 Tamas K Lengyel
2024-07-22 11:27 ` [PATCH v3 2/2] Add tools/fuzz/oss-fuzz/build.sh Tamas K Lengyel
2024-07-22 12:24 ` [PATCH v3 1/2] Add libfuzzer target to fuzz/x86_instruction_emulator Jan Beulich
0 siblings, 2 replies; 9+ messages in thread
From: Tamas K Lengyel @ 2024-07-22 11:27 UTC (permalink / raw)
To: xen-devel
Cc: Tamas K Lengyel, Jan Beulich, Andrew Cooper, Roger Pau Monné,
Anthony PERARD
This target enables integration into oss-fuzz. Changing invalid input return
to -1 as values other then 0/-1 are reserved by libfuzzer. Also adding the
missing __wrap_vsnprintf wrapper which is required for successful oss-fuzz
build.
Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
---
v3: don't include libfuzzer-harness in target 'all' as it requires specific cc
---
tools/fuzz/x86_instruction_emulator/Makefile | 6 +++++-
tools/fuzz/x86_instruction_emulator/fuzz-emul.c | 6 ++----
tools/tests/x86_emulator/wrappers.c | 11 +++++++++++
3 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/tools/fuzz/x86_instruction_emulator/Makefile b/tools/fuzz/x86_instruction_emulator/Makefile
index 1e4c6b37f5..459743f4d9 100644
--- a/tools/fuzz/x86_instruction_emulator/Makefile
+++ b/tools/fuzz/x86_instruction_emulator/Makefile
@@ -58,6 +58,9 @@ afl-harness: afl-harness.o $(OBJS) cpuid.o wrappers.o
afl-harness-cov: afl-harness-cov.o $(patsubst %.o,%-cov.o,$(OBJS)) cpuid.o wrappers.o
$(CC) $(CFLAGS) $(GCOV_FLAGS) $(addprefix -Wl$(comma)--wrap=,$(WRAPPED)) $^ -o $@
+libfuzzer-harness: $(OBJS) cpuid.o wrappers.o
+ $(CC) $(CFLAGS) $(LIB_FUZZING_ENGINE) -fsanitize=fuzzer $(addprefix -Wl$(comma)--wrap=,$(WRAPPED)) $^ -o $@
+
# Common targets
.PHONY: all
all: x86-insn-fuzz-all
@@ -67,7 +70,8 @@ distclean: clean
.PHONY: clean
clean:
- rm -f *.a *.o $(DEPS_RM) afl-harness afl-harness-cov *.gcda *.gcno *.gcov
+ rm -f *.a *.o $(DEPS_RM) *.gcda *.gcno *.gcov
+ rm -f afl-harness afl-harness-cov libfuzzer-harness
rm -rf x86_emulate x86-emulate.c x86-emulate.h wrappers.c cpuid.c
.PHONY: install
diff --git a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c
index eeeb6931f4..2ba9ca9e0b 100644
--- a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c
+++ b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c
@@ -906,14 +906,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *data_p, size_t size)
if ( size <= DATA_OFFSET )
{
- printf("Input too small\n");
- return 1;
+ return -1;
}
if ( size > FUZZ_CORPUS_SIZE )
{
- printf("Input too large\n");
- return 1;
+ return -1;
}
memcpy(&input, data_p, size);
diff --git a/tools/tests/x86_emulator/wrappers.c b/tools/tests/x86_emulator/wrappers.c
index 3829a6f416..8f3bd1656f 100644
--- a/tools/tests/x86_emulator/wrappers.c
+++ b/tools/tests/x86_emulator/wrappers.c
@@ -91,6 +91,17 @@ int __wrap_snprintf(char *buf, size_t n, const char *fmt, ...)
return rc;
}
+int __wrap_vsnprintf(char *buf, size_t n, const char *fmt, va_list varg)
+{
+ int rc;
+
+ emul_save_fpu_state();
+ rc = __real_vsnprintf(buf, n, fmt, varg);
+ emul_restore_fpu_state();
+
+ return rc;
+}
+
char *__wrap_strstr(const char *s1, const char *s2)
{
char *s;
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 2/2] Add tools/fuzz/oss-fuzz/build.sh
2024-07-22 11:27 [PATCH v3 1/2] Add libfuzzer target to fuzz/x86_instruction_emulator Tamas K Lengyel
@ 2024-07-22 11:27 ` Tamas K Lengyel
2024-07-22 12:20 ` Jan Beulich
2024-07-22 12:24 ` [PATCH v3 1/2] Add libfuzzer target to fuzz/x86_instruction_emulator Jan Beulich
1 sibling, 1 reply; 9+ messages in thread
From: Tamas K Lengyel @ 2024-07-22 11:27 UTC (permalink / raw)
To: xen-devel
Cc: Tamas K Lengyel, Andrew Cooper, George Dunlap, Jan Beulich,
Julien Grall, Stefano Stabellini, Anthony PERARD
The build integration script for oss-fuzz targets. Future fuzzing targets can
be added to this script and those targets will be automatically picked up by
oss-fuzz without having to open separate PRs on the oss-fuzz repo.
Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
---
v3: Add Apache-2.0 to LICENSES and use only SPDX on script
---
LICENSES/Apache-2.0 | 202 +++++++++++++++++++++++++++++++++++
tools/fuzz/oss-fuzz/build.sh | 11 ++
2 files changed, 213 insertions(+)
create mode 100644 LICENSES/Apache-2.0
create mode 100755 tools/fuzz/oss-fuzz/build.sh
diff --git a/LICENSES/Apache-2.0 b/LICENSES/Apache-2.0
new file mode 100644
index 0000000000..d645695673
--- /dev/null
+++ b/LICENSES/Apache-2.0
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/tools/fuzz/oss-fuzz/build.sh b/tools/fuzz/oss-fuzz/build.sh
new file mode 100755
index 0000000000..08eeb66e4c
--- /dev/null
+++ b/tools/fuzz/oss-fuzz/build.sh
@@ -0,0 +1,11 @@
+#!/bin/bash -eu
+# Copyright 2024 Google LLC
+# SPDX-License-Identifier: Apache-2.0
+
+# This script is intended to be run only from the oss-fuzz docker framework
+# See https://google.github.io/oss-fuzz/getting-started/new-project-guide/#buildsh
+cd xen
+./configure --disable-stubdom --disable-pvshim --disable-docs --disable-xen --with-system-qemu
+make clang=y -C tools/include
+make clang=y -C tools/fuzz/x86_instruction_emulator libfuzzer-harness
+cp tools/fuzz/x86_instruction_emulator/libfuzzer-harness $OUT/x86_instruction_emulator
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v3 2/2] Add tools/fuzz/oss-fuzz/build.sh
2024-07-22 11:27 ` [PATCH v3 2/2] Add tools/fuzz/oss-fuzz/build.sh Tamas K Lengyel
@ 2024-07-22 12:20 ` Jan Beulich
2024-07-22 13:49 ` Tamas K Lengyel
2024-07-22 14:03 ` Anthony PERARD
0 siblings, 2 replies; 9+ messages in thread
From: Jan Beulich @ 2024-07-22 12:20 UTC (permalink / raw)
To: Tamas K Lengyel
Cc: Andrew Cooper, Julien Grall, Stefano Stabellini, Anthony PERARD,
xen-devel
On 22.07.2024 13:27, Tamas K Lengyel wrote:
> --- /dev/null
> +++ b/LICENSES/Apache-2.0
> @@ -0,0 +1,202 @@
> +
> + Apache License
> + Version 2.0, January 2004
> + http://www.apache.org/licenses/
Better https:// (also near the end) nowadays?
Other files in this directory also have at least one Valid-License-Identifier:
line and at least one SPDX-URL: one. Depending on what would be put there, I'd
then wonder whether ...
> --- /dev/null
> +++ b/tools/fuzz/oss-fuzz/build.sh
> @@ -0,0 +1,11 @@
> +#!/bin/bash -eu
> +# Copyright 2024 Google LLC
> +# SPDX-License-Identifier: Apache-2.0
... there wouldn't want to be an "-only" tag here. Yet I'm entirely uncertain
with this, as CC-BY-4.0 also has no such tag.
I guess I should offer making respective adjustments while committing. I'll
wait with an ack though to give Alejandro some time to confirm that you
addressed his bash related comment.
Jan
> +# This script is intended to be run only from the oss-fuzz docker framework
> +# See https://google.github.io/oss-fuzz/getting-started/new-project-guide/#buildsh
> +cd xen
> +./configure --disable-stubdom --disable-pvshim --disable-docs --disable-xen --with-system-qemu
> +make clang=y -C tools/include
> +make clang=y -C tools/fuzz/x86_instruction_emulator libfuzzer-harness
> +cp tools/fuzz/x86_instruction_emulator/libfuzzer-harness $OUT/x86_instruction_emulator
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] Add libfuzzer target to fuzz/x86_instruction_emulator
2024-07-22 11:27 [PATCH v3 1/2] Add libfuzzer target to fuzz/x86_instruction_emulator Tamas K Lengyel
2024-07-22 11:27 ` [PATCH v3 2/2] Add tools/fuzz/oss-fuzz/build.sh Tamas K Lengyel
@ 2024-07-22 12:24 ` Jan Beulich
2024-07-22 13:51 ` Tamas K Lengyel
1 sibling, 1 reply; 9+ messages in thread
From: Jan Beulich @ 2024-07-22 12:24 UTC (permalink / raw)
To: Tamas K Lengyel
Cc: Andrew Cooper, Roger Pau Monné, Anthony PERARD, xen-devel
On 22.07.2024 13:27, Tamas K Lengyel wrote:
> This target enables integration into oss-fuzz. Changing invalid input return
> to -1 as values other then 0/-1 are reserved by libfuzzer. Also adding the
> missing __wrap_vsnprintf wrapper which is required for successful oss-fuzz
> build.
>
> Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
> ---
> v3: don't include libfuzzer-harness in target 'all' as it requires specific cc
With this, how is it going to be built at all? Only by invoking the special
target "manually" as it seems? Which sets this up for easy bit-rotting. I
wonder what others think here ...
Jan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 2/2] Add tools/fuzz/oss-fuzz/build.sh
2024-07-22 12:20 ` Jan Beulich
@ 2024-07-22 13:49 ` Tamas K Lengyel
2024-07-22 14:03 ` Anthony PERARD
1 sibling, 0 replies; 9+ messages in thread
From: Tamas K Lengyel @ 2024-07-22 13:49 UTC (permalink / raw)
To: Jan Beulich
Cc: Andrew Cooper, Julien Grall, Stefano Stabellini, Anthony PERARD,
xen-devel
On Mon, Jul 22, 2024 at 8:20 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 22.07.2024 13:27, Tamas K Lengyel wrote:
> > --- /dev/null
> > +++ b/LICENSES/Apache-2.0
> > @@ -0,0 +1,202 @@
> > +
> > + Apache License
> > + Version 2.0, January 2004
> > + http://www.apache.org/licenses/
>
> Better https:// (also near the end) nowadays?
This is a copy of https://www.apache.org/licenses/LICENSE-2.0.txt and
I'm not going to start modifying it even for such trivial reasons.
> Other files in this directory also have at least one Valid-License-Identifier:
> line and at least one SPDX-URL: one.
I didn't notice but should be trivial to add.
Tamas
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] Add libfuzzer target to fuzz/x86_instruction_emulator
2024-07-22 12:24 ` [PATCH v3 1/2] Add libfuzzer target to fuzz/x86_instruction_emulator Jan Beulich
@ 2024-07-22 13:51 ` Tamas K Lengyel
2024-07-22 13:57 ` Jan Beulich
0 siblings, 1 reply; 9+ messages in thread
From: Tamas K Lengyel @ 2024-07-22 13:51 UTC (permalink / raw)
To: Jan Beulich
Cc: Andrew Cooper, Roger Pau Monné, Anthony PERARD, xen-devel
On Mon, Jul 22, 2024 at 8:24 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 22.07.2024 13:27, Tamas K Lengyel wrote:
> > This target enables integration into oss-fuzz. Changing invalid input return
> > to -1 as values other then 0/-1 are reserved by libfuzzer. Also adding the
> > missing __wrap_vsnprintf wrapper which is required for successful oss-fuzz
> > build.
> >
> > Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
> > ---
> > v3: don't include libfuzzer-harness in target 'all' as it requires specific cc
>
> With this, how is it going to be built at all? Only by invoking the special
> target "manually" as it seems? Which sets this up for easy bit-rotting. I
> wonder what others think here ...
Yes, by calling make with the specific target. It's not going to
bitrot because oss-fuzz will pick up any regression on a daily basis
to this target. I assume you would be interested in receiving the
fuzzing reports so it would show as a build failure in case something
broke it.
Tamas
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] Add libfuzzer target to fuzz/x86_instruction_emulator
2024-07-22 13:51 ` Tamas K Lengyel
@ 2024-07-22 13:57 ` Jan Beulich
2024-07-22 14:07 ` Tamas K Lengyel
0 siblings, 1 reply; 9+ messages in thread
From: Jan Beulich @ 2024-07-22 13:57 UTC (permalink / raw)
To: Tamas K Lengyel
Cc: Andrew Cooper, Roger Pau Monné, Anthony PERARD, xen-devel
On 22.07.2024 15:51, Tamas K Lengyel wrote:
> On Mon, Jul 22, 2024 at 8:24 AM Jan Beulich <jbeulich@suse.com> wrote:
>>
>> On 22.07.2024 13:27, Tamas K Lengyel wrote:
>>> This target enables integration into oss-fuzz. Changing invalid input return
>>> to -1 as values other then 0/-1 are reserved by libfuzzer. Also adding the
>>> missing __wrap_vsnprintf wrapper which is required for successful oss-fuzz
>>> build.
>>>
>>> Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
>>> ---
>>> v3: don't include libfuzzer-harness in target 'all' as it requires specific cc
>>
>> With this, how is it going to be built at all? Only by invoking the special
>> target "manually" as it seems? Which sets this up for easy bit-rotting. I
>> wonder what others think here ...
>
> Yes, by calling make with the specific target. It's not going to
> bitrot because oss-fuzz will pick up any regression on a daily basis
> to this target. I assume you would be interested in receiving the
> fuzzing reports so it would show as a build failure in case something
> broke it.
Please forgive my lack of knowledge here, but which part of whose
infrastructure would pick up stuff in a daily basis, and what fuzzing
reports (I've never seen any, daily or not) are you talking about?
For now it feels to me as if you're talking of what's possible down
the road, not what's going to happen from the moment this patch was
committed in a 2nd try. If so, the gap between both points in time
may be significant, and hence my bit-rotting concern would still
apply.
Jan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 2/2] Add tools/fuzz/oss-fuzz/build.sh
2024-07-22 12:20 ` Jan Beulich
2024-07-22 13:49 ` Tamas K Lengyel
@ 2024-07-22 14:03 ` Anthony PERARD
1 sibling, 0 replies; 9+ messages in thread
From: Anthony PERARD @ 2024-07-22 14:03 UTC (permalink / raw)
To: Jan Beulich
Cc: Tamas K Lengyel, Andrew Cooper, Julien Grall, Stefano Stabellini,
xen-devel
On Mon, Jul 22, 2024 at 02:20:21PM +0200, Jan Beulich wrote:
> On 22.07.2024 13:27, Tamas K Lengyel wrote:
> > +# SPDX-License-Identifier: Apache-2.0
>
> ... there wouldn't want to be an "-only" tag here. Yet I'm entirely uncertain
> with this, as CC-BY-4.0 also has no such tag.
FYI, all valid SPDX identifier are listed there:
https://spdx.org/licenses/
"Apache-2.0" is the correct one to use.
Cheers,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/2] Add libfuzzer target to fuzz/x86_instruction_emulator
2024-07-22 13:57 ` Jan Beulich
@ 2024-07-22 14:07 ` Tamas K Lengyel
0 siblings, 0 replies; 9+ messages in thread
From: Tamas K Lengyel @ 2024-07-22 14:07 UTC (permalink / raw)
To: Jan Beulich
Cc: Andrew Cooper, Roger Pau Monné, Anthony PERARD, xen-devel
On Mon, Jul 22, 2024 at 9:57 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 22.07.2024 15:51, Tamas K Lengyel wrote:
> > On Mon, Jul 22, 2024 at 8:24 AM Jan Beulich <jbeulich@suse.com> wrote:
> >>
> >> On 22.07.2024 13:27, Tamas K Lengyel wrote:
> >>> This target enables integration into oss-fuzz. Changing invalid input return
> >>> to -1 as values other then 0/-1 are reserved by libfuzzer. Also adding the
> >>> missing __wrap_vsnprintf wrapper which is required for successful oss-fuzz
> >>> build.
> >>>
> >>> Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
> >>> ---
> >>> v3: don't include libfuzzer-harness in target 'all' as it requires specific cc
> >>
> >> With this, how is it going to be built at all? Only by invoking the special
> >> target "manually" as it seems? Which sets this up for easy bit-rotting. I
> >> wonder what others think here ...
> >
> > Yes, by calling make with the specific target. It's not going to
> > bitrot because oss-fuzz will pick up any regression on a daily basis
> > to this target. I assume you would be interested in receiving the
> > fuzzing reports so it would show as a build failure in case something
> > broke it.
>
> Please forgive my lack of knowledge here, but which part of whose
> infrastructure would pick up stuff in a daily basis, and what fuzzing
> reports (I've never seen any, daily or not) are you talking about?
> For now it feels to me as if you're talking of what's possible down
> the road, not what's going to happen from the moment this patch was
> committed in a 2nd try. If so, the gap between both points in time
> may be significant, and hence my bit-rotting concern would still
> apply.
Once these two patches are merged to Xen I'll send my PR to oss-fuzz
to have it pull Xen daily and build this fuzzer and run it on their
infrastructure. It usually takes them less than 24 hours to respond to
PRs, I have added multiple projects there already so the "lag" you
worry about it's not something to worry about.
Having these two patches upstream in Xen is not required by the way, I
could just send these to be upstream to oss-fuzz and have them apply
them after it pulling the xen git repo but it gives more flexibility
to you guys to add additional fuzzers in the future more easily if
these are in your repository because you don't even have to touch
oss-fuzz afterwards.
If you need to learn more about what oss-fuzz is and how it operates
they have a quite nice documentation.
Tamas
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-07-22 14:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-22 11:27 [PATCH v3 1/2] Add libfuzzer target to fuzz/x86_instruction_emulator Tamas K Lengyel
2024-07-22 11:27 ` [PATCH v3 2/2] Add tools/fuzz/oss-fuzz/build.sh Tamas K Lengyel
2024-07-22 12:20 ` Jan Beulich
2024-07-22 13:49 ` Tamas K Lengyel
2024-07-22 14:03 ` Anthony PERARD
2024-07-22 12:24 ` [PATCH v3 1/2] Add libfuzzer target to fuzz/x86_instruction_emulator Jan Beulich
2024-07-22 13:51 ` Tamas K Lengyel
2024-07-22 13:57 ` Jan Beulich
2024-07-22 14:07 ` Tamas K Lengyel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.