diff mbox series

[v8,15/18] nitro_enclaves: Add Makefile for the Nitro Enclaves driver

Message ID 20200904173718.64857-16-andraprs@amazon.com (mailing list archive)
State New, archived
Headers show
Series Add support for Nitro Enclaves | expand

Commit Message

Paraschiv, Andra-Irina Sept. 4, 2020, 5:37 p.m. UTC
Signed-off-by: Andra Paraschiv <andraprs@amazon.com>
Reviewed-by: Alexander Graf <graf@amazon.com>
---
Changelog

v7 -> v8

* No changes.

v6 -> v7

* No changes.

v5 -> v6

* No changes.

v4 -> v5

* No changes.

v3 -> v4

* No changes.

v2 -> v3

* Remove the GPL additional wording as SPDX-License-Identifier is
  already in place.

v1 -> v2

* Update path to Makefile to match the drivers/virt/nitro_enclaves
  directory.
---
 drivers/virt/Makefile                |  2 ++
 drivers/virt/nitro_enclaves/Makefile | 11 +++++++++++
 2 files changed, 13 insertions(+)
 create mode 100644 drivers/virt/nitro_enclaves/Makefile

Comments

Greg KH Sept. 7, 2020, 9 a.m. UTC | #1
On Fri, Sep 04, 2020 at 08:37:15PM +0300, Andra Paraschiv wrote:
> Signed-off-by: Andra Paraschiv <andraprs@amazon.com>
> Reviewed-by: Alexander Graf <graf@amazon.com>
> ---
> Changelog
> 
> v7 -> v8
> 
> * No changes.
> 
> v6 -> v7
> 
> * No changes.
> 
> v5 -> v6
> 
> * No changes.
> 
> v4 -> v5
> 
> * No changes.
> 
> v3 -> v4
> 
> * No changes.
> 
> v2 -> v3
> 
> * Remove the GPL additional wording as SPDX-License-Identifier is
>   already in place.
> 
> v1 -> v2
> 
> * Update path to Makefile to match the drivers/virt/nitro_enclaves
>   directory.
> ---
>  drivers/virt/Makefile                |  2 ++
>  drivers/virt/nitro_enclaves/Makefile | 11 +++++++++++
>  2 files changed, 13 insertions(+)
>  create mode 100644 drivers/virt/nitro_enclaves/Makefile
> 
> diff --git a/drivers/virt/Makefile b/drivers/virt/Makefile
> index fd331247c27a..f28425ce4b39 100644
> --- a/drivers/virt/Makefile
> +++ b/drivers/virt/Makefile
> @@ -5,3 +5,5 @@
>  
>  obj-$(CONFIG_FSL_HV_MANAGER)	+= fsl_hypervisor.o
>  obj-y				+= vboxguest/
> +
> +obj-$(CONFIG_NITRO_ENCLAVES)	+= nitro_enclaves/
> diff --git a/drivers/virt/nitro_enclaves/Makefile b/drivers/virt/nitro_enclaves/Makefile
> new file mode 100644
> index 000000000000..e9f4fcd1591e
> --- /dev/null
> +++ b/drivers/virt/nitro_enclaves/Makefile
> @@ -0,0 +1,11 @@
> +# SPDX-License-Identifier: GPL-2.0
> +#
> +# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
> +
> +# Enclave lifetime management support for Nitro Enclaves (NE).
> +
> +obj-$(CONFIG_NITRO_ENCLAVES) += nitro_enclaves.o
> +
> +nitro_enclaves-y := ne_pci_dev.o ne_misc_dev.o
> +
> +ccflags-y += -Wall

That flag is _really_ risky over time, are you _SURE_ that all new
versions of clang and gcc will never produce any warnings?  People work
to fix up build warnings quite quickly for new compilers, you shouldn't
prevent the code from being built at all just for that, right?

thanks,

