Hi Ben,

The patch looks good to me. I have signed it here:

https://github.com/bshastry/ovs/tree/try-patch-v3

that was rebased on top off latest master.

Regards,
Bhargava

On 08/22/2018 01:01 AM, Ben Pfaff wrote:
> I sent a v2:
>         https://patchwork.ozlabs.org/patch/960749/
> 
> If you like it, I need a Signed-off-by from you.
> 
> Q: What's a Signed-off-by and how do I provide one?
> 
>     A: Free and open source software projects usually require a contributor to
>     provide some assurance that they're entitled to contribute the code that
>     they provide.  Some projects, for example, do this with a Contributor
>     License Agreement (CLA) or a copyright assignment that is signed on paper
>     or electronically.
> 
>     For this purpose, Open vSwitch has adopted something called the 
> Developer's
>     Certificate of Origin (DCO), which is also used by the Linux kernel and
>     originated there.  Informally stated, agreeing to the DCO is the
>     developer's way of attesting that a particular commit that they are
>     contributing is one that they are allowed to contribute.  You should visit
>     https://developercertificate.org/ to read the full statement of the DCO,
>     which is less than 200 words long.
> 
>     To certify compliance with the Developer's Certificate of Origin for a
>     particular commit, just add the following line to the end of your commit
>     message, properly substituting your name and email address:
> 
>         Signed-off-by: Firstname Lastname <[email protected]>
> 
>     Git has special support for adding a Signed-off-by line to a commit
>     message: when you run "git commit", just add the -s option, as in "git
>     commit -s".  If you use the "git citool" GUI for commits, you can add a
>     Signed-off-by line to the commit message by pressing Control+S.  Other Git
>     user interfaces may provide similar support.
> 
> Thanks,
> 
> Ben.
> 
> On Fri, Aug 03, 2018 at 10:51:39AM +0200, Bhargava Shastry wrote:
>> Hello,
>>
>> Gentle reminder to check if the proposed patch works :-)
>>
>> Thanks,
>> Bhargava
>>
>> On 07/30/2018 11:58 AM, Bhargava Shastry wrote:
>>> Any updates on the proposed patch? :-)
>>>
>>> On 07/16/2018 02:07 PM, Bhargava Shastry wrote:
>>>> Update: I fixed these errors in the attached patch that supersedes the
>>>> patch here (https://patchwork.ozlabs.org/patch/942118/)
>>>>
>>>> The major change is that I add the following line for each fuzz target
>>>> binary in the tests/oss-fuzz/automake.mk file:
>>>>
>>>> e.g.,
>>>> tests_oss_fuzz_flow_extract_target_LDFLAGS = $(LIB_FUZZING_ENGINE) \
>>>>                                             -lc++
>>>>
>>>> Regards,
>>>> Bhargava
>>>>
>>>> On 07/16/2018 11:45 AM, Bhargava Shastry wrote:
>>>>> Oops, here's the link failure log:
>>>>>
>>>>> ```
>>>>> /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crt1.o: In
>>>>> function `_start':
>>>>> (.text+0x20): undefined reference to `main'
>>>>> clang-7: error: linker command failed with exit code 1 (use -v to see
>>>>> invocation)
>>>>> Makefile:4159: recipe for target 'tests/oss-fuzz/flow_extract_target' 
>>>>> failed
>>>>> make: *** [tests/oss-fuzz/flow_extract_target] Error 1
>>>>> fuzzers build failed.
>>>>> ```
>>>>>
>>>>> The main symbol is provided by libfuzzer (clang++ -lFuzzingEngine)
>>>>>
>>>>> Regards,
>>>>> Bhargava
>>>>>
>>>>> On 07/16/2018 11:36 AM, Bhargava Shastry wrote:
>>>>>> Hi Ben,
>>>>>>
>>>>>>> Never mind that one, I failed to check in some of that.
>>>>>>>
>>>>>>> I sent it formally:
>>>>>>>         https://patchwork.ozlabs.org/patch/942118/
>>>>>>
>>>>>> Thanks for the patch. This fixes the previous error. Now, there are some
>>>>>> new errors during the compilation/linking process. I think most of this
>>>>>> can be fixed if I figure out how automake works. In a nutshell, here's
>>>>>> the problem:
>>>>>>
>>>>>> - oss-fuzz provides compilation flags that can be plugged in like so
>>>>>> ```
>>>>>> CC=clang
>>>>>> CXX=clang++
>>>>>> CFLAGS=-O1 -fno-omit-frame-pointer -gline-tables-only
>>>>>> -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address
>>>>>> -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link
>>>>>> CXXFLAGS=-O1 -fno-omit-frame-pointer -gline-tables-only
>>>>>> -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address
>>>>>> -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link 
>>>>>> -stdlib=libc++
>>>>>> ```
>>>>>>
>>>>>> And here's what I used to do before
>>>>>>
>>>>>> - Use clang and CFLAGS above plus some additional includes to compile
>>>>>> each of the fuzzer tests
>>>>>> - Use clang++ and additional linker flags to link these into a fuzzer 
>>>>>> binary
>>>>>>
>>>>>> Now, I see that the compilation works
>>>>>> ```
>>>>>> depbase=`echo tests/oss-fuzz/flow_extract_target.o | sed
>>>>>> 's|[^/]*$|.deps/&|;s|\.o$||'`;\
>>>>>> clang -DHAVE_CONFIG_H -I.    -I ./include -I ./include -I ./lib -I ./lib
>>>>>> -I/usr/include   -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare
>>>>>> -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum
>>>>>> -Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes
>>>>>> -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers
>>>>>> -Wthread-safety -fno-strict-aliasing -Wswitch-bool
>>>>>> -Wlogical-not-parentheses -Wsizeof-array-argument -Wshift-negative-value
>>>>>> -Qunused-arguments -Wshadow -Wno-null-pointer-arithmetic    -O1
>>>>>> -fno-omit-frame-pointer -gline-tables-only
>>>>>> -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address
>>>>>> -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -MT
>>>>>> tests/oss-fuzz/flow_extract_target.o -MD -MP -MF $depbase.Tpo -c -o
>>>>>> tests/oss-fuzz/flow_extract_target.o
>>>>>> tests/oss-fuzz/flow_extract_target.c &&\
>>>>>> mv -f $depbase.Tpo $depbase.Po
>>>>>> ```
>>>>>>
>>>>>> However, the linking fails
>>>>>> ```
>>>>>> libtool: link: clang -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare
>>>>>> -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum
>>>>>> -Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes
>>>>>> -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers
>>>>>> -Wthread-safety -fno-strict-aliasing -Wswitch-bool
>>>>>> -Wlogical-not-parentheses -Wsizeof-array-argument -Wshift-negative-value
>>>>>> -Qunused-arguments -Wshadow -Wno-null-pointer-arithmetic -O1
>>>>>> -fno-omit-frame-pointer -gline-tables-only
>>>>>> -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address
>>>>>> -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -o
>>>>>> tests/oss-fuzz/flow_extract_target tests/oss-fuzz/flow_extract_target.o
>>>>>> -L/usr/lib lib/.libs/libopenvswitch.a -lssl -lcrypto -latomic
>>>>>> ```
>>>>>>
>>>>>> I think adding -lFuzzingEngine should fix this but another variable
>>>>>> between my build script and automake is the use of clang++ for linking.
>>>>>>
>>>>>> Do you know how I can experiment with different linker flags and
>>>>>> compiler/linker in automake?
>>>>>>
>>>>>> Regards,
>>>>>> Bhargava
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>> -- 
>> Bhargava Shastry <[email protected]>
>> Security in Telecommunications
>> TU Berlin / Telekom Innovation Laboratories
>> Ernst-Reuter-Platz 7, Sekr TEL 17 / D - 10587 Berlin, Germany
>> phone: +49 30 8353 58235
>> Keybase: https://keybase.io/bshastry

-- 
Bhargava Shastry <[email protected]>
Security in Telecommunications
TU Berlin / Telekom Innovation Laboratories
Ernst-Reuter-Platz 7, Sekr TEL 17 / D - 10587 Berlin, Germany
phone: +49 30 8353 58235
Keybase: https://keybase.io/bshastry
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to