Attention is currently required from: Timur Davydov.
pespin has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/osmo-trx/+/42654?usp=email )
Change subject: build: detect pthread_setname_np and sched_* APIs, guard usage
......................................................................
Patch Set 1:
(2 comments)
Patchset:
PS1:
missing #include "config.h" in all files where the HAVE_ stuff is added?
File CommonLibs/Threads.cpp:
https://gerrit.osmocom.org/c/osmo-trx/+/42654/comment/5383242d_0ff442a0?usp… :
PS1, Line 39:
missing "#include "config.h" here?
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/42654?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ic3f1492544439d88c5e6683330c6696de1c2f85b
Gerrit-Change-Number: 42654
Gerrit-PatchSet: 1
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Comment-Date: Wed, 29 Apr 2026 17:17:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: Timur Davydov, fixeria.
pespin has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/osmo-trx/+/42357?usp=email )
Change subject: proto_trxd: add helpers to prepare burst indication packets
......................................................................
Patch Set 6: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/42357?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ie94a1df4879cbf6056cd05c9621c46db1ed972fd
Gerrit-Change-Number: 42357
Gerrit-PatchSet: 6
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Comment-Date: Wed, 29 Apr 2026 17:14:22 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Timur Davydov.
pespin has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/libosmocore/+/42653?usp=email )
Change subject: vty: make CPU scheduling optional based on platform support
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/42653?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic5b7e39fac16531d370cb81f769ba87fef18cb81
Gerrit-Change-Number: 42653
Gerrit-PatchSet: 2
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Comment-Date: Wed, 29 Apr 2026 17:09:50 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Timur Davydov.
pespin has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/libosmocore/+/42709?usp=email )
Change subject: vty: fix osmo_cpu_sched_vty_init() prototype
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/42709?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia86e8063178ad82de098c2ff693cfbcd7e9f2192
Gerrit-Change-Number: 42709
Gerrit-PatchSet: 1
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Comment-Date: Wed, 29 Apr 2026 17:08:38 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: falconia.
fixeria has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42713?usp=email )
Change subject: nokia vty: change help strings away from "*Site"
......................................................................
Patch Set 2:
(1 comment)
File src/osmo-bsc/bts_vty.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/42713/comment/945cb4a4_763dfb75?usp… :
PS1, Line 395: nokia_site
> If this grand renaming is indeed desired, perhaps it can be done as its own patch, not in the presen […]
Acknowledged
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42713?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I55556b7b5aa5bc6efcbee815e9011497a933697c
Gerrit-Change-Number: 42713
Gerrit-PatchSet: 2
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Comment-Date: Wed, 29 Apr 2026 15:18:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: falconia <falcon(a)freecalypso.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/40202?usp=email )
Change subject: personalization: add get_typical_input_len() to ConfigurableParameter
......................................................................
personalization: add get_typical_input_len() to ConfigurableParameter
The aim is to tell a user interface how wide an input text field should
be chosen to be convenient -- ideally showing the entire value in all
cases, but not too huge for fields that have no sane size limit.
Change-Id: I2568a032167a10517d4d75d8076a747be6e21890
Jenkins: skip-card-test
---
M pySim/esim/saip/personalization.py
1 file changed, 17 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim/esim/saip/personalization.py b/pySim/esim/saip/personalization.py
index 8f59556..31851f3 100644
--- a/pySim/esim/saip/personalization.py
+++ b/pySim/esim/saip/personalization.py
@@ -250,6 +250,13 @@
return (None, None)
return (min(vals), max(vals))
+ @classmethod
+ def get_typical_input_len(cls):
+ '''return a good length to use as the visible width of a user interface input field.
+ May be overridden by subclasses.
+ This default implementation returns the maximum allowed value length -- a good fit for most subclasses.
+ '''
+ return cls.get_len_range()[1] or 16
class DecimalParam(ConfigurableParameter):
"""Decimal digits. The input value may be a string of decimal digits like '012345', or an int. The output of
@@ -353,6 +360,16 @@
val = super().validate_val(val)
return bytes(val)
+ @classmethod
+ def get_typical_input_len(cls):
+ # override to return twice the length, because of hex digits.
+ min_len, max_len = cls.get_len_range()
+ if max_len is None:
+ return None
+ # two hex characters per value octet.
+ # (maybe *3 to also allow for spaces?)
+ return max_len * 2
+
class EnumParam(ConfigurableParameter):
"""ConfigurableParameter for named integer enumeration values.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40202?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I2568a032167a10517d4d75d8076a747be6e21890
Gerrit-Change-Number: 40202
Gerrit-PatchSet: 11
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/40201?usp=email )
Change subject: personalization: make AlgorithmID a new EnumParam
......................................................................
personalization: make AlgorithmID a new EnumParam
The AlgorithmID has a few preset values, and hardly anyone knows which
is which. So instead of entering '1', '2' or '3', make it work with
prededined values 'Milenage', 'TUAK' and 'usim-test'.
Implement the enum value part abstractly in new EnumParam.
Make AlgorithmID a subclass of EnumParam and define the values as from
pySim/esim/asn1/saip/PE_Definitions-3.3.1.asn
Related: SYS#6768
Change-Id: I71c2ec1b753c66cb577436944634f32792353240
Jenkins: skip-card-test
---
M pySim/esim/saip/personalization.py
1 file changed, 92 insertions(+), 11 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim/esim/saip/personalization.py b/pySim/esim/saip/personalization.py
index 7331444..8f59556 100644
--- a/pySim/esim/saip/personalization.py
+++ b/pySim/esim/saip/personalization.py
@@ -16,7 +16,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import abc
+import enum
import io
+import re
from typing import List, Tuple, Generator, Optional
from osmocom.tlv import camel_to_snake
@@ -352,6 +354,72 @@
return bytes(val)
+class EnumParam(ConfigurableParameter):
+ """ConfigurableParameter for named integer enumeration values.
+
+ Subclasses must define a nested enum.IntEnum named 'Values' listing all valid names and their
+ integer codes. apply_val() and get_values_from_pes() are not implemented here and this must
+ be inherited from another mixin."""
+
+ class Values(enum.IntEnum):
+ pass # subclasses override this
+
+ @classmethod
+ def validate_val(cls, val) -> int:
+ if isinstance(val, int):
+ try:
+ return int(cls.Values(val))
+ except ValueError:
+ pass
+ elif isinstance(val, str):
+ member = cls.map_name_to_val(val, strict=False)
+ if member is not None:
+ return member
+
+ valid = ', '.join(m.name for m in cls.Values)
+ raise ValueError(f"{cls.get_name()}: invalid argument: {val!r}. Valid arguments are: {valid}")
+
+ @classmethod
+ def map_name_to_val(cls, name: str, strict=True) -> int:
+ """Return the integer value for a given enum member name. Performs an exact match first,
+ then falls back to fuzzy matching (case-insensitive, punctuation-insensitive)."""
+ try:
+ return int(cls.Values[name])
+ except KeyError:
+ pass
+
+ clean = cls.clean_name_str(name)
+ for member in cls.Values:
+ if cls.clean_name_str(member.name) == clean:
+ return int(member)
+
+ if strict:
+ valid = ', '.join(m.name for m in cls.Values)
+ raise ValueError(f"{cls.get_name()}: {name!r} is not a known value. Known values are: {valid}")
+ return None
+
+ @classmethod
+ def map_val_to_name(cls, val, strict=False) -> str:
+ """Return the enum member name for a given integer value."""
+ try:
+ return cls.Values(val).name
+ except ValueError:
+ if strict:
+ raise ValueError(f"{cls.get_name()}: {val!r} ({type(val).__name__}) is not a known value.")
+ return None
+
+ @classmethod
+ def name_normalize(cls, name: str) -> str:
+ """Map a (possibly fuzzy) name to its canonical enum member name."""
+ return cls.Values(cls.map_name_to_val(name)).name
+
+ @classmethod
+ def clean_name_str(cls, val: str) -> str:
+ """Strip punctuation and case for fuzzy name comparison.
+ Treats hyphens and underscores as equivalent (both removed)."""
+ return re.sub('[^0-9A-Za-z]', '', val).lower()
+
+
class Iccid(DecimalParam):
"""ICCID Parameter. Input: string of decimal digits.
If the string of digits is only 18 digits long, add a Luhn check digit."""
@@ -775,21 +843,34 @@
# if it is an int (algorithmID), just pass thru as int
yield { cls.name: val }
-
-class AlgorithmID(DecimalParam, AlgoConfig):
+class AlgorithmID(EnumParam, AlgoConfig):
+ """use validate_val() from EnumParam, and apply_val() from AlgoConfig.
+ In get_values_from_pes(), return enum value names, not raw values."""
+ name = "Algorithm"
algo_config_key = 'algorithmID'
- allow_len = 1
- example_input = 1 # Milenage
+ example_input = "Milenage"
default_source = param_source.ConstantSource
+ # as in pySim/esim/asn1/saip/PE_Definitions-3.3.1.asn
+ class Values(enum.IntEnum):
+ Milenage = 1
+ TUAK = 2
+ usim_test = 3 # input 'usim-test' also accepted via fuzzy matching
+
+ # EnumParam.validate_val() returns the int values from Values
+
@classmethod
- def validate_val(cls, val):
- val = super().validate_val(val)
- val = int(val)
- valid = (1, 2, 3)
- if val not in valid:
- raise ValueError(f'Invalid algorithmID {val!r}, must be one of {valid}')
- return val
+ def get_values_from_pes(cls, pes: ProfileElementSequence):
+ # return enum names, not raw values.
+ # use of super(): this intends to call AlgoConfig.get_values_from_pes() so that the cls argument is this cls
+ # here (AlgorithmID); i.e. AlgoConfig.get_values_from_pes(pes) doesn't work, because AlgoConfig needs to look up
+ # cls.algo_config_key.
+ for d in super(cls, cls).get_values_from_pes(pes):
+ if cls.name in d:
+ # convert int to value string
+ val = d[cls.name]
+ d[cls.name] = cls.map_val_to_name(val, strict=True)
+ yield d
class K(BinaryParam, AlgoConfig):
"""use validate_val() from BinaryParam, and apply_val() from AlgoConfig"""
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40201?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I71c2ec1b753c66cb577436944634f32792353240
Gerrit-Change-Number: 40201
Gerrit-PatchSet: 11
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: Hoernchen <ewild(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/40203?usp=email )
Change subject: personalization: fix SdKey.apply_val() implementation
......................................................................
personalization: fix SdKey.apply_val() implementation
'securityDomain' elements are decoded to ProfileElementSD instances,
which keep higher level representations of the key data apart from the
decoded[] lists.
So far, apply_val() was dropping binary values in decoded[], which does
not work, because ProfileElementSD._pre_encode() overwrites
self.decoded[] from the higher level representation.
Implement using
- ProfileElementSD.find_key() and SecurityDomainKeyComponent to modify
an exsiting entry, or
- ProfileElementSD.add_key() to create a new entry.
Before this patch, SdKey parameters seemed to patch PES successfully,
but their modifications did not end up in the encoded DER.
(BTW, this does not fix any other errors that may still be present in
the various SdKey subclasses, patches coming up.)
Related: SYS#6768
Change-Id: I07dfc378705eba1318e9e8652796cbde106c6a52
Jenkins: skip-card-test
---
M pySim/esim/saip/__init__.py
M pySim/esim/saip/personalization.py
2 files changed, 41 insertions(+), 28 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pySim/esim/saip/__init__.py b/pySim/esim/saip/__init__.py
index 9fa1d28..ec59c50 100644
--- a/pySim/esim/saip/__init__.py
+++ b/pySim/esim/saip/__init__.py
@@ -1079,6 +1079,13 @@
'keyVersionNumber': bytes([self.key_version_number]),
'keyComponents': [k.to_saip_dict() for k in self.key_components]}
+ def get_key_component(self, key_type):
+ for kc in self.key_components:
+ if kc.key_type == key_type:
+ return kc.key_data
+ return None
+
+
class ProfileElementSD(ProfileElement):
"""Class representing a securityDomain ProfileElement."""
type = 'securityDomain'
diff --git a/pySim/esim/saip/personalization.py b/pySim/esim/saip/personalization.py
index 31851f3..c633a9c 100644
--- a/pySim/esim/saip/personalization.py
+++ b/pySim/esim/saip/personalization.py
@@ -24,9 +24,11 @@
from osmocom.tlv import camel_to_snake
from osmocom.utils import hexstr
from pySim.utils import enc_iccid, dec_iccid, enc_imsi, dec_imsi, h2b, b2h, rpad, sanitize_iccid
-from pySim.esim.saip import ProfileElement, ProfileElementSequence
-from pySim.esim.saip import param_source
from pySim.ts_51_011 import EF_SMSP
+from pySim.esim.saip import param_source
+from pySim.esim.saip import ProfileElement, ProfileElementSD, ProfileElementSequence
+from pySim.esim.saip import SecurityDomainKey, SecurityDomainKeyComponent
+from pySim.global_platform import KeyUsageQualifier, KeyType
def unrpad(s: hexstr, c='f') -> hexstr:
return hexstr(s.rstrip(c))
@@ -612,36 +614,40 @@
key_usage_qual = None
@classmethod
- def _apply_sd(cls, pe: ProfileElement, value):
- assert pe.type == 'securityDomain'
- for key in pe.decoded['keyList']:
- if key['keyIdentifier'][0] == cls.key_id and key['keyVersionNumber'][0] == cls.kvn:
- assert len(key['keyComponents']) == 1
- key['keyComponents'][0]['keyData'] = value
- return
- # Could not find matching key to patch, create a new one
- key = {
- 'keyUsageQualifier': bytes([cls.key_usage_qual]),
- 'keyIdentifier': bytes([cls.key_id]),
- 'keyVersionNumber': bytes([cls.kvn]),
- 'keyComponents': [
- { 'keyType': bytes([cls.key_type]), 'keyData': value },
- ]
- }
- pe.decoded['keyList'].append(key)
+ def apply_val(cls, pes: ProfileElementSequence, val):
+ set_components = [ SecurityDomainKeyComponent(cls.key_type, val) ]
- @classmethod
- def apply_val(cls, pes: ProfileElementSequence, value):
- for pe in pes.get_pes_for_type('securityDomain'):
- cls._apply_sd(pe, value)
+ for pe in pes.pe_list:
+ if pe.type != 'securityDomain':
+ continue
+ assert isinstance(pe, ProfileElementSD)
+
+ key = pe.find_key(key_version_number=cls.kvn, key_id=cls.key_id)
+ if not key:
+ # Could not find matching key to patch, create a new one
+ key = SecurityDomainKey(
+ key_version_number=cls.kvn,
+ key_id=cls.key_id,
+ key_usage_qualifier=KeyUsageQualifier.build(cls.key_usage_qual),
+ key_components=set_components,
+ )
+ pe.add_key(key)
+ else:
+ key.key_components = set_components
@classmethod
def get_values_from_pes(cls, pes: ProfileElementSequence):
- for pe in pes.get_pes_for_type('securityDomain'):
- for key in pe.decoded['keyList']:
- if key['keyIdentifier'][0] == cls.key_id and key['keyVersionNumber'][0] == cls.kvn:
- if len(key['keyComponents']) >= 1:
- yield { cls.name: b2h(key['keyComponents'][0]['keyData']) }
+ for pe in pes.pe_list:
+ if pe.type != 'securityDomain':
+ continue
+ assert isinstance(pe, ProfileElementSD)
+
+ key = pe.find_key(key_version_number=cls.kvn, key_id=cls.key_id)
+ if not key:
+ continue
+ kc = key.get_key_component(cls.key_type)
+ if kc:
+ yield { cls.name: b2h(kc) }
class SdKeyScp80_01(SdKey, kvn=0x01, key_type=0x88, permitted_len=[16,24,32]): # AES key type
pass
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40203?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I07dfc378705eba1318e9e8652796cbde106c6a52
Gerrit-Change-Number: 40203
Gerrit-PatchSet: 12
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>