greg k-h
Paraschiv, Andra-Irina Sept. 7, 2020, 1:35 p.m. UTC | #2
On 07/09/2020 12:00, Greg KH wrote:
>
>
> On Fri, Sep 04, 2020 at 08:37:15PM +0300, Andra Paraschiv wrote:
>> Signed-off-by: Andra Paraschiv <andraprs@amazon.com>
>> Reviewed-by: Alexander Graf <graf@amazon.com>
>> ---
>> Changelog
>>
>> v7 -> v8
>>
>> * No changes.
>>
>> v6 -> v7
>>
>> * No changes.
>>
>> v5 -> v6
>>
>> * No changes.
>>
>> v4 -> v5
>>
>> * No changes.
>>
>> v3 -> v4
>>
>> * No changes.
>>
>> v2 -> v3
>>
>> * Remove the GPL additional wording as SPDX-License-Identifier is
>>    already in place.
>>
>> v1 -> v2
>>
>> * Update path to Makefile to match the drivers/virt/nitro_enclaves
>>    directory.
>> ---
>>   drivers/virt/Makefile                |  2 ++
>>   drivers/virt/nitro_enclaves/Makefile | 11 +++++++++++
>>   2 files changed, 13 insertions(+)
>>   create mode 100644 drivers/virt/nitro_enclaves/Makefile
>>
>> diff --git a/drivers/virt/Makefile b/drivers/virt/Makefile
>> index fd331247c27a..f28425ce4b39 100644
>> --- a/drivers/virt/Makefile
>> +++ b/drivers/virt/Makefile
>> @@ -5,3 +5,5 @@
>>
>>   obj-$(CONFIG_FSL_HV_MANAGER) += fsl_hypervisor.o
>>   obj-y                                += vboxguest/
>> +
>> +obj-$(CONFIG_NITRO_ENCLAVES) += nitro_enclaves/
>> diff --git a/drivers/virt/nitro_enclaves/Makefile b/drivers/virt/nitro_enclaves/Makefile
>> new file mode 100644
>> index 000000000000..e9f4fcd1591e
>> --- /dev/null
>> +++ b/drivers/virt/nitro_enclaves/Makefile
>> @@ -0,0 +1,11 @@
>> +# SPDX-License-Identifier: GPL-2.0
>> +#
>> +# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
>> +
>> +# Enclave lifetime management support for Nitro Enclaves (NE).
>> +
>> +obj-$(CONFIG_NITRO_ENCLAVES) += nitro_enclaves.o
>> +
>> +nitro_enclaves-y := ne_pci_dev.o ne_misc_dev.o
>> +
>> +ccflags-y += -Wall
> That flag is _really_ risky over time, are you _SURE_ that all new
> versions of clang and gcc will never produce any warnings?  People work
> to fix up build warnings quite quickly for new compilers, you shouldn't
> prevent the code from being built at all just for that, right?
>

That would also need Werror, to have warnings treated as errors and 
prevent building the codebase. If it's about something more, just let me 
know.

Would this apply to the samples directory as well, no?

I could remove the Wall flags and keep it for development validation 
purposes on my side to solve at least the warnings that would further see.

Thanks,
Andra



