Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to mask the serial number exposed in /proc/cpuinfo

Featured Replies

I have serious issues with the serial number being exposed in /proc/cpuinfo.

Especially when browsers have access to this information.

 

Afaik, its u-boot who passed this information on to Linux.

Any idea how to mask this from Linux?

 

Your help is appreciated

  • Author

Well I tried the following, but it did "not" work unfortunately :blink:

 

apt install device-tree-compiler

 

then converted the nanopi-r6c device tree from dtb to dts

 

dtc -I dtb -O dts -o rk3588s-nanopi-r6c.dtb rk3588s-nanopi-r6c.dts

 

Inserted a  serial-number
 

/dts-v1/;

/ {
    compatible = "friendlyelec,nanopi-r6c\0rockchip,rk3588";
    interrupt-parent = <0x01>;
    #address-cells = <0x02>;
    #size-cells = <0x02>;
    model = "FriendlyElec NanoPi R6C";
    serial-number = "0000000000000000"

 

then converted the nanopi-r6c device tree from dts to dtb

 

dtc -I dts -O dtb -o rk3588s-nanopi-r6c.dts rk3588s-nanopi-r6c.dtb

 

renamed the original .bak and copied the new file into /boot/dtb:
 

sudo mv /boot/dtb/rockchip/rk3588s-nanopi-r6c.dtb /boot/dtb/rockchip/rk3588s-nanopi-r6c.dtb.bak
sudo cp rk3588s-nanopi-r6c.dtb /boot/dtb/rockchip/rk3588s-nanopi-r6c.dtb

 

/proc/cpuinfo and /sys/firmware/devicetree/base/serial-number still show the original serial. Maybe someone smarter can pick this up :P

 

 

 

 

Edited by Dantes

  • Author

found serial in:
 

/proc/cpuinfo
/proc/device-tree/serial-number
/sys/firmware/devicetree/base/serial-number

 

https://community.toradex.com/t/cpu-serial-in-proc-cpuinfo-on-imx7/6390
 

The serial number available in cpuinfo is set by U-Boot from the data available in config block.

 

https://elixir.free-electrons.com/linux/v6.4-rc7/source/arch/arm/kernel/setup.c

 

function that passes serial number to kernel

 

some more info i could find:

https://forums.raspberrypi.com/viewtopic.php?t=183474

 

  • Author

Booted into u-boot via the usb-c console. I have some issues with the serial setup running minicom/screen.

Used the basic settings: 1500000 8N1 and disabled hard/soft flow. But when I dump out with 'printenv' half of the settings appear.

 

Back to the topic. I tried to overwrite the serial to see if it could be done, but no :(

 

setenv serial# 0000000000000000

 

I got an error that read-only variables could not be overwritten.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.