Skip to content

function ll_init() is not initializing some fields in cfg #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ColinIanKing opened this issue May 12, 2020 · 1 comment
Open

function ll_init() is not initializing some fields in cfg #59

ColinIanKing opened this issue May 12, 2020 · 1 comment

Comments

@ColinIanKing
Copy link
Contributor

In common/os/os_perf.c function ll_init() is declaring cfg on the stack and then assigning conf from some uninitialized fields in cfg namely:

 839        conf->type = cfg.type;
 840        conf->config = (cfg.config) | (cfg.other_attr << 16);
 841        conf->config1 = cfg.extra_value;

Should cfg be memset before calling plat_ll_config?

@ColinIanKing
Copy link
Contributor Author

Same kind of issue in profiling_init too with cfg fields:

 805        for (i = 0; i < PERF_COUNT_NUM; i++) {
 806                plat_profiling_config(i, &cfg);
 807                conf_arr[i].perf_count_id = i;
 808                conf_arr[i].type = cfg.type;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant