[yocto] Minutes: Yocto Project Weekly Triage Meeting 8/18/2022

2022-08-18 Thread sakib . sajal

*Wiki: *https://wiki.yoctoproject.org/wiki/Bug_Triage

*Attendees: *Steve Sakoman, Joshua Watt, Randy Macleod, Richard Purdie, 
Alexandre Belloni, Pavel Zhukov, Stephen Jolley, Ross Burton, Saul Wold


*ARs:*

N/A*
*

*Notes:*
N/A*
*
**

*Medium+ 4.1 Unassigned Enhancements/Bugs: *78 (Last week 78)

*Medium+ 4.99 Unassigned Enhancements/Bugs: *43**(Last week 43)

*AB Bugs: *56 (Last week 54)

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#57863): https://lists.yoctoproject.org/g/yocto/message/57863
Mute This Topic: https://lists.yoctoproject.org/mt/93105563/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] Devtool fails if SRCREV is set to ${AUTOREV} #kirkstone #devtool #yocto

2022-08-18 Thread shibi . cbe
Hello Everyone

We perform yocto build and do devtool modify for one of package it works
if we perform devtool modify for another package without resetting the 
previously modified package we are getting below error in modified package 
during parsing bb step

recipefile:

SRC_URI="git://git.com/pkg/linux;branch=mulberry-5.10;protocol=ssh;name=linux;destsuffix=git

SRCREV = "${AUTOREV}"

PV = "5.10+git${SRCPV}"

Yocto version: Kirkstone
BB_SRCREV_POLICY = "clear"

Error:

ERROR: 
/local/home/test/workspace/poky/../sources/meta-mulberry/recipes-kernel/linux/linux_5.10.bb:
 Error executing a python function in :                                   
                                                                                
| ETA:  --:--:--

The stack trace of python calls that resulted in this exception/failure was:
File: '', lineno: 21, function: 

0017:__anon_56__local_home_test_workspace_poky_meta_classes_kernel_fitimage_bbclass(d)

0018:__anon_795__local_home_test_workspace_poky_meta_classes_kernel_fitimage_bbclass(d)

0019:__anon_7__local_home_test_workspace_poky_meta_classes_kernel_devicetree_bbclass(d)

0020:__anon_717__local_home_test_workspace_poky_meta_classes_kernel_yocto_bbclass(d)

*** 
0021:__anon_145__local_home_test_workspace_poky_meta_classes_externalsrc_bbclass(d)

File: 
'/local/home/shibikri/mulberry_workspace/poky/meta/classes/externalsrc.bbclass',
 lineno: 66, function: 
