351 }
352
353 void
354 s10_copy_procdata(proc_t *child, proc_t *parent)
355 {
356 brand_solaris_copy_procdata(child, parent, &s10_brand);
357 }
358
359 void
360 s10_proc_exit(struct proc *p)
361 {
362 brand_solaris_proc_exit(p, &s10_brand);
363 }
364
365 void
366 s10_exec()
367 {
368 brand_solaris_exec(&s10_brand);
369 }
370
371 void
372 s10_initlwp(klwp_t *l, void *bd)
373 {
374 brand_solaris_initlwp(l, &s10_brand);
375 }
376
377 void
378 s10_forklwp(klwp_t *p, klwp_t *c)
379 {
380 brand_solaris_forklwp(p, c, &s10_brand);
381
382 #ifdef __amd64
383 /*
384 * Only correct the child's %fs register if the parent's %fs register
385 * is LWPFS_SEL. If the parent's %fs register is zero, then the Solaris
386 * 10 environment that we're emulating uses a version of libc that
387 * works when %fs is zero (i.e., it contains backports of CRs 6467491
388 * and 6501650).
389 */
390 if (p->lwp_pcb.pcb_fs == LWPFS_SEL)
393 }
394
395 void
396 s10_freelwp(klwp_t *l)
397 {
398 brand_solaris_freelwp(l, &s10_brand);
399 }
400
401 void
402 s10_lwpexit(klwp_t *l)
403 {
404 brand_solaris_lwpexit(l, &s10_brand);
405 }
406
407 void
408 s10_free_brand_data(zone_t *zone)
409 {
410 kmem_free(zone->zone_brand_data, sizeof (s10_zone_data_t));
411 }
412
413 void
414 s10_init_brand_data(zone_t *zone, kmutex_t *zsl)
415 {
416 ASSERT(zone->zone_brand == &s10_brand);
417 ASSERT(zone->zone_brand_data == NULL);
418 zone->zone_brand_data = kmem_zalloc(sizeof (s10_zone_data_t), KM_SLEEP);
419 }
420
421 int
422 s10_elfexec(vnode_t *vp, execa_t *uap, uarg_t *args, intpdata_t *idatap,
423 int level, long *execsz, int setid, caddr_t exec_file, cred_t *cred,
424 int *brand_action)
425 {
426 return (brand_solaris_elfexec(vp, uap, args, idatap, level, execsz,
427 setid, exec_file, cred, brand_action, &s10_brand, S10_BRANDNAME,
428 S10_LIB, S10_LIB32));
429 }
430
431 void
432 s10_sigset_native_to_s10(sigset_t *set)
|
351 }
352
353 void
354 s10_copy_procdata(proc_t *child, proc_t *parent)
355 {
356 brand_solaris_copy_procdata(child, parent, &s10_brand);
357 }
358
359 void
360 s10_proc_exit(struct proc *p)
361 {
362 brand_solaris_proc_exit(p, &s10_brand);
363 }
364
365 void
366 s10_exec()
367 {
368 brand_solaris_exec(&s10_brand);
369 }
370
371 /* ARGSUSED */
372 void
373 s10_initlwp(klwp_t *l, void *bd)
374 {
375 brand_solaris_initlwp(l, &s10_brand);
376 }
377
378 void
379 s10_forklwp(klwp_t *p, klwp_t *c)
380 {
381 brand_solaris_forklwp(p, c, &s10_brand);
382
383 #ifdef __amd64
384 /*
385 * Only correct the child's %fs register if the parent's %fs register
386 * is LWPFS_SEL. If the parent's %fs register is zero, then the Solaris
387 * 10 environment that we're emulating uses a version of libc that
388 * works when %fs is zero (i.e., it contains backports of CRs 6467491
389 * and 6501650).
390 */
391 if (p->lwp_pcb.pcb_fs == LWPFS_SEL)
394 }
395
396 void
397 s10_freelwp(klwp_t *l)
398 {
399 brand_solaris_freelwp(l, &s10_brand);
400 }
401
402 void
403 s10_lwpexit(klwp_t *l)
404 {
405 brand_solaris_lwpexit(l, &s10_brand);
406 }
407
408 void
409 s10_free_brand_data(zone_t *zone)
410 {
411 kmem_free(zone->zone_brand_data, sizeof (s10_zone_data_t));
412 }
413
414 /* ARGSUSED */
415 void
416 s10_init_brand_data(zone_t *zone, kmutex_t *zsl)
417 {
418 ASSERT(zone->zone_brand == &s10_brand);
419 ASSERT(zone->zone_brand_data == NULL);
420 zone->zone_brand_data = kmem_zalloc(sizeof (s10_zone_data_t), KM_SLEEP);
421 }
422
423 int
424 s10_elfexec(vnode_t *vp, execa_t *uap, uarg_t *args, intpdata_t *idatap,
425 int level, long *execsz, int setid, caddr_t exec_file, cred_t *cred,
426 int *brand_action)
427 {
428 return (brand_solaris_elfexec(vp, uap, args, idatap, level, execsz,
429 setid, exec_file, cred, brand_action, &s10_brand, S10_BRANDNAME,
430 S10_LIB, S10_LIB32));
431 }
432
433 void
434 s10_sigset_native_to_s10(sigset_t *set)
|