Amazon Development Center (Romania) S.R.L. registered office: 27A Sf. Lazar Street, UBC5, floor 2, Iasi, Iasi County, 700045, Romania. Registered in Romania. Registration number J22/2621/2005.
Greg KH Sept. 7, 2020, 2:08 p.m. UTC | #3
On Mon, Sep 07, 2020 at 04:35:23PM +0300, Paraschiv, Andra-Irina wrote:
> 
> 
> On 07/09/2020 12:00, Greg KH wrote:
> > 
> > 
> > On Fri, Sep 04, 2020 at 08:37:15PM +0300, Andra Paraschiv wrote:
> > > Signed-off-by: Andra Paraschiv <andraprs@amazon.com>
> > > Reviewed-by: Alexander Graf <graf@amazon.com>
> > > ---
> > > Changelog
> > > 
> > > v7 -> v8
> > > 
> > > * No changes.
> > > 
> > > v6 -> v7
> > > 
> > > * No changes.
> > > 
> > > v5 -> v6
> > > 
> > > * No changes.
> > > 
> > > v4 -> v5
> > > 
> > > * No changes.
> > > 
> > > v3 -> v4
> > > 
> > > * No changes.
> > > 
> > > v2 -> v3
> > > 
> > > * Remove the GPL additional wording as SPDX-License-Identifier is
> > >    already in place.
> > > 
> > > v1 -> v2
> > > 
> > > * Update path to Makefile to match the drivers/virt/nitro_enclaves
> > >    directory.
> > > ---
> > >   drivers/virt/Makefile                |  2 ++
> > >   drivers/virt/nitro_enclaves/Makefile | 11 +++++++++++
> > >   2 files changed, 13 insertions(+)
> > >   create mode 100644 drivers/virt/nitro_enclaves/Makefile
> > > 
> > > diff --git a/drivers/virt/Makefile b/drivers/virt/Makefile
> > > index fd331247c27a..f28425ce4b39 100644
> > > --- a/drivers/virt/Makefile
> > > +++ b/drivers/virt/Makefile
> > > @@ -5,3 +5,5 @@
> > > 
> > >   obj-$(CONFIG_FSL_HV_MANAGER) += fsl_hypervisor.o
> > >   obj-y                                += vboxguest/
> > > +
> > > +obj-$(CONFIG_NITRO_ENCLAVES) += nitro_enclaves/
> > > diff --git a/drivers/virt/nitro_enclaves/Makefile b/drivers/virt/nitro_enclaves/Makefile
> > > new file mode 100644
> > > index 000000000000..e9f4fcd1591e
> > > --- /dev/null
> > > +++ b/drivers/virt/nitro_enclaves/Makefile
> > > @@ -0,0 +1,11 @@
> > > +# SPDX-License-Identifier: GPL-2.0
> > > +#
> > > +# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
> > > +
> > > +# Enclave lifetime management support for Nitro Enclaves (NE).
> > > +
> > > +obj-$(CONFIG_NITRO_ENCLAVES) += nitro_enclaves.o
> > > +
> > > +nitro_enclaves-y := ne_pci_dev.o ne_misc_dev.o
> > > +
> > > +ccflags-y += -Wall
> > That flag is _really_ risky over time, are you _SURE_ that all new
> > versions of clang and gcc will never produce any warnings?  People work
> > to fix up build warnings quite quickly for new compilers, you shouldn't
> > prevent the code from being built at all just for that, right?
> > 
> 
> That would also need Werror, to have warnings treated as errors and prevent
> building the codebase. If it's about something more, just let me know.

No, you are right, Werror would be needed here too.

W=1 gives you -Wall if you really want that, no need to add it by hand.

thanks,