__anon_145__local_home_test_workspace_poky_meta_classes_externalsrc_bbclass
0062:        else:
0063:            d.setVar('B', '${WORKDIR}/${BPN}-${PV}/')
0064:
0065:        local_srcuri = []
*** 0066:        fetch = bb.fetch2.Fetch((d.getVar('SRC_URI') or '').split(), d)
0067:        for url in fetch.urls:
0068:            url_data = fetch.ud[url]
0069:            parm = url_data.parm
0070:            if (url_data.type == 'file' or
File: '/local/home/test/workspace/poky/bitbake/lib/bb/fetch2/__init__.py', 
lineno: 1680, function: __init__
1676:
1677:        for url in urls:
1678:            if url not in self.ud:
1679:                try:
*** 1680:                    self.ud[url] = FetchData(url, d, localonly)
1681:                except NonLocalMethod:
1682:                    if localonly:
1683:                        self.ud[url] = None
1684:                        pass
File: '/local/home/test/workspace/poky/bitbake/lib/bb/fetch2/__init__.py', 
lineno: 1317, function: __init__
1313:            logger.warning('Consider updating %s recipe to use "protocol" 
not "proto" in SRC_URI.', d.getVar('PN'))
1314:            self.parm["protocol"] = self.parm.get("proto", None)
1315:
1316:        if hasattr(self.method, "urldata_init"):
*** 1317:            self.method.urldata_init(self, d)
1318:
1319:        if "localpath" in self.parm:
1320:            # if user sets localpath for file, use it instead.\
1321:            self.localpath = self.parm["localpath"]
File: '/local/home/shibikri/test/workspace/poky/bitbake/lib/bb/fetch2/git.py', 
lineno: 249, function: urldata_init
0245:        write_tarballs = d.getVar("BB_GENERATE_MIRROR_TARBALLS") or "0"
0246:        ud.write_tarballs = write_tarballs != "0" or ud.rebaseable
0247:        ud.write_shallow_tarballs = 
(d.getVar("BB_GENERATE_SHALLOW_TARBALLS") or write_tarballs) != "0"
0248:
*** 0249:        ud.setup_revisions(d)
0250:
0251:        for name in ud.names:
0252:            # Ensure anything that doesn't look like a sha256 
checksum/revision is translated into one
0253:            if not ud.revisions[name] or len(ud.revisions[name]) != 40  or 
(False in [c in "abcdef0123456789" for c in ud.revisions[name]]):
File: '/local/home/test/workspace/poky/bitbake/lib/bb/fetch2/__init__.py', 
lineno: 1347, function: setup_revisions
1343:
1344:    def setup_revisions(self, d):
1345:        self.revisions = {}
1346:        for name in self.names:
*** 1347:            self.revisions[name] = srcrev_internal_helper(self, d, 
name)
1348:
1349:        # add compatibility code for non name specified case
1350:        if len(self.names) == 1:
1351:            self.revision = self.revisions[self.names[0]]
File: '/local/home/test/workspace/poky/bitbake/lib/bb/fetch2/__init__.py', 
lineno: 1212, function: srcrev_internal_helper
1208:
1209:    if srcrev == "INVALID" or not srcrev:
1210:        raise FetchError("Please set a valid SRCREV for url %s (possible 
key names are %s, or use a ;rev=X URL parameter)" % (str(attempts), ud.url), 
ud.url)
1211:    if srcrev == "AUTOINC":
*** 1212:        srcrev = ud.method.latest_revision(ud, d, name)
1213:
1214:    return srcrev
1215:
1216:def get_checksum_file_list(d):
File: '/local/home/test/workspace/poky/bitbake/lib/bb/fetch2/__init__.py', 
lineno: 1624, function: latest_revision
1620:        key = self.generate_revision_key(ud, d, name)
1621:        try:
1622:            return revs[key]
1623:        except KeyError:
*** 1624:            revs[key] = rev = self._latest_revision(ud, d, name)
1625:            return rev
1626:
1627:    def 

[linux-yocto][v5.15/standard/preempt-rt/nxp-sdk-5.10/nxp-s32g][PATCH 2/3] gpio: s32: switch the spinlock of siul2_gpio_dev to raw spinlock

2022-08-18 Thread quanyang.wang
From: Quanyang Wang 

The irq functions "siul2_gpio_irq_unmask" and "siul2_gpio_irq_mask"
use spin_lock in preempt-rt kernel, it will cause the error that
calling a sleeping function in an atomic context.

Use raw spinlock to fix this issue.

Upstream-Status: Pending

Signed-off-by: Quanyang Wang 
---
 drivers/gpio/gpio-siul2-s32cc.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpio/gpio-siul2-s32cc.c b/drivers/gpio/gpio-siul2-s32cc.c
index 5dde1c1975acc..a903a29776199 100644
--- a/drivers/gpio/gpio-siul2-s32cc.c
+++ b/drivers/gpio/gpio-siul2-s32cc.c
@@ -153,7 +153,7 @@ struct siul2_gpio_dev {
struct regmap *eirqimcrsmap;
struct gpio_chip gc;
struct irq_chip irq;
-   spinlock_t lock;
+   raw_spinlock_t lock;
 };
 
 /* We will use the following variable names:
@@ -206,14 +206,14 @@ static inline void gpio_set_direction(struct 
siul2_gpio_dev *dev, int gpio,
 {
unsigned long flags;
 
-   spin_lock_irqsave(>lock, flags);
+   raw_spin_lock_irqsave(>lock, flags);
 
if (dir == IN)
bitmap_clear(dev->pin_dir_bitmap, gpio, 1);
else
bitmap_set(dev->pin_dir_bitmap, gpio, 1);
 
-   spin_unlock_irqrestore(>lock, flags);
+   raw_spin_unlock_irqrestore(>lock, flags);
 }
 
 static inline enum gpio_dir gpio_get_direction(struct siul2_gpio_dev *dev,
@@ -476,9 +476,9 @@ static void siul2_gpio_irq_unmask(struct irq_data *data)
/* Enable Interrupt */
regmap_update_bits(gpio_dev->irqmap, SIUL2_DIRER0, mask, mask);
 
-   spin_lock_irqsave(_dev->lock, flags);
+   raw_spin_lock_irqsave(_dev->lock, flags);
bitmap_set(_dev->eirqs_bitmap, platdata->irqs[index].eirq, 1);
-   spin_unlock_irqrestore(_dev->lock, flags);
+   raw_spin_unlock_irqrestore(_dev->lock, flags);
 
/* Set IMCR */
regmap_write(gpio_dev->eirqimcrsmap,
@@ -520,9 +520,9 @@ static void siul2_gpio_irq_mask(struct irq_data *data)
/* Clean status flag */
regmap_update_bits(gpio_dev->irqmap, SIUL2_DISR0, mask, mask);
 
-   spin_lock_irqsave(_dev->lock, flags);
+   raw_spin_lock_irqsave(_dev->lock, flags);
bitmap_clear(_dev->eirqs_bitmap, platdata->irqs[index].eirq, 1);
-   spin_unlock_irqrestore(_dev->lock, flags);
+   raw_spin_unlock_irqrestore(_dev->lock, flags);
 
regmap_write(gpio_dev->eirqimcrsmap,
 SIUL2_EIRQ_REG(platdata->irqs[index].eirq),
@@ -1092,7 +1092,7 @@ static int siul2_gpio_probe(struct platform_device *pdev)
 
platform_set_drvdata(pdev, gpio_dev);
 
-   spin_lock_init(_dev->lock);
+   raw_spin_lock_init(_dev->lock);
 
for (i = 0; i < ARRAY_SIZE(gpio_dev->siul2); ++i) {
err = siul2_get_gpio_pinspec(pdev, , i);
-- 
2.36.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#11573): 
https://lists.yoctoproject.org/g/linux-yocto/message/11573
Mute This Topic: https://lists.yoctoproject.org/mt/93099869/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto][v5.15/standard/preempt-rt/nxp-sdk-5.10/nxp-s32g][PATCH 0/3]

2022-08-18 Thread quanyang.wang
From: Quanyang Wang 

Hi Bruce,
Would you please help merge these 3 patches to the branches:
v5.15/standard/preempt-rt/nxp-sdk-5.10/nxp-s32g
v5.15/standard/nxp-sdk-5.10/nxp-s32g
Thanks,
Quanyang

  

Quanyang Wang (3):
  gpio: s32: force regmap use raw spinlock
  gpio: s32: switch the spinlock of siul2_gpio_dev to raw spinlock
  gpio: s32: don't run callbacks in some callbacks

 drivers/gpio/gpio-siul2-s32cc.c | 34 +
 1 file changed, 9 insertions(+), 25 deletions(-)

-- 
2.36.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#11574): 
https://lists.yoctoproject.org/g/linux-yocto/message/11574
Mute This Topic: https://lists.yoctoproject.org/mt/93099870/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto][v5.15/standard/preempt-rt/nxp-sdk-5.10/nxp-s32g][PATCH 3/3] gpio: s32: don't run callbacks in some callbacks

2022-08-18 Thread quanyang.wang
From: Quanyang Wang 

The functions "siul2_gpio_dir_in" and "siul2_gpio_free" have been
registered to be callbacks as "gc->direction_input" and "gc->free".
When the callbacks "irq_chip->irq_set_type/irq_unmask/irq_mask"
are called, the caller should guarantee that it will call
gc->direction_input and gc->free explicitly instead of counting on
irq_set_type/irq_unmask/irq_mask to do this. So let's remove calling
of the callbacks from callbacks to avoid calling them multiple times.

This patch fixes the calltrace as below:

[ 904.363150] BUG: sleeping function called from invalid context at 
kernel/locking/rtmutex_api.c:510
[ 904.363174] in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 1246, 
name: gpiomon
[ 904.363181] preempt_count: 1, expected: 0
[ 904.363186] RCU nest depth: 0, expected: 0
[ 904.363190] 2 locks held by gpiomon/1246:
[ 904.363195] #0: ff8812162ac8 (request_class){..}-{3:3}, at: 
__setup_irq+0xbc/0x754
[ 904.363232] #1: ff8812162900 (lock_class){}-{2:2}, at: 
_raw_spin_lock_irqsave+0x1c/0x30
[ 904.363256] irq event stamp: 23554
[ 904.363259] hardirqs last enabled at (23553): [] 
_raw_spin_unlock_irqrestore+0xb8/0xe0
[ 904.363270] hardirqs last disabled at (23554): [] 
__raw_spin_lock_irqsave+0x114/0x15c
[ 904.363283] softirqs last enabled at (15992): [] 
__local_bh_enable_ip+0xa4/0x2a0
[ 904.363297] softirqs last disabled at (15980): [] 
release_sock+0xc/0x100
[ 904.363311] Preemption disabled at:
[ 904.363314] [] __raw_spin_lock_irqsave+0x3c/0x15c
[ 904.363329] CPU: 2 PID: 1246 Comm: gpiomon Not tainted 
5.15.58-rt48-yocto-preempt-rt #1
[ 904.363339] Hardware name: Aptiv S32G274 CVC (DT)
[ 904.363343] Call trace:
[ 904.363346] dump_backtrace+0x0/0x1b4
[ 904.363354] show_stack+0x24/0x30
[ 904.363361] dump_stack_lvl+0xb0/0xf4
[ 904.363371] dump_stack+0x18/0x34
[ 904.363378] __might_resched+0x18c/0x22c
[ 904.363389] __might_sleep+0x54/0x90
[ 904.363396] mutex_lock_nested+0x5c/0xd0
[ 904.363406] pinctrl_get_device_gpio_range+0x48/0x120
[ 904.363418] pinctrl_gpio_direction+0x40/0xd0
[ 904.363426] pinctrl_gpio_direction_input+0x20/0x30
[ 904.363434] siul2_gpio_dir_in+0x34/0x90
[ 904.363443] siul2_gpio_irq_set_type+0x40/0x1a4
[ 904.363450] __irq_set_trigger+0x6c/0x190
[ 904.363456] __setup_irq+0x2b8/0x754
[ 904.363462] request_threaded_irq+0xf8/0x1bc
[ 904.363469] lineevent_create+0x294/0x3e0
[ 904.363480] gpio_ioctl+0x31c/0x3a0
[ 904.363489] __arm64_sys_ioctl+0xb4/0xfc
[ 904.363500] invoke_syscall+0x5c/0x130
[ 904.363511] el0_svc_common.constprop.0+0x68/0x124
[ 904.363520] do_el0_svc+0x50/0xbc
[ 904.363529] el0_svc+0x54/0x130
[ 904.363536] el0t_64_sync_handler+0xa4/0x130
[ 904.363544] el0t_64_sync+0x1a0/0x1a4

Upstream-Status: Pending

Signed-off-by: Quanyang Wang 
---
 drivers/gpio/gpio-siul2-s32cc.c | 17 -
 1 file changed, 17 deletions(-)

diff --git a/drivers/gpio/gpio-siul2-s32cc.c b/drivers/gpio/gpio-siul2-s32cc.c
index a903a29776199..241d75cbe9149 100644
--- a/drivers/gpio/gpio-siul2-s32cc.c
+++ b/drivers/gpio/gpio-siul2-s32cc.c
@@ -358,13 +358,6 @@ static int siul2_gpio_irq_set_type(struct irq_data *d, 
unsigned int type)
int ret = 0;
u32 mask;
 
-   ret = siul2_gpio_dir_in(gc, gpio);
-   if (ret) {
-   dev_err(gc->parent, "Failed to configure GPIO %d as input\n",
-   gpio);
-   return ret;
-   }
-
/* SIUL2 GPIO doesn't support level triggering */
if ((irq_type & IRQ_TYPE_LEVEL_HIGH)
|| (irq_type & IRQ_TYPE_LEVEL_LOW)) {
@@ -455,7 +448,6 @@ static void siul2_gpio_irq_unmask(struct irq_data *data)
int index = siul2_irq_gpio_index(platdata, gpio);
unsigned long flags;
u32 mask;
-   int ret;
 
if (index < 0)
return;
@@ -484,13 +476,6 @@ static void siul2_gpio_irq_unmask(struct irq_data *data)
regmap_write(gpio_dev->eirqimcrsmap,
 SIUL2_EIRQ_REG(platdata->irqs[index].eirq),
 platdata->irqs[index].imscr_conf);
-
-   /* Configure GPIO as input */
-   ret = siul2_gpio_dir_in(gc, gpio);
-   if (ret) {
-   dev_err(gc->parent, "Failed to configure GPIO %d as input\n",
-   ret);
-   }
 }
 
 static void siul2_gpio_irq_mask(struct irq_data *data)
@@ -527,8 +512,6 @@ static void siul2_gpio_irq_mask(struct irq_data *data)
regmap_write(gpio_dev->eirqimcrsmap,
 SIUL2_EIRQ_REG(platdata->irqs[index].eirq),
 0);
-
-   siul2_gpio_free(gc, gpio);
 }
 
 static const struct regmap_config siul2_regmap_conf = {
-- 
2.36.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#11575): 
https://lists.yoctoproject.org/g/linux-yocto/message/11575
Mute This Topic: https://lists.yoctoproject.org/mt/93099871/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 

[linux-yocto][v5.15/standard/preempt-rt/nxp-sdk-5.10/nxp-s32g][PATCH 1/3] gpio: s32: force regmap use raw spinlock

2022-08-18 Thread quanyang.wang
From: Quanyang Wang 

The regmap subsystem use mutex lock as its default lock but this will
cause the error that calling sleeping functions in an atomic context
since the irq callbacks "irq_set_type/irq_mask/irq_unmask" for
siul2-s32cc are all using regmap_update_bits.

Add use_raw_spinlock flag to the regmap_config structure siul2_regmap_conf
can switch mutex lock to raw spinlock.

Upstream-Status: Pending

Signed-off-by: Quanyang Wang 
---
 drivers/gpio/gpio-siul2-s32cc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-siul2-s32cc.c b/drivers/gpio/gpio-siul2-s32cc.c
index 1cef2c90cec3d..5dde1c1975acc 100644
--- a/drivers/gpio/gpio-siul2-s32cc.c
+++ b/drivers/gpio/gpio-siul2-s32cc.c
@@ -536,6 +536,7 @@ static const struct regmap_config siul2_regmap_conf = {
.reg_bits = 32,
.reg_stride = 4,
.cache_type = REGCACHE_FLAT,
+   .use_raw_spinlock = true,
 };
 
 static struct regmap *common_regmap_init(struct platform_device *pdev,
-- 
2.36.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#11572): 
https://lists.yoctoproject.org/g/linux-yocto/message/11572
Mute This Topic: https://lists.yoctoproject.org/mt/93099868/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-parsec][PATCH] Use CARGO_TARGET_SUBDIR in do_install

2022-08-18 Thread Anton Antonov
Signed-off-by: Anton Antonov 
---
 .../recipes-parsec/parsec-service/parsec-service_1.0.0.bb   | 2 +-
 meta-parsec/recipes-parsec/parsec-tool/parsec-tool_0.5.2.bb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.0.0.bb 
b/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.0.0.bb
index 84539f9..2a25178 100644
--- a/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.0.0.bb
+++ b/meta-parsec/recipes-parsec/parsec-service/parsec-service_1.0.0.bb
@@ -45,7 +45,7 @@ PARSEC_CONFIG ?= "${S}/config.toml"
 do_install () {
 # Binaries
 install -d -m 700 -o parsec -g parsec "${D}${libexecdir}/parsec"
-install -m 700 -o parsec -g parsec 
"${WORKDIR}/build/target/${CARGO_TARGET_SUBDIR}/parsec" 
${D}${libexecdir}/parsec/parsec
+install -m 700 -o parsec -g parsec 
"${B}/target/${CARGO_TARGET_SUBDIR}/parsec" ${D}${libexecdir}/parsec/parsec
 
 # Config file
 install -d -m 700 -o parsec -g parsec "${D}${sysconfdir}/parsec"
diff --git a/meta-parsec/recipes-parsec/parsec-tool/parsec-tool_0.5.2.bb 
b/meta-parsec/recipes-parsec/parsec-tool/parsec-tool_0.5.2.bb
index 4b053b9..6ecce8e 100644
--- a/meta-parsec/recipes-parsec/parsec-tool/parsec-tool_0.5.2.bb
+++ b/meta-parsec/recipes-parsec/parsec-tool/parsec-tool_0.5.2.bb
@@ -11,7 +11,7 @@ RDEPENDS:${PN} = "openssl-bin"
 
 do_install() {
   install -d ${D}/${bindir}
-  install -m 755 "${B}/target/${TARGET_SYS}/release/parsec-tool" 
"${D}${bindir}/parsec-tool"
+  install -m 755 "${B}/target/${CARGO_TARGET_SUBDIR}/parsec-tool" 
"${D}${bindir}/parsec-tool"
   install -m 755 "${S}/tests/parsec-cli-tests.sh" 
"${D}${bindir}/parsec-cli-tests.sh"
 }
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#57861): https://lists.yoctoproject.org/g/yocto/message/57861
Mute This Topic: https://lists.yoctoproject.org/mt/93099448/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [yocto] wget - The certificate has not yet been activated (does also happen in qemuarm "virt" machine)

2022-08-18 Thread Tomasz Moń
On Thu, 2022-02-03 at 17:13 +, Matthias Klein wrote:
> I can "fix" the bug by switching from gnutls to openssl:
> 
> PACKAGECONFIG:remove = "gnutls"
> PACKAGECONFIG:append = " openssl"
> 
> Can anyone explain this?

The issue is that gnutls configure script detects 32-bit time_t while
wget detects 64-bit time_t.

Function ssl_check_certificate() in wget/src/gnutls.c contains:
  time_t now = time (NULL);
  ...
  if (now < gnutls_x509_crt_get_activation_time (cert))
  ...

gnutls_x509_crt_get_activation_time() returns time_t. In wget context
it means that two 64-bit time_t are being compared.

On imx6, when a function returns 32-bit value, the result is stored in
r0. When a function returns 64-bit value, the low 32-bits are stored in
r0 while the high 32-bits are stored in r1.

The problem is that gnutls_x509_crt_get_activation_time() compiled in
gnutls recipe, has 32-bit time_t and thus sets only r0. The likelihood
that r1 will have value that will make code consider the certificate as
active (before 2038 the only such value is 0) is low. As r1 is not 0,
the supposed activation time is way past 2038 and thus "The certificate
has not yet been activated" error is printed.

The solution is to fix gnutls recipe to detect time_t as 64-bit.

> What exactly does the change to openssl mean?

The gnutls_x509_crt_get_activation_time() is no longer used at all.
Instead, SSL_get_verify_result() is used (ssl_check_certificate() in
wget/src/openssl.c). The SSL_get_verify_result() does the check within
OpenSSL library itself, so even if wget and OpenSSL does not agree on
time_t size, it doesn't matter (wget and OpenSSL have to agree on long
size, because SSL_get_verify_result() returns long).

Best Regards,
Tomasz Moń


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#57860): https://lists.yoctoproject.org/g/yocto/message/57860
Mute This Topic: https://lists.yoctoproject.org/mt/88879516/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-