lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

September 2024

  • 1 participants
  • 1983 discussions
[S] Change in pysim[master]: docs: Bring osmo-smdpp documentation up to date with code
by laforge 16 Sep '24

16 Sep '24
Attention is currently required from: fixeria, laforge. Hello Jenkins Builder, fixeria, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38150?usp=email to look at the new patch set (#3). Change subject: docs: Bring osmo-smdpp documentation up to date with code ...................................................................... docs: Bring osmo-smdpp documentation up to date with code Change-Id: Ibaab1fadd5d35ecdb356bed1820074b1b0a1752e Closes: OS#6418 --- M docs/osmo-smdpp.rst 1 file changed, 13 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/50/38150/3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38150?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ibaab1fadd5d35ecdb356bed1820074b1b0a1752e Gerrit-Change-Number: 38150 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[S] Change in pysim[master]: pySim-shell: Detect different eUICC types and print during start-up
by laforge 16 Sep '24

16 Sep '24
Attention is currently required from: dexter, fixeria. laforge has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/38049?usp=email ) Change subject: pySim-shell: Detect different eUICC types and print during start-up ...................................................................... Patch Set 7: (1 comment) File pySim/euicc.py: https://gerrit.osmocom.org/c/pysim/+/38049/comment/3f7a8ba9_d3c55612?usp=em… : PS6, Line 598: -> bool: > likewise, change to `-> None`? Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38049?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I54ea4ce663693f3951040dcc8a16bf532bf99c02 Gerrit-Change-Number: 38049 Gerrit-PatchSet: 7 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 16 Sep 2024 11:27:16 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[M] Change in pysim[master]: pySim-shell: Detect different eUICC types and print during start-up
by laforge 16 Sep '24

16 Sep '24
Attention is currently required from: dexter, fixeria. laforge has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/38049?usp=email ) Change subject: pySim-shell: Detect different eUICC types and print during start-up ...................................................................... Patch Set 6: (3 comments) File pySim/euicc.py: https://gerrit.osmocom.org/c/pysim/+/38049/comment/95d453dc_2b1263cb?usp=em… : PS6, Line 580: -> bool: > This function does not return a `bool`, but always `None` (implicit return) AFAICS. Done https://gerrit.osmocom.org/c/pysim/+/38049/comment/96a691bb_81bb2bec?usp=em… : PS6, Line 586: @staticmethod > (just some ideas below, not blocking) […] Done https://gerrit.osmocom.org/c/pysim/+/38049/comment/a5f28ee5_176bbe11?usp=em… : PS6, Line 616: -> bool: > likewise, change to `-> None`? Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38049?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I54ea4ce663693f3951040dcc8a16bf532bf99c02 Gerrit-Change-Number: 38049 Gerrit-PatchSet: 6 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 16 Sep 2024 11:26:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[S] Change in pysim[master]: pySim-shell: Detect different eUICC types and print during start-up
by laforge 16 Sep '24

