lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56f420ed-e985-2433-31fd-50515d8bcd1c@collabora.co.uk>
Date:   Thu, 22 Sep 2016 11:23:51 -0300
From:   Emilio López <emilio.lopez@...labora.co.uk>
To:     Michael Ellerman <mpe@...erman.id.au>
Cc:     shuah@...nel.org, devel@...verdev.osuosl.org,
        gustavo.padovan@...labora.co.uk, riandrews@...roid.com,
        daniel.vetter@...ll.ch, John.C.Harrison@...el.com,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        ghackmann@...gle.com, robdclark@...il.com,
        linux-kselftest@...r.kernel.org, maarten.lankhorst@...ux.intel.com,
        daniels@...labora.com, arve@...roid.com, emil.l.velikov@...il.com
Subject: Re: [PATCH 1/7] selftest: sync: basic tests for sw_sync framework

Hi Michael,

El 22/09/16 a las 06:43, Michael Ellerman escribió:
> Emilio López <emilio.lopez@...labora.co.uk> writes:
>> +CFLAGS += -I../../../../include/uapi/
>
> Please don't include the unprocessed uapi headers, they are not meant to
> be directly included in userspace programs.
>
> They even say so:
>
> include/uapi/linux/types.h:#warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders"
>
>> +CFLAGS += -I../../../../include/
>
> Please don't include the *kernel* headers, they're really not meant to
> be used in userspace programs :)
>
>> +CFLAGS += -I../../../../usr/include/
>
> That is the correct place to get them from. They'll have been put there
> by 'make headers_install'.
>
>> +CFLAGS += -I../../../../drivers/dma-buf/
>
> That's also a bit fishy.

My inspiration here has been tools/testing/selftests/memfd/Makefile, 
which does it this way. If I only include the ones on usr then it 
doesn't build, as there's no sync_file.h available, even after running 
make headers_install. How am I supposed to use the ioctls from there?

The dma-buf include path is a leftover from the previous version, 
there's no longer any headers there. I've fixed the other things you 
pointed out, the new Makefile is below if you want to take another look.

Thanks for the review! :)
Emilio

---

CFLAGS += -O2 -g -std=gnu89 -pthread -Wall -Wextra
CFLAGS += -I../../../../usr/include/
LDFLAGS += -pthread

TEST_PROGS = sync_test

all: $(TEST_PROGS)

include ../lib.mk

OBJS = sync_test.o sync.o

TESTS += sync_alloc.o
TESTS += sync_fence.o
TESTS += sync_merge.o
TESTS += sync_wait.o
TESTS += sync_stress_parallelism.o
TESTS += sync_stress_consumer.o
TESTS += sync_stress_merge.o

sync_test: $(OBJS) $(TESTS)

clean:
	$(RM) sync_test $(OBJS) $(TESTS)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