Re: [yocto] [PATCH 1/2] package.bbclass: add prohibited-path qa test

2017-11-13 Thread Christopher Larson
On Mon, Nov 13, 2017 at 7:10 PM, Christopher Larson 
wrote:

>
>
> On Mon, Nov 13, 2017 at 11:17 AM, Martyn Welch 
> wrote:
>
>> From: Fabien Lahoudere 
>>
>> Sometimes we wish to ensure that packages don't install files or
>> directories somewhere that may prove detrimental to the operation of the
>> system. For example, this may be the case if files are placed in a
>> directory that is utilised as a mount point at run time, thus making them
>> inaccessible once when the mount point is being utilised.
>>
>> Implement the prohibited-path QA test, which enables such locations to be
>> specified in a "PROHIBITED_PATH" variable. This implementation allows for
>> exact matches and simple wildcards (paths ending with an asterisk. An
>> error will be raised should a match be found, or in the case of a
>> wildcard, for any files added below the specificed location(s).
>>
>> Signed-off-by: Fabien Lahoudere 
>> Signed-off-by: Martyn Welch 
>> ---
>>  meta/classes/insane.bbclass  |  2 +-
>>  meta/classes/package.bbclass | 11 +++
>>  2 files changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
>> index def9c70..fb10681 100644
>> --- a/meta/classes/insane.bbclass
>> +++ b/meta/classes/insane.bbclass
>> @@ -33,7 +33,7 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files
>> arch pkgconfig la \
>>  perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
>>  split-strip packages-list pkgv-undefined var-undefined \
>>  version-going-backwards expanded-d invalid-chars \
>> -license-checksum dev-elf file-rdeps \
>> +license-checksum dev-elf file-rdeps prohibited-path \
>>  "
>>  # Add usrmerge QA check based on distro feature
>>  ERROR_QA_append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge',
>> ' usrmerge', '', d)}"
>> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
>> index 2053d46..721ca1e 100644
>> --- a/meta/classes/package.bbclass
>> +++ b/meta/classes/package.bbclass
>> @@ -1162,6 +1162,17 @@ python populate_packages () {
>>  continue
>>  seen.append(file)
>>
>> +prohibited_path = d.getVar('PROHIBITED_PATH')
>> +if prohibited_path is not None:
>> +for p in prohibited_path.split():
>> +exactmatch = True
>> +if p.endswith("*"):
>> +p = p[:len(p)-1]
>> +exactmatch = False
>> +if file[1:].startswith(p) and ((file[1:] != p) or
>> exactmatch) :
>> +msg = "%s is in a prohibited path.\n" % file[1:]
>> +package_qa_handle_error("prohibited-path", msg,
>> d)
>>
>
> Unless I’m missing something, you aren’t checking for startswith(p +
> os.sep), so a file in libexec would match a prohibited path of lib, as it’d
> still start with that, no?
>

You might also consider some form of path normalization if you’re comparing
directly like this, otherwise i.e. //foo wouldn’t match /foo, even though
it’s the same path.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [PATCH 1/2] package.bbclass: add prohibited-path qa test

2017-11-13 Thread Christopher Larson
On Mon, Nov 13, 2017 at 11:17 AM, Martyn Welch  wrote:

> From: Fabien Lahoudere 
>
> Sometimes we wish to ensure that packages don't install files or
> directories somewhere that may prove detrimental to the operation of the
> system. For example, this may be the case if files are placed in a
> directory that is utilised as a mount point at run time, thus making them
> inaccessible once when the mount point is being utilised.
>
> Implement the prohibited-path QA test, which enables such locations to be
> specified in a "PROHIBITED_PATH" variable. This implementation allows for
> exact matches and simple wildcards (paths ending with an asterisk. An
> error will be raised should a match be found, or in the case of a
> wildcard, for any files added below the specificed location(s).
>
> Signed-off-by: Fabien Lahoudere 
> Signed-off-by: Martyn Welch 
> ---
>  meta/classes/insane.bbclass  |  2 +-
>  meta/classes/package.bbclass | 11 +++
>  2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
> index def9c70..fb10681 100644
> --- a/meta/classes/insane.bbclass
> +++ b/meta/classes/insane.bbclass
> @@ -33,7 +33,7 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch
> pkgconfig la \
>  perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
>  split-strip packages-list pkgv-undefined var-undefined \
>  version-going-backwards expanded-d invalid-chars \
> -license-checksum dev-elf file-rdeps \
> +license-checksum dev-elf file-rdeps prohibited-path \
>  "
>  # Add usrmerge QA check based on distro feature
>  ERROR_QA_append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '
> usrmerge', '', d)}"
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 2053d46..721ca1e 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -1162,6 +1162,17 @@ python populate_packages () {
>  continue
>  seen.append(file)
>
> +prohibited_path = d.getVar('PROHIBITED_PATH')
> +if prohibited_path is not None:
> +for p in prohibited_path.split():
> +exactmatch = True
> +if p.endswith("*"):
> +p = p[:len(p)-1]
> +exactmatch = False
> +if file[1:].startswith(p) and ((file[1:] != p) or
> exactmatch) :
> +msg = "%s is in a prohibited path.\n" % file[1:]
> +package_qa_handle_error("prohibited-path", msg,
> d)
>

Unless I’m missing something, you aren’t checking for startswith(p +
os.sep), so a file in libexec would match a prohibited path of lib, as it’d
still start with that, no?
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[linux-yocto] [linux-yocto-4.12][PATCH 6/6] iwlwifi: mvm: support new flush API

2017-11-13 Thread Liwei Song
From: Mordechai Goodstein 

commit d167e81ad452c317271078076a5999c820d28016 upstream.

This new API allows flushing queues based on station ID and TID in A000
devices.  One reason for using this is that tfd_queue_mask is only good
for 32 queues, which is not enough for A000 devices.

Signed-off-by: Sara Sharon 
Signed-off-by: Mordechai Goodstein 
Signed-off-by: Luca Coelho 
Signed-off-by: Liwei Song 
---
 drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c   | 19 ++--
 drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 14 +-
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h   |  2 +
 drivers/net/wireless/intel/iwlwifi/mvm/ops.c   | 12 +++--
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c   | 51 --
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c| 44 ++-
 6 files changed, 100 insertions(+), 42 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c 
b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
index d95fbde28902..b6605ecf1003 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
@@ -119,19 +119,30 @@ static ssize_t iwl_dbgfs_tx_flush_write(struct iwl_mvm 
*mvm, char *buf,
size_t count, loff_t *ppos)
 {
int ret;
-   u32 scd_q_msk;
+   u32 flush_arg;
 
if (!iwl_mvm_firmware_running(mvm) ||
mvm->cur_ucode != IWL_UCODE_REGULAR)
return -EIO;
 
-   if (sscanf(buf, "%x", _q_msk) != 1)
+   if (kstrtou32(buf, 0, _arg))
return -EINVAL;
 
-   IWL_ERR(mvm, "FLUSHING queues: scd_q_msk = 0x%x\n", scd_q_msk);
+   if (iwl_mvm_has_new_tx_api(mvm)) {
+   IWL_DEBUG_TX_QUEUES(mvm,
+   "FLUSHING all tids queues on sta_id = %d\n",
+   flush_arg);
+   mutex_lock(>mutex);
+   ret = iwl_mvm_flush_sta_tids(mvm, flush_arg, 0xFF, 0) ? : count;
+   mutex_unlock(>mutex);
+   return ret;
+   }
+
+   IWL_DEBUG_TX_QUEUES(mvm, "FLUSHING queues mask to flush = 0x%x\n",
+   flush_arg);
 
mutex_lock(>mutex);
-   ret =  iwl_mvm_flush_tx_path(mvm, scd_q_msk, 0) ? : count;
+   ret =  iwl_mvm_flush_tx_path(mvm, flush_arg, 0) ? : count;
mutex_unlock(>mutex);
 
return ret;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h 
b/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h
index 1360ebfdc51b..2b75bce903c8 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h
@@ -809,12 +809,24 @@ enum iwl_dump_control {
  * @flush_ctl: control flags
  * @reserved: reserved
  */
-struct iwl_tx_path_flush_cmd {
+struct iwl_tx_path_flush_cmd_v1 {
__le32 queues_ctl;
__le16 flush_ctl;
__le16 reserved;
 } __packed; /* TX_PATH_FLUSH_CMD_API_S_VER_1 */
 
+/**
+ * struct iwl_tx_path_flush_cmd -- queue/FIFO flush command
+ * @sta_id: station ID to flush
+ * @tid_mask: TID mask to flush
+ * @reserved: reserved
+ */
+struct iwl_tx_path_flush_cmd {
+   __le32 sta_id;
+   __le16 tid_mask;
+   __le16 reserved;
+} __packed; /* TX_PATH_FLUSH_CMD_API_S_VER_2 */
+
 /* Available options for the SCD_QUEUE_CFG HCMD */
 enum iwl_scd_cfg_actions {
SCD_CFG_DISABLE_QUEUE   = 0x0,
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h 
b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index cc9219c84f3c..f98032b08ee3 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -1361,6 +1361,8 @@ static inline const char *iwl_mvm_get_tx_fail_reason(u32 
status) { return ""; }
 #endif
 int iwl_mvm_flush_tx_path(struct iwl_mvm *mvm, u32 tfd_msk, u32 flags);
 int iwl_mvm_flush_sta(struct iwl_mvm *mvm, void *sta, bool internal, u32 
flags);
+int iwl_mvm_flush_sta_tids(struct iwl_mvm *mvm, u32 sta_id,
+  u16 tids, u32 flags);
 
 void iwl_mvm_async_handlers_purge(struct iwl_mvm *mvm);
 
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c 
b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index 3da5ec40aaea..e9cb29223c9b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -1449,9 +1449,15 @@ int iwl_mvm_enter_d0i3(struct iwl_op_mode *op_mode)
synchronize_net();
 
/* Flush the hw queues, in case something got queued during entry */
-   ret = iwl_mvm_flush_tx_path(mvm, iwl_mvm_flushable_queues(mvm), flags);
-   if (ret)
-   return ret;
+   /* TODO new tx api */
+   if (iwl_mvm_has_new_tx_api(mvm)) {
+   WARN_ONCE(1, "d0i3: Need to implement flush TX queue\n");
+   } else {
+   ret = 

[linux-yocto] [linux-yocto-4.12][PATCH 5/6] iwlwifi: mvm: avoid variable shadowing

2017-11-13 Thread Liwei Song
From: Johannes Berg 

commit a9c50726ce3279646e2e22314b0917455a3c5e86 upstream.

Avoid one kind of symbol shadowing another in iwl_mvm_flush_sta()
by renaming the function parameter.

Signed-off-by: Johannes Berg 
Signed-off-by: Luca Coelho 
Signed-off-by: Liwei Song 
---
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h 
b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index 0274d8cd7be5..cc9219c84f3c 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -1360,7 +1360,7 @@ const char *iwl_mvm_get_tx_fail_reason(u32 status);
 static inline const char *iwl_mvm_get_tx_fail_reason(u32 status) { return ""; }
 #endif
 int iwl_mvm_flush_tx_path(struct iwl_mvm *mvm, u32 tfd_msk, u32 flags);
-int iwl_mvm_flush_sta(struct iwl_mvm *mvm, void *sta, bool int_sta, u32 flags);
+int iwl_mvm_flush_sta(struct iwl_mvm *mvm, void *sta, bool internal, u32 
flags);
 
 void iwl_mvm_async_handlers_purge(struct iwl_mvm *mvm);
 
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c 
b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index 42618a9c48f8..df0273e1b308 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -1895,11 +1895,11 @@ int iwl_mvm_flush_tx_path(struct iwl_mvm *mvm, u32 
tfd_msk, u32 flags)
return ret;
 }
 
-int iwl_mvm_flush_sta(struct iwl_mvm *mvm, void *sta, bool int_sta, u32 flags)
+int iwl_mvm_flush_sta(struct iwl_mvm *mvm, void *sta, bool internal, u32 flags)
 {
u32 mask;
 
-   if (int_sta) {
+   if (internal) {
struct iwl_mvm_int_sta *int_sta = sta;
 
mask = int_sta->tfd_queue_msk;
-- 
2.7.4

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [linux-yocto-4.12][PATCH 4/6] iwlwifi: mvm: add and use iwl_mvm_device_running()

2017-11-13 Thread Liwei Song
From: Johannes Berg 

commit aab6930d30d5176fe1ff38fe051a9fca2cac066d upstream.

This will help refactor this later.

Signed-off-by: Johannes Berg 
Signed-off-by: Luca Coelho 
[adjust patch for newer patch used before this one]
Signed-off-by: Liwei Song 
---
 drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c  | 25 ++-
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c |  2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h  |  5 +
 drivers/net/wireless/intel/iwlwifi/mvm/tt.c   | 14 ++---
 4 files changed, 27 insertions(+), 19 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c 
b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
index 402846650cbe..d95fbde28902 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
@@ -7,7 +7,7 @@
  *
  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
- * Copyright(c) 2016 Intel Deutschland GmbH
+ * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of version 2 of the GNU General Public License as
@@ -34,6 +34,7 @@
  *
  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
+ * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -82,7 +83,8 @@ static ssize_t iwl_dbgfs_ctdp_budget_read(struct file *file,
char buf[16];
int pos, budget;
 
-   if (!mvm->ucode_loaded || mvm->cur_ucode != IWL_UCODE_REGULAR)
+   if (!iwl_mvm_firmware_running(mvm) ||
+   mvm->cur_ucode != IWL_UCODE_REGULAR)
return -EIO;
 
mutex_lock(>mutex);
@@ -102,7 +104,8 @@ static ssize_t iwl_dbgfs_stop_ctdp_write(struct iwl_mvm 
*mvm, char *buf,
 {
int ret;
 
-   if (!mvm->ucode_loaded || mvm->cur_ucode != IWL_UCODE_REGULAR)
+   if (!iwl_mvm_firmware_running(mvm) ||
+   mvm->cur_ucode != IWL_UCODE_REGULAR)
return -EIO;
 
mutex_lock(>mutex);
@@ -118,7 +121,8 @@ static ssize_t iwl_dbgfs_tx_flush_write(struct iwl_mvm 
*mvm, char *buf,
int ret;
u32 scd_q_msk;
 
-   if (!mvm->ucode_loaded || mvm->cur_ucode != IWL_UCODE_REGULAR)
+   if (!iwl_mvm_firmware_running(mvm) ||
+   mvm->cur_ucode != IWL_UCODE_REGULAR)
return -EIO;
 
if (sscanf(buf, "%x", _q_msk) != 1)
@@ -139,7 +143,8 @@ static ssize_t iwl_dbgfs_sta_drain_write(struct iwl_mvm 
*mvm, char *buf,
struct iwl_mvm_sta *mvmsta;
int sta_id, drain, ret;
 
-   if (!mvm->ucode_loaded || mvm->cur_ucode != IWL_UCODE_REGULAR)
+   if (!iwl_mvm_firmware_running(mvm) ||
+   mvm->cur_ucode != IWL_UCODE_REGULAR)
return -EIO;
 
if (sscanf(buf, "%d %d", _id, ) != 2)
@@ -172,7 +177,7 @@ static ssize_t iwl_dbgfs_sram_read(struct file *file, char 
__user *user_buf,
size_t ret;
u8 *ptr;
 
-   if (!mvm->ucode_loaded)
+   if (!iwl_mvm_firmware_running(mvm))
return -EINVAL;
 
/* default is to dump the entire data segment */
@@ -205,7 +210,7 @@ static ssize_t iwl_dbgfs_sram_write(struct iwl_mvm *mvm, 
char *buf,
u32 offset, len;
u32 img_offset, img_len;
 
-   if (!mvm->ucode_loaded)
+   if (!iwl_mvm_firmware_running(mvm))
return -EINVAL;
 
img = >fw->img[mvm->cur_ucode];
@@ -258,7 +263,7 @@ static ssize_t iwl_dbgfs_set_nic_temperature_write(struct 
iwl_mvm *mvm,
 {
int temperature;
 
-   if (!mvm->ucode_loaded && !mvm->temperature_test)
+   if (!iwl_mvm_firmware_running(mvm) && !mvm->temperature_test)
return -EIO;
 
if (kstrtoint(buf, 10, ))
@@ -305,7 +310,7 @@ static ssize_t iwl_dbgfs_nic_temp_read(struct file *file,
int pos, ret;
s32 temp;
 
-   if (!mvm->ucode_loaded)
+   if (!iwl_mvm_firmware_running(mvm))
return -EIO;
 
mutex_lock(>mutex);
@@ -371,7 +376,7 @@ static ssize_t iwl_dbgfs_disable_power_off_write(struct 
iwl_mvm *mvm, char *buf,
 {
int ret, val;
 
-   if (!mvm->ucode_loaded)
+   if (!iwl_mvm_firmware_running(mvm))
return -EIO;
 
if (!strncmp("disable_power_off_d0=", buf, 21)) {
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c 
b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 95763ccb365f..d8d5b5e1f5ff 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -4045,7 +4045,7 @@ static int iwl_mvm_mac_get_survey(struct ieee80211_hw 
*hw, int idx,
 
mutex_lock(>mutex);
 
-   if 

[linux-yocto] [linux-yocto-4.12][PATCH 2/6] iwlwifi: mvm: wait for the flushed queue only

2017-11-13 Thread Liwei Song
From: Sara Sharon 

commit 0b90964a265d6e0b60182b88f3947c6ef0ae4184 upstream.

The function flushed only agg queue and no more traffic
is queued on it.
However, it waits for all queues to empty, which is not
necessary and may take more time.

Signed-off-by: Sara Sharon 
Signed-off-by: Luca Coelho 
Signed-off-by: Liwei Song 
---
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c 
b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index 8f129bccbced..3695d99d0c92 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -2861,8 +2861,7 @@ int iwl_mvm_sta_tx_agg_flush(struct iwl_mvm *mvm, struct 
ieee80211_vif *vif,
iwl_mvm_drain_sta(mvm, mvmsta, true);
if (iwl_mvm_flush_tx_path(mvm, BIT(txq_id), 0))
IWL_ERR(mvm, "Couldn't flush the AGG queue\n");
-   iwl_trans_wait_tx_queues_empty(mvm->trans,
-  mvmsta->tfd_queue_msk);
+   iwl_trans_wait_tx_queues_empty(mvm->trans, BIT(txq_id));
iwl_mvm_drain_sta(mvm, mvmsta, false);
 
iwl_mvm_sta_tx_agg(mvm, sta, tid, txq_id, false);
-- 
2.7.4

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [linux-yocto-4.12][PATCH 3/6] iwlwifi: add wait for tx queue empty

2017-11-13 Thread Liwei Song
From: Sara Sharon 

commit d6d517b7730c2dada199db83ebbc670c50fa9952 upstream.

Now that we have 512 queues, add a wait for single TX
queue to gen2.
This replaces gen1 wait_tx_queues_empty, which was limited
to 32 queues.

Signed-off-by: Sara Sharon 
Signed-off-by: Luca Coelho 
Signed-off-by: Liwei Song 
---
 drivers/net/wireless/intel/iwlwifi/iwl-trans.c|  2 +
 drivers/net/wireless/intel/iwlwifi/iwl-trans.h| 20 ++-
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c |  4 +-
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c  | 41 -
 drivers/net/wireless/intel/iwlwifi/mvm/sta.h  |  2 +
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c   | 72 ++-
 6 files changed, 107 insertions(+), 34 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.c 
b/drivers/net/wireless/intel/iwlwifi/iwl-trans.c
index 0bde26bab15d..c0871f8f2c68 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.c
@@ -102,6 +102,8 @@ struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
if (!trans->dev_cmd_pool)
return NULL;
 
+   WARN_ON(!ops->wait_txq_empty && !ops->wait_tx_queues_empty);
+
return trans;
 }
 
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h 
b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
index 0ebfdbb22992..d3a78a11821a 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
@@ -619,7 +619,8 @@ struct iwl_tx_queue_cfg_rsp {
  * @txq_disable: de-configure a Tx queue to send AMPDUs
  * Must be atomic
  * @txq_set_shared_mode: change Tx queue shared/unshared marking
- * @wait_tx_queue_empty: wait until tx queues are empty. May sleep.
+ * @wait_tx_queues_empty: wait until tx queues are empty. May sleep.
+ * @wait_txq_empty: wait until specific tx queue is empty. May sleep.
  * @freeze_txq_timer: prevents the timer of the queue from firing until the
  * queue is set to awake. Must be atomic.
  * @block_txq_ptrs: stop updating the write pointers of the Tx queues. Note
@@ -692,6 +693,7 @@ struct iwl_trans_ops {
bool shared);
 
int (*wait_tx_queues_empty)(struct iwl_trans *trans, u32 txq_bm);
+   int (*wait_txq_empty)(struct iwl_trans *trans, int queue);
void (*freeze_txq_timer)(struct iwl_trans *trans, unsigned long txqs,
 bool freeze);
void (*block_txq_ptrs)(struct iwl_trans *trans, bool block);
@@ -1198,6 +1200,9 @@ static inline void iwl_trans_block_txq_ptrs(struct 
iwl_trans *trans,
 static inline int iwl_trans_wait_tx_queues_empty(struct iwl_trans *trans,
 u32 txqs)
 {
+   if (WARN_ON_ONCE(!trans->ops->wait_tx_queues_empty))
+   return -ENOTSUPP;
+
if (WARN_ON_ONCE(trans->state != IWL_TRANS_FW_ALIVE)) {
IWL_ERR(trans, "%s bad state = %d\n", __func__, trans->state);
return -EIO;
@@ -1206,6 +1211,19 @@ static inline int iwl_trans_wait_tx_queues_empty(struct 
iwl_trans *trans,
return trans->ops->wait_tx_queues_empty(trans, txqs);
 }
 
+static inline int iwl_trans_wait_txq_empty(struct iwl_trans *trans, int queue)
+{
+   if (WARN_ON_ONCE(!trans->ops->wait_txq_empty))
+   return -ENOTSUPP;
+
+   if (WARN_ON_ONCE(trans->state != IWL_TRANS_FW_ALIVE)) {
+   IWL_ERR(trans, "%s bad state = %d\n", __func__, trans->state);
+   return -EIO;
+   }
+
+   return trans->ops->wait_txq_empty(trans, queue);
+}
+
 static inline void iwl_trans_write8(struct iwl_trans *trans, u32 ofs, u8 val)
 {
trans->ops->write8(trans, ofs, val);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c 
b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index bfd1eea9e748..95763ccb365f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -4013,6 +4013,8 @@ static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,
IWL_ERR(mvm, "flush request fail\n");
} else {
msk |= mvmsta->tfd_queue_msk;
+   if (iwl_mvm_has_new_tx_api(mvm))
+   iwl_mvm_wait_sta_queues_empty(mvm, mvmsta);
}
}
 
@@ -4021,7 +4023,7 @@ static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,
/* this can take a while, and we may need/want other operations
 * to succeed while doing this, so do it without the mutex held
 */
-   if (!drop)
+   if (!drop && !iwl_mvm_has_new_tx_api(mvm))
iwl_trans_wait_tx_queues_empty(mvm->trans, msk);
 }
 
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c 
b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index 

[linux-yocto] [linux-yocto-4.12][PATCH 1/6] iwlwifi: mvm: flush per station for DQA mode

2017-11-13 Thread Liwei Song
From: Sara Sharon 

commit d49394a131060fda209ba91e903c9d6316db2e4d upstream.

Avoid using the global flush and move to flush per
station whenever possible in DQA mode.

Signed-off-by: Sara Sharon 
Signed-off-by: Luca Coelho 
Signed-off-by: Liwei Song 
---
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c  | 26 --
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h   |  2 ++
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c   |  6 -
 .../net/wireless/intel/iwlwifi/mvm/time-event.c|  5 -
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c| 17 ++
 5 files changed, 42 insertions(+), 14 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c 
b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index db5ad222e5ea..bfd1eea9e748 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -1451,7 +1451,7 @@ static void iwl_mvm_prepare_mac_removal(struct iwl_mvm 
*mvm,
 {
u32 tfd_msk = iwl_mvm_mac_get_queues_mask(vif);
 
-   if (tfd_msk) {
+   if (tfd_msk && !iwl_mvm_is_dqa_supported(mvm)) {
/*
 * mac80211 first removes all the stations of the vif and
 * then removes the vif. When it removes a station it also
@@ -1460,6 +1460,8 @@ static void iwl_mvm_prepare_mac_removal(struct iwl_mvm 
*mvm,
 * of these AMPDU sessions are properly closed.
 * We still need to take care of the shared queues of the vif.
 * Flush them here.
+* For DQA mode there is no need - broacast and multicast queue
+* are flushed separately.
 */
mutex_lock(>mutex);
iwl_mvm_flush_tx_path(mvm, tfd_msk, 0);
@@ -4006,21 +4008,21 @@ static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,
/* make sure only TDLS peers or the AP are flushed */
WARN_ON(i != mvmvif->ap_sta_id && !sta->tdls);
 
-   msk |= mvmsta->tfd_queue_msk;
+   if (drop) {
+   if (iwl_mvm_flush_sta(mvm, mvmsta, false, 0))
+   IWL_ERR(mvm, "flush request fail\n");
+   } else {
+   msk |= mvmsta->tfd_queue_msk;
+   }
}
 
-   if (drop) {
-   if (iwl_mvm_flush_tx_path(mvm, msk, 0))
-   IWL_ERR(mvm, "flush request fail\n");
-   mutex_unlock(>mutex);
-   } else {
-   mutex_unlock(>mutex);
+   mutex_unlock(>mutex);
 
-   /* this can take a while, and we may need/want other operations
-* to succeed while doing this, so do it without the mutex held
-*/
+   /* this can take a while, and we may need/want other operations
+* to succeed while doing this, so do it without the mutex held
+*/
+   if (!drop)
iwl_trans_wait_tx_queues_empty(mvm->trans, msk);
-   }
 }
 
 static int iwl_mvm_mac_get_survey(struct ieee80211_hw *hw, int idx,
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h 
b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index 52f8d7a6a7dc..78629899cc21 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -1355,6 +1355,8 @@ const char *iwl_mvm_get_tx_fail_reason(u32 status);
 static inline const char *iwl_mvm_get_tx_fail_reason(u32 status) { return ""; }
 #endif
 int iwl_mvm_flush_tx_path(struct iwl_mvm *mvm, u32 tfd_msk, u32 flags);
+int iwl_mvm_flush_sta(struct iwl_mvm *mvm, void *sta, bool int_sta, u32 flags);
+
 void iwl_mvm_async_handlers_purge(struct iwl_mvm *mvm);
 
 static inline void iwl_mvm_set_tx_cmd_ccmp(struct ieee80211_tx_info *info,
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c 
b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index 614d67810d05..8f129bccbced 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -1611,7 +1611,7 @@ int iwl_mvm_rm_sta(struct iwl_mvm *mvm,
if (ret)
return ret;
/* flush its queues here since we are freeing mvm_sta */
-   ret = iwl_mvm_flush_tx_path(mvm, mvm_sta->tfd_queue_msk, 0);
+   ret = iwl_mvm_flush_sta(mvm, mvm_sta, false, 0);
if (ret)
return ret;
ret = iwl_trans_wait_tx_queues_empty(mvm->trans,
@@ -1978,6 +1978,8 @@ static void iwl_mvm_free_bcast_sta_queues(struct iwl_mvm 
*mvm,
 
lockdep_assert_held(>mutex);
 
+   iwl_mvm_flush_sta(mvm, >bcast_sta, true, 0);
+
if (vif->type == NL80211_IFTYPE_AP ||
vif->type == NL80211_IFTYPE_ADHOC)
iwl_mvm_disable_txq(mvm, vif->cab_queue, vif->cab_queue,
@@ -2187,6 +2189,8 @@ int 

[linux-yocto] [linux-yocto-4.12][PATCH 0/6] fix calltrace when run wpa_supplicant the second time

2017-11-13 Thread Liwei Song
6 upstream patches to fix a calltrace when run wpa_supplicant at the second time
on NUC7i5BNH.
"WARNING: CPU: 0 PID: 1089 at 
drivers/net/wireless/intel/iwlwifi/mvm/utils.c:786 
iwl_mvm_disable_txq+0x2c0/0x360 [iwlmvm]"
[  116.076858] Call Trace:
[  116.077514]  iwl_mvm_send_rm_bcast_sta+0x137/0x140 [iwlmvm]
[  116.078176]  ? iwl_mvm_send_rm_bcast_sta+0x137/0x140 [iwlmvm]
[  116.078842]  ? iwl_mvm_rm_mcast_sta+0x6b/0x90 [iwlmvm]
[  116.079489]  iwl_mvm_stop_ap_ibss+0xd4/0x170 [iwlmvm]
[  116.080157]  ieee80211_stop_ap+0x1a1/0x370 [mac80211]


Johannes Berg (2):
  iwlwifi: mvm: add and use iwl_mvm_device_running()
  iwlwifi: mvm: avoid variable shadowing

Mordechai Goodstein (1):
  iwlwifi: mvm: support new flush API

Sara Sharon (3):
  iwlwifi: mvm: flush per station for DQA mode
  iwlwifi: mvm: wait for the flushed queue only
  iwlwifi: add wait for tx queue empty

 drivers/net/wireless/intel/iwlwifi/iwl-trans.c |  2 +
 drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 20 -
 drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c   | 44 +++
 drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 14 +++-
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c  | 30 +++
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h   |  9 +++
 drivers/net/wireless/intel/iwlwifi/mvm/ops.c   | 12 ++-
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c   | 91 --
 drivers/net/wireless/intel/iwlwifi/mvm/sta.h   |  2 +
 .../net/wireless/intel/iwlwifi/mvm/time-event.c|  5 +-
 drivers/net/wireless/intel/iwlwifi/mvm/tt.c| 14 ++--
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c| 43 +-
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c| 72 ++---
 13 files changed, 262 insertions(+), 96 deletions(-)

-- 
2.7.4

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[yocto] [PATCH 1/2] package.bbclass: add prohibited-path qa test

2017-11-13 Thread Martyn Welch
From: Fabien Lahoudere 

Sometimes we wish to ensure that packages don't install files or
directories somewhere that may prove detrimental to the operation of the
system. For example, this may be the case if files are placed in a
directory that is utilised as a mount point at run time, thus making them
inaccessible once when the mount point is being utilised.

Implement the prohibited-path QA test, which enables such locations to be
specified in a "PROHIBITED_PATH" variable. This implementation allows for
exact matches and simple wildcards (paths ending with an asterisk. An
error will be raised should a match be found, or in the case of a
wildcard, for any files added below the specificed location(s).

Signed-off-by: Fabien Lahoudere 
Signed-off-by: Martyn Welch 
---
 meta/classes/insane.bbclass  |  2 +-
 meta/classes/package.bbclass | 11 +++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index def9c70..fb10681 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -33,7 +33,7 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch 
pkgconfig la \
 perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
 split-strip packages-list pkgv-undefined var-undefined \
 version-going-backwards expanded-d invalid-chars \
-license-checksum dev-elf file-rdeps \
+license-checksum dev-elf file-rdeps prohibited-path \
 "
 # Add usrmerge QA check based on distro feature
 ERROR_QA_append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' 
usrmerge', '', d)}"
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 2053d46..721ca1e 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1162,6 +1162,17 @@ python populate_packages () {
 continue
 seen.append(file)
 
+prohibited_path = d.getVar('PROHIBITED_PATH')
+if prohibited_path is not None:
+for p in prohibited_path.split():
+exactmatch = True
+if p.endswith("*"):
+p = p[:len(p)-1]
+exactmatch = False
+if file[1:].startswith(p) and ((file[1:] != p) or 
exactmatch) :
+msg = "%s is in a prohibited path.\n" % file[1:]
+package_qa_handle_error("prohibited-path", msg, d)
+
 def mkdir(src, dest, p):
 src = os.path.join(src, p)
 dest = os.path.join(dest, p)
-- 
2.1.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [PATCH 2/2] ref-manual: Add documentation for prohibited-path QA test

2017-11-13 Thread Martyn Welch
Add documentation for the prohibited-path QA test and associated
PROHIBITED_PATH variable.

Signed-off-by: Martyn Welch 
---
 documentation/ref-manual/ref-classes.xml   |  5 +
 documentation/ref-manual/ref-variables.xml | 25 +
 2 files changed, 30 insertions(+)

diff --git a/documentation/ref-manual/ref-classes.xml 
b/documentation/ref-manual/ref-classes.xml
index 5961d3e..15f5586 100644
--- a/documentation/ref-manual/ref-classes.xml
+++ b/documentation/ref-manual/ref-classes.xml
@@ -1714,6 +1714,11 @@
 FILES_${PN} = "xyz" effectively turn into
 FILES = "xyz".
 
+
prohibited-path:
+Checks that a recipe does not package and files in locations
+specified in
+PROHIBITED_PATH.
+
rpaths:
 Checks for rpaths in the binaries that contain build system 
paths such
 as TMPDIR.
diff --git a/documentation/ref-manual/ref-variables.xml 
b/documentation/ref-manual/ref-variables.xml
index e31aa21..0bdbbba 100644
--- a/documentation/ref-manual/ref-variables.xml
+++ b/documentation/ref-manual/ref-variables.xml
@@ -10820,6 +10820,31 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = 
"${INC_PR}.3"
 
 
 
+PROHIBITED_PATH
+
+PROHIBITED_PATH[doc] = "A list of paths in which recipes are 
prohibited from installing."
+
+
+
+
+A list of paths in which recipes are prohibited from
+installing.
+Paths can be provided for specific locations or may include
+a wildcard asterisk at the end to ensure nothing is
+installed under the path provided.
+
+
+
+For example, the following
+PROHIBITED_PATH ensures no packages
+install anything under /mnt:
+
+ PROHIBITED_PATH += "/mnt/*"
+
+
+
+
+
 PROVIDES
 
 PROVIDES[doc] = "A list of aliases that a recipe also 
provides. These aliases are useful for satisfying dependencies of other recipes 
during the build as specified by DEPENDS."
-- 
2.1.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[linux-yocto] v4.8.x - stable updates comprising v4.8.26

2017-11-13 Thread Paul Gortmaker
Bruce, Yocto kernel folks:

Here is another 4.8.x stable update.  Continuing on top of the
previously released v4.8.25 kernel, we now have the appropriate content
from 4.9.25 --> 4.9.29 (inclusive) applied on top of the latest 4.8
baseline.  Once again, I've combined several 4.9.x which results in
just about 200 backported commits out of that original 4.9.x range.

As usual, I've put this 4.8.x queue through the various testing that I
figured made sense, which includes but is not limited to:

-x86-64 sanity boot test + workloads of defconfig on COTS Core2 box.
-build MIPS, PPC, ARM, ARM64 with defconfig
-build x86-64 allmodconfig/allyesconfig
-build i386 allmodconfig/allyesconfig

I bumped the Makefile and did the signed tag just as per the previously
released 4.8.x versions.

Please find a signed v4.8.26 tag using this key:

http://pgp.mit.edu/pks/lookup?op=vindex=0xEBCE84042C07D1D6

in the repo in my kernel.org directory here:

   https://git.kernel.org/cgit/linux/kernel/git/paulg/linux-4.8.y.git/
   git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux-4.8.y.git

for merge to standard/base in linux-yocto-4.8 and then out from there
into the other base and BSP branches.

For those who are interested, the evolution of the commits is here:

   https://git.kernel.org/cgit/linux/kernel/git/paulg/longterm-queue-4.8.git/

This repo isn't needed for anything; it just exists for transparency and
so people can see how the commits were adjusted to apply to the 4.8.x
kernel baseline in case people are interested.

Paul.
--
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


Re: [yocto] Bitbake fails when enabling tools-testapps

2017-11-13 Thread Paul Eggleton
On Tuesday, 14 November 2017 5:37:23 AM NZDT Burton, Ross wrote:
> On 12 November 2017 at 08:18, Chris Hughes <89dra...@gmail.com> wrote:
> 
> >   - nothing provides at needed by ltp-20170116-r0.corei7_64
> >
> 
> Well at is part of oe-core so that should have been built.  "bitbake at" to
> see why, or if that works then rebuilding your image should work (although
> it really should have been built already).

Chris figured this out and reported back on the IRC channel - turns out that 
in his configuration, "at" was in PACKAGE_EXCLUDE. Unfortunately dnf is not 
being very clear about why the package is conflicting - of course it wouldn't 
be able to say anything about PACKAGE_EXCLUDE itself, but nevertheless the 
message is still pretty vague.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [PATCH v2 2/2] ref-manual: Add documentation for prohibited-path QA test

2017-11-13 Thread Martyn Welch
Add documentation for the prohibited-path QA test and associated
PROHIBITED_PATH variable.

Signed-off-by: Martyn Welch 
---

Changes since v1:
 - Correcting author and SOB.

 documentation/ref-manual/ref-classes.xml   |  5 +
 documentation/ref-manual/ref-variables.xml | 25 +
 2 files changed, 30 insertions(+)

diff --git a/documentation/ref-manual/ref-classes.xml 
b/documentation/ref-manual/ref-classes.xml
index 5961d3e..15f5586 100644
--- a/documentation/ref-manual/ref-classes.xml
+++ b/documentation/ref-manual/ref-classes.xml
@@ -1714,6 +1714,11 @@
 FILES_${PN} = "xyz" effectively turn into
 FILES = "xyz".
 
+
prohibited-path:
+Checks that a recipe does not package and files in locations
+specified in
+PROHIBITED_PATH.
+
rpaths:
 Checks for rpaths in the binaries that contain build system 
paths such
 as TMPDIR.
diff --git a/documentation/ref-manual/ref-variables.xml 
b/documentation/ref-manual/ref-variables.xml
index e31aa21..0bdbbba 100644
--- a/documentation/ref-manual/ref-variables.xml
+++ b/documentation/ref-manual/ref-variables.xml
@@ -10820,6 +10820,31 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = 
"${INC_PR}.3"
 
 
 
+PROHIBITED_PATH
+
+PROHIBITED_PATH[doc] = "A list of paths in which recipes are 
prohibited from installing."
+
+
+
+
+A list of paths in which recipes are prohibited from
+installing.
+Paths can be provided for specific locations or may include
+a wildcard asterisk at the end to ensure nothing is
+installed under the path provided.
+
+
+
+For example, the following
+PROHIBITED_PATH ensures no packages
+install anything under /mnt:
+
+ PROHIBITED_PATH += "/mnt/*"
+
+
+
+
+
 PROVIDES
 
 PROVIDES[doc] = "A list of aliases that a recipe also 
provides. These aliases are useful for satisfying dependencies of other recipes 
during the build as specified by DEPENDS."
-- 
2.1.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [PATCH v2 1/2] package.bbclass: add prohibited-path qa test

2017-11-13 Thread Martyn Welch
Sometimes we wish to ensure that packages don't install files or
directories somewhere that may prove detrimental to the operation of the
system. For example, this may be the case if files are placed in a
directory that is utilised as a mount point at run time, thus making them
inaccessible once when the mount point is being utilised.

Implement the prohibited-path QA test, which enables such locations to be
specified in a "PROHIBITED_PATH" variable. This implementation allows for
exact matches and simple wildcards (paths ending with an asterisk. An
error will be raised should a match be found, or in the case of a
wildcard, for any files added below the specificed location(s).

Signed-off-by: Fabien Lahoudere 
Signed-off-by: Martyn Welch 
---

Changes since v1:
 - Correcting author and SOB.

 meta/classes/insane.bbclass  |  2 +-
 meta/classes/package.bbclass | 11 +++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index def9c70..fb10681 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -33,7 +33,7 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch 
pkgconfig la \
 perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
 split-strip packages-list pkgv-undefined var-undefined \
 version-going-backwards expanded-d invalid-chars \
-license-checksum dev-elf file-rdeps \
+license-checksum dev-elf file-rdeps prohibited-path \
 "
 # Add usrmerge QA check based on distro feature
 ERROR_QA_append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' 
usrmerge', '', d)}"
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 2053d46..721ca1e 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1162,6 +1162,17 @@ python populate_packages () {
 continue
 seen.append(file)
 
+prohibited_path = d.getVar('PROHIBITED_PATH')
+if prohibited_path is not None:
+for p in prohibited_path.split():
+exactmatch = True
+if p.endswith("*"):
+p = p[:len(p)-1]
+exactmatch = False
+if file[1:].startswith(p) and ((file[1:] != p) or 
exactmatch) :
+msg = "%s is in a prohibited path.\n" % file[1:]
+package_qa_handle_error("prohibited-path", msg, d)
+
 def mkdir(src, dest, p):
 src = os.path.join(src, p)
 dest = os.path.join(dest, p)
-- 
2.1.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] rpm/dnf issues when building an SDK

2017-11-13 Thread Tobias Olausson
Hey,

I have a weird issue when generating an SDK for the image I'm building.
Somehow, I end up with the following errors:

$ bitbake -c populate_sdk core-image-pelux-minimal
ERROR: core-image-pelux-minimal-1.0-r0 do_populate_sdk: unable to place
/home/vagrant/pelux_yocto/build/tmp/work/intel_corei7_64-pelux-linux/core-image-pelux-minimal/1.0-r0/sdk/image/etc/rpmrc
in final SDK location
ERROR: core-image-pelux-minimal-1.0-r0 do_populate_sdk: unable to place
/home/vagrant/pelux_yocto/build/tmp/work/intel_corei7_64-pelux-linux/core-image-pelux-minimal/1.0-r0/sdk/image/etc/dnf/dnf.conf
in final SDK location

I have no idea why, and re-running the populate_sdk step succeeds
without any tasks being run, and even after those errors, an sdk is
produced, but I end up with 2 errors and a non-zero exit code. A quick
check easily reveals that the files it wanted to place in "final SDK
location" are non-existent, so the error as such makes sense.

In my CI system I build this using vagrant with docker as the provider,
and it's only then I notice this issue. When building locally (with
docker or otherwise) there are no such issues. The CI system (and when I
build locally) are ubuntu and debian, respectively. The error is present
in the CI setup regardless of having rpm on the host machine or not.

I couldn't find any info on other people having the same problem, and I
start feeling stuck on this because it only fails in some environments,
it seems.

Cheers,

Tobias Olausson
Software Engineer

PELAGICORE | Experience Change
http://www.pelagicore.com/

Registered Office Gothenburg, Sweden
Registration No. 556780-4199

PELAGICORE a part of LUXOFT
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Bitbake fails when enabling tools-testapps

2017-11-13 Thread Burton, Ross
On 12 November 2017 at 08:18, Chris Hughes <89dra...@gmail.com> wrote:

>   - nothing provides at needed by ltp-20170116-r0.corei7_64
>

Well at is part of oe-core so that should have been built.  "bitbake at" to
see why, or if that works then rebuilding your image should work (although
it really should have been built already).

Ross
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Can I force gstreamer into specific version with my image ?

2017-11-13 Thread Zoran Stojsavljevic
> ./poky/meta/recipes-multimedia/gstreamer/gstreamer
1.0-plugins-base_1.4.5.bb

As I recall, these versions are very very old... plugins-base_1.4.5
(September 2015, or even older)?!

Just kludge!

Zoran

On Mon, Nov 13, 2017 at 4:27 PM, Leonardo Sandoval <
leonardo.sandoval.gonza...@linux.intel.com> wrote:

> On Sun, 12 Nov 2017 11:59:32 +0200
> Ran Shalit  wrote:
>
> > hELLO,
> >
> > For some reason my image is installed with gstreamer 1.6, and I don't
> > understnad why the image (fsl-image-qt5) prefer 1.6.
> > Is there a way to force gsreamer specific version (1.8.2) ?
>
> There is a specific varible which you can use to point to a specific PV,
> check
>
> http://www.yoctoproject.org/docs/latest/mega-manual/mega-
> manual.html#var-PREFERRED_VERSION
>
> Just make sure you have the 1.8.2 recipe in your layer stack.
>
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [PATCH] libpng: Upgrade 1.6.31 -> 1.6.32

2017-11-13 Thread youngseokyoon
From: youngseok 

License file changes are due to updates in Version and Copyright date

(From OE-Core rev: 44676c90863c3864182c088ca51bec3bdc8dce29)

Change-Id: I34b40f7b0cbf66feeb944c71a32643b75ed324e8
Signed-off-by: youngseokyoon 
Signed-off-by: Ross Burton 
---
 .../libpng/{libpng_1.6.31.bb => libpng_1.6.32.bb} | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
 rename meta/recipes-multimedia/libpng/{libpng_1.6.31.bb => libpng_1.6.32.bb} 
(72%)

diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.31.bb 
b/meta/recipes-multimedia/libpng/libpng_1.6.32.bb
similarity index 72%
rename from meta/recipes-multimedia/libpng/libpng_1.6.31.bb
rename to meta/recipes-multimedia/libpng/libpng_1.6.32.bb
index c96ea14..d93e72c 100644
--- a/meta/recipes-multimedia/libpng/libpng_1.6.31.bb
+++ b/meta/recipes-multimedia/libpng/libpng_1.6.32.bb
@@ -2,15 +2,15 @@ SUMMARY = "PNG image format decoding library"
 HOMEPAGE = "http://www.libpng.org/;
 SECTION = "libs"
 LICENSE = "Libpng"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6f21e4e1f795810b5ea491b333bc6ea1 \
-
file://png.h;endline=144;md5=af300c419a45c53a8d2daa0b7d167a66"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=53f2df0e62ce82307cd1389a9f41e4cf \
+
file://png.h;endline=144;md5=591cf1f8d84a757af46e43c2b9b5ddd9"
 DEPENDS = "zlib"
 
 LIBV = "16"
 
 SRC_URI = 
"${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/${BP}.tar.xz"
-SRC_URI[md5sum] = "1b34eab440263e32cfa39d19413fad54"
-SRC_URI[sha256sum] = 
"232a602de04916b2b5ce6f901829caf419519e6a16cc9cd7c1c91187d3ee8b41"
+SRC_URI[md5sum] = "e01be057a9369183c959b793a685ad15"
+SRC_URI[sha256sum] = 
"c918c3113de74a692f0a1526ce881dc26067763eb3915c57ef3a0f7b6886f59b"
 
 MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/ 
${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/${PV}/"
 
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Bitbake fails when enabling tools-testapps

2017-11-13 Thread Zoran Stojsavljevic
Hello Chris,

I could not give you some viable advice regarding YOCTO (I see that you are
using lot of layers):
meta
meta-poky
meta-yocto-bsp= "HEAD:50cc15335ebcdfa2a2fc52c11fa01695dfdb9e26"
meta-oe
meta-python
meta-networking
meta-filesystems  = "HEAD:b2ce52334cf88e07f703cf25ced92302edd5b0e9"
meta-virtualization = "HEAD:88277c84962e9d07ec777896a0ca8bd7db9ff5e2"
meta-intel= "HEAD:4cd63f57820ce0e4ebd598251d3a13b5a4b9b791"
meta-intel-realsense = "HEAD:211ce75af387b65fe894f13b3468148d2b9ab23d"
meta-intel-aero-base = "HEAD:0c9f7a359c71f3c8b9f47efede194da51ccaefd7"
meta-intel-aero   = "HEAD:a96a8fed779d6c02119ad9965e66bd051ff75a07"

But I can give you some advise to trace the problem. This is how I tries to
discover intel-aero in qemux86-64 poky build:

[user@192 poky]$ pwd
/home/user/YOCTO/oe_core_embedded/poky
[user@192 poky]$ find . -name intel-aero*
[user@192 poky]$ cd build/conf
[user@192 conf]$ cat bblayers.conf
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"

BBPATH = "${TOPDIR}"
BBFILES ?= ""

BBLAYERS ?= " \
  /home/user/YOCTO/oe_core_embedded/poky/meta \
  /home/user/YOCTO/oe_core_embedded/poky/meta-poky \
  /home/user/YOCTO/oe_core_embedded/poky/meta-yocto-bsp \
  "
[user@192 conf]$

I also tried to find dependencies, from your log: ltp

[user@192 conf]$ cd -
/home/user/YOCTO/oe_core_embedded/poky
[user@192 poky]$ find . -name ltp*
./meta/recipes-extended/ltp
./meta/recipes-extended/ltp/ltp_20170516.bb
./meta/recipes-extended/ltp/ltp
[user@192 poky]$

As Leonardo suggested the research direction, I just added couple of "stick
and rope" methods, to help you to brainstorm further.

Zoran

On Mon, Nov 13, 2017 at 4:30 PM, Leonardo Sandoval <
leonardo.sandoval.gonza...@linux.intel.com> wrote:

> On Sun, 12 Nov 2017 01:18:45 -0700
> Chris Hughes <89dra...@gmail.com> wrote:
>
> > Hoping this is the right place to get help with the following issue.
> >
> > I'm using bitbake to build a custom image of the intel-aero / yocto
> sources.
> >
>
> Make sure all layer dependencies are included into the conf/bblayers.conf
> file. There must be at least one recipe that either implicity (by default,
> a recipe provides itself with the same name) or explicity (with PROVIDES) ,
> otherwise you see what you mentioned.
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] Yocto Project Status WW46’17

2017-11-13 Thread Jolley, Stephen K
Current Dev Position: YP 2.5 Planning and M1 development

Next Deadline: YP 2.5 M1 cut off of 12/4/17


SWAT team rotation: Leo -> Juro on Nov. 10, 2017.

SWAT team rotation: Juro -> Paul on Nov.17, 2017.

https://wiki.yoctoproject.org/wiki/Yocto_Build_Failure_Swat_Team


Key Status/Updates:

·Master has started taking patches for 2.5. We were able to get some 
successful builds which allowed some patches to merge however the incidence of 
failures increased again and we’re again seeing multiple issues mentioned below 
in each build, stalling patch merging.

·We continue to struggle with a raft of different build failures that 
keep occurring on the autobuilders. Compared to last week we did make some 
progress:

o   We found one issue due to depletion of entropy on autobuilder workers 
(https://wiki.yoctoproject.org/wiki/Entropy_on_Autobuilders has details)

o   We fixed the ftp proxy issues (we were unable to remove all the ftp urls 
since gcc and alsa still use ftp servers)

o   We fixed the oe-selftest log duplication and various other logging 
inconsistency issues.

·Currently open issues are:

o   qemuppc continues to demonstrate random hangs in boot  in userspace

o   Issues with 4.13.10 host kernels booting kvm x86 guests on Tumbleweed 
(Suse) and Fedora 26

o   nfs inode count for the sstate/dldir share appears to break periodically 
causing the disk monitor to halt the builds (bug 12267)

o   a perf build race (bug 12302)

o   An ext filesystem creation/sizing issue (bug 12304)

·Until we resolve these issues patches will continue to be slow to 
merge, if at all. This also blocks several core developers from doing any 
feature work at this point in time (e.g. layer setup tool is on hold, again).

·We can only continue to stress that unless others step up and help to 
try and root cause these issues, things will stall with the project.


Planned upcoming dot releases:

YP 2.2.3 is planned and should be out in the next few weeks.

YP 2.3.3 is planned, but date TBD during YP 2.5 planning.

YP 2.4.1 is planned, but date TBD during YP 2.5 planning.


Key YP 2.5 Dates are:

YP 2.5 M1 cut off of 12/4/17

YP 2.5 M1 release of 12/15/17

YP 2.5 M2 cut off of 1/15/18

YP 2.5 M2 release of 1/26/18

YP 2.5 M3 cut off of 2/19/18

YP 2.5 M3 release of 3/2/18

YP 2.5 M4 cut off of 4/2/18

YP 2.5 M4 release of 4/27/18


Tracking Metrics:

WDD 2640 (last week 2633)

(https://wiki.yoctoproject.org/charts/combo.html)


Key Status Links for YP:

https://wiki.yoctoproject.org/wiki/Yocto_Project_v2.5_Status

https://wiki.yoctoproject.org/wiki/Yocto_2.5_Schedule

https://wiki.yoctoproject.org/wiki/Yocto_2.5_Features

[If anyone has suggestions for other information you’d like to see on this 
weekly status update, let us know!]

Thanks,

Stephen K. Jolley
Yocto Project Program Manager
INTEL, MS JF1-255, 2111 N.E. 25th Avenue, Hillsboro, OR 97124
•   Work Telephone:(503) 712-0534
•Cell:  (208) 244-4460
• Email:stephen.k.jol...@intel.com

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Bitbake fails when enabling tools-testapps

2017-11-13 Thread Leonardo Sandoval
On Sun, 12 Nov 2017 01:18:45 -0700
Chris Hughes <89dra...@gmail.com> wrote:

> Hoping this is the right place to get help with the following issue.
> 
> I'm using bitbake to build a custom image of the intel-aero / yocto sources.
> 

Make sure all layer dependencies are included into the conf/bblayers.conf file. 
There must be at least one recipe that either implicity (by default,  a recipe 
provides itself with the same name) or explicity (with PROVIDES) , otherwise 
you see what you mentioned.
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Can I force gstreamer into specific version with my image ?

2017-11-13 Thread Leonardo Sandoval
On Sun, 12 Nov 2017 11:59:32 +0200
Ran Shalit  wrote:

> hELLO,
> 
> For some reason my image is installed with gstreamer 1.6, and I don't
> understnad why the image (fsl-image-qt5) prefer 1.6.
> Is there a way to force gsreamer specific version (1.8.2) ? 

There is a specific varible which you can use to point to a specific PV, check

http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-PREFERRED_VERSION

Just make sure you have the 1.8.2 recipe in your layer stack.

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] 答复: use native (cross) toolchain instead of a populated nativesdk (cross-canadian) toolchain

2017-11-13 Thread Zhen LiWei
Thank you. The SDK installing host being different is actually not our concern: 
we have some strict definition of what host distro we should use when using the 
SDK.

And basically the native toolchain works rather fine. And I can (I think) use 
it with some confidence.

The other goal of mine---using the x86_64_linux sysroot to develop x86 native 
programs---however, is difficult. For 1) Quite some patches needed for 
autotools, pkg-config, etc…. 2) basic libraries like openssl need to co-exist 
with the host-distro-native ones, so when building binaries upon them I need to 
be very careful (ly manipulating the pkg-config, xxx-config, and rpathes). 3) 
various in-house and 3rdparty binaries need to be built on this complex setup, 
which use different config/build infrastructures.

So basically this is not how the native sysroot is intended to be used (but in 
the BB env it is controled very well: every native package can be built in it). 
So I need to continue to improve my procedure, or just give it up and use a 
qemu image instead.

Liwei


发件人: ChenQi 
发送时间: Thursday, November 9, 2017 10:48:41 AM
收件人: Zhen LiWei; yocto@yoctoproject.org
主题: Re: [yocto] use native (cross) toolchain instead of a populated nativesdk 
(cross-canadian) toolchain

If I understand it correctly, you are talking about using native components 
directly for SDK.
If you are using all the same machine with the same OS, you could use native 
components directly, maybe with a little modification.
But in fact, the host where SDK is installed might be different from the host 
where SDK is built.
Check the SDKMACHINE variable.

Best Regards,
Chen Qi

On 11/07/2017 11:09 PM, Zhen LiWei wrote:

Hi, I am working on a yocto 2.0 based distro and we usually populate_sdk and 
use the toolchain included in SDK.



But we also like to check the SDK into a SVN repo, and checkout it anywhere, 
and use it away right where it is checked out. And since the nativesdk binaries 
are based on a different glibc than native, and have the “dynamic loader” path 
hardcoded in them, I have to patch the toolchain binaries’ .interp secion to 
point to a common place, and update the loader into that common place 
automatically in some way. Other than this, things work very good for us.



Then I was thinking: is it a good practice, to use the native/cross toolchain 
directly from the tmp/sysroots/x86_64-native folder. I tried and succeeded, by 
just moving the sysroot to where the checked-out nativesdk toolchain was.



An extra bonus about this is that we got a more populated sysroot for native 
platform too, for example a openssl dev package at the same version as that on 
target, that we can actually use to make the native platform a closer-to-target 
dev env for some “workbench” build.



However I’m still wondering: is there any thing negative about this style? One 
thing known is that the SDK-using host need to be similar to the SDK-building 
host, but that is not an issue for us. But anything else, guys?



-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto