[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] Add scripts/oss-fuzz/build.sh


  • To: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 25 Jun 2024 16:57:23 +0200
  • Autocrypt: addr=jbeulich@xxxxxxxx; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 25 Jun 2024 14:57:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 25.06.2024 15:42, Tamas K Lengyel wrote:
> On Tue, Jun 25, 2024 at 9:18 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>
>> On 25.06.2024 14:39, Tamas K Lengyel wrote:
>>> On Tue, Jun 25, 2024 at 7:40 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>>>
>>>> On 25.06.2024 13:15, Tamas K Lengyel wrote:
>>>>> On Tue, Jun 25, 2024 at 5:17 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>>>>>
>>>>>> On 21.06.2024 21:14, Tamas K Lengyel wrote:
>>>>>>> --- /dev/null
>>>>>>> +++ b/scripts/oss-fuzz/build.sh
>>>>>>> @@ -0,0 +1,22 @@
>>>>>>> +#!/bin/bash -eu
>>>>>>> +# Copyright 2024 Google LLC
>>>>>>> +#
>>>>>>> +# 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.
>>>>>>> +#
>>>>>>> +################################################################################
>>>>>>
>>>>>> I'm a little concerned here, but maybe I shouldn't be. According to what
>>>>>> I'm reading, the Apache 2.0 license is at least not entirely compatible
>>>>>> with GPLv2. While apparently the issue is solely with linking in Apache-
>>>>>> licensed code, I wonder whether us not having a respective file under
>>>>>> ./LICENSES/ (and no pre-cooked SPDX identifier to use) actually has a
>>>>>> reason possibly excluding the use of such code in the project.
>>>>>>
>>>>>>> +cd xen
>>>>>>> +./configure clang=y --disable-stubdom --disable-pvshim --disable-docs 
>>>>>>> --disable-xen
>>>>>>> +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
>>>>>>
>>>>>> In addition to what Julien said, I further think that filename / 
>>>>>> directory
>>>>>> name are too generic for a file with this pretty specific contents.
>>>>>
>>>>> I don't really get your concern here?
>>>>
>>>> The thing that is built is specifically a x86 emulator piece of fuzzing
>>>> binary. Neither the directory name nor the file name contain either x86
>>>> or (at least) emul.
>>>
>>> Because this build script is not necessarily restricted to build only
>>> this one harness in the future. Right now that's the only one that has
>>> a suitable libfuzzer harness, but the reason this build script is here
>>> is to be easily able to add additional fuzzing binaries without the
>>> need to open PRs on the oss-fuzz repo, which as I understand no one
>>> was willing to do in the xen community due to the CLA. Now that the
>>> integration is going to be in oss-fuzz, the only thing you have to do
>>> in the future is add more stuff to this script to get fuzzed. Anything
>>> that's compiled with libfuzzer and copied to $OUT will be picked up by
>>> oss-fuzz automatically. Makes sense?
>>
>> It does, yes. Yet nothing like that was said in the description. How
>> should anyone have known there are future possibilities with this script?
> 
> Apologies, to me "The build integration script for oss-fuzz targets."
> was sufficiently descriptive but it may require some familiarity with
> oss-fuzz to get. I can certainly add the above text to the commit
> message if that helps.

Yes please, or and abridged variant thereof.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.