Displaying 20 results from an estimated 53 matches for "cmdline_size".
2018 Mar 13
2
[PATCH] drm/nouveau/secboot: remove VLA usage
In preparation to enabling -Wvla, remove VLA. In this particular
case directly use macro NVKM_MSGQUEUE_CMDLINE_SIZE instead of local
variable cmdline_size. Also, remove cmdline_size as it is not
actually useful anymore.
The use of stack Variable Length Arrays needs to be avoided, as they
can be a vector for stack exhaustion, which can be both a runtime bug
or a security flaw. Also, in general, as code evolves i...
2013 Dec 04
0
Boot iPXE from syslinux/isolinux
...ad_linux.c
@@ -124,32 +124,29 @@ static int map_initramfs(struct syslinux_movelist **fraglist,
return 0;
}
-static size_t calc_cmdline_offset(struct linux_header *hdr,
+static size_t calc_cmdline_offset(const struct syslinux_memmap *mmap,
+ const struct linux_header *hdr,
size_t cmdline_size, addr_t base,
addr_t start)
{
- if (hdr->version < 0x0202 || !(hdr->loadflags & 0x01)) {
- struct syslinux_memmap *mmap;
-
- mmap = syslinux_memory_map();
- if (mmap && !syslinux_memmap_highest(mmap, SMT_FREE, &start,
- cmdline_size, 0xa0000, 16)) {
-...
2018 Mar 13
2
[PATCH v2] drm/nouveau/secboot: remove VLA usage
In preparation to enabling -Wvla, remove VLA. In this particular
case directly use macro NVKM_MSGQUEUE_CMDLINE_SIZE instead of local
variable cmdline_size. Also, remove cmdline_size as it is not
actually useful anymore.
The use of stack Variable Length Arrays needs to be avoided, as they
can be a vector for stack exhaustion, which can be both a runtime bug
or a security flaw. Also, in general, as code evolves i...
2013 Dec 04
2
Boot iPXE from syslinux/isolinux
"H. Peter Anvin" <hpa at zytor.com> on Tue, 2013/12/03 20:26:
> On 10/24/2013 01:09 AM, Christian Hesse wrote:
> >>>
> >>> version 6.02-pre5 works, 6.02-pre6 does not.
> >>
> >> Struggled with git bisect, but finally succeeded:
> >>
> >> 8f470e7bfe75f6401f6c5432988c620b863ad274 is the first bad commit
> >>
2018 Mar 13
0
[PATCH] drm/nouveau/secboot: remove VLA usage
Hi David,
On 03/13/2018 11:10 AM, David Laight wrote:
> From: Gustavo A. R. Silva
>> Sent: 13 March 2018 14:48
>> In preparation to enabling -Wvla, remove VLA. In this particular
>> case directly use macro NVKM_MSGQUEUE_CMDLINE_SIZE instead of local
>> variable cmdline_size. Also, remove cmdline_size as it is not
>> actually useful anymore.
> ...
>> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode_msgqueue.c
>> b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode_msgqueue.c
>>...
2018 Mar 13
0
[PATCH] drm/nouveau/secboot: remove VLA usage
From: Gustavo A. R. Silva
> Sent: 13 March 2018 14:48
> In preparation to enabling -Wvla, remove VLA. In this particular
> case directly use macro NVKM_MSGQUEUE_CMDLINE_SIZE instead of local
> variable cmdline_size. Also, remove cmdline_size as it is not
> actually useful anymore.
...
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode_msgqueue.c
> b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode_msgqueue.c
> index 6f10b09..2da147b...
2018 Mar 16
2
[PATCH v2] drm/nouveau/secboot: remove VLA usage
On 14 March 2018 at 21:08, Thierry Reding <thierry.reding at gmail.com> wrote:
> On Tue, Mar 13, 2018 at 11:24:11AM -0500, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wvla, remove VLA. In this particular
>> case directly use macro NVKM_MSGQUEUE_CMDLINE_SIZE instead of local
>> variable cmdline_size. Also, remove cmdline_size as it is not
>> actually useful anymore.
>>
>> The use of stack Variable Length Arrays needs to be avoided, as they
>> can be a vector for stack exhaustion, which can be both a runtime bug
>> or...
2018 May 23
2
[PATCH v2] drm/nouveau/secboot: remove VLA usage
...4 March 2018 at 21:08, Thierry Reding <thierry.reding at gmail.com> wrote:
>>> On Tue, Mar 13, 2018 at 11:24:11AM -0500, Gustavo A. R. Silva wrote:
>>>> In preparation to enabling -Wvla, remove VLA. In this particular
>>>> case directly use macro NVKM_MSGQUEUE_CMDLINE_SIZE instead of local
>>>> variable cmdline_size. Also, remove cmdline_size as it is not
>>>> actually useful anymore.
>>>>
>>>> The use of stack Variable Length Arrays needs to be avoided, as they
>>>> can be a vector for stack exhaustion, whi...
2013 Jul 29
1
[syslinux:firmware] load_linux: dynamically calculate the cmdline region
On 07/29/2013 06:28 AM, Matt Fleming wrote:
> On Fri, 26 Jul, at 09:49:28AM, H. Peter Anvin wrote:
>> Hmm... this might constrain the heap excessively if the SMT_TERMINAL
>> cutoff is at the wrong place (because there will be just enough SMT_FREE
>> to fit.) I'm wondering if we shouldn't use the highest of these two
>> regions.
>
> Could you give an
2013 Jul 26
3
[syslinux:firmware] load_linux: dynamically calculate the cmdline region
...851d467..37c8df0 100644
> --- a/com32/lib/syslinux/load_linux.c
> +++ b/com32/lib/syslinux/load_linux.c
> @@ -125,10 +125,29 @@ static int map_initramfs(struct syslinux_movelist **fraglist,
> }
>
> static size_t calc_cmdline_offset(struct linux_header *hdr,
> - size_t cmdline_size)
> + size_t cmdline_size, addr_t base,
> + addr_t start)
> {
> - if (hdr->version < 0x0202 || !(hdr->loadflags & 0x01))
> + if (hdr->version < 0x0202 || !(hdr->loadflags & 0x01)) {
> + struct syslinux_memmap *mmap;
> +
> + mmap = sy...
2018 Mar 14
0
[PATCH v2] drm/nouveau/secboot: remove VLA usage
On Tue, Mar 13, 2018 at 11:24:11AM -0500, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wvla, remove VLA. In this particular
> case directly use macro NVKM_MSGQUEUE_CMDLINE_SIZE instead of local
> variable cmdline_size. Also, remove cmdline_size as it is not
> actually useful anymore.
>
> The use of stack Variable Length Arrays needs to be avoided, as they
> can be a vector for stack exhaustion, which can be both a runtime bug
> or a security flaw. Also,...
2018 Apr 26
0
[PATCH v2] drm/nouveau/secboot: remove VLA usage
...e:
> On 14 March 2018 at 21:08, Thierry Reding <thierry.reding at gmail.com> wrote:
>> On Tue, Mar 13, 2018 at 11:24:11AM -0500, Gustavo A. R. Silva wrote:
>>> In preparation to enabling -Wvla, remove VLA. In this particular
>>> case directly use macro NVKM_MSGQUEUE_CMDLINE_SIZE instead of local
>>> variable cmdline_size. Also, remove cmdline_size as it is not
>>> actually useful anymore.
>>>
>>> The use of stack Variable Length Arrays needs to be avoided, as they
>>> can be a vector for stack exhaustion, which can be both a run...
2018 May 24
0
[PATCH v2] drm/nouveau/secboot: remove VLA usage
...at 21:08, Thierry Reding <thierry.reding at gmail.com> wrote:
>>>> On Tue, Mar 13, 2018 at 11:24:11AM -0500, Gustavo A. R. Silva wrote:
>>>>> In preparation to enabling -Wvla, remove VLA. In this particular
>>>>> case directly use macro NVKM_MSGQUEUE_CMDLINE_SIZE instead of local
>>>>> variable cmdline_size. Also, remove cmdline_size as it is not
>>>>> actually useful anymore.
>>>>>
>>>>> The use of stack Variable Length Arrays needs to be avoided, as they
>>>>> can be a vector for s...
2017 Mar 05
0
[PATCH] Fix recognition of keeppxe option
...har *cmdline, const char *argument)
> {
> @@ -166,6 +169,7 @@ int bios_boot_linux(void *kernel_buf, si
> struct syslinux_memmap *amap = NULL;
> uint32_t memlimit = 0;
> uint16_t video_mode = 0;
> + uint8_t bootflags = 0;
> const char *arg;
>
> cmdline_size = strlen(cmdline) + 1;
> @@ -200,6 +204,14 @@ int bios_boot_linux(void *kernel_buf, si
> }
> }
>
> + if (syslinux_filesystem() == SYSLINUX_FS_PXELINUX &&
> + find_argument(cmdline, "keeppxe")) {
> + extern __weak char KeepPXE;
>...
2016 Jun 10
4
[PATCH] Fix recognition of keeppxe option
.../
static const char *find_argument(const char *cmdline, const char *argument)
{
@@ -166,6 +169,7 @@ int bios_boot_linux(void *kernel_buf, si
struct syslinux_memmap *amap = NULL;
uint32_t memlimit = 0;
uint16_t video_mode = 0;
+ uint8_t bootflags = 0;
const char *arg;
cmdline_size = strlen(cmdline) + 1;
@@ -200,6 +204,14 @@ int bios_boot_linux(void *kernel_buf, si
}
}
+ if (syslinux_filesystem() == SYSLINUX_FS_PXELINUX &&
+ find_argument(cmdline, "keeppxe")) {
+ extern __weak char KeepPXE;
+
+ KeepPXE = 1; /* for pxelinux_scan_memory */...
2010 May 19
3
[PATCH] com32/lib/syslinux/load_linux.c: cmdline truncated
...< 0x0202)
hdr.cmdline_max_len = 256;
+ else if (hdr.version < 0x0206)
+ /* if (!(hdr.loadflags & 0x01))
+ * hdr.cmdline_max_len = 2048; // protocol limit
+ * else
+ * hdr.cmdline_max_len = 2048; // current kernel buffer size
+ */
+ hdr.cmdline_max_len = 2048;
if (cmdline_size > hdr.cmdline_max_len) {
cmdline_size = hdr.cmdline_max_len;
2013 Aug 09
4
[PATCH v2 0/4] Experimental User-Mode Linux backend.
v1 was here:
https://www.redhat.com/archives/libguestfs/2013-August/msg00005.html
This now works, to some extent. The main problem now is that devices
are named /dev/ubd[a-] which of course confuses everything. I'm
thinking it may be easier to add a udev rule to rename them.
Rich.
2013 Aug 09
5
[PATCH 0/4] Not quite working User-Mode Linux backend.
This is a User-Mode Linux backend for libguestfs. You can select it
by doing:
export LIBGUESTFS_BACKEND=uml
export LIBGUESTFS_QEMU=/path/to/vmlinux
Note we're reusing the 'qemu' variable in the handle for convenience.
QEmu is not involved when using the UML backend.
This almost works. UML itself crashes when the daemon tries to
connect to the serial port. I suspect it's
2007 Jun 15
1
[PATCH RFC] add domain builder support for bzImage kernels
...e_size;
+ uint32_t code32_start;
+ uint32_t ramdisk_image;
+ uint32_t ramdisk_size;
+ uint32_t bootsect_kludge;
+ uint16_t heap_end_ptr;
+ uint16_t _pad1;
+ uint32_t cmd_line_ptr;
+ uint32_t initrd_addr_max;
+ uint32_t kernel_alignment;
+ uint8_t relocatable_kernel;
+ uint8_t _pad2[3];
+ uint32_t cmdline_size;
+ uint32_t hardware_subarch;
+ uint64_t hardware_subarch_data;
+} __attribute__((packed));
+
+/* The so-called "zeropage" */
+struct boot_params {
+ uint8_t _pad0[0x1f1]; /* skip uninteresting stuff */
+ struct setup_header hdr;/* setup header */ /* 0x1f1 */
+ uint8_t _pad7[0x1000-0x1f...
2007 Jun 15
1
[PATCH RFC] add domain builder support for bzImage kernels
...e_size;
+ uint32_t code32_start;
+ uint32_t ramdisk_image;
+ uint32_t ramdisk_size;
+ uint32_t bootsect_kludge;
+ uint16_t heap_end_ptr;
+ uint16_t _pad1;
+ uint32_t cmd_line_ptr;
+ uint32_t initrd_addr_max;
+ uint32_t kernel_alignment;
+ uint8_t relocatable_kernel;
+ uint8_t _pad2[3];
+ uint32_t cmdline_size;
+ uint32_t hardware_subarch;
+ uint64_t hardware_subarch_data;
+} __attribute__((packed));
+
+/* The so-called "zeropage" */
+struct boot_params {
+ uint8_t _pad0[0x1f1]; /* skip uninteresting stuff */
+ struct setup_header hdr;/* setup header */ /* 0x1f1 */
+ uint8_t _pad7[0x1000-0x1f...