16 Sep '24
Attention is currently required from: dexter, laforge. Hello Jenkins Builder, dexter, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38049?usp=email to look at the new patch set (#7). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: pySim-shell: Detect different eUICC types and print during start-up ...................................................................... pySim-shell: Detect different eUICC types and print during start-up Change-Id: I54ea4ce663693f3951040dcc8a16bf532bf99c02 --- M pySim/cdma_ruim.py M pySim/euicc.py M pySim/ts_102_221.py M pySim/ts_51_011.py 4 files changed, 45 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/49/38049/7 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38049?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I54ea4ce663693f3951040dcc8a16bf532bf99c02 Gerrit-Change-Number: 38049 Gerrit-PatchSet: 7 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[S] Change in pysim[master]: docs: remove traces of modules migrated to pyosmocom
by laforge 16 Sep '24

16 Sep '24
Attention is currently required from: dexter, laforge. Hello Jenkins Builder, dexter, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38149?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: docs: remove traces of modules migrated to pyosmocom ...................................................................... docs: remove traces of modules migrated to pyosmocom Change-Id: I2ebb17f9781c90a81e9e554bddd7a851ef51c82a --- M docs/library.rst 1 file changed, 0 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/49/38149/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38149?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2ebb17f9781c90a81e9e554bddd7a851ef51c82a Gerrit-Change-Number: 38149 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[S] Change in pysim[master]: pySim/profile: Change match_with_profile from static to class method
by laforge 16 Sep '24

16 Sep '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38174?usp=email ) Change subject: pySim/profile: Change match_with_profile from static to class method ...................................................................... pySim/profile: Change match_with_profile from static to class method This was suggested by vyanitskiy during gerrit patch review in https://gerrit.osmocom.org/c/pysim/+/38049 in order to make the upcoming eUICC CardProfiles simpler. Change-Id: Ia7c049b31cb1c5c5bb682406d9dd7a73bcd43185 --- M pySim/cdma_ruim.py M pySim/profile.py M pySim/ts_102_221.py M pySim/ts_51_011.py 4 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/74/38174/1 diff --git a/pySim/cdma_ruim.py b/pySim/cdma_ruim.py index 96ff1a4..747a0d2 100644 --- a/pySim/cdma_ruim.py +++ b/pySim/cdma_ruim.py @@ -190,8 +190,8 @@ # TODO: Response parameters/data in case of DF_CDMA (section 2.6) return CardProfileSIM.decode_select_response(data_hex) - @staticmethod - def match_with_card(scc: SimCardCommands) -> bool: + @classmethod + def match_with_card(cls, scc: SimCardCommands) -> bool: return match_ruim(scc) class AddonRUIM(CardProfileAddon): diff --git a/pySim/profile.py b/pySim/profile.py index 74946ba..ae9e19f 100644 --- a/pySim/profile.py +++ b/pySim/profile.py @@ -137,9 +137,9 @@ """ return data_hex - @staticmethod + @classmethod @abc.abstractmethod - def match_with_card(scc: SimCardCommands) -> bool: + def match_with_card(cls, scc: SimCardCommands) -> bool: """Check if the specific profile matches the card. This method is a placeholder that is overloaded by specific dirived classes. The method actively probes the card to make sure the profile class matches the diff --git a/pySim/ts_102_221.py b/pySim/ts_102_221.py index aba28cd..c1c1388 100644 --- a/pySim/ts_102_221.py +++ b/pySim/ts_102_221.py @@ -884,8 +884,8 @@ d = t.to_dict() return flatten_dict_lists(d['fcp_template']) - @staticmethod - def match_with_card(scc: SimCardCommands) -> bool: + @classmethod + def match_with_card(cls, scc: SimCardCommands) -> bool: return match_uicc(scc) @with_default_category('TS 102 221 Specific Commands') diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index c6720fe..69c8c79 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -1192,8 +1192,8 @@ ret['life_cycle_status_int'] = 'terminated' return ret - @staticmethod - def match_with_card(scc: SimCardCommands) -> bool: + @classmethod + def match_with_card(cls, scc: SimCardCommands) -> bool: return match_sim(scc) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38174?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ia7c049b31cb1c5c5bb682406d9dd7a73bcd43185 Gerrit-Change-Number: 38174 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org>
1 0
0 0
[M] Change in pysim[master]: pySim.profile: Further refactor card <-> profile matching
by laforge 16 Sep '24

16 Sep '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38175?usp=email ) Change subject: pySim.profile: Further refactor card <-> profile matching ...................................................................... pySim.profile: Further refactor card <-> profile matching The new architecture avoids sim/ruim/uicc specific methods in pySim.profile and instead moves the profile-specific code into the profile; it also solves everything within the class hierarchy, no need for global methods. Change-Id: I3b6c44d2f5cce2513c3ec8a3ce939a242f3e4901 --- M pySim/cdma_ruim.py M pySim/profile.py M pySim/ts_102_221.py M pySim/ts_51_011.py 4 files changed, 55 insertions(+), 56 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/75/38175/1 diff --git a/pySim/cdma_ruim.py b/pySim/cdma_ruim.py index 747a0d2..f5382c9 100644 --- a/pySim/cdma_ruim.py +++ b/pySim/cdma_ruim.py @@ -24,7 +24,6 @@ from osmocom.construct import * from pySim.filesystem import * -from pySim.profile import match_ruim from pySim.profile import CardProfile, CardProfileAddon from pySim.ts_51_011 import CardProfileSIM from pySim.ts_51_011 import DF_TELECOM, DF_GSM @@ -191,8 +190,11 @@ return CardProfileSIM.decode_select_response(data_hex) @classmethod - def match_with_card(cls, scc: SimCardCommands) -> bool: - return match_ruim(scc) + def _try_match_card(cls, scc: SimCardCommands) -> None: + """ Try to access MF/DF.CDMA via 2G APDUs (3GPP TS 11.11), if this works, + the card is considered an R-UIM card for CDMA.""" + cls._mf_select_test(scc, "a0", "0000", ["3f00", "7f25"]) + class AddonRUIM(CardProfileAddon): """An Addon that can be found on on a combined SIM + RUIM or UICC + RUIM to support CDMA.""" diff --git a/pySim/profile.py b/pySim/profile.py index ae9e19f..e1fd11f 100644 --- a/pySim/profile.py +++ b/pySim/profile.py @@ -25,54 +25,11 @@ import operator from typing import List +from pySim.exceptions import SwMatchError from pySim.commands import SimCardCommands from pySim.filesystem import CardApplication, interpret_sw from pySim.utils import all_subclasses -def _mf_select_test(scc: SimCardCommands, - cla_byte: str, sel_ctrl: str, - fids: List[str]) -> bool: - cla_byte_bak = scc.cla_byte - sel_ctrl_bak = scc.sel_ctrl - scc.reset_card() - - scc.cla_byte = cla_byte - scc.sel_ctrl = sel_ctrl - rc = True - try: - for fid in fids: - scc.select_file(fid) - except: - rc = False - - scc.reset_card() - scc.cla_byte = cla_byte_bak - scc.sel_ctrl = sel_ctrl_bak - return rc - - -def match_uicc(scc: SimCardCommands) -> bool: - """ Try to access MF via UICC APDUs (3GPP TS 102.221), if this works, the - card is considered a UICC card. - """ - return _mf_select_test(scc, "00", "0004", ["3f00"]) - - -def match_sim(scc: SimCardCommands) -> bool: - """ Try to access MF via 2G APDUs (3GPP TS 11.11), if this works, the card - is also a simcard. This will be the case for most UICC cards, but there may - also be plain UICC cards without 2G support as well. - """ - return _mf_select_test(scc, "a0", "0000", ["3f00"]) - - -def match_ruim(scc: SimCardCommands) -> bool: - """ Try to access MF/DF.CDMA via 2G APDUs (3GPP TS 11.11), if this works, - the card is considered an R-UIM card for CDMA. - """ - return _mf_select_test(scc, "a0", "0000", ["3f00", "7f25"]) - - class CardProfile: """A Card Profile describes a card, it's filesystem hierarchy, an [initial] list of applications as well as profile-specific SW and shell commands. Every card has @@ -137,14 +94,54 @@ """ return data_hex + @staticmethod + def _mf_select_test(scc: SimCardCommands, + cla_byte: str, sel_ctrl: str, + fids: List[str]) -> bool: + """Helper function used by some derived _try_match_card() methods.""" + scc.reset_card() + + scc.cla_byte = cla_byte + scc.sel_ctrl = sel_ctrl + for fid in fids: + scc.select_file(fid) + + @staticmethod + def _match_helper(scc, fn) -> bool: + sel_backup = scc.sel_ctrl + cla_backup = scc.cla_byte + try: + fn(scc) + return True + except SwMatchError: + return False + finally: + scc.sel_ctrl = sel_backup + scc.cla_byte = cla_backup + scc.reset_card() + @classmethod @abc.abstractmethod - def match_with_card(cls, scc: SimCardCommands) -> bool: - """Check if the specific profile matches the card. This method is a + def _try_match_card(cls, scc: SimCardCommands) -> None: + """Try to see if the specific profile matches the card. This method is a placeholder that is overloaded by specific dirived classes. The method actively probes the card to make sure the profile class matches the physical card. This usually also means that the card is reset during the process, so this method must not be called at random times. It may + only be called on startup. If there is no exception raised, we assume + the card matches the profile. + + Args: + scc: SimCardCommands class + """ + pass + + @classmethod + def match_with_card(cls, scc: SimCardCommands) -> bool: + """Check if the specific profile matches the card. The method + actively probes the card to make sure the profile class matches the + physical card. This usually also means that the card is reset during + the process, so this method must not be called at random times. It may only be called on startup. Args: @@ -152,7 +149,7 @@ Returns: match = True, no match = False """ - return False + return cls._match_helper(scc, cls._try_match_card) @staticmethod def pick(scc: SimCardCommands): diff --git a/pySim/ts_102_221.py b/pySim/ts_102_221.py index c1c1388..9fed6af 100644 --- a/pySim/ts_102_221.py +++ b/pySim/ts_102_221.py @@ -27,7 +27,6 @@ from pySim.utils import * from pySim.filesystem import * from pySim.profile import CardProfile -from pySim.profile import match_uicc from pySim import iso7816_4 # A UICC will usually also support 2G functionality. If this is the case, we @@ -885,8 +884,10 @@ return flatten_dict_lists(d['fcp_template']) @classmethod - def match_with_card(cls, scc: SimCardCommands) -> bool: - return match_uicc(scc) + def _try_match_card(cls, scc: SimCardCommands) -> None: + """ Try to access MF via UICC APDUs (3GPP TS 102.221), if this works, the + card is considered a UICC card.""" + cls._mf_select_test(scc, "00", "0004", ["3f00"]) @with_default_category('TS 102 221 Specific Commands') class AddlShellCommands(CommandSet): diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index 69c8c79..8cbca58 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -41,7 +41,6 @@ from pySim.utils import dec_iccid, enc_iccid, dec_imsi, enc_imsi, dec_plmn, enc_plmn, dec_xplmn_w_act from pySim.utils import dec_msisdn, enc_msisdn -from pySim.profile import match_sim from pySim.profile import CardProfile, CardProfileAddon from pySim.filesystem import * from pySim.ts_31_102_telecom import DF_PHONEBOOK, DF_MULTIMEDIA, DF_MCS, DF_V2X @@ -1193,8 +1192,8 @@ return ret @classmethod - def match_with_card(cls, scc: SimCardCommands) -> bool: - return match_sim(scc) + def _try_match_card(cls, scc: SimCardCommands) -> None: + cls._mf_select_test(scc, "a0", "0000", ["3f00"]) class AddonSIM(CardProfileAddon): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38175?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I3b6c44d2f5cce2513c3ec8a3ce939a242f3e4901 Gerrit-Change-Number: 38175 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org>
1 0
0 0
[XS] Change in pysim[master]: pySim-prog: fix sourcecode formatting
by dexter 16 Sep '24

16 Sep '24
dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/38161?usp=email ) Change subject: pySim-prog: fix sourcecode formatting ...................................................................... pySim-prog: fix sourcecode formatting Change-Id: Ie4d4ec6d1752013fa8aa39912aa600c2b4afac74 --- M pySim-prog.py 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim-prog.py b/pySim-prog.py index b15a2dc..8d330cb 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -204,8 +204,7 @@ parser.error("CSV mode requires a CSV input file") elif options.source == 'cmdline': if ((options.imsi is None) or (options.iccid is None)) and (options.num is None): - parser.error( - "If either IMSI or ICCID isn't specified, num is required") + parser.error("If either IMSI or ICCID isn't specified, num is required") else: parser.error("Only `cmdline' and `csv' sources supported") -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38161?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: Ie4d4ec6d1752013fa8aa39912aa600c2b4afac74 Gerrit-Change-Number: 38161 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[XS] Change in pysim[master]: pySim-prog: fix sourcecode formatting
by dexter 16 Sep '24

