Most people understand that securing the IoT is important, but security is a highly a complex subject, and as seen with the many security breaches, even specialists – who in theory should now better – get their devices or online accounts hacked. So even if you are not a security expert, but are involved in the development of embedded systems, it’s important to get acquainted with online and offline security and understand how all this all work, at least from a high level perspective, without necessarily having to dig into the technical details. ARM is organizing two webinars catering to people who are not security experts, and explaining how they can secure embedded systems using the company’s TrustZone technology. The first webinar entitled “How to build trust and security into your embedded device” will allow participant to gain an understanding of the security that will need to be applied in […]
Imagination Solution to FCC Rules for WiFi Routers: Run OpenWrt / DD-WRT and the WiFi Driver in Separate Virtual Machines
About a year ago, discussions started about new rules from the FCC that could prevent routers from installing open source third party operating systems such as OpenWrt or DDWRT. Despite the FCC assurance that the rules were meant to prevent some users from illegally tweaking the RF settings, and that it would not have to impact installing of open source alternatives, the reality is that companies such as TP-Link ended up locking their routers up due to the new rules, while Linksys would only ensure OpenWrt/ DD-WRT compatibility on some of their routers, but not all. Companies are probably doing that due to the extra work that would be required to separate the RF settings which need to be locked, and the rest of the firmware. But Imagination Technology’s prpl security group has a solution for their MIPS Warrior P-Class processors using hardware virtualization. In order to show the concept […]
Embedded Linux Conference 2016 and OpenIoT Summit 2016 Schedule
The Embedded Linux Conference 2016 and the OpenIoT summit 2016 will take place on April 4 – 6, 2016 in San Diego, California, and over 800 attended will meet including kernel & system developers, userspace developers, and product vendors. The Linux Foundation has recently published the schedule, so I’ve had a look at some of the talks, and designed my own virtual schedule to find out more the current development focus although I won’t attend. Monday April 4 10:40am – 11:30am – Linux Connectivity for IoT by Marcel Holtmann, Intel OTC There are many connectivity solutions that available for IoT. For example Bluetooth Low Energy, 802.15.4, Zigbee, OIC, Thread and others. This presentation will provide and overview of the existing technology and upcoming standard and how they tie into the Linux kernel and its ecosystem. 11:40 – 12:30 – BoF: kernelci.org: A Million Kernel Boots and Counting by Kevin Hilman, […]
GNU Complexity Command Line Tool Measures Complexity of C Code
GNU complexity is a command line tool that computes a complexity measure of C source code, similar to pmccabe, but with a different method of calculating results with short functions scoring lower than pmccabe and highly nested functionality can score considerably higher. It can be useful to locate suspicious areas in unfamiliar code, get an idea of the efforts required to either understand the code or test it, or self-assess your own code. Bruce Korb, the maintainer, has just released version 1.5 with some bug fixes, so I’ve given it a quick try. We’ll need to get the code, build and install it first:
1 2 3 4 5 6 |
wget ftp://ftp.gnu.org/gnu/complexity/complexity-1.5.tar.gz tar xvf complexity-1.5.tar.gz cd complexity-1.5 ./configure make -j8 sudo make install |
The user’s manual provides some insights and an example, which I’ve used against a directory in Linux source code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
cd ~/edev/linux/arch/arm64/kernel complexity --histogram --score --thresh=3 `ls *.c` procedure fpsimd_pm_init in fpsimd.c ended before final close bracket procedure fpsimd_hotplug_init in fpsimd.c ended before final close bracket Complexity Scores Score | ln-ct | nc-lns| file-name(line): proc-name 3 28 17 perf_callchain.c(111): perf_callchain_user 3 20 18 insn.c(337): aarch64_insn_decode_immediate 3 21 19 io.c(27): __memcpy_fromio 3 21 19 io.c(56): __memcpy_toio 3 30 19 cpufeature.c(860): verify_local_cpu_capabilities 3 21 20 module.c(74): reloc_data 3 24 20 setup.c(199): request_standard_resources 3 27 20 alternative.c(89): __apply_alternatives 3 29 20 cpu_ops.c(53): cpu_read_enable_method 3 29 24 insn.c(362): aarch64_insn_encode_immediate 3 31 24 ptrace.c(76): ptrace_hbptriggered 3 54 24 kgdb.c(159): kgdb_arch_handle_exception 3 28 25 armv8_deprecated.c(145): update_insn_emulation_mode 3 32 25 debug-monitors.c(334): aarch32_break_handler 3 35 26 smp.c(413): acpi_map_gic_cpu_interface 3 42 26 process.c(249): copy_thread 3 58 27 perf_event.c(572): armv8pmu_handle_irq 3 32 28 hw_breakpoint.c(544): toggle_bp_registers 3 34 28 insn.c(1019): aarch64_insn_gen_data3 3 34 29 insn.c(519): aarch64_insn_gen_comp_branch_imm 3 56 29 setup.c(121): smp_build_mpidr_hash 3 35 30 insn.c(397): aarch64_insn_encode_register 3 42 31 signal.c(167): setup_sigframe 3 37 33 hw_breakpoint.c(349): arch_bp_generic_fields 3 49 34 setup.c(232): relocate_initrd 3 41 35 insn.c(708): aarch64_insn_gen_add_sub_imm 3 63 38 setup.c(292): setup_arch 3 109 57 cpufeature.c(469): update_cpu_features 4 46 26 smp.c(477): of_parse_and_init_cpus 4 38 31 traps.c(335): call_undef_hook 4 36 32 insn.c(924): aarch64_insn_gen_data1 4 49 33 armv8_deprecated.c(464): cp15barrier_handler 4 71 34 stacktrace.c(41): unwind_frame 4 42 35 ptrace.c(437): hw_break_set 4 42 37 insn.c(968): aarch64_insn_gen_data2 4 49 37 smp.c(708): handle_IPI 4 58 37 hw_breakpoint.c(231): hw_breakpoint_control 4 47 40 insn.c(757): aarch64_insn_gen_bitfield 4 54 44 ptrace.c(376): hw_break_get 4 60 44 armv8_deprecated.c(378): swp_handler 5 28 27 hw_breakpoint.c(198): hw_breakpoint_slot_setup 5 45 35 ptrace.c(672): compat_gpr_get 5 50 36 hw_breakpoint.c(764): reinstall_suspended_bps 5 59 37 hw_breakpoint.c(476): arch_validate_hwbkpt_settings 5 48 42 insn.c(811): aarch64_insn_gen_movewide 5 49 42 insn.c(868): aarch64_insn_gen_add_sub_shifted_reg 5 60 44 psci.c(36): cpu_psci_cpu_init_idle 5 49 46 insn.c(277): aarch64_get_imm_shift_mask 5 95 89 asm-offsets.c(34): main 6 34 32 cpufeature.c(792): __raw_read_system_reg 6 67 37 signal.c(332): do_signal 6 43 39 topology.c(50): parse_core 6 54 41 ptrace.c(724): compat_gpr_set 6 74 44 traps.c(147): dump_backtrace 6 55 49 insn.c(646): aarch64_insn_gen_load_store_pair 6 76 49 hw_breakpoint.c(393): arch_build_bp_info 6 71 52 hw_breakpoint.c(584): breakpoint_handler 6 61 54 insn.c(1062): aarch64_insn_gen_logical_shifted_reg 6 73 59 ptrace.c(1120): compat_arch_ptrace 8 50 30 cpuinfo.c(102): c_show 8 64 50 topology.c(97): parse_cluster 8 97 65 hw_breakpoint.c(660): watchpoint_handler 9 44 32 traps.c(59): dump_mem 11 71 55 signal32.c(129): copy_siginfo_to_user32 31 198 172 module.c(184): apply_relocate_add Complexity Histogram Score-Range Lin-Ct 0-9 2206 ************************************************************ 10-19 55 * 20-29 0 30-39 172 ***** Scored procedure ct: 65 Non-comment line ct: 2433 Average line score: 7 25%-ile score: 3 (75% in higher score procs) 50%-ile score: 5 (half in higher score procs) 75%-ile score: 6 (25% in higher score procs) Highest score: 31 (apply_relocate_add() in module.c) |
The resulting table shows six information per line: the computed score, the number of lines between the opening and closing curly braces (ln-ct), the number […]
Linaro Connect 2016 Bangkok Schedule – March 7-11, 2016
Linaro Connect Bangkok (BKK16) will take place on March 7 – 11, 2016, and the schedule is now available for the 5-day event with keynotes and sessions. Whether you’re going to attend or not, it’s always interesting to check the schedule to find out what’s going on in terms of ARM Linux development. The five days will focus on work by different Linaro groups, but really sessions are mixed for any given day, and I’ve created a virtual schedule for each day with available information, as Linaro has become a little more closed to the outside than when it was launched a few years ago. Monday 7 – LITE (Linaro IoT & Embedded Group) 1400 – 14:50 – Evolution of the Reference Software Platform Project The Reference Software Platform lead project was introduced in Linaro Connect San Francisco 2015, and since then it evolved and matured with the completion of […]
Embedded Systems Conference 2016 Schedule – April 13-14
The Embedded Systems Conference 2016 will take place in Boston on April 13-14, and the organizers have now released the schedule, minus some keynotes, which features four main tracks: Embedded Hardware, Embedded Software, Connected Devices and the Internet of Things (IoT), and the ESC Engineering Theatre. As usual, I’ve gone through the list of talks and composed my own little virtual schedule which ended up with sessions focusing on power management, IoT, and security, as well some optimization and drivers development talks among others, such as patents, and the origin of Gerber files. Wednesday 13 8:00 – 9:00 – Power Management in Embedded Systems by Colin Walls, Embedded Software Technologist, Mentor Graphics The importance of power management in today’s embedded designs has been steadily growing as an increasing number of battery powered devices are developed. In this session, we will discuss design considerations that should be made when starting a […]
OpenAMP Open Source Framework Provides the Glue between Linux, RTOS, and Bare Metal Apps in Heterogeneous SoCs
SoCs becoming more complex, and go beyond homogeneous multicore systems by mixing different type of cores such as high performance cores, low power real-time cores, or even FPGA fabric. Examples include NXP i.MX6 SoloX with an ARM Cortex A9 core for Linux apps, and an ARM Cortex M4 core for real-time tasks, or Xilinx Zynq UltraScale+ MPSoC with Cortex A53 core for higher level apps, Cortex R5 cores for real-time processing, and Ultrascale FPGA logic. All these different cores are running their own Linux based OS, real-time operating system or bare metal application, and all this makes software development an even greater difficult tasks. In order to reduce the complexity, and address some of the issues, the Multicore Association has launched a new working group targeting the management, expansion, and standardization of OpenAMP (Open Asymmetric Multi Processing), an open source framework that allows operating systems to interact within a broad […]
Yocto Project 2.0 “Jethro” Released
The Yocto Project 2.0 was released a few days ago. The framework used to create embedded Linux distributions supports Poky 14 “Jethro” reference distribution by default, but other Linux distributions can also be built with the Yocto Project. Some of the key features and improvements of Yocto Project 2.0 include: Added gcc 5.2 which is now the default compiler (gcc 4.8 and 4.9 are also provided) Updated linux-yocto kernel for qemu* and reference BSPs to version 4.1 Added basic support for Altera Nios II and Adapteva Epiphany Added tune files for Cavium ThunderX, Cavium Octeon, ARM Cortex-A17, Intel Quark X1000, and ARM vfpv3 and vfpv3d16 features Toaster Web UI improvements – Better performance and reliability; simplified setup; user-friendly layout; etc… wic image creation tool version 0.2.0 with bug fixed and new features, such as GPT partition tables, native tools, image compression, etc… Image generation adds support for qcow2, vdi (VirtualBox […]