greg k-h
Paraschiv, Andra-Irina Sept. 7, 2020, 3:05 p.m. UTC | #4
On 07/09/2020 17:08, Greg KH wrote:
>
> On Mon, Sep 07, 2020 at 04:35:23PM +0300, Paraschiv, Andra-Irina wrote:
>>
>> On 07/09/2020 12:00, Greg KH wrote:
>>>
>>> On Fri, Sep 04, 2020 at 08:37:15PM +0300, Andra Paraschiv wrote:
>>>> Signed-off-by: Andra Paraschiv <andraprs@amazon.com>
>>>> Reviewed-by: Alexander Graf <graf@amazon.com>
>>>> ---
>>>> Changelog
>>>>
>>>> v7 -> v8
>>>>
>>>> * No changes.
>>>>
>>>> v6 -> v7
>>>>
>>>> * No changes.
>>>>
>>>> v5 -> v6
>>>>
>>>> * No changes.
>>>>
>>>> v4 -> v5
>>>>
>>>> * No changes.
>>>>
>>>> v3 -> v4
>>>>
>>>> * No changes.
>>>>
>>>> v2 -> v3
>>>>
>>>> * Remove the GPL additional wording as SPDX-License-Identifier is
>>>>     already in place.
>>>>
>>>> v1 -> v2
>>>>
>>>> * Update path to Makefile to match the drivers/virt/nitro_enclaves
>>>>     directory.
>>>> ---
>>>>    drivers/virt/Makefile                |  2 ++
>>>>    drivers/virt/nitro_enclaves/Makefile | 11 +++++++++++
>>>>    2 files changed, 13 insertions(+)
>>>>    create mode 100644 drivers/virt/nitro_enclaves/Makefile
>>>>
>>>> diff --git a/drivers/virt/Makefile b/drivers/virt/Makefile
>>>> index fd331247c27a..f28425ce4b39 100644
>>>> --- a/drivers/virt/Makefile
>>>> +++ b/drivers/virt/Makefile
>>>> @@ -5,3 +5,5 @@
>>>>
>>>>    obj-$(CONFIG_FSL_HV_MANAGER) += fsl_hypervisor.o
>>>>    obj-y                                += vboxguest/
>>>> +
>>>> +obj-$(CONFIG_NITRO_ENCLAVES) += nitro_enclaves/
>>>> diff --git a/drivers/virt/nitro_enclaves/Makefile b/drivers/virt/nitro_enclaves/Makefile
>>>> new file mode 100644
>>>> index 000000000000..e9f4fcd1591e
>>>> --- /dev/null
>>>> +++ b/drivers/virt/nitro_enclaves/Makefile
>>>> @@ -0,0 +1,11 @@
>>>> +# SPDX-License-Identifier: GPL-2.0
>>>> +#
>>>> +# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
>>>> +
>>>> +# Enclave lifetime management support for Nitro Enclaves (NE).
>>>> +
>>>> +obj-$(CONFIG_NITRO_ENCLAVES) += nitro_enclaves.o
>>>> +
>>>> +nitro_enclaves-y := ne_pci_dev.o ne_misc_dev.o
>>>> +
>>>> +ccflags-y += -Wall
>>> That flag is _really_ risky over time, are you _SURE_ that all new
>>> versions of clang and gcc will never produce any warnings?  People work
>>> to fix up build warnings quite quickly for new compilers, you shouldn't
>>> prevent the code from being built at all just for that, right?
>>>
>> That would also need Werror, to have warnings treated as errors and prevent
>> building the codebase. If it's about something more, just let me know.
> No, you are right, Werror would be needed here too.
>
> W=1 gives you -Wall if you really want that, no need to add it by hand.

Good, we are on the some page then. :) Thanks for the heads-up with 
regard to the W=1 option.

Andra



Amazon Development Center (Romania) S.R.L. registered office: 27A Sf. Lazar Street, UBC5, floor 2, Iasi, Iasi County, 700045, Romania. Registered in Romania. Registration number J22/2621/2005.
diff mbox series

Patch

diff --git a/drivers/virt/Makefile b/drivers/virt/Makefile
index fd331247c27a..f28425ce4b39 100644
--- a/drivers/virt/Makefile
+++ b/drivers/virt/Makefile
@@ -5,3 +5,5 @@ 
 
 obj-$(CONFIG_FSL_HV_MANAGER)	+= fsl_hypervisor.o
 obj-y				+= vboxguest/
+
+obj-$(CONFIG_NITRO_ENCLAVES)	+= nitro_enclaves/
diff --git a/drivers/virt/nitro_enclaves/Makefile b/drivers/virt/nitro_enclaves/Makefile
new file mode 100644
index 000000000000..e9f4fcd1591e
--- /dev/null
+++ b/drivers/virt/nitro_enclaves/Makefile
@@ -0,0 +1,11 @@ 
+# SPDX-License-Identifier: GPL-2.0
+#
+# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+
+# Enclave lifetime management support for Nitro Enclaves (NE).
+
+obj-$(CONFIG_NITRO_ENCLAVES) += nitro_enclaves.o
+
+nitro_enclaves-y := ne_pci_dev.o ne_misc_dev.o
+
+ccflags-y += -Wall