16 Sep '24
dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/38160?usp=email ) Change subject: pySim-prog: fix sourcecode formatting ...................................................................... pySim-prog: fix sourcecode formatting Change-Id: I0e567a1a681891f33f170c5df50c691b20b6a978 --- M pySim-prog.py 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim-prog.py b/pySim-prog.py index 6d1deb1..b15a2dc 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -725,6 +725,7 @@ card.reset() cp = None + # Generate parameters if opts.source == 'cmdline': cp = gen_parameters(opts) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38160?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: I0e567a1a681891f33f170c5df50c691b20b6a978 Gerrit-Change-Number: 38160 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[XS] Change in libosmo-abis[master]: trau2rtp FR & EFR: fix uninitialized memory bug
by laforge 16 Sep '24

16 Sep '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38138?usp=email ) Change subject: trau2rtp FR & EFR: fix uninitialized memory bug ...................................................................... trau2rtp FR & EFR: fix uninitialized memory bug The implementation of osmo_trau2rtp() for FR and EFR speech frames had this bug: when moving individual bits from TRAU to RTP payload representation, the code would only set bits in the output buffer, but never clear them. The result is correct output only when the RTP payload buffer has been zeroed prior to calling the function, garbage otherwise. OsmoMGW was not affected by this bug because it calls osmo_trau2rtp() with the output buffer pointed to a freshly allocated msgb, and msgb allocation in libosmocore memsets buffer memory to zeros. However, a sane API should not depend on previous content of output buffer memory, hence the function implementation in libosmotrau was still in the wrong. Change-Id: I6e6693e096b920a973c8cc627e94884099d004b5 --- M src/trau/trau_rtp_conv.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c index 06979c6..1a200c7 100644 --- a/src/trau/trau_rtp_conv.c +++ b/src/trau/trau_rtp_conv.c @@ -133,6 +133,7 @@ return 0; out[0] = 0xd << 4; + memset(out + 1, 0, GSM_FR_BYTES - 1); /* reassemble d-bits */ i = 0; /* counts bits */ j = 4; /* counts output bits */ @@ -391,6 +392,7 @@ return 0; out[0] = 0xc << 4; + memset(out + 1, 0, GSM_EFR_BYTES - 1); /* reassemble d-bits */ for (i = 1, j = 4; i < 39; i++, j++) out[j/8] |= (tf->d_bits[i] << (7-(j%8))); -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38138?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I6e6693e096b920a973c8cc627e94884099d004b5 Gerrit-Change-Number: 38138 Gerrit-PatchSet: 1 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-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • ...
  • 199
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.