Project

General

Profile

Actions

Bug #6853

closed

built in fonts are exposing internal data

Added by Toomas Soome over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2016-04-02
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

kernel built in fonts (used by tem/vgatxt etc) are exposing internal data arrays as global symbols, and worse, using same name, making tracking really painful.
it is quite enough to make only bitmap_data_t structure global, and use font specific names for internal arrays, sample mdb:

root@test:~# mdb -k
Loading modules: [ unix genunix specfs dtrace mac cpu.generic uppc apix scsi_vhci zfs mpt sd ip hook neti sockfs arp usba uhci mm stmf stmf_sbd lofs random idm crypto sppp ipc ptm ]
> font_data_12x22::print
{
    width = 0xc
    height = 0x16
    image = FONTDATA_12x22
    encoding = ENCODINGS_12x22
}
> font_data_8x16::print
{
    width = 0x8
    height = 0x10
    image = FONTDATA_8x16
    encoding = ENCODINGS_8x16
}
> FONTDATA_8x16::print
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x7e, 0x81, 0xa5, 0x81, 
0x81, 0xbd, 0x99, 0x81, 0x7e, 0, 0, 0, 0, 0, ... ]
Actions #1

Updated by Marcel Telka over 6 years ago

  • Description updated (diff)
Actions #2

Updated by Electric Monk over 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit d1e631af56641f21cde1f1efe3a9623ff9d6ee7c

commit  d1e631af56641f21cde1f1efe3a9623ff9d6ee7c
Author: Toomas Soome <tsoome@me.com>
Date:   2016-04-04T21:19:36.000Z

    6853 built in fonts are exposing internal data
    Reviewed by: Marcel Telka <marcel@telka.sk>
    Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Actions

Also available in: Atom PDF