Lines Matching refs:kbuf
36 char *kbuf;
43 kbuf = kmalloc(count + 1, GFP_KERNEL | __GFP_NOWARN);
44 if (!kbuf)
47 ret = simple_write_to_buffer(kbuf, count + 1, ppos, buf, count);
49 kfree(kbuf);
52 kbuf[ret] = '\0';
54 return kbuf;
61 char kbuf[128];
65 ret = scnprintf(kbuf, ARRAY_SIZE(kbuf), "%lu %lu %lu %lu %lu\n",
71 return simple_read_from_buffer(buf, count, ppos, kbuf, ret);
79 char *kbuf;
82 kbuf = user_input_str(buf, count, ppos);
83 if (IS_ERR(kbuf))
84 return PTR_ERR(kbuf);
86 if (sscanf(kbuf, "%lu %lu %lu %lu %lu",
107 kfree(kbuf);
174 char *kbuf;
177 kbuf = kmalloc(count, GFP_KERNEL | __GFP_NOWARN);
178 if (!kbuf)
182 len = sprint_schemes(ctx, kbuf, count);
186 len = simple_read_from_buffer(buf, count, ppos, kbuf, len);
189 kfree(kbuf);
298 char *kbuf;
302 kbuf = user_input_str(buf, count, ppos);
303 if (IS_ERR(kbuf))
304 return PTR_ERR(kbuf);
306 schemes = str_to_schemes(kbuf, count, &nr_schemes);
326 kfree(kbuf);
492 char *kbuf;
497 kbuf = user_input_str(buf, count, ppos);
498 if (IS_ERR(kbuf))
499 return PTR_ERR(kbuf);
501 if (!strncmp(kbuf, "paddr\n", count)) {
507 target_pids = str_to_pids(kbuf, count, &nr_targets);
545 kfree(kbuf);
575 char *kbuf;
578 kbuf = kmalloc(count, GFP_KERNEL | __GFP_NOWARN);
579 if (!kbuf)
589 len = sprint_init_regions(ctx, kbuf, count);
593 len = simple_read_from_buffer(buf, count, ppos, kbuf, len);
596 kfree(kbuf);
670 char *kbuf;
674 kbuf = user_input_str(buf, count, ppos);
675 if (IS_ERR(kbuf))
676 return PTR_ERR(kbuf);
684 err = set_init_regions(ctx, kbuf, ret);
690 kfree(kbuf);
698 char *kbuf;
701 kbuf = kmalloc(count, GFP_KERNEL | __GFP_NOWARN);
702 if (!kbuf)
707 len = scnprintf(kbuf, count, "%d\n", ctx->kdamond->pid);
709 len = scnprintf(kbuf, count, "none\n");
713 len = simple_read_from_buffer(buf, count, ppos, kbuf, len);
716 kfree(kbuf);
862 char *kbuf;
866 kbuf = user_input_str(buf, count, ppos);
867 if (IS_ERR(kbuf))
868 return PTR_ERR(kbuf);
871 kfree(kbuf);
876 if (sscanf(kbuf, "%s", ctx_name) != 1) {
888 kfree(kbuf);
968 char *kbuf;
972 kbuf = user_input_str(buf, count, ppos);
973 if (IS_ERR(kbuf))
974 return PTR_ERR(kbuf);
977 kfree(kbuf);
982 if (sscanf(kbuf, "%s", ctx_name) != 1) {
994 kfree(kbuf);
1015 char *kbuf;
1017 kbuf = user_input_str(buf, count, ppos);
1018 if (IS_ERR(kbuf))
1019 return PTR_ERR(kbuf);
1022 if (sscanf(kbuf, "%s", kbuf) != 1) {
1023 kfree(kbuf);
1028 if (!strncmp(kbuf, "on", count)) {
1033 kfree(kbuf);
1039 } else if (!strncmp(kbuf, "off", count)) {
1048 kfree(kbuf);